Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > gems should *not be case sensitive.. or should they?

Reply
Thread Tools

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

 
 
botp
Guest
Posts: n/a
 
      10-04-2010
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

 
Reply With Quote
 
 
 
 
Ammar Ali
Guest
Posts: n/a
 
      10-04-2010
On Mon, Oct 4, 2010 at 7:49 AM, botp <(E-Mail Removed)> wrote:
> 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

 
Reply With Quote
 
 
 
 
botp
Guest
Posts: n/a
 
      10-04-2010
On Mon, Oct 4, 2010 at 9:13 PM, Ammar Ali <(E-Mail Removed)> 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

 
Reply With Quote
 
Intransition
Guest
Posts: n/a
 
      10-04-2010


On Oct 4, 12:49=A0am, botp <(E-Mail Removed)> wrote:
> 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

 
Reply With Quote
 
Ryan Davis
Guest
Posts: n/a
 
      10-04-2010

On Oct 4, 2010, at 06:13 , Ammar Ali wrote:

> On Mon, Oct 4, 2010 at 7:49 AM, botp <(E-Mail Removed)> wrote:
>> why are gem names case sensitive?
>>=20
>> ie, gem rubyinline !=3D gem RubyInline ??
>>=20
>> if it's an os/arch limitation, then i'd suggest they'd be all =

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.


 
Reply With Quote
 
David Masover
Guest
Posts: n/a
 
      10-04-2010
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.

 
Reply With Quote
 
Joel VanderWerf
Guest
Posts: n/a
 
      10-04-2010
On 10/04/2010 03:12 PM, David Masover 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating binary gems, from source gems Patrick Hurley Ruby 0 03-04-2007 09:47 PM
Problem getting gems/listing gems. EINVAL Thaddeus L Olczyk Ruby 0 08-15-2006 05:26 AM
Gems -- #include <gems.hpp> Tomás C++ 7 03-05-2006 02:48 PM
'private' gems/gems hierarchy Dany Cayouette Ruby 3 11-25-2005 10:55 PM
Confusion about gems and non-gems working together. Lloyd Zusman Ruby 3 06-20-2005 11:23 PM



Advertisments