Hello community, here is the log from the commit of package rubygem-ast for openSUSE:Factory checked in at 2020-09-01 20:11:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-ast (Old) and /work/SRC/openSUSE:Factory/.rubygem-ast.new.3399 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-ast" Tue Sep 1 20:11:31 2020 rev:2 rq:831121 version:2.4.1 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-ast/rubygem-ast.changes 2019-10-03 14:08:33.960238205 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-ast.new.3399/rubygem-ast.changes 2020-09-01 20:11:51.572715337 +0200 @@ -1,0 +2,10 @@ +Tue Sep 1 09:51:49 UTC 2020 - Dan Čermák <[email protected]> + +- New upstream release 2.4.1 + + * Only ship the necessary library files in the gem artifact + * bump rake + * Removed unused dependencies from gemspec. + * Fixed AST::Node#updated to always return a copy. (#25) + +------------------------------------------------------------------- Old: ---- ast-2.4.0.gem New: ---- ast-2.4.1.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-ast.spec ++++++ --- /var/tmp/diff_new_pack.vpH7ee/_old 2020-09-01 20:11:52.784715849 +0200 +++ /var/tmp/diff_new_pack.vpH7ee/_new 2020-09-01 20:11:52.788715850 +0200 @@ -1,7 +1,7 @@ # # spec file for package rubygem-ast # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,32 +12,30 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # +%define mod_name ast +%define mod_full_name %{mod_name}-%{version} # # This file was generated with a gem2rpm.yml and not just plain gem2rpm. # All sections marked as MANUAL, license headers, summaries and descriptions # can be maintained in that file. Please consult this file before editing any # of those fields # - Name: rubygem-ast -Version: 2.4.0 +Version: 2.4.1 Release: 0 -%define mod_name ast -%define mod_full_name %{mod_name}-%{version} -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: %{rubygem gem2rpm} -BuildRequires: %{ruby} -BuildRequires: ruby-macros >= 5 -Url: https://whitequark.github.io/ast/ -Source: https://rubygems.org/gems/%{mod_full_name}.gem -Source1: gem2rpm.yml Summary: A library for working with Abstract Syntax Trees License: MIT Group: Development/Languages/Ruby +URL: https://whitequark.github.io/ast/ +Source: https://rubygems.org/gems/%{mod_full_name}.gem +Source1: gem2rpm.yml +BuildRequires: %{rubygem gem2rpm} +BuildRequires: %{ruby} +BuildRequires: ruby-macros >= 5 %description A library for working with Abstract Syntax Trees. @@ -48,7 +46,6 @@ %install %gem_install \ - --doc-files="CHANGELOG.md README.md" \ -f %gem_packages ++++++ ast-2.4.0.gem -> ast-2.4.1.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.gitignore new/.gitignore --- old/.gitignore 2018-01-25 18:35:38.000000000 +0100 +++ new/.gitignore 1970-01-01 01:00:00.000000000 +0100 @@ -1,8 +0,0 @@ -.bundle -Gemfile.lock -pkg/* -.rbx/ -*.sublime-* -doc/ -.yardoc/ -coverage/ \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.travis.yml new/.travis.yml --- old/.travis.yml 2018-01-25 18:35:38.000000000 +0100 +++ new/.travis.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,14 +0,0 @@ -language: ruby -rvm: - - 1.9.2 - - 1.9.3 - - 2.0 - - 2.1 - - 2.2 - - 2.3 - - 2.4.1 - - jruby-18mode - - jruby-19mode - -before_install: - - gem install bundler diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.yardopts new/.yardopts --- old/.yardopts 2018-01-25 18:35:38.000000000 +0100 +++ new/.yardopts 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ --r README.YARD.md -m markdown --protected diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md --- old/CHANGELOG.md 2018-01-25 18:35:38.000000000 +0100 +++ new/CHANGELOG.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,9 +0,0 @@ -Changelog -========= - -v1.1.0 (2013-06-17) -------------------- - -API changes: - - * AST::Processor#process will return nil if passed nil, instead of raising NoMethodError. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gemfile new/Gemfile --- old/Gemfile 2018-01-25 18:35:38.000000000 +0100 +++ new/Gemfile 1970-01-01 01:00:00.000000000 +0100 @@ -1,4 +0,0 @@ -source "http://rubygems.org" - -# Specify your gem's dependencies in furnace.gemspec -gemspec \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2018-01-25 18:35:38.000000000 +0100 +++ new/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,23 +0,0 @@ -# AST - -[](https://travis-ci.org/whitequark/ast) -[](https://codeclimate.com/github/whitequark/ast) -[](https://coveralls.io/r/whitequark/ast) - -AST is a small library for working with immutable abstract syntax trees. - -## Installation - - $ gem install ast - -## Usage - -See the documentation at [GitHub](http://whitequark.github.com/ast/frames.html) or [rdoc.info](http://rdoc.info/gems/ast). - -## Contributing - -1. Fork it -2. Create your feature branch (`git checkout -b my-new-feature`) -3. Commit your changes (`git commit -am 'Add some feature'`) -4. Push to the branch (`git push origin my-new-feature`) -5. Create new Pull Request diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Rakefile new/Rakefile --- old/Rakefile 2018-01-25 18:35:38.000000000 +0100 +++ new/Rakefile 1970-01-01 01:00:00.000000000 +0100 @@ -1,19 +0,0 @@ -require 'bundler/gem_tasks' -require 'bundler/setup' - -task :default => :test - -desc "Run test suite" -task :test do - sh "bacon -Itest -a" -end - -PAGES_REPO = '[email protected]:whitequark/ast' - -desc "Build and deploy documentation to GitHub pages" -task :pages do - system "git clone #{PAGES_REPO} gh-temp/ -b gh-pages; rm gh-temp/* -rf; touch gh-temp/.nojekyll" or abort - system "yardoc -o gh-temp/;" or abort - system "cd gh-temp/; git add -A; git commit -m 'Updated pages.'; git push -f origin gh-pages" or abort - FileUtils.rm_rf 'gh-temp' -end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ast.gemspec new/ast.gemspec --- old/ast.gemspec 2018-01-25 18:35:38.000000000 +0100 +++ new/ast.gemspec 1970-01-01 01:00:00.000000000 +0100 @@ -1,29 +0,0 @@ -Gem::Specification.new do |s| - s.name = 'ast' - s.version = '2.4.0' - s.license = 'MIT' - s.authors = ["whitequark"] - s.email = ["[email protected]"] - s.homepage = "https://whitequark.github.io/ast/" - s.summary = %q{A library for working with Abstract Syntax Trees.} - s.description = s.summary - - s.files = `git ls-files`.split("\n") - s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") - s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } - s.require_paths = ["lib"] - - s.add_development_dependency 'rake', '~> 10.0' - - s.add_development_dependency 'bacon', '~> 1.2' - s.add_development_dependency 'bacon-colored_output' - s.add_development_dependency 'simplecov' - - s.add_development_dependency 'coveralls' - s.add_development_dependency 'json_pure' # for coveralls on 1.9.2 - s.add_development_dependency 'mime-types', '~> 1.25' # for coveralls on 1.8.7 - s.add_development_dependency 'rest-client', '~> 1.6.7' # 1.8.7 - - s.add_development_dependency 'yard' - s.add_development_dependency 'kramdown' -end Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/ast/node.rb new/lib/ast/node.rb --- old/lib/ast/node.rb 2018-01-25 18:35:38.000000000 +0100 +++ new/lib/ast/node.rb 2020-06-10 19:23:54.000000000 +0200 @@ -140,7 +140,9 @@ properties.nil? self else - original_dup.send :initialize, new_type, new_children, new_properties + copy = original_dup + copy.send :initialize, new_type, new_children, new_properties + copy end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/ast/processor/mixin.rb new/lib/ast/processor/mixin.rb --- old/lib/ast/processor/mixin.rb 2018-01-25 18:35:38.000000000 +0100 +++ new/lib/ast/processor/mixin.rb 2020-06-10 19:23:54.000000000 +0200 @@ -23,7 +23,7 @@ # into a variable named `<string-literal>`, # * `(load <string-literal>)`: loads value of a variable named # `<string-literal>`, - # * `(each <node> ...): computes each of the `<node>`s and + # * `(each <node> ...)`: computes each of the `<node>`s and # prints the result. # # All AST nodes have the same Ruby class, and therefore they don't diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2018-01-25 18:35:38.000000000 +0100 +++ new/metadata 2020-06-10 19:23:54.000000000 +0200 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: ast version: !ruby/object:Gem::Version - version: 2.4.0 + version: 2.4.1 platform: ruby authors: - whitequark autorequire: bindir: bin cert_chain: [] -date: 2018-01-25 00:00:00.000000000 Z +date: 2020-06-10 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: rake @@ -16,14 +16,14 @@ requirements: - - "~>" - !ruby/object:Gem::Version - version: '10.0' + version: '12.3' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version - version: '10.0' + version: '12.3' - !ruby/object:Gem::Dependency name: bacon requirement: !ruby/object:Gem::Requirement @@ -70,58 +70,16 @@ name: coveralls requirement: !ruby/object:Gem::Requirement requirements: - - - ">=" - - !ruby/object:Gem::Version - version: '0' - type: :development - prerelease: false - version_requirements: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: '0' -- !ruby/object:Gem::Dependency - name: json_pure - requirement: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: '0' - type: :development - prerelease: false - version_requirements: !ruby/object:Gem::Requirement - requirements: - - - ">=" - - !ruby/object:Gem::Version - version: '0' -- !ruby/object:Gem::Dependency - name: mime-types - requirement: !ruby/object:Gem::Requirement - requirements: - - - "~>" - - !ruby/object:Gem::Version - version: '1.25' - type: :development - prerelease: false - version_requirements: !ruby/object:Gem::Requirement - requirements: - - - "~>" - - !ruby/object:Gem::Version - version: '1.25' -- !ruby/object:Gem::Dependency - name: rest-client - requirement: !ruby/object:Gem::Requirement - requirements: - - "~>" - !ruby/object:Gem::Version - version: 1.6.7 + version: 0.8.23 type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version - version: 1.6.7 + version: 0.8.23 - !ruby/object:Gem::Dependency name: yard requirement: !ruby/object:Gem::Requirement @@ -157,23 +115,13 @@ extensions: [] extra_rdoc_files: [] files: -- ".gitignore" -- ".travis.yml" -- ".yardopts" -- CHANGELOG.md -- Gemfile - LICENSE.MIT - README.YARD.md -- README.md -- Rakefile -- ast.gemspec - lib/ast.rb - lib/ast/node.rb - lib/ast/processor.rb - lib/ast/processor/mixin.rb - lib/ast/sexp.rb -- test/helper.rb -- test/test_ast.rb homepage: https://whitequark.github.io/ast/ licenses: - MIT @@ -193,8 +141,7 @@ - !ruby/object:Gem::Version version: '0' requirements: [] -rubyforge_project: -rubygems_version: 2.5.2.2 +rubygems_version: 3.1.2 signing_key: specification_version: 4 summary: A library for working with Abstract Syntax Trees. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/helper.rb new/test/helper.rb --- old/test/helper.rb 2018-01-25 18:35:38.000000000 +0100 +++ new/test/helper.rb 1970-01-01 01:00:00.000000000 +0100 @@ -1,17 +0,0 @@ -require 'bacon' -require 'bacon/colored_output' - -require 'simplecov' -require 'coveralls' - -SimpleCov.start do - self.formatter = SimpleCov::Formatter::MultiFormatter.new([ - SimpleCov::Formatter::HTMLFormatter, - Coveralls::SimpleCov::Formatter - ]) - - # Exclude the testsuite itself. - add_filter "/test/" -end - -require 'ast' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/test_ast.rb new/test/test_ast.rb --- old/test/test_ast.rb 2018-01-25 18:35:38.000000000 +0100 +++ new/test/test_ast.rb 1970-01-01 01:00:00.000000000 +0100 @@ -1,271 +0,0 @@ -require 'helper' - -describe AST::Node do - extend AST::Sexp - - class MetaNode < AST::Node - attr_reader :meta - end - - before do - @node = AST::Node.new(:node, [ 0, 1 ]) - @metanode = MetaNode.new(:node, [ 0, 1 ], :meta => 'value') - end - - it 'should have accessors for type and children' do - @node.type.should.equal :node - @node.children.should.equal [0, 1] - end - - it 'should set metadata' do - @metanode.meta.should.equal 'value' - end - - it 'should be frozen' do - @node.frozen?.should.be.true - @node.children.frozen?.should.be.true - end - - it 'should return self when duping' do - @node.dup.should.equal? @node - end - - it 'should return self when cloning' do - @node.clone.should.equal? @node - end - - it 'should return an updated node, but only if needed' do - @node.updated().should.be.identical_to @node - @node.updated(:node).should.be.identical_to @node - @node.updated(nil, [0, 1]).should.be.identical_to @node - - updated = @node.updated(:other_node) - updated.should.not.be.identical_to @node - updated.type.should.equal :other_node - updated.children.should.equal @node.children - - updated.frozen?.should.be.true - - updated = @node.updated(nil, [1, 1]) - updated.should.not.be.identical_to @node - updated.type.should.equal @node.type - updated.children.should.equal [1, 1] - - updated = @metanode.updated(nil, nil, :meta => 'other_value') - updated.meta.should.equal 'other_value' - end - - it 'should format to_sexp correctly' do - AST::Node.new(:a, [ :sym, [ 1, 2 ] ]).to_sexp.should.equal '(a :sym [1, 2])' - AST::Node.new(:a, [ :sym, @node ]).to_sexp.should.equal "(a :sym\n (node 0 1))" - AST::Node.new(:a, [ :sym, - AST::Node.new(:b, [ @node, @node ]) - ]).to_sexp.should.equal "(a :sym\n (b\n (node 0 1)\n (node 0 1)))" - end - - it 'should format to_s correctly' do - AST::Node.new(:a, [ :sym, [ 1, 2 ] ]).to_s.should.equal '(a :sym [1, 2])' - AST::Node.new(:a, [ :sym, @node ]).to_s.should.equal "(a :sym\n (node 0 1))" - AST::Node.new(:a, [ :sym, - AST::Node.new(:b, [ @node, @node ]) - ]).to_s.should.equal "(a :sym\n (b\n (node 0 1)\n (node 0 1)))" - end - - it 'should format inspect correctly' do - AST::Node.new(:a, [ :sym, [ 1, 2 ] ]).inspect.should.equal "s(:a, :sym, [1, 2])" - AST::Node.new(:a, [ :sym, - AST::Node.new(:b, [ @node, @node ]) - ]).inspect.should.equal "s(:a, :sym,\n s(:b,\n s(:node, 0, 1),\n s(:node, 0, 1)))" - end - - it 'should recreate inspect output' do - simple_node = AST::Node.new(:a, [ :sym, [ 1, 2 ] ]) - eval(simple_node.inspect).should.equal simple_node - complex_node = s(:a , :sym, s(:b, s(:node, 0, 1), s(:node, 0, 1))) - eval(complex_node.inspect).should.equal complex_node - end - - it 'should return self in to_ast' do - @node.to_ast.should.be.identical_to @node - end - - it 'should produce to_sexp_array correctly' do - AST::Node.new(:a, [ :sym, [ 1, 2 ] ]).to_sexp_array.should.equal [:a, :sym, [1, 2]] - AST::Node.new(:a, [ :sym, - AST::Node.new(:b, [ @node, @node ]) - ]).to_sexp_array.should.equal [:a, :sym, [:b, [:node, 0, 1], [:node, 0, 1]]] - end - - it 'should only use type and children to compute #hash' do - @node.hash.should.equal([@node.type, @node.children, @node.class].hash) - end - - it 'should only use type and children in #eql? comparisons' do - # Not identical but equivalent - @node.eql?(AST::Node.new(:node, [0, 1])).should.be.true - # Not identical and not equivalent - @node.eql?(AST::Node.new(:other, [0, 1])).should.be.false - # Not identical and not equivalent because of differend class - @node.eql?(@metanode).should.be.false - end - - it 'should only use type and children in #== comparisons' do - @node.should.equal @node - @node.should.equal @metanode - @node.should.not.equal :foo - - mock_node = Object.new.tap do |obj| - def obj.to_ast - self - end - - def obj.type - :node - end - - def obj.children - [ 0, 1 ] - end - end - @node.should.equal mock_node - end - - it 'should allow to decompose nodes with a, b = *node' do - node = s(:gasgn, :$foo, s(:integer, 1)) - - var_name, value = *node - var_name.should.equal :$foo - value.should.equal s(:integer, 1) - end - - it 'should concatenate with arrays' do - node = s(:gasgn, :$foo) - (node + [s(:integer, 1)]). - should.equal s(:gasgn, :$foo, s(:integer, 1)) - end - - it 'should append elements' do - node = s(:array) - (node << s(:integer, 1) << s(:string, "foo")). - should.equal s(:array, s(:integer, 1), s(:string, "foo")) - end - - begin - eval <<-CODE - it 'should not trigger a rubinius bug' do - bar = [ s(:bar, 1) ] - baz = s(:baz, 2) - s(:foo, *bar, baz).should.equal s(:foo, s(:bar, 1), s(:baz, 2)) - end - CODE - rescue SyntaxError - # Running on 1.8, ignore. - end -end - -describe AST::Processor do - extend AST::Sexp - - def have_sexp(text) - text = text.lines.map { |line| line.sub /^ +\|(.+)/, '\1' }.join.rstrip - lambda { |ast| ast.to_sexp == text } - end - - class MockProcessor < AST::Processor - attr_reader :counts - - def initialize - @counts = Hash.new(0) - end - - def on_root(node) - count_node(node) - node.updated(nil, process_all(node.children)) - end - alias on_body on_root - - def on_def(node) - count_node(node) - name, arglist, body = node.children - node.updated(:def, [ name, process(arglist), process(body) ]) - end - - def handler_missing(node) - count_node(node) - end - - def count_node(node) - @counts[node.type] += 1; nil - end - end - - before do - @ast = AST::Node.new(:root, [ - AST::Node.new(:def, [ :func, - AST::Node.new(:arglist, [ :foo, :bar ]), - AST::Node.new(:body, [ - AST::Node.new(:invoke, [ :puts, "Hello world" ]) - ]) - ]), - AST::Node.new(:invoke, [ :func ]) - ]) - - @processor = MockProcessor.new - end - - it 'should visit every node' do - @processor.process(@ast).should.equal @ast - @processor.counts.should.equal({ - :root => 1, - :def => 1, - :arglist => 1, - :body => 1, - :invoke => 2, - }) - end - - it 'should be able to replace inner nodes' do - def @processor.on_arglist(node) - node.updated(:new_fancy_arglist) - end - - @processor.process(@ast).should have_sexp(<<-SEXP) - |(root - | (def :func - | (new-fancy-arglist :foo :bar) - | (body - | (invoke :puts "Hello world"))) - | (invoke :func)) - SEXP - end - - it 'should build sexps' do - s(:add, - s(:integer, 1), - s(:multiply, - s(:integer, 2), - s(:integer, 3))).should have_sexp(<<-SEXP) - |(add - | (integer 1) - | (multiply - | (integer 2) - | (integer 3))) - SEXP - end - - it 'should return nil if passed nil' do - @processor.process(nil).should == nil - end - - it 'should refuse to process non-nodes' do - lambda { @processor.process([]) }.should.raise NoMethodError, %r|to_ast| - end - - it 'should allow to visit nodes with process_all(node)' do - @processor.process_all s(:foo, s(:bar), s(:integer, 1)) - @processor.counts.should.equal({ - :bar => 1, - :integer => 1, - }) - end -end
