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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 524bcdefad223b559accd2e027f37b4a2b28af80ac8db368ece9c18d6676dcd6
4
- data.tar.gz: 9baf4a521bbe0549503d2b79bb4ef38b0a65aeb141f2f9299c599edb7e78f2f5
3
+ metadata.gz: 1a0f74ce24868eb7966c76d648440874d7379feec8a0dcf54cc2b2ec041b1e68
4
+ data.tar.gz: 70224e7d218a8ce723f33a6472e45864c49867816e96faf73efdeb0ae5693bd5
5
5
  SHA512:
6
- metadata.gz: d6203631c1b5a42cd593e35f37a2274803c0a651e3d81f479a2c5c4ffb60e1df781397b26d087a5d36fd71435222ba7770c9c83b5458d3be55ab52f578501190
7
- data.tar.gz: 3ae4c5aceccd0062ce40c73fe259320074bf14300bcc5aebd5d290af5ff1bce7db086c9b37317bc1ac8bcce07c7b52c91bd28dd85d882c35e7a586529fd84fc4
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.
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "uri"
4
+
3
5
  module Hanami
4
6
  class Assets
5
7
  # Base URL
@@ -5,6 +5,6 @@ module Hanami
5
5
  # Defines the version
6
6
  #
7
7
  # @since 0.1.0
8
- VERSION = "2.1.0.rc3"
8
+ VERSION = "2.1.0"
9
9
  end
10
10
  end
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.rc3
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-16 00:00:00.000000000 Z
11
+ date: 2024-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: zeitwerk