Gems should *not be case sensitive.. or should they?

why are gem names case sensitive?

ie, gem rubyinline != gem RubyInline ??

if it’s an os/arch limitation, then i’d suggest they’d be all downcased
:slight_smile:

eg,

$ gem list --remote | grep -i rubyinline
rogerdpack-RubyInline (3.8.2.1 ruby)
RubyInline (3.8.6)
RubyInlineAcceleration (0.0.1)
scottmotte-RubyInline (3.8.1 ruby)

botp@bg-mis-u10:~
$ sudo gem install rubyinline
[sudo] password for botp:
ERROR: Could not find a valid gem ‘rubyinline’ (>= 0) in any repository
botp@bg-mis-u10:~
$ sudo gem install rubyinline
ERROR: Could not find a valid gem ‘rubyinline’ (>= 0) in any repository
botp@bg-mis-u10:~
$ sudo gem install rubyinline
ERROR: Could not find a valid gem ‘rubyinline’ (>= 0) in any repository
botp@bg-mis-u10:~
$ sudo gem install RubyInline
Successfully installed ZenTest-4.4.0
Successfully installed RubyInline-3.8.6
2 gems installed
Installing ri documentation for ZenTest-4.4.0…
Installing ri documentation for RubyInline-3.8.6…
Installing RDoc documentation for ZenTest-4.4.0…
Installing RDoc documentation for RubyInline-3.8.6…
botp@bg-mis-u10:~

best regards -botp

On Mon, Oct 4, 2010 at 7:49 AM, botp [email protected] wrote:

why are gem names case sensitive?

ie, gem rubyinline != gem RubyInline  ??

if it’s an os/arch limitation, then i’d suggest they’d be all downcased :slight_smile:

Interesting. I does make sense to me that search/list finds either
case and that install requires an exact match. I like the simplicity
of the idea, but if it’s possible to publish 2 gems with same name
using different casings, this won’t work. I think.

Regards,
Ammar

On Mon, Oct 4, 2010 at 9:13 PM, Ammar A. [email protected] wrote:

but if it’s possible to publish 2 gems with same name using different casings…

yes, unfortunately,…

g=gem list --remote.each_line.map{|x| x.split.first};
gd=g.map(&:downcase);
gd.get_duplicates.size
#=> 121
gd.get_duplicates
#=> [“abundance”, “actionpool”, “actiontimer”, “activesambaldap”,
“adkron-data_bank”, “alltom-glapp”, “ambethia-smtp-tls”,
“andre-geokit”, “apptower-ubistrano”, “arbarlow-rubycurl”,
“assaf-uuid”, “autonzb”, “babelfish”, “baccigalupi-aqua”, “bangkok”,
“bcaccinolo-mailchimp_api”, “bluecloth”, “bougyman-freeswitcher”,
“box2d”, “bterlson-reddit”, “buildr”, “cedric-shorty”, “commandline”,
“console”, “creationix-milk”, “crudtree”, “cyrillizer”,
“dcrec1-rhyme”, “dnsruby”, “dtaus”, “dtr”, “elliottcable-jello”,
“elliottcable-nfoiled”, “elliottcable-refinery”,
“elliottcable-stringray”, “entangledstate-isbn”, “etch”, “fakeweb”,
“farsifu”, “fivepointssolutions-serve”, “flashatron”, “freeswitcher”,
“funit”, “gdata”, “gooby”, “hebruby”, “informer”, “io-reactor”,
“jalalidate”, “jamierumbelow-gistify”, “jarrett-quarto”, “jazzez”,
“jbe-termite”, “jgre-monkeyspecdoc”, “jruby-openssl”, “kanocc”,
“laowaihua”, “linguistics”, “listrophy-suprails”, “luikore-bk201”,
“luikore-cici”, “maca-scruby”, “markaby”, “martin”,
“matthewrudy-aspicious”, “matthewrudy-rudeq”, “mdaines-feasible”,
“memoize”, “meskyanichi-timer”, “mp4info”, “nabaztag”, “nephila”,
“nilsimsa”, “njacobeus-tokboxer”, “oasis”, “onion”, “onlooker”,
“opal”, “pablo”, “parseargs”, “piggy”, “polar”, “popen4”,
“pvande-differ”, “rack”, “radar-lookup”, “rafaelgaspar-sexyprotocol”,
“redgreen”, “reposh”, “roadrunner”, “rogerleite-gedit-snippets-tool”,
“ron”, “roxml”, “rsruby”, “rtask”, “ruby-hl7”, “rvm”, “sac”,
“selenium-client”, “soleone-highrise”, “spy-vs-spy”, “sqs”, “stencil”,
“stompmq”, “sysvipc”, “text”, “tommi-cmd_tweet”, “tracker”, “usage”,
“valuable”, “vimmate”, “visionmedia-growl”, “visionmedia-san”,
“watersofoblivion-burn”, “watersofoblivion-footpedal”,
“willbailey-flareshow”, “writeexcel”, “x12”, “xmlcanonicalizer”,
“xray”, “zliby”]
g.grep /actiontime/i
#=> [“actiontimer”, “ActionTimer”]
g.grep /actionpool/i
#=> [“ActionPool”, “actionpool”]
g.grep /^popen4/i
#=> [“popen4”, “POpen4”]

and some weirdos…

g.grep /^-/i
#=> [“-”]
g.grep /^1234/i
#=> [“1234567890_”]

best regards -botp

On Oct 4, 12:49 am, botp [email protected] wrote:

why are gem names case sensitive?

ie, gem rubyinline != gem RubyInline ??

if it’s an os/arch limitation, then i’d suggest they’d be all downcased :slight_smile:

+1

On Oct 4, 2010, at 06:13 , Ammar A. wrote:

using different casings, this won’t work. I think.
Yeah… and I’ve screwed that up in the past when I released “zentest”
(pre hoe, so that won’t happen again). I had to get the gem removed and
forcibly removed from the gem index.

On 10/04/2010 03:12 PM, David M. wrote:

On Sunday, October 03, 2010 11:49:51 pm botp wrote:

why are gem names case sensitive?

Probably for the same reason that just about every programming language,
package manager, and Unix commandline is case sensitive, not to mention most
filesystems.

Some project management systems ask you for a “unix name”, which must be
/^[-a-z]+$/ or something like that. The display name, by contrast, can
have caps, spaces, etc. IIRC sourceforge an example.

On Sunday, October 03, 2010 11:49:51 pm botp wrote:

why are gem names case sensitive?

Probably for the same reason that just about every programming language,
package manager, and Unix commandline is case sensitive, not to mention
most
filesystems.

For what it’s worth, I do release my gems downcased, but I don’t really
see a
reason they shouldn’t be case sensitive.