hammerhead 0.1.1 → 0.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 077466c0c45abef6a0ffa815e7aa20ef0138e21e19f7d723fdae08429e28c347
4
- data.tar.gz: 277e4ad213a24efaf3d0ea586806cb5851c78588b4aef5b841790b0d9d1bee55
3
+ metadata.gz: 1cb27d46b5a9b322bfcd79c0bd29b857840e8d408dd80a7d2365f758f8ccc9dd
4
+ data.tar.gz: c79413e5362612df9c96b564355482b12a693d15005210fcf1ca5096ac9bdd5d
5
5
  SHA512:
6
- metadata.gz: eb6c7f3b0fd2108d8e0aeead74a6712374081f9e11dc5e1789f9d3456813f212d82392c312d1cbf97f320a7adaad0fa70cee1f0c3876d394a59fa75e8a8e97cd
7
- data.tar.gz: 5676fb258ddd9511b0eade3009afb4068f1d63cd21300588b73142727c2c3ff1945d9692b6bf4523353b58969aa3d80690db6be87d3b0de5ab613c50c9e39651
6
+ metadata.gz: 6d53b6eed5e8b83aa5261cf3eb9229476a5d92a1375568027dc8f38deb3f650a5b378fcb3be5e03d9cbdd382192371822c0ca354d7591667a21ce6d8093925ee
7
+ data.tar.gz: 4bca8186072e718e2f6be408da1bdc4460d7077fcb780fcd0dbf046762bac53a26c759b876e375a328868a76b1e737a3e9ae808c66a63fb17b8b573ccecf30ae
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Hammerhead
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/hammerhead.svg)](https://badge.fury.io/rb/hammerhead) [![Build Status](https://travis-ci.org/juicyparts/hammerhead.svg?branch=develop)](https://travis-ci.org/juicyparts/hammerhead) [![Coverage Status](https://coveralls.io/repos/github/juicyparts/hammerhead/badge.svg?branch=develop)](https://coveralls.io/github/juicyparts/hammerhead?branch=develop)
4
+
3
5
  A tool to generate status reports from your Harvest timesheet.
4
6
 
5
7
  With this tool you can produce client-specific status reports from the entries you make in your Harvest timesheet.
@@ -32,14 +34,6 @@ password: - Your Harvest password
32
34
 
33
35
  [TTY Toolkit](https://ttytoolkit.org/) provides the skeleton around which Hammerhead is built. It's a wonderfully easy toolkit to use. I'm barely scratching the surface of its capabilities.
34
36
 
35
- **WARNING**: As of version `'0.10.0'` there is a dependency on an old version of Bundler. Bundler version `1.17.3` works fine. I bring this up because you will receive warnings/errors when trying to use newer versions. When `tty` upgrades I will update this tool. Until then run bundler like so:
36
-
37
- ```sh
38
- $ bundle _1.17.3_ <command>
39
- ```
40
-
41
- Because of this specific dependency on `bundler` through `tty` I have elected to replicate the dependecy requirement in Hammerhead's gemspec.
42
-
43
37
  ## Installation
44
38
 
45
39
  Add this line to your application's Gemfile:
@@ -1,118 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'forwardable'
4
-
5
3
  module Hammerhead
6
4
  class Command # :nodoc: all
7
- extend Forwardable
8
-
9
- def_delegators :command, :run
10
-
11
5
  # Execute this command
12
6
  #
13
7
  # @api public
14
8
  def execute
15
9
  raise NotImplementedError, "#{self.class}##{__method__} must be implemented"
16
10
  end
17
-
18
- # The external commands runner
19
- #
20
- # @see http://www.rubydoc.info/gems/tty-command
21
- #
22
- # @api public
23
- def command **options
24
- require 'tty-command'
25
- TTY::Command.new(options)
26
- end
27
-
28
- # The cursor movement
29
- #
30
- # @see http://www.rubydoc.info/gems/tty-cursor
31
- #
32
- # @api public
33
- def cursor
34
- require 'tty-cursor'
35
- TTY::Cursor
36
- end
37
-
38
- # Open a file or text in the user's preferred editor
39
- #
40
- # @see http://www.rubydoc.info/gems/tty-editor
41
- #
42
- # @api public
43
- def editor
44
- require 'tty-editor'
45
- TTY::Editor
46
- end
47
-
48
- # File manipulation utility methods
49
- #
50
- # @see http://www.rubydoc.info/gems/tty-file
51
- #
52
- # @api public
53
- def generator
54
- require 'tty-file'
55
- TTY::File
56
- end
57
-
58
- # Terminal output paging
59
- #
60
- # @see http://www.rubydoc.info/gems/tty-pager
61
- #
62
- # @api public
63
- def pager **options
64
- require 'tty-pager'
65
- TTY::Pager.new(options)
66
- end
67
-
68
- # Terminal platform and OS properties
69
- #
70
- # @see http://www.rubydoc.info/gems/tty-pager
71
- #
72
- # @api public
73
- def platform
74
- require 'tty-platform'
75
- TTY::Platform.new
76
- end
77
-
78
- # The interactive prompt
79
- #
80
- # @see http://www.rubydoc.info/gems/tty-prompt
81
- #
82
- # @api public
83
- def prompt **options
84
- require 'tty-prompt'
85
- TTY::Prompt.new(options)
86
- end
87
-
88
- # Get terminal screen properties
89
- #
90
- # @see http://www.rubydoc.info/gems/tty-screen
91
- #
92
- # @api public
93
- def screen
94
- require 'tty-screen'
95
- TTY::Screen
96
- end
97
-
98
- # The unix which utility
99
- #
100
- # @see http://www.rubydoc.info/gems/tty-which
101
- #
102
- # @api public
103
- def which *args
104
- require 'tty-which'
105
- TTY::Which.which(*args)
106
- end
107
-
108
- # Check if executable exists
109
- #
110
- # @see http://www.rubydoc.info/gems/tty-which
111
- #
112
- # @api public
113
- def exec_exist? *args
114
- require 'tty-which'
115
- TTY::Which.exist?(*args)
116
- end
117
11
  end
118
12
  end
@@ -140,6 +140,7 @@ module Hammerhead
140
140
 
141
141
  client = configuration.client_shortcut specified_client
142
142
  raise Hammerhead::Error, "Specified shortcut: '#{specified_client}' does not exist" if client.nil?
143
+
143
144
  self.specified_client = client['id']
144
145
  end
145
146
  end
@@ -5,7 +5,6 @@ module Hammerhead
5
5
  # Contains utility-type methods available for use throughout the tool.
6
6
  #
7
7
  module Utils
8
-
9
8
  ##
10
9
  # Returns true if the specified +input+ consists of digits
11
10
  #
@@ -18,6 +17,5 @@ module Hammerhead
18
17
  def digits? input
19
18
  input.match?(/\A\d+\Z/)
20
19
  end
21
-
22
20
  end
23
21
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Hammerhead # :nodoc:
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
  end
data/lib/hammerhead.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'hammerhead'
3
4
  require 'hammerhead/configuration'
4
5
  require 'hammerhead/utils'
@@ -43,6 +43,7 @@ module Harvest
43
43
  #
44
44
  def client client_id
45
45
  raise NotImplementedError, 'Client by name is not implemented yet.' unless digits? client_id
46
+
46
47
  harvest.clients.find client_id
47
48
  end
48
49
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  # Define Rake Tasks 'internal' to Hammerhead development
3
4
 
4
5
  def configuration_filename
metadata CHANGED
@@ -1,49 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hammerhead
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mel Riffe
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-09-25 00:00:00.000000000 Z
11
+ date: 2021-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: tty
14
+ name: tty-config
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.10.0
19
+ version: 0.4.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.10.0
26
+ version: 0.4.0
27
27
  - !ruby/object:Gem::Dependency
28
- name: bundler
28
+ name: tty-logger
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.16'
34
- - - "<"
35
- - !ruby/object:Gem::Version
36
- version: '2.0'
33
+ version: 0.5.0
37
34
  type: :runtime
38
35
  prerelease: false
39
36
  version_requirements: !ruby/object:Gem::Requirement
40
37
  requirements:
41
38
  - - "~>"
42
39
  - !ruby/object:Gem::Version
43
- version: '1.16'
44
- - - "<"
40
+ version: 0.5.0
41
+ - !ruby/object:Gem::Dependency
42
+ name: tty-table
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 0.12.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
45
53
  - !ruby/object:Gem::Version
46
- version: '2.0'
54
+ version: 0.12.0
47
55
  - !ruby/object:Gem::Dependency
48
56
  name: harvested
49
57
  requirement: !ruby/object:Gem::Requirement