hcl 0.4.10 → 0.4.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0e94f259c4106d6c9fd541aea356ad7bcc14c8b9
4
- data.tar.gz: 6c62d7d40bd19500585b8bfd8f2c1ef70a6861c7
3
+ metadata.gz: 2047a5b263411f1820b884a7360d462ce6eef539
4
+ data.tar.gz: df5dbbc4949e6b0da4e3909213d5d1da07a0c695
5
5
  SHA512:
6
- metadata.gz: 1fbad2e2f47d19d6c4bed45cfc0ee74be7abbdfbaca0289891ed5bcc04a5ac55b51f2ea612575fc43b9006cb494303d21ac29252b427073b5b9a7470cd4c40b7
7
- data.tar.gz: 0f98b72e9ec279307e13ee2edf6093725ea1ebd8d788201dab4f17bc00df3ff9da97a2a1ab9fff8909b9ecae287ee9ea1125cdf087b935028efa4df7247d2782
6
+ metadata.gz: cf3b6fdd119d9120c3bcbc109c09aedb2e618bc7582d029279e5eab435e3c85a5a1d79314fe8d042552ac39ff01b74a6bc24fce86874ea7226eff0ed2de6bb0f
7
+ data.tar.gz: b50718f5a77b2e18f592ce3b63b9cfa3d9c7c080a67c7f5c2814baa40b7c6310afab635d376fad128541c748e67fb13fee17b353b62648bdc9551f889d2f0a81
data/CHANGELOG CHANGED
@@ -1,6 +1,11 @@
1
1
  = Recent Changes in HCl
2
2
 
3
- == next version
3
+ == v0.4.11 2014-01-25
4
+
5
+ * more detailed gem dependencies, prevents unexpected failures
6
+ * added a UNIX manual page for hcl(1)
7
+
8
+ == v0.4.10 2014-01-06
4
9
 
5
10
  * added `config` command to display current credentials
6
11
  * added `console` command for exploring the Harvest API
data/Gemfile CHANGED
@@ -1,6 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
  gemspec
3
3
  gem 'pry', group:['test','development']
4
+ gem 'ronn', group:['development']
4
5
  # XXX this is dumb but it's crazy hard to get platform specfic deps into a gemspec
5
6
  gem 'rubysl-abbrev', platform:'rbx'
6
7
  gem 'rubysl-singleton', platform:'rbx'
data/Rakefile CHANGED
@@ -1,9 +1,6 @@
1
- require 'rubygems/tasks'
2
- Gem::Tasks.new
3
-
4
1
  require 'fileutils'
5
2
  task :clean do
6
- FileUtils.rm_rf %w[ pkg coverage doc ]
3
+ FileUtils.rm_rf %w[ pkg coverage doc man/hcl.1 ]
7
4
  end
8
5
 
9
6
  require 'rake/testtask'
@@ -13,7 +10,15 @@ Rake::TestTask.new do |t|
13
10
  end
14
11
  task :default => :test
15
12
 
13
+ task :man do
14
+ system 'ronn -r man/hcl.1.ronn'
15
+ end
16
+ task 'build:gem' => [:man]
17
+
16
18
  require 'yard'
17
19
  YARD::Rake::YardocTask.new
18
- task :doc => :yard
20
+ task :doc => [:yard, :man]
21
+
22
+ require 'rubygems/tasks'
23
+ Gem::Tasks.new
19
24
 
@@ -1,7 +1,7 @@
1
1
  require 'faraday'
2
2
 
3
3
  class HCl::HarvestMiddleware < Faraday::Request::BasicAuthentication
4
- Faraday.register_middleware harvest: ->{ self }
4
+ Faraday::Middleware.register_middleware harvest: ->{ self }
5
5
  MIME_TYPE = 'application/json'.freeze
6
6
 
7
7
  dependency do
@@ -1,3 +1,3 @@
1
1
  module HCl
2
- VERSION = '0.4.10'
2
+ VERSION = '0.4.11'
3
3
  end
@@ -0,0 +1,246 @@
1
+ .\" generated with Ronn/v0.7.3
2
+ .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
+ .
4
+ .TH "HCL" "1" "January 2014" "" ""
5
+ .
6
+ .SH "NAME"
7
+ \fBhcl\fR \- Track time with Harvest time sheets
8
+ .
9
+ .SH "SYNOPSIS"
10
+ .
11
+ .nf
12
+
13
+ hcl [start] @<task_alias> [+<time>] [<message>]
14
+ hcl note <message>
15
+ hcl stop [<message>]
16
+ hcl resume [@<task_alias>]
17
+ hcl log @<task_alias> [+<time>] [<message>]
18
+ hcl show [<date>]
19
+ hcl tasks [<project_code>]
20
+ hcl alias <task_alias> <project_id> <task_id>
21
+ hcl aliases
22
+ hcl (cancel | nvm | oops)
23
+ hcl config
24
+ .
25
+ .fi
26
+ .
27
+ .SH "DESCRIPTION"
28
+ HCl is a command\-line tool for interacting with Harvest time sheets using the Harvest time tracking API\.
29
+ .
30
+ .SS "Available Projects and Tasks"
31
+ To start a new timer you need to identify the project and task\. The tasks command displays a list of available tasks with their project and task IDs\.
32
+ .
33
+ .IP "" 4
34
+ .
35
+ .nf
36
+
37
+ hcl tasks
38
+ .
39
+ .fi
40
+ .
41
+ .IP "" 0
42
+ .
43
+ .P
44
+ You can also pass a project code (this is the short optional code associated with each project) to list only the tasks for that project\.
45
+ .
46
+ .SS "Starting a Timer"
47
+ Since it\'s not practical to enter two long numbers every time you want to identify a task, HCl supports task aliases:
48
+ .
49
+ .IP "" 4
50
+ .
51
+ .nf
52
+
53
+ hcl alias tacodev 1234 5678
54
+ hcl @tacodev Adding a new feature
55
+ .
56
+ .fi
57
+ .
58
+ .IP "" 0
59
+ .
60
+ .SS "Starting a Timer with Initial Time"
61
+ You can also provide an initial time when starting a new timer\. This can be expressed in floating\-point or HH:MM\. The following two commands are equivalent:
62
+ .
63
+ .IP "" 4
64
+ .
65
+ .nf
66
+
67
+ hcl @tacodev +0:15 Doing some stuff
68
+ hcl +\.25 @tacodev Doing some stuff
69
+ .
70
+ .fi
71
+ .
72
+ .IP "" 0
73
+ .
74
+ .SS "Adding Notes to a Running Task"
75
+ While a task is running you can append lines to the task notes:
76
+ .
77
+ .IP "" 4
78
+ .
79
+ .nf
80
+
81
+ hcl note Then I did something else
82
+ .
83
+ .fi
84
+ .
85
+ .IP "" 0
86
+ .
87
+ .P
88
+ \fBNote\fR that \fBshow\fR only displays the last line of the timer notes\. You can list all the notes for a running timer by issuing the note command without any arguments:
89
+ .
90
+ .IP "" 4
91
+ .
92
+ .nf
93
+
94
+ hcl note
95
+ .
96
+ .fi
97
+ .
98
+ .IP "" 0
99
+ .
100
+ .SS "Stopping a Timer"
101
+ The following command will stop a running timer (currently only one timer at a time is supported)\. You can provide a message when stopping a timer as well:
102
+ .
103
+ .IP "" 4
104
+ .
105
+ .nf
106
+
107
+ hcl stop All done doing things
108
+ .
109
+ .fi
110
+ .
111
+ .IP "" 0
112
+ .
113
+ .SS "Resuming a Timer"
114
+ You can resume a stopped timer\. Specify a task to resume the last timer for that task:
115
+ .
116
+ .IP "" 4
117
+ .
118
+ .nf
119
+
120
+ hcl resume
121
+ hcl resume @xdev
122
+ .
123
+ .fi
124
+ .
125
+ .IP "" 0
126
+ .
127
+ .SS "Canceling a Timer"
128
+ If you accidentally started a timer that you didn\'t mean to, you can cancel it:
129
+ .
130
+ .IP "" 4
131
+ .
132
+ .nf
133
+
134
+ hcl cancel
135
+ .
136
+ .fi
137
+ .
138
+ .IP "" 0
139
+ .
140
+ .P
141
+ This will delete the running timer, or the last\-updated timer if one isn\'t running\. You can also use \fBnvm\fR or \fBoops\fR instead of \fBcancel\fR\.
142
+ .
143
+ .SS "Logging without Starting a Timer"
144
+ You can log time and notes without leaving a timer running\. It takes the same arguments as start:
145
+ .
146
+ .IP "" 4
147
+ .
148
+ .nf
149
+
150
+ hcl log @xdev +1 Worked for an hour\.
151
+ .
152
+ .fi
153
+ .
154
+ .IP "" 0
155
+ .
156
+ .P
157
+ The above starts and immediately stops a one\-hour timer with the given note\.
158
+ .
159
+ .SH "ADVANCED USAGE"
160
+ .
161
+ .SS "Bash Auto\-completion of Task Aliases"
162
+ You can enable auto\-completion of task aliases by adding this to your shell configuration:
163
+ .
164
+ .IP "" 4
165
+ .
166
+ .nf
167
+
168
+ eval `hcl completion`
169
+ .
170
+ .fi
171
+ .
172
+ .IP "" 0
173
+ .
174
+ .SS "Configuration Profiles"
175
+ You can modify your credentials with the \fB\-\-reauth\fR option, and review them with \fBhcl config\fR\. If you\'d rather store multiple configurations at once, specify an alternate configuration directory in the environment as \fBHCL_DIR\fR\. This can be used to interact with multiple harvest accounts at once\.
176
+ .
177
+ .P
178
+ Here is a shell alias \fBmyhcl\fR with a separate configuration from the main \fBhcl\fR command, and another command to configure alias completion:
179
+ .
180
+ .IP "" 4
181
+ .
182
+ .nf
183
+
184
+ alias myhcl="env HCL_DIR=~/\.myhcl hcl"
185
+ eval `myhcl completion myhcl`
186
+ .
187
+ .fi
188
+ .
189
+ .IP "" 0
190
+ .
191
+ .P
192
+ Adding something like the above to your bashrc will enable a new command, \fBmyhcl\fR\. When using \fBmyhcl\fR you can use different credentials and aliases, while \fBhcl\fR will continue to function with your original configuration\.
193
+ .
194
+ .SS "Interactive Console"
195
+ An interactive Ruby console is provided to allow you to use the fairly powerful Harvest API client built into HCl, since not all of its features are exposed via the command line\. The current {HCl::App} instance is available as \fBhcl\fR\.
196
+ .
197
+ .P
198
+ It\'s also possible to issue HCl commands directly (except \fBalias\fR, see below), or to query specific JSON end points and have the results pretty\-printed:
199
+ .
200
+ .IP "" 4
201
+ .
202
+ .nf
203
+
204
+ hcl console
205
+ hcl> show "yesterday"
206
+ # => prints yesterday\'s timesheet, note the quotes!
207
+ hcl> hcl\.http\.get(\'daily\')
208
+ # => displays a pretty\-printed version of the JSON output
209
+ .
210
+ .fi
211
+ .
212
+ .IP "" 0
213
+ .
214
+ .P
215
+ Note that the HCl internals may change without notice\. Also, commands (like \fBalias\fR) that are also reserved words in Ruby can\'t be issued directly (use \fBsend :alias\fR instead)\.
216
+ .
217
+ .SS "Date Formats"
218
+ Dates can be expressed in a variety of ways\. See the Chronic documentation \fIhttp://chronic\.rubyforge\.org/\fR for more information about available date input formats\. The following commands show the time sheet for the specified day:
219
+ .
220
+ .IP "" 4
221
+ .
222
+ .nf
223
+
224
+ hcl show yesterday
225
+ hcl show last friday
226
+ hcl show 2 days ago
227
+ hcl show 1 week ago
228
+ .
229
+ .fi
230
+ .
231
+ .IP "" 0
232
+ .
233
+ .SH "AUTHOR"
234
+ HCl was designed and implemented by Zack Hobson\.
235
+ .
236
+ .IP "\(bu" 4
237
+ Non\-SSL support by Michael Bleigh\.
238
+ .
239
+ .IP "\(bu" 4
240
+ Resume command by Brian Cooke\.
241
+ .
242
+ .IP "\(bu" 4
243
+ UI improvements by Chris Scharf\.
244
+ .
245
+ .IP "" 0
246
+
metadata CHANGED
@@ -1,113 +1,113 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hcl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.10
4
+ version: 0.4.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zack Hobson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-07 00:00:00.000000000 Z
11
+ date: 2014-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trollop
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '2.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '2.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: chronic
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 0.10.2
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 0.10.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: highline
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: 1.6.20
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: 1.6.20
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: faraday
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: 0.9.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: 0.9.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: yajl-ruby
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: 1.1.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ~>
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: 1.1.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: escape_utils
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: 1.0.1
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ~>
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: 1.0.1
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: pry
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ~>
102
102
  - !ruby/object:Gem::Version
103
- version: '0'
103
+ version: 0.9.12
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ~>
109
109
  - !ruby/object:Gem::Version
110
- version: '0'
110
+ version: 0.9.12
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rake
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -240,6 +240,7 @@ files:
240
240
  - test/task_test.rb
241
241
  - test/test_helper.rb
242
242
  - test/utility_test.rb
243
+ - man/hcl.1
243
244
  homepage: http://zackhobson.com/hcl/
244
245
  licenses:
245
246
  - MIT