timestreamapp 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.DS_Store +0 -0
- data/lib/timestream.rb +53 -0
- data/lib/timestream/version.rb +1 -1
- metadata +3 -3
data/.DS_Store
CHANGED
Binary file
|
data/lib/timestream.rb
CHANGED
@@ -14,6 +14,11 @@ module Timestream
|
|
14
14
|
map "-C" => :current
|
15
15
|
map "-c" => :current
|
16
16
|
map "current" => :current
|
17
|
+
map "task" => :current
|
18
|
+
map "status" => :current
|
19
|
+
|
20
|
+
map "time-task" => :time_task
|
21
|
+
map "task-task" => :task_time
|
17
22
|
|
18
23
|
map "-L" => :login
|
19
24
|
map "-l" => :login
|
@@ -135,6 +140,54 @@ module Timestream
|
|
135
140
|
end
|
136
141
|
end
|
137
142
|
|
143
|
+
desc "time", "Get the duration of your current task"
|
144
|
+
method_option :inline, :type => :boolean, :aliases => '-i', :default => false, :desc => 'Specify if you want the output inline, i.e. with NO newline after the output. Useful when scripting.'
|
145
|
+
def time
|
146
|
+
check_credentials
|
147
|
+
|
148
|
+
inline = options[:inline]
|
149
|
+
|
150
|
+
response = HTTParty.get("https://timestreamapp.com/#{get_username}/current/time.txt", :query => {:password => get_password})
|
151
|
+
|
152
|
+
if inline == true
|
153
|
+
say(response.body, nil, false)
|
154
|
+
else
|
155
|
+
say(response.body, nil)
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
desc "time-task", "Get the time and task together"
|
160
|
+
method_option :inline, :type => :boolean, :aliases => '-i', :default => false, :desc => 'Specify if you want the output inline, i.e. with NO newline after the output. Useful when scripting.'
|
161
|
+
def time_task
|
162
|
+
check_credentials
|
163
|
+
|
164
|
+
inline = options[:inline]
|
165
|
+
|
166
|
+
response = HTTParty.get("https://timestreamapp.com/#{get_username}/current/time-task.txt", :query => {:password => get_password})
|
167
|
+
|
168
|
+
if inline == true
|
169
|
+
say(response.body, nil, false)
|
170
|
+
else
|
171
|
+
say(response.body, nil)
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
desc "task-time", "Get the task and time together"
|
176
|
+
method_option :inline, :type => :boolean, :aliases => '-i', :default => false, :desc => 'Specify if you want the output inline, i.e. with NO newline after the output. Useful when scripting.'
|
177
|
+
def task_time
|
178
|
+
check_credentials
|
179
|
+
|
180
|
+
inline = options[:inline]
|
181
|
+
|
182
|
+
response = HTTParty.get("https://timestreamapp.com/#{get_username}/current/task-time.txt", :query => {:password => get_password})
|
183
|
+
|
184
|
+
if inline == true
|
185
|
+
say(response.body, nil, false)
|
186
|
+
else
|
187
|
+
say(response.body, nil)
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
138
191
|
desc "today", "Get a list of all of today's tasks"
|
139
192
|
method_option :output, :type => :string, :aliases => '-o', :default => 'txt', :desc => 'Specify an output format: csv, json, pdf, rss, txt or xml'
|
140
193
|
def today
|
data/lib/timestream/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: timestreamapp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ahmad Varoqua
|