hanami-assets 2.1.0.rc3 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -0
- data/lib/hanami/assets/base_url.rb +2 -0
- data/lib/hanami/assets/version.rb +1 -1
- data/lib/hanami/assets.rb +14 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a0f74ce24868eb7966c76d648440874d7379feec8a0dcf54cc2b2ec041b1e68
|
4
|
+
data.tar.gz: 70224e7d218a8ce723f33a6472e45864c49867816e96faf73efdeb0ae5693bd5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3843017a4e9ba13f467858ec0bc697ac89ee414c709a5a33cbd7f5b6d6a977b07d84961cb611983b4e2d0175e393354907de10d1191df396b64806913eee27ce
|
7
|
+
data.tar.gz: 4c60284918e679b1be855867bbcecc3b31901e3acf98c515cbda4c2d2cdd378c15ec988d43ce4346e03372966cc2bad7204b932a83027d7749bbacaa3729bdb9
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# Hanami::Assets
|
2
2
|
Assets management for Ruby web applications
|
3
3
|
|
4
|
+
## v2.1.0 - 2024-02-27
|
5
|
+
|
4
6
|
## v2.1.0.rc3 - 2024-02-16
|
5
7
|
### Changed
|
6
8
|
- [Tim Riley] Require a `root:` argument when initializing `Hanami::Assets`. This should be the directory containing the compiled assets and their `assets.json` manifest file.
|
data/lib/hanami/assets.rb
CHANGED
@@ -29,6 +29,20 @@ module Hanami
|
|
29
29
|
require_relative "assets/version"
|
30
30
|
require_relative "assets/errors"
|
31
31
|
|
32
|
+
# Returns the directory (under `public/assets/`) to be used for storing a slice's compiled
|
33
|
+
# assets.
|
34
|
+
#
|
35
|
+
# This is shared logic used by both Hanami (for the assets provider) and Hanami::CLI (for the
|
36
|
+
# assets commands).
|
37
|
+
#
|
38
|
+
# @since 2.1.0
|
39
|
+
# @api private
|
40
|
+
def self.public_assets_dir(slice)
|
41
|
+
return nil if slice.app.eql?(slice)
|
42
|
+
|
43
|
+
slice.slice_name.to_s.split("/").map { |name| "_#{name}" }.join("/")
|
44
|
+
end
|
45
|
+
|
32
46
|
# @api private
|
33
47
|
# @since 2.1.0
|
34
48
|
MANIFEST_PATH = "assets.json"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hanami-assets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luca Guidi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02-
|
11
|
+
date: 2024-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: zeitwerk
|