ruby-next 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +26 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82e10ab8f26647a65fbcf9bdc507e71fc45a06ea34cee760bcfddb2fc9e2e5ad
|
4
|
+
data.tar.gz: 39342adac0f93e8ebe9cc7b1b7c80ee6a9f4bdff7719d68c23705dc137c4b3f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5eef5eecb93c0c5083662f993610641f89c4a6bb9b527974a49deea1246c2d6683ecd992d6861bfa0d6a1bd64910dca0df8ef0f3f66975076e1b260a71d4d86
|
7
|
+
data.tar.gz: 8bfb427e8ca9611dea007112b7c3679c5cf1dac783ba5af8b549396993d8884566f8aeb3b8eea967ffe1a22f2e00cdb9b5dc991271999b8602bbfbcc0f50fe4c
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -35,6 +35,7 @@ That's why Ruby Next implements the `master` features as fast as possible.
|
|
35
35
|
- [Runtime usage](#runtime-usage)
|
36
36
|
- [Bootsnap integration](#using-with-bootsnap)
|
37
37
|
- [`ruby -ruby-next`](#uby-next)
|
38
|
+
- [RuboCop](#rubocop)
|
38
39
|
- [Proposed & edge features](#proposed-and-edge-features)
|
39
40
|
|
40
41
|
## Overview
|
@@ -247,6 +248,8 @@ due to the way feature resolving works in Ruby (scanning the `$LOAD_PATH` and ha
|
|
247
248
|
|
248
249
|
**NOTE:** `require_relative` should be avoided due to the way we _hijack_ the features loading mechanism.
|
249
250
|
|
251
|
+
If you're using [runtime mode](#runtime-usage) a long with `setup_gem_load_path` (e.g., in tests), the transpiled files are ignored (i.e., we do not modify `$LOAD_PATH`).
|
252
|
+
|
250
253
|
\* Ruby Next avoids storing duplicates; instead, only the code for the earlier version is created and is assumed to be used with other versions. For example, if the transpiled code is the same for Ruby 2.5 and Ruby 2.6, only the `.rbnext/2.7/path/to/file.rb` is kept. That's why multiple entries are added to the `$LOAD_PATH` (`.rbnext/2.6` and `.rbnext/2.7` in the specified order for Ruby 2.5 and only `.rbnext/2.7` for Ruby 2.6).
|
251
254
|
|
252
255
|
## Runtime usage
|
@@ -304,6 +307,28 @@ RUBYOPT="-ruby-next" ruby my_ruby_script.rb
|
|
304
307
|
ruby -ruby-next -e "puts [2, 4, 5].tally"
|
305
308
|
```
|
306
309
|
|
310
|
+
## RuboCop
|
311
|
+
|
312
|
+
Since Ruby Next provides support for features not available in RuboCop yet, you need to add a patch for compatibility.
|
313
|
+
In you `.rubocop.yml` add the following:
|
314
|
+
|
315
|
+
```yml
|
316
|
+
require:
|
317
|
+
- ruby-next/rubocop
|
318
|
+
```
|
319
|
+
|
320
|
+
**NOTE:** You should use `TargetRubyVersion: 2.7`.
|
321
|
+
|
322
|
+
Alternatively, you can load the patch from the command line by running: `rubocop -r ruby-next/rubocop ...`.
|
323
|
+
|
324
|
+
Also, when pre-transpiling source code with `ruby-next nextify`, we suggest ignoring the transpiled files:
|
325
|
+
|
326
|
+
```yml
|
327
|
+
AllCops:
|
328
|
+
Exclude:
|
329
|
+
- 'lib/.rbnext/**/*'
|
330
|
+
```
|
331
|
+
|
307
332
|
## Proposed and edge features
|
308
333
|
|
309
334
|
Ruby Next aims to bring edge and proposed features to Ruby community before they (hopefully) reach an official Ruby release.
|
@@ -380,3 +405,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
380
405
|
[unparser]: https://github.com/mbj/unparser
|
381
406
|
[next_parser]: https://github.com/ruby-next/parser
|
382
407
|
[Bootsnap]: https://github.com/Shopify/bootsnap
|
408
|
+
[rubocop]: https://github.com/rubocop-hq/rubocop
|