montrose 0.14.0 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d6f7ea1fd6222db409b16db79037e8fcdae1d3d2d974fe767ba1cc14e7751d15
4
- data.tar.gz: 7006787072b5ccd1d5bd1e37991fea4ee0539ff2c6b6e62a317194066b4ecb5d
3
+ metadata.gz: d987c6a9b58b5a73d95b6cf86a42f7887d8778760f08bb02e0fcffe24a06320e
4
+ data.tar.gz: 844da8c5fda1cb93bc0633fe69f8461c9e07a11292478c355a8c6ccfed6a1a6a
5
5
  SHA512:
6
- metadata.gz: a0bf23b3af8e63c66f4bf8b81873f5869c88dd206cfe185f26b926f9eba4ab5895fb50aa318621949551d7d99ffa6d17b73e54509a4431230f048515f4554678
7
- data.tar.gz: af35726d60626e59eaab28ad6a4c3bda1a570405f2c8d47efbba42b6efd452eb61b66007385ce030bf303a1ad5c49b65280d0db9e20cab1c82fc07c88812ebce
6
+ metadata.gz: 9852954548cc4fb698dc492d7573e7bedf20d470b0729a1bcd63b26c76828d01eb2d13cc793b3e8a8019135f8de104fbc3e3ea2ac2514c48462e0c4d2236f258
7
+ data.tar.gz: 67a3b6ba8d0ebd629658dbe023682954fa51dbd5bc1105a462be0b619237ed29dd29c0c13ec0cfcab1c9fb7eca29b8af00cbcb6417a1a31e96e07664cdb49c50
data/.circleci/config.yml CHANGED
@@ -2,6 +2,14 @@ version: 2.1
2
2
  orbs:
3
3
  ruby: circleci/ruby@2.1.0
4
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>>
5
13
 
6
14
  commands:
7
15
  run-tests:
@@ -14,44 +22,120 @@ commands:
14
22
  steps:
15
23
  - run: bundle exec rake standard
16
24
 
25
+ run-docs-build:
26
+ description: Generate docs
27
+ steps:
28
+ - run: bundle exec rake doc:build
29
+
30
+ run-docs-publish:
31
+ description: Update gh-pages
32
+ steps:
33
+ - run: |
34
+ git checkout gh-pages
35
+ cp -R doc/* .
36
+ git commit -vam 'Update documentation'
37
+ git push origin gh-pages
38
+
17
39
  jobs:
18
40
  test:
19
41
  parameters:
20
- ruby_version:
42
+ ruby-version:
21
43
  type: string
22
44
  gemfile:
23
45
  type: string
24
- docker:
25
- - image: 'cimg/ruby:<< parameters.ruby_version >>'
46
+ executor:
47
+ name: app-ruby
48
+ ruby-version: <<parameters.ruby-version>>
26
49
  steps:
27
50
  - checkout
28
51
  - ruby/install-deps:
29
52
  gemfile: <<parameters.gemfile>>
30
53
  - run-tests
31
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
+
32
62
  lint:
33
- docker:
34
- - image: cimg/ruby:2.7
63
+ executor: app-ruby
35
64
  steps:
36
65
  - checkout
37
66
  - ruby/install-deps
38
67
  - run-lint
39
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
+
40
105
  workflows:
41
- all-tests:
106
+ build:
42
107
  jobs:
43
108
  - lint
109
+ - build-docs
110
+ - test-matrix:
111
+ requires:
112
+ - test
44
113
  - test:
45
114
  matrix:
46
115
  parameters:
47
- ruby_version: ['2.6', '2.7', '3.0', '3.1']
116
+ ruby-version:
117
+ - '2.7'
118
+ - '3.0'
119
+ - '3.1'
48
120
  gemfile:
49
- [
50
- 'gemfiles/activesupport_5.2.gemfile',
51
- 'gemfiles/activesupport_6.0.gemfile',
52
- 'gemfiles/activesupport_6.1.gemfile',
53
- 'gemfiles/activesupport_7.0.gemfile',
54
- ]
55
- exclude:
56
- - ruby_version: '2.6'
57
- gemfile: gemfiles/activesupport_7.0.gemfile
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
@@ -9,3 +9,4 @@
9
9
  /profile.log
10
10
  /trace.txt
11
11
  /.ruby-gemset
12
+ /vendor/
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
- * enhancements
4
- * Adds `Montrose.covering` to disambiguate `Montrose.between` behavior
5
- `#covering` provides recurrence masking behavior, i.e., only recurrences
6
- within the given range will be emitted
7
- * Added support for ActiveSupport 6 and Ruby 2.7
8
- * Adds `Montrose#infinite?` and ensures `Montrose.finite?` returns a boolean
9
-
10
- * bug fixes
11
- * Fixes `Recurrence#include?` behavior for infinite recurrences with
12
- intervals > 1
13
-
14
- * breaking changes
15
- * `Montrose.between` no longer provides masking behavior, which is now
16
- provided by `Montrose.covering`. A global option can be used
17
- `Montrose.enable_deprecated_between_masking = true` to retain the legacy
18
- behavior for `Montrose.between`. This option will be removed in v1.0.
19
- * Dropped official support for EOL'd rubies and ActiveSupport < 5.2
20
-
21
- * miscellaneous
22
- * switched from Travis to CircleCi for builds
23
- * switched default branch to `main`
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
- * enhancements
28
- * Adds `Recurrence#during` to support recurrences within time-of-day ranges,
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
- * enhancements
34
- * Adds `Schedule.dump` and `Schedule.load` to support ActiveRecord column
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
- * enhancements
40
- * Overrides `Recurrence#as_json` (by @mmagn) to correlate with behavior of
65
+ - enhancements
66
+
67
+ - Overrides `Recurrence#as_json` (by @mmagn) to correlate with behavior of
41
68
  `Recurrence#to_json`
42
69
 
43
- * bug fixes
44
- * In overriding `Recurrence#as_json` as described above, fixes potential
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
- * breaking changes
48
- * Start time for a daily Recurrence defined with :at options will no longer
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
- * enhancements
56
- * Enables support for ActiveRecord 6
83
+ - enhancements
57
84
 
58
- * bug fixes
59
- * Fixes bug for nth day of month when used with yearly interval
85
+ - Enables support for ActiveRecord 6
60
86
 
61
- * breaking changes
62
- * Using selected with :month with :day as a Hash will now enforce the
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
- * Drops official support for Ruby 2.1 and 2.2
94
+ - Drops official support for Ruby 2.1 and 2.2
65
95
 
66
96
  ### 0.8.2 - (2018-08-02)
67
97
 
68
- * bug fixes
69
- * Fixes use of :at when time of day earlier than :starts
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
- * bug fixes
74
- * Fixes interval comparisons for secondly, hourly, minutely by zeroing usec
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
- * enhancements
80
- * Parsing the `:at` option now initializes recurrence by the hour-minute-second
81
- * Support activesupport-5.2 (by @zokioki)
82
- * Support ruby-2.5
83
- * Support YAML.safe_load for Recurrence#to_yaml
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
- * enhancements
88
- * Adds the :exclude_end option can be used to determine whether :until value
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
- * Support activesupport-5.1 (by @fauxparse)
91
- * Support ruby-2.4
121
+ - Support activesupport-5.1 (by @fauxparse)
122
+ - Support ruby-2.4
92
123
 
93
- * bug fixes
94
- * Recurrence#to_json accepts arguments for JSON.dump
124
+ - bug fixes
95
125
 
96
- * breaking changes
97
- * Previously, the :between option served as a shorthand for :starts to :until.
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
- * The :exclude_end option changes the default behavior of :until--when the
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
- * enhancements
108
- * Alias `every` to `frequency`
109
- * Handle JSON and hashes in Recurrence serialization
110
- * Handle blank and nil objects in Recurrence deserialization
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
- * enhancements
115
- * Adds `Recurrence#include?`
116
- * Improved documentation
146
+ - enhancements
147
+ - Adds `Recurrence#include?`
148
+ - Improved documentation
117
149
 
118
150
  ### 0.4.3 - (2016-11-20)
119
151
 
120
- * enhancements
121
- * Add CI support for ActiveSupport 4.1, 4.2, 5.0 (by @phlipper)
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
- * bug fixes
126
- * Respect `ActiveSupport::TimeWithZone` objects for casting time objects (by
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
- * enhancements
132
- * Support `Montrose.every(:second)`
163
+ - enhancements
164
+
165
+ - Support `Montrose.every(:second)`
133
166
 
134
- * bug fixes
135
- * Ensure `ActiveSupport::Duration` parts are used; fixes 'every 30 days' bug
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
- * enhancements
140
- * Respect configured time zone by using `Time.current` from `ActiveSupport`
141
- * Adds `Montrose::Recurrence#to_json` method
142
- * Additional tests for utils methods (by @AlexWheeler)
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
- * enhancements
147
- * Adds `:except` option and chainable method to filter timestamps by date (by
179
+ - enhancements
180
+ - Adds `:except` option and chainable method to filter timestamps by date (by
148
181
  @thewatts)
149
- * bug fixes
150
- * Fix recurrences when specifying both `:starts` and `:at` by treating
182
+ - bug fixes
183
+ - Fix recurrences when specifying both `:starts` and `:at` by treating
151
184
  `:starts` value like a date
152
- * Respect recurrence rules using multiple `:at` values
153
- * Using `Montrose.r` without any arguments no longer throws `ArgumentError`
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
- * bug fixes
158
- * Handle `Hash` in `Montrose::Chainable` methods that support varargs
159
- * enhancements
160
- * Adds `Montrose.r` method for starting a new recurrence
161
- * Adds `Chainable` alias methods including `#starts`, `#until`, `#repeat`
162
- * README updates (by @thegcat)
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
- * bug fixes
167
- * Handle `nil` in `Montrose::Options` constructor
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
- * enhancements
172
- * extend `Montrose::Schedule` api for building and adding recurrences
173
- * add more details to chainable docs
174
- * merge default options at enumeration time for more consistent serialization
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-01
209
+ ### 0.1.1 - (2016-01-25)
177
210
 
178
- * bug fixes
179
- * add missing `require "forwardable"`
180
- * enhancements
181
- * add better `#inspect` methods in `Recurrence` and `Options`
182
- * use refinement to refactor Options internal arg merging
183
- * support ruby 2.3.0 in travis builds
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-01
218
+ ### 0.1.0 - (2016-01-18)
186
219
 
187
- * initial release
220
+ - initial release
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- montrose (0.14.0)
4
+ montrose (0.15.0)
5
5
  activesupport (>= 5.2, < 7.1)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Montrose
2
2
 
3
- [![Build Status](https://travis-ci.org/rossta/montrose.svg?branch=master)](https://travis-ci.org/rossta/montrose)
4
- [![Code Climate](https://codeclimate.com/github/rossta/montrose/badges/gpa.svg)](https://codeclimate.com/github/rossta/montrose)
3
+ [![Build Status](https://dl.circleci.com/status-badge/img/gh/rossta/montrose/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/rossta/montrose/tree/main)
4
+ [![Code Climate](https://api.codeclimate.com/v1/badges/305689119fb4ddcbaec1/maintainability)](https://codeclimate.com/github/rossta/montrose/maintainability)
5
5
  [![Coverage Status](https://coveralls.io/repos/rossta/montrose/badge.svg?branch=master&service=github)](https://coveralls.io/github/rossta/montrose?branch=master)
6
6
 
7
7
  Montrose is an easy-to-use library for defining recurring events in Ruby. It uses a simple chaining system for building enumerable recurrences, inspired heavily by the design principles of [HTTP.rb](https://github.com/httprb/http) and rule definitions available in [Recurrence](https://github.com/fnando/recurrence).
data/Rakefile CHANGED
@@ -18,6 +18,11 @@ task test: :spec
18
18
  task default: %i[spec standard]
19
19
 
20
20
  namespace :doc do
21
+ desc "Build docs"
22
+ task :build do
23
+ sh "bundle exec yard doc"
24
+ end
25
+
21
26
  desc "Generate docs and publish to gh-pages"
22
27
  task :publish do
23
28
  puts "Generating docs"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Montrose
4
- VERSION = "0.14.0"
4
+ VERSION = "0.15.0"
5
5
  end
data/montrose.gemspec CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
21
  spec.require_paths = ["lib"]
22
22
 
23
- spec.required_ruby_version = ">= 2.6.0"
23
+ spec.required_ruby_version = ">= 2.7.0"
24
24
 
25
25
  spec.add_dependency "activesupport", ">= 5.2", "< 7.1"
26
26
 
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.14.0
4
+ version: 0.15.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-08-23 00:00:00.000000000 Z
11
+ date: 2023-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -225,14 +225,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
225
225
  requirements:
226
226
  - - ">="
227
227
  - !ruby/object:Gem::Version
228
- version: 2.6.0
228
+ version: 2.7.0
229
229
  required_rubygems_version: !ruby/object:Gem::Requirement
230
230
  requirements:
231
231
  - - ">="
232
232
  - !ruby/object:Gem::Version
233
233
  version: '0'
234
234
  requirements: []
235
- rubygems_version: 3.1.6
235
+ rubygems_version: 3.4.6
236
236
  signing_key:
237
237
  specification_version: 4
238
238
  summary: Recurring events in Ruby