coffee-script 2.2.0 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/coffee_script.rb +20 -1
- metadata +75 -68
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 43ba59185044ff1afc8466c2012f4bbbf38aab73
|
4
|
+
data.tar.gz: bb547638a521ffc99ff9447c58a0e9d9fe12715f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c90835887f3bc8f0efddf401ee00c25489b858a3bf9dc5297495477a56a7818bd7f8ca3ec36c12ee418fe18b50689daebe55311c66e33e806f7d18679eb4fe5b
|
7
|
+
data.tar.gz: f31f12dec9a76a9d68d26e33506ed38e6b19b828cbaa7e68e92a70033136cfa837e978ae4762bf00922505b5f60eb6133ff9ffff9f00e5bc841abddd443253ba
|
data/lib/coffee_script.rb
CHANGED
@@ -2,6 +2,7 @@ require 'execjs'
|
|
2
2
|
require 'coffee_script/source'
|
3
3
|
|
4
4
|
module CoffeeScript
|
5
|
+
Error = ExecJS::Error
|
5
6
|
EngineError = ExecJS::RuntimeError
|
6
7
|
CompilationError = ExecJS::ProgramError
|
7
8
|
|
@@ -54,7 +55,25 @@ module CoffeeScript
|
|
54
55
|
options[:bare] = false
|
55
56
|
end
|
56
57
|
|
57
|
-
|
58
|
+
wrapper = <<-WRAPPER
|
59
|
+
(function(script, options) {
|
60
|
+
try {
|
61
|
+
return CoffeeScript.compile(script, options);
|
62
|
+
} catch (err) {
|
63
|
+
if (err instanceof SyntaxError && err.location) {
|
64
|
+
throw new SyntaxError([
|
65
|
+
err.filename || "[stdin]",
|
66
|
+
err.location.first_line + 1,
|
67
|
+
err.location.first_column + 1
|
68
|
+
].join(":") + ": " + err.message)
|
69
|
+
} else {
|
70
|
+
throw err;
|
71
|
+
}
|
72
|
+
}
|
73
|
+
})
|
74
|
+
WRAPPER
|
75
|
+
|
76
|
+
Source.context.call(wrapper, script, options)
|
58
77
|
end
|
59
78
|
end
|
60
79
|
end
|
metadata
CHANGED
@@ -1,99 +1,106 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: coffee-script
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 2
|
8
|
-
- 2
|
9
|
-
- 0
|
10
|
-
version: 2.2.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.3.0
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- Jeremy Ashkenas
|
14
8
|
- Joshua Peek
|
15
9
|
- Sam Stephenson
|
16
10
|
autorequire:
|
17
11
|
bindir: bin
|
18
12
|
cert_chain: []
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
dependencies:
|
23
|
-
- !ruby/object:Gem::Dependency
|
13
|
+
date: 2014-07-11 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
24
16
|
name: coffee-script-source
|
25
|
-
|
26
|
-
|
27
|
-
none: false
|
28
|
-
requirements:
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
29
19
|
- - ">="
|
30
|
-
- !ruby/object:Gem::Version
|
31
|
-
|
32
|
-
segments:
|
33
|
-
- 0
|
34
|
-
version: "0"
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
35
22
|
type: :runtime
|
36
|
-
version_requirements: *id001
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: execjs
|
39
23
|
prerelease: false
|
40
|
-
|
41
|
-
|
42
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: '0'
|
29
|
+
- !ruby/object:Gem::Dependency
|
30
|
+
name: execjs
|
31
|
+
requirement: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
43
33
|
- - ">="
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
|
46
|
-
segments:
|
47
|
-
- 0
|
48
|
-
version: "0"
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '0'
|
49
36
|
type: :runtime
|
50
|
-
|
51
|
-
|
37
|
+
prerelease: false
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '0'
|
43
|
+
- !ruby/object:Gem::Dependency
|
44
|
+
name: json
|
45
|
+
requirement: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - ">="
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '0'
|
50
|
+
type: :development
|
51
|
+
prerelease: false
|
52
|
+
version_requirements: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0'
|
57
|
+
- !ruby/object:Gem::Dependency
|
58
|
+
name: rake
|
59
|
+
requirement: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0'
|
64
|
+
type: :development
|
65
|
+
prerelease: false
|
66
|
+
version_requirements: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
71
|
+
description: |2
|
72
|
+
Ruby CoffeeScript is a bridge to the JS CoffeeScript compiler.
|
52
73
|
email: josh@joshpeek.com
|
53
74
|
executables: []
|
54
|
-
|
55
75
|
extensions: []
|
56
|
-
|
57
76
|
extra_rdoc_files: []
|
58
|
-
|
59
|
-
files:
|
60
|
-
- lib/coffee-script.rb
|
61
|
-
- lib/coffee_script.rb
|
77
|
+
files:
|
62
78
|
- LICENSE
|
63
79
|
- README.md
|
64
|
-
|
80
|
+
- lib/coffee-script.rb
|
81
|
+
- lib/coffee_script.rb
|
65
82
|
homepage: http://github.com/josh/ruby-coffee-script
|
66
|
-
licenses:
|
67
|
-
|
83
|
+
licenses:
|
84
|
+
- MIT
|
85
|
+
metadata: {}
|
68
86
|
post_install_message:
|
69
87
|
rdoc_options: []
|
70
|
-
|
71
|
-
require_paths:
|
88
|
+
require_paths:
|
72
89
|
- lib
|
73
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
74
|
-
|
75
|
-
requirements:
|
90
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
91
|
+
requirements:
|
76
92
|
- - ">="
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
version: "0"
|
82
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
|
-
none: false
|
84
|
-
requirements:
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '0'
|
95
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
85
97
|
- - ">="
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
|
88
|
-
segments:
|
89
|
-
- 0
|
90
|
-
version: "0"
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
91
100
|
requirements: []
|
92
|
-
|
93
101
|
rubyforge_project:
|
94
|
-
rubygems_version:
|
102
|
+
rubygems_version: 2.2.2
|
95
103
|
signing_key:
|
96
|
-
specification_version:
|
104
|
+
specification_version: 4
|
97
105
|
summary: Ruby CoffeeScript Compiler
|
98
106
|
test_files: []
|
99
|
-
|