-
Notifications
You must be signed in to change notification settings - Fork 8
Environments Support
This page is up to date for upcoming Rango 0.2.
- Rango.environment defaults to "development", can be set to whatever.
- Rango.environment = "test"
- Rango.boot(environment: "test") will also set the Rango.environment
This will load all your dependencies for current Rango.environment:
Bundler.require_env(Rango.environment)
However if you don’t like it, just require environment.rb and use require for loading other libraries as usual. For more informations see bundling.
- Is current environment development: Rango.environment?("development")
- Does current environment acts like the test environment: Rango.testing?
- Does current environment acts like the development environment: Rango.development?
- Does current environment acts like the production environment: Rango.production?
The key for understanding how the “acts like” methods works are these properties:
Rango.development_environments # ["development"] Rango.testing_environments # ["test", "spec", "cucumber"] Rango.production_environments # ["stage", "production"]
You may want to create settings/environments/test.rb etc and then use in your init.rb something like: