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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 84ceb8e46ddd99ea89b3d8cc9a4d364ab1ab5737
4
- data.tar.gz: fd2d18ff4d538c26b6d9af8ce1b6b0f916eb98c9
3
+ metadata.gz: d2351d81fece6206c02a00af4072b5f4248cb17b
4
+ data.tar.gz: 1e9e79bee92d5571c1b2ad5c2c71241a66fc178d
5
5
  SHA512:
6
- metadata.gz: d7687d7aa9ea7a46f655841f4dbf788bc7ff472842ea8e8e3085242dd420f7947afc667ea2ce259f2f0eed13955dcf0672de17c05bc291b0861231fe41e0e5f8
7
- data.tar.gz: 0c3d0f35bdaa99570cae4efe7ddf101f3f0722f69c1e8d64dbb190a0a7acd31e0f028adf9b7378fe01fb30ab87695c3c1c2883d731ece9be958acf185a991e53
6
+ metadata.gz: 5138578765cece54d80e2fa6d613592442c90e6c060fd94a126152ae718ed27e8c90c9275f17b43a9505dbe54692b138f09ff828ca0c0cb36ef5559967720747
7
+ data.tar.gz: 52986ccf4a115e76a56b71336156941b9ef0984ca022eac11080b184eb542f2ec21ce943287bbeee4b1bcc68eac504bb08d125ee3f28a9398a879bd271611695
@@ -7,20 +7,22 @@ module OData
7
7
 
8
8
  config.odata = ActiveSupport::OrderedOptions.new
9
9
 
10
- initializer('odata_configuration') do |app|
11
- parse_configuration(app)
12
- process_configuration(app)
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(app)
18
- config_file = File.open(File.join(app.root, 'config/odata.yml')).read
19
- parsed_config = YAML.load(config_file)
20
- configuration = parsed_config.with_indifferent_access
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(app)
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)
@@ -1,5 +1,5 @@
1
1
  module OData
2
2
  module Model
3
- VERSION = '0.5.5'
3
+ VERSION = '0.5.6'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: odata-model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Thompson