iron_core 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/iron_core/client.rb +7 -2
  3. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.4
1
+ 0.1.5
@@ -26,7 +26,8 @@ module IronCore
26
26
  load_from_env('IRON')
27
27
  load_from_config(product, '~/.iron.json')
28
28
 
29
- @rest = Rest::Client.new
29
+ # Should switch to net-http-persistent
30
+ @rest = Rest::Client.new(:gem=>:rest_client)
30
31
  end
31
32
 
32
33
  def set_option(source, name, value)
@@ -134,7 +135,11 @@ module IronCore
134
135
 
135
136
  IronCore::Logger.debug 'IronCore', "POST #{url + method + "?oauth=" + @token} with params='#{request_hash.to_s}'"
136
137
 
137
- RestClient.post(url + method + "?oauth=#{@token}", request_hash)
138
+ begin
139
+ RestClient.post(url + method + "?oauth=#{@token}", request_hash)
140
+ rescue RestClient::Unauthorized => e
141
+ raise IronCore::IronResponseError.new(e.response)
142
+ end
138
143
  end
139
144
 
140
145
  def parse_response(response, parse_json = true)
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: 0.1.4
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-06-25 00:00:00.000000000 Z
13
+ date: 2012-06-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rest-client
@@ -105,7 +105,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
105
105
  version: '0'
106
106
  segments:
107
107
  - 0
108
- hash: 559513805
108
+ hash: -549659870278187533
109
109
  required_rubygems_version: !ruby/object:Gem::Requirement
110
110
  none: false
111
111
  requirements: