valkyrie-sequel 3.0.0.pre.beta.1 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b6d42b77cece523b4eeacf7f4853bc20e0fac7f5b8df24e742ae4ef1e6b7df12
4
- data.tar.gz: 6edac9cf3f494640dfe74e062dd3760d9f0386d8d3b60dcf2ea7f01190e3fc3d
3
+ metadata.gz: 496f6b385edcc29f60fee0e1aecd6c932e2f320b409485c42bac7b7091099c0d
4
+ data.tar.gz: 6f1140aa0b3625ce987748a94a478f0f4df8e1e3ef4be34ed0ef88bd36cc28dc
5
5
  SHA512:
6
- metadata.gz: 53f9dc78cec19cb0eaac3e7001eaf2f8d2cf8c29e3ec10795fa0f1b69162ba34d8a237582c9f7345022fc0d82d422eac490be84eb8596f39941b2dffad2af812
7
- data.tar.gz: 51faaaad25361de2f20885dafa49307a56bb75bd91a2a907607ae4228bef125764acf7d6ef162a34c2fbc50270ff3a6e5a5b1922074c33030a0415a2b4e97d87
6
+ metadata.gz: 3c36213fca14199daea5605a8921757ac03e2255d65b6fd0a14c0cfab35a7ef6e84a20f644e5c09484e119ddc6266c29bd69d97c2abca6f90d90c5b16b483b08
7
+ data.tar.gz: 1a6eaf749712845d9af4a412fc9c07a7530b93d699efdbb9a10c4f6466bbf2451518de0475f959fcbdb69f270ef590e7ca19592db16533881d4d38140c901e80
data/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # changelog
2
+
3
+ ## 3.0.0
4
+
5
+ https://github.com/samvera-labs/valkyrie-sequel/compare/v2.2.1...main
6
+
7
+ - support Valkyrie 3.x (@tpendragon, @no-reply)
8
+ - support `resource_class_resolver` in `resource_klass` (@marrus-sh, [#48](https://github.com/samvera-labs/valkyrie-sequel/pull/48))
@@ -41,6 +41,7 @@ module Valkyrie::Sequel
41
41
  grouped_resources = resources.group_by(&:optimistic_locking_enabled?)
42
42
  locked_resources = grouped_resources[true] || []
43
43
  unlocked_resources = grouped_resources[false] || []
44
+
44
45
  CompositePersister.new(
45
46
  [
46
47
  SaveAllPersister.new(resources: locked_resources, relation: locking_relation, resource_factory: resource_factory),
@@ -98,6 +99,7 @@ module Valkyrie::Sequel
98
99
  output
99
100
  end
100
101
  end
102
+
101
103
  class CompositePersister
102
104
  attr_reader :persisters
103
105
  def initialize(persisters)
@@ -137,7 +139,7 @@ module Valkyrie::Sequel
137
139
 
138
140
  def create(resource:, attributes:)
139
141
  attributes[:lock_version] = 0 if resource.optimistic_locking_enabled? && resources.columns.include?(:lock_version)
140
- Array(resources.returning.insert(attributes)).first
142
+ Array(resources.returning.insert(attributes)).first # rubocop:disable Rails/SkipsModelValidations
141
143
  end
142
144
 
143
145
  def update(resource:, attributes:)
@@ -38,7 +38,7 @@ module Valkyrie::Sequel
38
38
  # Retrieve the Class used to construct the Valkyrie Resource
39
39
  # @return [Class]
40
40
  def resource_klass
41
- internal_resource.constantize
41
+ Valkyrie.config.resource_class_resolver.call(internal_resource)
42
42
  end
43
43
 
44
44
  # Access the String for the Valkyrie Resource type within the attributes
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Valkyrie
3
3
  module Sequel
4
- VERSION = "3.0.0-beta.1"
4
+ VERSION = "3.0.0"
5
5
  end
6
6
  end
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
 
23
23
  spec.add_dependency "sequel", "~> 5.0"
24
24
  spec.add_dependency "sequel_pg", "~> 1.0"
25
- spec.add_dependency "valkyrie", ">= 3.0.0-beta.1"
25
+ spec.add_dependency "valkyrie", "~> 3.0"
26
26
  spec.add_dependency "oj", "~> 3.0"
27
27
  spec.add_development_dependency "bundler", "~> 2.0"
28
28
  spec.add_development_dependency "rake"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: valkyrie-sequel
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.pre.beta.1
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trey Pendragon
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-26 00:00:00.000000000 Z
11
+ date: 2023-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sequel
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: valkyrie
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 3.0.0.pre.beta.1
47
+ version: '3.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 3.0.0.pre.beta.1
54
+ version: '3.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: oj
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -176,6 +176,7 @@ files:
176
176
  - ".rspec"
177
177
  - ".rubocop.yml"
178
178
  - ".travis.yml"
179
+ - CHANGELOG.md
179
180
  - Gemfile
180
181
  - LICENSE
181
182
  - README.md
@@ -197,7 +198,7 @@ files:
197
198
  homepage: https://github.com/samvera-labs/valkyrie-sequel
198
199
  licenses: []
199
200
  metadata: {}
200
- post_install_message:
201
+ post_install_message:
201
202
  rdoc_options: []
202
203
  require_paths:
203
204
  - lib
@@ -208,12 +209,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
208
209
  version: '0'
209
210
  required_rubygems_version: !ruby/object:Gem::Requirement
210
211
  requirements:
211
- - - ">"
212
+ - - ">="
212
213
  - !ruby/object:Gem::Version
213
- version: 1.3.1
214
+ version: '0'
214
215
  requirements: []
215
- rubygems_version: 3.0.3
216
- signing_key:
216
+ rubygems_version: 3.1.6
217
+ signing_key:
217
218
  specification_version: 4
218
219
  summary: Valkyrie::MetadataAdapter for Postgres using Sequel.
219
220
  test_files: []