snowball 0.1.4 → 0.1.5
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/.travis.yml +4 -0
- data/bin/roll.js +12 -8
- data/lib/snowball/version.rb +1 -1
- data/spec/snowball_spec.rb +2 -9
- metadata +3 -2
data/.travis.yml
ADDED
data/bin/roll.js
CHANGED
@@ -90,15 +90,19 @@ if (argv.env) {
|
|
90
90
|
bundle.entries['/__browserify_process__setenv'] = {
|
91
91
|
body: ''+
|
92
92
|
'var __browserify_process = require("__browserify_process"),' +
|
93
|
-
' env = '+JSON.stringify(argv.env)+'
|
94
|
-
'Object.
|
95
|
-
'
|
96
|
-
'
|
97
|
-
'
|
98
|
-
'
|
99
|
-
'
|
93
|
+
' env = '+JSON.stringify(argv.env)+',' +
|
94
|
+
' hasProp = Object.prototype.hasOwnProperty;' +
|
95
|
+
'for (var key in env) {'+
|
96
|
+
' if (!hasProp.call(env, key)) { continue; }'+
|
97
|
+
' if (hasProp.call(__browserify_process.env, key)) {'+
|
98
|
+
' if ((typeof console) != "undefined" && (typeof console.log) == "function") {'+
|
99
|
+
' console.log("Environment variable already set in browserify environment: %s", key);' +
|
100
|
+
' }' +
|
101
|
+
' continue;' +
|
100
102
|
' }'+
|
101
|
-
'
|
103
|
+
' __browserify_process.env[key] = env[key];'+
|
104
|
+
'}'
|
105
|
+
};
|
102
106
|
}
|
103
107
|
|
104
108
|
([].concat(argv.require || [])).forEach(function (req) {
|
data/lib/snowball/version.rb
CHANGED
data/spec/snowball_spec.rb
CHANGED
@@ -48,23 +48,16 @@ describe "SnowballApp" do
|
|
48
48
|
last_response.status.should eq 404
|
49
49
|
end
|
50
50
|
|
51
|
-
it "forwards errors to the browser by throwing them in the bundle" do
|
52
|
-
get "/js/will-fail.js"
|
53
|
-
last_response.status.should eq 200
|
54
|
-
|
55
|
-
last_response.body.should match /throw new Error\(\"Cannot find module\: \\"this\-module\-doesnt\-exist\\" from directory (.*) while processing file (.*)will\-fail\.js/
|
56
|
-
end
|
57
|
-
|
58
51
|
it "also forwards parse/syntax errors" do
|
59
52
|
get "/js/syntax-error.js"
|
60
53
|
last_response.status.should eq 200
|
61
|
-
last_response.body.should match /throw new
|
54
|
+
last_response.body.should match /throw new SyntaxError\("Error: In .*\/js\/syntax-error.coffee, Parse error on line 1: Unexpected '...'"\)/
|
62
55
|
end
|
63
56
|
|
64
57
|
it "forwards parse/syntax errors even if the error occurs in a require()'d file" do
|
65
58
|
get "/js/require-error.js"
|
66
59
|
last_response.status.should eq 200
|
67
|
-
last_response.body.should match /throw new
|
60
|
+
last_response.body.should match /throw new SyntaxError\("Error: In .*\/js\/syntax-error.coffee, Parse error on line 1: Unexpected '...'"\)/
|
68
61
|
end
|
69
62
|
|
70
63
|
it "can specify a glob string of files that should be served raw" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snowball
|
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-01-
|
12
|
+
date: 2013-01-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sinatra
|
@@ -102,6 +102,7 @@ extra_rdoc_files: []
|
|
102
102
|
files:
|
103
103
|
- .gitignore
|
104
104
|
- .rspec
|
105
|
+
- .travis.yml
|
105
106
|
- Gemfile
|
106
107
|
- LICENSE
|
107
108
|
- README.md
|