health_graph 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -7,6 +7,7 @@ gem "oauth2", "= 0.5.2"
7
7
  gem "faraday", "= 0.7.4"
8
8
  gem "faraday_middleware", "= 0.7.0"
9
9
  gem "hashie", "= 1.2"
10
+ gem "json"
10
11
 
11
12
  # Add dependencies to develop your gem here.
12
13
  # Include everything needed to run rake, tests, features, etc.
data/Gemfile.lock CHANGED
@@ -15,6 +15,7 @@ GEM
15
15
  bundler (~> 1.0)
16
16
  git (>= 1.2.5)
17
17
  rake
18
+ json (1.6.5)
18
19
  multi_json (1.0.4)
19
20
  multipart-post (1.1.3)
20
21
  oauth2 (0.5.2)
@@ -37,6 +38,7 @@ DEPENDENCIES
37
38
  faraday_middleware (= 0.7.0)
38
39
  hashie (= 1.2)
39
40
  jeweler (~> 1.6.4)
41
+ json
40
42
  oauth2 (= 0.5.2)
41
43
  rcov
42
44
  shoulda
data/Rakefile CHANGED
@@ -27,6 +27,7 @@ Jeweler::Tasks.new do |gem|
27
27
  gem.add_dependency 'faraday_middleware', '= 0.7.0'
28
28
  gem.add_dependency 'hashie', '= 1.2'
29
29
  gem.add_dependency 'webmock', '= 1.7.6'
30
+ gem.add_dependency 'json'
30
31
  end
31
32
  Jeweler::RubygemsDotOrgTasks.new
32
33
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.3
1
+ 0.5.4
data/health_graph.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{health_graph}
8
- s.version = "0.5.3"
8
+ s.version = "0.5.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Kenny Ma"]
12
- s.date = %q{2012-03-03}
12
+ s.date = %q{2012-03-09}
13
13
  s.description = %q{This is a wrapper for RunKeeper Health Graph RESTful API.}
14
14
  s.email = %q{kenny@kennyma.me}
15
15
  s.extra_rdoc_files = [
@@ -31,6 +31,7 @@ Gem::Specification.new do |s|
31
31
  "lib/health_graph/configuration.rb",
32
32
  "lib/health_graph/model.rb",
33
33
  "lib/health_graph/models/fitness_activities_feed.rb",
34
+ "lib/health_graph/models/fitness_activity_update.rb",
34
35
  "lib/health_graph/models/new_fitness_activity.rb",
35
36
  "lib/health_graph/models/profile.rb",
36
37
  "lib/health_graph/models/sleep_feed.rb",
@@ -72,6 +73,7 @@ Gem::Specification.new do |s|
72
73
  s.add_runtime_dependency(%q<faraday>, ["= 0.7.4"])
73
74
  s.add_runtime_dependency(%q<faraday_middleware>, ["= 0.7.0"])
74
75
  s.add_runtime_dependency(%q<hashie>, ["= 1.2"])
76
+ s.add_runtime_dependency(%q<json>, [">= 0"])
75
77
  s.add_development_dependency(%q<shoulda>, [">= 0"])
76
78
  s.add_development_dependency(%q<webmock>, ["= 1.7.4"])
77
79
  s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
@@ -82,11 +84,13 @@ Gem::Specification.new do |s|
82
84
  s.add_runtime_dependency(%q<faraday_middleware>, ["= 0.7.0"])
83
85
  s.add_runtime_dependency(%q<hashie>, ["= 1.2"])
84
86
  s.add_runtime_dependency(%q<webmock>, ["= 1.7.6"])
87
+ s.add_runtime_dependency(%q<json>, [">= 0"])
85
88
  else
86
89
  s.add_dependency(%q<oauth2>, ["= 0.5.2"])
87
90
  s.add_dependency(%q<faraday>, ["= 0.7.4"])
88
91
  s.add_dependency(%q<faraday_middleware>, ["= 0.7.0"])
89
92
  s.add_dependency(%q<hashie>, ["= 1.2"])
93
+ s.add_dependency(%q<json>, [">= 0"])
90
94
  s.add_dependency(%q<shoulda>, [">= 0"])
91
95
  s.add_dependency(%q<webmock>, ["= 1.7.4"])
92
96
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
@@ -97,12 +101,14 @@ Gem::Specification.new do |s|
97
101
  s.add_dependency(%q<faraday_middleware>, ["= 0.7.0"])
98
102
  s.add_dependency(%q<hashie>, ["= 1.2"])
99
103
  s.add_dependency(%q<webmock>, ["= 1.7.6"])
104
+ s.add_dependency(%q<json>, [">= 0"])
100
105
  end
101
106
  else
102
107
  s.add_dependency(%q<oauth2>, ["= 0.5.2"])
103
108
  s.add_dependency(%q<faraday>, ["= 0.7.4"])
104
109
  s.add_dependency(%q<faraday_middleware>, ["= 0.7.0"])
105
110
  s.add_dependency(%q<hashie>, ["= 1.2"])
111
+ s.add_dependency(%q<json>, [">= 0"])
106
112
  s.add_dependency(%q<shoulda>, [">= 0"])
107
113
  s.add_dependency(%q<webmock>, ["= 1.7.4"])
108
114
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
@@ -113,6 +119,7 @@ Gem::Specification.new do |s|
113
119
  s.add_dependency(%q<faraday_middleware>, ["= 0.7.0"])
114
120
  s.add_dependency(%q<hashie>, ["= 1.2"])
115
121
  s.add_dependency(%q<webmock>, ["= 1.7.6"])
122
+ s.add_dependency(%q<json>, [">= 0"])
116
123
  end
117
124
  end
118
125
 
@@ -0,0 +1,15 @@
1
+ module HealthGraph
2
+ class FitnessActivityUpdate
3
+ include Model
4
+
5
+ hash_attr_accessor :location, :status
6
+
7
+ def initialize access_token, params
8
+ self.access_token = access_token
9
+ response = put params["uri"], HealthGraph.accept_headers[:fitness_activity], params
10
+
11
+ self.location = response.headers[:location]
12
+ self.status = response.status
13
+ end
14
+ end
15
+ end
@@ -30,5 +30,9 @@ module HealthGraph
30
30
  def new_fitness_activity params
31
31
  HealthGraph::NewFitnessActivity.new self.access_token, params
32
32
  end
33
+
34
+ def fitness_activity_update params
35
+ HealthGraph::FitnessActivityUpdate.new self.access_token, params
36
+ end
33
37
  end
34
38
  end
data/lib/health_graph.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'oauth2'
2
+ require 'json'
2
3
  require 'faraday_middleware'
3
4
  require 'health_graph/configuration'
4
5
  require 'health_graph/authentication'
@@ -10,6 +11,7 @@ require 'health_graph/models/weight_feed'
10
11
  require 'health_graph/models/sleep_feed'
11
12
  require 'health_graph/models/fitness_activities_feed'
12
13
  require 'health_graph/models/new_fitness_activity'
14
+ require 'health_graph/models/fitness_activity_update'
13
15
 
14
16
  module HealthGraph
15
17
  extend Configuration
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 5
8
- - 3
9
- version: 0.5.3
8
+ - 4
9
+ version: 0.5.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Kenny Ma
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2012-03-03 00:00:00 -08:00
17
+ date: 2012-03-09 00:00:00 -08:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -77,7 +77,7 @@ dependencies:
77
77
  prerelease: false
78
78
  version_requirements: *id004
79
79
  - !ruby/object:Gem::Dependency
80
- name: shoulda
80
+ name: json
81
81
  requirement: &id005 !ruby/object:Gem::Requirement
82
82
  none: false
83
83
  requirements:
@@ -86,12 +86,25 @@ dependencies:
86
86
  segments:
87
87
  - 0
88
88
  version: "0"
89
- type: :development
89
+ type: :runtime
90
90
  prerelease: false
91
91
  version_requirements: *id005
92
92
  - !ruby/object:Gem::Dependency
93
- name: webmock
93
+ name: shoulda
94
94
  requirement: &id006 !ruby/object:Gem::Requirement
95
+ none: false
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ segments:
100
+ - 0
101
+ version: "0"
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: *id006
105
+ - !ruby/object:Gem::Dependency
106
+ name: webmock
107
+ requirement: &id007 !ruby/object:Gem::Requirement
95
108
  none: false
96
109
  requirements:
97
110
  - - "="
@@ -103,10 +116,10 @@ dependencies:
103
116
  version: 1.7.4
104
117
  type: :development
105
118
  prerelease: false
106
- version_requirements: *id006
119
+ version_requirements: *id007
107
120
  - !ruby/object:Gem::Dependency
108
121
  name: bundler
109
- requirement: &id007 !ruby/object:Gem::Requirement
122
+ requirement: &id008 !ruby/object:Gem::Requirement
110
123
  none: false
111
124
  requirements:
112
125
  - - ~>
@@ -118,10 +131,10 @@ dependencies:
118
131
  version: 1.0.0
119
132
  type: :development
120
133
  prerelease: false
121
- version_requirements: *id007
134
+ version_requirements: *id008
122
135
  - !ruby/object:Gem::Dependency
123
136
  name: jeweler
124
- requirement: &id008 !ruby/object:Gem::Requirement
137
+ requirement: &id009 !ruby/object:Gem::Requirement
125
138
  none: false
126
139
  requirements:
127
140
  - - ~>
@@ -133,10 +146,10 @@ dependencies:
133
146
  version: 1.6.4
134
147
  type: :development
135
148
  prerelease: false
136
- version_requirements: *id008
149
+ version_requirements: *id009
137
150
  - !ruby/object:Gem::Dependency
138
151
  name: rcov
139
- requirement: &id009 !ruby/object:Gem::Requirement
152
+ requirement: &id010 !ruby/object:Gem::Requirement
140
153
  none: false
141
154
  requirements:
142
155
  - - ">="
@@ -146,10 +159,10 @@ dependencies:
146
159
  version: "0"
147
160
  type: :development
148
161
  prerelease: false
149
- version_requirements: *id009
162
+ version_requirements: *id010
150
163
  - !ruby/object:Gem::Dependency
151
164
  name: oauth2
152
- requirement: &id010 !ruby/object:Gem::Requirement
165
+ requirement: &id011 !ruby/object:Gem::Requirement
153
166
  none: false
154
167
  requirements:
155
168
  - - "="
@@ -161,10 +174,10 @@ dependencies:
161
174
  version: 0.5.2
162
175
  type: :runtime
163
176
  prerelease: false
164
- version_requirements: *id010
177
+ version_requirements: *id011
165
178
  - !ruby/object:Gem::Dependency
166
179
  name: faraday
167
- requirement: &id011 !ruby/object:Gem::Requirement
180
+ requirement: &id012 !ruby/object:Gem::Requirement
168
181
  none: false
169
182
  requirements:
170
183
  - - "="
@@ -176,10 +189,10 @@ dependencies:
176
189
  version: 0.7.4
177
190
  type: :runtime
178
191
  prerelease: false
179
- version_requirements: *id011
192
+ version_requirements: *id012
180
193
  - !ruby/object:Gem::Dependency
181
194
  name: faraday_middleware
182
- requirement: &id012 !ruby/object:Gem::Requirement
195
+ requirement: &id013 !ruby/object:Gem::Requirement
183
196
  none: false
184
197
  requirements:
185
198
  - - "="
@@ -191,10 +204,10 @@ dependencies:
191
204
  version: 0.7.0
192
205
  type: :runtime
193
206
  prerelease: false
194
- version_requirements: *id012
207
+ version_requirements: *id013
195
208
  - !ruby/object:Gem::Dependency
196
209
  name: hashie
197
- requirement: &id013 !ruby/object:Gem::Requirement
210
+ requirement: &id014 !ruby/object:Gem::Requirement
198
211
  none: false
199
212
  requirements:
200
213
  - - "="
@@ -205,10 +218,10 @@ dependencies:
205
218
  version: "1.2"
206
219
  type: :runtime
207
220
  prerelease: false
208
- version_requirements: *id013
221
+ version_requirements: *id014
209
222
  - !ruby/object:Gem::Dependency
210
223
  name: webmock
211
- requirement: &id014 !ruby/object:Gem::Requirement
224
+ requirement: &id015 !ruby/object:Gem::Requirement
212
225
  none: false
213
226
  requirements:
214
227
  - - "="
@@ -220,7 +233,20 @@ dependencies:
220
233
  version: 1.7.6
221
234
  type: :runtime
222
235
  prerelease: false
223
- version_requirements: *id014
236
+ version_requirements: *id015
237
+ - !ruby/object:Gem::Dependency
238
+ name: json
239
+ requirement: &id016 !ruby/object:Gem::Requirement
240
+ none: false
241
+ requirements:
242
+ - - ">="
243
+ - !ruby/object:Gem::Version
244
+ segments:
245
+ - 0
246
+ version: "0"
247
+ type: :runtime
248
+ prerelease: false
249
+ version_requirements: *id016
224
250
  description: This is a wrapper for RunKeeper Health Graph RESTful API.
225
251
  email: kenny@kennyma.me
226
252
  executables: []
@@ -245,6 +271,7 @@ files:
245
271
  - lib/health_graph/configuration.rb
246
272
  - lib/health_graph/model.rb
247
273
  - lib/health_graph/models/fitness_activities_feed.rb
274
+ - lib/health_graph/models/fitness_activity_update.rb
248
275
  - lib/health_graph/models/new_fitness_activity.rb
249
276
  - lib/health_graph/models/profile.rb
250
277
  - lib/health_graph/models/sleep_feed.rb
@@ -284,7 +311,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
284
311
  requirements:
285
312
  - - ">="
286
313
  - !ruby/object:Gem::Version
287
- hash: -2777065624712929792
314
+ hash: 4201451913972246663
288
315
  segments:
289
316
  - 0
290
317
  version: "0"