diff -Nru ruby-six-0.2.0/debian/changelog ruby-six-0.2.0/debian/changelog --- ruby-six-0.2.0/debian/changelog 2014-04-30 12:06:17.000000000 +0000 +++ ruby-six-0.2.0/debian/changelog 2015-07-23 05:18:01.000000000 +0000 @@ -1,8 +1,11 @@ -ruby-six (0.2.0-2build1) utopic; urgency=medium +ruby-six (0.2.0-3) unstable; urgency=medium - * No-change rebuild to update the Ruby-Version attribute. + * Port specs to RSpec 3 (Closes: #783993) + - build-depend on ruby-rspec >= 3~ + - add rspec3.patch to use the new syntax + * update packaging with dh-make-ruby -w - -- Matthias Klose Wed, 30 Apr 2014 12:06:17 +0000 + -- Cédric Boutillier Thu, 23 Jul 2015 07:18:00 +0200 ruby-six (0.2.0-2) unstable; urgency=low diff -Nru ruby-six-0.2.0/debian/control ruby-six-0.2.0/debian/control --- ruby-six-0.2.0/debian/control 2013-06-10 14:26:48.000000000 +0000 +++ ruby-six-0.2.0/debian/control 2015-07-23 05:13:25.000000000 +0000 @@ -3,19 +3,24 @@ Priority: optional Maintainer: Debian Ruby Extras Maintainers Uploaders: Cédric Boutillier -Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.4.1~), rake, ruby-rspec -Standards-Version: 3.9.4 +Build-Depends: debhelper (>= 7.0.50~), + gem2deb, + rake, + ruby-rspec (>= 3~) +Standards-Version: 3.9.6 Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-six.git -Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-ruby-extras/ruby-six.git;a=summary +Vcs-Browser: https://anonscm.debian.org/cgit/pkg-ruby-extras/ruby-six.git Homepage: https://github.com/randx/six +Testsuite: autopkgtest-pkg-ruby XS-Ruby-Versions: all Package: ruby-six Architecture: all XB-Ruby-Versions: ${ruby:Versions} -Depends: ${shlibs:Depends}, ${misc:Depends}, ruby | ruby-interpreter +Depends: ruby | ruby-interpreter, + ${misc:Depends}, + ${shlibs:Depends} Description: very simple authorization library for Ruby Six is a very simple authorization library for Ruby, which can be used for the Rails framework. It allows you to define rules which restricts what resources a given user is allowed to access. - diff -Nru ruby-six-0.2.0/debian/patches/rspec3.patch ruby-six-0.2.0/debian/patches/rspec3.patch --- ruby-six-0.2.0/debian/patches/rspec3.patch 1970-01-01 00:00:00.000000000 +0000 +++ ruby-six-0.2.0/debian/patches/rspec3.patch 2015-07-23 05:11:09.000000000 +0000 @@ -0,0 +1,150 @@ +Description: port specs to RSpec3 +Author: Cédric Boutillier +Forwarded: https://github.com/randx/six/pull/9 +Last-Update: 2015-07-23 + +--- a/spec/six_rules_packs_spec.rb ++++ b/spec/six_rules_packs_spec.rb +@@ -9,7 +9,7 @@ + let(:rules) { BookRules.new } + + describe "<<" do +- it { (abilities << rules).should be_true } ++ it { (abilities << rules).should be_truthy } + it { lambda { abilities << nil }.should raise_error(Six::InvalidPackPassed) } + + it_should_behave_like :valid_abilities do +@@ -21,12 +21,12 @@ + end + + describe :add do +- it { abilities.add(:global, rules).should be_true } +- it { abilities.add(:wrong, nil).should be_false } ++ it { abilities.add(:global, rules).should be_truthy } ++ it { abilities.add(:wrong, nil).should be_falsey } + end + + describe :add! do +- it { abilities.add!(:global, rules).should be_true } ++ it { abilities.add!(:global, rules).should be_truthy } + it { lambda { abilities.add!(:wrong, nil)}.should raise_error(Six::InvalidPackPassed) } + end + +@@ -45,7 +45,7 @@ + end + + it "should return false when trying to use unexisting pack" do +- abilities.use(:noname).should be_false ++ abilities.use(:noname).should be_falsey + end + end + +@@ -75,12 +75,12 @@ + before { abilities.add(:global, rules) } + + describe :remove do +- it { abilities.remove(:global).should be_true } +- it { abilities.remove(:zzz).should be_false } ++ it { abilities.remove(:global).should be_truthy } ++ it { abilities.remove(:zzz).should be_falsey } + end + + describe :remove! do +- it { abilities.remove!(:global).should be_true } ++ it { abilities.remove!(:global).should be_truthy } + it { lambda { abilities.remove!(:zzz)}.should raise_error(Six::NoPackError) } + end + end +@@ -94,16 +94,16 @@ + Object.new + end + +- it { abilities.valid_rules_object?(BookRules.new).should be_true } +- it { abilities.valid_rules_object?(invalid_with_allowed).should be_false } +- it { abilities.valid_rules_object?(invalid_wo_allowed).should be_false } ++ it { abilities.valid_rules_object?(BookRules.new).should be_truthy } ++ it { abilities.valid_rules_object?(invalid_with_allowed).should be_falsey } ++ it { abilities.valid_rules_object?(invalid_wo_allowed).should be_falsey } + end + + describe :pack_exist? do + before { abilities.add(:global, rules) } + +- it { abilities.pack_exist?(:global).should be_true } +- it { abilities.pack_exist?(:ufo).should be_false } ++ it { abilities.pack_exist?(:global).should be_truthy } ++ it { abilities.pack_exist?(:ufo).should be_falsey } + end + end + end +--- a/spec/support/valid_abilities_example.rb ++++ b/spec/support/valid_abilities_example.rb +@@ -19,38 +19,38 @@ + + describe "should return true or false depend on access" do + context :read_book do +- it { allowed?(@jim, :read_book, @jims_book).should be_true } +- it { allowed?(@mike, :read_book, @mikes_book).should be_true } +- it { allowed?(@jim, :read_book, @mikes_book).should be_true } +- it { allowed?(@mike, :read_book, @jims_book).should be_true } ++ it { allowed?(@jim, :read_book, @jims_book).should be_truthy } ++ it { allowed?(@mike, :read_book, @mikes_book).should be_truthy } ++ it { allowed?(@jim, :read_book, @mikes_book).should be_truthy } ++ it { allowed?(@mike, :read_book, @jims_book).should be_truthy } + end + + context :rate_book do +- it { allowed?(@jim, :rate_book, @jims_book).should be_false } +- it { allowed?(@mike, :rate_book, @mikes_book).should be_false } +- it { allowed?(@jim, :rate_book, @mikes_book).should be_true } +- it { allowed?(@mike, :rate_book, @jims_book).should be_true } ++ it { allowed?(@jim, :rate_book, @jims_book).should be_falsey } ++ it { allowed?(@mike, :rate_book, @mikes_book).should be_falsey } ++ it { allowed?(@jim, :rate_book, @mikes_book).should be_truthy } ++ it { allowed?(@mike, :rate_book, @jims_book).should be_truthy } + end + + context :edit_book do +- it { allowed?(@jim, :edit_book, @jims_book).should be_true } +- it { allowed?(@mike,:edit_book, @mikes_book).should be_true } +- it { allowed?(@jim, :edit_book, @mikes_book).should be_false } +- it { allowed?(@mike,:edit_book, @jims_book).should be_false } ++ it { allowed?(@jim, :edit_book, @jims_book).should be_truthy } ++ it { allowed?(@mike,:edit_book, @mikes_book).should be_truthy } ++ it { allowed?(@jim, :edit_book, @mikes_book).should be_falsey } ++ it { allowed?(@mike,:edit_book, @jims_book).should be_falsey } + end + + context :publish_book do +- it { allowed?(@jim, :publish_book, @jims_book).should be_false } +- it { allowed?(@mike,:publish_book, @mikes_book).should be_false } +- it { allowed?(@jim, :publish_book, @mikes_book).should be_false } +- it { allowed?(@mike,:publish_book, @jims_book).should be_false } ++ it { allowed?(@jim, :publish_book, @jims_book).should be_falsey } ++ it { allowed?(@mike,:publish_book, @mikes_book).should be_falsey } ++ it { allowed?(@jim, :publish_book, @mikes_book).should be_falsey } ++ it { allowed?(@mike,:publish_book, @jims_book).should be_falsey } + end + + context 'passing multiple actions' do +- it { allowed?(@jim, [:read_book, :edit_book], @jims_book).should be_true } +- it { allowed?(@jim, [:ead_book, :publish_book, :edit_book], @jims_book).should be_false } +- it { allowed?(@mike, [:read_book, :edit_book], @mikes_book).should be_true } +- it { allowed?(@mike, [:rate_book, :publish_book, :edit_book], @mikes_book).should be_false } ++ it { allowed?(@jim, [:read_book, :edit_book], @jims_book).should be_truthy } ++ it { allowed?(@jim, [:ead_book, :publish_book, :edit_book], @jims_book).should be_falsey } ++ it { allowed?(@mike, [:read_book, :edit_book], @mikes_book).should be_truthy } ++ it { allowed?(@mike, [:rate_book, :publish_book, :edit_book], @mikes_book).should be_falsey } + end + end + end +--- a/spec/spec_helper.rb ++++ b/spec/spec_helper.rb +@@ -2,3 +2,7 @@ + #require "bundler" + #Bundler.require(:default, :development) + Dir[File.dirname(__FILE__) + '/support/*.rb'].each {|file| require file } ++ ++RSpec.configure do |config| ++ config.expect_with(:rspec) { |c| c.syntax = :should } ++end diff -Nru ruby-six-0.2.0/debian/patches/series ruby-six-0.2.0/debian/patches/series --- ruby-six-0.2.0/debian/patches/series 2013-06-10 14:26:48.000000000 +0000 +++ ruby-six-0.2.0/debian/patches/series 2015-05-01 22:01:59.000000000 +0000 @@ -1 +1,2 @@ remove_bundler_rubygems.patch +rspec3.patch diff -Nru ruby-six-0.2.0/debian/ruby-tests.rake ruby-six-0.2.0/debian/ruby-tests.rake --- ruby-six-0.2.0/debian/ruby-tests.rake 2013-06-10 14:26:48.000000000 +0000 +++ ruby-six-0.2.0/debian/ruby-tests.rake 2015-07-23 05:12:39.000000000 +0000 @@ -1,7 +1,5 @@ -require 'rspec/core/rake_task' +require 'gem2deb/rake/spectask' -RSpec::Core::RakeTask.new(:spec) do |spec| - spec.pattern = './spec/*_spec.rb' +Gem2Deb::Rake::RSpecTask.new do |spec| + spec.pattern = './spec/**/*_spec.rb' end - -task :default => :spec diff -Nru ruby-six-0.2.0/debian/rules ruby-six-0.2.0/debian/rules --- ruby-six-0.2.0/debian/rules 2013-06-10 14:26:48.000000000 +0000 +++ ruby-six-0.2.0/debian/rules 2015-07-23 05:12:39.000000000 +0000 @@ -6,10 +6,13 @@ # # Uncomment to ignore some test failures (but the tests will run anyway). # Valid values: -#export DH_RUBY_IGNORE_TESTS=ruby1.8 ruby1.9.1 require-rubygems +#export DH_RUBY_IGNORE_TESTS=ruby2.1 ruby2.2 # # If you need to specify the .gemspec (eg there is more than one) #export DH_RUBY_GEMSPEC=gem.gemspec +# +# Uncomment to check dependencies during build: +# export GEM2DEB_TEST_RUNNER = --check-dependencies %: dh $@ --buildsystem=ruby --with ruby