snowball 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 1.9.2
@@ -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.keys(env).forEach(function(varname) {'+
95
- ' if (!(varname in __browserify_process.env)) {'+
96
- ' __browserify_process.env[varname] = env[varname];'+
97
- ' }' +
98
- ' else {' +
99
- ' console.log("Environment variable already set in browserify environment: %s", varname);' +
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) {
@@ -1,3 +1,3 @@
1
1
  module Snowball
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -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 Error\(\"In (.*)syntax\-error\.coffee\, Parse error on line 1\: Unexpected \'\.\.\.\'\"/
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 Error\(\"In (.*)syntax\-error\.coffee\, Parse error on line 1\: Unexpected \'\.\.\.\'\"/
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
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-15 00:00:00.000000000 Z
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