hammerhead 0.1.0 → 0.1.1
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/CHANGELOG.md +9 -1
- data/README.md +1 -1
- data/lib/hammerhead.rb +0 -3
- data/lib/hammerhead/commands/status.rb +5 -12
- data/lib/hammerhead/utils.rb +2 -1
- data/lib/hammerhead/version.rb +2 -1
- data/lib/harvest/connection.rb +2 -2
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 077466c0c45abef6a0ffa815e7aa20ef0138e21e19f7d723fdae08429e28c347
|
4
|
+
data.tar.gz: 277e4ad213a24efaf3d0ea586806cb5851c78588b4aef5b841790b0d9d1bee55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb6c7f3b0fd2108d8e0aeead74a6712374081f9e11dc5e1789f9d3456813f212d82392c312d1cbf97f320a7adaad0fa70cee1f0c3876d394a59fa75e8a8e97cd
|
7
|
+
data.tar.gz: 5676fb258ddd9511b0eade3009afb4068f1d63cd21300588b73142727c2c3ff1945d9692b6bf4523353b58969aa3d80690db6be87d3b0de5ab613c50c9e39651
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,16 @@
|
|
1
1
|
# Hammerhead Changes
|
2
2
|
|
3
|
+
## 0.1.1
|
4
|
+
|
5
|
+
#### Released on 24 Sep 2020
|
6
|
+
|
7
|
+
* Updates README
|
8
|
+
* Provides longer gem description
|
9
|
+
* Address Rubocop vilolations
|
10
|
+
|
3
11
|
## 0.1.0 (Initial Release)
|
4
12
|
|
5
|
-
|
13
|
+
#### Released on 19 Sep 2020
|
6
14
|
|
7
15
|
* Uses TTY Toolkit
|
8
16
|
* Calls Harvest v1 API via 'harvested'
|
data/README.md
CHANGED
@@ -167,7 +167,7 @@ clients:
|
|
167
167
|
|
168
168
|
Because of the `harvested` gem, and its use of Basic Authentication, you need to specify your credentials in order for the tool to authenticate itself against the Harvest V1 API. **GUARD YOUR CREDENTIALS!**
|
169
169
|
|
170
|
-
There are some optional configuration items that may prove useful to you. If you have a client, for whatever reason, you wish to exclude from any and all client listings, add their Client Id to the list that is `clients.exclude`. Additionally, if you'd like an easy-to-remember nickname for one, or more, of your clients, you can define them
|
170
|
+
There are some optional configuration items that may prove useful to you. If you have a client, for whatever reason, you wish to exclude from any and all client listings, add their Client Id to the list that is `clients.exclude`. Additionally, if you'd like an easy-to-remember nickname for one, or more, of your clients, you can define them under `clients.shortcuts`. For example:
|
171
171
|
|
172
172
|
```yaml
|
173
173
|
clients:
|
data/lib/hammerhead.rb
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'pry-byebug'
|
4
|
-
|
5
3
|
require 'date'
|
6
4
|
require 'hammerhead'
|
7
5
|
require_relative '../command'
|
@@ -117,24 +115,19 @@ module Hammerhead
|
|
117
115
|
|
118
116
|
case today.wday
|
119
117
|
when 0 # Sunday
|
120
|
-
self.start_date =
|
121
|
-
|
122
|
-
else
|
123
|
-
today - 6
|
124
|
-
end
|
125
|
-
self.end_date = start_date + 6
|
126
|
-
|
118
|
+
self.start_date = start_of_week.zero? ? today - 7 : today - 6
|
119
|
+
self.end_date = start_date + 6
|
127
120
|
when 1 # Monday
|
128
121
|
if start_of_week.zero?
|
129
122
|
self.start_date = today - adjustment
|
130
|
-
self.end_date
|
123
|
+
self.end_date = start_date + adjustment
|
131
124
|
else
|
132
125
|
self.start_date = today - 7
|
133
|
-
self.end_date
|
126
|
+
self.end_date = start_date + 6
|
134
127
|
end
|
135
128
|
else
|
136
129
|
self.start_date = today - adjustment
|
137
|
-
self.end_date
|
130
|
+
self.end_date = start_date + adjustment
|
138
131
|
end
|
139
132
|
end
|
140
133
|
|
data/lib/hammerhead/utils.rb
CHANGED
data/lib/hammerhead/version.rb
CHANGED
data/lib/harvest/connection.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'singleton'
|
4
|
-
require 'harvested'
|
4
|
+
require 'harvested'
|
5
5
|
|
6
6
|
module Harvest
|
7
7
|
##
|
@@ -42,7 +42,7 @@ module Harvest
|
|
42
42
|
# If +client_id+ contains alpha-characters NotImplementedError is raised.
|
43
43
|
#
|
44
44
|
def client client_id
|
45
|
-
raise NotImplementedError, 'Client by name is not implemented yet.' unless digits?
|
45
|
+
raise NotImplementedError, 'Client by name is not implemented yet.' unless digits? client_id
|
46
46
|
harvest.clients.find client_id
|
47
47
|
end
|
48
48
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.1
|
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-
|
11
|
+
date: 2020-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tty
|
@@ -58,7 +58,11 @@ dependencies:
|
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '4.0'
|
61
|
-
description:
|
61
|
+
description: "\n If you use Harvest for timekeeping, you can use this gem to create
|
62
|
+
status\n reports from your entries. Ensure your clients see activity that matches\n
|
63
|
+
\ your invoices. Use this gem to generate client-specific status reports.\n\n
|
64
|
+
\ As freelance developer, I provide weekly status reports to my clients. This\n
|
65
|
+
\ gem is my automated way of doing this through my Harvest timesheets.\n "
|
62
66
|
email:
|
63
67
|
- mel@juicyparts.com
|
64
68
|
executables:
|