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

B

botp

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 :)

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
 
A

Ammar Ali

why are gem names case sensitive?

ie, gem rubyinline !=3D gem RubyInline =C2=A0??

if it's an os/arch limitation, then i'd suggest they'd be all downcased :=
)

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
 
B

botp

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
 
I

Intransition

why are gem names case sensitive?

ie, gem rubyinline !=3D gem RubyInline =A0??

if it's an os/arch limitation, then i'd suggest they'd be all downcased :=
)

+1
 
R

Ryan Davis

downcased :)
=20
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.

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.
 
D

David Masover

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.
 
J

Joel VanderWerf

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top