Closed rye closed 9 years ago
Wait, why are the Configuration
classes being killed? I didn't really understand the explanation thoroughly.
The way I see it, Configuration
is a part of Environment
; Environment
isn't a part of Configuration
.
I see it the opposite way around.
The Environment is used to describe the constraints of the entire system that FReCon runs on, right? Having the Environment contain configuration values as well as the general environment variable (:development
, :test
, :production
) just makes sense according to that definition.
Yeah, that makes sense. Honestly, either name is largely okay with me, because I can see it in multiple ways. I just did not realize at the start that it was largely replacing Configuration
with Environment
, but now I understand and all is good.
Yeah, originally I thought that it would be different in that I'd have both, but then I realized that I wanted to merge the two.
@Sammidysam does this look good to you now? If you're too busy to check I can just go ahead and merge it. Once I've merged this, I will also create a release and tag for v1.3.0
and push the new version up to RubyGems.
@Sammidysam gave me the black light (no response because busy) so I'll go ahead and merge. We'll look at any problems if they come up.
This stems off of #77.
Here's the plan: throw together a system as follows:
Configuration
andConfigurationFile
classes, mocking their functionality out into protected methods within whichever classes consume then.Environment
class.@environment_variable
manipulation methods (:environment
and:environment=
inFReCon
inlib/frecon/base/variables.rb
) out into this newEnvironment
class.Environment#initialize
should take a single argument (variable
, which will be a Symbol, one of:[:development, :production, :test]
), and should use that to initialize stuff based off of defaults.ENV
Hash) is present to replace the values in the list, it should be used.