vernacular-ast 0.1.0 → 0.1.1

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: 7187ff930a2ae06db45ed8ccf45de390dbf1ad53346134e179bf78f1953c00c6
4
- data.tar.gz: f808d6e516875fddc66f0386f276e8fbff6a8e1b11588178d7c7a977308cc661
3
+ metadata.gz: 96bec250ad91db03435f9cb387a8e0b3fae9cd22b0e25eb1b90cd8c07e2fae3d
4
+ data.tar.gz: bdc4ba77d0e000247fcf38eaf039f5cd8df5fc9c960d276d01aae75f4c137f48
5
5
  SHA512:
6
- metadata.gz: 2f87a91632829d79819c827b492b44cb23619adf842263dc13b15c76d4679bc7b699bc97ba558f7687f2c8ea2d979685432bfb4407495c5297465cebcdf1e973
7
- data.tar.gz: af2082a27e2fd9945e9e7ebadd55979ff942c1110f21c118ff9e01f82f65a0e693255aef6c8d79cbb446c0c155f8e225506f96d6105a5f35059a1031742957ef
6
+ metadata.gz: d96d8815449a039aeab4ef4a1f3142b1bfe2103381e4f28f6ba736fe5c7042bf05faaccba3752bbbf8040fa6ef02a161222f2ae072c12d6d2e069c99e6e18296
7
+ data.tar.gz: 2a9f79ca5030a2d38557240f1495e8ceaeec30f9066532189a6ef3994c018e6543dd944fb7398de490896c4ace5b9b5704e6e33423cdeee1e912cea7dda85fb0
@@ -1,7 +1,7 @@
1
1
  AllCops:
2
2
  DisplayCopNames: true
3
3
  DisplayStyleGuide: true
4
- TargetRubyVersion: 2.5
4
+ TargetRubyVersion: 2.6
5
5
  Exclude:
6
6
  - 'lib/vernacular/ast/parser.rb'
7
7
  - 'test/typed_method_args_test.rb'
@@ -1,4 +1,10 @@
1
1
  language: ruby
2
- rvm: 2.5.0
2
+ rvm: 2.6.1
3
+ branches:
4
+ only: master
5
+ before_install:
6
+ - gem install bundler
7
+ script:
8
+ - bundle exec rake
9
+ - bundle exec rubocop
3
10
  cache: bundler
4
- script: bundle exec rake && bundle exec rubocop
@@ -0,0 +1,14 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.1.1] - 2019-02-19
10
+ ### Changed
11
+ - Support other versions of ruby besides 2.5.
12
+
13
+ [Unreleased]: https://github.com/kddeisz/vernacular-ast/compare/v0.1.1...HEAD
14
+ [0.1.1]: https://github.com/kddeisz/vernacular-ast/compare/v0.1.0...v0.1.1
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vernacular-ast (0.1.0)
5
- parser (~> 2.5)
4
+ vernacular-ast (0.1.1)
5
+ parser (~> 2.6)
6
6
  racc (~> 1.4)
7
7
  vernacular (~> 1.0)
8
8
 
@@ -10,34 +10,38 @@ GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
12
  ast (2.4.0)
13
+ jaro_winkler (1.5.2)
13
14
  minitest (5.11.3)
14
- parallel (1.12.1)
15
- parser (2.5.0.0)
15
+ parallel (1.13.0)
16
+ parser (2.6.0.0)
16
17
  ast (~> 2.4.0)
17
- powerpack (0.1.1)
18
+ powerpack (0.1.2)
19
+ psych (3.1.0)
18
20
  racc (1.4.14)
19
21
  rainbow (3.0.0)
20
- rake (12.3.0)
21
- rubocop (0.52.1)
22
+ rake (12.3.2)
23
+ rubocop (0.65.0)
24
+ jaro_winkler (~> 1.5.1)
22
25
  parallel (~> 1.10)
23
- parser (>= 2.4.0.2, < 3.0)
26
+ parser (>= 2.5, != 2.5.1.1)
24
27
  powerpack (~> 0.1)
28
+ psych (>= 3.1.0)
25
29
  rainbow (>= 2.2.2, < 4.0)
26
30
  ruby-progressbar (~> 1.7)
27
- unicode-display_width (~> 1.0, >= 1.0.1)
28
- ruby-progressbar (1.9.0)
29
- unicode-display_width (1.3.0)
31
+ unicode-display_width (~> 1.4.0)
32
+ ruby-progressbar (1.10.0)
33
+ unicode-display_width (1.4.1)
30
34
  vernacular (1.0.0)
31
35
 
32
36
  PLATFORMS
33
37
  ruby
34
38
 
35
39
  DEPENDENCIES
36
- bundler (~> 1.16)
40
+ bundler (~> 2.0)
37
41
  minitest (~> 5.11)
38
42
  rake (~> 12.3)
39
- rubocop (~> 0.52)
43
+ rubocop (~> 0.65)
40
44
  vernacular-ast!
41
45
 
42
46
  BUNDLED WITH
43
- 1.16.1
47
+ 2.0.1
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2018 Kevin Deisz
3
+ Copyright (c) 2019 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
@@ -26,7 +26,7 @@ module Vernacular
26
26
 
27
27
  Vernacular::BootsnapMixin.prepend(
28
28
  Module.new do
29
- def input_to_storage(_, filepath)
29
+ def input_to_storage(_content, filepath)
30
30
  if filepath == PARSER_PATH
31
31
  raise ::Bootsnap::CompileCache::Uncompilable, "can't compile parser"
32
32
  end
@@ -54,7 +54,9 @@ module Vernacular
54
54
  output = PARSER_PATH
55
55
  exec_path = Gem.activate_bin_path('racc', 'racc', [])
56
56
  `#{exec_path} --superclass=Parser::Base -o #{output} #{filepath}`
57
- File.write(output, File.read(output).gsub('Ruby25', 'Vernacular'))
57
+
58
+ parser_name = "Ruby#{parser_version}"
59
+ File.write(output, File.read(output).gsub(parser_name, 'Vernacular'))
58
60
  end
59
61
 
60
62
  # rubocop:disable Metrics/MethodLength
@@ -45,8 +45,10 @@ module Vernacular
45
45
 
46
46
  def type_check_node_from(method_node)
47
47
  type_check_node = method_node.children[1].children.last
48
+
48
49
  return if !type_check_node ||
49
50
  type_check_node.type != :type_check_arglist
51
+
50
52
  type_check_node
51
53
  end
52
54
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Vernacular
4
4
  module AST
5
- VERSION = '0.1.0'
5
+ VERSION = '0.1.1'
6
6
  end
7
7
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- lib = File.expand_path('../lib', __FILE__)
3
+ lib = File.expand_path('lib', __dir__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
  require 'vernacular/ast/version'
6
6
 
@@ -21,12 +21,12 @@ Gem::Specification.new do |spec|
21
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  spec.require_paths = ['lib']
23
23
 
24
- spec.add_dependency 'parser', '~> 2.5'
24
+ spec.add_dependency 'parser', '~> 2.6'
25
25
  spec.add_dependency 'racc', '~> 1.4'
26
26
  spec.add_dependency 'vernacular', '~> 1.0'
27
27
 
28
- spec.add_development_dependency 'bundler', '~> 1.16'
28
+ spec.add_development_dependency 'bundler', '~> 2.0'
29
29
  spec.add_development_dependency 'minitest', '~> 5.11'
30
30
  spec.add_development_dependency 'rake', '~> 12.3'
31
- spec.add_development_dependency 'rubocop', '~> 0.52'
31
+ spec.add_development_dependency 'rubocop', '~> 0.65'
32
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vernacular-ast
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Deisz
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-02-19 00:00:00.000000000 Z
11
+ date: 2019-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parser
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.5'
19
+ version: '2.6'
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: '2.5'
26
+ version: '2.6'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: racc
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '1.16'
61
+ version: '2.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '1.16'
68
+ version: '2.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: minitest
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0.52'
103
+ version: '0.65'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0.52'
110
+ version: '0.65'
111
111
  description:
112
112
  email:
113
113
  - kevin.deisz@gmail.com
@@ -118,6 +118,7 @@ files:
118
118
  - ".gitignore"
119
119
  - ".rubocop.yml"
120
120
  - ".travis.yml"
121
+ - CHANGELOG.md
121
122
  - Gemfile
122
123
  - Gemfile.lock
123
124
  - LICENSE
@@ -151,8 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
151
152
  - !ruby/object:Gem::Version
152
153
  version: '0'
153
154
  requirements: []
154
- rubyforge_project:
155
- rubygems_version: 2.7.4
155
+ rubygems_version: 3.0.1
156
156
  signing_key:
157
157
  specification_version: 4
158
158
  summary: Extends Vernacular to support rewriting the AST