periodic_records 0.3.0 → 0.3.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ebc5b792de6c66cc8f858666775da5acbbbf67f2
4
- data.tar.gz: 5f60cdab069337f62b3af5516035845f77aee527
3
+ metadata.gz: ae65d46b1c1fd12132918c0d227aab03751ecc0c
4
+ data.tar.gz: ef78b4a608ea9a0edfa3f88d395bc3cce285f201
5
5
  SHA512:
6
- metadata.gz: 94286105001f6fa005c6f40d162fb5d5d6058069eb1a65c9983d77ed307ad6246bf1c511e5dc7109508431c925cbd38b006776025ceae40928362b77295ce5a4
7
- data.tar.gz: 9b8072aacca8ed7e270662715b23d5dbdd19d043232a79d52e30922aa4eae30d2d7ac260d7b885e43e1c350d07396a0e274dc58c584abdb183888de29828ef83
6
+ metadata.gz: 42d890582bd6aa6ce911924cad8251dfce77ce779cf0673f370ab69de58c5d104a99e6cfae55caaa3c553b5528832c8e8eebc3304d6f7486edc03f8b2b46cd0f
7
+ data.tar.gz: 3fd57d7ce979172a948a1b9e32a04871f6bb58e677f3f777a831c3e8a365793f458b7fdca823c4723079ee29931e749289cc1b55d78dac85abca5dfaacd02570
data/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ## [0.3.1] - 2018-05-24
7
+
8
+ - Allow to add custom duplication logic #3
9
+
6
10
  ## [0.3.0] - 2018-01-16
7
11
 
8
12
  - Support gapless records #2
data/README.md CHANGED
@@ -203,7 +203,7 @@ You will not be able to adjust start at for the beginning entry (#1).
203
203
 
204
204
  You will not be able to adjust end at for the ending entry (#3).
205
205
 
206
- For more examples see [gapless_spec.rb](spec/periodic_records/gapless_spec.rb]).
206
+ For more examples see [gapless_spec.rb](spec/periodic_records/gapless_spec.rb).
207
207
 
208
208
  ## Development
209
209
 
@@ -72,6 +72,10 @@ module PeriodicRecords
72
72
  new_record?
73
73
  end
74
74
 
75
+ def periodic_dup
76
+ dup
77
+ end
78
+
75
79
  private
76
80
 
77
81
  def set_default_period
@@ -84,7 +88,7 @@ module PeriodicRecords
84
88
  end
85
89
 
86
90
  def split_overlapping_record(overlapping_record)
87
- overlapping_record_end = overlapping_record.dup
91
+ overlapping_record_end = overlapping_record.periodic_dup
88
92
  overlapping_record_end.start_at = end_at + 1.day
89
93
  overlapping_record_end.end_at = overlapping_record.end_at
90
94
 
@@ -1,3 +1,3 @@
1
1
  module PeriodicRecords
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: periodic_records
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edgars Beigarts
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2018-01-16 00:00:00.000000000 Z
12
+ date: 2018-05-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord