ruby-fitbit 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -13,7 +13,7 @@ begin
13
13
  gem.add_development_dependency "shoulda", ">= 0"
14
14
  gem.add_dependency "nokogiri", ">= 1.3.0"
15
15
  gem.add_development_dependency "hirb", ">= 0.2.10"
16
- gem.add_dependency "mechanize", ">= 0.9.3"
16
+ gem.add_dependency "mechanize", ">= 1.0.0"
17
17
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
18
18
  end
19
19
  Jeweler::GemcutterTasks.new
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.4.0
@@ -7,7 +7,7 @@ if(ARGV[0]!=nil && ARGV[1]!=nil)
7
7
  fitbit = RubyFitbit.new(ARGV[0],ARGV[1])
8
8
 
9
9
  #testing some in progress API methods
10
- #fitbit.submit_food_log({:food => 'coffee', :unit => '8 oz'})
10
+ fitbit.submit_food_log({:food => 'wrap', :unit => '1 serving'})
11
11
  #fitbit.get_food_items
12
12
  #puts fitbit.get_eaten_calories[:calories_xml]
13
13
  #exit 1
@@ -11,7 +11,7 @@ class RubyFitbit
11
11
  def initialize(email, pass)
12
12
  @email = email
13
13
  @pass = pass
14
- @agent = WWW::Mechanize.new #{|a| a.log = Logger.new(STDERR) } #turn on if debugging
14
+ @agent = Mechanize.new #{|a| a.log = Logger.new(STDERR) } #turn on if debugging
15
15
  @logged_in = false
16
16
  @cached_data = {}
17
17
  end
@@ -70,7 +70,7 @@ class RubyFitbit
70
70
  form.quantityselectinput = unit
71
71
  form.quantityConsumed = unit
72
72
  form.mealTypeId = meal_type
73
-
73
+ require 'ruby-debug'; debugger
74
74
  result = @agent.submit(form, form.buttons.first)
75
75
  end
76
76
 
@@ -216,7 +216,7 @@ class RubyFitbit
216
216
  :period => "1d",
217
217
  :dateTo => date}
218
218
 
219
- params = WWW::Mechanize::Util.build_query_string(params)
219
+ params = Mechanize::Util.build_query_string(params)
220
220
  uri = "http://www.fitbit.com/graph/getGraphData?#{params}"
221
221
 
222
222
  page = @agent.get uri
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ruby-fitbit}
8
- s.version = "0.3.1"
8
+ s.version = "0.4.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Dan Mayer"]
12
- s.date = %q{2010-10-14}
12
+ s.date = %q{2010-12-15}
13
13
  s.default_executable = %q{ruby-fitbit}
14
14
  s.description = %q{This is a Ruby API for Fitbit.com, currently scraping, but soon will use the officail API (when released)}
15
15
  s.email = %q{Danmayer@gmail.com}
@@ -52,18 +52,18 @@ Gem::Specification.new do |s|
52
52
  s.add_development_dependency(%q<shoulda>, [">= 0"])
53
53
  s.add_runtime_dependency(%q<nokogiri>, [">= 1.3.0"])
54
54
  s.add_development_dependency(%q<hirb>, [">= 0.2.10"])
55
- s.add_runtime_dependency(%q<mechanize>, [">= 0.9.3"])
55
+ s.add_runtime_dependency(%q<mechanize>, [">= 1.0.0"])
56
56
  else
57
57
  s.add_dependency(%q<shoulda>, [">= 0"])
58
58
  s.add_dependency(%q<nokogiri>, [">= 1.3.0"])
59
59
  s.add_dependency(%q<hirb>, [">= 0.2.10"])
60
- s.add_dependency(%q<mechanize>, [">= 0.9.3"])
60
+ s.add_dependency(%q<mechanize>, [">= 1.0.0"])
61
61
  end
62
62
  else
63
63
  s.add_dependency(%q<shoulda>, [">= 0"])
64
64
  s.add_dependency(%q<nokogiri>, [">= 1.3.0"])
65
65
  s.add_dependency(%q<hirb>, [">= 0.2.10"])
66
- s.add_dependency(%q<mechanize>, [">= 0.9.3"])
66
+ s.add_dependency(%q<mechanize>, [">= 1.0.0"])
67
67
  end
68
68
  end
69
69
 
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 3
8
- - 1
9
- version: 0.3.1
7
+ - 4
8
+ - 0
9
+ version: 0.4.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Dan Mayer
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-10-14 00:00:00 -04:00
17
+ date: 2010-12-15 00:00:00 -05:00
18
18
  default_executable: ruby-fitbit
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -65,10 +65,10 @@ dependencies:
65
65
  - - ">="
66
66
  - !ruby/object:Gem::Version
67
67
  segments:
68
+ - 1
68
69
  - 0
69
- - 9
70
- - 3
71
- version: 0.9.3
70
+ - 0
71
+ version: 1.0.0
72
72
  type: :runtime
73
73
  version_requirements: *id004
74
74
  description: This is a Ruby API for Fitbit.com, currently scraping, but soon will use the officail API (when released)