valkyrie 3.1.4 → 3.1.5

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: 45ad037f0dbbaf39f2350701c25ec4820173455e80e094e6e18744cfb89effe5
4
- data.tar.gz: e8d6d55cc8f2694f1e8502e988a3ecb6609eca94307bef69707105594ea21b88
3
+ metadata.gz: 4efad2e357e3b34a76b6e6b9c3362d48c571388b7ac8979bbf6e38a1047bf8ce
4
+ data.tar.gz: 40cd0c353e5f04e9eaffa22fb0ea3f13eedf97033b0ce17e6cfa3746ca79fcc9
5
5
  SHA512:
6
- metadata.gz: bce82f987a2916943fa4554985a049f1719cd67b89b206402f1e0dd4e8c622cda31f2c66d695e51e5209293a7d0b571d909795246bb3572f9c913b28010a14f8
7
- data.tar.gz: 8699c74af257248e5be5dbe03bbc47566beba045fa3450a2524e6b7f5a065f60012e27f96eb64f86351fec3336737b457a74f16079266aa135a535c9026ab86e
6
+ metadata.gz: 418d8f6390418de4b76230db5f0a980b79a6d6109250d72a40480b2ca1f5e59fab6ca8ece7334ed6e2a29e81be7b488aeb41cbaa6ec94814752e5d4da00c4b1b
7
+ data.tar.gz: 62e9f00d29a7d3d16ad8d9211925618b13b995a09f24c7cb72dd94fa68b124dc1686a9fc333a21bc305e2118e0b3015282a871165fe5de04a67b941d56cfd85d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
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
+
1
7
  # v3.1.4 2024-02-20
2
8
 
3
9
  ## Changes since last release
@@ -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.4"
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.4
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-02-21 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
@@ -582,7 +582,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
582
582
  - !ruby/object:Gem::Version
583
583
  version: '0'
584
584
  requirements: []
585
- rubygems_version: 3.3.7
585
+ rubygems_version: 3.1.6
586
586
  signing_key:
587
587
  specification_version: 4
588
588
  summary: An ORM using the Data Mapper pattern, specifically built to solve Digital