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)

[email protected]:~
$ sudo gem install rubyinline
[sudo] password for botp:
ERROR: Could not find a valid gem 'rubyinline' (>= 0) in any repository
[email protected]:~
$ sudo gem install rubyinline
ERROR: Could not find a valid gem 'rubyinline' (>= 0) in any repository
[email protected]:~
$ sudo gem install rubyinline
ERROR: Could not find a valid gem 'rubyinline' (>= 0) in any repository
[email protected]:~
$ 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...
[email protected]:~

best regards -botp
 
Ad

Advertisements

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

Advertisements

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.
 

Similar threads

B
  • botp
  • Ruby
Replies
0
Views
294
botp
B
C
  • Charles Oliver Nutter
  • Ruby
Replies
0
Views
253
Charles Oliver Nutter
C
H
  • Heesob Park
  • Ruby
Replies
5
Views
722
Eric Hodel
E
K
Replies
0
Views
958
kungfu-free
K
T
  • thufir
  • Ruby
Replies
0
Views
1K
thufir
T
D
  • Duke Normandin
  • Ruby
Replies
3
Views
309
Duke Normandin
D
P
  • Peña, Botp
  • Ruby
Replies
3
Views
284
Eric Hodel
E
P
  • Pen Ttt
  • Ruby
Replies
3
Views
754
Marvin Gülker
M
Top