montrose 0.13.0 → 0.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +114 -39
- data/.gitignore +1 -3
- data/.rubocop.yml +5 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +141 -108
- data/Gemfile +4 -9
- data/Gemfile.lock +148 -0
- data/README.md +2 -9
- data/Rakefile +5 -0
- data/bin/bundle-all +5 -0
- data/gemfiles/activesupport_5.2.gemfile +0 -11
- data/gemfiles/activesupport_5.2.gemfile.lock +107 -0
- data/gemfiles/activesupport_6.0.gemfile +0 -11
- data/gemfiles/activesupport_6.0.gemfile.lock +108 -0
- data/gemfiles/activesupport_6.1.gemfile +0 -11
- data/gemfiles/activesupport_6.1.gemfile.lock +108 -0
- data/gemfiles/activesupport_7.0.gemfile +0 -11
- data/gemfiles/activesupport_7.0.gemfile.lock +106 -0
- data/lib/montrose/clock.rb +54 -9
- data/lib/montrose/frequency.rb +1 -1
- data/lib/montrose/ical.rb +3 -3
- data/lib/montrose/recurrence.rb +7 -7
- data/lib/montrose/schedule.rb +7 -7
- data/lib/montrose/version.rb +1 -1
- data/montrose.gemspec +3 -2
- metadata +27 -7
- data/Appraisals +0 -17
- data/bin/appraisal +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d987c6a9b58b5a73d95b6cf86a42f7887d8778760f08bb02e0fcffe24a06320e
|
4
|
+
data.tar.gz: 844da8c5fda1cb93bc0633fe69f8461c9e07a11292478c355a8c6ccfed6a1a6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9852954548cc4fb698dc492d7573e7bedf20d470b0729a1bcd63b26c76828d01eb2d13cc793b3e8a8019135f8de104fbc3e3ea2ac2514c48462e0c4d2236f258
|
7
|
+
data.tar.gz: 67a3b6ba8d0ebd629658dbe023682954fa51dbd5bc1105a462be0b619237ed29dd29c0c13ec0cfcab1c9fb7eca29b8af00cbcb6417a1a31e96e07664cdb49c50
|
data/.circleci/config.yml
CHANGED
@@ -1,66 +1,141 @@
|
|
1
1
|
version: 2.1
|
2
2
|
orbs:
|
3
|
-
ruby: circleci/ruby@1.
|
3
|
+
ruby: circleci/ruby@2.1.0
|
4
|
+
|
5
|
+
executors:
|
6
|
+
app-ruby:
|
7
|
+
parameters:
|
8
|
+
ruby-version:
|
9
|
+
type: string
|
10
|
+
default: '2.7'
|
11
|
+
docker:
|
12
|
+
- image: cimg/ruby:<<parameters.ruby-version>>
|
13
|
+
|
4
14
|
commands:
|
5
15
|
run-tests:
|
6
16
|
description: Run tests
|
7
17
|
steps:
|
8
18
|
- run: bundle exec rake test
|
9
|
-
|
10
|
-
|
19
|
+
|
20
|
+
run-lint:
|
21
|
+
description: Run standardrb lint check
|
11
22
|
steps:
|
12
|
-
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
description: Save cache
|
23
|
+
- run: bundle exec rake standard
|
24
|
+
|
25
|
+
run-docs-build:
|
26
|
+
description: Generate docs
|
17
27
|
steps:
|
18
|
-
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
bundle:
|
23
|
-
description: Install dependencies
|
28
|
+
- run: bundle exec rake doc:build
|
29
|
+
|
30
|
+
run-docs-publish:
|
31
|
+
description: Update gh-pages
|
24
32
|
steps:
|
25
|
-
- run:
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
- run: bundle install
|
33
|
+
- run: |
|
34
|
+
git checkout gh-pages
|
35
|
+
cp -R doc/* .
|
36
|
+
git commit -vam 'Update documentation'
|
37
|
+
git push origin gh-pages
|
31
38
|
|
32
39
|
jobs:
|
33
40
|
test:
|
34
41
|
parameters:
|
35
|
-
|
42
|
+
ruby-version:
|
36
43
|
type: string
|
37
44
|
gemfile:
|
38
45
|
type: string
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
GEMFILE_NAME: <<parameters.gemfile>>
|
46
|
+
executor:
|
47
|
+
name: app-ruby
|
48
|
+
ruby-version: <<parameters.ruby-version>>
|
43
49
|
steps:
|
44
50
|
- checkout
|
45
|
-
-
|
46
|
-
|
47
|
-
- save
|
51
|
+
- ruby/install-deps:
|
52
|
+
gemfile: <<parameters.gemfile>>
|
48
53
|
- run-tests
|
49
54
|
|
55
|
+
# Convenience job for setting github branch protection rules
|
56
|
+
test-matrix:
|
57
|
+
executor: app-ruby
|
58
|
+
steps:
|
59
|
+
- checkout
|
60
|
+
- run: echo "Done"
|
61
|
+
|
62
|
+
lint:
|
63
|
+
executor: app-ruby
|
64
|
+
steps:
|
65
|
+
- checkout
|
66
|
+
- ruby/install-deps
|
67
|
+
- run-lint
|
68
|
+
|
69
|
+
build-docs:
|
70
|
+
executor: app-ruby
|
71
|
+
steps:
|
72
|
+
- checkout
|
73
|
+
- ruby/install-deps
|
74
|
+
- run-docs-build
|
75
|
+
- persist_to_workspace:
|
76
|
+
root: .
|
77
|
+
paths: doc
|
78
|
+
|
79
|
+
publish-docs:
|
80
|
+
executor: app-ruby
|
81
|
+
steps:
|
82
|
+
- checkout
|
83
|
+
- ruby/install-deps
|
84
|
+
- attach_workspace:
|
85
|
+
at: .
|
86
|
+
- add_ssh_keys:
|
87
|
+
fingerprints: # ssh key generated solely for montrose docs
|
88
|
+
- "97:43:0c:36:36:1d:83:30:f0:76:d4:9f:d3:71:a8:a5"
|
89
|
+
- run:
|
90
|
+
name: Configure git
|
91
|
+
command: |
|
92
|
+
git config user.email "ci-build@rossta.net"
|
93
|
+
git config user.name "ci-build"
|
94
|
+
- run-docs-publish
|
95
|
+
|
96
|
+
release:
|
97
|
+
executor: app-ruby
|
98
|
+
steps:
|
99
|
+
- checkout
|
100
|
+
- ruby/install-deps
|
101
|
+
- run:
|
102
|
+
name: Publish gem to Rubygems
|
103
|
+
command: bundle exec rake release
|
104
|
+
|
50
105
|
workflows:
|
51
|
-
|
106
|
+
build:
|
52
107
|
jobs:
|
108
|
+
- lint
|
109
|
+
- build-docs
|
110
|
+
- test-matrix:
|
111
|
+
requires:
|
112
|
+
- test
|
53
113
|
- test:
|
54
114
|
matrix:
|
55
115
|
parameters:
|
56
|
-
|
116
|
+
ruby-version:
|
117
|
+
- '2.7'
|
118
|
+
- '3.0'
|
119
|
+
- '3.1'
|
57
120
|
gemfile:
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
121
|
+
- 'gemfiles/activesupport_5.2.gemfile'
|
122
|
+
- 'gemfiles/activesupport_6.0.gemfile'
|
123
|
+
- 'gemfiles/activesupport_6.1.gemfile'
|
124
|
+
- 'gemfiles/activesupport_7.0.gemfile'
|
125
|
+
- publish-docs:
|
126
|
+
requires:
|
127
|
+
- lint
|
128
|
+
- build-docs
|
129
|
+
- test-matrix
|
130
|
+
filters:
|
131
|
+
branches:
|
132
|
+
only: main
|
133
|
+
- release:
|
134
|
+
requires:
|
135
|
+
- test
|
136
|
+
- lint
|
137
|
+
filters:
|
138
|
+
tags:
|
139
|
+
only: /^v.*/
|
140
|
+
branches:
|
141
|
+
ignore: /.*/
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.7
|
data/CHANGELOG.md
CHANGED
@@ -1,187 +1,220 @@
|
|
1
|
+
### 0.15.0 - (2023-08-27)
|
2
|
+
|
3
|
+
- breaking changes
|
4
|
+
- Drop support for Ruby 2.6
|
5
|
+
|
6
|
+
### 0.14.0 - (2023-08-23)
|
7
|
+
|
8
|
+
- enhancements
|
9
|
+
- Performance optimization for recurrences with :at option (by @artinboghosian)
|
10
|
+
|
11
|
+
### 0.13.0 - (2022-01-04)
|
12
|
+
|
13
|
+
- enhancements
|
14
|
+
|
15
|
+
- Add support for Ruby 3.x
|
16
|
+
- Add support for Rails 7.0
|
17
|
+
- Add basic support for ical parsing
|
18
|
+
|
19
|
+
- bug fixes
|
20
|
+
- Make :during option work for time range spanning midnight
|
21
|
+
|
1
22
|
### 0.12.0 - (2021-02-02)
|
2
23
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
+
- enhancements
|
25
|
+
|
26
|
+
- Adds `Montrose.covering` to disambiguate `Montrose.between` behavior
|
27
|
+
`#covering` provides recurrence masking behavior, i.e., only recurrences
|
28
|
+
within the given range will be emitted
|
29
|
+
- Added support for ActiveSupport 6 and Ruby 2.7
|
30
|
+
- Adds `Montrose#infinite?` and ensures `Montrose.finite?` returns a boolean
|
31
|
+
|
32
|
+
- bug fixes
|
33
|
+
|
34
|
+
- Fixes `Recurrence#include?` behavior for infinite recurrences with
|
35
|
+
intervals > 1
|
36
|
+
|
37
|
+
- breaking changes
|
38
|
+
|
39
|
+
- `Montrose.between` no longer provides masking behavior, which is now
|
40
|
+
provided by `Montrose.covering`. A global option can be used
|
41
|
+
`Montrose.enable_deprecated_between_masking = true` to retain the legacy
|
42
|
+
behavior for `Montrose.between`. This option will be removed in v1.0.
|
43
|
+
- Dropped official support for EOL'd rubies and ActiveSupport < 5.2
|
44
|
+
|
45
|
+
- miscellaneous
|
46
|
+
- switched from Travis to CircleCi for builds
|
47
|
+
- switched default branch to `main`
|
48
|
+
|
24
49
|
#
|
50
|
+
|
25
51
|
### 0.11.0 - (2019-08-16)
|
26
52
|
|
27
|
-
|
28
|
-
|
53
|
+
- enhancements
|
54
|
+
- Adds `Recurrence#during` to support recurrences within time-of-day ranges,
|
29
55
|
e.g. `Montrose.every(20.minutes).during("9am-5pm")`
|
30
56
|
|
31
57
|
### 0.10.1 - (2019-07-22)
|
32
58
|
|
33
|
-
|
34
|
-
|
59
|
+
- enhancements
|
60
|
+
- Adds `Schedule.dump` and `Schedule.load` to support ActiveRecord column
|
35
61
|
serialization
|
36
62
|
|
37
63
|
### 0.10.0 - (2019-07-17)
|
38
64
|
|
39
|
-
|
40
|
-
|
65
|
+
- enhancements
|
66
|
+
|
67
|
+
- Overrides `Recurrence#as_json` (by @mmagn) to correlate with behavior of
|
41
68
|
`Recurrence#to_json`
|
42
69
|
|
43
|
-
|
44
|
-
|
70
|
+
- bug fixes
|
71
|
+
|
72
|
+
- In overriding `Recurrence#as_json` as described above, fixes potential
|
45
73
|
infinite loop of calling the method with an infinite recurrence
|
46
74
|
|
47
|
-
|
48
|
-
|
75
|
+
- breaking changes
|
76
|
+
- Start time for a daily Recurrence defined with :at options will no longer
|
49
77
|
reset to the beginning of the day; addresses confusion with original
|
50
78
|
behavior in which such occurrences could emit events in the past relative
|
51
79
|
to the given or explicit start time, i.e., earlier in the day
|
52
80
|
|
53
81
|
### 0.9.0 - (2019-03-11)
|
54
82
|
|
55
|
-
|
56
|
-
* Enables support for ActiveRecord 6
|
83
|
+
- enhancements
|
57
84
|
|
58
|
-
|
59
|
-
* Fixes bug for nth day of month when used with yearly interval
|
85
|
+
- Enables support for ActiveRecord 6
|
60
86
|
|
61
|
-
|
62
|
-
|
87
|
+
- bug fixes
|
88
|
+
|
89
|
+
- Fixes bug for nth day of month when used with yearly interval
|
90
|
+
|
91
|
+
- breaking changes
|
92
|
+
- Using selected with :month with :day as a Hash will now enforce the
|
63
93
|
`NthDayOfMonth` recurrence rule
|
64
|
-
|
94
|
+
- Drops official support for Ruby 2.1 and 2.2
|
65
95
|
|
66
96
|
### 0.8.2 - (2018-08-02)
|
67
97
|
|
68
|
-
|
69
|
-
|
98
|
+
- bug fixes
|
99
|
+
- Fixes use of :at when time of day earlier than :starts
|
70
100
|
|
71
101
|
### 0.8.1 - (2018-07-27)
|
72
102
|
|
73
|
-
|
74
|
-
|
103
|
+
- bug fixes
|
104
|
+
- Fixes interval comparisons for secondly, hourly, minutely by zeroing usec
|
75
105
|
for recurrence start and end times
|
76
106
|
|
77
107
|
### 0.8.0 - (2018-05-29)
|
78
108
|
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
109
|
+
- enhancements
|
110
|
+
- Parsing the `:at` option now initializes recurrence by the hour-minute-second
|
111
|
+
- Support activesupport-5.2 (by @zokioki)
|
112
|
+
- Support ruby-2.5
|
113
|
+
- Support YAML.safe_load for Recurrence#to_yaml
|
84
114
|
|
85
115
|
### 0.7.0 - (2017-09-18)
|
86
116
|
|
87
|
-
|
88
|
-
|
117
|
+
- enhancements
|
118
|
+
|
119
|
+
- Adds the :exclude_end option can be used to determine whether :until value
|
89
120
|
is included in the recurrence. Mimics the API to Ruby's Range.
|
90
|
-
|
91
|
-
|
121
|
+
- Support activesupport-5.1 (by @fauxparse)
|
122
|
+
- Support ruby-2.4
|
92
123
|
|
93
|
-
|
94
|
-
* Recurrence#to_json accepts arguments for JSON.dump
|
124
|
+
- bug fixes
|
95
125
|
|
96
|
-
|
97
|
-
|
126
|
+
- Recurrence#to_json accepts arguments for JSON.dump
|
127
|
+
|
128
|
+
- breaking changes
|
129
|
+
- Previously, the :between option served as a shorthand for :starts to :until.
|
98
130
|
Now, when both :starts and :between are provided, the recurrence will behave
|
99
|
-
as if anchored by the given :starts option, but filtered through the given
|
100
|
-
:between option.
|
101
|
-
|
131
|
+
as if anchored by the given :starts option, but filtered through the given
|
132
|
+
:between option.
|
133
|
+
- The :exclude_end option changes the default behavior of :until--when the
|
102
134
|
timestamp of the interval matches the :until timestamp, it will be included
|
103
|
-
by default unless the :exclude_end option is set to true.
|
135
|
+
by default unless the :exclude_end option is set to true.
|
104
136
|
|
105
137
|
### 0.6.0 - (2017-01-05)
|
106
138
|
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
139
|
+
- enhancements
|
140
|
+
- Alias `every` to `frequency`
|
141
|
+
- Handle JSON and hashes in Recurrence serialization
|
142
|
+
- Handle blank and nil objects in Recurrence deserialization
|
111
143
|
|
112
144
|
### 0.5.0 - (2016-11-23)
|
113
145
|
|
114
|
-
|
115
|
-
|
116
|
-
|
146
|
+
- enhancements
|
147
|
+
- Adds `Recurrence#include?`
|
148
|
+
- Improved documentation
|
117
149
|
|
118
150
|
### 0.4.3 - (2016-11-20)
|
119
151
|
|
120
|
-
|
121
|
-
|
152
|
+
- enhancements
|
153
|
+
- Add CI support for ActiveSupport 4.1, 4.2, 5.0 (by @phlipper)
|
122
154
|
|
123
155
|
### 0.4.2 - (2016-07-27)
|
124
156
|
|
125
|
-
|
126
|
-
|
157
|
+
- bug fixes
|
158
|
+
- Respect `ActiveSupport::TimeWithZone` objects for casting time objects (by
|
127
159
|
@tconst)
|
128
160
|
|
129
161
|
### 0.4.1 - (2016-07-04)
|
130
162
|
|
131
|
-
|
132
|
-
|
163
|
+
- enhancements
|
164
|
+
|
165
|
+
- Support `Montrose.every(:second)`
|
133
166
|
|
134
|
-
|
135
|
-
|
167
|
+
- bug fixes
|
168
|
+
- Ensure `ActiveSupport::Duration` parts are used; fixes 'every 30 days' bug
|
136
169
|
|
137
170
|
### 0.4.0 - (2016-04-20)
|
138
171
|
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
172
|
+
- enhancements
|
173
|
+
- Respect configured time zone by using `Time.current` from `ActiveSupport`
|
174
|
+
- Adds `Montrose::Recurrence#to_json` method
|
175
|
+
- Additional tests for utils methods (by @AlexWheeler)
|
143
176
|
|
144
177
|
### 0.3.0 - (2016-02-19)
|
145
178
|
|
146
|
-
|
147
|
-
|
179
|
+
- enhancements
|
180
|
+
- Adds `:except` option and chainable method to filter timestamps by date (by
|
148
181
|
@thewatts)
|
149
|
-
|
150
|
-
|
182
|
+
- bug fixes
|
183
|
+
- Fix recurrences when specifying both `:starts` and `:at` by treating
|
151
184
|
`:starts` value like a date
|
152
|
-
|
153
|
-
|
185
|
+
- Respect recurrence rules using multiple `:at` values
|
186
|
+
- Using `Montrose.r` without any arguments no longer throws `ArgumentError`
|
154
187
|
|
155
|
-
### 0.2.2 - 2016-02-08
|
188
|
+
### 0.2.2 - (2016-02-08)
|
156
189
|
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
190
|
+
- bug fixes
|
191
|
+
- Handle `Hash` in `Montrose::Chainable` methods that support varargs
|
192
|
+
- enhancements
|
193
|
+
- Adds `Montrose.r` method for starting a new recurrence
|
194
|
+
- Adds `Chainable` alias methods including `#starts`, `#until`, `#repeat`
|
195
|
+
- README updates (by @thegcat)
|
163
196
|
|
164
|
-
### 0.2.1 - 2016-02-03
|
197
|
+
### 0.2.1 - (2016-02-03)
|
165
198
|
|
166
|
-
|
167
|
-
|
199
|
+
- bug fixes
|
200
|
+
- Handle `nil` in `Montrose::Options` constructor
|
168
201
|
|
169
|
-
### 0.2.0 - 2016-02-03
|
202
|
+
### 0.2.0 - (2016-02-03)
|
170
203
|
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
204
|
+
- enhancements
|
205
|
+
- extend `Montrose::Schedule` api for building and adding recurrences
|
206
|
+
- add more details to chainable docs
|
207
|
+
- merge default options at enumeration time for more consistent serialization
|
175
208
|
|
176
|
-
### 0.1.1 - 2016-25
|
209
|
+
### 0.1.1 - (2016-01-25)
|
177
210
|
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
211
|
+
- bug fixes
|
212
|
+
- add missing `require "forwardable"`
|
213
|
+
- enhancements
|
214
|
+
- add better `#inspect` methods in `Recurrence` and `Options`
|
215
|
+
- use refinement to refactor Options internal arg merging
|
216
|
+
- support ruby 2.3.0 in travis builds
|
184
217
|
|
185
|
-
### 0.1.0 - 2016-18
|
218
|
+
### 0.1.0 - (2016-01-18)
|
186
219
|
|
187
|
-
|
220
|
+
- initial release
|
data/Gemfile
CHANGED
@@ -5,13 +5,8 @@ source "https://rubygems.org"
|
|
5
5
|
gemspec
|
6
6
|
|
7
7
|
group :development do
|
8
|
-
gem "
|
9
|
-
gem "
|
10
|
-
|
11
|
-
|
12
|
-
gem "guard"
|
13
|
-
gem "guard-minitest"
|
14
|
-
gem "guard-rubocop"
|
15
|
-
gem "pry-byebug"
|
16
|
-
end
|
8
|
+
gem "guard"
|
9
|
+
gem "guard-minitest"
|
10
|
+
gem "guard-rubocop"
|
11
|
+
gem "pry-byebug"
|
17
12
|
end
|