montrose 0.8.2 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +2 -0
- data/.rubocop.yml +10 -7
- data/.travis.yml +8 -8
- data/CHANGELOG.md +13 -0
- data/Gemfile +7 -4
- data/README.md +1 -4
- data/gemfiles/activesupport_4.1.gemfile +0 -4
- data/gemfiles/activesupport_4.2.gemfile +0 -4
- data/gemfiles/activesupport_5.0.gemfile +0 -4
- data/gemfiles/activesupport_5.1.gemfile +0 -4
- data/gemfiles/activesupport_5.2.gemfile +0 -4
- data/gemfiles/activesupport_6.0.gemfile +12 -0
- data/lib/montrose/frequency/weekly.rb +1 -0
- data/lib/montrose/frequency/yearly.rb +1 -0
- data/lib/montrose/options.rb +4 -0
- data/lib/montrose/recurrence.rb +1 -0
- data/lib/montrose/rule/nth_day_of_month.rb +1 -1
- data/lib/montrose/rule/nth_day_of_year.rb +1 -1
- data/lib/montrose/version.rb +1 -1
- data/montrose.gemspec +5 -6
- metadata +13 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: aea4b303d8edcae6f8273a01596ad8cef6bc44a910b14ccb386b7c31e75e9770
|
4
|
+
data.tar.gz: 542674604e253fbc5a33ecd37ad4776291d30a45263a10440d898690cb7554ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a807b48aef8b5143f7cfe45d5ccbb8192e529dbb802aed82c21c375e48889cfd447d0f29e7238004458e56806164db387ae966a5c492433808bc90a5698ec8e
|
7
|
+
data.tar.gz: 2653cfceb13a13e4941ead84dbacc1ed5ef05cad74465bd39ab738cbcd48a3cebc9e70b59d521c8c38be1aacdd120dfdb75ae6ba81e991e644039adfa2f65697
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -3,7 +3,7 @@ AllCops:
|
|
3
3
|
- 'bin/**/*'
|
4
4
|
- 'gemfiles/**/*'
|
5
5
|
- 'tmp/**/*'
|
6
|
-
TargetRubyVersion: '2.
|
6
|
+
TargetRubyVersion: '2.3.0'
|
7
7
|
|
8
8
|
Lint/HandleExceptions:
|
9
9
|
Exclude:
|
@@ -39,12 +39,6 @@ Metrics/BlockLength:
|
|
39
39
|
Documentation:
|
40
40
|
Enabled: false # TODO: Enable again once we have more docs
|
41
41
|
|
42
|
-
Lint/EndAlignment:
|
43
|
-
Enabled: false
|
44
|
-
|
45
|
-
Lint/DefEndAlignment:
|
46
|
-
Enabled: false
|
47
|
-
|
48
42
|
Lint/HandleExceptions:
|
49
43
|
Enabled: false
|
50
44
|
|
@@ -52,6 +46,9 @@ Style/GlobalVars:
|
|
52
46
|
Exclude:
|
53
47
|
- spec/support/trace.rb
|
54
48
|
|
49
|
+
Style/SafeNavigation:
|
50
|
+
Enabled: false
|
51
|
+
|
55
52
|
Style/SpecialGlobalVars:
|
56
53
|
Enabled: false
|
57
54
|
|
@@ -79,6 +76,12 @@ Style/StringLiteralsInInterpolation:
|
|
79
76
|
Layout/ClosingParenthesisIndentation:
|
80
77
|
Enabled: false
|
81
78
|
|
79
|
+
Layout/EndAlignment:
|
80
|
+
Enabled: false
|
81
|
+
|
82
|
+
Layout/DefEndAlignment:
|
83
|
+
Enabled: false
|
84
|
+
|
82
85
|
Style/OneLineConditional:
|
83
86
|
Enabled: false
|
84
87
|
|
data/.travis.yml
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
bundler_args: "--jobs 4 --retry 3"
|
2
2
|
cache: bundler
|
3
3
|
gemfile:
|
4
|
+
- gemfiles/activesupport_6.0.gemfile
|
4
5
|
- gemfiles/activesupport_5.2.gemfile
|
5
6
|
- gemfiles/activesupport_5.1.gemfile
|
6
7
|
- gemfiles/activesupport_5.0.gemfile
|
@@ -9,23 +10,22 @@ gemfile:
|
|
9
10
|
language: ruby
|
10
11
|
matrix:
|
11
12
|
exclude:
|
12
|
-
- rvm: 2.
|
13
|
-
gemfile: gemfiles/
|
14
|
-
- rvm: 2.1
|
15
|
-
gemfile: gemfiles/activesupport_5.1.gemfile # Requires Ruby 2.2+
|
16
|
-
- rvm: 2.1
|
17
|
-
gemfile: gemfiles/activesupport_5.2.gemfile # Requires Ruby 2.2+
|
13
|
+
- rvm: 2.3
|
14
|
+
gemfile: gemfiles/activesupport_6.0.gemfile # Requires ruby 2.5+
|
18
15
|
- rvm: 2.4
|
19
16
|
gemfile: gemfiles/activesupport_4.1.gemfile # Requires json 1.8.5+
|
17
|
+
- rvm: 2.4
|
18
|
+
gemfile: gemfiles/activesupport_6.0.gemfile # Requires ruby 2.5+
|
20
19
|
- rvm: 2.5
|
21
20
|
gemfile: gemfiles/activesupport_4.1.gemfile # Requires json 1.8.5+
|
21
|
+
- rvm: 2.6
|
22
|
+
gemfile: gemfiles/activesupport_4.1.gemfile # Requires json 1.8.5+
|
22
23
|
fast_finish: true
|
23
24
|
rvm:
|
24
|
-
- 2.1
|
25
|
-
- 2.2
|
26
25
|
- 2.3
|
27
26
|
- 2.4
|
28
27
|
- 2.5
|
28
|
+
- 2.6
|
29
29
|
sudo: false
|
30
30
|
before_install:
|
31
31
|
- gem update --system
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
### 0.9.0 - (2019-03-11)
|
2
|
+
|
3
|
+
* enhancements
|
4
|
+
* enables support for ActiveRecord 6
|
5
|
+
|
6
|
+
* bug fixes
|
7
|
+
* Fixes bug for nth day of month when used with yearly interval
|
8
|
+
|
9
|
+
* breaking changes
|
10
|
+
* using selected with :month with :day as a Hash will now enforce the
|
11
|
+
`NthDayOfMonth` recurrence rule
|
12
|
+
* drops official support for Ruby 2.1 and 2.2
|
13
|
+
|
1
14
|
### 0.8.2 - (2018-08-02)
|
2
15
|
|
3
16
|
* bug fixes
|
data/Gemfile
CHANGED
@@ -6,9 +6,12 @@ gemspec
|
|
6
6
|
|
7
7
|
group :development do
|
8
8
|
gem "coveralls"
|
9
|
-
gem "guard", platforms: %i[ruby_22 ruby_23] # Guard no longer supports ruby 2.1
|
10
|
-
gem "guard-minitest", platforms: %i[ruby_22 ruby_23]
|
11
|
-
gem "guard-rubocop", platforms: %i[ruby_22 ruby_23]
|
12
|
-
gem "pry-byebug", platforms: %i[ruby_21 ruby_22 ruby_23 ruby_24]
|
13
9
|
gem "yard"
|
10
|
+
|
11
|
+
unless ENV["CI"]
|
12
|
+
gem "guard"
|
13
|
+
gem "guard-minitest"
|
14
|
+
gem "guard-rubocop"
|
15
|
+
gem "pry-byebug"
|
16
|
+
end
|
14
17
|
end
|
data/README.md
CHANGED
@@ -34,7 +34,7 @@ More specifically, this project intends to:
|
|
34
34
|
|
35
35
|
* model recurring events in Ruby
|
36
36
|
* embrace Ruby idioms
|
37
|
-
* support
|
37
|
+
* support recent Rubies
|
38
38
|
* be reasonably performant
|
39
39
|
* serialize to yaml, hash, and [ical](http://www.kanzaki.com/docs/ical/rrule.html#basic) formats
|
40
40
|
* be suitable for integration with persistence libraries
|
@@ -271,9 +271,6 @@ Montrose.every(4.years, month: :november, on: { tuesday: 2..8 })
|
|
271
271
|
date = Date.new(2016, 9, 1)
|
272
272
|
Montrose.hourly(between: date..(date+1), hour: 9..17, interval: 3)
|
273
273
|
|
274
|
-
# every 15 minutes for 6 occurrences
|
275
|
-
Montrose.every(90.minutes, total: 6)
|
276
|
-
|
277
274
|
# every hour and a half for four occurrences
|
278
275
|
Montrose.every(90.minutes, total: 4)
|
279
276
|
|
@@ -6,10 +6,6 @@ gem "activesupport", "~> 4.1.0"
|
|
6
6
|
|
7
7
|
group :development do
|
8
8
|
gem "coveralls"
|
9
|
-
gem "guard", platforms: [:ruby_22, :ruby_23]
|
10
|
-
gem "guard-minitest", platforms: [:ruby_22, :ruby_23]
|
11
|
-
gem "guard-rubocop", platforms: [:ruby_22, :ruby_23]
|
12
|
-
gem "pry-byebug", platforms: [:ruby_21, :ruby_22, :ruby_23]
|
13
9
|
gem "yard"
|
14
10
|
end
|
15
11
|
|
@@ -6,10 +6,6 @@ gem "activesupport", "~> 4.2.0"
|
|
6
6
|
|
7
7
|
group :development do
|
8
8
|
gem "coveralls"
|
9
|
-
gem "guard", platforms: [:ruby_22, :ruby_23]
|
10
|
-
gem "guard-minitest", platforms: [:ruby_22, :ruby_23]
|
11
|
-
gem "guard-rubocop", platforms: [:ruby_22, :ruby_23]
|
12
|
-
gem "pry-byebug", platforms: [:ruby_21, :ruby_22, :ruby_23]
|
13
9
|
gem "yard"
|
14
10
|
end
|
15
11
|
|
@@ -6,10 +6,6 @@ gem "activesupport", "~> 5.0.0"
|
|
6
6
|
|
7
7
|
group :development do
|
8
8
|
gem "coveralls"
|
9
|
-
gem "guard", platforms: [:ruby_22, :ruby_23]
|
10
|
-
gem "guard-minitest", platforms: [:ruby_22, :ruby_23]
|
11
|
-
gem "guard-rubocop", platforms: [:ruby_22, :ruby_23]
|
12
|
-
gem "pry-byebug", platforms: [:ruby_21, :ruby_22, :ruby_23]
|
13
9
|
gem "yard"
|
14
10
|
end
|
15
11
|
|
@@ -6,10 +6,6 @@ gem "activesupport", "~> 5.1.0"
|
|
6
6
|
|
7
7
|
group :development do
|
8
8
|
gem "coveralls"
|
9
|
-
gem "guard", platforms: [:ruby_22, :ruby_23]
|
10
|
-
gem "guard-minitest", platforms: [:ruby_22, :ruby_23]
|
11
|
-
gem "guard-rubocop", platforms: [:ruby_22, :ruby_23]
|
12
|
-
gem "pry-byebug", platforms: [:ruby_21, :ruby_22, :ruby_23]
|
13
9
|
gem "yard"
|
14
10
|
end
|
15
11
|
|
@@ -6,10 +6,6 @@ gem "activesupport", "~> 5.2.0"
|
|
6
6
|
|
7
7
|
group :development do
|
8
8
|
gem "coveralls"
|
9
|
-
gem "guard", platforms: [:ruby_22, :ruby_23]
|
10
|
-
gem "guard-minitest", platforms: [:ruby_22, :ruby_23]
|
11
|
-
gem "guard-rubocop", platforms: [:ruby_22, :ruby_23]
|
12
|
-
gem "pry-byebug", platforms: [:ruby_21, :ruby_22, :ruby_23]
|
13
9
|
gem "yard"
|
14
10
|
end
|
15
11
|
|
data/lib/montrose/options.rb
CHANGED
@@ -11,6 +11,7 @@ module Montrose
|
|
11
11
|
class << self
|
12
12
|
def new(options = {})
|
13
13
|
return options if options.is_a?(self)
|
14
|
+
|
14
15
|
super
|
15
16
|
end
|
16
17
|
|
@@ -142,6 +143,7 @@ module Montrose
|
|
142
143
|
|
143
144
|
def fetch(key, *args, &_block)
|
144
145
|
fail ArgumentError, "wrong number of arguments (#{args.length} for 1..2)" if args.length > 1
|
146
|
+
|
145
147
|
found = send(key)
|
146
148
|
return found if found
|
147
149
|
return args.first if args.length == 1
|
@@ -305,8 +307,10 @@ module Montrose
|
|
305
307
|
def month_or_day(key)
|
306
308
|
month = month_number(key)
|
307
309
|
return [:month, month] if month
|
310
|
+
|
308
311
|
day = day_number(key)
|
309
312
|
return [:day, day] if day
|
313
|
+
|
310
314
|
fail ConfigurationError, "Did not recognize #{key} as a month or day"
|
311
315
|
end
|
312
316
|
|
data/lib/montrose/recurrence.rb
CHANGED
data/lib/montrose/version.rb
CHANGED
data/montrose.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
lib = File.expand_path("
|
3
|
+
lib = File.expand_path("lib", __dir__)
|
4
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
5
|
require "montrose/version"
|
6
6
|
|
@@ -20,15 +20,14 @@ 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.
|
23
|
+
spec.required_ruby_version = ">= 2.3.0"
|
24
24
|
|
25
|
-
spec.add_dependency "activesupport", ">= 4.1", "<
|
25
|
+
spec.add_dependency "activesupport", ">= 4.1", "< 6.0"
|
26
26
|
|
27
27
|
spec.add_development_dependency "appraisal", "~> 2.2.0"
|
28
|
-
spec.add_development_dependency "bundler", "~> 1.13"
|
29
28
|
spec.add_development_dependency "m", "~> 1.5"
|
30
|
-
spec.add_development_dependency "minitest"
|
29
|
+
spec.add_development_dependency "minitest"
|
31
30
|
spec.add_development_dependency "rake", "~> 11.0"
|
32
|
-
spec.add_development_dependency "rubocop", "~> 0.
|
31
|
+
spec.add_development_dependency "rubocop", "~> 0.64.0"
|
33
32
|
spec.add_development_dependency "timecop"
|
34
33
|
end
|
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.
|
4
|
+
version: 0.9.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:
|
11
|
+
date: 2019-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '4.1'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '6.0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '4.1'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '6.0'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: appraisal
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,20 +44,6 @@ dependencies:
|
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: 2.2.0
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: bundler
|
49
|
-
requirement: !ruby/object:Gem::Requirement
|
50
|
-
requirements:
|
51
|
-
- - "~>"
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '1.13'
|
54
|
-
type: :development
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
requirements:
|
58
|
-
- - "~>"
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: '1.13'
|
61
47
|
- !ruby/object:Gem::Dependency
|
62
48
|
name: m
|
63
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -76,16 +62,16 @@ dependencies:
|
|
76
62
|
name: minitest
|
77
63
|
requirement: !ruby/object:Gem::Requirement
|
78
64
|
requirements:
|
79
|
-
- - "
|
65
|
+
- - ">="
|
80
66
|
- !ruby/object:Gem::Version
|
81
|
-
version: '
|
67
|
+
version: '0'
|
82
68
|
type: :development
|
83
69
|
prerelease: false
|
84
70
|
version_requirements: !ruby/object:Gem::Requirement
|
85
71
|
requirements:
|
86
|
-
- - "
|
72
|
+
- - ">="
|
87
73
|
- !ruby/object:Gem::Version
|
88
|
-
version: '
|
74
|
+
version: '0'
|
89
75
|
- !ruby/object:Gem::Dependency
|
90
76
|
name: rake
|
91
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,14 +92,14 @@ dependencies:
|
|
106
92
|
requirements:
|
107
93
|
- - "~>"
|
108
94
|
- !ruby/object:Gem::Version
|
109
|
-
version: 0.
|
95
|
+
version: 0.64.0
|
110
96
|
type: :development
|
111
97
|
prerelease: false
|
112
98
|
version_requirements: !ruby/object:Gem::Requirement
|
113
99
|
requirements:
|
114
100
|
- - "~>"
|
115
101
|
- !ruby/object:Gem::Version
|
116
|
-
version: 0.
|
102
|
+
version: 0.64.0
|
117
103
|
- !ruby/object:Gem::Dependency
|
118
104
|
name: timecop
|
119
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -161,6 +147,7 @@ files:
|
|
161
147
|
- gemfiles/activesupport_5.0.gemfile
|
162
148
|
- gemfiles/activesupport_5.1.gemfile
|
163
149
|
- gemfiles/activesupport_5.2.gemfile
|
150
|
+
- gemfiles/activesupport_6.0.gemfile
|
164
151
|
- lib/montrose.rb
|
165
152
|
- lib/montrose/chainable.rb
|
166
153
|
- lib/montrose/clock.rb
|
@@ -209,15 +196,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
209
196
|
requirements:
|
210
197
|
- - ">="
|
211
198
|
- !ruby/object:Gem::Version
|
212
|
-
version: 2.
|
199
|
+
version: 2.3.0
|
213
200
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
214
201
|
requirements:
|
215
202
|
- - ">="
|
216
203
|
- !ruby/object:Gem::Version
|
217
204
|
version: '0'
|
218
205
|
requirements: []
|
219
|
-
|
220
|
-
rubygems_version: 2.6.13
|
206
|
+
rubygems_version: 3.0.3
|
221
207
|
signing_key:
|
222
208
|
specification_version: 4
|
223
209
|
summary: Recurring events in Ruby
|