querly 1.2.0 → 1.3.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: 3604de13f36852d57290140b9bf4e4bfeb5811ffb8dbfef054a3e0ce8e9aa47a
4
- data.tar.gz: '09038f2030b2c6bc859cfbd7087ae62da8efd2ac4ae1e3b945741d3f65d3146b'
3
+ metadata.gz: c9b153bfa5b7a49deb8a6bbff12517452d2b23498b371a4fcbc154fac2330dd9
4
+ data.tar.gz: 7d08df5b8053cbb9e45d6db6b132e6dcb9171797d5687caf96b3827aed53fae2
5
5
  SHA512:
6
- metadata.gz: 8c2dbbd840b5eb4fa65418c4d2ab81af6154dbbac94c96d083c4f7f9d88e5447666f7d583b54f4c266f52c4f4f15d2f38210c353762c2f8c281785da161d0aec
7
- data.tar.gz: 4fd40dc297b03b7de10e3f1bb348a553d1af355f3e6310feed4b9b8e1fe5324757684e443cb8a699952bc0ccfedcf95f072e13890b5cc838f4c2850b7ef09d58
6
+ metadata.gz: c2a5371c77896ce523078b014875744f52a248b1e84f04772e0b1ae7eee3cdf876136915c87de876436dc180e9c0b1cbb6ef487a9aaf4dccaf7faad68223546d
7
+ data.tar.gz: 2671df7da016eeb25038a504ee5c7e203e6079ead0adcf2cdfeb25c02c3a3157ee5a05347f9cdd33e25289d12b28de5a38a15fb595bb258e49accf5c4d818b3d
@@ -9,10 +9,7 @@ jobs:
9
9
  - uses: actions/checkout@v2
10
10
  - uses: ruby/setup-ruby@v1
11
11
  with:
12
- ruby-version: 2.6
13
- - run: gem install rubocop rubocop-rubycw --no-document
12
+ ruby-version: "3.0"
13
+ - run: gem install rubocop rubocop-rubycw
14
14
  - name: Run RuboCop
15
- shell: bash
16
- run: |
17
- # https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-error-message
18
- rubocop | ruby -pe 'sub(/^(.+):(\d+):(\d+): (.): (.+)$/, %q{::error file=\1,line=\2,col=\3::\5})'
15
+ run: rubocop --format github
@@ -8,15 +8,15 @@ on:
8
8
 
9
9
  jobs:
10
10
  test:
11
- runs-on: "ubuntu-latest"
11
+ runs-on: ubuntu-latest
12
12
  strategy:
13
13
  matrix:
14
- ruby: [2.6, 2.7, head]
14
+ ruby: ["2.7", "3.0", head]
15
15
  steps:
16
16
  - uses: actions/checkout@v2
17
17
  - uses: ruby/setup-ruby@v1
18
18
  with:
19
19
  ruby-version: ${{ matrix.ruby }}
20
- - run: bundle install --jobs 4 --retry 3
20
+ bundler-cache: true
21
21
  - run: bin/setup
22
22
  - run: bundle exec rake build test
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 1.3.0 (2021-07-05)
6
+
7
+ * Require Ruby 2.7 or 3.0 by @yubiquitous ([#88](https://github.com/soutaro/querly/pull/88))
8
+ * Use 3.0 compatible parser by @yubiquitous ([#88](https://github.com/soutaro/querly/pull/88))
9
+
5
10
  ## 1.2.0 (2020-12-15)
6
11
 
7
12
  * Relax Thor version requirements by @y-yagi ([#85](https://github.com/soutaro/querly/pull/85))
data/lib/querly.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'pathname'
2
2
  require "yaml"
3
3
  require "rainbow"
4
- require "parser/ruby25"
4
+ require "parser/ruby30"
5
5
  require "set"
6
6
  require "open3"
7
7
  require "active_support/inflector"
@@ -140,7 +140,7 @@ module Querly
140
140
 
141
141
  found = false
142
142
 
143
- node = Parser::Ruby25.parse(example)
143
+ node = Parser::Ruby30.parse(example)
144
144
  NodePair.new(node: node).each_subpair do |pair|
145
145
  if analyzer.test_pair(pair, pattern)
146
146
  found = true
data/lib/querly/script.rb CHANGED
@@ -4,7 +4,7 @@ module Querly
4
4
  attr_reader :node
5
5
 
6
6
  def self.load(path:, source:)
7
- parser = Parser::Ruby25.new(Builder.new).tap do |parser|
7
+ parser = Parser::Ruby30.new(Builder.new).tap do |parser|
8
8
  parser.diagnostics.all_errors_are_fatal = true
9
9
  parser.diagnostics.ignore_warnings = true
10
10
  end
@@ -1,3 +1,3 @@
1
1
  module Querly
2
- VERSION = "1.2.0"
2
+ VERSION = "1.3.0"
3
3
  end
data/querly.gemspec CHANGED
@@ -22,6 +22,8 @@ Gem::Specification.new do |spec|
22
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
23
  spec.require_paths = ["lib"]
24
24
 
25
+ spec.required_ruby_version = ">= 2.7"
26
+
25
27
  spec.add_development_dependency "bundler", ">= 1.12"
26
28
  spec.add_development_dependency "rake", "~> 13.0"
27
29
  spec.add_development_dependency "minitest", "~> 5.0"
@@ -32,7 +34,7 @@ Gem::Specification.new do |spec|
32
34
  spec.add_development_dependency "haml", "~> 5.0.4"
33
35
 
34
36
  spec.add_dependency 'thor', ">= 0.19.0"
35
- spec.add_dependency "parser", ">= 2.5.0"
37
+ spec.add_dependency "parser", ">= 3.0"
36
38
  spec.add_dependency "rainbow", ">= 2.1"
37
39
  spec.add_dependency "activesupport", ">= 5.0"
38
40
  spec.add_dependency "parallel", "~>1.17"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: querly
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Soutaro Matsumoto
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-15 00:00:00.000000000 Z
11
+ date: 2021-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -142,14 +142,14 @@ dependencies:
142
142
  requirements:
143
143
  - - ">="
144
144
  - !ruby/object:Gem::Version
145
- version: 2.5.0
145
+ version: '3.0'
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
- version: 2.5.0
152
+ version: '3.0'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: rainbow
155
155
  requirement: !ruby/object:Gem::Requirement
@@ -264,7 +264,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
264
264
  requirements:
265
265
  - - ">="
266
266
  - !ruby/object:Gem::Version
267
- version: '0'
267
+ version: '2.7'
268
268
  required_rubygems_version: !ruby/object:Gem::Requirement
269
269
  requirements:
270
270
  - - ">="