mongoid_occurrences 1.0.0 → 1.0.1

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: b3eb3d953d69a2671b169b5871a250971b33c948b5d0d9d6a9ada698eb7bfed7
4
- data.tar.gz: 0317f7a065c2dabbed6a4febd03e5920850d3b554044d3e2cc04fdf406c69987
3
+ metadata.gz: c619b3bd83ad63138e51380cb82930144d2ae5ba273df95706fd8cdd6281c859
4
+ data.tar.gz: 9f6b20a19b1c3682db5be569f1075d0c40caf960564343ef6121dd1f5a168f55
5
5
  SHA512:
6
- metadata.gz: 506b446a5afc98f7308d89b4e64fb756c3ce3264243a6620daebd5f1e92d2df85c3d9ae3de0255529d623ebe7340be7e99fbffbe197d635299545015daaec0a5
7
- data.tar.gz: 61ee2fe086a87f5e7f57e4edf7f34032a9fa62e75f94fd642b78201ded701870aab0c4d38590f384ab6a0eecaed8befff2f0e6f84bbabd7f3cb81b5d4af5c0f4
6
+ metadata.gz: d8df2f048313e32a592d0eb81d41969119d3f848b36be7c670fb0a063483103eddf12b168db4e177b4ac507e30679f8a9f90ff04782d6ce07c3aaed0c02b55b6
7
+ data.tar.gz: 1d157cc26f4b63c722a6fb69623de09c35744772143e6b8d80f7205f34b6ce8bb27431af1237cae273bc10aac73578c44cb2810df404902fe2a09f890cc2790a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.0.1
4
+
5
+ * fix spelling of `*occurrences_cache_key*` related methods
6
+
3
7
  ## 1.0.0
4
8
 
5
9
  * [PR#4](https://github.com/tomasc/mongoid_occurrences/pull/4) Refactor to replace views with aggregations
@@ -6,7 +6,7 @@ module MongoidOccurrences
6
6
 
7
7
  module ClassMethods
8
8
  def embeds_many_occurrences(options = {})
9
- field :_previous_occurences_cache_key, type: String
9
+ field :_previous_occurrences_cache_key, type: String
10
10
 
11
11
  embeds_many :occurrences, class_name: options.fetch(:class_name)
12
12
  accepts_nested_attributes_for :occurrences, allow_destroy: true, reject_if: :all_blank
@@ -14,7 +14,7 @@ module MongoidOccurrences
14
14
  embeds_many :daily_occurrences, class_name: 'MongoidOccurrences::DailyOccurrence', order: :dtstart.asc
15
15
 
16
16
  after_validation :assign_occurrences_cache_key!
17
- after_validation :assign_daily_occurrences!, if: :_previous_occurences_cache_key_changed?
17
+ after_validation :assign_daily_occurrences!, if: :_previous_occurrences_cache_key_changed?
18
18
 
19
19
  scope :occurs_between, ->(dtstart, dtend) { elem_match(daily_occurrences: DailyOccurrence.occurs_between(dtstart, dtend).selector) }
20
20
  scope :occurs_from, ->(dtstart) { elem_match(daily_occurrences: DailyOccurrence.occurs_from(dtstart).selector) }
@@ -23,7 +23,7 @@ module MongoidOccurrences
23
23
  end
24
24
  end
25
25
 
26
- def occurences_cache_key
26
+ def occurrences_cache_key
27
27
  last_timestamp = occurrences.unscoped.order(updated_at: :desc).limit(1).pluck(:updated_at).first
28
28
  "#{occurrences.unscoped.size}-#{last_timestamp.to_i}"
29
29
  end
@@ -45,7 +45,7 @@ module MongoidOccurrences
45
45
  private
46
46
 
47
47
  def assign_occurrences_cache_key!
48
- self._previous_occurences_cache_key = occurences_cache_key
48
+ self._previous_occurrences_cache_key = occurrences_cache_key
49
49
  end
50
50
  end
51
51
  end
@@ -1,3 +1,3 @@
1
1
  module MongoidOccurrences
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.0.1'.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.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Celizna