Comments (14)
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.
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.
What's wrong with using RailsConfig
?
from config.
seems fine to me, running it on rails 3.2.11 with no probs
from config.
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.
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.
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.
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.
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.
Any other suggested names for the gem and/or global variable? Things like 'config', 'settings' are already taken on Ruby Gems...
from config.
The gem has now been renamed to Config
. :)
from config.
👍
from config.
@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.
@pkuczynski Of course! Done! :)
from config.
Related Issues (20)
- Ways to reload config of a running process? HOT 1
- Is it possible to reference another configuration in a YAML file? HOT 2
- Unexpected formatting of ENV variable values HOT 6
- Pioneer's question HOT 1
- Preserve newlines while using embedded Ruby HOT 2
- Error using Ruby 3.1.0 : Psych::DisallowedClass: Tried to load unspecified class: Time HOT 2
- avoid Hash monkey patch when loading DeepMerge HOT 2
- Hash sources get clobbered in `Settings.reload!` HOT 1
- ENV variables not loaded with config HOT 12
- Compability with Rails engine HOT 3
- Feature Request: Rake Task to generate env-file HOT 1
- Help with beef please HOT 1
- Released Version 4.1.0 still uses removed method `File.exists?` HOT 7
- minimum, maximum keys are conflicted with active_support methods. HOT 8
- Extend Rails integration to application HOT 3
- Environment variables not loaded anymore after upgrading to Rails 6.1.7.3 HOT 2
- How to use/mock in rspec? HOT 3
- Allow to use custom filename && directory name to store configs HOT 2
- Converting to hash is creating an error (Ruby 3.2.2, config 5.0, Rails 6.1) HOT 1
- Rails integration does not allow multiple YAML files to be specified in the first load HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from config.