snowball 0.1.7 → 0.1.8
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.
- data/extconf.rb +4 -6
- data/lib/snowball/sinatra.rb +1 -1
- data/lib/snowball/version.rb +1 -1
- data/spec/spec_helper.rb +10 -0
- metadata +1 -1
data/extconf.rb
CHANGED
@@ -3,9 +3,7 @@ require 'open3'
|
|
3
3
|
|
4
4
|
create_makefile("Dummy")
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
end
|
11
|
-
end
|
6
|
+
puts "* Running npm install"
|
7
|
+
Open3.popen3('npm install') do |stdin, stdout, stderr, wait_thr|
|
8
|
+
fail "Error running 'npm install': #{stderr.read}" unless wait_thr.value.success?
|
9
|
+
end
|
data/lib/snowball/sinatra.rb
CHANGED
@@ -41,7 +41,7 @@ module Sinatra
|
|
41
41
|
if File.extname(bundle) != '.js' or config[:source].any? { |glob_str| File.fnmatch(glob_str, entryfile) }
|
42
42
|
send_file entryfile
|
43
43
|
else
|
44
|
-
raw = config[:raw].any? { |glob_str| File.fnmatch(glob_str,
|
44
|
+
raw = config[:raw].any? { |glob_str| File.fnmatch(glob_str, bundle) }
|
45
45
|
content_type :js
|
46
46
|
[200, ::Snowball::Roller.roll(*[entryfile, config.merge({:raw => raw})].compact)]
|
47
47
|
end
|
data/lib/snowball/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
require 'open3'
|
2
|
+
|
3
|
+
unless File.exists?("./node_modules")
|
4
|
+
# Run npm install to make sure we get all needed node modules
|
5
|
+
puts "* Running npm install"
|
6
|
+
Open3.popen3('npm install') do |stdin, stdout, stderr, wait_thr|
|
7
|
+
fail "Error running 'npm install': #{stderr.read}" unless wait_thr.value.success?
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
1
11
|
require 'bundler'
|
2
12
|
require 'simplecov'
|
3
13
|
require 'rack/test'
|