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

Discussion in 'Ruby' started by botp, Oct 4, 2010.

  1. botp

    botp Guest

    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
     
    botp, Oct 4, 2010
    #1
    1. Advertising

  2. botp

    Ammar Ali Guest

    On Mon, Oct 4, 2010 at 7:49 AM, botp <> 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
     
    Ammar Ali, Oct 4, 2010
    #2
    1. Advertising

  3. botp

    botp Guest

    On Mon, Oct 4, 2010 at 9:13 PM, Ammar Ali <> 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
     
    botp, Oct 4, 2010
    #3
  4. botp

    Intransition Guest

    On Oct 4, 12:49=A0am, botp <> 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
     
    Intransition, Oct 4, 2010
    #4
  5. botp

    Ryan Davis Guest

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

    > On Mon, Oct 4, 2010 at 7:49 AM, botp <> 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.
     
    Ryan Davis, Oct 4, 2010
    #5
  6. 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.
     
    David Masover, Oct 4, 2010
    #6
  7. 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.
     
    Joel VanderWerf, Oct 5, 2010
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Xiaoshen Li

    Is linux/unix case sensitive or not?

    Xiaoshen Li, Nov 4, 2005, in forum: C Programming
    Replies:
    8
    Views:
    1,406
    James McIninch
    Nov 5, 2005
  2. Replies:
    1
    Views:
    2,547
    Mark P
    Apr 6, 2007
  3. Ruixin Wang

    DOM objects--case sensitive or not?

    Ruixin Wang, Sep 5, 2003, in forum: Javascript
    Replies:
    2
    Views:
    179
  4. Xah Lee
    Replies:
    4
    Views:
    1,042
  5. Johannes Kleese
    Replies:
    4
    Views:
    286
    Terry Reedy
    Nov 27, 2012
Loading...

Share This Page