Skip to content
This repository has been archived by the owner on Jul 27, 2021. It is now read-only.

Commit

Permalink
Minor changes to executable options
Browse files Browse the repository at this point in the history
  • Loading branch information
afcapel committed Sep 24, 2012
1 parent 777b440 commit 4ea618e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions bin/alondra
Expand Up @@ -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

Expand All @@ -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'


Expand Down
2 changes: 1 addition & 1 deletion test/models/configuration_test.rb
Expand Up @@ -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
Expand Down

0 comments on commit 4ea618e

Please sign in to comment.