[DRE-commits] [ruby-mixlib-versioning] 02/02: a bit of work
Hleb Valoshka
tsfgnu-guest at moszumanska.debian.org
Tue Apr 12 13:39:00 UTC 2016
This is an automated email from the git hooks/post-receive script.
tsfgnu-guest pushed a commit to branch master
in repository ruby-mixlib-versioning.
commit bab682d0414f790c117526afa67d6602dccb6b34
Author: Hleb Valoshka <375gnu at gmail.com>
Date: Tue Apr 12 16:30:56 2016 +0300
a bit of work
---
debian/changelog | 6 +-
debian/control | 8 +-
debian/copyright | 39 +--
...outdated-methods-to-setup-color-in-output.patch | 25 ++
.../patches/0002-Require-rspec-its-in-specs.patch | 20 ++
...pecs-to-RSpec-2.99.2-syntax-with-Transpec.patch | 335 +++++++++++++++++++++
debian/patches/series | 3 +
7 files changed, 407 insertions(+), 29 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 631800f..cb62f3a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,5 @@
-ruby-mixlib-versioning (1.1.0-1) UNRELEASED; urgency=medium
+ruby-mixlib-versioning (1.1.0-1) unstable; urgency=medium
- * Initial release (Closes: #nnnn)
+ * Initial release (Closes: #820801)
- -- Hleb Valoshka <375gnu at gmail.com> Tue, 12 Apr 2016 15:51:59 +0300
+ -- Hleb Valoshka <375gnu at gmail.com> Tue, 12 Apr 2016 16:29:42 +0300
diff --git a/debian/control b/debian/control
index b198f84..a0216a3 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,8 @@ Uploaders: Hleb Valoshka <375gnu at gmail.com>
Build-Depends: debhelper (>= 9~),
gem2deb,
rake,
- ruby-rspec
+ ruby-rspec,
+ ruby-rspec-its
Standards-Version: 3.9.7
Vcs-Git: https://anonscm.debian.org/git/pkg-ruby-extras/ruby-mixlib-versioning.git
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-ruby-extras/ruby-mixlib-versioning.git
@@ -20,5 +21,6 @@ XB-Ruby-Versions: ${ruby:Versions}
Depends: ruby | ruby-interpreter,
${misc:Depends},
${shlibs:Depends}
-Description: General purpose Ruby library that allows you to parse, compare and manipulate version strings in multiple formats.
- General purpose Ruby library that allows you to parse, compare and manipulate version strings in multiple formats.
+Description: Ruby library to parse, compare and manipulate version strings
+ General purpose Ruby library that allows you to parse, compare and manipulate
+ version strings in multiple formats.
diff --git a/debian/copyright b/debian/copyright
index 7fa6ee6..5dfc2db 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,35 +1,28 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: mixlib-versioning
-Source: https://github.com/chef/mixlib-versioning
+Source: https://github.com/opscode/mixlib-versioning
Files: *
-Copyright: <years> <put author's name and email here>
- <years> <likewise for another author>
-License: GPL-2+ (FIXME)
+Copyright: 2010-2015, Opscode, Inc.
+License: Apache-2.0
Files: debian/*
Copyright: 2016 Hleb Valoshka <375gnu at gmail.com>
-License: GPL-2+ (FIXME)
+License: Apache-2.0
Comment: the Debian packaging is licensed under the same terms as the original package.
-License: GPL-2+ (FIXME)
- This program is free software; you can redistribute it
- and/or modify it under the terms of the GNU General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later
- version.
+License: Apache-2.0
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
.
- This program is distributed in the hope that it will be
- useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- PURPOSE. See the GNU General Public License for more
- details.
+ http://www.apache.org/licenses/LICENSE-2.0
.
- You should have received a copy of the GNU General Public
- License along with this package; if not, write to the Free
- Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- Boston, MA 02110-1301 USA
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
.
- On Debian systems, the full text of the GNU General Public
- License version 2 can be found in the file
- `/usr/share/common-licenses/GPL-2'.
+ On Debian systems, the full text of the Apache 2.0 licence can be
+ found in the file /usr/share/common-licenses/Apache-2.0.
diff --git a/debian/patches/0001-Don-t-use-outdated-methods-to-setup-color-in-output.patch b/debian/patches/0001-Don-t-use-outdated-methods-to-setup-color-in-output.patch
new file mode 100644
index 0000000..22a15be
--- /dev/null
+++ b/debian/patches/0001-Don-t-use-outdated-methods-to-setup-color-in-output.patch
@@ -0,0 +1,25 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Tue, 12 Apr 2016 15:57:00 +0300
+Subject: Don't use outdated methods to setup color in output
+
+---
+ spec/spec_helper.rb | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
+index 30090e3..a299012 100644
+--- a/spec/spec_helper.rb
++++ b/spec/spec_helper.rb
+@@ -28,10 +28,10 @@ RSpec.configure do |config|
+ config.alias_it_should_behave_like_to :it_has_behavior, 'has behavior:'
+
+ # Use color in STDOUT
+- config.color_enabled = true
++ #config.color_enabled = true
+
+ # Use color not only in STDOUT but also in pagers and files
+- config.tty = true
++ #config.tty = true
+
+ # run the examples in random order
+ config.order = :rand
diff --git a/debian/patches/0002-Require-rspec-its-in-specs.patch b/debian/patches/0002-Require-rspec-its-in-specs.patch
new file mode 100644
index 0000000..f25474b
--- /dev/null
+++ b/debian/patches/0002-Require-rspec-its-in-specs.patch
@@ -0,0 +1,20 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Tue, 12 Apr 2016 16:13:20 +0300
+Subject: Require rspec/its in specs
+
+---
+ spec/spec_helper.rb | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
+index a299012..2b691f6 100644
+--- a/spec/spec_helper.rb
++++ b/spec/spec_helper.rb
+@@ -17,6 +17,7 @@
+ #
+
+ require 'mixlib/versioning'
++require 'rspec/its'
+
+ # load all shared examples and shared contexts
+ Dir[File.expand_path('../support/**/*.rb', __FILE__)].each do |file|
diff --git a/debian/patches/0003-Convert-specs-to-RSpec-2.99.2-syntax-with-Transpec.patch b/debian/patches/0003-Convert-specs-to-RSpec-2.99.2-syntax-with-Transpec.patch
new file mode 100644
index 0000000..436b41c
--- /dev/null
+++ b/debian/patches/0003-Convert-specs-to-RSpec-2.99.2-syntax-with-Transpec.patch
@@ -0,0 +1,335 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Tue, 12 Apr 2016 16:17:10 +0300
+Subject: Convert specs to RSpec 2.99.2 syntax with Transpec
+
+This conversion is done by Transpec 3.2.1 with the following command:
+ transpec
+
+* 29 conversions
+ from: obj.should
+ to: expect(obj).to
+
+* 14 conversions
+ from: be_false
+ to: be_falsey
+
+* 6 conversions
+ from: be_true
+ to: be_truthy
+
+* 1 conversion
+ from: == expected
+ to: eq(expected)
+
+For more details: https://github.com/yujinakayama/transpec#supported-conversions
+---
+ spec/mixlib/versioning/format_spec.rb | 2 +-
+ spec/mixlib/versioning/versioning_spec.rb | 32 ++++++++---------
+ .../shared_examples/behaviors/filterable.rb | 10 +++---
+ .../shared_examples/behaviors/serializable.rb | 6 ++--
+ spec/support/shared_examples/behaviors/sortable.rb | 8 ++---
+ spec/support/shared_examples/semver.rb | 40 +++++++++++-----------
+ 6 files changed, 49 insertions(+), 49 deletions(-)
+
+diff --git a/spec/mixlib/versioning/format_spec.rb b/spec/mixlib/versioning/format_spec.rb
+index 02dabf5..8aebbf0 100644
+--- a/spec/mixlib/versioning/format_spec.rb
++++ b/spec/mixlib/versioning/format_spec.rb
+@@ -39,7 +39,7 @@ describe Mixlib::Versioning::Format do
+ context 'format_type is a: #{format_type.class}' do
+ let(:format_type) { format_type }
+ it 'returns the correct format class' do
+- subject.for(format_type).should eq Mixlib::Versioning::Format::Rubygems
++ expect(subject.for(format_type)).to eq Mixlib::Versioning::Format::Rubygems
+ end # it
+ end # context
+ end # each
+diff --git a/spec/mixlib/versioning/versioning_spec.rb b/spec/mixlib/versioning/versioning_spec.rb
+index cef017b..fe6dfe3 100644
+--- a/spec/mixlib/versioning/versioning_spec.rb
++++ b/spec/mixlib/versioning/versioning_spec.rb
+@@ -59,7 +59,7 @@ describe Mixlib::Versioning do
+ context "format type as a: #{format_type.class}" do
+ it "parses version string as: #{options[:expected_format]}" do
+ result = subject.parse(version_string, format_type)
+- result.should be_a(expected_format)
++ expect(result).to be_a(expected_format)
+ end # it
+ end # context
+ end # each
+@@ -106,7 +106,7 @@ describe Mixlib::Versioning do
+ context version_string do
+ let(:version_string) { version_string }
+ it "parses version string as: #{expected_format}" do
+- subject.parse(version_string).should be_a(expected_format)
++ expect(subject.parse(version_string)).to be_a(expected_format)
+ end # it
+ end # context
+ end # each_pair
+@@ -114,7 +114,7 @@ describe Mixlib::Versioning do
+ describe 'version_string cannot be parsed' do
+ let(:version_string) { 'A.B.C' }
+ it 'returns nil' do
+- subject.parse(version_string).should be_nil
++ expect(subject.parse(version_string)).to be_nil
+ end
+ end
+ end # describe "parsing with automatic format detection"
+@@ -123,7 +123,7 @@ describe Mixlib::Versioning do
+ it 'returns the same object' do
+ v = Mixlib::Versioning.parse(version_string)
+ result = subject.parse(v)
+- v.should be result
++ expect(v).to be result
+ end
+ end
+
+@@ -131,15 +131,15 @@ describe Mixlib::Versioning do
+ context 'when the format is not in the list' do
+ let(:version_string) { '10.16.2-rc.2-49-g21353f0' }
+ it 'returns nil when the array contains a Mixlib::Versioning::Format' do
+- subject.parse(version_string, [Mixlib::Versioning::Format::Rubygems]).should be_nil
++ expect(subject.parse(version_string, [Mixlib::Versioning::Format::Rubygems])).to be_nil
+ end
+
+ it 'returns nil when the array contains a string' do
+- subject.parse(version_string, ['rubygems']).should be_nil
++ expect(subject.parse(version_string, ['rubygems'])).to be_nil
+ end
+
+ it 'returns nil when the array contains a symbol' do
+- subject.parse(version_string, [:rubygems]).should be_nil
++ expect(subject.parse(version_string, [:rubygems])).to be_nil
+ end
+ end
+
+@@ -147,15 +147,15 @@ describe Mixlib::Versioning do
+ let(:version_string) { '10.16.2-rc.2-49-g21353f0' }
+ let(:expected_format) { Mixlib::Versioning::Format::GitDescribe }
+ it 'returns nil when the array contains a Mixlib::Versioning::Format' do
+- subject.parse(version_string, [expected_format]).should be_a(expected_format)
++ expect(subject.parse(version_string, [expected_format])).to be_a(expected_format)
+ end
+
+ it 'returns nil when the array contains a string' do
+- subject.parse(version_string, ['git_describe']).should be_a(expected_format)
++ expect(subject.parse(version_string, ['git_describe'])).to be_a(expected_format)
+ end
+
+ it 'returns nil when the array contains a symbol' do
+- subject.parse(version_string, [:git_describe]).should be_a(expected_format)
++ expect(subject.parse(version_string, [:git_describe])).to be_a(expected_format)
+ end
+ end
+ end
+@@ -223,7 +223,7 @@ describe Mixlib::Versioning do
+ let(:expected_version) { options[:releases_only] }
+
+ it 'finds the most recent release version' do
+- subject_find.should eq Mixlib::Versioning.parse(expected_version)
++ expect(subject_find).to eq Mixlib::Versioning.parse(expected_version)
+ end
+
+ context 'include pre-release versions' do
+@@ -231,7 +231,7 @@ describe Mixlib::Versioning do
+ let(:expected_version) { options[:prerelease_versions] }
+
+ it 'finds the most recent pre-release version' do
+- subject_find.should eq Mixlib::Versioning.parse(expected_version)
++ expect(subject_find).to eq Mixlib::Versioning.parse(expected_version)
+ end # it
+ end # context
+
+@@ -240,7 +240,7 @@ describe Mixlib::Versioning do
+ let(:expected_version) { options[:build_versions] }
+
+ it 'finds the most recent build version' do
+- subject_find.should eq Mixlib::Versioning.parse(expected_version)
++ expect(subject_find).to eq Mixlib::Versioning.parse(expected_version)
+ end # it
+ end # context
+
+@@ -250,7 +250,7 @@ describe Mixlib::Versioning do
+ let(:expected_version) { options[:prerelease_and_build_versions] }
+
+ it 'finds the most recent pre-release build version' do
+- subject_find.should eq Mixlib::Versioning.parse(expected_version)
++ expect(subject_find).to eq Mixlib::Versioning.parse(expected_version)
+ end # it
+ end # context
+ end # context
+@@ -266,7 +266,7 @@ describe Mixlib::Versioning do
+ end
+
+ it 'correctly parses the array' do
+- subject_find.should eq Mixlib::Versioning.parse('11.0.0')
++ expect(subject_find).to eq Mixlib::Versioning.parse('11.0.0')
+ end
+ end # describe
+
+@@ -274,7 +274,7 @@ describe Mixlib::Versioning do
+ let(:filter_version) { Mixlib::Versioning::Format::SemVer.new('11.0.0') }
+
+ it 'finds the correct version' do
+- subject_find.should eq Mixlib::Versioning.parse('11.0.0')
++ expect(subject_find).to eq Mixlib::Versioning.parse('11.0.0')
+ end
+ end
+ end # describe
+diff --git a/spec/support/shared_examples/behaviors/filterable.rb b/spec/support/shared_examples/behaviors/filterable.rb
+index f7dda81..55fdb0f 100644
+--- a/spec/support/shared_examples/behaviors/filterable.rb
++++ b/spec/support/shared_examples/behaviors/filterable.rb
+@@ -29,26 +29,26 @@ shared_examples 'filterable' do
+ let(:prerelease_build_versions) { [] }
+
+ it 'filters by release versions only' do
+- unsorted_versions.select(&:release?).should eq(release_versions.map { |v| described_class.new(v) })
++ expect(unsorted_versions.select(&:release?)).to eq(release_versions.map { |v| described_class.new(v) })
+ end # it
+
+ it 'filters by pre-release versions only' do
+ filtered = unsorted_versions.select(&:prerelease?)
+- filtered.should eq(prerelease_versions.map { |v| described_class.new(v) })
++ expect(filtered).to eq(prerelease_versions.map { |v| described_class.new(v) })
+ end # it
+
+ it 'filters by build versions only' do
+ filtered = unsorted_versions.select(&:build?)
+- filtered.should eq(build_versions.map { |v| described_class.new(v) })
++ expect(filtered).to eq(build_versions.map { |v| described_class.new(v) })
+ end # it
+
+ it 'filters by release build versions only' do
+ filtered = unsorted_versions.select(&:release_build?)
+- filtered.should eq(release_build_versions.map { |v| described_class.new(v) })
++ expect(filtered).to eq(release_build_versions.map { |v| described_class.new(v) })
+ end # it
+
+ it 'filters by pre-release build versions only' do
+ filtered = unsorted_versions.select(&:prerelease_build?)
+- filtered.should eq(prerelease_build_versions.map { |v| described_class.new(v) })
++ expect(filtered).to eq(prerelease_build_versions.map { |v| described_class.new(v) })
+ end # it
+ end # shared_examples
+diff --git a/spec/support/shared_examples/behaviors/serializable.rb b/spec/support/shared_examples/behaviors/serializable.rb
+index 53fb8a3..b911e78 100644
+--- a/spec/support/shared_examples/behaviors/serializable.rb
++++ b/spec/support/shared_examples/behaviors/serializable.rb
+@@ -20,7 +20,7 @@ shared_examples 'serializable' do |version_strings|
+ describe '#to_s' do
+ version_strings.each do |v|
+ it "reconstructs the initial input for #{v}" do
+- described_class.new(v).to_s.should == v
++ expect(described_class.new(v).to_s).to eq(v)
+ end # it
+ end # version_strings
+ end # describe
+@@ -31,7 +31,7 @@ shared_examples 'serializable' do |version_strings|
+ subject = described_class.new(v)
+ string = subject.to_semver_string
+ semver = Mixlib::Versioning::Format::SemVer.new(string)
+- string.should eq semver.to_s
++ expect(string).to eq semver.to_s
+ end # it
+ end # version_strings
+ end # describe
+@@ -42,7 +42,7 @@ shared_examples 'serializable' do |version_strings|
+ subject = described_class.new(v)
+ string = subject.to_rubygems_string
+ rubygems = Mixlib::Versioning::Format::Rubygems.new(string)
+- string.should eq rubygems.to_s
++ expect(string).to eq rubygems.to_s
+ end # it
+ end # version_strings
+ end # describe
+diff --git a/spec/support/shared_examples/behaviors/sortable.rb b/spec/support/shared_examples/behaviors/sortable.rb
+index ffbcb23..8eae402 100644
+--- a/spec/support/shared_examples/behaviors/sortable.rb
++++ b/spec/support/shared_examples/behaviors/sortable.rb
+@@ -26,18 +26,18 @@ shared_examples 'sortable' do
+ end
+
+ it 'responds to <=>' do
+- described_class.should respond_to(:<=>)
++ expect(described_class).to respond_to(:<=>)
+ end
+
+ it 'sorts all properly' do
+- unsorted_versions.sort.should eq sorted_versions
++ expect(unsorted_versions.sort).to eq sorted_versions
+ end
+
+ it 'finds the min' do
+- unsorted_versions.min.should eq described_class.new(min)
++ expect(unsorted_versions.min).to eq described_class.new(min)
+ end
+
+ it 'finds the max' do
+- unsorted_versions.max.should eq described_class.new(max)
++ expect(unsorted_versions.max).to eq described_class.new(max)
+ end
+ end # shared_examples
+diff --git a/spec/support/shared_examples/semver.rb b/spec/support/shared_examples/semver.rb
+index 35c2473..6962ffb 100644
+--- a/spec/support/shared_examples/semver.rb
++++ b/spec/support/shared_examples/semver.rb
+@@ -80,38 +80,38 @@ shared_examples Mixlib::Versioning::Format::SemVer do
+ describe 'build qualification' do
+ context 'release version' do
+ let(:version_string) { '1.0.0' }
+- its(:release?) { should be_true }
+- its(:prerelease?) { should be_false }
+- its(:build?) { should be_false }
+- its(:release_build?) { should be_false }
+- its(:prerelease_build?) { should be_false }
++ its(:release?) { should be_truthy }
++ its(:prerelease?) { should be_falsey }
++ its(:build?) { should be_falsey }
++ its(:release_build?) { should be_falsey }
++ its(:prerelease_build?) { should be_falsey }
+ end
+
+ context 'pre-release version' do
+ let(:version_string) { '1.0.0-alpha.1' }
+- its(:release?) { should be_false }
+- its(:prerelease?) { should be_true }
+- its(:build?) { should be_false }
+- its(:release_build?) { should be_false }
+- its(:prerelease_build?) { should be_false }
++ its(:release?) { should be_falsey }
++ its(:prerelease?) { should be_truthy }
++ its(:build?) { should be_falsey }
++ its(:release_build?) { should be_falsey }
++ its(:prerelease_build?) { should be_falsey }
+ end
+
+ context 'pre-release build version' do
+ let(:version_string) { '1.0.0-alpha.1+20130308110833' }
+- its(:release?) { should be_false }
+- its(:prerelease?) { should be_false }
+- its(:build?) { should be_true }
+- its(:release_build?) { should be_false }
+- its(:prerelease_build?) { should be_true }
++ its(:release?) { should be_falsey }
++ its(:prerelease?) { should be_falsey }
++ its(:build?) { should be_truthy }
++ its(:release_build?) { should be_falsey }
++ its(:prerelease_build?) { should be_truthy }
+ end
+
+ context 'release build version' do
+ let(:version_string) { '1.0.0+20130308110833' }
+- its(:release?) { should be_false }
+- its(:prerelease?) { should be_false }
+- its(:build?) { should be_true }
+- its(:release_build?) { should be_true }
+- its(:prerelease_build?) { should be_false }
++ its(:release?) { should be_falsey }
++ its(:prerelease?) { should be_falsey }
++ its(:build?) { should be_truthy }
++ its(:release_build?) { should be_truthy }
++ its(:prerelease_build?) { should be_falsey }
+ end
+ end
+ end
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..f6b96d2
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+0001-Don-t-use-outdated-methods-to-setup-color-in-output.patch
+0002-Require-rspec-its-in-specs.patch
+0003-Convert-specs-to-RSpec-2.99.2-syntax-with-Transpec.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-mixlib-versioning.git
More information about the Pkg-ruby-extras-commits
mailing list