beeminder 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Major Changes
2
2
 
3
+ ## 0.2.1 (2012/09/14)
4
+
5
+ - Added --date argument to CLI tool.
6
+
3
7
  ## 0.2 (2012/09/12)
4
8
 
5
9
  - Don't need to specify user names any more. It's just `User.new token` now.
@@ -120,7 +120,7 @@ module Beeminder
120
120
  # FIXME create_all doesn't work because Ruby's POST encoding of arrays is broken.
121
121
  datapoints.each do |dp|
122
122
  data = {
123
- "sendmail" => opts[:sendmail] || false
123
+ "sendmail" => opts[:sendmail] || false
124
124
  }.merge(dp.to_hash)
125
125
 
126
126
  @user.post "users/me/goals/#{@slug}/datapoints.json", data
@@ -127,6 +127,13 @@ module Beeminder
127
127
  http.read_timeout = 8640
128
128
  http.use_ssl = true
129
129
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE # FIXME: actually verify
130
+
131
+ # FIXME Sanity check for wrong timestamp. Source of bug unknown, so we prevent screwing up someone's graph.
132
+ unless data["timestamp"].nil?
133
+ if not data["timestamp"].match(/^\d+$/) or data["timestamp"] < "1280000000"
134
+ raise ArgumentError, "invalid timestamp: #{data["timestamp"]}"
135
+ end
136
+ end
130
137
 
131
138
  json = ""
132
139
  http.start do |http|
@@ -1,3 +1,3 @@
1
1
  module Beeminder
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beeminder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-14 00:00:00.000000000 Z
12
+ date: 2012-09-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chronic
@@ -110,7 +110,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
110
110
  version: '0'
111
111
  segments:
112
112
  - 0
113
- hash: 2015395519761167999
113
+ hash: -4420533533001191387
114
114
  required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  none: false
116
116
  requirements:
@@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
119
  version: '0'
120
120
  segments:
121
121
  - 0
122
- hash: 2015395519761167999
122
+ hash: -4420533533001191387
123
123
  requirements: []
124
124
  rubyforge_project:
125
125
  rubygems_version: 1.8.23