rubocop-ast 0.0.1 → 0.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4c380d9edb3f0bdbdb8d7d9822b25cd96f9d23b7428bf8e8c56e4e19cf5628b
4
- data.tar.gz: 3568dc3fabb7c2d6b0575c9dc07341b4bb0b5daf6d65e284fdd524000a7de019
3
+ metadata.gz: e0750c7434a863460f8b900080b40ed7515c6e1eb415d0b91ce612f6bcac7a67
4
+ data.tar.gz: 0b08bbe1e7ed4612351d4296264f18bbe0e3af5d069410d46e017f4826ac1bc9
5
5
  SHA512:
6
- metadata.gz: 228b11a44b85a2bb3467afad8d28aadd65d7864ee7a5639773b007bcb2b9eef37ef2daff14d923730ec1b50cf3b7bfd96556ba3573e179615b9c7aba7d787480
7
- data.tar.gz: 061d70e99b00be1f84ab91d18cab96a97829e1ee5a62ef615013eae5994b72f67aa0b6101b64bf0715de6b863ebf60022849b1930ed7e306ff841d86bff39d60
6
+ metadata.gz: 7259c958f33d8a754275a5c25d8b6094f2f41be2a058935dca5d689903accd0bba77bff7ac440501c35274fb00f9a9c29c4c02f8e988e2a7bb0f3fc334773cab
7
+ data.tar.gz: e28f39434e75ad138bc49646e36d9bbb39fe25011d0bd41034c4da02d5bbb801b52e5caf06a05453e9ada004b158e1c573deb4749468f126fb4cbb88bebd3a74
data/README.md CHANGED
@@ -1,11 +1,13 @@
1
1
  # RuboCop AST
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/rubocop-ast.svg)](https://badge.fury.io/rb/rubocop-ast)
4
- [![CircleCI](https://circleci.com/gh/rubocop-hq/rubocop-ast.svg?style=svg)](https://circleci.com/gh/rubocop-hq/rubocop-ast)
4
+ [![CI](https://github.com/rubocop-hq/rubocop-ast/workflows/CI/badge.svg)](https://github.com/rubocop-hq/rubocop-ast/actions?query=workflow%3ACI)
5
5
 
6
6
  Contains the classes needed by [RuboCop](https://github.com/rubocop-hq/rubocop) to deal with Ruby's AST, in particular:
7
7
  * `RuboCop::AST::Node`
8
- * `RuboCop::NodePattern`
8
+ * `RuboCop::NodePattern` ([doc](manual/node_pattern.md))
9
+
10
+ This gem may be used independently from the main RuboCop gem.
9
11
 
10
12
  ## Installation
11
13
 
@@ -57,6 +57,7 @@ require_relative 'ast/node/while_node'
57
57
  require_relative 'ast/node/yield_node'
58
58
  require_relative 'ast/builder'
59
59
  require_relative 'ast/traversal'
60
+ require_relative 'ast/version'
60
61
 
61
62
  require_relative 'token'
62
63
  require_relative 'processed_source'
@@ -10,12 +10,15 @@ module RuboCop
10
10
  x: Regexp::EXTENDED,
11
11
  i: Regexp::IGNORECASE,
12
12
  m: Regexp::MULTILINE,
13
- n: Regexp::NOENCODING
13
+ n: Regexp::NOENCODING,
14
+ o: 0
14
15
  }.freeze
15
16
 
17
+ # Note: The 'o' option is ignored.
18
+ #
16
19
  # @return [Regexp] a regexp of this node
17
20
  def to_regexp
18
- option = regopt.children.map { |opt| OPTIONS[opt] }.inject(:|)
21
+ option = regopt.children.map { |opt| OPTIONS.fetch(opt) }.inject(:|)
19
22
  Regexp.new(content, option)
20
23
  end
21
24
 
@@ -3,7 +3,7 @@
3
3
  module RuboCop
4
4
  module AST
5
5
  module Version
6
- STRING = '0.0.1'
6
+ STRING = '0.0.2'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-ast
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bozhidar Batsov