periodic_records 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -1
- data/lib/periodic_records/model.rb +5 -1
- data/lib/periodic_records/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae65d46b1c1fd12132918c0d227aab03751ecc0c
|
4
|
+
data.tar.gz: ef78b4a608ea9a0edfa3f88d395bc3cce285f201
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
|
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.
|
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-
|
12
|
+
date: 2018-05-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|