montrose 0.16.0 → 0.17.0

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: 1d62fee9cc488eb262f8f377a3241057e35ce47897e4ec20527794c7b971fea7
4
- data.tar.gz: 0a4c66119146369751b2b5361d832c27a65a7084b03f1eefb6ef5491380a819d
3
+ metadata.gz: 8e4c7dd756067118bcc4a8476cbfa354f50b9b6a84ef6a9e0269ea58ce4699a1
4
+ data.tar.gz: adb813b1123d34d522d784ffacafd8985df20527ce9bdcc4f248682881cecdf7
5
5
  SHA512:
6
- metadata.gz: 193244663c218d1c3d118aac82c469abc7c1760c7bbbd79abb4324893ced38d5b28c36dae49b348311c6e451004f5dbd3aed22e770a9aa5c4fae7e7a6eb17a04
7
- data.tar.gz: d26bd2132ae3fc9c8adc0fd4bf681a2508a067cdfb42c4a765a585b0a666b89e2e7ff0ecdf327c4404a0ea09f2290a0160d467dd83fc8319e10f46914a4c10fc
6
+ metadata.gz: c34f7e544fd4107297b98b5d0c04926d37913c80162e467d4369fbf58f69eeea95a8f81460f50b798094901d68c9569518a7d6a1cd8d81416acfcfd07831e6b1
7
+ data.tar.gz: 0f91cd2955e047dcbae08e7fdff1f1498e9db0c9a68d3ebafc6e3cf311dfca713e5d0b26f16faab5689dcbbea442d2fad7550a0f4a4f4dea0827c5ccf84c7394
data/.circleci/config.yml CHANGED
@@ -124,6 +124,19 @@ workflows:
124
124
  - 'gemfiles/activesupport_6.1.gemfile'
125
125
  - 'gemfiles/activesupport_7.0.gemfile'
126
126
  - 'gemfiles/activesupport_7.1.gemfile'
127
+ - 'gemfiles/activesupport_7.2.gemfile'
128
+ - 'gemfiles/activesupport_8.0.gemfile'
129
+ exclude:
130
+ - gemfile: 'gemfiles/activesupport_7.2.gemfile'
131
+ ruby-version: '2.7'
132
+ - gemfile: 'gemfiles/activesupport_7.2.gemfile'
133
+ ruby-version: '3.0'
134
+ - gemfile: 'gemfiles/activesupport_8.0.gemfile'
135
+ ruby-version: '2.7'
136
+ - gemfile: 'gemfiles/activesupport_8.0.gemfile'
137
+ ruby-version: '3.0'
138
+ - gemfile: 'gemfiles/activesupport_8.0.gemfile'
139
+ ruby-version: '3.1'
127
140
  - publish-docs:
128
141
  requires:
129
142
  - lint
data/.rubocop.yml CHANGED
@@ -3,3 +3,6 @@ require:
3
3
 
4
4
  inherit_gem:
5
5
  standard: config/base.yml
6
+
7
+ AllCops:
8
+ TargetRubyVersion: 2.7
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ### 0.17.0 - (2024-11-12)
2
+
3
+ - enhancements
4
+
5
+ - Add support for Rails 8.0 (by @TasnimSyncX)
6
+
7
+ - chores
8
+ - Add tests for switching Date.beginning_of_week
9
+ - Update Rubocop settings
10
+
1
11
  ### 0.16.0 - (2023-10-11)
2
12
 
3
13
  - enhancements
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- montrose (0.16.0)
5
- activesupport (>= 5.2, < 8)
4
+ montrose (0.17.0)
5
+ activesupport (>= 5.2, <= 8)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -135,10 +135,12 @@ GEM
135
135
  tzinfo (2.0.6)
136
136
  concurrent-ruby (~> 1.0)
137
137
  unicode-display_width (2.5.0)
138
- yard (0.9.34)
138
+ yard (0.9.36)
139
139
 
140
140
  PLATFORMS
141
141
  arm64-darwin-22
142
+ arm64-darwin-23
143
+ x86_64-darwin-24
142
144
  x86_64-linux
143
145
 
144
146
  DEPENDENCIES
data/README.md CHANGED
@@ -375,6 +375,26 @@ r.events.take(10).each { |date| puts date.to_s }
375
375
  r.events.lazy.select { |time| time > 1.month.from_now }.take(3).each { |date| puts date.to_s }
376
376
  ```
377
377
 
378
+ Montrose relies on `ActiveSupport` for `DateTime`, `Date`, and `Time` calculations. As such, configuring ActiveSupport settings should work for Montrose recurrences.
379
+
380
+ For example, your application can configure the `Date` "beginning of the week" ([docs](https://www.rubydoc.info/docs/rails/Date.beginning_of_week)):
381
+
382
+ ```ruby
383
+ Date.beginning_of_the_week = :sunday
384
+ # OR
385
+ Date.beginning_of_the_week = :monday
386
+ ```
387
+
388
+ Similarly in Rails ([docs](https://guides.rubyonrails.org/configuring.html#config-beginning-of-week)):
389
+
390
+ ```ruby
391
+ config.beginning_of_week = :sunday
392
+ # OR
393
+ config.beginning_of_week = :monday
394
+ ```
395
+
396
+ Changing these settings may affect the behavior of Montrose weekly recurrences.
397
+
378
398
  ### Combining recurrences
379
399
 
380
400
  It may be necessary to combine several recurrence rules into a single
@@ -2,7 +2,7 @@ PATH
2
2
  remote: ..
3
3
  specs:
4
4
  montrose (0.16.0)
5
- activesupport (>= 5.2, < 8)
5
+ activesupport (>= 5.2, <= 8)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -91,6 +91,7 @@ GEM
91
91
 
92
92
  PLATFORMS
93
93
  arm64-darwin-22
94
+ x86_64-darwin-24
94
95
 
95
96
  DEPENDENCIES
96
97
  activesupport (~> 5.2)
@@ -2,7 +2,7 @@ PATH
2
2
  remote: ..
3
3
  specs:
4
4
  montrose (0.16.0)
5
- activesupport (>= 5.2, < 8)
5
+ activesupport (>= 5.2, <= 8)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -92,6 +92,7 @@ GEM
92
92
 
93
93
  PLATFORMS
94
94
  arm64-darwin-22
95
+ x86_64-darwin-24
95
96
 
96
97
  DEPENDENCIES
97
98
  activesupport (~> 6.0)
@@ -2,7 +2,7 @@ PATH
2
2
  remote: ..
3
3
  specs:
4
4
  montrose (0.16.0)
5
- activesupport (>= 5.2, < 8)
5
+ activesupport (>= 5.2, <= 8)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -92,6 +92,7 @@ GEM
92
92
 
93
93
  PLATFORMS
94
94
  arm64-darwin-22
95
+ x86_64-darwin-24
95
96
 
96
97
  DEPENDENCIES
97
98
  activesupport (~> 6.1)
@@ -2,7 +2,7 @@ PATH
2
2
  remote: ..
3
3
  specs:
4
4
  montrose (0.16.0)
5
- activesupport (>= 5.2, < 8)
5
+ activesupport (>= 5.2, <= 8)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -101,6 +101,7 @@ GEM
101
101
 
102
102
  PLATFORMS
103
103
  arm64-darwin-22
104
+ x86_64-darwin-24
104
105
 
105
106
  DEPENDENCIES
106
107
  activesupport (~> 7.0)
@@ -2,7 +2,7 @@ PATH
2
2
  remote: ..
3
3
  specs:
4
4
  montrose (0.16.0)
5
- activesupport (>= 5.2, < 8)
5
+ activesupport (>= 5.2, <= 8)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
@@ -101,6 +101,7 @@ GEM
101
101
 
102
102
  PLATFORMS
103
103
  arm64-darwin-22
104
+ x86_64-darwin-24
104
105
 
105
106
  DEPENDENCIES
106
107
  activesupport (~> 7.1)
@@ -0,0 +1,5 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "activesupport", "~> 7.2"
4
+
5
+ gemspec path: "../"
@@ -0,0 +1,117 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ montrose (0.16.0)
5
+ activesupport (>= 5.2, <= 8)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activesupport (7.2.2)
11
+ base64
12
+ benchmark (>= 0.3)
13
+ bigdecimal
14
+ concurrent-ruby (~> 1.0, >= 1.3.1)
15
+ connection_pool (>= 2.2.5)
16
+ drb
17
+ i18n (>= 1.6, < 2)
18
+ logger (>= 1.4.2)
19
+ minitest (>= 5.1)
20
+ securerandom (>= 0.3)
21
+ tzinfo (~> 2.0, >= 2.0.5)
22
+ ast (2.4.2)
23
+ base64 (0.2.0)
24
+ benchmark (0.4.0)
25
+ bigdecimal (3.1.8)
26
+ concurrent-ruby (1.3.4)
27
+ connection_pool (2.4.1)
28
+ coveralls (0.8.23)
29
+ json (>= 1.8, < 3)
30
+ simplecov (~> 0.16.1)
31
+ term-ansicolor (~> 1.3)
32
+ thor (>= 0.19.4, < 2.0)
33
+ tins (~> 1.6)
34
+ docile (1.4.1)
35
+ drb (2.2.1)
36
+ i18n (1.14.6)
37
+ concurrent-ruby (~> 1.0)
38
+ json (2.8.1)
39
+ language_server-protocol (3.17.0.3)
40
+ lint_roller (1.1.0)
41
+ logger (1.6.1)
42
+ m (1.6.2)
43
+ method_source (>= 0.6.7)
44
+ rake (>= 0.9.2.2)
45
+ method_source (1.1.0)
46
+ minitest (5.25.1)
47
+ parallel (1.26.3)
48
+ parser (3.3.6.0)
49
+ ast (~> 2.4.1)
50
+ racc
51
+ racc (1.8.1)
52
+ rainbow (3.1.1)
53
+ rake (13.2.1)
54
+ regexp_parser (2.9.2)
55
+ rubocop (1.66.1)
56
+ json (~> 2.3)
57
+ language_server-protocol (>= 3.17.0)
58
+ parallel (~> 1.10)
59
+ parser (>= 3.3.0.2)
60
+ rainbow (>= 2.2.2, < 4.0)
61
+ regexp_parser (>= 2.4, < 3.0)
62
+ rubocop-ast (>= 1.32.2, < 2.0)
63
+ ruby-progressbar (~> 1.7)
64
+ unicode-display_width (>= 2.4.0, < 3.0)
65
+ rubocop-ast (1.34.1)
66
+ parser (>= 3.3.1.0)
67
+ rubocop-performance (1.22.1)
68
+ rubocop (>= 1.48.1, < 2.0)
69
+ rubocop-ast (>= 1.31.1, < 2.0)
70
+ ruby-progressbar (1.13.0)
71
+ securerandom (0.3.1)
72
+ simplecov (0.16.1)
73
+ docile (~> 1.1)
74
+ json (>= 1.8, < 3)
75
+ simplecov-html (~> 0.10.0)
76
+ simplecov-html (0.10.2)
77
+ standard (1.41.1)
78
+ language_server-protocol (~> 3.17.0.2)
79
+ lint_roller (~> 1.0)
80
+ rubocop (~> 1.66.0)
81
+ standard-custom (~> 1.0.0)
82
+ standard-performance (~> 1.5)
83
+ standard-custom (1.0.2)
84
+ lint_roller (~> 1.0)
85
+ rubocop (~> 1.50)
86
+ standard-performance (1.5.0)
87
+ lint_roller (~> 1.1)
88
+ rubocop-performance (~> 1.22.0)
89
+ sync (0.5.0)
90
+ term-ansicolor (1.11.2)
91
+ tins (~> 1.0)
92
+ thor (1.3.2)
93
+ timecop (0.9.10)
94
+ tins (1.37.0)
95
+ bigdecimal
96
+ sync
97
+ tzinfo (2.0.6)
98
+ concurrent-ruby (~> 1.0)
99
+ unicode-display_width (2.6.0)
100
+ yard (0.9.37)
101
+
102
+ PLATFORMS
103
+ x86_64-darwin-24
104
+
105
+ DEPENDENCIES
106
+ activesupport (~> 7.2)
107
+ coveralls
108
+ m
109
+ minitest
110
+ montrose!
111
+ rake (>= 12.3.3)
112
+ standard
113
+ timecop
114
+ yard
115
+
116
+ BUNDLED WITH
117
+ 2.4.20
@@ -0,0 +1,5 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "activesupport", "~> 8.0"
4
+
5
+ gemspec path: "../"
@@ -0,0 +1,119 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ montrose (0.16.0)
5
+ activesupport (>= 5.2, <= 8)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activesupport (8.0.0)
11
+ base64
12
+ benchmark (>= 0.3)
13
+ bigdecimal
14
+ concurrent-ruby (~> 1.0, >= 1.3.1)
15
+ connection_pool (>= 2.2.5)
16
+ drb
17
+ i18n (>= 1.6, < 2)
18
+ logger (>= 1.4.2)
19
+ minitest (>= 5.1)
20
+ securerandom (>= 0.3)
21
+ tzinfo (~> 2.0, >= 2.0.5)
22
+ uri (>= 0.13.1)
23
+ ast (2.4.2)
24
+ base64 (0.2.0)
25
+ benchmark (0.4.0)
26
+ bigdecimal (3.1.8)
27
+ concurrent-ruby (1.3.4)
28
+ connection_pool (2.4.1)
29
+ coveralls (0.8.23)
30
+ json (>= 1.8, < 3)
31
+ simplecov (~> 0.16.1)
32
+ term-ansicolor (~> 1.3)
33
+ thor (>= 0.19.4, < 2.0)
34
+ tins (~> 1.6)
35
+ docile (1.4.1)
36
+ drb (2.2.1)
37
+ i18n (1.14.6)
38
+ concurrent-ruby (~> 1.0)
39
+ json (2.8.1)
40
+ language_server-protocol (3.17.0.3)
41
+ lint_roller (1.1.0)
42
+ logger (1.6.1)
43
+ m (1.6.2)
44
+ method_source (>= 0.6.7)
45
+ rake (>= 0.9.2.2)
46
+ method_source (1.1.0)
47
+ minitest (5.25.1)
48
+ parallel (1.26.3)
49
+ parser (3.3.6.0)
50
+ ast (~> 2.4.1)
51
+ racc
52
+ racc (1.8.1)
53
+ rainbow (3.1.1)
54
+ rake (13.2.1)
55
+ regexp_parser (2.9.2)
56
+ rubocop (1.66.1)
57
+ json (~> 2.3)
58
+ language_server-protocol (>= 3.17.0)
59
+ parallel (~> 1.10)
60
+ parser (>= 3.3.0.2)
61
+ rainbow (>= 2.2.2, < 4.0)
62
+ regexp_parser (>= 2.4, < 3.0)
63
+ rubocop-ast (>= 1.32.2, < 2.0)
64
+ ruby-progressbar (~> 1.7)
65
+ unicode-display_width (>= 2.4.0, < 3.0)
66
+ rubocop-ast (1.34.1)
67
+ parser (>= 3.3.1.0)
68
+ rubocop-performance (1.22.1)
69
+ rubocop (>= 1.48.1, < 2.0)
70
+ rubocop-ast (>= 1.31.1, < 2.0)
71
+ ruby-progressbar (1.13.0)
72
+ securerandom (0.3.1)
73
+ simplecov (0.16.1)
74
+ docile (~> 1.1)
75
+ json (>= 1.8, < 3)
76
+ simplecov-html (~> 0.10.0)
77
+ simplecov-html (0.10.2)
78
+ standard (1.41.1)
79
+ language_server-protocol (~> 3.17.0.2)
80
+ lint_roller (~> 1.0)
81
+ rubocop (~> 1.66.0)
82
+ standard-custom (~> 1.0.0)
83
+ standard-performance (~> 1.5)
84
+ standard-custom (1.0.2)
85
+ lint_roller (~> 1.0)
86
+ rubocop (~> 1.50)
87
+ standard-performance (1.5.0)
88
+ lint_roller (~> 1.1)
89
+ rubocop-performance (~> 1.22.0)
90
+ sync (0.5.0)
91
+ term-ansicolor (1.11.2)
92
+ tins (~> 1.0)
93
+ thor (1.3.2)
94
+ timecop (0.9.10)
95
+ tins (1.37.0)
96
+ bigdecimal
97
+ sync
98
+ tzinfo (2.0.6)
99
+ concurrent-ruby (~> 1.0)
100
+ unicode-display_width (2.6.0)
101
+ uri (1.0.1)
102
+ yard (0.9.37)
103
+
104
+ PLATFORMS
105
+ x86_64-darwin-24
106
+
107
+ DEPENDENCIES
108
+ activesupport (~> 8.0)
109
+ coveralls
110
+ m
111
+ minitest
112
+ montrose!
113
+ rake (>= 12.3.3)
114
+ standard
115
+ timecop
116
+ yard
117
+
118
+ BUNDLED WITH
119
+ 2.4.20
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Montrose
4
- VERSION = "0.16.0"
4
+ VERSION = "0.17.0"
5
5
  end
data/montrose.gemspec CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
 
23
23
  spec.required_ruby_version = ">= 2.7.0"
24
24
 
25
- spec.add_dependency "activesupport", ">= 5.2", "< 8"
25
+ spec.add_dependency "activesupport", ">= 5.2", "<= 8"
26
26
 
27
27
  spec.add_development_dependency "coveralls"
28
28
  spec.add_development_dependency "m"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: montrose
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ross Kaffenberger
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-10-12 00:00:00.000000000 Z
11
+ date: 2024-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -17,7 +17,7 @@ dependencies:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '5.2'
20
- - - "<"
20
+ - - "<="
21
21
  - !ruby/object:Gem::Version
22
22
  version: '8'
23
23
  type: :runtime
@@ -27,7 +27,7 @@ dependencies:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
29
  version: '5.2'
30
- - - "<"
30
+ - - "<="
31
31
  - !ruby/object:Gem::Version
32
32
  version: '8'
33
33
  - !ruby/object:Gem::Dependency
@@ -170,6 +170,10 @@ files:
170
170
  - gemfiles/activesupport_7.0.gemfile.lock
171
171
  - gemfiles/activesupport_7.1.gemfile
172
172
  - gemfiles/activesupport_7.1.gemfile.lock
173
+ - gemfiles/activesupport_7.2.gemfile
174
+ - gemfiles/activesupport_7.2.gemfile.lock
175
+ - gemfiles/activesupport_8.0.gemfile
176
+ - gemfiles/activesupport_8.0.gemfile.lock
173
177
  - lib/montrose.rb
174
178
  - lib/montrose/chainable.rb
175
179
  - lib/montrose/clock.rb
@@ -237,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
237
241
  - !ruby/object:Gem::Version
238
242
  version: '0'
239
243
  requirements: []
240
- rubygems_version: 3.4.6
244
+ rubygems_version: 3.5.9
241
245
  signing_key:
242
246
  specification_version: 4
243
247
  summary: Recurring events in Ruby