iron_core 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/iron_core/client.rb +8 -5
- data/lib/iron_core/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ecd04d4aa4b287505033f3504cb34bed8d75320
|
4
|
+
data.tar.gz: e6cf1a6ca29f96acf56591f4701a9313c0de7ac3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e50dfbf3dadf707759801d6ddda4244435489fd597b5f546dc3d5a41e507b061b9edbb563eeb93fc8fdd8226486cf6a96c66c2f3af3b9684d2a5de0d2c995d1
|
7
|
+
data.tar.gz: f3e5ab0bfe38aea63b1b2512a971d9ab5f1c08e2007ff8f86c4ade8d359f70bf725fbd1f259f317f33afc7e64039a7ab3c56966fc0b4302550e5c7dbafa56ce5
|
data/lib/iron_core/client.rb
CHANGED
@@ -57,8 +57,12 @@ module IronCore
|
|
57
57
|
load_from_config(company, product, "#{Dir.pwd}/.#{config_base}#{suffix}#{ext}")
|
58
58
|
load_from_config(company, product, "#{Dir.pwd}/config/#{config_base}#{suffix}#{ext}")
|
59
59
|
load_from_config(company, product, "#{Dir.pwd}/config/.#{config_base}#{suffix}#{ext}")
|
60
|
-
|
61
|
-
|
60
|
+
begin
|
61
|
+
load_from_config(company, product, "~/#{config_base}#{suffix}#{ext}")
|
62
|
+
load_from_config(company, product, "~/.#{config_base}#{suffix}#{ext}")
|
63
|
+
rescue Exception => ex
|
64
|
+
puts "Warning -- Unable to load from HOME: #{ex.message}"
|
65
|
+
end
|
62
66
|
end
|
63
67
|
end
|
64
68
|
end
|
@@ -187,7 +191,6 @@ module IronCore
|
|
187
191
|
end
|
188
192
|
|
189
193
|
def extract_error_msg(ex)
|
190
|
-
IronCore::Logger.debug 'IronCore', "Error returned. code: #{ex.code}"
|
191
194
|
if ex.response && ex.response.body
|
192
195
|
begin
|
193
196
|
bodyparsed = JSON.parse(ex.response.body)
|
@@ -195,7 +198,7 @@ module IronCore
|
|
195
198
|
if msg
|
196
199
|
ex.msg = msg
|
197
200
|
end
|
198
|
-
rescue
|
201
|
+
rescue => ex
|
199
202
|
# ignore
|
200
203
|
end
|
201
204
|
end
|
@@ -210,7 +213,7 @@ module IronCore
|
|
210
213
|
IronCore::Logger.debug 'IronCore', "POST #{base_url + method} with params='#{request_hash.to_s}'"
|
211
214
|
|
212
215
|
begin
|
213
|
-
|
216
|
+
@rest.post(base_url + method, request_hash)
|
214
217
|
rescue Rest::HttpError => ex
|
215
218
|
extract_error_msg(ex)
|
216
219
|
end
|
data/lib/iron_core/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iron_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kirilenko
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-05-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest
|
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
106
|
version: 1.3.6
|
107
107
|
requirements: []
|
108
108
|
rubyforge_project:
|
109
|
-
rubygems_version: 2.
|
109
|
+
rubygems_version: 2.2.2
|
110
110
|
signing_key:
|
111
111
|
specification_version: 4
|
112
112
|
summary: Core library for Iron products
|