couch_potato 1.20.0 → 1.20.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 +4 -4
- data/CHANGES.md +4 -0
- data/lib/couch_potato/database.rb +2 -2
- data/lib/couch_potato/version.rb +1 -1
- data/spec/unit/database_spec.rb +8 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 93355ba5d43a15b8e24563f5c31d900fc1487fd54713bff4267df3669f277e3e
|
|
4
|
+
data.tar.gz: b154be56a609b371d108198f3c6852a07a736e38a6b912655a846c47c4a15406
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 79da5aeef49e67beeb45a130dc4293166538929dc4391e8f6fc5c77c81014ce0e91391bf53008d5853c048bd1e611d576cfdb0283385055fae051e338edced35
|
|
7
|
+
data.tar.gz: efef4524ef4f1027d6d586a0b0739577bc9c21bb7de20f46022e3633911b6e0621f4413a529dbc6eb9d0e6fc7ed40d7e776ba1d4bcc639bf828c7cd2e4c75d20
|
data/CHANGES.md
CHANGED
|
@@ -127,8 +127,8 @@ module CouchPotato
|
|
|
127
127
|
alias save save_document
|
|
128
128
|
|
|
129
129
|
# saves a document, raises a CouchPotato::Database::ValidationsFailedError on failure
|
|
130
|
-
def save_document!(document, options = {})
|
|
131
|
-
save_document(document, options) || raise(ValidationsFailedError, document.errors.full_messages)
|
|
130
|
+
def save_document!(document, options = {}, &block)
|
|
131
|
+
save_document(document, options, &block) || raise(ValidationsFailedError, document.errors.full_messages)
|
|
132
132
|
end
|
|
133
133
|
alias save! save_document!
|
|
134
134
|
|
data/lib/couch_potato/version.rb
CHANGED
data/spec/unit/database_spec.rb
CHANGED
|
@@ -366,6 +366,14 @@ describe CouchPotato::Database, 'save_document' do
|
|
|
366
366
|
end
|
|
367
367
|
end
|
|
368
368
|
|
|
369
|
+
describe CouchPotato::Database, 'save_document!' do
|
|
370
|
+
it 'calls the block if provided' do
|
|
371
|
+
doc = double('doc').as_null_object
|
|
372
|
+
|
|
373
|
+
expect {|b| CouchPotato.database.save_document!(doc, &b)}.to yield_with_args(doc)
|
|
374
|
+
end
|
|
375
|
+
end
|
|
376
|
+
|
|
369
377
|
describe CouchPotato::Database, 'first' do
|
|
370
378
|
before(:each) do
|
|
371
379
|
@couchrest_db = double('couchrest db').as_null_object
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: couch_potato
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.20.
|
|
4
|
+
version: 1.20.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alexander Lang
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-01-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activemodel
|