valkyrie 3.1.3 → 3.1.5

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: 136db97aa681d7662f0585a5c2cc3c56e87b99e59e7ca2df455b7878916c169c
4
- data.tar.gz: b3d7827d8dc6e905c6170c586357c2ba43fca99ad171271c89a533f5578b5f56
3
+ metadata.gz: 4efad2e357e3b34a76b6e6b9c3362d48c571388b7ac8979bbf6e38a1047bf8ce
4
+ data.tar.gz: 40cd0c353e5f04e9eaffa22fb0ea3f13eedf97033b0ce17e6cfa3746ca79fcc9
5
5
  SHA512:
6
- metadata.gz: 0f188fc4a3fc18de3092808914d9668446878e1c3a4beb6551521e88d4ed480660aa9867a7f689183d545c8ab07d2c741406d56f9c810570bbba376b1bc9ee44
7
- data.tar.gz: 24e484ff988cf4aaa38caad0180f3fb4ed9c91db1691c58099aa733caca379c44877d3aafbf24343d11e6749862ee80c1e2d542e1d1bb157f79c9b2fd98cd6a0
6
+ metadata.gz: 418d8f6390418de4b76230db5f0a980b79a6d6109250d72a40480b2ca1f5e59fab6ca8ece7334ed6e2a29e81be7b488aeb41cbaa6ec94814752e5d4da00c4b1b
7
+ data.tar.gz: 62e9f00d29a7d3d16ad8d9211925618b13b995a09f24c7cb72dd94fa68b124dc1686a9fc333a21bc305e2118e0b3015282a871165fe5de04a67b941d56cfd85d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # v3.1.5 2024-04-10
2
+
3
+ ## Changes since last release
4
+
5
+ * Add Valkyrie.root_path to access Valkyrie's gem location. ([tpendragon](https://github.com/tpendragon))
6
+
7
+ # v3.1.4 2024-02-20
8
+
9
+ ## Changes since last release
10
+
11
+ * Remove ChangeSet#prepopulate! test in shared specs. ([jeremyf](https://github.com/jeremyf))
12
+
1
13
  # v3.1.3 2024-01-30
2
14
 
3
15
  ## Changes since last release
@@ -41,14 +41,6 @@ RSpec.shared_examples 'a Valkyrie::ChangeSet' do |*_flags|
41
41
  end
42
42
  end
43
43
 
44
- describe "#prepopulate!" do
45
- it "doesn't make it look changed" do
46
- expect(change_set).not_to be_changed
47
- change_set.prepopulate!
48
- expect(change_set).not_to be_changed
49
- end
50
- end
51
-
52
44
  describe "#required?" do
53
45
  it "returns a boolean" do
54
46
  expect(change_set.required?(change_set.fields.keys.first)).to be_in [true, false]
@@ -39,7 +39,7 @@ RSpec.shared_examples 'a Valkyrie::StorageAdapter' do
39
39
  # WebMock prevents the request from using send_request_with_body_stream as it can do IRL
40
40
  WebMock.disable!
41
41
  allow(storage_adapter).to receive(:file_mover).and_return(FileUtils.method(:cp))
42
- File.open(Valkyrie::Engine.root.join("spec", "fixtures", "files", "tn_example.jpg")) do |io_file|
42
+ File.open(Valkyrie.root_path.join("spec", "fixtures", "files", "tn_example.jpg")) do |io_file|
43
43
  sha1 = Digest::SHA1.file(io_file).to_s
44
44
 
45
45
  resource = Valkyrie::Specs::CustomResource.new(id: SecureRandom.uuid)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Valkyrie
3
- VERSION = "3.1.3"
3
+ VERSION = "3.1.5"
4
4
  end
data/lib/valkyrie.rb CHANGED
@@ -60,6 +60,14 @@ module Valkyrie
60
60
  end
61
61
  end
62
62
 
63
+ def root_path
64
+ if Valkyrie.const_defined?(:Engine)
65
+ Valkyrie::Engine.root
66
+ else
67
+ Pathname.new(__dir__).dirname
68
+ end
69
+ end
70
+
63
71
  # @return [Valkyrie::Logging]
64
72
  def logger
65
73
  @logger ||= Valkyrie::Logging.new(logger: Logger.new(STDOUT))
@@ -123,5 +131,5 @@ module Valkyrie
123
131
  end
124
132
  end
125
133
 
126
- module_function :config, :logger, :logger=, :config_root_path, :environment, :config_file, :config_hash
134
+ module_function :config, :logger, :logger=, :config_root_path, :environment, :config_file, :config_hash, :root_path
127
135
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: valkyrie
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.3
4
+ version: 3.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trey Pendragon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-31 00:00:00.000000000 Z
11
+ date: 2024-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-struct