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 +4 -4
- data/lib/propshaft/helper.rb +6 -2
- data/lib/propshaft/manifest.rb +13 -0
- data/lib/propshaft/server.rb +3 -1
- data/lib/propshaft/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3a28b3767740acb1008b833da642398c7f8a7a5d89e2f30b9226ba0cba780d7
|
4
|
+
data.tar.gz: df4afbce73980e2e35eedd33612cb6ef41c8811d75e1f68438d5e8d34582e7e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24b9c7e548f64d5368c1749bbd9b797fc6dfc5f0ba14c6e0953ae1c551550324515981e9950f87b90c8ce4bf252c03d7bb793d79f7157664fc6762c5ab4f20af
|
7
|
+
data.tar.gz: f0f88680bd1a415552f96d3f3e5ce639b718bc588c0701e7594d12293e2d6258ac5bc1cf78c8afb46098ee62639b65b81df505482599fce3abb3d797e34a7f55
|
data/lib/propshaft/helper.rb
CHANGED
@@ -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
|
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
|
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
|
|
data/lib/propshaft/manifest.rb
CHANGED
@@ -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
|
data/lib/propshaft/server.rb
CHANGED
data/lib/propshaft/version.rb
CHANGED