lib/hanami/environment.rb in hanami-0.9.2 vs lib/hanami/environment.rb in hanami-1.0.0.beta1
- old
+ new
@@ -191,10 +191,14 @@
# # Hanami::Environment evaluates `.env` first as master configuration.
# # Then it evaluates `.env.development` because the current environment
# # is "development". The settings defined in this last file override
# # the one defined in the parent (eg `FOO` is overwritten). All the
# # other settings (eg `XYZ`) will be left untouched.
+ # # Variables declared on `.env` and `.env.development` will not override
+ # # any variable declared on the shell when calling a `hanami` command.
+ # # Eg. In `FOO="not ok" bundle exec hanami c` `FOO` will not be overwritten
+ # # to `"ok"`.
def initialize(options = {})
opts = options.to_h.dup
@env = Hanami::Env.new(env: opts.delete(:env) || ENV)
@options = Hanami::Hanamirc.new(root).options
@options.merge! Utils::Hash.new(opts.clone).symbolize!
@@ -329,10 +333,10 @@
end.to_i
end
# Check if the current port is the default one
#
- # @since x.x.x
+ # @since 1.0.0.beta1
# @api private
#
# @see Hanami::ApplicationConfiguration#port
def default_port?
port == DEFAULT_PORT