ruby-next 0.9.1 → 0.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +42 -0
  3. data/README.md +20 -6
  4. metadata +9 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6045c8ee35bf11e9dcd74c6a41eea952b1a4bacd826a04cf4fb26a32598fe66d
4
- data.tar.gz: e3f98fbfa40ffb93f4f6ffa935d09bdefd95660e1768dbd9e0cecaa9b5b35526
3
+ metadata.gz: 13bd3de07b288ceab89e02d629db39c0946fb93be30c84806d945f923b549ab2
4
+ data.tar.gz: 331bfca63292c880faadfe2d74ced0132320a55053305898e0a01025fb412f5c
5
5
  SHA512:
6
- metadata.gz: 170c1fb05d4a8f4440812354ea419847c72625d07e2206c7d968fec183e964cbf670391d10f19702b287bc6aa6ce394ecb204275fed9096c776fa3bdf2085246
7
- data.tar.gz: effebc099da374e8479f5f61474a3dbb2584c66abb58a5208f6db08ebcab29d948a735c7f5478eb87864d32b98be201d576c5036330f3d18e5efe2e702d8dd0c
6
+ metadata.gz: 1abb1c61664fa3c52a7af52618de02dd47b99c644fa305a085b6c1302d7329ce7c9f7d43470679d9e644baf1e8e3062f871769e2e68e6fa22b6d396e40270411
7
+ data.tar.gz: 576682f808e5ab8eebc0ff1314b5a49dca222bdbe59190c9dcdac9883ad368a1cf16334d621986439954a37fc31dabac29737e03156bf65d9ace3973a2179ab1
@@ -2,6 +2,47 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 0.10.3 (2020-09-28)
6
+
7
+ - Update RuboCop integration to handle the latest Parser changes. ([@palkan][])
8
+
9
+ Parser 2.7.1.5 unified endless and normal methods and rightward and leftward assignments, thus, making some cops report false negatives.
10
+
11
+ ## 0.10.2 (2020-09-09)
12
+
13
+ - Fix regression when `nextify` produces incorrect files for 2.7. ([@palkan][])
14
+
15
+ ## ~~0.10.1~~
16
+
17
+ ## 0.10.0 (2020-09-02)
18
+
19
+ - Add proposed shorthand Hash syntax. ([@palkan][])
20
+
21
+ You can try it: `x = 1; y = 2; data = {x, y}`.
22
+
23
+ - Add leading argument support to args forwarding. ([@palkan][])
24
+
25
+ `def a(...) b(1, ...); end`.
26
+
27
+ - Add `Hash#except`. ([@palkan][])
28
+
29
+ `{a: 1, b: 2}.except(:a) == {b: 2}`
30
+
31
+ - Add find pattern support. ([@palkan][])
32
+
33
+ Now you can do: `[0, 1, 2] in [*, 1 => a, *c]`.
34
+
35
+ - Add Ruby 2.2 support. ([@palkan][])
36
+
37
+ With support for safe navigation operator (`&.`) and squiggly heredocs (`<<~TXT`).
38
+
39
+ ## 0.9.2 (2020-06-24)
40
+
41
+ - Support passing rewriters to CLI. ([@sl4vr][])
42
+
43
+ Use `nextify --list-rewriters` to view all available rewriters.
44
+ Use `nextify` with `--rewrite=REWRITERS...` option to specify which particular rewriters to use.
45
+
5
46
  ## 0.9.1 (2020-06-05)
6
47
 
7
48
  - Keep `ruby-next` version in sync with `ruby-next-core`. ([@palkan][])
@@ -195,3 +236,4 @@ p a #=> 1
195
236
 
196
237
  [@palkan]: https://github.com/palkan
197
238
  [backports]: https://github.com/marcandre/backports
239
+ [@sl4vr]: https://github.com/sl4vr
data/README.md CHANGED
@@ -1,3 +1,4 @@
1
+ [![Cult Of Martians](http://cultofmartians.com/assets/badges/badge.svg)](https://cultofmartians.com/tasks/ruby-next-cli-rewriters.html#task)
1
2
  [![Gem Version](https://badge.fury.io/rb/ruby-next.svg)](https://rubygems.org/gems/ruby-next) [![Build](https://github.com/ruby-next/ruby-next/workflows/Build/badge.svg)](https://github.com/ruby-next/ruby-next/actions)
2
3
  [![JRuby Build](https://github.com/ruby-next/ruby-next/workflows/JRuby%20Build/badge.svg)](https://github.com/ruby-next/ruby-next/actions?query=workflow%3A%22TruffleRuby+Build%22)
3
4
  [![TruffleRuby Build](https://github.com/ruby-next/ruby-next/workflows/TruffleRuby%20Build/badge.svg)](https://github.com/ruby-next/ruby-next/actions?query=workflow%3A%22TruffleRuby+Build%22)
@@ -36,6 +37,8 @@ Read more about the motivation behind the Ruby Next in this post: [Ruby Next: Ma
36
37
  - Ruby gems
37
38
  - [anyway_config](https://github.com/palkan/anyway_config)
38
39
  - [graphql-fragment_cache](https://github.com/DmitryTsepelev/graphql-ruby-fragment_cache)
40
+ - Rails applications
41
+ - [anycable_rails_demo](https://github.com/anycable/anycable_rails_demo)
39
42
  - mruby
40
43
  - [ACLI](https://github.com/palkan/acli)
41
44
 
@@ -67,7 +70,7 @@ Core provides **polyfills** for Ruby core classes APIs via Refinements (default
67
70
  Language is responsible for **transpiling** edge Ruby syntax into older versions. It could be done
68
71
  programmatically or via CLI. It also could be done in runtime.
69
72
 
70
- Currently, Ruby Next supports Ruby versions 2.3+, including JRuby 9.2.8+ and TruffleRuby 20.1+ (with some limitations). Support for EOL versions (<2.5) slightly differs though ([see below](#using-with-eol-rubies)).
73
+ Currently, Ruby Next supports Ruby versions 2.2+, including JRuby 9.2.8+ and TruffleRuby 20.1+ (with some limitations). Support for EOL versions (<2.5) slightly differs though ([see below](#using-with-eol-rubies)).
71
74
 
72
75
  Please, [open an issue](https://github.com/ruby-next/ruby-next/issues/new/choose) or join the discussion in the existing ones if you would like us to support older Ruby versions.
73
76
 
@@ -138,7 +141,7 @@ The following _rule of thumb_ is recommended when choosing between refinements a
138
141
  - Using core extensions could be considered for application development (no need to think about `using RubyNext`); this approach could potentially lead to conflicts with dependencies (if these dependencies are not using refinements 🙂)
139
142
  - Use core extensions if refinements are not supported by your platform
140
143
 
141
- **NOTE:** TruffleRuby doesn't fully support refinements (refining modules is not supported as of v20.1.0).
144
+ **NOTE:** _Edge_ APIs (i.e., from the Ruby's master branch) are included by default.
142
145
 
143
146
  [**The list of supported APIs.**][features_core]
144
147
 
@@ -200,12 +203,15 @@ It has the following interface:
200
203
  ```sh
201
204
  $ ruby-next nextify
202
205
  Usage: ruby-next nextify DIRECTORY_OR_FILE [options]
203
- -o, --output=OUTPUT Specify output directory or file or stdout (use -o stdout for that)
206
+ -o, --output=OUTPUT Specify output directory or file or stdout
204
207
  --min-version=VERSION Specify the minimum Ruby version to support
205
208
  --single-version Only create one version of a file (for the earliest Ruby version)
206
- --enable-method-reference Enable reverted method reference syntax (requires custom parser)
209
+ --edge Enable edge (master) Ruby features
210
+ --proposed Enable proposed/experimental Ruby features
207
211
  --transpile-mode=MODE Transpiler mode (ast or rewrite). Default: ast
208
212
  --[no-]refine Do not inject `using RubyNext`
213
+ --list-rewriters List available rewriters
214
+ --rewrite=REWRITERS... Specify particular Ruby features to rewrite
209
215
  -h, --help Print help
210
216
  -V Turn on verbose mode
211
217
  --dry-run Print verbose output without generating files
@@ -423,6 +429,8 @@ You must set `TargetRubyVersion: next` to make RuboCop use a Ruby Next parser.
423
429
 
424
430
  Alternatively, you can load the patch from the command line by running: `rubocop -r ruby-next/rubocop ...`.
425
431
 
432
+ We recommend using the latest RuboCop version, 'cause it has support for new nodes built-in.
433
+
426
434
  Also, when pre-transpiling source code with `ruby-next nextify`, we suggest ignoring the transpiled files:
427
435
 
428
436
  ```yml
@@ -435,7 +443,7 @@ AllCops:
435
443
 
436
444
  ## Using with EOL Rubies
437
445
 
438
- We currently provide support for Ruby 2.3 and 2.4. Work on 2.2 is in progress.
446
+ We currently provide support for Ruby 2.2, 2.3 and 2.4.
439
447
 
440
448
  Ruby Next itself relies on 2.5 features and contains polyfills only for version 2.5+ (and that won't change).
441
449
  Thus, to make it work with <2.5 we need to backport some APIs ourselves.
@@ -465,6 +473,8 @@ RUBY_NEXT_CORE_STRATEGY=backports ruby-next nextify lib/
465
473
 
466
474
  **NOTE:** Make sure you have `backports` gem installed globally or added to your bundle (if you're using `bundle exec ruby-next ...`).
467
475
 
476
+ **NOTE:** For Ruby 2.2, safe navigation operator (`&.`) and squiggly heredocs (`<<~TXT`) support is provided.
477
+
468
478
  ## Proposed and edge features
469
479
 
470
480
  Ruby Next aims to bring edge and proposed features to Ruby community before they (hopefully) reach an official Ruby release.
@@ -498,12 +508,16 @@ require "ruby-next/language/runtime"
498
508
 
499
509
  - "Endless" method definition (`def foo() = 42`) ([#16746](https://bugs.ruby-lang.org/issues/16746)).
500
510
 
501
- - Right-hand assignment (`13.divmod(5) => a,b`) ([#15921](https://bugs.ruby-lang.org/issues/15921))
511
+ - Right-hand assignment (`13.divmod(5) => a,b`) ([#15921](https://bugs.ruby-lang.org/issues/15921)).
512
+
513
+ - Find pattern (`[0, 1, 2] in [*, 1 => a, *c]`) ([#16828](https://bugs.ruby-lang.org/issues/16828)).
502
514
 
503
515
  ### Supported proposed features
504
516
 
505
517
  - _Method reference_ operator (`.:`) ([#13581](https://bugs.ruby-lang.org/issues/13581)).
506
518
 
519
+ - Shorthand Hash notation (`data = {x, y}`) ([#15236](https://bugs.ruby-lang.org/issues/15236)).
520
+
507
521
  ## Contributing
508
522
 
509
523
  Bug reports and pull requests are welcome on GitHub at [https://github.com/ruby-next/ruby-next](ttps://github.com/ruby-next/ruby-next).
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-next
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.10.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladimir Dementyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-05 00:00:00.000000000 Z
11
+ date: 2020-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-next-core
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.9.1
19
+ version: 0.10.3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.9.1
26
+ version: 0.10.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: ruby-next-parser
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 2.8.0.6
33
+ version: 3.0.0.1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 2.8.0.6
40
+ version: 3.0.0.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: unparser
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 0.4.7
47
+ version: 0.4.8
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 0.4.7
54
+ version: 0.4.8
55
55
  description: "\n Ruby Next is a collection of polyfills and a transpiler for supporting
56
56
  latest and upcoming edge CRuby features\n in older versions and alternative implementations
57
57
  (such as mruby, JRuby, Opal, Artichoke, RubyMotion, etc.).\n "
@@ -81,7 +81,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - ">="
83
83
  - !ruby/object:Gem::Version
84
- version: 2.3.0
84
+ version: 2.2.0
85
85
  required_rubygems_version: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="