month_range 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -2
- data/Gemfile.lock +7 -3
- data/lib/month_range/m_range.rb +1 -1
- data/lib/month_range/month.rb +2 -10
- data/lib/month_range/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f0794936fca957eccd5a5e26c3379a804f0d8366d8cc894b7b130c707d94029
|
4
|
+
data.tar.gz: c9ea79c7184cc854ef6d5e420897659b3dea15be9340f9f06c10eccd48ea77f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45a38afb12b658a7780d92575f4ebad4bd5809ba119ad1c4c3b694cc45b39b51d59737fa383b80795c248e0c3fc99956f4d5599e57bce2ec4998177af6db044f
|
7
|
+
data.tar.gz: 24003570f17366a2dcab778d2e4b361622e05a86ade6ddcca95bc5f2da858f5ccb7c3579a8f6d96a3b5e7f2b4046a1dad89ce093c6312cfa5ab4bd16473645bd
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
month_range (0.1.
|
4
|
+
month_range (0.1.3)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
9
|
ast (2.4.0)
|
10
|
-
byebug (11.1.1)
|
11
10
|
diff-lcs (1.3)
|
11
|
+
docile (1.3.2)
|
12
12
|
jaro_winkler (1.5.4)
|
13
13
|
parallel (1.19.1)
|
14
14
|
parser (2.7.0.5)
|
@@ -38,6 +38,10 @@ GEM
|
|
38
38
|
ruby-progressbar (~> 1.7)
|
39
39
|
unicode-display_width (>= 1.4.0, < 1.7)
|
40
40
|
ruby-progressbar (1.10.1)
|
41
|
+
simplecov (0.18.5)
|
42
|
+
docile (~> 1.1)
|
43
|
+
simplecov-html (~> 0.11)
|
44
|
+
simplecov-html (0.12.2)
|
41
45
|
unicode-display_width (1.6.1)
|
42
46
|
yard (0.9.24)
|
43
47
|
zeitwerk (2.3.0)
|
@@ -46,11 +50,11 @@ PLATFORMS
|
|
46
50
|
ruby
|
47
51
|
|
48
52
|
DEPENDENCIES
|
49
|
-
byebug (~> 11.1)
|
50
53
|
month_range!
|
51
54
|
rake (~> 12.0)
|
52
55
|
rspec (~> 3.0)
|
53
56
|
rubocop
|
57
|
+
simplecov
|
54
58
|
yard
|
55
59
|
zeitwerk
|
56
60
|
|
data/lib/month_range/m_range.rb
CHANGED
@@ -11,7 +11,7 @@ class MonthRange::MRange < Range
|
|
11
11
|
def initialize(start_month, end_month)
|
12
12
|
raise InvalidStartEnd unless start_month.is_a?(MonthRange::Month)
|
13
13
|
raise InvalidStartEnd unless end_month.is_a?(MonthRange::Month) || end_month.is_a?(MonthRange::Month::Infinity)
|
14
|
-
raise InvalidStartEnd [start_month, end_month] unless valid_start_end_relation?(start_month, end_month)
|
14
|
+
raise InvalidStartEnd, [start_month, end_month] unless valid_start_end_relation?(start_month, end_month)
|
15
15
|
|
16
16
|
super(start_month, end_month)
|
17
17
|
@start_month = start_month
|
data/lib/month_range/month.rb
CHANGED
@@ -35,23 +35,15 @@ class MonthRange::Month < Date
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def infinite?
|
38
|
-
|
39
|
-
end
|
40
|
-
|
41
|
-
def <(_other)
|
42
|
-
false
|
38
|
+
true
|
43
39
|
end
|
44
40
|
|
45
41
|
def <=(other)
|
46
42
|
other.infinite?
|
47
43
|
end
|
48
44
|
|
49
|
-
def >(_other)
|
50
|
-
true
|
51
|
-
end
|
52
|
-
|
53
45
|
def >=(other)
|
54
|
-
other.infinite?
|
46
|
+
other.infinite? ? true : other.is_a?(MonthRange::Month)
|
55
47
|
end
|
56
48
|
|
57
49
|
def ==(other)
|
data/lib/month_range/version.rb
CHANGED