Giter VIP home page Giter VIP logo

Comments (14)

jacquescrocker avatar jacquescrocker commented on May 19, 2024

Heh, yeah. It's a problem :)

Sorry about that. I originally named it RailsConfig. Then used Config (which conflicted with somethign else). and then Settings.

I really wanted to get the "settings" gem, but unfortunately already taken

from config.

fredwu avatar fredwu commented on May 19, 2024

The constant used to be renamable but I remember we ran into some weird issues with that. Perhaps we could give it another try at some point.

from config.

hovsater avatar hovsater commented on May 19, 2024

What's wrong with using RailsConfig?

from config.

johnantoni avatar johnantoni commented on May 19, 2024

seems fine to me, running it on rails 3.2.11 with no probs

from config.

pkuczynski avatar pkuczynski commented on May 19, 2024

Guys, do you still see this as a problem? I personally got used to it pretty quickly, and changing this would break backward compatibility for applications using current version.

from config.

jacquescrocker avatar jacquescrocker commented on May 19, 2024

for 1.0 I'd totally support it being changed to RailsConfig, as long as theres an easy config to set a constant Settings that points to it

from config.

jacquescrocker avatar jacquescrocker commented on May 19, 2024

the issue I had was the RailsConfig module was being used for the gem, and I needed to set a constant that was the OStruct wrapper thingie. not sure the solution but if you know something clever, that'd be sweet to normalize this

from config.

pkuczynski avatar pkuczynski commented on May 19, 2024

The options I see here are:

  • change the name of the module to RailsConfigurer and use RailsConfig for the struct
  • use RailsConfig for the module and Settings for the struct (thats how it is now)
  • expose struct as property of RailsConfig, for example RailsConfig.get (equal to current Settings)
  • autowire struct into RailsConfig - but this way we loose isolation from settings.yml content and we might expect some method conflicts.

For me the choice you made is fine. Option 1 would be also fair solution. So what's your preference?

from config.

gdlx avatar gdlx commented on May 19, 2024

Looking forward this issue, why is this gem called rails_config whereas it't not dedicated to Rails...?

Chances are this name could dissuade Sinatra or Padrino users to even look at the Readme...

from config.

pkuczynski avatar pkuczynski commented on May 19, 2024

Any other suggested names for the gem and/or global variable? Things like 'config', 'settings' are already taken on Ruby Gems...

from config.

fredwu avatar fredwu commented on May 19, 2024

The gem has now been renamed to Config. :)

from config.

jc00ke avatar jc00ke commented on May 19, 2024

👍

from config.

pkuczynski avatar pkuczynski commented on May 19, 2024

@fredwu have you also change the variable name from Settings to Config? And can you make me an owner on the new gem too, like I was on rails_config? :)

from config.

fredwu avatar fredwu commented on May 19, 2024

@pkuczynski Of course! Done! :)

from config.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.