Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The New Config System! #1336

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

a-alhusaini
Copy link

I am proud to anounce that the new config system has been created!

instead of using yml files all the configuration data will be stored in objects that are contained within Amber.environments! To change configuration variables for an environment you write

Amber.environments["production"].port = xyz

Or, if you need to add more functionality to your environment logic you can do the following

class MyEnvironment < Amber::DefaultConfig
  # your cusomizations go here
end
Amber.environments["development"] = MyEnvironment.new

All the values are stored in instance variables to ensure that all the logic for fetching them is run when the objects are instantiated. Catching configuration errors before the app starts!

This PR is blocked by the amber_cli package. We need to move to that package before changes to the amber new command can be implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant