phonehome 0.0.21 → 0.0.22

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.
@@ -1,5 +1,5 @@
1
1
  module Phonehome
2
2
  module Gem
3
- VERSION = "0.0.21"
3
+ VERSION = "0.0.22"
4
4
  end
5
5
  end
data/lib/phonehome.rb CHANGED
@@ -46,12 +46,12 @@ module Phonehome
46
46
  @begin = Time.now
47
47
  app_name = get_app_name(id)
48
48
  response = Excon.post("http://#{@@phonehomeURL}/query/#{secret_key}/#{get_status(1)}/#{id}", :headers => { "Content-Type" => "application/json" })
49
- if JSON.parse(response.body).status == 'All events are completed'
49
+ if JSON.parse(response.body)['status'] == 'All events are completed'
50
50
  p "#{id}: All events are completed"
51
- raise JSON.parse(response.body).status
51
+ raise JSON.parse(response.body)['status']
52
52
  end
53
- @id = JSON.parse(response.body).id
54
- @status = JSON.parse(response.body).status
53
+ @id = JSON.parse(response.body)['id']
54
+ @status = JSON.parse(response.body)['status']
55
55
 
56
56
  end
57
57
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phonehome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.21
4
+ version: 0.0.22
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: