From 8eaabb671495e372f1b477556df1623a1228af6d Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 26 2017 09:25:49 +0000 Subject: import rh-ror50-rubygem-thor-0.19.1-8.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..24a809d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/thor-0.19.1.gem diff --git a/.rh-ror50-rubygem-thor.metadata b/.rh-ror50-rubygem-thor.metadata new file mode 100644 index 0000000..ac3ee49 --- /dev/null +++ b/.rh-ror50-rubygem-thor.metadata @@ -0,0 +1 @@ +57d118b7ce6d51be06faab84c4ad5709977e098f SOURCES/thor-0.19.1.gem diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/rubygem-thor-0.19.1-update-rspec-dependency.patch b/SOURCES/rubygem-thor-0.19.1-update-rspec-dependency.patch new file mode 100644 index 0000000..21b274a --- /dev/null +++ b/SOURCES/rubygem-thor-0.19.1-update-rspec-dependency.patch @@ -0,0 +1,104 @@ +From b5f8c410da4ad315a8c45a91fdcd9a4a2cb57d7d Mon Sep 17 00:00:00 2001 +From: Erik Michaels-Ober +Date: Mon, 9 Jun 2014 12:01:27 +0200 +Subject: [PATCH] Update rspec dependency to >= 3 + +--- + Gemfile | 4 ++-- + spec/command_spec.rb | 2 +- + spec/quality_spec.rb | 2 +- + spec/shell/basic_spec.rb | 18 +++++++++--------- + 4 files changed, 13 insertions(+), 13 deletions(-) + +diff --git a/spec/command_spec.rb b/spec/command_spec.rb +index b09270d..6e5ad2c 100644 +--- a/spec/command_spec.rb ++++ b/spec/command_spec.rb +@@ -58,7 +58,7 @@ def command(options = {}) + describe "#run" do + it "runs a command by calling a method in the given instance" do + dub = double +- expect(dub).to receive(:can_has).and_return { |*args| args } ++ expect(dub).to receive(:can_has) { |*args| args } + expect(command.run(dub, [1, 2, 3])).to eq([1, 2, 3]) + end + +diff --git a/spec/quality_spec.rb b/spec/quality_spec.rb +index 94f5100..6fa2798 100644 +--- a/spec/quality_spec.rb ++++ b/spec/quality_spec.rb +@@ -39,7 +39,7 @@ def check_for_extra_spaces(filename) + end + + RSpec::Matchers.define :be_well_formed do +- failure_message_for_should do |actual| ++ failure_message do |actual| + actual.join("\n") + end + +diff --git a/spec/shell/basic_spec.rb b/spec/shell/basic_spec.rb +index 417f371..0ca8cf1 100644 +--- a/spec/shell/basic_spec.rb ++++ b/spec/shell/basic_spec.rb +@@ -68,34 +68,34 @@ def shell + describe "#yes?" do + it "asks the user and returns true if the user replies yes" do + expect(Thor::LineEditor).to receive(:readline).with("Should I overwrite it? ", :add_to_history => false).and_return("y") +- expect(shell.yes?("Should I overwrite it?")).to be_true ++ expect(shell.yes?("Should I overwrite it?")).to be true + end + + it "asks the user and returns false if the user replies no" do + expect(Thor::LineEditor).to receive(:readline).with("Should I overwrite it? ", :add_to_history => false).and_return("n") +- expect(shell.yes?("Should I overwrite it?")).not_to be_true ++ expect(shell.yes?("Should I overwrite it?")).not_to be true + end + + it "asks the user and returns false if the user replies with an answer other than yes or no" do + expect(Thor::LineEditor).to receive(:readline).with("Should I overwrite it? ", :add_to_history => false).and_return("foobar") +- expect(shell.yes?("Should I overwrite it?")).to be_false ++ expect(shell.yes?("Should I overwrite it?")).to be false + end + end + + describe "#no?" do + it "asks the user and returns true if the user replies no" do + expect(Thor::LineEditor).to receive(:readline).with("Should I overwrite it? ", :add_to_history => false).and_return("n") +- expect(shell.no?("Should I overwrite it?")).to be_true ++ expect(shell.no?("Should I overwrite it?")).to be true + end + + it "asks the user and returns false if the user replies yes" do + expect(Thor::LineEditor).to receive(:readline).with("Should I overwrite it? ", :add_to_history => false).and_return("Yes") +- expect(shell.no?("Should I overwrite it?")).to be_false ++ expect(shell.no?("Should I overwrite it?")).to be false + end + + it "asks the user and returns false if the user replies with an answer other than yes or no" do + expect(Thor::LineEditor).to receive(:readline).with("Should I overwrite it? ", :add_to_history => false).and_return("foobar") +- expect(shell.no?("Should I overwrite it?")).to be_false ++ expect(shell.no?("Should I overwrite it?")).to be false + end + end + +@@ -283,17 +283,17 @@ def #456 Lanç... + + it "returns true if the user chooses default option" do + expect(Thor::LineEditor).to receive(:readline).and_return("") +- expect(shell.file_collision("foo")).to be_true ++ expect(shell.file_collision("foo")).to be true + end + + it "returns false if the user chooses no" do + expect(Thor::LineEditor).to receive(:readline).and_return("n") +- expect(shell.file_collision("foo")).to be_false ++ expect(shell.file_collision("foo")).to be false + end + + it "returns true if the user chooses yes" do + expect(Thor::LineEditor).to receive(:readline).and_return("y") +- expect(shell.file_collision("foo")).to be_true ++ expect(shell.file_collision("foo")).to be true + end + + it "shows help usage if the user chooses help" do diff --git a/SPECS/rubygem-thor.spec b/SPECS/rubygem-thor.spec new file mode 100644 index 0000000..bc37088 --- /dev/null +++ b/SPECS/rubygem-thor.spec @@ -0,0 +1,207 @@ +%{?scl:%scl_package rubygem-%{gem_name}} +%{!?scl:%global pkg_name %{name}} + +# Generated from thor-0.12.0.gem by gem2rpm -*- rpm-spec -*- +%global gem_name thor + +# There are not all test dependencies are available in RHEL. +%global enable_test 1 + +Summary: Thor is a toolkit for building powerful command-line interfaces +Name: %{?scl_prefix}rubygem-%{gem_name} +Version: 0.19.1 +Release: 8%{?dist} +Group: Development/Languages +License: MIT +URL: http://whatisthor.com/ +Source0: http://rubygems.org/downloads/%{gem_name}-%{version}.gem +# Update rspec dependency to >= 3 +Patch0: rubygem-thor-0.19.1-update-rspec-dependency.patch + +Requires: %{?scl_prefix_ruby}ruby(release) +Requires: %{?scl_prefix_ruby}ruby(rubygems) >= 1.3.5 +BuildRequires: %{?scl_prefix_ruby}rubygems-devel +BuildRequires: %{?scl_prefix_ruby}ruby(release) +BuildRequires: %{?scl_prefix_ruby}ruby +%if %{enable_test} > 0 +BuildRequires: %{?scl_prefix}rubygem(rspec) >= 3 +# Not necessary - omitting 2 tests +#BuildRequires: %%{?scl_prefix}rubygem(fakeweb) +BuildRequires: git +%endif +BuildArch: noarch +Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version} + +# Explicitly require runtime subpackage, as long as older scl-utils do not generate it +%{?scl:Requires: %{?scl_prefix}runtime} + +%description +Thor is a toolkit for building powerful command-line interfaces. + +%package doc +Summary: Documentation for %{pkg_name} +Group: Documentation +Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release} +BuildArch: noarch + +%description doc +This package contains documentation for %{pkg_name}. + +%prep +%setup -n %{pkg_name}-%{version} -q -c -T + +%{?scl:scl enable %{scl} - << \EOF} +set -e +%gem_install -n %{SOURCE0} +%{?scl:EOF} + +%build + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}%{gem_dir} +cp -a .%{gem_dir}/* %{buildroot}%{gem_dir}/ + +mkdir -p %{buildroot}%{_bindir} +cp -pa .%{_bindir}/* \ + %{buildroot}%{_bindir}/ + +find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x + +%{?scl:scl enable %{scl} - << \EOF} +set -e +find %{buildroot}%{gem_instdir}/bin -type f | \ + xargs -n 1 sed -i -e "s|^#\!/usr/bin/env ruby|#\!`which ruby`|" + +find %{buildroot}%{_bindir} -type f | \ + xargs -n 1 sed -i -e "s|^#\!/usr/bin/ruby|#\!`which ruby`|" +%{?scl:EOF} + +%check +%if %{enable_test} > 0 + +pushd .%{gem_instdir} + +# Drop bundler dependency +sed -i '/require "bundler"/ s/^/#/' Thorfile + +# kill simplecov dependency +sed -i '/simplecov/,/end/ s/^/#/' spec/helper.rb + +# Drop fakeweb dependency +sed -i '/require "fakeweb"/ s/^/#/' spec/helper.rb +sed -i '/FakeWeb.register_uri/ i \ pending' \ + spec/actions/file_manipulation_spec.rb + +# Fix failing tests +# /components and .empty_directory are present in git under v0.18.1 tag, +# but missing in .gem so the tests are failing +mkdir spec/fixtures/doc/components +touch spec/fixtures/doc/components/.empty_directory + +patch -F 0 -p1 < %{PATCH0} + +%{?scl:scl enable %{scl} - << \EOF} +rspec spec +%{?scl:EOF} +popd +%endif + +%files +%{_bindir}/thor +%doc %{gem_instdir}/LICENSE.md +%dir %{gem_instdir} +%{gem_instdir}/bin +%{gem_libdir} +%exclude %{gem_instdir}/.* +%exclude %{gem_cache} +%{gem_spec} + +%files doc +%doc %{gem_docdir} +%doc %{gem_instdir}/CHANGELOG.md +%doc %{gem_instdir}/README.md +%{gem_instdir}/Thorfile +%{gem_instdir}/spec +%{gem_instdir}/thor.gemspec + +%changelog +* Wed Feb 15 2017 Jun Aruga - 0.19.1-8 +- Improve tests. + +* Wed Feb 15 2017 Jun Aruga - 0.19.1-7 +- Add "set -e". + +* Wed Mar 02 2016 Pavel Valena - 0.19.1-6 +- Fix shebang replacement + +* Mon Feb 29 2016 Pavel Valena - 0.19.1-5 +- Add Requires and Provides + +* Mon Feb 29 2016 Pavel Valena - 0.19.1-4 +- Add scl macros +- Update rspec dependency to >= 3 + +* Thu Feb 04 2016 Fedora Release Engineering - 0.19.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jun 19 2015 Fedora Release Engineering - 0.19.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Tue Dec 09 2014 Vít Ondruch - 0.19.1-1 +- Update to thor 1.19.1. + +* Sun Jun 08 2014 Fedora Release Engineering - 0.18.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Thu Jul 25 2013 Josef Stribny - 0.18.1-1 +- Update to Thor 0.18.1. + +* Mon Mar 04 2013 Josef Stribny - 0.17.0-1 +- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0 +- Update to Thor 0.17.0 + +* Thu Feb 14 2013 Fedora Release Engineering - 0.16.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Nov 22 2012 Vít Ondruch - 0.16.0-2 +- Disable tests for EL builds. + +* Tue Nov 13 2012 Vít Ondruch - 0.16.0-1 +- Update to thor 0.16.0. +- Remove rubygem(diff-lcs) dependency, since it is just optional. +- Remove rubygem(ruby2ruby) dependnecy, since it is just optional, to allow + conversion of Rakefiles to Thorfiles (but it doesnt work withou ParseTree anyway). + +* Sat Jul 21 2012 Fedora Release Engineering - 0.14.6-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Wed Feb 01 2012 Bohuslav Kabrda - 0.14.6-5 +- Enable tests. +- Add patches for the failing tests. +- Removed unnecessary ParseTree dependency. + +* Mon Jan 30 2012 Bohuslav Kabrda - 0.14.6-4 +- Rebuilt for Ruby 1.9.3. + +* Sat Jan 14 2012 Fedora Release Engineering - 0.14.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Feb 09 2011 Fedora Release Engineering - 0.14.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Jan 17 2011 Mohammed Morsi - 0.14.6-1 +- Updated to latest upstream version + +* Wed May 5 2010 Matthew Kent - 0.13.6-1 +- New upstream version. + +* Fri Dec 18 2009 Matthew Kent - 0.12.0-2 +- Add Requires for rubygem(rake) (#542559). +- Upstream replaced Source after the gemcutter migration, update to latest + (#542559). +- Add Requires for rubygem(diff-lcs) as Thor can take advantage of it for + colourized diff output (#542559). + +* Mon Nov 16 2009 Matthew Kent - 0.12.0-1 +- Initial package