ruby2js 4.0.0 → 4.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +0 -1
  3. data/lib/ruby2js.rb +16 -3
  4. data/lib/ruby2js/converter.rb +31 -0
  5. data/lib/ruby2js/converter/args.rb +6 -1
  6. data/lib/ruby2js/converter/class.rb +3 -0
  7. data/lib/ruby2js/converter/class2.rb +8 -5
  8. data/lib/ruby2js/converter/def.rb +8 -2
  9. data/lib/ruby2js/converter/dstr.rb +3 -1
  10. data/lib/ruby2js/converter/for.rb +1 -1
  11. data/lib/ruby2js/converter/hash.rb +19 -1
  12. data/lib/ruby2js/converter/logical.rb +1 -1
  13. data/lib/ruby2js/converter/next.rb +10 -2
  14. data/lib/ruby2js/converter/redo.rb +14 -0
  15. data/lib/ruby2js/converter/return.rb +2 -1
  16. data/lib/ruby2js/converter/send.rb +30 -4
  17. data/lib/ruby2js/converter/taglit.rb +9 -2
  18. data/lib/ruby2js/converter/while.rb +1 -1
  19. data/lib/ruby2js/converter/whilepost.rb +1 -1
  20. data/lib/ruby2js/converter/xstr.rb +1 -2
  21. data/lib/ruby2js/filter/camelCase.rb +2 -0
  22. data/lib/ruby2js/filter/functions.rb +39 -11
  23. data/lib/ruby2js/filter/lit-element.rb +202 -0
  24. data/lib/ruby2js/filter/react.rb +6 -16
  25. data/lib/ruby2js/filter/require.rb +2 -6
  26. data/lib/ruby2js/filter/stimulus.rb +4 -2
  27. data/lib/ruby2js/filter/tagged_templates.rb +4 -2
  28. data/lib/ruby2js/jsx.rb +19 -1
  29. data/lib/ruby2js/rails.rb +6 -59
  30. data/lib/ruby2js/serializer.rb +16 -11
  31. data/lib/ruby2js/sprockets.rb +40 -0
  32. data/lib/ruby2js/version.rb +1 -1
  33. data/lib/tasks/README.md +4 -0
  34. data/lib/tasks/install/app/javascript/elements/index.js +2 -0
  35. data/lib/tasks/install/litelement.rb +9 -0
  36. data/lib/tasks/install/react.rb +2 -0
  37. data/lib/tasks/install/stimulus-sprockets.rb +32 -0
  38. data/lib/tasks/install/stimulus-webpacker.rb +5 -0
  39. data/lib/tasks/install/webpacker.rb +97 -0
  40. data/lib/tasks/nodetest.js +47 -0
  41. data/lib/tasks/ruby2js_tasks.rake +42 -0
  42. data/ruby2js.gemspec +1 -1
  43. metadata +18 -6
data/ruby2js.gemspec CHANGED
@@ -19,5 +19,5 @@ Gem::Specification.new do |s|
19
19
  s.summary = "Minimal yet extensible Ruby to JavaScript conversion.".freeze
20
20
 
21
21
  s.add_dependency('parser')
22
- s.add_dependency('regexp_parser')
22
+ s.add_dependency('regexp_parser', '~> 2.1.1')
23
23
  end
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: 4.0.0
4
+ version: 4.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Ruby
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-02-10 00:00:00.000000000 Z
12
+ date: 2021-03-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: parser
@@ -29,16 +29,16 @@ dependencies:
29
29
  name: regexp_parser
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ">="
32
+ - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: '0'
34
+ version: 2.1.1
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ">="
39
+ - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: '0'
41
+ version: 2.1.1
42
42
  description: |2
43
43
  The base package maps Ruby syntax to JavaScript semantics.
44
44
  Filters may be provided to add Ruby-specific or framework specific
@@ -91,6 +91,7 @@ files:
91
91
  - lib/ruby2js/converter/nthref.rb
92
92
  - lib/ruby2js/converter/opasgn.rb
93
93
  - lib/ruby2js/converter/prototype.rb
94
+ - lib/ruby2js/converter/redo.rb
94
95
  - lib/ruby2js/converter/regexp.rb
95
96
  - lib/ruby2js/converter/return.rb
96
97
  - lib/ruby2js/converter/self.rb
@@ -134,6 +135,7 @@ files:
134
135
  - lib/ruby2js/filter/functions.rb
135
136
  - lib/ruby2js/filter/jquery.rb
136
137
  - lib/ruby2js/filter/jsx.rb
138
+ - lib/ruby2js/filter/lit-element.rb
137
139
  - lib/ruby2js/filter/matchAll.rb
138
140
  - lib/ruby2js/filter/minitest-jasmine.rb
139
141
  - lib/ruby2js/filter/node.rb
@@ -152,8 +154,18 @@ files:
152
154
  - lib/ruby2js/rails.rb
153
155
  - lib/ruby2js/serializer.rb
154
156
  - lib/ruby2js/sinatra.rb
157
+ - lib/ruby2js/sprockets.rb
155
158
  - lib/ruby2js/strict.rb
156
159
  - lib/ruby2js/version.rb
160
+ - lib/tasks/README.md
161
+ - lib/tasks/install/app/javascript/elements/index.js
162
+ - lib/tasks/install/litelement.rb
163
+ - lib/tasks/install/react.rb
164
+ - lib/tasks/install/stimulus-sprockets.rb
165
+ - lib/tasks/install/stimulus-webpacker.rb
166
+ - lib/tasks/install/webpacker.rb
167
+ - lib/tasks/nodetest.js
168
+ - lib/tasks/ruby2js_tasks.rake
157
169
  - ruby2js.gemspec
158
170
  homepage: http://github.com/rubys/ruby2js
159
171
  licenses: