couch_potato 1.20.0 → 1.21.0

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
  SHA256:
3
- metadata.gz: 3550e8fe5b60fb064f2960a62313ee43e41e28c980c7c7d395d6c252fdb4fa20
4
- data.tar.gz: 4aff0328b8e0e2162793c8b7f81643a5a3a43b703a64b00c57f044c12aac0ab0
3
+ metadata.gz: 0460baa84b2605f60a5a954e246a9c839171b0f125e5bca929abf9e40a736bad
4
+ data.tar.gz: b5ce4755ab00575bb348bdabedc678d9aad45a42469e202ce991e7f55d7aedd4
5
5
  SHA512:
6
- metadata.gz: 676096f6f62795015a3bb26b6fe27689eda09aacb59f05c1f181a2922bc968fd762a9571ef02085425071212cf3ee1c688d36caaf06ee68dafe134d6bf9c04ae
7
- data.tar.gz: 49582697b2508b97fc73a9a1a0590e6882f138577ea5ab6492746a61ab654b74170830cf9c61b4de1b36f002bd344b0b193f903dec6dc78e10f6a3f5d2c7c9d1
6
+ metadata.gz: c8c46fa595c3dbfb5d8f6d8206c3f250c2dd955f1df26ec0865abdb60c3f7294474f9579328a57c4d03db33f1050bb893024847e799715010abdf029aebcf357
7
+ data.tar.gz: 4aea25697ff53ef8cffa72a3ca41c864abe1d1e62d539c634a2299679d86311872ad4efce1c14cf356b04131082ec50b8fc2bc0f1700a80e1a6bdc39cf0e7d28
@@ -16,13 +16,16 @@ jobs:
16
16
  strategy:
17
17
  fail-fast: false
18
18
  matrix:
19
- ruby: ["3.2", "3.3", "jruby"]
19
+ ruby: ["3.2", "3.3", "3.4", "jruby"]
20
20
  gemfile:
21
21
  - "active_support_7_2"
22
22
  - "active_support_8_0"
23
+ - "active_support_8_1"
23
24
  exclude:
24
25
  - ruby: "jruby"
25
26
  gemfile: "active_support_8_0"
27
+ - ruby: "jruby"
28
+ gemfile: "active_support_8_1"
26
29
  steps:
27
30
  - uses: actions/checkout@v4
28
31
  - name: Set up CouchDB
data/CHANGES.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## Changes
2
2
 
3
+ # 1.21.0
4
+
5
+ - add railties 8.1, Ruby 3.4 to CI
6
+
7
+ # 1.20.1
8
+
9
+ - fix `database.save!` did not use passed block
10
+
3
11
  # 1.20.0
4
12
 
5
13
  - add passing validation context to save methods
data/couch_potato.gemspec CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
13
13
  s.version = CouchPotato::VERSION
14
14
  s.platform = Gem::Platform::RUBY
15
15
 
16
- s.add_dependency 'activemodel', ['>= 7.2', '< 8.1']
16
+ s.add_dependency 'activemodel', ['>= 7.2', '< 8.2']
17
17
  s.add_dependency 'couchrest', '~>2.0.0'
18
18
  s.add_dependency 'json', '~> 2.3'
19
19
 
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'railties', '~>8.1.2'
4
+ gem 'activemodel'
5
+ gem 'execjs'
6
+
7
+ gemspec name: 'couch_potato', path: '..'
@@ -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
 
@@ -1,4 +1,4 @@
1
1
  module CouchPotato
2
- VERSION = '1.20.0'.freeze
2
+ VERSION = '1.21.0'.freeze
3
3
  RSPEC_VERSION = '4.2.0'.freeze
4
4
  end
@@ -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.0
4
+ version: 1.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Lang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-12-09 00:00:00.000000000 Z
11
+ date: 2026-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '7.2'
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '8.1'
22
+ version: '8.2'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '7.2'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '8.1'
32
+ version: '8.2'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: couchrest
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -132,6 +132,7 @@ files:
132
132
  - couch_potato.gemspec
133
133
  - gemfiles/active_support_7_2
134
134
  - gemfiles/active_support_8_0
135
+ - gemfiles/active_support_8_1
135
136
  - init.rb
136
137
  - lib/core_ext/date.rb
137
138
  - lib/core_ext/time.rb