propshaft 1.2.0 → 1.2.1

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: 8ea8c536e8ee4cd0229dd706a6689d8e52d13a63533fb1f2d5e19835f3a853f2
4
- data.tar.gz: fdd5faee6f39306a3bd12f0d3b008b31554b2576637f14497640dd886d38d865
3
+ metadata.gz: d3a28b3767740acb1008b833da642398c7f8a7a5d89e2f30b9226ba0cba780d7
4
+ data.tar.gz: df4afbce73980e2e35eedd33612cb6ef41c8811d75e1f68438d5e8d34582e7e5
5
5
  SHA512:
6
- metadata.gz: 684f7db0156395a7376f7f1788576a7f5bbfaef1ccbe44af0fb2bf2ce315c6acdc45e2f5e368df3d580e6e54c741a80d50bd7cb0db6976909662b40a65184f0c
7
- data.tar.gz: ad626da00dd0f678abe3d5ea4ce26975c38e02906fdc14de6aa244cdb0902382dd25caf495e9d32e0da3d89ad9b260dce2bdf992a1f925a65fdaeea0494bf355
6
+ metadata.gz: 24b9c7e548f64d5368c1749bbd9b797fc6dfc5f0ba14c6e0953ae1c551550324515981e9950f87b90c8ce4bf252c03d7bb793d79f7157664fc6762c5ab4f20af
7
+ data.tar.gz: f0f88680bd1a415552f96d3f3e5ce639b718bc588c0701e7594d12293e2d6258ac5bc1cf78c8afb46098ee62639b65b81df505482599fce3abb3d797e34a7f55
@@ -70,7 +70,9 @@ module Propshaft
70
70
  #
71
71
  # stylesheet_link_tag :all # All stylesheets in load path
72
72
  # stylesheet_link_tag :app # Only app/assets stylesheets
73
- def stylesheet_link_tag(*sources, **options)
73
+ def stylesheet_link_tag(*sources)
74
+ options = sources.extract_options!
75
+
74
76
  case sources.first
75
77
  when :all
76
78
  sources = all_stylesheets_paths
@@ -95,7 +97,9 @@ module Propshaft
95
97
  # javascript_include_tag "application", integrity: true
96
98
  # # => <script src="/assets/application-abc123.js"
97
99
  # # integrity="sha256-xyz789..."></script>
98
- def javascript_include_tag(*sources, **options)
100
+ def javascript_include_tag(*sources)
101
+ options = sources.extract_options!
102
+
99
103
  _build_asset_tags(sources, options, :javascript) { |source, opts| super(source, opts) }
100
104
  end
101
105
 
@@ -134,6 +134,19 @@ module Propshaft
134
134
  @entries[logical_path]
135
135
  end
136
136
 
137
+ # Removes a manifest entry by its logical path.
138
+ #
139
+ # ==== Parameters
140
+ #
141
+ # * +logical_path+ - The logical path of the asset to remove
142
+ #
143
+ # ==== Returns
144
+ #
145
+ # The removed manifest entry, or +nil+ if not found.
146
+ def delete(logical_path)
147
+ @entries.delete(logical_path)
148
+ end
149
+
137
150
  # Converts the manifest to JSON format.
138
151
  #
139
152
  # The JSON representation maps logical paths to hash representations of
@@ -47,6 +47,8 @@ class Propshaft::Server
47
47
  end
48
48
 
49
49
  def execute_cache_sweeper_if_updated
50
- @assembly.load_path.cache_sweeper.execute_if_updated
50
+ if @assembly.config.sweep_cache
51
+ @assembly.load_path.cache_sweeper.execute_if_updated
52
+ end
51
53
  end
52
54
  end
@@ -1,3 +1,3 @@
1
1
  module Propshaft
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: propshaft
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson