slimtimer4r 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/lib/slimtimer4r.rb +7 -3
- metadata +2 -2
data/History.txt
CHANGED
data/lib/slimtimer4r.rb
CHANGED
@@ -2,7 +2,7 @@ require 'yaml'
|
|
2
2
|
require 'net/http'
|
3
3
|
|
4
4
|
class SlimTimer
|
5
|
-
VERSION = '0.2.
|
5
|
+
VERSION = '0.2.2'
|
6
6
|
|
7
7
|
#
|
8
8
|
# The Record class is used to encapsulate the data returned from the SlimTimer API. This allows access
|
@@ -118,11 +118,15 @@ class SlimTimer
|
|
118
118
|
# it will append a time of 23:59:59 to the request. Default
|
119
119
|
# is +nil+, meaning there is no end range.
|
120
120
|
def list_timeentries(range_start=nil, range_end=nil)
|
121
|
-
|
121
|
+
if range_start.is_a?(Date)
|
122
|
+
range_start = range_start.strftime("%Y-%m-%dT00:00:00Z")
|
123
|
+
else
|
124
|
+
range_start = range_start.strftime("%Y-%m-%dT%H:%M:%SZ") unless range_start.nil?
|
125
|
+
end
|
122
126
|
if range_end.is_a?(Date)
|
123
127
|
range_end = range_end.strftime("%Y-%m-%dT23:59:59Z")
|
124
128
|
else
|
125
|
-
range_end = range_end.strftime("%Y-%m-%dT%H:%M:%SZ")
|
129
|
+
range_end = range_end.strftime("%Y-%m-%dT%H:%M:%SZ") unless range_end.nil?
|
126
130
|
end
|
127
131
|
request("get", "#{@user_id}/time_entries?api_key=#{@api_key}&access_token=#{@access_token}&range_start=#{range_start}&range_end=#{range_end}", "TimeEntries")
|
128
132
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slimtimer4r
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dylan Markow
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-01-
|
12
|
+
date: 2008-01-15 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|