Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rubygem-rubocop-ast for 
openSUSE:Factory checked in at 2021-08-25 20:58:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-rubocop-ast (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-rubocop-ast.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-rubocop-ast"

Wed Aug 25 20:58:16 2021 rev:12 rq:914161 version:1.11.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-rubocop-ast/rubygem-rubocop-ast.changes  
2021-07-29 21:33:05.392687879 +0200
+++ 
/work/SRC/openSUSE:Factory/.rubygem-rubocop-ast.new.1899/rubygem-rubocop-ast.changes
        2021-08-25 20:59:46.913037233 +0200
@@ -1,0 +2,27 @@
+Wed Aug 25 06:09:26 UTC 2021 - Manuel Schnitzer <[email protected]>
+
+- updated to version 1.11.0
+
+  ### New features
+
+  * [#205](https://github.com/rubocop/rubocop-ast/pull/205): Make class, 
module, and struct definitions aware of numblock. ([@koic][])
+
+  ## 1.10.0 (2021-08-12)
+
+  ### New features
+
+  * [#201](https://github.com/rubocop-hq/rubocop-ast/pull/201): Add discrete 
node classes for assignments. ([@dvandersluis][])
+
+  ## 1.9.1 (2021-08-10)
+
+  ### Bug fixes
+
+  * [#197](https://github.com/rubocop-hq/rubocop-ast/pull/197): [Fix #184] Fix 
`Node#parent_module_name` for `sclass` nodes. ([@dvandersluis][])
+
+  ## 1.9.0 (2021-08-06)
+
+  ### New features
+
+  * [#195](https://github.com/rubocop-hq/rubocop-ast/pull/195): Move 
`ProcessedSource#sorted_tokens` to be a public method. ([@dvandersluis][])
+
+-------------------------------------------------------------------

Old:
----
  rubocop-ast-1.8.0.gem

New:
----
  rubocop-ast-1.11.0.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-rubocop-ast.spec ++++++
--- /var/tmp/diff_new_pack.uZ55Wb/_old  2021-08-25 20:59:47.577036362 +0200
+++ /var/tmp/diff_new_pack.uZ55Wb/_new  2021-08-25 20:59:47.581036356 +0200
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-rubocop-ast
-Version:        1.8.0
+Version:        1.11.0
 Release:        0
 %define mod_name rubocop-ast
 %define mod_full_name %{mod_name}-%{version}

++++++ rubocop-ast-1.8.0.gem -> rubocop-ast-1.11.0.gem ++++++
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rubocop/ast/builder.rb 
new/lib/rubocop/ast/builder.rb
--- old/lib/rubocop/ast/builder.rb      2021-07-14 15:40:58.000000000 +0200
+++ new/lib/rubocop/ast/builder.rb      2021-08-24 06:29:03.000000000 +0200
@@ -20,6 +20,7 @@
       # @api private
       NODE_MAP = {
         and:          AndNode,
+        and_asgn:     AndAsgnNode,
         alias:        AliasNode,
         arg:          ArgNode,
         blockarg:     ArgNode,
@@ -32,10 +33,15 @@
         shadowarg:    ArgNode,
         args:         ArgsNode,
         array:        ArrayNode,
+        lvasgn:       AsgnNode,
+        ivasgn:       AsgnNode,
+        cvasgn:       AsgnNode,
+        gvasgn:       AsgnNode,
         block:        BlockNode,
         numblock:     BlockNode,
         break:        BreakNode,
         case_match:   CaseMatchNode,
+        casgn:        CasgnNode,
         case:         CaseNode,
         class:        ClassNode,
         const:        ConstNode,
@@ -60,6 +66,8 @@
         lambda:       LambdaNode,
         module:       ModuleNode,
         next:         NextNode,
+        op_asgn:      OpAsgnNode,
+        or_asgn:      OrAsgnNode,
         or:           OrNode,
         pair:         PairNode,
         procarg0:     Procarg0Node,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rubocop/ast/node/and_asgn_node.rb 
new/lib/rubocop/ast/node/and_asgn_node.rb
--- old/lib/rubocop/ast/node/and_asgn_node.rb   1970-01-01 01:00:00.000000000 
+0100
+++ new/lib/rubocop/ast/node/and_asgn_node.rb   2021-08-24 06:29:03.000000000 
+0200
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+module RuboCop
+  module AST
+    # A node extension for `op_asgn` nodes.
+    # This will be used in place of a plain node when the builder constructs
+    # the AST, making its methods available to all assignment nodes within 
RuboCop.
+    class AndAsgnNode < OpAsgnNode
+      # The operator being used for assignment as a symbol.
+      #
+      # @return [Symbol] the assignment operator
+      def operator
+        :'&&'
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rubocop/ast/node/asgn_node.rb 
new/lib/rubocop/ast/node/asgn_node.rb
--- old/lib/rubocop/ast/node/asgn_node.rb       1970-01-01 01:00:00.000000000 
+0100
+++ new/lib/rubocop/ast/node/asgn_node.rb       2021-08-24 06:29:03.000000000 
+0200
@@ -0,0 +1,24 @@
+# frozen_string_literal: true
+
+module RuboCop
+  module AST
+    # A node extension for `lvasgn`, `ivasgn`, `cvasgn`, and `gvasgn` nodes.
+    # This will be used in place of a plain node when the builder constructs
+    # the AST, making its methods available to all assignment nodes within 
RuboCop.
+    class AsgnNode < Node
+      # The name of the variable being assigned as a symbol.
+      #
+      # @return [Symbol] the name of the variable being assigned
+      def name
+        node_parts[0]
+      end
+
+      # The expression being assigned to the variable.
+      #
+      # @return [Node] the expression being assigned.
+      def expression
+        node_parts[1]
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rubocop/ast/node/case_match_node.rb 
new/lib/rubocop/ast/node/case_match_node.rb
--- old/lib/rubocop/ast/node/case_match_node.rb 2021-07-14 15:40:58.000000000 
+0200
+++ new/lib/rubocop/ast/node/case_match_node.rb 2021-08-24 06:29:03.000000000 
+0200
@@ -47,6 +47,7 @@
       # Returns the else branch of the `case` statement, if any.
       #
       # @return [Node] the else branch node of the `case` statement
+      # @return [EmptyElse] the empty else branch node of the `case` statement
       # @return [nil] if the case statement does not have an else branch.
       def else_branch
         node_parts[-1]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rubocop/ast/node/casgn_node.rb 
new/lib/rubocop/ast/node/casgn_node.rb
--- old/lib/rubocop/ast/node/casgn_node.rb      1970-01-01 01:00:00.000000000 
+0100
+++ new/lib/rubocop/ast/node/casgn_node.rb      2021-08-24 06:29:03.000000000 
+0200
@@ -0,0 +1,31 @@
+# frozen_string_literal: true
+
+module RuboCop
+  module AST
+    # A node extension for `casgn` nodes.
+    # This will be used in place of a plain node when the builder constructs
+    # the AST, making its methods available to all assignment nodes within 
RuboCop.
+    class CasgnNode < Node
+      # The namespace of the constant being assigned.
+      #
+      # @return [Node, nil] the node associated with the scope (e.g. cbase, 
const, ...)
+      def namespace
+        node_parts[0]
+      end
+
+      # The name of the variable being assigned as a symbol.
+      #
+      # @return [Symbol] the name of the variable being assigned
+      def name
+        node_parts[1]
+      end
+
+      # The expression being assigned to the variable.
+      #
+      # @return [Node] the expression being assigned.
+      def expression
+        node_parts[2]
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rubocop/ast/node/const_node.rb 
new/lib/rubocop/ast/node/const_node.rb
--- old/lib/rubocop/ast/node/const_node.rb      2021-07-14 15:40:58.000000000 
+0200
+++ new/lib/rubocop/ast/node/const_node.rb      2021-08-24 06:29:03.000000000 
+0200
@@ -4,8 +4,6 @@
   module AST
     # A node extension for `const` nodes.
     class ConstNode < Node
-      # The `send` node associated with this block.
-      #
       # @return [Node, nil] the node associated with the scope (e.g. cbase, 
const, ...)
       def namespace
         children[0]
@@ -16,8 +14,6 @@
         children[1]
       end
 
-      # The body of this block.
-      #
       # @return [Boolean] if the constant is a Module / Class, according to 
the standard convention.
       #                   Note: some classes might have uppercase in which 
case this method
       #                         returns false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rubocop/ast/node/op_asgn_node.rb 
new/lib/rubocop/ast/node/op_asgn_node.rb
--- old/lib/rubocop/ast/node/op_asgn_node.rb    1970-01-01 01:00:00.000000000 
+0100
+++ new/lib/rubocop/ast/node/op_asgn_node.rb    2021-08-24 06:29:03.000000000 
+0200
@@ -0,0 +1,36 @@
+# frozen_string_literal: true
+
+module RuboCop
+  module AST
+    # A node extension for `op_asgn` nodes.
+    # This will be used in place of a plain node when the builder constructs
+    # the AST, making its methods available to all assignment nodes within 
RuboCop.
+    class OpAsgnNode < Node
+      # @return [AsgnNode] the assignment node
+      def assignment_node
+        node_parts[0]
+      end
+
+      # The name of the variable being assigned as a symbol.
+      #
+      # @return [Symbol] the name of the variable being assigned
+      def name
+        assignment_node.name
+      end
+
+      # The operator being used for assignment as a symbol.
+      #
+      # @return [Symbol] the assignment operator
+      def operator
+        node_parts[1]
+      end
+
+      # The expression being assigned to the variable.
+      #
+      # @return [Node] the expression being assigned.
+      def expression
+        node_parts.last
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rubocop/ast/node/or_asgn_node.rb 
new/lib/rubocop/ast/node/or_asgn_node.rb
--- old/lib/rubocop/ast/node/or_asgn_node.rb    1970-01-01 01:00:00.000000000 
+0100
+++ new/lib/rubocop/ast/node/or_asgn_node.rb    2021-08-24 06:29:03.000000000 
+0200
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+module RuboCop
+  module AST
+    # A node extension for `op_asgn` nodes.
+    # This will be used in place of a plain node when the builder constructs
+    # the AST, making its methods available to all assignment nodes within 
RuboCop.
+    class OrAsgnNode < OpAsgnNode
+      # The operator being used for assignment as a symbol.
+      #
+      # @return [Symbol] the assignment operator
+      def operator
+        :'||'
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rubocop/ast/node.rb new/lib/rubocop/ast/node.rb
--- old/lib/rubocop/ast/node.rb 2021-07-14 15:40:58.000000000 +0200
+++ new/lib/rubocop/ast/node.rb 2021-08-24 06:29:03.000000000 +0200
@@ -317,7 +317,11 @@
         # returns nil if answer cannot be determined
         ancestors = each_ancestor(:class, :module, :sclass, :casgn, :block)
         result    = ancestors.map do |ancestor|
-          parent_module_name_part(ancestor) { |full_name| return full_name }
+          parent_module_name_part(ancestor) do |full_name|
+            return nil unless full_name
+
+            full_name
+          end
         end.compact.reverse.join('::')
         result.empty? ? 'Object' : result
       end
@@ -503,20 +507,20 @@
       # @deprecated Use `:class_constructor?`
       # @!method struct_constructor?(node = self)
       def_node_matcher :struct_constructor?, <<~PATTERN
-        (block (send #global_const?(:Struct) :new ...) _ $_)
+        ({block numblock} (send #global_const?(:Struct) :new ...) _ $_)
       PATTERN
 
       # @!method class_definition?(node = self)
       def_node_matcher :class_definition?, <<~PATTERN
         {(class _ _ $_)
          (sclass _ $_)
-         (block (send #global_const?({:Struct :Class}) :new ...) _ $_)}
+         ({block numblock} (send #global_const?({:Struct :Class}) :new ...) _ 
$_)}
       PATTERN
 
       # @!method module_definition?(node = self)
       def_node_matcher :module_definition?, <<~PATTERN
         {(module _ $_)
-         (block (send #global_const?(:Module) :new ...) _ $_)}
+         ({block numblock} (send #global_const?(:Module) :new ...) _ $_)}
       PATTERN
 
       # Some expressions are evaluated for their value, some for their side
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rubocop/ast/node_pattern/node.rb 
new/lib/rubocop/ast/node_pattern/node.rb
--- old/lib/rubocop/ast/node_pattern/node.rb    2021-07-14 15:40:58.000000000 
+0200
+++ new/lib/rubocop/ast/node_pattern/node.rb    2021-08-24 06:29:03.000000000 
+0200
@@ -54,7 +54,7 @@
           children_nodes.sum(&:nb_captures)
         end
 
-        # @return [Boolean] returns true iff matches variable number of 
elements
+        # @return [Boolean] returns whether it matches a variable number of 
elements
         def variadic?
           arity.is_a?(Range)
         end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rubocop/ast/node_pattern.rb 
new/lib/rubocop/ast/node_pattern.rb
--- old/lib/rubocop/ast/node_pattern.rb 2021-07-14 15:40:58.000000000 +0200
+++ new/lib/rubocop/ast/node_pattern.rb 2021-08-24 06:29:03.000000000 +0200
@@ -80,23 +80,23 @@
         "#<#{self.class} #{pattern}>"
       end
 
-      def marshal_load(pattern) #:nodoc:
+      def marshal_load(pattern) # :nodoc:
         initialize pattern
       end
 
-      def marshal_dump #:nodoc:
+      def marshal_dump # :nodoc:
         pattern
       end
 
-      def as_json(_options = nil) #:nodoc:
+      def as_json(_options = nil) # :nodoc:
         pattern
       end
 
-      def encode_with(coder) #:nodoc:
+      def encode_with(coder) # :nodoc:
         coder['pattern'] = pattern
       end
 
-      def init_with(coder) #:nodoc:
+      def init_with(coder) # :nodoc:
         initialize(coder['pattern'])
       end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rubocop/ast/processed_source.rb 
new/lib/rubocop/ast/processed_source.rb
--- old/lib/rubocop/ast/processed_source.rb     2021-07-14 15:40:58.000000000 
+0200
+++ new/lib/rubocop/ast/processed_source.rb     2021-08-24 06:29:03.000000000 
+0200
@@ -177,6 +177,14 @@
         sorted_tokens[last_token_index(range_or_node)]
       end
 
+      # The tokens list is always sorted by token position, except for cases 
when heredoc
+      # is passed as a method argument. In this case tokens are interleaved by
+      # heredoc contents' tokens.
+      def sorted_tokens
+        # Use stable sort.
+        @sorted_tokens ||= tokens.sort_by.with_index { |token, i| 
[token.begin_pos, i] }
+      end
+
       private
 
       def comment_index
@@ -272,14 +280,6 @@
         sorted_tokens.bsearch_index { |token| token.end_pos >= end_pos }
       end
 
-      # The tokens list is always sorted by token position, except for cases 
when heredoc
-      # is passed as a method argument. In this case tokens are interleaved by
-      # heredoc contents' tokens.
-      def sorted_tokens
-        # Use stable sort.
-        @sorted_tokens ||= tokens.sort_by.with_index { |token, i| 
[token.begin_pos, i] }
-      end
-
       def source_range(range_or_node)
         if range_or_node.respond_to?(:source_range)
           range_or_node.source_range
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rubocop/ast/version.rb 
new/lib/rubocop/ast/version.rb
--- old/lib/rubocop/ast/version.rb      2021-07-14 15:40:58.000000000 +0200
+++ new/lib/rubocop/ast/version.rb      2021-08-24 06:29:03.000000000 +0200
@@ -3,7 +3,7 @@
 module RuboCop
   module AST
     module Version
-      STRING = '1.8.0'
+      STRING = '1.11.0'
     end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/rubocop/ast.rb new/lib/rubocop/ast.rb
--- old/lib/rubocop/ast.rb      2021-07-14 15:40:58.000000000 +0200
+++ new/lib/rubocop/ast.rb      2021-08-24 06:29:03.000000000 +0200
@@ -39,10 +39,12 @@
 require_relative 'ast/node/arg_node'
 require_relative 'ast/node/args_node'
 require_relative 'ast/node/array_node'
+require_relative 'ast/node/asgn_node'
 require_relative 'ast/node/block_node'
 require_relative 'ast/node/break_node'
 require_relative 'ast/node/case_match_node'
 require_relative 'ast/node/case_node'
+require_relative 'ast/node/casgn_node'
 require_relative 'ast/node/class_node'
 require_relative 'ast/node/const_node'
 require_relative 'ast/node/def_node'
@@ -61,6 +63,9 @@
 require_relative 'ast/node/lambda_node'
 require_relative 'ast/node/module_node'
 require_relative 'ast/node/next_node'
+require_relative 'ast/node/op_asgn_node'
+require_relative 'ast/node/and_asgn_node'
+require_relative 'ast/node/or_asgn_node'
 require_relative 'ast/node/or_node'
 require_relative 'ast/node/pair_node'
 require_relative 'ast/node/procarg0_node'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2021-07-14 15:40:58.000000000 +0200
+++ new/metadata        2021-08-24 06:29:03.000000000 +0200
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: rubocop-ast
 version: !ruby/object:Gem::Version
-  version: 1.8.0
+  version: 1.11.0
 platform: ruby
 authors:
 - Bozhidar Batsov
@@ -10,7 +10,7 @@
 autorequire:
 bindir: bin
 cert_chain: []
-date: 2021-07-14 00:00:00.000000000 Z
+date: 2021-08-24 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: parser
@@ -63,14 +63,17 @@
 - lib/rubocop/ast/ext/range_min_max.rb
 - lib/rubocop/ast/node.rb
 - lib/rubocop/ast/node/alias_node.rb
+- lib/rubocop/ast/node/and_asgn_node.rb
 - lib/rubocop/ast/node/and_node.rb
 - lib/rubocop/ast/node/arg_node.rb
 - lib/rubocop/ast/node/args_node.rb
 - lib/rubocop/ast/node/array_node.rb
+- lib/rubocop/ast/node/asgn_node.rb
 - lib/rubocop/ast/node/block_node.rb
 - lib/rubocop/ast/node/break_node.rb
 - lib/rubocop/ast/node/case_match_node.rb
 - lib/rubocop/ast/node/case_node.rb
+- lib/rubocop/ast/node/casgn_node.rb
 - lib/rubocop/ast/node/class_node.rb
 - lib/rubocop/ast/node/const_node.rb
 - lib/rubocop/ast/node/def_node.rb
@@ -102,6 +105,8 @@
 - lib/rubocop/ast/node/mixin/predicate_operator_node.rb
 - lib/rubocop/ast/node/module_node.rb
 - lib/rubocop/ast/node/next_node.rb
+- lib/rubocop/ast/node/op_asgn_node.rb
+- lib/rubocop/ast/node/or_asgn_node.rb
 - lib/rubocop/ast/node/or_node.rb
 - lib/rubocop/ast/node/pair_node.rb
 - lib/rubocop/ast/node/procarg0_node.rb

Reply via email to