odata-model 0.5.5 → 0.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/odata/model/railtie.rb +10 -8
- data/lib/odata/model/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2351d81fece6206c02a00af4072b5f4248cb17b
|
4
|
+
data.tar.gz: 1e9e79bee92d5571c1b2ad5c2c71241a66fc178d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5138578765cece54d80e2fa6d613592442c90e6c060fd94a126152ae718ed27e8c90c9275f17b43a9505dbe54692b138f09ff828ca0c0cb36ef5559967720747
|
7
|
+
data.tar.gz: 52986ccf4a115e76a56b71336156941b9ef0984ca022eac11080b184eb542f2ec21ce943287bbeee4b1bcc68eac504bb08d125ee3f28a9398a879bd271611695
|
data/lib/odata/model/railtie.rb
CHANGED
@@ -7,20 +7,22 @@ module OData
|
|
7
7
|
|
8
8
|
config.odata = ActiveSupport::OrderedOptions.new
|
9
9
|
|
10
|
-
initializer('
|
11
|
-
parse_configuration
|
12
|
-
process_configuration
|
10
|
+
initializer('odata.load-config') do
|
11
|
+
parse_configuration
|
12
|
+
process_configuration
|
13
13
|
end
|
14
14
|
|
15
15
|
private
|
16
16
|
|
17
|
-
def parse_configuration
|
18
|
-
config_file =
|
19
|
-
|
20
|
-
|
17
|
+
def parse_configuration
|
18
|
+
config_file = Rails.root.join('config', 'mongoid.yml')
|
19
|
+
if config_file.file?
|
20
|
+
parsed_config = YAML.load(config_file.read)
|
21
|
+
self.configuration = parsed_config.with_indifferent_access
|
22
|
+
end
|
21
23
|
end
|
22
24
|
|
23
|
-
def process_configuration
|
25
|
+
def process_configuration
|
24
26
|
configuration[Rails.env].each do |service_name, service_details|
|
25
27
|
url = service_details[:url]
|
26
28
|
options = generate_options(service_name, service_details)
|
data/lib/odata/model/version.rb
CHANGED