shiftable 0.6.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -1
- data/README.md +5 -5
- data/lib/shiftable/shifting.rb +1 -1
- data/lib/shiftable/shifting_record.rb +1 -1
- data/lib/shiftable/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5307ad9f6d83499df06dcd5b57745dfeed1522f5701708018c61e5b3a3b6bfba
|
4
|
+
data.tar.gz: 5452233e37e38c732340e1f7f825da3c020799b2600b5b692087af44969c2c73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7ed429d81143625afb5717143a877b8de5da2729be8519ed87246353051aa26a8f94f9d33765a9b158b7fc6fa21ed35c2017cadf84e26b669c399d61992f627
|
7
|
+
data.tar.gz: ba888b498d8da4a6070f29346426b0ea05a23f959ff208400b5c1067394d5d7301850f99dce3cf0a90b712fd57b6dc397d5b871f7d81723901fd0b60d270329f
|
data/CHANGELOG.md
CHANGED
@@ -12,6 +12,11 @@
|
|
12
12
|
### Removed
|
13
13
|
|
14
14
|
|
15
|
+
## [0.7.0] - 2021-11-15
|
16
|
+
### Changed
|
17
|
+
|
18
|
+
- Make the `Shifting` Relation available to the `each` wrapper, as a block parameter
|
19
|
+
|
15
20
|
## [0.6.1] - 2021-11-14
|
16
21
|
### Added
|
17
22
|
|
@@ -91,4 +96,16 @@
|
|
91
96
|
|
92
97
|
[0.3.0]: https://github.com/pboling/shiftable/releases/tag/v0.3.0
|
93
98
|
|
94
|
-
[0.4.0]: https://github.com/pboling/shiftable/releases/tag/v0.4.0
|
99
|
+
[0.4.0]: https://github.com/pboling/shiftable/releases/tag/v0.4.0
|
100
|
+
|
101
|
+
[0.4.1]: https://github.com/pboling/shiftable/releases/tag/v0.4.1
|
102
|
+
|
103
|
+
[0.5.0]: https://github.com/pboling/shiftable/releases/tag/v0.5.0
|
104
|
+
|
105
|
+
[0.5.1]: https://github.com/pboling/shiftable/releases/tag/v0.5.1
|
106
|
+
|
107
|
+
[0.6.0]: https://github.com/pboling/shiftable/releases/tag/v0.6.0
|
108
|
+
|
109
|
+
[0.6.1]: https://github.com/pboling/shiftable/releases/tag/v0.6.1
|
110
|
+
|
111
|
+
[0.7.0]: https://github.com/pboling/shiftable/releases/tag/v0.7.0
|
data/README.md
CHANGED
@@ -205,9 +205,9 @@ class Spaceship < ActiveRecord::Base
|
|
205
205
|
shifting_rel.each { |spaceship| spaceship.federation_changes += 1 }
|
206
206
|
},
|
207
207
|
wrapper: {
|
208
|
-
each: lambda { |record, &block|
|
208
|
+
each: lambda { |rel, record, &block|
|
209
209
|
tresult = record.transaction_wrapper(outside_rescued_errors: ActiveRecord::RecordNotUnique) do
|
210
|
-
puts "melon #{record.name} honey"
|
210
|
+
puts "melon #{record.name} honey #{rel.count}"
|
211
211
|
block.call # does the actual saving!
|
212
212
|
end
|
213
213
|
# NOTE: The value returned by the wrapper will also be returned by the call to `shift_cx`.
|
@@ -260,9 +260,9 @@ class Spaceship < ActiveRecord::Base
|
|
260
260
|
shifting_rel.each { |spaceship| spaceship.federation_changes += 1 }
|
261
261
|
},
|
262
262
|
wrapper: {
|
263
|
-
each: lambda { |record, &block|
|
263
|
+
each: lambda { |rel, record, &block|
|
264
264
|
tresult = record.transaction_wrapper(outside_rescued_errors: ActiveRecord::RecordNotUnique) do
|
265
|
-
puts "melon #{record.name} honey"
|
265
|
+
puts "melon #{record.name} honey #{rel.count}"
|
266
266
|
block.call # does the actual saving!
|
267
267
|
end
|
268
268
|
tresult.success?
|
@@ -373,7 +373,7 @@ the [Pessimistic Version Constraint][pvc] with two digits of precision.
|
|
373
373
|
For example:
|
374
374
|
|
375
375
|
```ruby
|
376
|
-
spec.add_dependency "shiftable", "~> 0.
|
376
|
+
spec.add_dependency "shiftable", "~> 0.7"
|
377
377
|
```
|
378
378
|
|
379
379
|
## Contact
|
data/lib/shiftable/shifting.rb
CHANGED
data/lib/shiftable/version.rb
CHANGED