coaster 1.4.8 → 1.4.10

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: 41ba0c483410b98c561f02ad57afa970110a369b35c0cb407b9bde9e5a333013
4
- data.tar.gz: 651ba61b273861c59b6ed676a4e85a88ada811ca1daa59282075dde6a1bf7bce
3
+ metadata.gz: 5b0833fa02d32ec450a4fe1733f2e958db39072b94aa9ead5673b3ec378fff8a
4
+ data.tar.gz: 28c3acbdbbf7008217aee6f031bce8de94b1a42dee5a61f18c9d1ffdde0bd005
5
5
  SHA512:
6
- metadata.gz: 864c6e513179cae78a768acc6335752c5dba18f4bd6110ea58613b0b51dc0ad5c19ff3cfcf7171133f1db8041b09cabc196dc976113451cefc51ad5cd1d7317c
7
- data.tar.gz: 3b067f4ae39fd0bb24f91b0dc0f2ce813b57fe8e132c842f6b9023a860c91edcdd99f54e925aeb4f94837cea80101e2043d370b653cefede3a7b11a714391ecd
6
+ metadata.gz: f88ca92b03fa3af23ff20689b282f8b1515d992084b63b2b3b53c4d6f0ddcbf8e88f5a8e1ff5fc08f60f50a5dc68cee61275483182ae130ae63a744c2846feeb
7
+ data.tar.gz: b1e7bd90031009c7ddfe925f3b160d3a794a649067505e672ac1a80c4182a0c8c5b07c484e19341ba9e4e90b482b6c020d6beab93e51b2e5267aeb5a339882b0
@@ -98,6 +98,10 @@ class Month
98
98
  beginning_of_month...(later.beginning_of_month)
99
99
  end
100
100
 
101
+ def to_date_range
102
+ first_date..last_date
103
+ end
104
+
101
105
  def previous
102
106
  self.class.from(first_date - 1)
103
107
  end
@@ -140,4 +144,12 @@ class Month
140
144
  def succ
141
145
  later
142
146
  end
147
+
148
+ def hash
149
+ first_date.hash
150
+ end
151
+
152
+ def eql?(other)
153
+ other.is_a?(Month) && first_date == other.first_date
154
+ end
143
155
  end
@@ -1,3 +1,3 @@
1
1
  module Coaster
2
- VERSION = '1.4.8'
2
+ VERSION = '1.4.10'
3
3
  end
data/test/test_month.rb CHANGED
@@ -68,5 +68,10 @@ module Coaster
68
68
  range = (mn..mn)
69
69
  assert range.cover?(Month.from(Date.today))
70
70
  end
71
+
72
+ def test_hash
73
+ h = {Month.now => 1}
74
+ assert_equal h[Month.now], 1
75
+ end
71
76
  end
72
77
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coaster
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.8
4
+ version: 1.4.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - buzz jung
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-29 00:00:00.000000000 Z
11
+ date: 2024-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj