ruby2js 1.9.0 → 1.9.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +23 -2
- data/lib/ruby2js/converter/send.rb +10 -1
- data/lib/ruby2js/filter/angularrb.rb +6 -6
- data/lib/ruby2js/filter/jquery.rb +4 -1
- data/lib/ruby2js/filter/minitest-jasmine.rb +190 -0
- data/lib/ruby2js/version.rb +1 -1
- data/ruby2js.gemspec +4 -4
- metadata +49 -43
data/README.md
CHANGED
@@ -116,7 +116,7 @@ includes three such integrations:
|
|
116
116
|
* [Sinatra](https://github.com/rubys/ruby2js/blob/master/lib/ruby2js/sinatra.rb)
|
117
117
|
* [Rails](https://github.com/rubys/ruby2js/blob/master/lib/ruby2js/rails.rb)
|
118
118
|
|
119
|
-
As you might expect, CGI is a bit sluggish. By
|
119
|
+
As you might expect, CGI is a bit sluggish. By contrast, Sinatra and Rails
|
120
120
|
are quite speedy as the bulk of the time is spend on the initial load of the
|
121
121
|
required libraries.
|
122
122
|
|
@@ -230,7 +230,7 @@ the script.
|
|
230
230
|
angular module functions.
|
231
231
|
* maps `use` statements to formal arguments or array values (as
|
232
232
|
appropriate) depending on the module function.
|
233
|
-
* maps `watch`
|
233
|
+
* maps `watch` statements to calls to `$scope.$watch`.
|
234
234
|
* tracks globals variable and constant references and adds additional
|
235
235
|
implicit `use` statements
|
236
236
|
* maps constant assignments in an angular module to a filter
|
@@ -256,6 +256,27 @@ the script.
|
|
256
256
|
* adds implicit module `use` of `ngResource` when `$resource.new` calls
|
257
257
|
are encountered
|
258
258
|
|
259
|
+
* [minitest-jasmine](https://github.com/rubys/ruby2js/blob/master/lib/ruby2js/filter/minitest-jasmine.rb)
|
260
|
+
* maps subclasses of `Minitest::Test` to `describe` calls
|
261
|
+
* maps `test_` methods inside subclasses of `Minitest::Test` to `it` calls
|
262
|
+
* maps `setup`, `teardown`, `before`, and `after` calls to `beforeEach`
|
263
|
+
and `afterEach` calls
|
264
|
+
* maps `assert` and `refute` calls to `expect`...`toBeTruthy()` and
|
265
|
+
`toBeFalsy` calls
|
266
|
+
* maps `assert_equal`, `refute_equal`, `.must_equal` and `.cant_equal`
|
267
|
+
calls to `expect`...`toBe()` calls
|
268
|
+
* maps `assert_in_delta`, `refute_in_delta`, `.must_be_within_delta`,
|
269
|
+
`.must_be_close_to`, `.cant_be_within_delta`, and `.cant_be_close_to`
|
270
|
+
calls to `expect`...`toBeCloseTo()` calls
|
271
|
+
* maps `assert_includes`, `refute_includes`, `.must_include`, and
|
272
|
+
`.cant_include` calls to `expect`...`toContain()` calls
|
273
|
+
* maps `assert_match`, `refute_match`, `.must_match`, and `.cant_match`
|
274
|
+
calls to `expect`...`toMatch()` calls
|
275
|
+
* maps `assert_nil`, `refute_nil`, `.must_be_nil`, and `.cant_be_nill` calls
|
276
|
+
to `expect`...`toBeNull()` calls
|
277
|
+
* maps `assert_operator`, `refute_operator`, `.must_be`, and `.cant_be`
|
278
|
+
calls to `expect`...`toBeGreaterThan()` or `toBeLessThan` calls
|
279
|
+
|
259
280
|
[Wunderbar](https://github.com/rubys/wunderbar) includes additional demos:
|
260
281
|
|
261
282
|
* [chat](https://github.com/rubys/wunderbar/blob/master/demo/chat.rb),
|
@@ -46,6 +46,7 @@ module Ruby2JS
|
|
46
46
|
group_receiver = receiver.type == :send &&
|
47
47
|
op_index < operator_index( receiver.children[1] ) if receiver
|
48
48
|
group_receiver ||= [:begin, :dstr, :dsym].include? receiver.type
|
49
|
+
group_receiver = false if receiver.children[1] == :[]
|
49
50
|
end
|
50
51
|
|
51
52
|
if target
|
@@ -75,7 +76,7 @@ module Ruby2JS
|
|
75
76
|
elsif method == :<< and args.length == 1 and @state == :statement
|
76
77
|
"#{ parse receiver }.push(#{ parse args.first })"
|
77
78
|
|
78
|
-
elsif OPERATORS.flatten.include? method
|
79
|
+
elsif OPERATORS.flatten.include?(method) and not LOGICAL.include?(method)
|
79
80
|
"#{ group_receiver ? group(receiver) : parse(receiver) } #{ method } #{ group_target ? group(target) : parse(target) }"
|
80
81
|
|
81
82
|
elsif method =~ /=$/
|
@@ -101,6 +102,14 @@ module Ruby2JS
|
|
101
102
|
|
102
103
|
return parse s(:regexp, *args.first.children[0...-1],
|
103
104
|
s(:regopt, *opts.split('').map(&:to_sym)))
|
105
|
+
elsif args.first.type == :str
|
106
|
+
if args.length == 2 and args[1].type == :str
|
107
|
+
opts = args[1].children[0]
|
108
|
+
else
|
109
|
+
opts = ''
|
110
|
+
end
|
111
|
+
return parse s(:regexp, args.first,
|
112
|
+
s(:regopt, *opts.each_char.map {|c| c}))
|
104
113
|
end
|
105
114
|
end
|
106
115
|
|
@@ -74,7 +74,7 @@ module Ruby2JS
|
|
74
74
|
|
75
75
|
# convert use calls into dependencies
|
76
76
|
depends = @ngAppUses.map {|sym| s(:sym, sym)} + extract_uses(block)
|
77
|
-
depends = depends.map {|node| node.children.first.to_s}.uniq.
|
77
|
+
depends = depends.map {|node| node.children.first.to_s}.uniq.sort.
|
78
78
|
map {|sym| s(:str, sym)}
|
79
79
|
|
80
80
|
ngApp, @ngApp, @ngChildren = @ngApp, nil, nil
|
@@ -129,7 +129,7 @@ module Ruby2JS
|
|
129
129
|
|
130
130
|
@ngClassUses -= @ngClassOmit + [name.children.last]
|
131
131
|
args = @ngClassUses.map {|sym| s(:arg, sym)} + uses
|
132
|
-
args = args.map {|node| node.children.first.to_sym}.uniq.
|
132
|
+
args = args.map {|node| node.children.first.to_sym}.uniq.sort.
|
133
133
|
map {|sym| s(:arg, sym)}
|
134
134
|
@ngClassUses, @ngClassOmit = [], []
|
135
135
|
|
@@ -249,7 +249,7 @@ module Ruby2JS
|
|
249
249
|
@ngClassUses -= @ngClassOmit
|
250
250
|
args = node.children[1].children
|
251
251
|
args += @ngClassUses.map {|sym| s(:arg, sym)} + extract_uses(block)
|
252
|
-
args = args.map {|node| node.children.first.to_sym}.uniq.
|
252
|
+
args = args.map {|node| node.children.first.to_sym}.uniq.sort.
|
253
253
|
map {|sym| s(:arg, sym)}
|
254
254
|
|
255
255
|
node.updated :block, [target, s(:args, *args), s(:begin, *block)]
|
@@ -279,7 +279,7 @@ module Ruby2JS
|
|
279
279
|
# insert return
|
280
280
|
args = process_all(node.children[1].children)
|
281
281
|
block = process_all(node.children[2..-1])
|
282
|
-
uses = (@ngClassUses - @ngClassOmit).uniq.map {|sym| s(:arg, sym)}
|
282
|
+
uses = (@ngClassUses - @ngClassOmit).uniq.sort.map {|sym| s(:arg, sym)}
|
283
283
|
tail = [block.pop || s(:nil)]
|
284
284
|
while tail.length == 1 and tail.first.type == :begin
|
285
285
|
tail = tail.first.children.dup
|
@@ -322,7 +322,7 @@ module Ruby2JS
|
|
322
322
|
@ngClassUses.delete call.children[2].children[0]
|
323
323
|
args = process_all(node.children[1].children)
|
324
324
|
args += @ngClassUses.map {|sym| s(:arg, sym)} + extract_uses(block)
|
325
|
-
args = args.map {|node| node.children.first.to_sym}.uniq.
|
325
|
+
args = args.map {|node| node.children.first.to_sym}.uniq.sort.
|
326
326
|
map {|sym| s(:arg, sym)}
|
327
327
|
|
328
328
|
# construct a function
|
@@ -563,7 +563,7 @@ module Ruby2JS
|
|
563
563
|
end
|
564
564
|
|
565
565
|
BUILTINS = [ :Array, :Boolean, :Date, :Error, :Function, :Infinity, :JSON,
|
566
|
-
:Math, :NaN, :Number, :Object, :RegExp, :String ]
|
566
|
+
:Math, :NaN, :Number, :Object, :RegExp, :Regexp, :String ]
|
567
567
|
|
568
568
|
def on_const(node)
|
569
569
|
if @ngClassUses and not node.children.first
|
@@ -105,6 +105,7 @@ module Ruby2JS
|
|
105
105
|
props = :context, :jquery, :browser, :fx, :support, :length, :selector
|
106
106
|
domprops = %w(checked disabled readonly readOnly required)
|
107
107
|
|
108
|
+
stopProps = false
|
108
109
|
rewrite_tilda = proc do |node|
|
109
110
|
# Example conversion:
|
110
111
|
# before:
|
@@ -112,6 +113,7 @@ module Ruby2JS
|
|
112
113
|
# after:
|
113
114
|
# (send (send (send nil "$" (send nil :a)) :b) :c)
|
114
115
|
if node.type == :send and node.children[0]
|
116
|
+
stopProps = true if node.children[1] == :[]
|
115
117
|
if node.children[1] == :~ and node.children[0].children[1] == :~
|
116
118
|
# consecutive tildes
|
117
119
|
if node.children[0].children[0].children[1] == :~
|
@@ -127,7 +129,8 @@ module Ruby2JS
|
|
127
129
|
method = :each! if method == :each
|
128
130
|
rewrite = [rewrite_tilda[node.children[0]],
|
129
131
|
method, *node.children[2..-1]]
|
130
|
-
if props.include? node.children[1]
|
132
|
+
if stopProps or props.include? node.children[1]
|
133
|
+
rewrite[1] = node.children[1]
|
131
134
|
node.updated nil, rewrite
|
132
135
|
elsif domprops.include? method.to_s
|
133
136
|
method = :readOnly if method.to_s == 'readonly'
|
@@ -0,0 +1,190 @@
|
|
1
|
+
require 'ruby2js'
|
2
|
+
|
3
|
+
module Ruby2JS
|
4
|
+
module Filter
|
5
|
+
module MiniTestJasmine
|
6
|
+
include SEXP
|
7
|
+
|
8
|
+
RELOPS = [:<, :<=, :==, :>=, :>].
|
9
|
+
map {|sym| Parser::AST::Node.new :sym, [sym]}
|
10
|
+
|
11
|
+
def on_class(node)
|
12
|
+
name, inheritance, *body = node.children
|
13
|
+
return super unless inheritance == s(:const, s(:const, nil,
|
14
|
+
:Minitest), :Test)
|
15
|
+
|
16
|
+
if body.length == 1 and body.first.type == :begin
|
17
|
+
body = body.first.children
|
18
|
+
end
|
19
|
+
|
20
|
+
body = body.map do |node|
|
21
|
+
if node.type == :def and node.children.first =~ /^test_/
|
22
|
+
s(:block, s(:send, nil, :it, s(:str,
|
23
|
+
node.children.first.to_s.sub(/^test_/, '').gsub('_', ' '))),
|
24
|
+
s(:args), node.children.last)
|
25
|
+
elsif node.type == :def and node.children.first == :setup
|
26
|
+
s(:block, s(:send, nil, :before), s(:args), node.children.last)
|
27
|
+
elsif node.type == :def and node.children.first == :teardown
|
28
|
+
s(:block, s(:send, nil, :after), s(:args), node.children.last)
|
29
|
+
else
|
30
|
+
node
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
process s(:block, s(:send, nil, :describe, s(:sym, name.children[1])),
|
35
|
+
s(:args), s(:begin, *body))
|
36
|
+
end
|
37
|
+
|
38
|
+
def on_block(node)
|
39
|
+
call = node.children.first
|
40
|
+
return super unless call.children.first == nil
|
41
|
+
|
42
|
+
if call.children[1] == :describe
|
43
|
+
begin
|
44
|
+
describe, @jasmine_describe = @jasmine_describe, true
|
45
|
+
s(:block, *node.children[0..-2], process(node.children.last))
|
46
|
+
ensure
|
47
|
+
@jasmine_describe = describe
|
48
|
+
end
|
49
|
+
elsif @jasmine_describe and call.children[1] == :before
|
50
|
+
process s(:block, s(:send, nil, :beforeEach, *call.children[2..-1]),
|
51
|
+
*node.children[1..-1])
|
52
|
+
elsif @jasmine_describe and call.children[1] == :after
|
53
|
+
process s(:block, s(:send, nil, :afterEach, *call.children[2..-1]),
|
54
|
+
*node.children[1..-1])
|
55
|
+
else
|
56
|
+
super
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
def on_send(node)
|
61
|
+
target, method, *args = node.children
|
62
|
+
if target
|
63
|
+
if method==:must_be && args.length==2 && RELOPS.include?(args[0])
|
64
|
+
process s(:send, nil, :assert_operator, target, *args)
|
65
|
+
elsif method==:must_be_close_to && [1,2].include?(args.length)
|
66
|
+
process s(:send, nil, :assert_in_delta, target, *args)
|
67
|
+
elsif method==:must_be_within_delta && [1,2].include?(args.length)
|
68
|
+
process s(:send, nil, :assert_in_delta, target, *args)
|
69
|
+
elsif method==:must_be_nil && args.length == 0
|
70
|
+
process s(:send, nil, :assert_nil, target)
|
71
|
+
elsif method==:must_equal && args.length == 1
|
72
|
+
process s(:send, nil, :assert_equal, args.first, target)
|
73
|
+
elsif method==:must_include && args.length == 1
|
74
|
+
process s(:send, nil, :assert_includes, target, args.first)
|
75
|
+
elsif method==:must_match && args.length == 1
|
76
|
+
process s(:send, nil, :assert_match, args.first, target)
|
77
|
+
|
78
|
+
elsif method==:cant_be && args.length==2 && RELOPS.include?(args[0])
|
79
|
+
process s(:send, nil, :refute_operator, target, *args)
|
80
|
+
elsif method==:cant_be_close_to && [1,2].include?(args.length)
|
81
|
+
process s(:send, nil, :refute_in_delta, target, *args)
|
82
|
+
elsif method==:cant_be_within_delta && [1,2].include?(args.length)
|
83
|
+
process s(:send, nil, :refute_in_delta, target, *args)
|
84
|
+
elsif method==:cant_be_nil && args.length == 0
|
85
|
+
process s(:send, nil, :refute_nil, target)
|
86
|
+
elsif method==:cant_equal && args.length == 1
|
87
|
+
process s(:send, nil, :refute_equal, args.first, target)
|
88
|
+
elsif method==:cant_include && args.length == 1
|
89
|
+
process s(:send, nil, :refute_includes, target, args.first)
|
90
|
+
elsif method==:cant_match && args.length == 1
|
91
|
+
process s(:send, nil, :refute_match, args.first, target)
|
92
|
+
|
93
|
+
else
|
94
|
+
super
|
95
|
+
end
|
96
|
+
|
97
|
+
else
|
98
|
+
if method == :assert and args.length == 1
|
99
|
+
process s(:send, s(:send, nil, :expect, args.first), :toBeTruthy)
|
100
|
+
elsif method == :assert_equal and args.length == 2
|
101
|
+
if [:str, :int, :float].include? args.first.type
|
102
|
+
process s(:send, s(:send, nil, :expect, args.last), :toBe,
|
103
|
+
args.first)
|
104
|
+
else
|
105
|
+
process s(:send, s(:send, nil, :expect, args.last), :toEqual,
|
106
|
+
args.first)
|
107
|
+
end
|
108
|
+
elsif method == :assert_in_delta and [2,3].include? args.length
|
109
|
+
delta = (args.length == 3 ? args.last : s(:float, 0.001))
|
110
|
+
process s(:send, s(:send, nil, :expect, args[1]), :toBeCloseTo,
|
111
|
+
args.first, delta)
|
112
|
+
elsif method == :assert_includes and args.length == 2
|
113
|
+
process s(:send, s(:send, nil, :expect, args.first), :toContain,
|
114
|
+
args.last)
|
115
|
+
elsif method == :assert_match and args.length == 2
|
116
|
+
process s(:send, s(:send, nil, :expect, args.last), :toMatch,
|
117
|
+
args.first)
|
118
|
+
elsif method == :assert_nil and args.length == 1
|
119
|
+
process s(:send, s(:send, nil, :expect, args.first), :toBeNull)
|
120
|
+
elsif method==:assert_operator && args.length==3 && args[1].type==:sym
|
121
|
+
if args[1].children.first == :<
|
122
|
+
process s(:send, s(:send, nil, :expect, args.first),
|
123
|
+
:toBeLessThan, args.last)
|
124
|
+
elsif args[1].children.first == :<=
|
125
|
+
process s(:send, s(:send, nil, :expect, args.last),
|
126
|
+
:toBeGreaterThan, args.first)
|
127
|
+
elsif args[1].children.first == :>
|
128
|
+
process s(:send, s(:send, nil, :expect, args.first),
|
129
|
+
:toBeGreaterThan, args.last)
|
130
|
+
elsif args[1].children.first == :>=
|
131
|
+
process s(:send, s(:send, nil, :expect, args.last),
|
132
|
+
:toBeLessThan, args.first)
|
133
|
+
elsif args[1].children.first == :==
|
134
|
+
process s(:send, nil, :assert_equal, args.last, args.first)
|
135
|
+
else
|
136
|
+
super
|
137
|
+
end
|
138
|
+
|
139
|
+
elsif method == :refute and args.length == 1
|
140
|
+
process s(:send, s(:send, nil, :expect, args.first), :toBeFalsy)
|
141
|
+
elsif method == :refute_equal and args.length == 2
|
142
|
+
if [:str, :int, :float].include? args.first.type
|
143
|
+
process s(:send, s(:attr, s(:send, nil, :expect, args.last),
|
144
|
+
:not), :toBe, args.first)
|
145
|
+
else
|
146
|
+
process s(:send, s(:attr, s(:send, nil, :expect, args.last),
|
147
|
+
:not), :toEqual, args.first)
|
148
|
+
end
|
149
|
+
elsif method == :refute_in_delta and [2,3].include? args.length
|
150
|
+
delta = (args.length == 3 ? args.last : s(:float, 0.001))
|
151
|
+
process s(:send, s(:send, nil, :expect, args[1]), :toBeCloseTo,
|
152
|
+
args.first, delta)
|
153
|
+
elsif method == :refute_includes and args.length == 2
|
154
|
+
process s(:send, s(:attr, s(:send, nil, :expect, args.first),
|
155
|
+
:not), :toContain, args.last)
|
156
|
+
elsif method == :refute_match and args.length == 2
|
157
|
+
process s(:send, s(:attr, s(:send, nil, :expect, args.last),
|
158
|
+
:not), :toMatch, args.first)
|
159
|
+
elsif method == :refute_nil and args.length == 1
|
160
|
+
process s(:send, s(:attr, s(:send, nil, :expect, args.first),
|
161
|
+
:not), :toBeNull)
|
162
|
+
elsif method==:refute_operator && args.length==3 && args[1].type==:sym
|
163
|
+
if args[1].children.first == :<=
|
164
|
+
process s(:send, s(:send, nil, :expect, args.first),
|
165
|
+
:toBeGreaterThan, args.last)
|
166
|
+
elsif args[1].children.first == :<
|
167
|
+
process s(:send, s(:attr, s(:send, nil, :expect, args.last),
|
168
|
+
:not), :toBeLessThan, args.first)
|
169
|
+
elsif args[1].children.first == :>
|
170
|
+
process s(:send, s(:attr, s(:send, nil, :expect, args.first),
|
171
|
+
:not), :toBeGreaterThan, args.last)
|
172
|
+
elsif args[1].children.first == :>=
|
173
|
+
process s(:send, s(:send, nil, :expect, args.first),
|
174
|
+
:toBeLessThan, args.last)
|
175
|
+
elsif args[1].children.first == :==
|
176
|
+
process s(:send, nil, :refute_equal, args.last, args.first)
|
177
|
+
else
|
178
|
+
super
|
179
|
+
end
|
180
|
+
|
181
|
+
else
|
182
|
+
super
|
183
|
+
end
|
184
|
+
end
|
185
|
+
end
|
186
|
+
end
|
187
|
+
|
188
|
+
DEFAULTS.push MiniTestJasmine
|
189
|
+
end
|
190
|
+
end
|
data/lib/ruby2js/version.rb
CHANGED
data/ruby2js.gemspec
CHANGED
@@ -2,18 +2,18 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "ruby2js"
|
5
|
-
s.version = "1.9.
|
5
|
+
s.version = "1.9.1"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Sam Ruby"]
|
9
|
-
s.date = "2014-
|
9
|
+
s.date = "2014-05-13"
|
10
10
|
s.description = " The base package maps Ruby syntax to JavaScript semantics.\n Filters may be provided to add Ruby-specific or framework specific\n behavior.\n"
|
11
11
|
s.email = "rubys@intertwingly.net"
|
12
|
-
s.files = ["ruby2js.gemspec", "README.md", "lib/ruby2js", "lib/ruby2js/
|
12
|
+
s.files = ["ruby2js.gemspec", "README.md", "lib/ruby2js", "lib/ruby2js/converter.rb", "lib/ruby2js/version.rb", "lib/ruby2js/filter", "lib/ruby2js/filter/jquery.rb", "lib/ruby2js/filter/return.rb", "lib/ruby2js/filter/underscore.rb", "lib/ruby2js/filter/angularrb.rb", "lib/ruby2js/filter/minitest-jasmine.rb", "lib/ruby2js/filter/strict.rb", "lib/ruby2js/filter/functions.rb", "lib/ruby2js/filter/angular-resource.rb", "lib/ruby2js/filter/angular-route.rb", "lib/ruby2js/sinatra.rb", "lib/ruby2js/rails.rb", "lib/ruby2js/cgi.rb", "lib/ruby2js/converter", "lib/ruby2js/converter/self.rb", "lib/ruby2js/converter/arg.rb", "lib/ruby2js/converter/dstr.rb", "lib/ruby2js/converter/xstr.rb", "lib/ruby2js/converter/sym.rb", "lib/ruby2js/converter/return.rb", "lib/ruby2js/converter/break.rb", "lib/ruby2js/converter/for.rb", "lib/ruby2js/converter/defined.rb", "lib/ruby2js/converter/cvasgn.rb", "lib/ruby2js/converter/whilepost.rb", "lib/ruby2js/converter/logical.rb", "lib/ruby2js/converter/args.rb", "lib/ruby2js/converter/def.rb", "lib/ruby2js/converter/prototype.rb", "lib/ruby2js/converter/class.rb", "lib/ruby2js/converter/opasgn.rb", "lib/ruby2js/converter/module.rb", "lib/ruby2js/converter/kwbegin.rb", "lib/ruby2js/converter/send.rb", "lib/ruby2js/converter/boolean.rb", "lib/ruby2js/converter/masgn.rb", "lib/ruby2js/converter/hash.rb", "lib/ruby2js/converter/cvar.rb", "lib/ruby2js/converter/ivasgn.rb", "lib/ruby2js/converter/case.rb", "lib/ruby2js/converter/const.rb", "lib/ruby2js/converter/vasgn.rb", "lib/ruby2js/converter/untilpost.rb", "lib/ruby2js/converter/begin.rb", "lib/ruby2js/converter/ivar.rb", "lib/ruby2js/converter/while.rb", "lib/ruby2js/converter/next.rb", "lib/ruby2js/converter/nil.rb", "lib/ruby2js/converter/blockpass.rb", "lib/ruby2js/converter/super.rb", "lib/ruby2js/converter/defs.rb", "lib/ruby2js/converter/array.rb", "lib/ruby2js/converter/block.rb", "lib/ruby2js/converter/if.rb", "lib/ruby2js/converter/until.rb", "lib/ruby2js/converter/regexp.rb", "lib/ruby2js/converter/casgn.rb", "lib/ruby2js/converter/undef.rb", "lib/ruby2js/converter/literal.rb", "lib/ruby2js/converter/var.rb", "lib/ruby2js.rb"]
|
13
13
|
s.homepage = "http://github.com/rubys/ruby2js"
|
14
14
|
s.licenses = ["MIT"]
|
15
15
|
s.require_paths = ["lib"]
|
16
|
-
s.rubygems_version = "1.8.
|
16
|
+
s.rubygems_version = "1.8.23"
|
17
17
|
s.summary = "Minimal yet extensible Ruby to JavaScript conversion."
|
18
18
|
|
19
19
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby2js
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-05-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: parser
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,12 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
25
30
|
description: ! " The base package maps Ruby syntax to JavaScript semantics.\n Filters
|
26
31
|
may be provided to add Ruby-specific or framework specific\n behavior.\n"
|
27
32
|
email: rubys@intertwingly.net
|
@@ -31,65 +36,66 @@ extra_rdoc_files: []
|
|
31
36
|
files:
|
32
37
|
- ruby2js.gemspec
|
33
38
|
- README.md
|
34
|
-
- lib/ruby2js/sinatra.rb
|
35
39
|
- lib/ruby2js/converter.rb
|
36
|
-
- lib/ruby2js/
|
40
|
+
- lib/ruby2js/version.rb
|
37
41
|
- lib/ruby2js/filter/jquery.rb
|
38
42
|
- lib/ruby2js/filter/return.rb
|
39
43
|
- lib/ruby2js/filter/underscore.rb
|
40
44
|
- lib/ruby2js/filter/angularrb.rb
|
45
|
+
- lib/ruby2js/filter/minitest-jasmine.rb
|
41
46
|
- lib/ruby2js/filter/strict.rb
|
42
47
|
- lib/ruby2js/filter/functions.rb
|
43
48
|
- lib/ruby2js/filter/angular-resource.rb
|
44
|
-
- lib/ruby2js/
|
49
|
+
- lib/ruby2js/filter/angular-route.rb
|
50
|
+
- lib/ruby2js/sinatra.rb
|
51
|
+
- lib/ruby2js/rails.rb
|
52
|
+
- lib/ruby2js/cgi.rb
|
45
53
|
- lib/ruby2js/converter/self.rb
|
46
|
-
- lib/ruby2js/converter/prototype.rb
|
47
|
-
- lib/ruby2js/converter/undef.rb
|
48
|
-
- lib/ruby2js/converter/casgn.rb
|
49
|
-
- lib/ruby2js/converter/nil.rb
|
50
|
-
- lib/ruby2js/converter/logical.rb
|
51
|
-
- lib/ruby2js/converter/ivar.rb
|
52
|
-
- lib/ruby2js/converter/super.rb
|
53
|
-
- lib/ruby2js/converter/class.rb
|
54
|
-
- lib/ruby2js/converter/for.rb
|
55
54
|
- lib/ruby2js/converter/arg.rb
|
56
|
-
- lib/ruby2js/converter/literal.rb
|
57
|
-
- lib/ruby2js/converter/cvasgn.rb
|
58
55
|
- lib/ruby2js/converter/dstr.rb
|
56
|
+
- lib/ruby2js/converter/xstr.rb
|
57
|
+
- lib/ruby2js/converter/sym.rb
|
59
58
|
- lib/ruby2js/converter/return.rb
|
59
|
+
- lib/ruby2js/converter/break.rb
|
60
|
+
- lib/ruby2js/converter/for.rb
|
60
61
|
- lib/ruby2js/converter/defined.rb
|
61
|
-
- lib/ruby2js/converter/
|
62
|
-
- lib/ruby2js/converter/
|
63
|
-
- lib/ruby2js/converter/
|
64
|
-
- lib/ruby2js/converter/def.rb
|
62
|
+
- lib/ruby2js/converter/cvasgn.rb
|
63
|
+
- lib/ruby2js/converter/whilepost.rb
|
64
|
+
- lib/ruby2js/converter/logical.rb
|
65
65
|
- lib/ruby2js/converter/args.rb
|
66
|
-
- lib/ruby2js/converter/
|
67
|
-
- lib/ruby2js/converter/
|
68
|
-
- lib/ruby2js/converter/
|
69
|
-
- lib/ruby2js/converter/
|
66
|
+
- lib/ruby2js/converter/def.rb
|
67
|
+
- lib/ruby2js/converter/prototype.rb
|
68
|
+
- lib/ruby2js/converter/class.rb
|
69
|
+
- lib/ruby2js/converter/opasgn.rb
|
70
|
+
- lib/ruby2js/converter/module.rb
|
71
|
+
- lib/ruby2js/converter/kwbegin.rb
|
72
|
+
- lib/ruby2js/converter/send.rb
|
73
|
+
- lib/ruby2js/converter/boolean.rb
|
70
74
|
- lib/ruby2js/converter/masgn.rb
|
71
75
|
- lib/ruby2js/converter/hash.rb
|
72
76
|
- lib/ruby2js/converter/cvar.rb
|
73
|
-
- lib/ruby2js/converter/
|
74
|
-
- lib/ruby2js/converter/break.rb
|
75
|
-
- lib/ruby2js/converter/opasgn.rb
|
76
|
-
- lib/ruby2js/converter/begin.rb
|
77
|
-
- lib/ruby2js/converter/xstr.rb
|
78
|
-
- lib/ruby2js/converter/vasgn.rb
|
79
|
-
- lib/ruby2js/converter/block.rb
|
80
|
-
- lib/ruby2js/converter/send.rb
|
81
|
-
- lib/ruby2js/converter/sym.rb
|
77
|
+
- lib/ruby2js/converter/ivasgn.rb
|
82
78
|
- lib/ruby2js/converter/case.rb
|
83
|
-
- lib/ruby2js/converter/kwbegin.rb
|
84
79
|
- lib/ruby2js/converter/const.rb
|
85
|
-
- lib/ruby2js/converter/
|
86
|
-
- lib/ruby2js/converter/until.rb
|
80
|
+
- lib/ruby2js/converter/vasgn.rb
|
87
81
|
- lib/ruby2js/converter/untilpost.rb
|
88
|
-
- lib/ruby2js/converter/
|
82
|
+
- lib/ruby2js/converter/begin.rb
|
83
|
+
- lib/ruby2js/converter/ivar.rb
|
89
84
|
- lib/ruby2js/converter/while.rb
|
90
|
-
- lib/ruby2js/
|
91
|
-
- lib/ruby2js/
|
92
|
-
- lib/ruby2js/
|
85
|
+
- lib/ruby2js/converter/next.rb
|
86
|
+
- lib/ruby2js/converter/nil.rb
|
87
|
+
- lib/ruby2js/converter/blockpass.rb
|
88
|
+
- lib/ruby2js/converter/super.rb
|
89
|
+
- lib/ruby2js/converter/defs.rb
|
90
|
+
- lib/ruby2js/converter/array.rb
|
91
|
+
- lib/ruby2js/converter/block.rb
|
92
|
+
- lib/ruby2js/converter/if.rb
|
93
|
+
- lib/ruby2js/converter/until.rb
|
94
|
+
- lib/ruby2js/converter/regexp.rb
|
95
|
+
- lib/ruby2js/converter/casgn.rb
|
96
|
+
- lib/ruby2js/converter/undef.rb
|
97
|
+
- lib/ruby2js/converter/literal.rb
|
98
|
+
- lib/ruby2js/converter/var.rb
|
93
99
|
- lib/ruby2js.rb
|
94
100
|
homepage: http://github.com/rubys/ruby2js
|
95
101
|
licenses:
|
@@ -112,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
118
|
version: '0'
|
113
119
|
requirements: []
|
114
120
|
rubyforge_project:
|
115
|
-
rubygems_version: 1.8.
|
121
|
+
rubygems_version: 1.8.23
|
116
122
|
signing_key:
|
117
123
|
specification_version: 3
|
118
124
|
summary: Minimal yet extensible Ruby to JavaScript conversion.
|