diff --git a/.circleci/config.yml b/.circleci/config.yml index 79bca201..73343ddf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -95,14 +95,38 @@ workflows: version: 2 build: jobs: + - build: + gemfile: "gemfiles/activerecord_7_0.gemfile" + ruby: 3.2.0 + name: "Ruby3-2_rails7-0" - build: gemfile: "gemfiles/activerecord_6_0.gemfile" - ruby: 2.7.7 - name: "Ruby2-7_Rails6-0" + ruby: 3.2.0 + name: "Ruby3-2_Rails6-0" + - build: + gemfile: "gemfiles/activerecord_7_0.gemfile" + ruby: 3.1.3 + name: "Ruby3-1_rails7-0" + - build: + gemfile: "gemfiles/activerecord_6_0.gemfile" + ruby: 3.1.3 + name: "Ruby3-1_Rails6-0" + - build: + gemfile: "gemfiles/activerecord_7_0.gemfile" + ruby: 3.0.5 + name: "Ruby3-0_rails7-0" + - build: + gemfile: "gemfiles/activerecord_6_0.gemfile" + ruby: 3.0.5 + name: "Ruby3-0_Rails6-0" - build: gemfile: "gemfiles/activerecord_7_0.gemfile" ruby: 2.7.7 name: "Ruby2-7_rails7-0" + - build: + gemfile: "gemfiles/activerecord_6_0.gemfile" + ruby: 2.7.7 + name: "Ruby2-7_Rails6-0" - build: gemfile: "gemfiles/faraday_1.gemfile" ruby: 2.7.7 @@ -113,7 +137,7 @@ workflows: name: "Faraday0" - build: gemfile: "gemfiles/activerecord_6_0.gemfile" - ruby: 2.6.5 + ruby: 2.6.10 name: "Ruby2-6_Rails6-0" - build: gemfile: "gemfiles/activerecord_5_2.gemfile" @@ -121,8 +145,9 @@ workflows: name: "Ruby2-7_Rails5-2" - build: gemfile: "gemfiles/activerecord_5_2.gemfile" - ruby: 2.6.5 + ruby: 2.6.10 name: "Ruby2-6_Rails5-2" + nightly: triggers: - schedule: @@ -132,6 +157,34 @@ workflows: only: - master jobs: + - build: + gemfile: "gemfiles/activerecord_7_0.gemfile" + ruby: 3.2.0 + name: "Ruby3-2_rails7-0" + - build: + gemfile: "gemfiles/activerecord_6_0.gemfile" + ruby: 3.2.0 + name: "Ruby3-2_Rails6-0" + - build: + gemfile: "gemfiles/activerecord_7_0.gemfile" + ruby: 3.1.3 + name: "Ruby3-1_rails7-0" + - build: + gemfile: "gemfiles/activerecord_6_0.gemfile" + ruby: 3.1.3 + name: "Ruby3-1_Rails6-0" + - build: + gemfile: "gemfiles/activerecord_7_0.gemfile" + ruby: 3.0.5 + name: "Ruby3-0_rails7-0" + - build: + gemfile: "gemfiles/activerecord_6_0.gemfile" + ruby: 3.0.5 + name: "Ruby3-0_Rails6-0" + - build: + gemfile: "gemfiles/activerecord_7_0.gemfile" + ruby: 2.7.7 + name: "Ruby2-7_rails7-0" - build: gemfile: "gemfiles/activerecord_6_0.gemfile" ruby: 2.7.7 @@ -146,7 +199,7 @@ workflows: name: "Faraday0" - build: gemfile: "gemfiles/activerecord_6_0.gemfile" - ruby: 2.6.5 + ruby: 2.6.10 name: "Ruby2-6_Rails6-0" - build: gemfile: "gemfiles/activerecord_5_2.gemfile" @@ -154,5 +207,5 @@ workflows: name: "Ruby2-7_Rails5-2" - build: gemfile: "gemfiles/activerecord_5_2.gemfile" - ruby: 2.6.5 + ruby: 2.6.10 name: "Ruby2-6_Rails5-2" diff --git a/lib/valkyrie/persistence/fedora/ordered_list.rb b/lib/valkyrie/persistence/fedora/ordered_list.rb index 57371469..2af7ab7f 100644 --- a/lib/valkyrie/persistence/fedora/ordered_list.rb +++ b/lib/valkyrie/persistence/fedora/ordered_list.rb @@ -156,7 +156,7 @@ class HeadSentinel < Sentinel # @param parent [Valkyrie::Persistence::Fedora::OrderedList] # @param next_node [ListNode] # @param prev_node [ListNode] - def initialize(*args) + def initialize(*args, **kwargs) super @next ||= TailSentinel.new(parent, prev_node: self) end @@ -166,7 +166,7 @@ class TailSentinel < Sentinel # @param parent [Valkyrie::Persistence::Fedora::OrderedList] # @param next_node [ListNode] # @param prev_node [ListNode] - def initialize(*args) + def initialize(*args, **kwargs) super prev.next = self if prev&.next != self end diff --git a/spec/support/fedora_helper.rb b/spec/support/fedora_helper.rb index 9380ef45..11c7a4f2 100644 --- a/spec/support/fedora_helper.rb +++ b/spec/support/fedora_helper.rb @@ -37,7 +37,7 @@ def fedora_auth end def wipe_fedora!(base_path:, fedora_version: 4) - Valkyrie::Persistence::Fedora::MetadataAdapter.new(fedora_adapter_config(base_path: base_path, fedora_version: fedora_version)).persister.wipe! + Valkyrie::Persistence::Fedora::MetadataAdapter.new(**fedora_adapter_config(base_path: base_path, fedora_version: fedora_version)).persister.wipe! end end diff --git a/spec/valkyrie/persistence/fedora/metadata_adapter_spec.rb b/spec/valkyrie/persistence/fedora/metadata_adapter_spec.rb index 38998e55..e486469f 100644 --- a/spec/valkyrie/persistence/fedora/metadata_adapter_spec.rb +++ b/spec/valkyrie/persistence/fedora/metadata_adapter_spec.rb @@ -6,7 +6,7 @@ [4, 5, 6].each do |fedora_version| context "fedora #{fedora_version}" do let(:version) { fedora_version } - let(:adapter) { described_class.new(fedora_adapter_config(base_path: "test_fed", fedora_version: version)) } + let(:adapter) { described_class.new(**fedora_adapter_config(base_path: "test_fed", fedora_version: version)) } it_behaves_like "a Valkyrie::MetadataAdapter" describe "#schema" do @@ -15,7 +15,7 @@ end context "with a custom schema" do - let(:adapter) { described_class.new(fedora_adapter_config(base_path: "test_fed", schema: "custom-schema", fedora_version: version)) } + let(:adapter) { described_class.new(**fedora_adapter_config(base_path: "test_fed", schema: "custom-schema", fedora_version: version)) } specify { expect(adapter.schema).to eq("custom-schema") } end end diff --git a/spec/valkyrie/persistence/fedora/persister/model_converter_spec.rb b/spec/valkyrie/persistence/fedora/persister/model_converter_spec.rb index dd980a28..dfcd3166 100644 --- a/spec/valkyrie/persistence/fedora/persister/model_converter_spec.rb +++ b/spec/valkyrie/persistence/fedora/persister/model_converter_spec.rb @@ -7,7 +7,7 @@ let(:version) { fedora_version } let(:adapter) do Valkyrie::Persistence::Fedora::MetadataAdapter.new( - fedora_adapter_config(base_path: "test_fed", schema: schema, fedora_version: version) + **fedora_adapter_config(base_path: "test_fed", schema: schema, fedora_version: version) ) end @@ -27,7 +27,7 @@ class SampleResource < Valkyrie::Resource context "with the default schema" do let(:schema) { Valkyrie::Persistence::Fedora::PermissiveSchema.new } - let(:query) { converter.convert.graph.query(predicate: RDF::URI("http://example.com/predicate/title")) } + let(:query) { converter.convert.graph.query([nil, RDF::URI("http://example.com/predicate/title"), nil]) } it "persists to Fedora using a fake predicate" do expect(query.first.object.to_s).to eq("My Title") @@ -36,7 +36,7 @@ class SampleResource < Valkyrie::Resource context "with a defined schema" do let(:schema) { Valkyrie::Persistence::Fedora::PermissiveSchema.new(title: ::RDF::Vocab::DC.title) } - let(:query) { converter.convert.graph.query(predicate: ::RDF::Vocab::DC.title) } + let(:query) { converter.convert.graph.query([nil, ::RDF::Vocab::DC.title, nil]) } it "persists to Fedora using the defined predicate" do expect(query.first.object.to_s).to eq("My Title") diff --git a/spec/valkyrie/persistence/fedora/persister_spec.rb b/spec/valkyrie/persistence/fedora/persister_spec.rb index 05766d6e..c954c69e 100644 --- a/spec/valkyrie/persistence/fedora/persister_spec.rb +++ b/spec/valkyrie/persistence/fedora/persister_spec.rb @@ -9,7 +9,7 @@ let(:adapter) do Valkyrie::Persistence::Fedora::MetadataAdapter.new( - fedora_adapter_config( + **fedora_adapter_config( base_path: "test_fed", schema: Valkyrie::Persistence::Fedora::PermissiveSchema.new(title: RDF::URI("http://example.com/title")), fedora_version: version diff --git a/spec/valkyrie/persistence/fedora/query_service_spec.rb b/spec/valkyrie/persistence/fedora/query_service_spec.rb index 208ec5f4..2c25b62d 100644 --- a/spec/valkyrie/persistence/fedora/query_service_spec.rb +++ b/spec/valkyrie/persistence/fedora/query_service_spec.rb @@ -6,7 +6,7 @@ [4, 5, 6].each do |fedora_version| context "fedora #{fedora_version}" do let(:version) { fedora_version } - let(:adapter) { Valkyrie::Persistence::Fedora::MetadataAdapter.new(fedora_adapter_config(base_path: "test_fed", fedora_version: version)) } + let(:adapter) { Valkyrie::Persistence::Fedora::MetadataAdapter.new(**fedora_adapter_config(base_path: "test_fed", fedora_version: version)) } let(:persister) { adapter.persister } let(:query_service) { adapter.query_service } it_behaves_like "a Valkyrie query provider" diff --git a/spec/valkyrie/storage/fedora_spec.rb b/spec/valkyrie/storage/fedora_spec.rb index fe75f427..c3433b1a 100644 --- a/spec/valkyrie/storage/fedora_spec.rb +++ b/spec/valkyrie/storage/fedora_spec.rb @@ -17,7 +17,7 @@ class Valkyrie::Specs::FedoraCustomResource < Valkyrie::Resource wipe_fedora!(base_path: "test", fedora_version: 4) end - let(:storage_adapter) { described_class.new(fedora_adapter_config(base_path: 'test', fedora_version: 4)) } + let(:storage_adapter) { described_class.new(**fedora_adapter_config(base_path: 'test', fedora_version: 4)) } let(:file) { fixture_file_upload('files/example.tif', 'image/tiff') } it_behaves_like "a Valkyrie::StorageAdapter" @@ -50,7 +50,7 @@ class Valkyrie::Specs::FedoraCustomResource < Valkyrie::Resource wipe_fedora!(base_path: "test", fedora_version: 5) end - let(:storage_adapter) { described_class.new(fedora_adapter_config(base_path: 'test', fedora_version: 5)) } + let(:storage_adapter) { described_class.new(**fedora_adapter_config(base_path: 'test', fedora_version: 5)) } let(:file) { fixture_file_upload('files/example.tif', 'image/tiff') } it_behaves_like "a Valkyrie::StorageAdapter" @@ -91,7 +91,7 @@ class Valkyrie::Specs::FedoraCustomResource < Valkyrie::Resource end context 'when using default transformer' do context 'and basepath is passed in' do - let(:storage_adapter) { described_class.new(fedora_adapter_config(base_path: 'test', fedora_version: 5)) } + let(:storage_adapter) { described_class.new(**fedora_adapter_config(base_path: 'test', fedora_version: 5)) } it 'produces a valid URI' do expected_uri = 'fedora://localhost:8998/rest/test/AN1D4UHA/original' @@ -100,7 +100,7 @@ class Valkyrie::Specs::FedoraCustomResource < Valkyrie::Resource end context "when basepath uses default (e.g. '/')" do - let(:storage_adapter) { described_class.new(fedora_adapter_config(base_path: '/', fedora_version: 5)) } + let(:storage_adapter) { described_class.new(**fedora_adapter_config(base_path: '/', fedora_version: 5)) } it 'produces a valid URI' do expected_uri = RDF::URI.new('fedora://localhost:8998/rest/AN1D4UHA/original') @@ -128,7 +128,7 @@ class Valkyrie::Specs::FedoraCustomResource < Valkyrie::Resource RDF::URI.new(base_url + (head.scan(/..?/).first(4) + [id]).join('/')) end end - let(:storage_adapter) { described_class.new(fedora_adapter_config(base_path: 'test', fedora_version: 5)) } + let(:storage_adapter) { described_class.new(**fedora_adapter_config(base_path: 'test', fedora_version: 5)) } it 'produces a valid URI' do expected_uri = 'fedora://localhost:8998/rest/test/AN/1D/4U/HA/AN1D4UHA/original'