montrose 0.4.1 → 0.4.2

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
  SHA1:
3
- metadata.gz: 1758f372166c8d12789ce067a940bffb82a236f9
4
- data.tar.gz: 33ad0ed697c5466871a45c6c7145d0fa55117773
3
+ metadata.gz: e5efc01a0048417e5321812b954d9977e3316133
4
+ data.tar.gz: e6400969918aa43111a9fcd30097d7566d94339d
5
5
  SHA512:
6
- metadata.gz: b65b6a0746f8bcc4f220fdf644e30cd0808f2ca443fc6186df120978c3998d5f676f31368b1fba3732a16d66f1065e8bff778815976fd0175b4a0410192958dc
7
- data.tar.gz: 69a6a474689ef0b837df731add4409acf5d1213cc953eeb736060c6a09230f893955ed0422e5e95e13dcb0b6c91b2609256486c7ecbd7bfe2d55de787b7d126c
6
+ metadata.gz: 445611418579d55d82acd07564e8a4673579a7f0c20f43fd3050556c768f71e5e19378e61af77ec7c0fb2ef2ccebca90d16783df06ba4c5beccd1d6f54afb098
7
+ data.tar.gz: f3c152e57bfbdc753b970a8c1542a288e35b97f26e4aa01e10afe7f957901be3d63f1236f0f23e2d62ca9020e4d64afd13b83f244d5ed58a99ce2c75d16265d7
@@ -1,3 +1,17 @@
1
+ ### 0.4.2 - (2016-07-27)
2
+
3
+ * bug fixes
4
+ * Respect `ActiveSupport::TimeWithZone` objects for casting time objects (by
5
+ @tconst)
6
+
7
+ ### 0.4.1 - (2016-07-04)
8
+
9
+ * enhancements
10
+ * Support `Montrose.every(:second)`
11
+
12
+ * bug fixes
13
+ * Ensure `ActiveSupport::Duration` parts are used; fixes 'every 30 days' bug
14
+
1
15
  ### 0.4.0 - (2016-04-20)
2
16
 
3
17
  * enhancements
data/README.md CHANGED
@@ -227,7 +227,7 @@ Montrose.every(:month, day: { monday: [-2] }, total: 6)
227
227
  Montrose.every(:month, mday: [-3])
228
228
 
229
229
  # monthly on the 2nd and 15th of the month for 10 occurrences
230
- Montrose.every(:month, on: [2, 15], total: 10)
230
+ Montrose.every(:month, mday: [2, 15], total: 10)
231
231
 
232
232
  # monthly on the first and last day of the month for 10 occurrences
233
233
  Montrose.monthly(mday: [1, -1], total: 10)
@@ -2,7 +2,7 @@ module Montrose
2
2
  class Frequency
3
3
  class Weekly < Frequency
4
4
  def include?(time)
5
- weeks_since_start(time) % @interval == 0
5
+ (weeks_since_start(time) % @interval).zero?
6
6
  end
7
7
 
8
8
  private
@@ -15,6 +15,8 @@ module Montrose
15
15
 
16
16
  if time.is_a?(String)
17
17
  parse_time(time)
18
+ elsif time.is_a?(ActiveSupport::TimeWithZone)
19
+ time
18
20
  elsif time.respond_to?(:to_time)
19
21
  time.to_time
20
22
  else
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Montrose
3
- VERSION = "0.4.1".freeze
3
+ VERSION = "0.4.2".freeze
4
4
  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.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ross Kaffenberger
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-04 00:00:00.000000000 Z
11
+ date: 2016-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport