high_five 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/high_five/deploy_task.rb +7 -3
- data/lib/high_five/version.rb +1 -1
- data/spec/deploy_spec.rb +25 -0
- data/spec/dummy/config/high_five/app-custom_asset_paths.js +2 -0
- data/spec/dummy/public/custom_path/custom_app/controllers/custom_controller.js +1 -0
- data/spec/dummy/public/custom_path/custom_app.js +1 -0
- metadata +8 -2
@@ -26,6 +26,9 @@ module HighFive
|
|
26
26
|
self.source_paths << File.join(base_config.root, @config_root)
|
27
27
|
self.source_paths << File.join(base_config.root)
|
28
28
|
self.source_paths << File.join(File.dirname(__FILE__), 'generators')
|
29
|
+
@config.asset_paths.each do |asset_path|
|
30
|
+
self.source_paths << asset_path
|
31
|
+
end
|
29
32
|
|
30
33
|
|
31
34
|
raise "Please set config.destination" if @config.destination.nil?
|
@@ -125,11 +128,12 @@ module HighFive
|
|
125
128
|
end
|
126
129
|
|
127
130
|
# Adds each of the static assets to the generated folder (sylesheets etc)
|
128
|
-
@config.static_assets.each do |
|
131
|
+
@config.static_assets.each do |path|
|
132
|
+
asset = find_in_source_paths(path)
|
129
133
|
if File.directory? asset
|
130
|
-
directory asset
|
134
|
+
directory asset, path
|
131
135
|
else
|
132
|
-
copy_file asset
|
136
|
+
copy_file asset, path
|
133
137
|
end
|
134
138
|
end
|
135
139
|
|
data/lib/high_five/version.rb
CHANGED
data/spec/deploy_spec.rb
CHANGED
@@ -132,4 +132,29 @@ describe HighFive::DeployTask do
|
|
132
132
|
end
|
133
133
|
end
|
134
134
|
|
135
|
+
context "Custom Asset paths" do
|
136
|
+
before :all do
|
137
|
+
create_dummy_app!
|
138
|
+
HighFive::Config.configure do |config|
|
139
|
+
config.root = @project_root
|
140
|
+
config.destination = "www"
|
141
|
+
config.asset_paths = ["public/custom_path"]
|
142
|
+
config.platform :custom_asset_paths do |custom_asset_paths|
|
143
|
+
end
|
144
|
+
|
145
|
+
end
|
146
|
+
cli.deploy("custom_asset_paths")
|
147
|
+
end
|
148
|
+
|
149
|
+
after(:all) { destroy_dummy_app! }
|
150
|
+
|
151
|
+
it "should process files from custom asset paths" do
|
152
|
+
expect(File.join(@project_root, "www", "public/custom_path/custom_app.js")).to exist
|
153
|
+
end
|
154
|
+
|
155
|
+
it "should process a directory from the custom asset paths" do
|
156
|
+
expect(File.join(@project_root, "www", "public/custom_path/custom_app/controllers/custom_controller.js")).to exist
|
157
|
+
end
|
158
|
+
end
|
159
|
+
|
135
160
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
alert("custom_controller.js");
|
@@ -0,0 +1 @@
|
|
1
|
+
alert("custom_app.js");
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: high_five
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-06-
|
12
|
+
date: 2013-06-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|
@@ -158,11 +158,14 @@ files:
|
|
158
158
|
- spec/dummy/config/high_five.rb
|
159
159
|
- spec/dummy/config/high_five/app-android.js
|
160
160
|
- spec/dummy/config/high_five/app-common.js
|
161
|
+
- spec/dummy/config/high_five/app-custom_asset_paths.js
|
161
162
|
- spec/dummy/config/high_five/app-ios.js
|
162
163
|
- spec/dummy/config/high_five/app-web.js
|
163
164
|
- spec/dummy/config/high_five/index.html.erb
|
164
165
|
- spec/dummy/javascripts/app.js
|
165
166
|
- spec/dummy/javascripts/app/component.js
|
167
|
+
- spec/dummy/public/custom_path/custom_app.js
|
168
|
+
- spec/dummy/public/custom_path/custom_app/controllers/custom_controller.js
|
166
169
|
- spec/dummy/sass/sass.scss
|
167
170
|
- spec/dummy/stylesheets/screen.css
|
168
171
|
- spec/init_spec.rb
|
@@ -203,11 +206,14 @@ test_files:
|
|
203
206
|
- spec/dummy/config/high_five.rb
|
204
207
|
- spec/dummy/config/high_five/app-android.js
|
205
208
|
- spec/dummy/config/high_five/app-common.js
|
209
|
+
- spec/dummy/config/high_five/app-custom_asset_paths.js
|
206
210
|
- spec/dummy/config/high_five/app-ios.js
|
207
211
|
- spec/dummy/config/high_five/app-web.js
|
208
212
|
- spec/dummy/config/high_five/index.html.erb
|
209
213
|
- spec/dummy/javascripts/app.js
|
210
214
|
- spec/dummy/javascripts/app/component.js
|
215
|
+
- spec/dummy/public/custom_path/custom_app.js
|
216
|
+
- spec/dummy/public/custom_path/custom_app/controllers/custom_controller.js
|
211
217
|
- spec/dummy/sass/sass.scss
|
212
218
|
- spec/dummy/stylesheets/screen.css
|
213
219
|
- spec/init_spec.rb
|