Permalink
Browse files

Minor changes to executable options

  • Loading branch information...
1 parent 777b440 commit 4ea618e5232be656d42c6c6b375d8293dc1fb0f6 @afcapel committed Sep 24, 2012
Showing with 5 additions and 5 deletions.
  1. +4 −4 bin/alondra
  2. +1 −1 test/models/configuration_test.rb
View
@@ -13,13 +13,13 @@ parser = OptionParser.new do |opts|
options[:host] = arg
end
- opts.on "-s", "--queue-socket", "Socket for IPC communication" do
+ opts.on "-s", "--queue-socket PATH", "Socket for IPC communication" do
options[:quiet] = true
end
opts.on "-e", "--environment ENVIRONMENT",
"The environment to run the Rack app on (default: development)" do |arg|
- options[:environment] = arg
+ ENV['RACK_ENV'] ||= arg
end
end
@@ -32,9 +32,9 @@ end
parser.parse(ARGV)
-ENV['RACK_ENV'] ||= options[:environment] || 'development'
+ENV['RACK_ENV'] ||= 'development'
-require 'config/environment'
+require './config/environment'
require 'alondra'
@@ -9,7 +9,7 @@ class ConfigurationTest < ActiveSupport::TestCase
end
test "it allows to override default values" do
- assert_equal 'localhost', Alondra.config.host
+ assert_equal '0.0.0.0', Alondra.config.host
Alondra.config.host = 'www.example.com'
assert_equal 'www.example.com', Alondra.config.host
end

0 comments on commit 4ea618e

Please sign in to comment.