opal 1.0.5 → 1.1.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (394) hide show
  1. checksums.yaml +4 -4
  2. data/.codeclimate.yml +14 -12
  3. data/.gitattributes +1 -1
  4. data/.github/workflows/build.yml +15 -10
  5. data/.jshintrc +1 -1
  6. data/.overcommit.yml +35 -0
  7. data/.rubocop.yml +44 -7
  8. data/{.rubocop_todo.yml → .rubocop/todo.yml} +4 -5
  9. data/CHANGELOG.md +87 -2
  10. data/Gemfile +1 -2
  11. data/HACKING.md +2 -9
  12. data/README.md +20 -17
  13. data/UNRELEASED.md +108 -0
  14. data/benchmark-ips/bm_array_pop_1.rb +8 -0
  15. data/benchmark-ips/bm_array_shift.rb +7 -0
  16. data/benchmark-ips/class_shovel_vs_singleton_class.rb +16 -0
  17. data/bin/build-browser-source-map-support +5 -0
  18. data/bin/format-filters +54 -0
  19. data/bin/remove-filters +39 -0
  20. data/docs/roda-sprockets.md +86 -0
  21. data/docs/sinatra.md +5 -12
  22. data/examples/rack/Gemfile +1 -0
  23. data/examples/rack/app/application.rb +3 -0
  24. data/examples/rack/config.ru +5 -4
  25. data/exe/opal-repl +2 -83
  26. data/lib/opal/ast/builder.rb +1 -1
  27. data/lib/opal/builder.rb +2 -10
  28. data/lib/opal/builder_processors.rb +1 -1
  29. data/lib/opal/cli_runners.rb +27 -37
  30. data/lib/opal/cli_runners/applescript.rb +5 -44
  31. data/lib/opal/cli_runners/chrome.js +7 -35
  32. data/lib/opal/cli_runners/chrome.rb +75 -17
  33. data/lib/opal/cli_runners/compiler.rb +17 -0
  34. data/lib/opal/cli_runners/nashorn.rb +9 -43
  35. data/lib/opal/cli_runners/nodejs.rb +18 -47
  36. data/lib/opal/cli_runners/server.rb +18 -6
  37. data/lib/opal/cli_runners/source-map-support-browser.js +6445 -0
  38. data/lib/opal/cli_runners/source-map-support.js +639 -0
  39. data/lib/opal/cli_runners/system_runner.rb +45 -0
  40. data/lib/opal/compiler.rb +57 -29
  41. data/lib/opal/config.rb +0 -5
  42. data/lib/opal/erb.rb +1 -1
  43. data/lib/opal/magic_comments.rb +34 -0
  44. data/lib/opal/nodes/args/arity_check.rb +2 -1
  45. data/lib/opal/nodes/base.rb +1 -1
  46. data/lib/opal/nodes/call.rb +1 -4
  47. data/lib/opal/nodes/def.rb +2 -0
  48. data/lib/opal/nodes/iter.rb +1 -1
  49. data/lib/opal/nodes/literal.rb +19 -14
  50. data/lib/opal/nodes/logic.rb +5 -80
  51. data/lib/opal/nodes/masgn.rb +2 -0
  52. data/lib/opal/nodes/rescue.rb +1 -1
  53. data/lib/opal/nodes/super.rb +24 -10
  54. data/lib/opal/nodes/top.rb +5 -4
  55. data/lib/opal/parser/with_c_lexer.rb +2 -1
  56. data/lib/opal/parser/with_ruby_lexer.rb +1 -1
  57. data/lib/opal/path_reader.rb +2 -2
  58. data/lib/opal/paths.rb +8 -5
  59. data/lib/opal/repl.rb +103 -0
  60. data/lib/opal/rewriter.rb +4 -0
  61. data/lib/opal/rewriters/for_rewriter.rb +1 -1
  62. data/lib/opal/rewriters/js_reserved_words.rb +7 -7
  63. data/lib/opal/rewriters/numblocks.rb +31 -0
  64. data/lib/opal/rewriters/returnable_logic.rb +33 -0
  65. data/lib/opal/version.rb +1 -1
  66. data/opal.gemspec +25 -25
  67. data/opal/corelib/array.rb +160 -118
  68. data/opal/corelib/array/pack.rb +5 -3
  69. data/opal/corelib/basic_object.rb +4 -4
  70. data/opal/corelib/class.rb +2 -1
  71. data/opal/corelib/comparable.rb +49 -31
  72. data/opal/corelib/constants.rb +5 -5
  73. data/opal/corelib/enumerable.rb +108 -46
  74. data/opal/corelib/enumerator.rb +27 -12
  75. data/opal/corelib/file.rb +3 -1
  76. data/opal/corelib/hash.rb +6 -1
  77. data/opal/corelib/helpers.rb +8 -28
  78. data/opal/corelib/io.rb +12 -7
  79. data/opal/corelib/kernel.rb +45 -14
  80. data/opal/corelib/kernel/format.rb +3 -1
  81. data/opal/corelib/math.rb +8 -6
  82. data/opal/corelib/method.rb +8 -0
  83. data/opal/corelib/module.rb +17 -2
  84. data/opal/corelib/number.rb +3 -12
  85. data/opal/corelib/proc.rb +16 -0
  86. data/opal/corelib/random/mersenne_twister.rb +147 -0
  87. data/opal/corelib/range.rb +3 -13
  88. data/opal/corelib/regexp.rb +10 -6
  89. data/opal/corelib/runtime.js +208 -81
  90. data/opal/corelib/string.rb +55 -49
  91. data/opal/corelib/string/encoding.rb +109 -32
  92. data/opal/corelib/string/unpack.rb +2 -17
  93. data/opal/corelib/struct.rb +14 -1
  94. data/opal/corelib/time.rb +4 -0
  95. data/opal/opal.rb +1 -1
  96. data/opal/opal/mini.rb +1 -1
  97. data/package.json +1 -0
  98. data/spec/README.md +10 -0
  99. data/spec/filters/bugs/array.rb +76 -0
  100. data/spec/filters/bugs/base64.rb +10 -0
  101. data/spec/filters/bugs/basicobject.rb +12 -0
  102. data/spec/filters/bugs/bigdecimal.rb +248 -0
  103. data/spec/filters/bugs/class.rb +12 -0
  104. data/spec/filters/bugs/complex.rb +7 -0
  105. data/spec/filters/bugs/date.rb +104 -0
  106. data/spec/filters/bugs/encoding.rb +259 -0
  107. data/spec/filters/bugs/enumerable.rb +26 -0
  108. data/spec/filters/bugs/enumerator.rb +48 -0
  109. data/spec/filters/bugs/exception.rb +120 -0
  110. data/spec/filters/bugs/file.rb +48 -0
  111. data/spec/filters/bugs/float.rb +74 -0
  112. data/spec/filters/bugs/hash.rb +60 -0
  113. data/spec/filters/bugs/integer.rb +78 -0
  114. data/spec/filters/bugs/io.rb +9 -0
  115. data/spec/filters/bugs/kernel.rb +401 -0
  116. data/spec/filters/bugs/language.rb +451 -0
  117. data/spec/filters/bugs/marshal.rb +50 -0
  118. data/spec/filters/bugs/math.rb +4 -0
  119. data/spec/filters/bugs/method.rb +79 -0
  120. data/spec/filters/bugs/module.rb +281 -0
  121. data/spec/filters/bugs/nilclass.rb +4 -0
  122. data/spec/filters/bugs/numeric.rb +27 -0
  123. data/spec/filters/bugs/openstruct.rb +8 -0
  124. data/spec/filters/bugs/pack_unpack.rb +138 -0
  125. data/spec/filters/bugs/pathname.rb +9 -0
  126. data/spec/filters/bugs/proc.rb +80 -0
  127. data/spec/filters/bugs/random.rb +20 -0
  128. data/spec/filters/bugs/range.rb +139 -0
  129. data/spec/filters/bugs/rational.rb +12 -0
  130. data/spec/filters/bugs/regexp.rb +91 -0
  131. data/spec/filters/bugs/set.rb +51 -0
  132. data/spec/filters/bugs/singleton.rb +7 -0
  133. data/spec/filters/bugs/string.rb +341 -0
  134. data/spec/filters/bugs/stringscanner.rb +78 -0
  135. data/spec/filters/bugs/struct.rb +26 -0
  136. data/spec/filters/bugs/symbol.rb +7 -0
  137. data/spec/filters/bugs/time.rb +109 -0
  138. data/spec/filters/bugs/unboundmethod.rb +33 -0
  139. data/spec/filters/bugs/warnings.rb +30 -0
  140. data/spec/filters/unsupported/array.rb +168 -0
  141. data/spec/filters/unsupported/basicobject.rb +15 -0
  142. data/spec/filters/unsupported/bignum.rb +55 -0
  143. data/spec/filters/unsupported/class.rb +5 -0
  144. data/spec/filters/unsupported/delegator.rb +6 -0
  145. data/spec/filters/unsupported/enumerable.rb +12 -0
  146. data/spec/filters/unsupported/enumerator.rb +14 -0
  147. data/spec/filters/unsupported/file.rb +4 -0
  148. data/spec/filters/unsupported/fixnum.rb +15 -0
  149. data/spec/filters/unsupported/float.rb +47 -0
  150. data/spec/filters/unsupported/freeze.rb +259 -0
  151. data/spec/filters/unsupported/hash.rb +44 -0
  152. data/spec/filters/unsupported/integer.rb +101 -0
  153. data/spec/filters/unsupported/kernel.rb +35 -0
  154. data/spec/filters/unsupported/language.rb +25 -0
  155. data/spec/filters/unsupported/marshal.rb +44 -0
  156. data/spec/filters/unsupported/matchdata.rb +63 -0
  157. data/spec/filters/unsupported/math.rb +4 -0
  158. data/spec/filters/unsupported/pathname.rb +4 -0
  159. data/spec/filters/unsupported/privacy.rb +287 -0
  160. data/spec/filters/unsupported/proc.rb +4 -0
  161. data/spec/filters/unsupported/random.rb +5 -0
  162. data/spec/filters/unsupported/range.rb +8 -0
  163. data/spec/filters/unsupported/regexp.rb +70 -0
  164. data/spec/filters/unsupported/set.rb +5 -0
  165. data/spec/filters/unsupported/singleton.rb +7 -0
  166. data/spec/filters/unsupported/string.rb +687 -0
  167. data/spec/filters/unsupported/struct.rb +7 -0
  168. data/spec/filters/unsupported/symbol.rb +21 -0
  169. data/spec/filters/unsupported/taint.rb +162 -0
  170. data/spec/filters/unsupported/thread.rb +10 -0
  171. data/spec/filters/unsupported/time.rb +204 -0
  172. data/spec/filters/unsupported/usage_of_files.rb +262 -0
  173. data/spec/lib/builder_processors_spec.rb +44 -0
  174. data/spec/lib/builder_spec.rb +133 -0
  175. data/spec/lib/cli_runners/server_spec.rb +25 -0
  176. data/spec/lib/cli_runners_spec.rb +16 -0
  177. data/spec/lib/cli_spec.rb +256 -0
  178. data/spec/lib/compiler_spec.rb +693 -0
  179. data/spec/lib/config_spec.rb +112 -0
  180. data/spec/lib/dependency_resolver_spec.rb +43 -0
  181. data/spec/lib/deprecations_spec.rb +17 -0
  182. data/spec/lib/fixtures/complex_sprockets.js.rb.erb +4 -0
  183. data/spec/lib/fixtures/file_with_directives.js +2 -0
  184. data/spec/lib/fixtures/jst_file.js.jst +1 -0
  185. data/spec/lib/fixtures/no_requires.rb +1 -0
  186. data/spec/lib/fixtures/opal_file.rb +2 -0
  187. data/spec/lib/fixtures/require_tree_test.rb +3 -0
  188. data/spec/lib/fixtures/required_file.js +1 -0
  189. data/spec/lib/fixtures/required_tree_test/required_file1.rb +1 -0
  190. data/spec/lib/fixtures/required_tree_test/required_file2.rb +1 -0
  191. data/spec/lib/fixtures/requires.rb +7 -0
  192. data/spec/lib/fixtures/source_location_test.rb +7 -0
  193. data/spec/lib/fixtures/source_map.rb +1 -0
  194. data/spec/lib/fixtures/source_map/subfolder/other_file.rb +1 -0
  195. data/spec/lib/fixtures/sprockets_file.js.rb +3 -0
  196. data/spec/lib/fixtures/sprockets_require_tree_test.rb +3 -0
  197. data/spec/lib/path_reader_spec.rb +47 -0
  198. data/spec/lib/paths_spec.rb +18 -0
  199. data/spec/lib/repl_spec.rb +28 -0
  200. data/spec/lib/rewriters/base_spec.rb +68 -0
  201. data/spec/lib/rewriters/binary_operator_assignment_spec.rb +153 -0
  202. data/spec/lib/rewriters/block_to_iter_spec.rb +28 -0
  203. data/spec/lib/rewriters/dot_js_syntax_spec.rb +108 -0
  204. data/spec/lib/rewriters/explicit_writer_return_spec.rb +186 -0
  205. data/spec/lib/rewriters/for_rewriter_spec.rb +92 -0
  206. data/spec/lib/rewriters/hashes/key_duplicates_rewriter_spec.rb +47 -0
  207. data/spec/lib/rewriters/js_reserved_words_spec.rb +119 -0
  208. data/spec/lib/rewriters/logical_operator_assignment_spec.rb +202 -0
  209. data/spec/lib/rewriters/opal_engine_check_spec.rb +84 -0
  210. data/spec/lib/rewriters/returnable_logic_spec.rb +52 -0
  211. data/spec/lib/rewriters/rubyspec/filters_rewriter_spec.rb +59 -0
  212. data/spec/lib/simple_server_spec.rb +56 -0
  213. data/spec/lib/source_map/file_spec.rb +67 -0
  214. data/spec/lib/source_map/index_spec.rb +80 -0
  215. data/spec/lib/spec_helper.rb +105 -0
  216. data/spec/mspec-opal/formatters.rb +197 -0
  217. data/spec/mspec-opal/runner.rb +172 -0
  218. data/spec/opal/compiler/irb_spec.rb +44 -0
  219. data/spec/opal/compiler/unicode_spec.rb +10 -0
  220. data/spec/opal/core/array/dup_spec.rb +23 -0
  221. data/spec/opal/core/array/intersection_spec.rb +38 -0
  222. data/spec/opal/core/array/minus_spec.rb +38 -0
  223. data/spec/opal/core/array/union_spec.rb +38 -0
  224. data/spec/opal/core/array/uniq_spec.rb +49 -0
  225. data/spec/opal/core/class/inherited_spec.rb +18 -0
  226. data/spec/opal/core/enumerable/all_break_spec.rb +5 -0
  227. data/spec/opal/core/enumerable/any_break_spec.rb +5 -0
  228. data/spec/opal/core/enumerable/collect_break_spec.rb +13 -0
  229. data/spec/opal/core/enumerable/count_break_spec.rb +5 -0
  230. data/spec/opal/core/enumerable/detect_break_spec.rb +5 -0
  231. data/spec/opal/core/enumerable/drop_while_break_spec.rb +5 -0
  232. data/spec/opal/core/enumerable/each_slice_break_spec.rb +6 -0
  233. data/spec/opal/core/enumerable/each_with_index_break_spec.rb +5 -0
  234. data/spec/opal/core/enumerable/each_with_object_break_spec.rb +5 -0
  235. data/spec/opal/core/enumerable/find_all_break_spec.rb +5 -0
  236. data/spec/opal/core/enumerable/find_index_break_spec.rb +5 -0
  237. data/spec/opal/core/enumerable/grep_break_spec.rb +5 -0
  238. data/spec/opal/core/enumerable/max_break_spec.rb +5 -0
  239. data/spec/opal/core/enumerable/max_by_break_spec.rb +5 -0
  240. data/spec/opal/core/enumerable/min_break_spec.rb +5 -0
  241. data/spec/opal/core/enumerable/min_by_break_spec.rb +5 -0
  242. data/spec/opal/core/enumerable/none_break_spec.rb +5 -0
  243. data/spec/opal/core/enumerable/one_break_spec.rb +5 -0
  244. data/spec/opal/core/enumerable/reduce_break_spec.rb +5 -0
  245. data/spec/opal/core/enumerable/take_while_break_spec.rb +5 -0
  246. data/spec/opal/core/enumerator/with_index_spec.rb +6 -0
  247. data/spec/opal/core/exception_spec.rb +8 -0
  248. data/spec/opal/core/fixtures/require_tree_files/file 1.rb +1 -0
  249. data/spec/opal/core/fixtures/require_tree_files/file 2.rb +1 -0
  250. data/spec/opal/core/fixtures/require_tree_files/file 3.rb +1 -0
  251. data/spec/opal/core/fixtures/require_tree_files/file 4.rb +1 -0
  252. data/spec/opal/core/fixtures/require_tree_files/file 5.rb +1 -0
  253. data/spec/opal/core/fixtures/require_tree_files/nested/nested 1.rb +1 -0
  254. data/spec/opal/core/fixtures/require_tree_files/nested/nested 2.rb +1 -0
  255. data/spec/opal/core/fixtures/require_tree_files/other/other 1.rb +1 -0
  256. data/spec/opal/core/fixtures/require_tree_with_dot/file 1.rb +1 -0
  257. data/spec/opal/core/fixtures/require_tree_with_dot/file 2.rb +1 -0
  258. data/spec/opal/core/fixtures/require_tree_with_dot/file 3.rb +1 -0
  259. data/spec/opal/core/fixtures/require_tree_with_dot/index.rb +3 -0
  260. data/spec/opal/core/hash/internals_spec.rb +339 -0
  261. data/spec/opal/core/helpers_spec.rb +14 -0
  262. data/spec/opal/core/iterable_props_spec.rb +53 -0
  263. data/spec/opal/core/kernel/at_exit_spec.rb +70 -0
  264. data/spec/opal/core/kernel/freeze_spec.rb +15 -0
  265. data/spec/opal/core/kernel/instance_variables_spec.rb +110 -0
  266. data/spec/opal/core/kernel/methods_spec.rb +25 -0
  267. data/spec/opal/core/kernel/public_methods_spec.rb +25 -0
  268. data/spec/opal/core/kernel/require_tree_spec.rb +18 -0
  269. data/spec/opal/core/kernel/respond_to_spec.rb +15 -0
  270. data/spec/opal/core/language/DATA/characters_support_spec.rb +9 -0
  271. data/spec/opal/core/language/DATA/empty___END___spec.rb +7 -0
  272. data/spec/opal/core/language/DATA/multiple___END___spec.rb +10 -0
  273. data/spec/opal/core/language/arguments/mlhs_arg_spec.rb +18 -0
  274. data/spec/opal/core/language/keyword_arguments_spec.rb +9 -0
  275. data/spec/opal/core/language/numblocks_spec.rb +16 -0
  276. data/spec/opal/core/language/safe_navigator_spec.rb +7 -0
  277. data/spec/opal/core/language/while_spec.rb +31 -0
  278. data/spec/opal/core/language_spec.rb +29 -0
  279. data/spec/opal/core/marshal/dump_spec.rb +81 -0
  280. data/spec/opal/core/marshal/load_spec.rb +13 -0
  281. data/spec/opal/core/module_spec.rb +27 -0
  282. data/spec/opal/core/object_id_spec.rb +56 -0
  283. data/spec/opal/core/regexp/interpolation_spec.rb +40 -0
  284. data/spec/opal/core/regexp/match_spec.rb +78 -0
  285. data/spec/opal/core/runtime/bridged_classes_spec.rb +123 -0
  286. data/spec/opal/core/runtime/constants_spec.rb +16 -0
  287. data/spec/opal/core/runtime/eval_spec.rb +5 -0
  288. data/spec/opal/core/runtime/exit_spec.rb +29 -0
  289. data/spec/opal/core/runtime/is_a_spec.rb +48 -0
  290. data/spec/opal/core/runtime/loaded_spec.rb +20 -0
  291. data/spec/opal/core/runtime/main_methods_spec.rb +39 -0
  292. data/spec/opal/core/runtime/method_missing_spec.rb +68 -0
  293. data/spec/opal/core/runtime/rescue_spec.rb +37 -0
  294. data/spec/opal/core/runtime/string_spec.rb +25 -0
  295. data/spec/opal/core/runtime/truthy_spec.rb +61 -0
  296. data/spec/opal/core/runtime_spec.rb +58 -0
  297. data/spec/opal/core/string/each_byte_spec.rb +19 -0
  298. data/spec/opal/core/string/gsub_spec.rb +35 -0
  299. data/spec/opal/core/string/to_sym_spec.rb +9 -0
  300. data/spec/opal/core/string_spec.rb +28 -0
  301. data/spec/opal/core/struct/dup_spec.rb +11 -0
  302. data/spec/opal/core/time_spec.rb +68 -0
  303. data/spec/opal/stdlib/erb/erb_spec.rb +30 -0
  304. data/spec/opal/stdlib/erb/inline_block.opalerb +3 -0
  305. data/spec/opal/stdlib/erb/quoted.opalerb +1 -0
  306. data/spec/opal/stdlib/erb/simple.opalerb +1 -0
  307. data/spec/opal/stdlib/js_spec.rb +72 -0
  308. data/spec/opal/stdlib/json/ext_spec.rb +55 -0
  309. data/spec/opal/stdlib/json/parse_spec.rb +37 -0
  310. data/spec/opal/stdlib/logger/logger_spec.rb +308 -0
  311. data/spec/opal/stdlib/native/alias_native_spec.rb +27 -0
  312. data/spec/opal/stdlib/native/array_spec.rb +11 -0
  313. data/spec/opal/stdlib/native/date_spec.rb +12 -0
  314. data/spec/opal/stdlib/native/deprecated_include_spec.rb +8 -0
  315. data/spec/opal/stdlib/native/each_spec.rb +13 -0
  316. data/spec/opal/stdlib/native/element_reference_spec.rb +16 -0
  317. data/spec/opal/stdlib/native/exposure_spec.rb +33 -0
  318. data/spec/opal/stdlib/native/ext_spec.rb +19 -0
  319. data/spec/opal/stdlib/native/hash_spec.rb +67 -0
  320. data/spec/opal/stdlib/native/initialize_spec.rb +17 -0
  321. data/spec/opal/stdlib/native/method_missing_spec.rb +51 -0
  322. data/spec/opal/stdlib/native/native_alias_spec.rb +26 -0
  323. data/spec/opal/stdlib/native/native_class_spec.rb +18 -0
  324. data/spec/opal/stdlib/native/native_module_spec.rb +13 -0
  325. data/spec/opal/stdlib/native/native_reader_spec.rb +22 -0
  326. data/spec/opal/stdlib/native/native_writer_spec.rb +30 -0
  327. data/spec/opal/stdlib/native/new_spec.rb +92 -0
  328. data/spec/opal/stdlib/native/struct_spec.rb +12 -0
  329. data/spec/opal/stdlib/pp_spec.rb +5 -0
  330. data/spec/opal/stdlib/promise/always_spec.rb +49 -0
  331. data/spec/opal/stdlib/promise/error_spec.rb +15 -0
  332. data/spec/opal/stdlib/promise/rescue_spec.rb +53 -0
  333. data/spec/opal/stdlib/promise/then_spec.rb +79 -0
  334. data/spec/opal/stdlib/promise/trace_spec.rb +51 -0
  335. data/spec/opal/stdlib/promise/value_spec.rb +15 -0
  336. data/spec/opal/stdlib/promise/when_spec.rb +34 -0
  337. data/spec/opal/stdlib/source_map_spec.rb +8 -0
  338. data/spec/opal/stdlib/strscan/scan_spec.rb +11 -0
  339. data/spec/opal/stdlib/template/paths_spec.rb +10 -0
  340. data/spec/opal/stdlib/thread/mutex_spec.rb +40 -0
  341. data/spec/opal/stdlib/thread/thread_queue_spec.rb +32 -0
  342. data/spec/opal/stdlib/thread/thread_spec.rb +60 -0
  343. data/spec/ruby_specs +183 -0
  344. data/spec/spec_helper.rb +31 -0
  345. data/spec/support/guard_platform.rb +4 -0
  346. data/spec/support/match_helpers.rb +57 -0
  347. data/spec/support/mspec_rspec_adapter.rb +33 -0
  348. data/spec/support/rewriters_helper.rb +54 -0
  349. data/spec/support/source_map_helper.rb +190 -0
  350. data/stdlib/base64.rb +2 -2
  351. data/stdlib/bigdecimal.rb +15 -3
  352. data/stdlib/bigdecimal/bignumber.js.rb +1 -1
  353. data/stdlib/bigdecimal/util.rb +148 -0
  354. data/stdlib/delegate.rb +8 -0
  355. data/stdlib/nodejs/fileutils.rb +1 -1
  356. data/stdlib/nodejs/kernel.rb +0 -13
  357. data/stdlib/nodejs/stacktrace.rb +4 -179
  358. data/stdlib/ostruct.rb +5 -0
  359. data/stdlib/pp.rb +586 -19
  360. data/stdlib/prettyprint.rb +556 -0
  361. data/stdlib/rbconfig/sizeof.rb +2 -0
  362. data/stdlib/securerandom.rb +32 -0
  363. data/stdlib/set.rb +36 -0
  364. data/stdlib/strscan.rb +15 -0
  365. data/tasks/benchmarking.rake +1 -1
  366. data/tasks/releasing.rake +0 -3
  367. data/tasks/testing.rake +16 -11
  368. data/tasks/testing/mspec_special_calls.rb +1 -19
  369. data/test/nodejs/fixtures/cat.png +0 -0
  370. data/test/nodejs/fixtures/hello.rb +1 -0
  371. data/test/nodejs/fixtures/iso88591.txt +1 -0
  372. data/test/nodejs/fixtures/utf8.txt +1 -0
  373. data/test/nodejs/fixtures/win1258.txt +1 -0
  374. data/test/nodejs/test_dir.rb +39 -0
  375. data/test/nodejs/test_env.rb +62 -0
  376. data/test/nodejs/test_error.rb +29 -0
  377. data/test/nodejs/test_file.rb +206 -0
  378. data/test/nodejs/test_file_encoding.rb +20 -0
  379. data/test/nodejs/test_io.rb +18 -0
  380. data/test/nodejs/test_opal_builder.rb +12 -0
  381. data/test/nodejs/test_pathname.rb +16 -0
  382. data/test/opal/cat.png +0 -0
  383. data/test/opal/http_server.rb +52 -0
  384. data/test/opal/test_base64.rb +115 -0
  385. data/test/opal/test_keyword.rb +590 -0
  386. data/test/opal/test_matrix.rb +661 -0
  387. data/test/opal/test_openuri.rb +53 -0
  388. data/test/opal/unsupported_and_bugs.rb +39 -0
  389. data/yarn.lock +1114 -3
  390. metadata +889 -31
  391. data/lib/opal/nodes/runtime_helpers.rb +0 -51
  392. data/opal/corelib/random/MersenneTwister.js +0 -137
  393. data/opal/corelib/random/mersenne_twister.js.rb +0 -13
  394. data/stdlib/bigdecimal/kernel.rb +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3aa0e89c4ec45d23afb8a14072ab0ef24b7d9e8ef2e0771600dd6e06910f9392
4
- data.tar.gz: 7f93b034d7ea2c325ae75f0c2fb8d69168ddae340f25a0422b606df4b1e626e0
3
+ metadata.gz: b7f7dbee3918f7a6ceae2545b7785be17ec4936b41d7742e3851ef592b243264
4
+ data.tar.gz: 171a4a6f3e05e84c0e340e5be8881bba79592cf1964f2c8cd8d6140313ae142b
5
5
  SHA512:
6
- metadata.gz: 9a52c4d4d98020e2e970b299c57b27a8860bc6093a916960fde9399c7fc0f61d58b572159a35859c1337d69e4754b08b0f1561ce76332ed9dd9170186e447ed2
7
- data.tar.gz: c0902f840424bc3567a813077034eb3c5d174ba5411f3096dcd7bda877066793bfd598e9ddc35b93d1acdb9ff602216e96a337cea9ac06153e7a418c8904ab9f
6
+ metadata.gz: 685716be573d0ce8d4128e15de0c8bc20d241dcdcbfb30196b0f4cb33de6e38ad2b35b25e3d0969a3b1d6ec0fa26dfc4705c61f5fa1ceaba3fd4589c82034874
7
+ data.tar.gz: 8cbfa50706f081286c3b1a6255e96d9cd8923a662a4be36448f88d9044e3171966238963480e9a5f4d509c1fb8644fb14372eba6ae25c0a223adc6c74e6cc05d
@@ -38,15 +38,17 @@ plugins:
38
38
  channel: rubocop-0-53
39
39
 
40
40
  exclude_patterns:
41
- - "benchmark/*"
42
- - "build/*"
43
- - "coverage/*"
44
- - "docs/*"
45
- - "examples/*"
46
- - "tasks/*"
47
- - "spec/*"
48
- - "test/*"
49
- - "vendored-minitest/*"
50
- - "**/node_modules/*"
51
- - stdlib/nodejs/js-yaml-3-6-1.js
52
- - lib/opal/source_map/vlq.rb
41
+ - "benchmark/*"
42
+ - "build/*"
43
+ - "coverage/*"
44
+ - "docs/*"
45
+ - "examples/*"
46
+ - "tasks/*"
47
+ - "spec/*"
48
+ - "test/*"
49
+ - "vendored-minitest/*"
50
+ - "**/node_modules/*"
51
+ - stdlib/nodejs/js-yaml-3-6-1.js
52
+ - lib/opal/source_map/vlq.rb
53
+ - lib/opal/cli_runners/source-map-support.js
54
+ - lib/opal/cli_runners/source-map-support-browser.js
@@ -1 +1 @@
1
- CHANGELOG.md merge=union
1
+ UNRELEASED.md merge=union
@@ -18,30 +18,35 @@ jobs:
18
18
  matrix:
19
19
  combo:
20
20
  - name: mspec-nodejs
21
- ruby: 2.7
21
+ ruby: 3.0
22
22
  command: bin/rake mspec_nodejs
23
23
  - name: mspec-chrome
24
- ruby: 2.7
24
+ ruby: 3.0
25
25
  command: bin/rake mspec_chrome
26
26
  - name: minitest
27
- ruby: 2.7
27
+ ruby: 3.0
28
28
  command: bin/rake minitest
29
29
  - name: current-ruby
30
- ruby: 2.7
30
+ ruby: 3.0
31
31
  - name: previous-ruby
32
- ruby: 2.6
32
+ ruby: 2.7
33
33
  - name: older-ruby
34
+ ruby: 2.6
35
+ - name: near-eol-ruby
34
36
  ruby: 2.5
37
+ - name: smoke-test
38
+ ruby: 3.0
39
+ command: bin/rake smoke_test
35
40
  - name: windows
36
41
  # These two fail because of broken stacktraces on windows: minitest_node_nodejs mspec_nodejs
37
42
  command: bundle exec rake rspec minitest_nodejs
38
- ruby: 2.7
43
+ ruby: 3.0
39
44
  os: windows-latest
40
45
  - name: lint
41
46
  command: bin/rake lint
42
- ruby: 2.7
47
+ ruby: 3.0
43
48
  - name: timezone
44
- ruby: 2.7
49
+ ruby: 3.0
45
50
 
46
51
  # Currently failing:
47
52
  # - ruby: truffleruby
@@ -66,7 +71,7 @@ jobs:
66
71
  key: ${{ runner.os }}-${{ matrix.combo.ruby }}-gems-${{ github.ref }}-${{ hashFiles('**/Gemfile.lock') }}
67
72
  restore-keys: |
68
73
  ${{ runner.os }}-${{ matrix.combo.ruby }}-gems-${{ github.ref }}
69
- ${{ runner.os }}-${{ matrix.combo.ruby }}-gems-1-0-stable
74
+ ${{ runner.os }}-${{ matrix.combo.ruby }}-gems-master
70
75
  ${{ runner.os }}-${{ matrix.combo.ruby }}-gems-
71
76
  - uses: actions/cache@v2
72
77
  with:
@@ -74,7 +79,7 @@ jobs:
74
79
  key: ${{ runner.os }}-npm-${{ github.ref }}-${{ hashFiles('**/yarn.lock') }}
75
80
  restore-keys: |
76
81
  ${{ runner.os }}-npm-${{ github.ref }}
77
- ${{ runner.os }}-npm-1-0-stable
82
+ ${{ runner.os }}-npm-master
78
83
  ${{ runner.os }}-npm-
79
84
  - run: yarn install
80
85
  - name: bundle install
data/.jshintrc CHANGED
@@ -10,7 +10,7 @@
10
10
  "undef" : true, // Prohibit the use of explicitly undeclared variables
11
11
  "unused" : true, // Warn when you define and never use your variables
12
12
 
13
- "predef" : ["Opal", "JSON", "Java", "OpalNode", "jsyaml"],
13
+ "predef" : ["Opal", "JSON", "Java", "OpalNode", "jsyaml", "globalThis"],
14
14
 
15
15
  "browser": true,
16
16
  "node": true,
@@ -0,0 +1,35 @@
1
+ # Use this file to configure the Overcommit hooks you wish to use. This will
2
+ # extend the default configuration defined in:
3
+ # https://github.com/sds/overcommit/blob/master/config/default.yml
4
+ #
5
+ # At the topmost level of this YAML file is a key representing type of hook
6
+ # being run (e.g. pre-commit, commit-msg, etc.). Within each type you can
7
+ # customize each hook, such as whether to only run it on certain files (via
8
+ # `include`), whether to only display output if it fails (via `quiet`), etc.
9
+ #
10
+ # For a complete list of hooks, see:
11
+ # https://github.com/sds/overcommit/tree/master/lib/overcommit/hook
12
+ #
13
+ # For a complete list of options that you can use to customize hooks, see:
14
+ # https://github.com/sds/overcommit#configuration
15
+ #
16
+ # Uncomment the following lines to make the configuration take effect.
17
+
18
+ gemfile: Gemfile
19
+
20
+ PreCommit:
21
+ RuboCop:
22
+ enabled: true
23
+ on_warn: fail # Treat all warnings as failures
24
+
25
+ TrailingWhitespace:
26
+ enabled: true
27
+ # exclude:
28
+ # - '**/db/structure.sql' # Ignore trailing whitespace in generated files
29
+
30
+ #PostCheckout:
31
+ # ALL: # Special hook name that customizes all hooks of this type
32
+ # quiet: true # Change all post-checkout hooks to only display output on failure
33
+ #
34
+ # IndexTags:
35
+ # enabled: true # Generate a tags file with `ctags` each time HEAD changes
@@ -1,4 +1,5 @@
1
- inherit_from: .rubocop_todo.yml
1
+ require: rubocop-performance
2
+ inherit_from: .rubocop/todo.yml
2
3
 
3
4
  AllCops:
4
5
  TargetRubyVersion: 2.5
@@ -49,6 +50,8 @@ AllCops:
49
50
  - 'stdlib/e2mmap.rb'
50
51
  - 'stdlib/matrix.rb'
51
52
  - 'stdlib/matrix/*.rb'
53
+ - 'stdlib/pp.rb'
54
+ - 'stdlib/prettyprint.rb'
52
55
 
53
56
  inherit_mode:
54
57
  merge:
@@ -69,6 +72,10 @@ Layout/CommentIndentation:
69
72
  - 'lib/opal/rewriters/binary_operator_assignment.rb'
70
73
  - 'lib/opal/rewriters/logical_operator_assignment.rb'
71
74
 
75
+ # We need to support older rubies
76
+ Layout/IndentHeredoc:
77
+ Enabled: false
78
+
72
79
  Style/FrozenStringLiteralComment:
73
80
  Exclude:
74
81
  - 'opal/**/*.rb'
@@ -116,6 +123,10 @@ Lint/LiteralAsCondition:
116
123
  - 'opal/**/*.rb'
117
124
  - 'stdlib/**/*.rb'
118
125
 
126
+ # Allow the use of if/unless inside blocks
127
+ Style/Next:
128
+ Enabled: false
129
+
119
130
  Lint/RescueException:
120
131
  Exclude:
121
132
  # That's what MRI does
@@ -243,12 +254,18 @@ Style/InverseMethods:
243
254
  - 'opal/corelib/basic_object.rb'
244
255
  - 'opal/corelib/kernel.rb'
245
256
 
246
- Style/MethodMissing:
247
- # Base Opal classes simply can't call super for #method_missing
257
+ Style/MethodMissingSuper:
258
+ # Base Opal classes simply can't or shouldn't call super for #method_missing
248
259
  Exclude:
249
260
  - 'opal/corelib/basic_object.rb'
250
261
  - 'opal/corelib/kernel.rb'
251
262
  - 'opal/corelib/string/inheritance.rb'
263
+ - 'stdlib/native.rb'
264
+ - 'stdlib/delegate.rb'
265
+ - 'stdlib/ostruct.rb'
266
+
267
+ Style/MissingRespondToMissing:
268
+ Enabled: true
252
269
 
253
270
  Style/NumericPredicate:
254
271
  Enabled: false
@@ -257,6 +274,8 @@ Style/ParallelAssignment:
257
274
  Enabled: false
258
275
 
259
276
  Style/PercentLiteralDelimiters:
277
+ PreferredDelimiters:
278
+ default: '{}'
260
279
  Exclude:
261
280
  # Opal has a convention of %x{}
262
281
  - 'opal/**/*.rb'
@@ -326,10 +345,6 @@ Style/RegexpLiteral:
326
345
  # Rubocop doesn't check for backslashes, so this rule is disabled.
327
346
  Enabled: false
328
347
 
329
- Style/PercentLiteralDelimiters:
330
- PreferredDelimiters:
331
- default: '{}'
332
-
333
348
  Naming/FileName:
334
349
  Exclude:
335
350
  - 'stdlib/opal-builder.rb'
@@ -396,3 +411,25 @@ Style/ConditionalAssignment:
396
411
  Naming/MemoizedInstanceVariableName:
397
412
  Exclude:
398
413
  - lib/opal/parser/patch.rb # it's a monkey-patch on the parser gem
414
+
415
+ Style/AccessModifierDeclarations:
416
+ Enabled: false
417
+
418
+ Style/MultipleComparison:
419
+ Enabled: false
420
+
421
+ Layout/EmptyLineAfterGuardClause:
422
+ Enabled: false
423
+
424
+ Layout/AlignHash:
425
+ Enabled: false
426
+
427
+ # No way to set multiple preferred names
428
+ Naming/RescuedExceptionsVariableName:
429
+ Enabled: false
430
+
431
+ Style/Semicolon:
432
+ AllowAsExpressionSeparator: true
433
+
434
+ Layout/EmptyLinesAroundExceptionHandlingKeywords:
435
+ Enabled: false
@@ -33,12 +33,11 @@ Style/MutableConstant:
33
33
  - 'lib/opal/nodes/call.rb'
34
34
  - 'lib/opal/util.rb'
35
35
 
36
- Style/MethodMissing:
36
+ Lint/HandleExceptions:
37
37
  Exclude:
38
- - 'stdlib/native.rb'
39
- - 'stdlib/delegate.rb'
40
38
  - 'stdlib/ostruct.rb'
41
39
 
42
- Lint/HandleExceptions:
40
+ Lint/ToJSON:
43
41
  Exclude:
44
- - 'stdlib/ostruct.rb'
42
+ - 'lib/opal/source_map/map.rb'
43
+ - 'stdlib/json.rb'
@@ -15,13 +15,98 @@ Changes are grouped as follows:
15
15
 
16
16
 
17
17
 
18
- ## [1.0.5](https://github.com/opal/opal/compare/v1.0.4...1.0.5) - 2020-12-24
18
+ ## [Unreleased](https://github.com/opal/opal/compare/v1.0.5...HEAD) - unreleased
19
+
20
+
21
+ ### Added
22
+
23
+ - Basic support for `uplevel:` keyword argument in `Kernel#warn` ([#2006](https://github.com/opal/opal/pull/2006))
24
+ - Added a `#respond_to_missing?` implementation for `BasicObject`, `Delegator`, `OpenStruct`, that's meant for future support in the Opal runtime, which currently ignores it ([#2007](https://github.com/opal/opal/pull/2007))
25
+ - `Opal::Compiler#magic_comments` that allows to access magic-comments format and converts it to a hash ([#2038](https://github.com/opal/opal/pull/2038))
26
+ - Use magic-comments to declare helpers required by the file ([#2038](https://github.com/opal/opal/pull/2038))
27
+ - `Opal.$$` is now a shortcut for `Opal.const_get_relative` ([#2038](https://github.com/opal/opal/pull/2038))
28
+ - `Opal.$$$` is now a shortcut for `Opal.const_get_qualified` ([#2038](https://github.com/opal/opal/pull/2038))
29
+ - Added support for `globalThis` as the generic global object accessor ([#2047](https://github.com/opal/opal/pull/2047))
30
+ - `Opal::Compiler#magic_comments` that allows to access magic-comments format and converts it to a hash
31
+ - Use magic-comments to declare helpers required by the file
32
+ - `Opal.$$` is now a shortcut for `Opal.const_get_relative`
33
+ - `Opal.$$$` is now a shortcut for `Opal.const_get_qualified`
34
+ - Source-map support for Node.js in the default runner ([#2045](https://github.com/opal/opal/pull/2045))
35
+ - SecureRandom#hex(n) ([#2050](https://github.com/opal/opal/pull/2050))
36
+ - Added a generic implementation of Kernel#caller and #warn(uplevel:) that works with sourcemaps in Node.js and Chrome ([#2065](https://github.com/opal/opal/pull/2065))
37
+ - Added support for numblocks `-> { _1 + _2 }.call(3, 4) # => 7` ([#2149](https://github.com/opal/opal/pull/2149))
38
+ - Support `<internal:…>` and `<js:…>` in stacktraces, like MRI we now distinguish internal lines from lib/app lines ([#2154](https://github.com/opal/opal/pull/2154))
39
+
40
+ ### Fixed
41
+
42
+ - Array#delete_if ([#2069](https://github.com/opal/opal/pull/2069))
43
+ - Array#keep_if ([#2069](https://github.com/opal/opal/pull/2069))
44
+ - Array#reject! ([#2069](https://github.com/opal/opal/pull/2069))
45
+ - Array#select! ([#2069](https://github.com/opal/opal/pull/2069))
46
+ - Struct#dup ([#1995](https://github.com/opal/opal/pull/1995))
47
+ - Integer#gcdlcm ([#1972](https://github.com/opal/opal/pull/1972))
48
+ - Enumerable#to_h ([#1979](https://github.com/opal/opal/pull/1979))
49
+ - Enumerator#size ([#1980](https://github.com/opal/opal/pull/1980))
50
+ - Enumerable#min ([#1982](https://github.com/opal/opal/pull/1982))
51
+ - Enumerable#min_by ([#1985](https://github.com/opal/opal/pull/1985))
52
+ - Enumerable#max_by ([#1985](https://github.com/opal/opal/pull/1985))
53
+ - Set#intersect? ([#1988](https://github.com/opal/opal/pull/1988))
54
+ - Set#disjoint? ([#1988](https://github.com/opal/opal/pull/1988))
55
+ - Set#keep_if ([#1987](https://github.com/opal/opal/pull/1987))
56
+ - Set#select! ([#1987](https://github.com/opal/opal/pull/1987))
57
+ - Set#reject! ([#1987](https://github.com/opal/opal/pull/1987))
58
+ - Module#alias_method ([#1983](https://github.com/opal/opal/pull/1983))
59
+ - Enumerable#minmax_by ([#1981](https://github.com/opal/opal/pull/1981))
60
+ - Enumerator#each_with_index ([#1990](https://github.com/opal/opal/pull/1990))
61
+ - Range#== ([#1992](https://github.com/opal/opal/pull/1992))
62
+ - Range#each ([#1991](https://github.com/opal/opal/pull/1991))
63
+ - Enumerable#zip ([#1986](https://github.com/opal/opal/pull/1986))
64
+ - String#getbyte ([#2141](https://github.com/opal/opal/pull/2141))
65
+ - Struct#dup not copying `$$data` ([#1995](https://github.com/opal/opal/pull/1995))
66
+ - Fixed usage of semicolon in single-line backticks ([#2004](https://github.com/opal/opal/pull/2004))
67
+ - Module#attr with multiple arguments ([#2003](https://github.com/opal/opal/pull/2003))
68
+ - `PathReader` used to try to read missing files instead of respecting the `missing_require_severity` configuration value ([#2044](https://github.com/opal/opal/pull/2044))
69
+ - Removed some unused variables from the runtime ([#2052](https://github.com/opal/opal/pull/2052))
70
+ - Fixed a typo in the runtime ([#2054](https://github.com/opal/opal/pull/2054))
71
+ - Fix Regexp interpolation, previously interpolating with other regexps was broken ([#2062](https://github.com/opal/opal/pull/2062))
72
+ - Set match on StringScanner#skip and StringScanner#scan_until ([#2061](https://github.com/opal/opal/pull/2061))
73
+ - Fix ruby 2.7 warnings ([#2071](https://github.com/opal/opal/pull/2071))
74
+ - Improve the --help descriptions ([#2146](https://github.com/opal/opal/pull/2146))
75
+
76
+ ### Changed
77
+
78
+ - Updated outdated parser version ([#2013](https://github.com/opal/opal/pull/2013))
79
+ - Nashorn has been deprecated but GraalVM still supports it ([#1997](https://github.com/opal/opal/pull/1997))
80
+ - "opal/mini" now includes "opal/io" ([#2002](https://github.com/opal/opal/pull/2002))
81
+ - Regexps assigned to constants are now frozen ([#2007](https://github.com/opal/opal/pull/2007))
82
+ - `Opal.$$` changed from being the constant cache of Object to being a shortcut for `Opal.const_get_relative` ([#2038](https://github.com/opal/opal/pull/2038))
83
+ - Moved REPL implementation from bin/ to its own lib/ file as `opal/repl.rb` ([#2048](https://github.com/opal/opal/pull/2048))
84
+ - `Encoding.default_external` is now initialized with `__ENCODING__` ([#2072](https://github.com/opal/opal/pull/2072))
85
+ - Keep the MersenneTwister implementation private ([#2108](https://github.com/opal/opal/pull/2108))
86
+ - Change parser to 3.0 ([#2148](https://github.com/opal/opal/pull/2148))
87
+ - Fix forwarding a rescued error to a global var: `rescue => $gvar` ([#2154](https://github.com/opal/opal/pull/2154))
88
+ - Now using Parser v3.0 and targeting Ruby 3.0 ([#2156](https://github.com/opal/opal/pull/2156))
89
+
90
+ ### Deprecated
91
+
92
+ - Requiring nodejs/stacktrace has been deprecated, source-maps are already
93
+ supported by the default Node.js runner or by requiring https://github.com/evanw/node-source-map-support
94
+ before loading code compiled by Opal ([#2045](https://github.com/opal/opal/pull/2045))
95
+
96
+ ### Removed
97
+
98
+ - Removed special compilation for the `Opal.truthy?` and `Opal.falsy?` helpers ([#2076](https://github.com/opal/opal/pull/2076))
99
+
100
+
101
+
102
+
103
+ ## [1.0.5](https://github.com/opal/opal/compare/v1.0.4...v1.0.5) - 2020-12-23
19
104
 
20
105
 
21
106
  ### Fixed
22
107
 
23
108
  - [Backported] Add --rbrequire (-q) option to opal cmdline tool ([#2120](https://github.com/opal/opal/pull/2120))
24
- - Improved the --help descriptions
109
+ - Improve the --help descriptions ([#2146](https://github.com/opal/opal/pull/2146))
25
110
 
26
111
 
27
112
 
data/Gemfile CHANGED
@@ -11,7 +11,6 @@ sprockets_version = ENV['SPROCKETS_VERSION']
11
11
 
12
12
  gem 'json', '< 1.8.1', platform: :ruby if ruby_version < v['2.2']
13
13
  gem 'rack-test', '< 0.8' if ruby_version <= v['2.0']
14
- gem 'rubysl', platform: :rbx
15
14
  gem 'coveralls', platform: :mri
16
15
 
17
16
  # Some browsers have problems with WEBrick
@@ -51,5 +50,5 @@ group :doc do
51
50
  end unless ENV['CI']
52
51
 
53
52
  platforms :ruby, :mswin, :mswin64, :mingw, :x64_mingw do
54
- gem 'c_lexer', '~> 2.6' unless RUBY_ENGINE == 'truffleruby'
53
+ #gem 'c_lexer', '~> 2.6' unless RUBY_ENGINE == 'truffleruby'
55
54
  end
data/HACKING.md CHANGED
@@ -8,17 +8,10 @@
8
8
  $ git clone git://github.com/<YOUR-GITHUB-USERNAME>/opal.git
9
9
  ```
10
10
 
11
- The Ruby Spec Suite related repos must be cloned as git submodules:
11
+ Setup the project:
12
12
 
13
13
  ```
14
- $ git submodule update --init
15
- ```
16
-
17
- Get dependencies:
18
-
19
- ```
20
- $ bundle install
21
- $ npm install -g jshint
14
+ $ bin/setup
22
15
  ```
23
16
 
24
17
  Run the test suite:
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <h1 align="center">
2
- <img src="https://secure.gravatar.com/avatar/88298620949a6534d403da2e356c9339?s=420"
2
+ <img src="https://secure.gravatar.com/avatar/88298620949a6534d403da2e356c9339?s=420"
3
3
  align="center" title="Opal logo by Elia Schito" width="105" height="105" />
4
4
  <br/>
5
5
  Opal <br/>
@@ -7,24 +7,28 @@
7
7
  </h1>
8
8
 
9
9
  <p align="center">
10
- <em><strong>Opal</strong> is a Ruby to JavaScript source-to-source compiler.<br>
10
+ <em><strong>Opal</strong> is a Ruby to JavaScript source-to-source compiler.<br>
11
11
  It also has an implementation of the Ruby <code>corelib</code> and <code>stdlib</code>.</em>
12
12
  </p>
13
13
 
14
14
  <p align="center">
15
15
  <strong>Community:</strong><br>
16
16
  <a href="https://stackoverflow.com/questions/ask?tags=opalrb"><img src="https://img.shields.io/badge/stackoverflow-%23opalrb-orange.svg?style=flat" alt="Stack Overflow" title="" /></a>
17
- <a href="#backers"><img src="https://opencollective.com/opal/backers/badge.svg" alt="Backers on Open Collective" title="" /></a>
18
- <a href="#sponsors"><img src="https://opencollective.com/opal/sponsors/badge.svg" alt="Sponsors on Open Collective" title="" /></a>
17
+ <a href="#backers"><img src="https://opencollective.com/opal/backers/badge.svg" alt="Backers on Open Collective" title="" /></a>
18
+ <a href="#sponsors"><img src="https://opencollective.com/opal/sponsors/badge.svg" alt="Sponsors on Open Collective" title="" /></a>
19
19
  <a href="https://gitter.im/opal/opal?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge"><img src="https://badges.gitter.im/Join%20Chat.svg" alt="Gitter" title="" /></a>
20
20
  <a href="https://opalrb.com/docs"><img src="https://img.shields.io/badge/docs-updated-blue.svg" alt="Documentation" title="" /></a>
21
+
21
22
  <br>
22
23
  <strong>Code:</strong><br>
23
24
  <a href="https://badge.fury.io/rb/opal"><img src="https://img.shields.io/gem/v/opal.svg?style=flat" alt="Gem Version" title="" /></a>
24
- <a href="https://travis-ci.org/opal/opal"><img src="https://img.shields.io/travis/opal/opal/master.svg?style=flat" alt="Build Status (Linux)" title="" /></a>
25
- <a href="https://ci.appveyor.com/project/elia/opal/branch/master"><img src="https://ci.appveyor.com/api/projects/status/jtsvwl8tfgn3u67n/branch/master?svg=true" alt="Build Status (Windows)" title="" /></a>
25
+ <a href="https://github.com/opal/opal/actions?query=workflow%3Abuild"><img alt="Build Status" src="https://github.com/opal/opal/workflows/build/badge.svg" /></a>
26
26
  <a href="https://codeclimate.com/github/opal/opal"><img src="https://img.shields.io/codeclimate/maintainability-percentage/opal/opal.svg" alt="Code Climate" title="" /></a>
27
- <a href="https://coveralls.io/github/opal/opal?branch=elia%2Fcoveralls"><img src="https://coveralls.io/repos/opal/opal/badge.svg?branch=master&amp;service=github" alt="Coverage Status" title="" /></a>
27
+ <a href="https://coveralls.io/github/opal/opal?branch=master"><img src="https://coveralls.io/repos/opal/opal/badge.svg?branch=master&amp;service=github" alt="Coverage Status" title="" /></a>
28
+
29
+ <br>
30
+ <strong>Sponsors:</strong>
31
+ <br/><a href="https://nebulab.it?utm_source=github&utm_medium=badge"><img src="https://img.shields.io/static/v1?label=Nebulab&message=Open+Source+Fridays&color=%235dbefd&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMQSURBVHgBrZZNTxNRFIbfczsgIMQiLBCRFDaGhUr9A9iiIa5EEneIwE/AlRsNv8KlIKwFl35RTUBX8rFBdiVKAgqmXSCY0M71nJl+zJTOdKh9k6Yzc8/cZ86555x7CQE0mji5hSyGlQoNaOgIPwrnhtIArWszu4EQFudjdR8rzUV+gw8/ZMZB9IwvIwimJJGafhmjWZwFOJ7QkYzWCwTdj+qUDJGKz8Rou3RAlT4YS+hHWW2u/QdM1MNzrI6+zwyXDrg8FANStIDaSXOIJ5whLgAljOIZiglRK6U4vDfz4S2ElGGJWsEaQkCTUbhtNbV+lb+xgFY2Bs9ET0h/GzBxlfAkqnCUKY5xKfVLbsi1/R126lcF6WgCYp2ES42EBp6tvQFY+alLTUlrUxizJEVNWiVwBkVagGg7oe+CDclLYOfrgMdfTBz8PfWa1lkzbsDEsH/5FyF9YUK0zQ1xwpoZtsm9pwxMRLyA9wyi0A2Jcjl1NNqeeEFEimxYPkmWd014ikIDnDTeBb53DOweaRxnvWGyhnmYfPZWGt487sNi6lsK67/lZ1oZGOtUaD3nhtU7etXXfe0VzrzCBgLKCR68rNDX6oaJlvd0xXnklbSfgSTL/QghXF8EP980cVKyVL/Ys9UDVFJa8Tdt+1lYmcmJM3Vd4UEvWeslRf32h9ubrVRl77gBrCto85OfUU+LXTMGx+JuN2Hoin3/Zkfjj6ObBAknV+KG4jpc9BqXMEpiCMz6Z9ZQ12kvJZxb6co4Zr1W83esY8F2OYsIe+eEyfTiVXczCl7uM2wliHfMEJaRc3Wa++mLUotrF4EW7h6f94Dvh6aVFM60Fy8Xkya+BfBOjh5yUWhqY0vmKi9q1GnVxZ7sHKIWSs7FQ71yUagkRTTCfymnVY1gsgHHC5z8hbUjaz0Fr8ZanXhX0pPOw5SrV8wNGjNscMrTKpXKaj05f9twVYHnMZGPHEuwTwEBNi+3NGiNt6GRcsfEIAfhp2cAV3cQLtXoOz7q8+ZJRLx3kmxn4dy7aas1SrfiBpKraV/9A+PSJLDAXLUvAAAAAElFTkSuQmCC"></a>
28
32
  </p>
29
33
 
30
34
  ## Usage
@@ -133,14 +137,9 @@ on opal.
133
137
 
134
138
  ## Running tests
135
139
 
136
- The Ruby Spec Suite related repos must be cloned as git submodules:
137
-
138
- $ git submodule update --init
140
+ Setup the project:
139
141
 
140
- Then, install dependencies:
141
-
142
- $ bundle install
143
- $ npm install -g jshint
142
+ $ bin/setup
144
143
 
145
144
  The test suite can be run using:
146
145
 
@@ -197,7 +196,7 @@ Holds the **stdlib currently supported by Opal**. This includes `Observable`,
197
196
 
198
197
  ## Browser support
199
198
 
200
- * Internet Explorer 9+
199
+ * Internet Explorer 11
201
200
  * Firefox (Current - 1) or Current
202
201
  * Chrome (Current - 1) or Current
203
202
  * Safari (Current - 1) or Current
@@ -213,8 +212,6 @@ version of a browser is 24.x, we support the 24.x and 23.x versions.
213
212
  as the last 2 versions of Opera. For example, if the current Opera version is 20.x,
214
213
  then we support Opera 12.1x, 19.x and 20.x but not Opera 15.x through 18.x.
215
214
 
216
- Cross-browser testing is sponsored by [SauceLabs](https://saucelabs.com).
217
-
218
215
  ## Contributors
219
216
 
220
217
  This project exists thanks to all the people who contribute. [![contributors](https://opencollective.com/opal/contributors.svg?width=890&button=false")](https://github.com/opal/opal/graphs/contributors)
@@ -229,6 +226,8 @@ Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com
229
226
 
230
227
  ## Sponsors
231
228
 
229
+ ### Donations
230
+
232
231
  Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/opal#sponsor)]
233
232
 
234
233
  <a href="https://opencollective.com/opal/sponsor/0/website" target="_blank"><img src="https://opencollective.com/opal/sponsor/0/avatar.svg"></a>
@@ -242,6 +241,10 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
242
241
  <a href="https://opencollective.com/opal/sponsor/8/website" target="_blank"><img src="https://opencollective.com/opal/sponsor/8/avatar.svg"></a>
243
242
  <a href="https://opencollective.com/opal/sponsor/9/website" target="_blank"><img src="https://opencollective.com/opal/sponsor/9/avatar.svg"></a>
244
243
 
244
+ ### Sponsored Contributions
245
+
246
+ <a href="https://nebulab.it/?utm_source=github&utm_medium=sponsors" target="_blank"><img src="https://nebulab.it/assets/images/logo-586625a4.svg"></a>
247
+
245
248
 
246
249
  ## License
247
250