activerecord_sqlserver_crm 4.2.12 → 4.2.13

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: c2f6c1ccfa5f5728b99b40b63e43dfb197ca9b24
4
- data.tar.gz: 7abedefce066d24e2686ff1cd6bcdfef56549350
3
+ metadata.gz: a4dba663e872c9ef4153973c83178423c2250520
4
+ data.tar.gz: 835916f3da928a34f7882e175d90f2969a8e29cd
5
5
  SHA512:
6
- metadata.gz: 775f82995015e0d621161dabccdaf5f91f6f882d3350c881c27a31e609e15b5b1668f6d4c3825175daa8773eb8189fbac9a7540fcd9c9e8aeefd0a1a09c59cee
7
- data.tar.gz: a6996f95edea9b6207ec994c730c6cada87dc10e83a5f1a82142e297f496e2f84ded0e5cd952de231718f4d71063efc857a824601d0a30c28844a22a45f448a2
6
+ metadata.gz: 5e41196b0dbfead53bfb93059479d1f140909b8dadbf7dcf856ec128e4254c96fe916b1a87cb15aee4e944cc5c57c83665e06d72ac2c0b9a0fb670a77867eb95
7
+ data.tar.gz: e8ff7d012eaa019fe1e128b55a40895dd89ce4c7046239cbc05c948c8eae8994cc8ffc6012df66866e7950626bf5346cdcaf9ec6f3fc5c6c8d1fec0dc836eae8
@@ -1,3 +1,4 @@
1
+ require 'odata_config'
1
2
  require "active_record_extension"
2
3
  require "big_decimal"
3
4
  require "sql_server_adapter"
@@ -1,4 +1,5 @@
1
1
  require 'odata/model'
2
+ require 'odata_config'
2
3
 
3
4
  module ActiveRecordExtension
4
5
 
@@ -112,12 +113,8 @@ module ActiveRecordExtension
112
113
  end
113
114
  end
114
115
 
115
- def odata_config
116
- @odata_config ||= YAML.load_file(Rails.root.join('config', 'odata.yml'))
117
- end
118
-
119
116
  # You can switch OData off by setting param: 'odata_enabled' to false
120
- unless odata_config[Rails.env]['odata_enabled'] == false
117
+ unless OdataConfig.odata_config[Rails.env]['odata_enabled'] == false
121
118
  # include the extension
122
119
  ActiveRecord::Base.send(:include, ActiveRecordExtension)
123
120
 
@@ -1,3 +1,3 @@
1
1
  module ActiverecordSqlserverCrm
2
- VERSION = "4.2.12"
2
+ VERSION = "4.2.13"
3
3
  end
@@ -10,7 +10,7 @@ module OData
10
10
  end
11
11
 
12
12
  def base_url
13
- ODATA_CONFIG[Rails.env]['data_url']
13
+ OdataConfig.odata_config[Rails.env]['data_url']
14
14
  end
15
15
 
16
16
  def check_response_errors(response)
@@ -79,7 +79,7 @@ module OData
79
79
  end
80
80
 
81
81
  def operation_password
82
- ODATA_CONFIG[Rails.env]['password']
82
+ OdataConfig.odata_config[Rails.env]['password']
83
83
  end
84
84
 
85
85
  def operation_url
@@ -87,7 +87,7 @@ module OData
87
87
  end
88
88
 
89
89
  def operation_username
90
- ODATA_CONFIG[Rails.env]['username']
90
+ OdataConfig.odata_config[Rails.env]['username']
91
91
  end
92
92
 
93
93
  def table_pluralize(name)
@@ -0,0 +1,7 @@
1
+ class OdataConfig
2
+
3
+ def self.odata_config
4
+ @odata_config ||= YAML.load_file(Rails.root.join('config', 'odata.yml'))
5
+ end
6
+
7
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord_sqlserver_crm
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.12
4
+ version: 4.2.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rolf Lawrenz
@@ -163,6 +163,7 @@ files:
163
163
  - lib/odata/model.rb
164
164
  - lib/odata/operation.rb
165
165
  - lib/odata/update_operation.rb
166
+ - lib/odata_config.rb
166
167
  - lib/sql_server_adapter.rb
167
168
  - lib/tasks/activerecord_sqlserver_crm_tasks.rake
168
169
  homepage: https://github.com/RolfLawrenz/activerecord_sqlserver_crm