mongoid_occurrences 1.0.1 → 1.0.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
  SHA256:
3
- metadata.gz: c619b3bd83ad63138e51380cb82930144d2ae5ba273df95706fd8cdd6281c859
4
- data.tar.gz: 9f6b20a19b1c3682db5be569f1075d0c40caf960564343ef6121dd1f5a168f55
3
+ metadata.gz: f419f750707b021c4d1438ff4b0c8de9b27bc8c1ee56d60893fc187cdfe5ae56
4
+ data.tar.gz: bfeed583316b02275fbfa05c664d8be48f871886861ca010c4e1681fb2a0839d
5
5
  SHA512:
6
- metadata.gz: d8df2f048313e32a592d0eb81d41969119d3f848b36be7c670fb0a063483103eddf12b168db4e177b4ac507e30679f8a9f90ff04782d6ce07c3aaed0c02b55b6
7
- data.tar.gz: 1d157cc26f4b63c722a6fb69623de09c35744772143e6b8d80f7205f34b6ce8bb27431af1237cae273bc10aac73578c44cb2810df404902fe2a09f890cc2790a
6
+ metadata.gz: 167e0701c47a66589978348d347e8de45b98492ddafd382f966b0be9764d538a65a236131fe46ba42b8ec2fbaa83adf3d2a46995f5dca4ff31995c5c91aa9326
7
+ data.tar.gz: 26b547b07d03b6bc3351b76418c73a46dd345c3b7eb40031fc91127953a07353da59455b38d383b3d81d1961a2889578f7288de9232a0b98ab1fdd05a36f5298
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.0.2
4
+
5
+ * `DailyOccurrence` has now `oid (occurrence_id)` referring to the original occurrence
6
+
3
7
  ## 1.0.1
4
8
 
5
9
  * fix spelling of `*occurrences_cache_key*` related methods
data/README.md CHANGED
@@ -122,6 +122,10 @@ class EventParent
122
122
  scope :occurs_from, ->(date_time) { elem_match(events: Event.occurs_from(date_time).selector) }
123
123
  scope :occurs_on, ->(date_time) { elem_match(events: Event.occurs_on(date_time).selector) }
124
124
  scope :occurs_until, ->(date_time) { elem_match(events: Event.occurs_until(date_time).selector) }
125
+
126
+ include MongoidOccurrences::HasFieldsFromAggregation
127
+
128
+ delegate :daily_occurrences, to: :event
125
129
  end
126
130
  ```
127
131
 
@@ -10,6 +10,8 @@ module MongoidOccurrences
10
10
  field :ds, as: :dtstart, type: DateTime
11
11
  field :de, as: :dtend, type: DateTime
12
12
 
13
+ field :ocid, as: :occurrence_id, type: BSON::ObjectId
14
+
13
15
  validates :dtstart, presence: true
14
16
  validates :dtend, presence: true
15
17
 
@@ -18,6 +18,7 @@ module MongoidOccurrences
18
18
  MongoidOccurrences::DailyOccurrence.new(
19
19
  dtstart: occurrence.start_time.change(hour: dtstart.hour, min: dtstart.minute),
20
20
  dtend: occurrence.end_time.change(hour: dtend.hour, min: dtend.minute),
21
+ occurrence_id: id,
21
22
  operator: operator
22
23
  )
23
24
  end
@@ -37,6 +38,7 @@ module MongoidOccurrences
37
38
  MongoidOccurrences::DailyOccurrence.new(
38
39
  dtstart: occurence_dtstart,
39
40
  dtend: occurence_dtend,
41
+ occurrence_id: id,
40
42
  operator: operator
41
43
  )
42
44
  end
@@ -1,3 +1,3 @@
1
1
  module MongoidOccurrences
2
- VERSION = '1.0.1'.freeze
2
+ VERSION = '1.0.2'.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.0.1
4
+ version: 1.0.2
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: 2019-01-15 00:00:00.000000000 Z
12
+ date: 2019-01-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ice_cube