periods 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/Gemfile +4 -0
- data/LICENSE +22 -0
- data/README.md +134 -0
- data/Rakefile +7 -0
- data/lib/january.rb +22 -0
- data/lib/periods/classes.rb +11 -0
- data/lib/periods/constants.rb +16 -0
- data/lib/periods/date_calculator.rb +25 -0
- data/lib/periods/halfyear.rb +9 -0
- data/lib/periods/halfyearly_period.rb +8 -0
- data/lib/periods/modules/halfyear.rb +52 -0
- data/lib/periods/modules/halfyearly_period.rb +52 -0
- data/lib/periods/modules/month.rb +61 -0
- data/lib/periods/modules/monthly_period.rb +43 -0
- data/lib/periods/modules/period.rb +58 -0
- data/lib/periods/modules/quarter.rb +59 -0
- data/lib/periods/modules/quarterly_period.rb +55 -0
- data/lib/periods/modules/year.rb +85 -0
- data/lib/periods/modules/yearly_period.rb +57 -0
- data/lib/periods/modules.rb +12 -0
- data/lib/periods/month.rb +12 -0
- data/lib/periods/monthly_period.rb +12 -0
- data/lib/periods/period.rb +9 -0
- data/lib/periods/quarter.rb +9 -0
- data/lib/periods/quarterly_period.rb +8 -0
- data/lib/periods/version.rb +3 -0
- data/lib/periods/year.rb +9 -0
- data/lib/periods/yearly_period.rb +9 -0
- data/lib/periods.rb +4 -0
- data/periods.gemspec +24 -0
- data/spec/lib/halfyear_spec.rb +41 -0
- data/spec/lib/halfyearly_period_spec.rb +74 -0
- data/spec/lib/january_spec.rb +44 -0
- data/spec/lib/month_spec.rb +58 -0
- data/spec/lib/monthly_period_spec.rb +35 -0
- data/spec/lib/period_spec.rb +75 -0
- data/spec/lib/periods/date_calculator_spec.rb +24 -0
- data/spec/lib/quarter_spec.rb +117 -0
- data/spec/lib/quarterly_period_spec.rb +80 -0
- data/spec/lib/year_spec.rb +51 -0
- data/spec/lib/yearly_period_spec.rb +74 -0
- data/spec/lint_check.rb +24 -0
- data/spec/spec_helper.rb +79 -0
- metadata +145 -0
@@ -0,0 +1,117 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'periods/constants'
|
3
|
+
|
4
|
+
describe Quarter do
|
5
|
+
|
6
|
+
let(:subject) { described_class.for("1.1.2015") }
|
7
|
+
|
8
|
+
it_behaves_like "Lint Check"
|
9
|
+
|
10
|
+
describe ".for" do
|
11
|
+
it "returns quarter of given date included" do
|
12
|
+
period = described_class.for('25.06.2015')
|
13
|
+
|
14
|
+
expect(period.start_date).to eq date('01.06.2015')
|
15
|
+
expect(period.end_date).to eq date('31.08.2015')
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe "#next" do
|
20
|
+
it "returns next quarter" do
|
21
|
+
expect(described_class.for('25.06.2015').next).to eq described_class.for('25.09.2015')
|
22
|
+
expect(described_class.for('01.06.2015').next).to eq described_class.for('01.09.2015')
|
23
|
+
expect(described_class.for('03.12.2015').next).to eq described_class.for('03.03.2016')
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
describe "#previous" do
|
28
|
+
it "returns previous quarter" do
|
29
|
+
expect(described_class.for('25.06.2015').previous).to eq described_class.for('25.03.2015')
|
30
|
+
expect(described_class.for('01.07.2015').previous).to eq described_class.for('01.04.2015')
|
31
|
+
expect(described_class.for('03.01.2016').previous).to eq described_class.for('03.10.2015')
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
describe "#days" do
|
36
|
+
it "returns days of period" do
|
37
|
+
expect(described_class.for("25.06.2015").days).to eq 92
|
38
|
+
expect(described_class.for("01.01.2015").days).to eq 90
|
39
|
+
expect(described_class.for("01.01.2016").days).to eq 91
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
describe "#include?" do
|
44
|
+
let(:period) { described_class.for('01.06.2015') }
|
45
|
+
|
46
|
+
context "date included" do
|
47
|
+
it "returns true" do
|
48
|
+
expect(period.include?('25.06.2015')).to be_truthy
|
49
|
+
expect(period.include?('26.06.2015')).to be_truthy
|
50
|
+
expect(period.include?('01.07.2015')).to be_truthy
|
51
|
+
expect(period.include?('30.08.2015')).to be_truthy
|
52
|
+
expect(period.include?('31.08.2015')).to be_truthy
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
context "date not included" do
|
57
|
+
it "returns false" do
|
58
|
+
expect(period.include?('31.05.2015')).to be_falsey
|
59
|
+
expect(period.include?('01.09.2015')).to be_falsey
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
context "month included" do
|
64
|
+
it "returns true" do
|
65
|
+
expect(period.include?(Month.for('01.06.2015'))).to be_truthy
|
66
|
+
expect(period.include?(Month.for('01.07.2015'))).to be_truthy
|
67
|
+
expect(period.include?(Month.for('01.08.2015'))).to be_truthy
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
context "month not included" do
|
72
|
+
it "returns false" do
|
73
|
+
expect(period.include?(Month.for('01.05.2015'))).to be_falsey
|
74
|
+
expect(period.include?(Month.for('01.09.2015'))).to be_falsey
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
context "period included" do
|
79
|
+
it "returns true" do
|
80
|
+
expect(period.include?(Period.new('01.06.2015', '31.08.2015'))).to be_truthy
|
81
|
+
expect(period.include?(Period.new('02.06.2015', '31.08.2015'))).to be_truthy
|
82
|
+
expect(period.include?(Period.new('01.06.2015', '30.08.2015'))).to be_truthy
|
83
|
+
expect(period.include?(Period.new('02.06.2015', '30.08.2015'))).to be_truthy
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
context "period not included" do
|
88
|
+
it "returns false" do
|
89
|
+
expect(period.include?(Period.new('31.05.2015', '31.08.2015'))).to be_falsey
|
90
|
+
expect(period.include?(Period.new('01.06.2015', '01.09.2015'))).to be_falsey
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
describe "#months" do
|
96
|
+
it "returns months of quarter" do
|
97
|
+
expect(described_class.for('01.06.2015').months).
|
98
|
+
to eq [Month.for('01.06.2015'), Month.for('01.07.2015'), Month.for('01.08.2015')]
|
99
|
+
expect(described_class.for('01.12.2015').months).
|
100
|
+
to eq [Month.for('01.12.2015'), Month.for('01.01.2016'), Month.for('01.02.2016')]
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
describe "#start_year" do
|
105
|
+
it "returns start year of quarter" do
|
106
|
+
expect(described_class.for('01.06.2015').start_year).to eq 2015
|
107
|
+
expect(described_class.for('01.06.2016').start_year).to eq 2016
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
describe "#end_year" do
|
112
|
+
it "returns end year of quarter" do
|
113
|
+
expect(described_class.for('01.06.2015').end_year).to eq 2015
|
114
|
+
expect(described_class.for('01.12.2015').end_year).to eq 2016
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'periods/constants'
|
3
|
+
|
4
|
+
describe QuarterlyPeriod do
|
5
|
+
|
6
|
+
let(:subject) { described_class.for("1.1.2015") }
|
7
|
+
|
8
|
+
it_behaves_like "Lint Check"
|
9
|
+
|
10
|
+
describe ".for" do
|
11
|
+
it "returns quarter of given date included" do
|
12
|
+
period = described_class.for('25.06.2015')
|
13
|
+
|
14
|
+
expect(period.start_date).to eq date('25.06.2015')
|
15
|
+
expect(period.end_date).to eq date('24.09.2015')
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe "#next" do
|
20
|
+
it "returns next quarter" do
|
21
|
+
expect(described_class.for('25.06.2015').next).to eq described_class.for('25.09.2015')
|
22
|
+
expect(described_class.for('01.07.2015').next).to eq described_class.for('01.10.2015')
|
23
|
+
expect(described_class.for('03.12.2015').next).to eq described_class.for('03.03.2016')
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
describe "#previous" do
|
28
|
+
it "returns previous quarter" do
|
29
|
+
expect(described_class.for('25.06.2015').previous).to eq described_class.for('25.03.2015')
|
30
|
+
expect(described_class.for('01.07.2015').previous).to eq described_class.for('01.04.2015')
|
31
|
+
expect(described_class.for('03.01.2016').previous).to eq described_class.for('03.10.2015')
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
describe "#days" do
|
36
|
+
it "returns days of period" do
|
37
|
+
expect(described_class.for("25.06.2015").days).to eq 92
|
38
|
+
expect(described_class.for("01.01.2015").days).to eq 90
|
39
|
+
expect(described_class.for("01.01.2016").days).to eq 91
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
describe "#include?" do
|
44
|
+
let(:period) { described_class.for('25.06.2015') }
|
45
|
+
|
46
|
+
context "date included" do
|
47
|
+
it "returns true" do
|
48
|
+
expect(period.include?('25.06.2015')).to be_truthy
|
49
|
+
expect(period.include?('26.06.2015')).to be_truthy
|
50
|
+
expect(period.include?('01.07.2015')).to be_truthy
|
51
|
+
expect(period.include?('01.08.2015')).to be_truthy
|
52
|
+
expect(period.include?('24.09.2015')).to be_truthy
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
context "date not included" do
|
57
|
+
it "returns false" do
|
58
|
+
expect(period.include?('24.06.2015')).to be_falsey
|
59
|
+
expect(period.include?('25.09.2015')).to be_falsey
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
context "period included" do
|
64
|
+
it "returns true" do
|
65
|
+
expect(period.include?(Period.new('25.06.2015', '24.09.2015'))).to be_truthy
|
66
|
+
expect(period.include?(Period.new('26.06.2015', '23.09.2015'))).to be_truthy
|
67
|
+
expect(period.include?(Period.new('02.08.2015', '20.08.2015'))).to be_truthy
|
68
|
+
expect(period.include?(Period.new('23.09.2015', '24.09.2015'))).to be_truthy
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
context "period not included" do
|
73
|
+
it "returns false" do
|
74
|
+
expect(period.include?(Period.new('24.06.2015', '24.09.2015'))).to be_falsey
|
75
|
+
expect(period.include?(Period.new('25.06.2015', '25.09.2015'))).to be_falsey
|
76
|
+
expect(period.include?(Period.new('24.06.2015', '25.09.2015'))).to be_falsey
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'periods/constants'
|
3
|
+
|
4
|
+
describe Year do
|
5
|
+
|
6
|
+
let(:subject) { described_class.for("1.1.2015") }
|
7
|
+
|
8
|
+
it_behaves_like "Lint Check"
|
9
|
+
|
10
|
+
describe ".for" do
|
11
|
+
it "returns month of given date included" do
|
12
|
+
month = described_class.for('25.06.2015')
|
13
|
+
|
14
|
+
expect(month.start_date).to eq date('01.06.2015')
|
15
|
+
expect(month.end_date).to eq date('31.05.2016')
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe "#next" do
|
20
|
+
it "returns next month" do
|
21
|
+
expect(described_class.for('25.06.2015').next).to eq described_class.for('01.06.2016')
|
22
|
+
expect(described_class.for('01.07.2015').next).to eq described_class.for('01.07.2016')
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
describe "#previous" do
|
27
|
+
it "returns previous month" do
|
28
|
+
expect(described_class.for('25.06.2015').previous).to eq described_class.for('01.06.2014')
|
29
|
+
expect(described_class.for('01.06.2015').previous).to eq described_class.for('01.06.2014')
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
describe "#year" do
|
34
|
+
it "returns year number" do
|
35
|
+
expect(described_class.for('01.01.2015').year).to eq 2015
|
36
|
+
expect(described_class.for('01.12.2015').year).to eq 2015
|
37
|
+
expect(described_class.for('01.01.2014').year).to eq 2014
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe "#months" do
|
42
|
+
it "returns months of year" do
|
43
|
+
expect(described_class.for('01.06.2015').months).
|
44
|
+
to eq [ Month.for('01.06.2015'), Month.for('01.07.2015'), Month.for('01.08.2015'),
|
45
|
+
Month.for('01.09.2015'), Month.for('01.10.2015'), Month.for('01.11.2015'),
|
46
|
+
Month.for('01.12.2015'), Month.for('01.01.2016'), Month.for('01.02.2016'),
|
47
|
+
Month.for('01.03.2016'), Month.for('01.04.2016'), Month.for('01.05.2016')
|
48
|
+
]
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'periods/constants'
|
3
|
+
|
4
|
+
describe YearlyPeriod do
|
5
|
+
|
6
|
+
let(:subject) { described_class.for("1.1.2015") }
|
7
|
+
|
8
|
+
it_behaves_like "Lint Check"
|
9
|
+
|
10
|
+
describe ".for" do
|
11
|
+
it "returns year of given date included" do
|
12
|
+
period = described_class.for('25.06.2015')
|
13
|
+
|
14
|
+
expect(period.start_date).to eq date('25.06.2015')
|
15
|
+
expect(period.end_date).to eq date('24.06.2016')
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe "#next" do
|
20
|
+
it "returns next quarter" do
|
21
|
+
expect(described_class.for('25.06.2015').next).to eq described_class.for('25.06.2016')
|
22
|
+
expect(described_class.for('01.07.2015').next).to eq described_class.for('01.07.2016')
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
describe "#previous" do
|
27
|
+
it "returns previous quarter" do
|
28
|
+
expect(described_class.for('25.06.2015').previous).to eq described_class.for('25.06.2014')
|
29
|
+
expect(described_class.for('01.07.2015').previous).to eq described_class.for('01.07.2014')
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
describe "#days" do
|
34
|
+
it "returns days of period" do
|
35
|
+
expect(described_class.for("01.01.2015").days).to eq 365
|
36
|
+
expect(described_class.for("25.06.2015").days).to eq 366
|
37
|
+
expect(described_class.for("01.01.2016").days).to eq 366
|
38
|
+
expect(described_class.for("01.03.2016").days).to eq 365
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
describe "#include?" do
|
43
|
+
let(:period) { described_class.for('25.06.2015') }
|
44
|
+
|
45
|
+
context "date included" do
|
46
|
+
it "returns true" do
|
47
|
+
expect(period.include?('25.06.2015')).to be_truthy
|
48
|
+
expect(period.include?('24.06.2016')).to be_truthy
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
context "date not included" do
|
53
|
+
it "returns false" do
|
54
|
+
expect(period.include?('24.06.2015')).to be_falsey
|
55
|
+
expect(period.include?('25.06.2016')).to be_falsey
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
context "period included" do
|
60
|
+
it "returns true" do
|
61
|
+
expect(period.include?(Period.new('25.06.2015', '24.06.2016'))).to be_truthy
|
62
|
+
expect(period.include?(Period.new('26.06.2015', '24.06.2016'))).to be_truthy
|
63
|
+
expect(period.include?(Period.new('25.06.2015', '23.06.2015'))).to be_truthy
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
context "period not included" do
|
68
|
+
it "returns false" do
|
69
|
+
expect(period.include?(Period.new('24.06.2015', '24.06.2016'))).to be_falsey
|
70
|
+
expect(period.include?(Period.new('25.06.2015', '25.06.2016'))).to be_falsey
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
data/spec/lint_check.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
shared_examples "Lint Check" do
|
2
|
+
|
3
|
+
it "respond #next" do
|
4
|
+
expect(subject).to respond_to(:next)
|
5
|
+
end
|
6
|
+
|
7
|
+
it "respond #previous" do
|
8
|
+
expect(subject).to respond_to(:previous)
|
9
|
+
end
|
10
|
+
|
11
|
+
it "respond #days" do
|
12
|
+
expect(subject).to respond_to(:days)
|
13
|
+
end
|
14
|
+
|
15
|
+
it "respond #include?" do
|
16
|
+
expect(subject).to respond_to(:include?)
|
17
|
+
end
|
18
|
+
|
19
|
+
it "is Comparable" do
|
20
|
+
expect(subject).to be_kind_of(Comparable)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
require 'lint_check'
|
2
|
+
|
3
|
+
RSpec.configure do |config|
|
4
|
+
# rspec-expectations config goes here. You can use an alternate
|
5
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
6
|
+
# assertions if you prefer.
|
7
|
+
config.expect_with :rspec do |expectations|
|
8
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
9
|
+
# and `failure_message` of custom matchers include text for helper methods
|
10
|
+
# defined using `chain`, e.g.:
|
11
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
12
|
+
# # => "be bigger than 2 and smaller than 4"
|
13
|
+
# ...rather than:
|
14
|
+
# # => "be bigger than 2"
|
15
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
16
|
+
end
|
17
|
+
|
18
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
19
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
20
|
+
config.mock_with :rspec do |mocks|
|
21
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
22
|
+
# a real object. This is generally recommended, and will default to
|
23
|
+
# `true` in RSpec 4.
|
24
|
+
mocks.verify_partial_doubles = true
|
25
|
+
end
|
26
|
+
|
27
|
+
# The settings below are suggested to provide a good initial experience
|
28
|
+
# with RSpec, but feel free to customize to your heart's content.
|
29
|
+
=begin
|
30
|
+
# These two settings work together to allow you to limit a spec run
|
31
|
+
# to individual examples or groups you care about by tagging them with
|
32
|
+
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
33
|
+
# get run.
|
34
|
+
config.filter_run :focus
|
35
|
+
config.run_all_when_everything_filtered = true
|
36
|
+
|
37
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
38
|
+
# recommended. For more details, see:
|
39
|
+
# - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
|
40
|
+
# - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
41
|
+
# - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
|
42
|
+
config.disable_monkey_patching!
|
43
|
+
|
44
|
+
# This setting enables warnings. It's recommended, but in some cases may
|
45
|
+
# be too noisy due to issues in dependencies.
|
46
|
+
config.warnings = true
|
47
|
+
|
48
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
49
|
+
# file, and it's useful to allow more verbose output when running an
|
50
|
+
# individual spec file.
|
51
|
+
if config.files_to_run.one?
|
52
|
+
# Use the documentation formatter for detailed output,
|
53
|
+
# unless a formatter has already been configured
|
54
|
+
# (e.g. via a command-line flag).
|
55
|
+
config.default_formatter = 'doc'
|
56
|
+
end
|
57
|
+
|
58
|
+
# Print the 10 slowest examples and example groups at the
|
59
|
+
# end of the spec run, to help surface which specs are running
|
60
|
+
# particularly slow.
|
61
|
+
config.profile_examples = 10
|
62
|
+
|
63
|
+
# Run specs in random order to surface order dependencies. If you find an
|
64
|
+
# order dependency and want to debug it, you can fix the order by providing
|
65
|
+
# the seed, which is printed after each run.
|
66
|
+
# --seed 1234
|
67
|
+
config.order = :random
|
68
|
+
|
69
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
70
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
71
|
+
# test failures related to randomization by passing the same `--seed` value
|
72
|
+
# as the one that triggered the failure.
|
73
|
+
Kernel.srand config.seed
|
74
|
+
=end
|
75
|
+
end
|
76
|
+
|
77
|
+
def date(date)
|
78
|
+
Date.parse(date.to_s)
|
79
|
+
end
|
metadata
ADDED
@@ -0,0 +1,145 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: periods
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Thomas Baustert
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-05-14 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.7'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: Simple period types like Week, Month, Quarter, Halfyear, Year.
|
56
|
+
email:
|
57
|
+
- business@thomasbaustert.de
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".gitignore"
|
63
|
+
- ".rspec"
|
64
|
+
- ".travis.yml"
|
65
|
+
- Gemfile
|
66
|
+
- LICENSE
|
67
|
+
- README.md
|
68
|
+
- Rakefile
|
69
|
+
- lib/january.rb
|
70
|
+
- lib/periods.rb
|
71
|
+
- lib/periods/classes.rb
|
72
|
+
- lib/periods/constants.rb
|
73
|
+
- lib/periods/date_calculator.rb
|
74
|
+
- lib/periods/halfyear.rb
|
75
|
+
- lib/periods/halfyearly_period.rb
|
76
|
+
- lib/periods/modules.rb
|
77
|
+
- lib/periods/modules/halfyear.rb
|
78
|
+
- lib/periods/modules/halfyearly_period.rb
|
79
|
+
- lib/periods/modules/month.rb
|
80
|
+
- lib/periods/modules/monthly_period.rb
|
81
|
+
- lib/periods/modules/period.rb
|
82
|
+
- lib/periods/modules/quarter.rb
|
83
|
+
- lib/periods/modules/quarterly_period.rb
|
84
|
+
- lib/periods/modules/year.rb
|
85
|
+
- lib/periods/modules/yearly_period.rb
|
86
|
+
- lib/periods/month.rb
|
87
|
+
- lib/periods/monthly_period.rb
|
88
|
+
- lib/periods/period.rb
|
89
|
+
- lib/periods/quarter.rb
|
90
|
+
- lib/periods/quarterly_period.rb
|
91
|
+
- lib/periods/version.rb
|
92
|
+
- lib/periods/year.rb
|
93
|
+
- lib/periods/yearly_period.rb
|
94
|
+
- periods.gemspec
|
95
|
+
- spec/lib/halfyear_spec.rb
|
96
|
+
- spec/lib/halfyearly_period_spec.rb
|
97
|
+
- spec/lib/january_spec.rb
|
98
|
+
- spec/lib/month_spec.rb
|
99
|
+
- spec/lib/monthly_period_spec.rb
|
100
|
+
- spec/lib/period_spec.rb
|
101
|
+
- spec/lib/periods/date_calculator_spec.rb
|
102
|
+
- spec/lib/quarter_spec.rb
|
103
|
+
- spec/lib/quarterly_period_spec.rb
|
104
|
+
- spec/lib/year_spec.rb
|
105
|
+
- spec/lib/yearly_period_spec.rb
|
106
|
+
- spec/lint_check.rb
|
107
|
+
- spec/spec_helper.rb
|
108
|
+
homepage: ''
|
109
|
+
licenses:
|
110
|
+
- MIT
|
111
|
+
metadata: {}
|
112
|
+
post_install_message:
|
113
|
+
rdoc_options: []
|
114
|
+
require_paths:
|
115
|
+
- lib
|
116
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
117
|
+
requirements:
|
118
|
+
- - ">="
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '0'
|
121
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
requirements: []
|
127
|
+
rubyforge_project:
|
128
|
+
rubygems_version: 2.4.3
|
129
|
+
signing_key:
|
130
|
+
specification_version: 4
|
131
|
+
summary: Simple period types like Week, Month, Quarter, Halfyear, Year.
|
132
|
+
test_files:
|
133
|
+
- spec/lib/halfyear_spec.rb
|
134
|
+
- spec/lib/halfyearly_period_spec.rb
|
135
|
+
- spec/lib/january_spec.rb
|
136
|
+
- spec/lib/month_spec.rb
|
137
|
+
- spec/lib/monthly_period_spec.rb
|
138
|
+
- spec/lib/period_spec.rb
|
139
|
+
- spec/lib/periods/date_calculator_spec.rb
|
140
|
+
- spec/lib/quarter_spec.rb
|
141
|
+
- spec/lib/quarterly_period_spec.rb
|
142
|
+
- spec/lib/year_spec.rb
|
143
|
+
- spec/lib/yearly_period_spec.rb
|
144
|
+
- spec/lint_check.rb
|
145
|
+
- spec/spec_helper.rb
|