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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 14377ccc5ecea39d948921b57b2dbaa0ba3587a3358dd8b157cb1ea62c065903
4
- data.tar.gz: 0715f4dfd5fcd3c05dca7f465aaa3786c063962678d6908689e333acee53bb5a
3
+ metadata.gz: 077466c0c45abef6a0ffa815e7aa20ef0138e21e19f7d723fdae08429e28c347
4
+ data.tar.gz: 277e4ad213a24efaf3d0ea586806cb5851c78588b4aef5b841790b0d9d1bee55
5
5
  SHA512:
6
- metadata.gz: 8d10e94d35cb84c1b49a798c53a83f7a18569e23cef1fbfdb459225469594828c851dcaaeab45a8aef959847c6e261397a0591dc858c991883c407fbeed150b0
7
- data.tar.gz: 7c9f0718653bcf825ac604bb24ac1d3bb827c544a3cd9fc201ab05fa140c1cd78117f1b873f68db9c65d7e80d2b2011086727d519a855973483b2c4e77bba7d4
6
+ metadata.gz: eb6c7f3b0fd2108d8e0aeead74a6712374081f9e11dc5e1789f9d3456813f212d82392c312d1cbf97f320a7adaad0fa70cee1f0c3876d394a59fa75e8a8e97cd
7
+ data.tar.gz: 5676fb258ddd9511b0eade3009afb4068f1d63cd21300588b73142727c2c3ff1945d9692b6bf4523353b58969aa3d80690db6be87d3b0de5ab613c50c9e39651
@@ -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
- ### Released on [Date]
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 until `clients.shortcuts`. For example:
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:
@@ -8,9 +8,6 @@ require 'harvest'
8
8
 
9
9
  require 'tty-logger'
10
10
 
11
- require 'pry-byebug'
12
- require 'ap'
13
-
14
11
  ##
15
12
  # Wraps the functionality of the hammerhead tool. Contains the commands
16
13
  # defined, and implemented, by the +tty+ gem.
@@ -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 = if start_of_week.zero?
121
- today - 7
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 = start_date + adjustment
123
+ self.end_date = start_date + adjustment
131
124
  else
132
125
  self.start_date = today - 7
133
- self.end_date = start_date + 6
126
+ self.end_date = start_date + 6
134
127
  end
135
128
  else
136
129
  self.start_date = today - adjustment
137
- self.end_date = start_date + adjustment
130
+ self.end_date = start_date + adjustment
138
131
  end
139
132
  end
140
133
 
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Hammerhead
3
4
  ##
4
5
  # Contains utility-type methods available for use throughout the tool.
@@ -19,4 +20,4 @@ module Hammerhead
19
20
  end
20
21
 
21
22
  end
22
- end
23
+ end
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  module Hammerhead # :nodoc:
3
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
4
5
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'singleton'
4
- require 'harvested' # NOTE: support for Harvest API V1
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?(client_id)
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.0
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-19 00:00:00.000000000 Z
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: Generate status reports from Harvest timesheets. TBD...
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: