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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/README.md +26 -0
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6424a38e36c431e8c6c976ac4a0230c4a212ec125ad849ceff36a7a50ce38733
4
- data.tar.gz: 736af6cc9b1d2ad462473706d84a1be8d579e5c80f7a7cf0a04a481a8d268a15
3
+ metadata.gz: 82e10ab8f26647a65fbcf9bdc507e71fc45a06ea34cee760bcfddb2fc9e2e5ad
4
+ data.tar.gz: 39342adac0f93e8ebe9cc7b1b7c80ee6a9f4bdff7719d68c23705dc137c4b3f1
5
5
  SHA512:
6
- metadata.gz: 46f0a20049218e02c7d7767da662afbdabb77fb69fad18647e0e1418f9ab09da52a9c558eaeb65ea2e6516a245656f2a6f3e84a5db28d634b9acd20742507388
7
- data.tar.gz: a0fe8a798e2ad64273321650959d30ef4b259349d8c0db451e2c6392ace695aef5c813c3167315b76d57f8041c792f8c49bfc29988803091fb0f8198b5d6617e
6
+ metadata.gz: f5eef5eecb93c0c5083662f993610641f89c4a6bb9b527974a49deea1246c2d6683ecd992d6861bfa0d6a1bd64910dca0df8ef0f3f66975076e1b260a71d4d86
7
+ data.tar.gz: 8bfb427e8ca9611dea007112b7c3679c5cf1dac783ba5af8b549396993d8884566f8aeb3b8eea967ffe1a22f2e00cdb9b5dc991271999b8602bbfbcc0f50fe4c
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 0.5.1 (2020-03-20)
6
+
7
+ - Add RuboCop integration. ([@palkan][])
8
+
9
+ Adds support for missing node types and fixes some bugs with 2.7.
10
+
5
11
  ## 0.5.0 (2020-03-20)
6
12
 
7
13
  - Add `rewrite` transpiler mode. ([@palkan][])
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-next
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladimir Dementyev