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 +4 -4
- data/README.md +2 -8
- data/lib/hammerhead/command.rb +0 -106
- data/lib/hammerhead/commands/status.rb +1 -0
- data/lib/hammerhead/utils.rb +0 -2
- data/lib/hammerhead/version.rb +1 -1
- data/lib/hammerhead.rb +1 -0
- data/lib/harvest/connection.rb +1 -0
- data/lib/tasks/hammerhead.rake +1 -0
- metadata +21 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1cb27d46b5a9b322bfcd79c0bd29b857840e8d408dd80a7d2365f758f8ccc9dd
|
4
|
+
data.tar.gz: c79413e5362612df9c96b564355482b12a693d15005210fcf1ca5096ac9bdd5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d53b6eed5e8b83aa5261cf3eb9229476a5d92a1375568027dc8f38deb3f650a5b378fcb3be5e03d9cbdd382192371822c0ca354d7591667a21ce6d8093925ee
|
7
|
+
data.tar.gz: 4bca8186072e718e2f6be408da1bdc4460d7077fcb780fcd0dbf046762bac53a26c759b876e375a328868a76b1e737a3e9ae808c66a63fb17b8b573ccecf30ae
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Hammerhead
|
2
2
|
|
3
|
+
[](https://badge.fury.io/rb/hammerhead) [](https://travis-ci.org/juicyparts/hammerhead) [](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:
|
data/lib/hammerhead/command.rb
CHANGED
@@ -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
|
data/lib/hammerhead/utils.rb
CHANGED
@@ -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
|
data/lib/hammerhead/version.rb
CHANGED
data/lib/hammerhead.rb
CHANGED
data/lib/harvest/connection.rb
CHANGED
data/lib/tasks/hammerhead.rake
CHANGED
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.
|
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:
|
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.
|
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.
|
26
|
+
version: 0.4.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: tty-logger
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
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:
|
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:
|
54
|
+
version: 0.12.0
|
47
55
|
- !ruby/object:Gem::Dependency
|
48
56
|
name: harvested
|
49
57
|
requirement: !ruby/object:Gem::Requirement
|