middleman-sprockets 3.0.3 → 3.0.4
Sign up to get free protection for your applications and to get access to all the features.
data/features/sprockets.feature
CHANGED
@@ -4,6 +4,11 @@ Feature: Sprockets
|
|
4
4
|
Given the Server is running at "sprockets-app2"
|
5
5
|
When I go to "/javascripts/sprockets_base.js"
|
6
6
|
Then I should see "sprockets_sub_function"
|
7
|
+
|
8
|
+
Scenario: javascript_include_tag with opts
|
9
|
+
Given the Server is running at "sprockets-app"
|
10
|
+
When I go to "/index.html"
|
11
|
+
Then I should see "data-name"
|
7
12
|
|
8
13
|
Scenario: asset_path helper
|
9
14
|
Given the Server is running at "sprockets-app2"
|
@@ -34,12 +39,10 @@ Feature: Sprockets
|
|
34
39
|
Scenario: Script tags should be provided individually while debugging assets
|
35
40
|
Given the Server is running at "sprockets-app-debug-assets"
|
36
41
|
When I go to "/index.html"
|
37
|
-
Then I should see
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
<script src="/javascripts/main.js?body=1" type="text/javascript"></script>
|
42
|
-
"""
|
42
|
+
Then I should see "data-name"
|
43
|
+
Then I should see 'src="/javascripts/dependency2.js?body=1"'
|
44
|
+
Then I should see 'src="/javascripts/dependency1.js?body=1"'
|
45
|
+
Then I should see 'src="/javascripts/main.js?body=1"'
|
43
46
|
|
44
47
|
Scenario: Multiple engine files should build correctly
|
45
48
|
Given a successfully built app at "sprockets-app2"
|
@@ -1 +1 @@
|
|
1
|
-
<%= javascript_include_tag "main" %>
|
1
|
+
<%= javascript_include_tag "main", :data => { :name => "main" } %>
|
@@ -134,9 +134,8 @@ module Middleman::Sprockets
|
|
134
134
|
# splits up script dependencies in individual files when
|
135
135
|
# configuration variable :debug_assets is set to true
|
136
136
|
def javascript_include_tag(*sources)
|
137
|
-
options = sources.extract_options!.symbolize_keys
|
138
|
-
|
139
137
|
if respond_to?(:debug_assets) && debug_assets
|
138
|
+
options = sources.extract_options!.symbolize_keys
|
140
139
|
|
141
140
|
# loop through all sources and the dependencies and
|
142
141
|
# output each as script tag in the correct order
|
@@ -147,9 +146,8 @@ module Middleman::Sprockets
|
|
147
146
|
dependency.logical_path << "?body=1"
|
148
147
|
end
|
149
148
|
|
150
|
-
super(dependencies_paths)
|
149
|
+
super(dependencies_paths, options)
|
151
150
|
end.join("")
|
152
|
-
|
153
151
|
else
|
154
152
|
super
|
155
153
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-sprockets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -173,7 +173,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
173
173
|
version: '0'
|
174
174
|
segments:
|
175
175
|
- 0
|
176
|
-
hash:
|
176
|
+
hash: -1369205466004228644
|
177
177
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
178
178
|
none: false
|
179
179
|
requirements:
|
@@ -182,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
182
182
|
version: '0'
|
183
183
|
segments:
|
184
184
|
- 0
|
185
|
-
hash:
|
185
|
+
hash: -1369205466004228644
|
186
186
|
requirements: []
|
187
187
|
rubyforge_project: middleman-sprockets
|
188
188
|
rubygems_version: 1.8.23
|