montrose 0.9.0 → 0.10.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 +4 -4
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +19 -3
- data/lib/montrose/options.rb +3 -1
- data/lib/montrose/recurrence.rb +8 -0
- data/lib/montrose/rule/after.rb +1 -1
- data/lib/montrose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0db24b32e84647b7cbcc6ef866ae5e4b281586988c204db9121aa7e34b3bc00b
|
4
|
+
data.tar.gz: de8cd6aff8fed30f62691433931fb20dab2f7d759f985969753f2615687f073d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a17683c42b4660c9c4b10c22566d33043b1fbf2e38ada33966520b69ff5ce64f7f420e992379b3db2f0d301d467afa69ff965bec42c184a09b466b686db5749e
|
7
|
+
data.tar.gz: 4d5c02063938b9573efccfabf454ac733f6fbbcd916722ef6b923d8a9c70bb466d85c2dc2a9d3216fdc3a1e6c7463ada8cdf2b8740e82a5f967c1bae64039fcc
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,15 +1,31 @@
|
|
1
|
+
### 0.10.0 - (2019-07-17)
|
2
|
+
|
3
|
+
* enhancements
|
4
|
+
* Overrides `Recurrence#as_json` (by @mmagn) to correlate with behavior of
|
5
|
+
`Recurrence#to_json`
|
6
|
+
|
7
|
+
* bug fixes
|
8
|
+
* In overriding `Recurrence#as_json` as described above, fixes potential
|
9
|
+
infinite loop of calling the method with an infinite recurrence
|
10
|
+
|
11
|
+
* breaking changes
|
12
|
+
* Start time for a daily Recurrence defined with :at options will no longer
|
13
|
+
reset to the beginning of the day; addresses confusion with original
|
14
|
+
behavior in which such occurrences could emit events in the past relative
|
15
|
+
to the given or explicit start time, i.e., earlier in the day
|
16
|
+
|
1
17
|
### 0.9.0 - (2019-03-11)
|
2
18
|
|
3
19
|
* enhancements
|
4
|
-
*
|
20
|
+
* Enables support for ActiveRecord 6
|
5
21
|
|
6
22
|
* bug fixes
|
7
23
|
* Fixes bug for nth day of month when used with yearly interval
|
8
24
|
|
9
25
|
* breaking changes
|
10
|
-
*
|
26
|
+
* Using selected with :month with :day as a Hash will now enforce the
|
11
27
|
`NthDayOfMonth` recurrence rule
|
12
|
-
*
|
28
|
+
* Drops official support for Ruby 2.1 and 2.2
|
13
29
|
|
14
30
|
### 0.8.2 - (2018-08-02)
|
15
31
|
|
data/lib/montrose/options.rb
CHANGED
@@ -229,7 +229,9 @@ module Montrose
|
|
229
229
|
time = starts || default_starts
|
230
230
|
|
231
231
|
if at
|
232
|
-
at.map { |
|
232
|
+
at.map { |hour, min, sec = 0| time.change(hour: hour, min: min, sec: sec) }
|
233
|
+
.select { |t| t >= time }
|
234
|
+
.min || time
|
233
235
|
else
|
234
236
|
time
|
235
237
|
end
|
data/lib/montrose/recurrence.rb
CHANGED
@@ -318,6 +318,14 @@ module Montrose
|
|
318
318
|
JSON.dump(to_hash, *args)
|
319
319
|
end
|
320
320
|
|
321
|
+
# Returns json of options used to create the recurrence
|
322
|
+
#
|
323
|
+
# @return [Hash] json of recurrence options
|
324
|
+
#
|
325
|
+
def as_json(*args)
|
326
|
+
to_hash.as_json(*args)
|
327
|
+
end
|
328
|
+
|
321
329
|
# Returns options used to create the recurrence in YAML format
|
322
330
|
#
|
323
331
|
# @return [String] YAML-formatted recurrence options
|
data/lib/montrose/rule/after.rb
CHANGED
data/lib/montrose/version.rb
CHANGED
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.10.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: 2019-
|
11
|
+
date: 2019-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|