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 +4 -0
- data/lib/beeminder/goals.rb +1 -1
- data/lib/beeminder/user.rb +7 -0
- data/lib/beeminder/version.rb +1 -1
- metadata +4 -4
data/CHANGES.md
CHANGED
data/lib/beeminder/goals.rb
CHANGED
@@ -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"
|
123
|
+
"sendmail" => opts[:sendmail] || false
|
124
124
|
}.merge(dp.to_hash)
|
125
125
|
|
126
126
|
@user.post "users/me/goals/#{@slug}/datapoints.json", data
|
data/lib/beeminder/user.rb
CHANGED
@@ -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|
|
data/lib/beeminder/version.rb
CHANGED
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.
|
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-
|
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:
|
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:
|
122
|
+
hash: -4420533533001191387
|
123
123
|
requirements: []
|
124
124
|
rubyforge_project:
|
125
125
|
rubygems_version: 1.8.23
|