fare 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fare.rb +9 -1
- data/lib/fare/configuration_when_locked.rb +1 -1
- data/lib/fare/load_configuration_file.rb +1 -1
- data/lib/fare/queue_adapter.rb +3 -1
- data/lib/fare/subscriber_cli.rb +2 -2
- data/lib/fare/update_cli.rb +1 -1
- data/lib/fare/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 496714fa2c9327da27c286ba35864237dce08deb
|
4
|
+
data.tar.gz: e5e12ae873bbc93ae5fadf9fd9ee090f83132cc6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8cfd6df7003675d527b3740f4382c501cb0a4847fd72829e83530e2720814444787dc7a487e9fe12a785be5eddf4f98d91178c03821e8dad2432f77db323cbd
|
7
|
+
data.tar.gz: c428fa722d7a2233433fbfb00a6110c5ec1bbd3bd399840d1474d305f0e214ea9e606d23594e01ef1d048eb8583689c17a405e5676992b68912bf64dcd55f4da
|
data/lib/fare.rb
CHANGED
@@ -69,10 +69,18 @@ module Fare
|
|
69
69
|
File.expand_path("config/fare.rb", Dir.pwd)
|
70
70
|
end
|
71
71
|
|
72
|
+
def self.environment=(value)
|
73
|
+
@environment = value.to_s
|
74
|
+
end
|
75
|
+
|
76
|
+
def self.environment
|
77
|
+
@environment || default_environment
|
78
|
+
end
|
79
|
+
|
72
80
|
def self.default_environment
|
73
81
|
env = ENV["RACK_ENV"] || ENV["RAILS_ENV"]
|
74
82
|
if env.nil? && defined?(::Rails)
|
75
|
-
env = Rails.env
|
83
|
+
env = Rails.env.to_s
|
76
84
|
end
|
77
85
|
env
|
78
86
|
end
|
@@ -5,7 +5,7 @@ module Fare
|
|
5
5
|
|
6
6
|
def initialize(options)
|
7
7
|
@filename = options.fetch(:filename) { Fare.default_config_file }
|
8
|
-
@environment = options.fetch(:environment) { Fare.
|
8
|
+
@environment = options.fetch(:environment) { Fare.environment }
|
9
9
|
verify_file!
|
10
10
|
end
|
11
11
|
|
data/lib/fare/queue_adapter.rb
CHANGED
data/lib/fare/subscriber_cli.rb
CHANGED
@@ -36,7 +36,7 @@ module Fare
|
|
36
36
|
def start
|
37
37
|
fare_options = {
|
38
38
|
filename: Fare.default_config_file,
|
39
|
-
environment: (Fare.
|
39
|
+
environment: (Fare.environment || "development"),
|
40
40
|
}
|
41
41
|
daemon_options = {
|
42
42
|
concurrency: 4,
|
@@ -147,7 +147,7 @@ module Fare
|
|
147
147
|
def restart
|
148
148
|
fare_options = {
|
149
149
|
filename: Fare.default_config_file,
|
150
|
-
environment: (Fare.
|
150
|
+
environment: (Fare.environment || "development"),
|
151
151
|
}
|
152
152
|
daemon_options = {
|
153
153
|
concurrency: 4,
|
data/lib/fare/update_cli.rb
CHANGED
data/lib/fare/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fare
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- iain
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|