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 +4 -4
- data/lib/harvest_overtime.rb +3 -1
- data/lib/harvest_overtime/month.rb +11 -0
- data/lib/harvest_overtime/time_entry.rb +3 -0
- data/lib/harvest_overtime/time_stats.rb +7 -0
- metadata +19 -3
- data/lib/harvest_overtime/structs.rb +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3124a3c809bcc8c81c8ce3d4b95773f4ba2623f0
|
4
|
+
data.tar.gz: cad0b0f460a5d52e47331a206eea04d808a6250e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d431e5331f0a05b36a586599f0604ae6750161b9005f77f909afcd12d06e70330355c7aada9f93bf07c279d243fc3c4c85a5d0fa74982eef9b47313b8dd059f9
|
7
|
+
data.tar.gz: 2a12b6d1f208d8e0d2b938a5925336d2a4dd834d095daf8637bf09128752a0e04796db81186e42a43d5d3d792a8fcc4e2016cfb2409205258231cbf7899b989c
|
data/lib/harvest_overtime.rb
CHANGED
@@ -2,7 +2,9 @@
|
|
2
2
|
|
3
3
|
require 'date'
|
4
4
|
|
5
|
-
require_relative 'harvest_overtime/
|
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
|
|
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.
|
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-
|
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/
|
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
|