mongoid_occurrences 1.1.5 → 1.1.6

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: 8e4691e967789e20737620c8ea0f52adbfe1048b75519cd40f421a56418d5009
4
- data.tar.gz: ef6ada74ee76687c7adc4b70c2fffb3916d1a61be3dfbf0c94cc39f64abef192
3
+ metadata.gz: e51696c5dcf7721397110eaeeb13c6ec67f813fb3c64b5f2a3a0c61db298d8d1
4
+ data.tar.gz: c719c18e3b42111f0e1ebd2b76698d10599e2fee667a0433df831d479a195f5e
5
5
  SHA512:
6
- metadata.gz: b694b25f6f8f1c580a931b36492443c00167f66a781bf96c99da78f610b06724ac853db4404659422b1d14cbc8d6e92a6e39daf29756c91c250c4d9969568422
7
- data.tar.gz: 211def0bc924d36485ede7146e10f645d632d6aff4c5714c21ce799651918b0a92c31e89fd3327a47ed9799865358e4fceab0f7403a7a240e4dc6e2b6b7b85cb
6
+ metadata.gz: ef4aba25e583bffe7ae3c136ce47ee33cb951c74136334be286dd65d754689fc2d9d8008019acace169421979950cc086b067d050674686f9a05c32cbb271630
7
+ data.tar.gz: 4cd2f77f5acbaf4aaac1db50833ca9d98d1f656ef388f0c5d1a065031198105f3ccdbf402314615af79313c6b9c8681e05aa9c45eb683742e2d93ebebe9d6101
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.1.6
4
+
5
+ - FIX: `dtstart` / `dtend` blowing up when `daily_occurrences` are nil
6
+
3
7
  ## 1.1.5
4
8
 
5
9
  - FIX: wiping `#daily_occurrences` when removing all `#occurrences`
@@ -1,6 +1,7 @@
1
1
  module MongoidOccurrences
2
2
  module HasFieldsFromAggregation
3
3
  def dtstart
4
+ return if daily_occurrences.blank?
4
5
  @dtstart ||= DateTime.demongoize(
5
6
  self['_dtstart'] ||
6
7
  daily_occurrences.unscoped.order(dtstart: :asc).limit(1).pluck(:dtstart).first
@@ -8,6 +9,7 @@ module MongoidOccurrences
8
9
  end
9
10
 
10
11
  def dtend
12
+ return if daily_occurrences.blank?
11
13
  @dtend ||= DateTime.demongoize(
12
14
  self['_dtend'] ||
13
15
  daily_occurrences.unscoped.order(dtend: :desc).limit(1).pluck(:dtend).first
@@ -1,3 +1,3 @@
1
1
  module MongoidOccurrences
2
- VERSION = '1.1.5'.freeze
2
+ VERSION = '1.1.6'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid_occurrences
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.5
4
+ version: 1.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Celizna
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-02-21 00:00:00.000000000 Z
12
+ date: 2020-03-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ice_cube