poweriq_client 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -157,22 +157,6 @@ completeness. Methods on the job resource simplify this for you:
157
157
 
158
158
  >> job = Job.new('/5')
159
159
  https://vm163/api/v2/jobs/5
160
- >> job.get
161
- {
162
- "job" => {
163
- "id" => 5,
164
- "user_id" => 1,
165
- "status" => "ACTIVE",
166
- "description" => nil,
167
- "start_time" => "2011/10/07 14:54:32 +0000",
168
- "end_time" => "2011/10/07 14:54:33 +0000",
169
- "has_errors" => false,
170
- "percent_complete" => .5,
171
- "completed" => false,
172
- "last_message" => "Job started",
173
- "error_count" => 0
174
- }
175
- }
176
160
  >> job.poll(:max=>12,:delay=>5)
177
161
  true
178
162
  >> job.response.json
@@ -6,9 +6,10 @@ module PowerIQ
6
6
  require_member!
7
7
  options.symbolize_keys!
8
8
  poll_count = 0
9
- unless(completed? || poll_count < options[:max])
9
+ while(poll_count < options[:max])
10
10
  poll_count += 1
11
11
  get
12
+ break if(completed?)
12
13
  Kernel.sleep(options[:delay])
13
14
  end
14
15
  begin
@@ -2,7 +2,7 @@ module PowerIQ
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 4
5
- PATCH = 0
5
+ PATCH = 1
6
6
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
7
7
  end
8
8
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{poweriq_client}
8
- s.version = "0.4.0"
8
+ s.version = "0.4.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = [%q{Trent Albright}]
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: poweriq_client
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.4.0
5
+ version: 0.4.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Trent Albright
@@ -166,7 +166,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
166
166
  requirements:
167
167
  - - ">="
168
168
  - !ruby/object:Gem::Version
169
- hash: -3128499524696260054
169
+ hash: -1033646526931584811
170
170
  segments:
171
171
  - 0
172
172
  version: "0"