harvest_overtime 1.0.0 → 1.0.1

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: 5922899a634a981bdc3748ddbdda615b61c7c31f
4
- data.tar.gz: 43548262290ac6a3cc860fe464f5236a46cfa7df
3
+ metadata.gz: 3124a3c809bcc8c81c8ce3d4b95773f4ba2623f0
4
+ data.tar.gz: cad0b0f460a5d52e47331a206eea04d808a6250e
5
5
  SHA512:
6
- metadata.gz: 151245df2b95315eb3434e7bc899acfc8cb233ad37722c838df8e9db76378bb9f55dc6ac5cce083f89cf1841e039fd6c286c07d213edd04801aa5084c2b51ee1
7
- data.tar.gz: 1ae47d19b4da295d94d50946716a768e1c9d4081af3523c7723712eb49369b360428a6bf9f286f90f8d4cb7c19c10ef92a1b74b2b189de33b4a37fad3400b9fc
6
+ metadata.gz: d431e5331f0a05b36a586599f0604ae6750161b9005f77f909afcd12d06e70330355c7aada9f93bf07c279d243fc3c4c85a5d0fa74982eef9b47313b8dd059f9
7
+ data.tar.gz: 2a12b6d1f208d8e0d2b938a5925336d2a4dd834d095daf8637bf09128752a0e04796db81186e42a43d5d3d792a8fcc4e2016cfb2409205258231cbf7899b989c
@@ -2,7 +2,9 @@
2
2
 
3
3
  require 'date'
4
4
 
5
- require_relative 'harvest_overtime/structs'
5
+ require_relative 'harvest_overtime/month'
6
+ require_relative 'harvest_overtime/time_entry'
7
+ require_relative 'harvest_overtime/time_stats'
6
8
  require_relative 'harvest_overtime/business_days_computer'
7
9
  require_relative 'harvest_overtime/harvest_client'
8
10
 
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ Month = Struct.new(:year, :month) do
4
+ def self.from_date(date)
5
+ new(date.year, date.month)
6
+ end
7
+
8
+ def to_s
9
+ "#{year}-#{month.to_s.rjust(2, '0')}"
10
+ end
11
+ end
@@ -0,0 +1,3 @@
1
+ # frozen_string_literal: true
2
+
3
+ TimeEntry = Struct.new(:date, :hours)
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ TimeStats = Struct.new(:business_hours, :billed_hours) do
4
+ def overtime
5
+ billed_hours - business_hours
6
+ end
7
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: harvest_overtime
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marek Mateja
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-22 00:00:00.000000000 Z
11
+ date: 2017-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: simplecov
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: vcr
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -105,7 +119,9 @@ files:
105
119
  - lib/harvest_overtime.rb
106
120
  - lib/harvest_overtime/business_days_computer.rb
107
121
  - lib/harvest_overtime/harvest_client.rb
108
- - lib/harvest_overtime/structs.rb
122
+ - lib/harvest_overtime/month.rb
123
+ - lib/harvest_overtime/time_entry.rb
124
+ - lib/harvest_overtime/time_stats.rb
109
125
  homepage: https://github.com/mmateja/harvest_overtime
110
126
  licenses:
111
127
  - ISC
@@ -1,23 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- Month = Struct.new(:year, :month) do
4
- def self.from_date(date)
5
- new(date.year, date.month)
6
- end
7
-
8
- def to_s
9
- "#{year}-#{month.to_s.rjust(2, '0')}"
10
- end
11
- end
12
-
13
- TimeEntry = Struct.new(:date, :hours) do
14
- def month
15
- Month.new(date.year, date.month)
16
- end
17
- end
18
-
19
- TimeStats = Struct.new(:business_hours, :billed_hours) do
20
- def overtime
21
- billed_hours - business_hours
22
- end
23
- end