month_range 0.1.3 → 0.1.4

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: 80d382540a11a08d9b7e42ccbf10572420d191006f80726880eded045f5c5246
4
- data.tar.gz: 8064de1488e93416960a054a87f4244eae46954f1bb9cd5301601b00c66aa4b5
3
+ metadata.gz: 1f0794936fca957eccd5a5e26c3379a804f0d8366d8cc894b7b130c707d94029
4
+ data.tar.gz: c9ea79c7184cc854ef6d5e420897659b3dea15be9340f9f06c10eccd48ea77f5
5
5
  SHA512:
6
- metadata.gz: ed1ea3c8932e644096d8f3701c7ce3664354f47520253f4904bde95584a0312ffb0bf1dfe8556d9b22d8d7ebe02a9b9afce16ca3fabdd04400781b8ce389d190
7
- data.tar.gz: daf57ae12b1681146daa7dec5af6448c606be15640d831ed8cbc002ad03031990990428c378c4292b2082890008256c30a8b1828b9483acf50a4ed96434f2d88
6
+ metadata.gz: 45a38afb12b658a7780d92575f4ebad4bd5809ba119ad1c4c3b694cc45b39b51d59737fa383b80795c248e0c3fc99956f4d5599e57bce2ec4998177af6db044f
7
+ data.tar.gz: 24003570f17366a2dcab778d2e4b361622e05a86ade6ddcca95bc5f2da858f5ccb7c3579a8f6d96a3b5e7f2b4046a1dad89ce093c6312cfa5ab4bd16473645bd
data/Gemfile CHANGED
@@ -8,7 +8,6 @@ gemspec
8
8
  gem 'rake', '~> 12.0'
9
9
  gem 'rspec', '~> 3.0'
10
10
  gem 'rubocop'
11
+ gem 'simplecov'
11
12
  gem 'yard'
12
13
  gem 'zeitwerk'
13
-
14
- gem 'byebug', '~> 11.1'
data/Gemfile.lock CHANGED
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- month_range (0.1.2)
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
 
@@ -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
@@ -35,23 +35,15 @@ class MonthRange::Month < Date
35
35
  end
36
36
 
37
37
  def infinite?
38
- d.nonzero?
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)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module MonthRange
4
4
  class Version
5
- VERSION = '0.1.3'
5
+ VERSION = '0.1.4'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: month_range
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - jungo araki