neuron-client 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -44,7 +44,7 @@ module Neuron
44
44
  when 201
45
45
  return (format == :json ? Yajl.load(response.to_str) : response.to_str)
46
46
  when 422
47
- throw :errors, Yajl.load(response.to_str)
47
+ throw :errors, format == :json ? Yajl.load(response.to_str) : response.to_str
48
48
  else
49
49
  raise "Error : #{response.code} - #{response.to_str}"
50
50
  end
@@ -60,7 +60,7 @@ module Neuron
60
60
  when 200
61
61
  return (format == :json ? Yajl.load(response.to_str) : response.to_str)
62
62
  when 422
63
- throw :errors, Yajl.load(response.to_str)
63
+ throw :errors, format == :json ? Yajl.load(response.to_str) : response.to_str
64
64
  else
65
65
  raise "Error : #{response.code} - #{response.to_str}"
66
66
  end
@@ -6,7 +6,11 @@ module Neuron
6
6
  resources_name("reports")
7
7
 
8
8
  attr_accessor :errors
9
- attr_accessor :template, :parameters, :status
9
+ attr_accessor :template, :parameters, :state
10
+
11
+ def status
12
+ @state
13
+ end
10
14
 
11
15
  def result
12
16
  self.class.connection.get("reports/#{id}/result", :format => "")
@@ -1,5 +1,5 @@
1
1
  module Neuron
2
2
  module Client
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: neuron-client
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.4
5
+ version: 0.0.5
6
6
  platform: ruby
7
7
  authors:
8
8
  - Mark Simoneau
@@ -170,7 +170,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - ">="
172
172
  - !ruby/object:Gem::Version
173
- hash: 3235199418878311580
173
+ hash: 2389341995770378150
174
174
  segments:
175
175
  - 0
176
176
  version: "0"
@@ -179,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
179
179
  requirements:
180
180
  - - ">="
181
181
  - !ruby/object:Gem::Version
182
- hash: 3235199418878311580
182
+ hash: 2389341995770378150
183
183
  segments:
184
184
  - 0
185
185
  version: "0"