preval 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 38f2a5ee7be77fb0aac3f27ff453882026d53c50dfa3358dbcdf5f2a022486e2
4
- data.tar.gz: 4dc976e6da2f87d5b18cd588d1c11e86e0a3aa08a4adca073629144984d5de40
3
+ metadata.gz: 8d559e8c255c228460dbc054d0215d4cedd02db330c09791add966ede69e191c
4
+ data.tar.gz: 2367c273ffc505b30cecf509d2230c9ea87cd42ae6aa041366d8760c4298e247
5
5
  SHA512:
6
- metadata.gz: d0387f1656097fe72b7eef9a83b98bf5c8cd38b65225c5931dc7d179416630577a7e3248fa57e4f4453cecca91fcd864c48e7e181aa74178cacf3fce4cdfe692
7
- data.tar.gz: 9d623940a4710c8e83c1f9ac5eccc797280d99db3d4ace3750d01577965198302df92f80f7336525583d9b3b55a4ba3e68201b6d8d6e2343cbf7929d5f4ab1b0
6
+ metadata.gz: 0fe4455541218b8f592eed0a9fec19904adcedb769d8b2c7e3dc23a4e2922c8ba96c90f61ffc24b480866021c50403b43f4dac8e88a7819230bedbd267d93d51
7
+ data.tar.gz: 28135f03faebb4611188c5e38e9fa778267c3a9f7949380a5016bf0bf944033ede69b7241f123a8983f21660a262ab7ad550a3da3eb84b91069880478f5e9d86
@@ -0,0 +1,10 @@
1
+ pull_request_rules:
2
+ - name: Automatically merge dependencies
3
+ conditions:
4
+ - base=master
5
+ - label=dependencies
6
+ - status-success=Travis CI - Pull Request
7
+ actions:
8
+ merge:
9
+ strict: true
10
+ delete_head_branch: {}
@@ -4,6 +4,7 @@ AllCops:
4
4
  TargetRubyVersion: 2.6
5
5
  Exclude:
6
6
  - lib/preval/format.rb
7
+ - vendor/**/*
7
8
 
8
9
  Layout/CommentIndentation:
9
10
  Enabled: false
@@ -1,7 +1,9 @@
1
1
  language: ruby
2
+ rvm: 2.6
3
+ branches:
4
+ only: master
2
5
  cache: bundler
3
- rvm: 2.6.0
4
- before_install: gem install bundler -v 2.0.0
6
+ before_install: gem install bundler
5
7
  script:
6
8
  - bundle exec rake
7
9
  - bundle exec rubocop
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.6.0] - 2019-12-31
10
+
11
+ ### Added
12
+
13
+ - Support for `nokw_param`, `args_forward`, and `in` nodes.
14
+
9
15
  ## [0.5.0] - 2019-06-13
10
16
 
11
17
  ### Added
@@ -1,27 +1,27 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- preval (0.5.0)
4
+ preval (0.6.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
9
  ast (2.4.0)
10
- bootsnap (1.4.4)
10
+ bootsnap (1.4.5)
11
11
  msgpack (~> 1.0)
12
- jaro_winkler (1.5.2)
13
- minitest (5.11.3)
14
- msgpack (1.2.10)
12
+ jaro_winkler (1.5.4)
13
+ minitest (5.13.0)
14
+ msgpack (1.3.1)
15
15
  mustermann (1.0.3)
16
- parallel (1.17.0)
17
- parser (2.6.3.0)
16
+ parallel (1.19.1)
17
+ parser (2.6.5.0)
18
18
  ast (~> 2.4.0)
19
- rack (2.0.6)
20
- rack-protection (2.0.5)
19
+ rack (2.0.8)
20
+ rack-protection (2.0.7)
21
21
  rack
22
22
  rainbow (3.0.0)
23
- rake (12.3.2)
24
- rubocop (0.71.0)
23
+ rake (13.0.1)
24
+ rubocop (0.78.0)
25
25
  jaro_winkler (~> 1.5.1)
26
26
  parallel (~> 1.10)
27
27
  parser (>= 2.6)
@@ -29,12 +29,12 @@ GEM
29
29
  ruby-progressbar (~> 1.7)
30
30
  unicode-display_width (>= 1.4.0, < 1.7)
31
31
  ruby-progressbar (1.10.1)
32
- sinatra (2.0.5)
32
+ sinatra (2.0.7)
33
33
  mustermann (~> 1.0)
34
34
  rack (~> 2.0)
35
- rack-protection (= 2.0.5)
35
+ rack-protection (= 2.0.7)
36
36
  tilt (~> 2.0)
37
- tilt (2.0.9)
37
+ tilt (2.0.10)
38
38
  unicode-display_width (1.6.0)
39
39
 
40
40
  PLATFORMS
@@ -45,9 +45,9 @@ DEPENDENCIES
45
45
  bundler (~> 2.0)
46
46
  minitest (~> 5.11)
47
47
  preval!
48
- rake (~> 12.3)
48
+ rake (~> 13.0)
49
49
  rubocop (~> 0.71)
50
50
  sinatra
51
51
 
52
52
  BUNDLED WITH
53
- 2.0.1
53
+ 2.1.2
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2019 Kevin Deisz
3
+ Copyright (c) 2019-present Kevin Deisz
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Preval
2
2
 
3
3
  [![Build Status](https://travis-ci.com/kddeisz/preval.svg?branch=master)](https://travis-ci.com/kddeisz/preval)
4
+ [![Gem](https://img.shields.io/gem/v/preval.svg)](https://rubygems.org/gems/preval)
4
5
 
5
6
  `preval` is a gem that hooks into the Ruby compilation process and runs optimizations before it gets loaded by the virtual machine.
6
7
 
@@ -20,6 +20,7 @@ module Preval
20
20
  parts.join
21
21
  end
22
22
  to(:args_add_star) { starts_with?(:args_new) ? "*#{source(1)}" : "#{source(0)}, *#{source(1)}" }
23
+ to(:args_forward) { '...' }
23
24
  to(:args_new) { '' }
24
25
  to(:assign) { "#{source(0)} = #{source(1)}" }
25
26
  to(:array) { body[0].nil? ? '[]' : "#{starts_with?(:args_add) ? '[' : ''}#{source(0)}]" }
@@ -72,6 +73,7 @@ module Preval
72
73
  to(:if) { "if #{source(0)}\n#{source(1)}\n#{body[2] ? "#{source(2)}\n" : ''}end" }
73
74
  to(:if_mod) { "#{source(1)} if #{source(0)}" }
74
75
  to(:ifop) { "#{source(0)} ? #{source(1)} : #{source(2)}"}
76
+ to(:in) { "in #{source(0)}\n#{source(1)}" }
75
77
  to(:kwrest_param) { "**#{body[0] ? source(0) : ''}" }
76
78
  to(:lambda) { "->(#{starts_with?(:paren) ? body[0].body[0].to_source : source(0)}) { #{source(1)} }" }
77
79
  to(:massign) { join(' = ') }
@@ -99,7 +101,7 @@ module Preval
99
101
  parts << rest.to_source if rest
100
102
  parts += post.map(&:to_source) if post
101
103
  parts += kwargs.map { |(kwarg, value)| value ? "#{kwarg.to_source} #{value.to_source}" : kwarg.to_source } if kwargs
102
- parts << kwarg_rest.to_source if kwarg_rest
104
+ parts << (kwarg_rest.is_a?(Symbol) ? "**#{kwarg_rest}" : kwarg_rest.to_source) if kwarg_rest
103
105
  parts << block.to_source if block
104
106
 
105
107
  parts.join(', ')
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Preval
4
- VERSION = '0.5.0'
4
+ VERSION = '0.6.0'
5
5
  end
@@ -27,6 +27,6 @@ Gem::Specification.new do |spec|
27
27
 
28
28
  spec.add_development_dependency 'bundler', '~> 2.0'
29
29
  spec.add_development_dependency 'minitest', '~> 5.11'
30
- spec.add_development_dependency 'rake', '~> 12.3'
30
+ spec.add_development_dependency 'rake', '~> 13.0'
31
31
  spec.add_development_dependency 'rubocop', '~> 0.71'
32
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: preval
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Deisz
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-06-13 00:00:00.000000000 Z
11
+ date: 2019-12-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '12.3'
47
+ version: '13.0'
48
48
  type: :development
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: '12.3'
54
+ version: '13.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rubocop
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -74,6 +74,7 @@ extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
76
  - ".gitignore"
77
+ - ".mergify.yml"
77
78
  - ".rubocop.yml"
78
79
  - ".travis.yml"
79
80
  - CHANGELOG.md
@@ -121,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
122
  - !ruby/object:Gem::Version
122
123
  version: '0'
123
124
  requirements: []
124
- rubygems_version: 3.0.3
125
+ rubygems_version: 3.1.2
125
126
  signing_key:
126
127
  specification_version: 4
127
128
  summary: Automatically optimizes your Ruby code