hcl 0.4.13 → 0.4.14

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: dac750ac8f6af6e470f7049ca6dda180109ff019
4
- data.tar.gz: 4d8140eb7d896ceb5e1f04cb6922f26f96a7f004
3
+ metadata.gz: 3fbbcf4c5e000a50c1543411c0077e55d8b4cb1b
4
+ data.tar.gz: 1b3853aa178ef5b8cd40f55e00a5bc8fc084a6ab
5
5
  SHA512:
6
- metadata.gz: 96ed711b5b025eb2759307182391d7c81043d57c73f9d297028aa1021645056c2fd2a05a273451fddc4c2d80af0ade997d9ffc494662b8d6ba2e59bce32456cd
7
- data.tar.gz: 3b14f61314d0e3944ae4370485778f85a2e866f0c9c3eea155eaae340f79670c9ac299ee13be4737623dfb723aaee148ca38d82179a25e5fbb999ed2f9a40e47
6
+ metadata.gz: 20f0adb8c4324efd9f459aa974d2b18b7dc49c5248dd6d3665efb2a7a56ce8a94beb2f30b1a6b76564b7ddd878d1247f29977f589c3368cd581c8a4a7673aaf1
7
+ data.tar.gz: 321aa709d99680d1d3c9f17bf1345a16098110c4157604fdc39dd2efec593f300048f89b812e5e9639b8179d3c3796e40356b2038d467855ee88be007c49a42c
@@ -1,5 +1,10 @@
1
1
  # Recent Changes in HCl
2
2
 
3
+ ## v0.4.14 2014-04-21
4
+
5
+ * remove the non-SSL option as it's no longer needed, closes #57
6
+ * add a dependency on `gem-man` and instructions for use
7
+
3
8
  ## v0.4.13 2014-02-04
4
9
 
5
10
  * oops, fixed a syntax error that was accidentally committed before release!
@@ -21,6 +21,14 @@ or you can install from source:
21
21
 
22
22
  rake install
23
23
 
24
+ Once installed, you can view this README as a man page:
25
+
26
+ gem man hcl
27
+
28
+ I recommend aliasing your `man` command to additionally load gem man pages:
29
+
30
+ alias man="gem man -ls"
31
+
24
32
  ## SYNOPSIS
25
33
 
26
34
  hcl [start] @<task_alias> [+<time>] [<message>]
@@ -114,7 +122,7 @@ the same arguments as start:
114
122
 
115
123
  The above starts and immediately stops a one-hour timer with the given note.
116
124
 
117
- ## Advanced Usage
125
+ ## ADVANCED USAGE
118
126
 
119
127
  ### Bash Auto-completion of Task Aliases
120
128
 
data/Rakefile CHANGED
@@ -1,6 +1,13 @@
1
1
  require 'rubygems/tasks'
2
2
  Gem::Tasks.new
3
3
 
4
+ # I am dumb and keep forgetting to update the bundle before releasing
5
+ task :update_bundle do
6
+ system("bundle")
7
+ system("git ci -am 'update gemfile.lock'")
8
+ end
9
+ task :release => :update_bundle
10
+
4
11
  require 'fileutils'
5
12
  task :clean do
6
13
  FileUtils.rm_rf %w[ pkg coverage doc man/hcl.1 ]
@@ -169,7 +169,6 @@ EOM
169
169
  config['login'] = ask("Email Address: ").to_s
170
170
  config['password'] = ask("Password: ") { |q| q.echo = false }.to_s
171
171
  config['subdomain'] = ask("Subdomain: ").to_s
172
- config['ssl'] = /^y/.match(ask("Use SSL? (y/n): ").downcase)
173
172
  @http = HCl::Net.new config
174
173
  write_config config
175
174
  end
@@ -209,7 +208,7 @@ EOM
209
208
  end
210
209
 
211
210
  def has_security_command?
212
- if @has_security.nil?
211
+ if @has_security.nil?
213
212
  @has_security = File.exists?('/usr/bin/security') &&
214
213
  (`/usr/bin/security error 1` =~ /CSSM_ERRCODE_INTERNAL_ERROR/)
215
214
  else
@@ -25,7 +25,7 @@ class HCl::HarvestMiddleware < Faraday::Request::BasicAuthentication
25
25
  env[:body]
26
26
  end
27
27
  when 300..399
28
- raise Failure, "Redirected! Perhaps your ssl configuration variable is set incorrectly?"
28
+ raise Failure, "Redirected!"
29
29
  when 400..499
30
30
  raise AuthFailure, "Login failed."
31
31
  when 503
@@ -4,7 +4,7 @@ require 'faraday'
4
4
  module HCl
5
5
  class Net
6
6
  # configuration accessors
7
- CONFIG_VARS = [ :login, :password, :subdomain, :ssl ].freeze.
7
+ CONFIG_VARS = [ :login, :password, :subdomain ].freeze.
8
8
  each { |config_var| attr_reader config_var }
9
9
 
10
10
  def config_hash
@@ -15,9 +15,8 @@ module HCl
15
15
  @login = opts['login'].freeze
16
16
  @password = opts['password'].freeze
17
17
  @subdomain = opts['subdomain'].freeze
18
- @ssl = !!opts['ssl']
19
18
  @http = Faraday.new(
20
- "http#{ssl ? 's' : '' }://#{subdomain}.harvestapp.com"
19
+ "https://#{subdomain}.harvestapp.com"
21
20
  ) do |f|
22
21
  f.use :harvest, login, password
23
22
  f.adapter Faraday.default_adapter
@@ -1,3 +1,3 @@
1
1
  module HCl
2
- VERSION = '0.4.13'
2
+ VERSION = '0.4.14'
3
3
  end
data/man/hcl.1 CHANGED
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "HCL" "1" "February 2014" "" ""
4
+ .TH "HCL" "1" "April 2014" "" ""
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBhcl\fR \- Track time with Harvest time sheets
@@ -157,7 +157,7 @@ hcl log @xdev +1 Worked for an hour\.
157
157
  .P
158
158
  The above starts and immediately stops a one\-hour timer with the given note\.
159
159
  .
160
- .SH "Advanced Usage"
160
+ .SH "ADVANCED USAGE"
161
161
  .
162
162
  .SS "Bash Auto\-completion of Task Aliases"
163
163
  You can enable auto\-completion of task aliases by adding this to your shell configuration (note the backticks inside the double quotes):
@@ -50,7 +50,7 @@ class AppTest < HCl::TestCase
50
50
  app = HCl::App.new
51
51
  configured = states('configured').starts_as(false)
52
52
  app.expects(:show).raises(HCl::HarvestMiddleware::AuthFailure).when(configured.is(false))
53
- app.expects(:ask).returns('xxx').times(4).when(configured.is(false))
53
+ app.expects(:ask).returns('xxx').times(3).when(configured.is(false))
54
54
  app.expects(:write_config).then(configured.is(true))
55
55
  app.expects(:show).when(configured.is(true))
56
56
  app.process_args('show').run
@@ -6,7 +6,6 @@ class NetTest < HCl::TestCase
6
6
  assert_equal 'bob', http.login
7
7
  assert_equal 'secret', http.password
8
8
  assert_equal 'bobclock', http.subdomain
9
- assert_equal true, http.ssl
10
9
  end
11
10
 
12
11
  def test_http_deep_unescape
@@ -35,8 +35,7 @@ class HCl::TestCase < MiniTest::Test
35
35
  @http = HCl::Net.new \
36
36
  'login' => 'bob',
37
37
  'password' => 'secret',
38
- 'subdomain' => 'bobclock',
39
- 'ssl' => true
38
+ 'subdomain' => 'bobclock'
40
39
  end
41
40
 
42
41
  def register_uri method, path, data={}
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hcl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.13
4
+ version: 0.4.14
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-02-04 00:00:00.000000000 Z
11
+ date: 2014-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: gem-man
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: 0.3.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: 0.3.0
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: trollop
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -261,7 +275,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
261
275
  version: '0'
262
276
  requirements: []
263
277
  rubyforge_project:
264
- rubygems_version: 2.0.3
278
+ rubygems_version: 2.0.14
265
279
  signing_key:
266
280
  specification_version: 4
267
281
  summary: Harvest timesheets from the command-line