couch_potato 1.18.0 → 1.19.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.
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.18.0
4
+ version: 1.19.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: 2025-01-15 00:00:00.000000000 Z
11
+ date: 2025-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -159,7 +159,6 @@ files:
159
159
  - lib/couch_potato/view/custom_view_spec.rb
160
160
  - lib/couch_potato/view/custom_views.rb
161
161
  - lib/couch_potato/view/flex_view_spec.rb
162
- - lib/couch_potato/view/lists.rb
163
162
  - lib/couch_potato/view/model_view_spec.rb
164
163
  - lib/couch_potato/view/properties_view_spec.rb
165
164
  - lib/couch_potato/view/raw_view_spec.rb
@@ -179,6 +178,7 @@ files:
179
178
  - spec/railtie_spec.rb
180
179
  - spec/reload_spec.rb
181
180
  - spec/revisions_spec.rb
181
+ - spec/single_design_document_spec.rb
182
182
  - spec/spec.opts
183
183
  - spec/spec_helper.rb
184
184
  - spec/unit/active_model_compliance_spec.rb
@@ -197,7 +197,6 @@ files:
197
197
  - spec/unit/forbidden_attributes_protection_spec.rb
198
198
  - spec/unit/initialize_spec.rb
199
199
  - spec/unit/json_spec.rb
200
- - spec/unit/lists_spec.rb
201
200
  - spec/unit/model_view_spec_spec.rb
202
201
  - spec/unit/persistence_spec.rb
203
202
  - spec/unit/properties_view_spec_spec.rb
@@ -248,6 +247,7 @@ test_files:
248
247
  - spec/railtie_spec.rb
249
248
  - spec/reload_spec.rb
250
249
  - spec/revisions_spec.rb
250
+ - spec/single_design_document_spec.rb
251
251
  - spec/spec.opts
252
252
  - spec/spec_helper.rb
253
253
  - spec/unit/active_model_compliance_spec.rb
@@ -266,7 +266,6 @@ test_files:
266
266
  - spec/unit/forbidden_attributes_protection_spec.rb
267
267
  - spec/unit/initialize_spec.rb
268
268
  - spec/unit/json_spec.rb
269
- - spec/unit/lists_spec.rb
270
269
  - spec/unit/model_view_spec_spec.rb
271
270
  - spec/unit/persistence_spec.rb
272
271
  - spec/unit/properties_view_spec_spec.rb
@@ -1,23 +0,0 @@
1
- module CouchPotato
2
- module View
3
- module Lists
4
- def self.included(base)
5
- base.send :extend, ClassMethods
6
- end
7
-
8
- module ClassMethods
9
- def list(name, function)
10
- lists[name] = function
11
- end
12
-
13
- def lists(name = nil)
14
- if name.nil?
15
- @lists ||= {}
16
- else
17
- (@lists && @lists[name]) || (superclass.lists(name) if superclass.respond_to?(:lists))
18
- end
19
- end
20
- end
21
- end
22
- end
23
- end
@@ -1,20 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe CouchPotato::View::Lists, '.list' do
4
- it 'should make the list function available via .lists' do
5
- clazz = Class.new
6
- clazz.send :include, CouchPotato::View::Lists
7
- clazz.list 'my_list', '<list_code>'
8
-
9
- expect(clazz.lists('my_list')).to eq('<list_code>')
10
- end
11
-
12
- it 'should make the list available to subclasses' do
13
- clazz = Class.new
14
- clazz.send :include, CouchPotato::View::Lists
15
- clazz.list 'my_list', '<list_code>'
16
- sub_clazz = Class.new clazz
17
-
18
- expect(sub_clazz.lists('my_list')).to eq('<list_code>')
19
- end
20
- end