Update to Thor 0.20.3.

epel9
Vít Ondruch 6 years ago
parent e2708a9195
commit 20b04f05d1

2
.gitignore vendored

@ -4,3 +4,5 @@ thor-0.13.6.gem
/thor-0.17.0.gem
/thor-0.18.1.gem
/thor-0.19.1.gem
/thor-0.20.3-spec.tar.gz
/thor-0.20.3.gem

@ -1,104 +0,0 @@
From b5f8c410da4ad315a8c45a91fdcd9a4a2cb57d7d Mon Sep 17 00:00:00 2001
From: Erik Michaels-Ober <sferik@gmail.com>
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

@ -1,57 +1,59 @@
# 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 0%{!?rhel:1}
Summary: Thor is a toolkit for building powerful command-line interfaces
Name: rubygem-%{gem_name}
Version: 0.19.1
Release: 10%{?dist}
Version: 0.20.3
Release: 1%{?dist}
Summary: Thor is a toolkit for building powerful command-line interfaces
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
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
# git clone https://github.com/erikhuda/thor.git
# git checkout v0.20.3 && tar czvf thor-0.20.3-spec.tar.gz spec/
Source1: %{gem_name}-%{version}-spec.tar.gz
# ruby package has just soft dependency on rubygem(io-console), while
# Thor always requires it.
Requires: rubygem(io-console)
BuildRequires: rubygems-devel
BuildRequires: ruby(release)
BuildRequires: rubygems-devel
BuildRequires: ruby
%if %{enable_test} > 0
BuildRequires: rubygem(io-console)
BuildRequires: rubygem(rspec) >= 3
BuildRequires: rubygem(fakeweb)
BuildRequires: git
%endif
BuildRequires: rubygem(rspec)
BuildRequires: rubygem(webmock)
BuildRequires: %{_bindir}/git
BuildArch: noarch
%description
Thor is a toolkit for building powerful command-line interfaces.
%package doc
Summary: Documentation for %{name}
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
This package contains documentation for %{name}.
Documentation for %{name}.
%prep
%setup -q -c -T
%gem_install -n %{SOURCE0}
%setup -q -n %{gem_name}-%{version}
%build
# Create the gem as gem install only works on a gem file
gem build ../%{gem_name}-%{version}.gemspec
# %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir
# by default, so that we can move it into the buildroot in %%install
%gem_install
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{gem_dir}
cp -a .%{gem_dir}/* %{buildroot}%{gem_dir}/
cp -a .%{gem_dir}/* \
%{buildroot}%{gem_dir}/
mkdir -p %{buildroot}%{_bindir}
cp -pa .%{_bindir}/* \
cp -a .%{_bindir}/* \
%{buildroot}%{_bindir}/
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
@ -59,47 +61,39 @@ find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
find %{buildroot}%{gem_instdir}/bin -type f | \
xargs -n 1 sed -i -e 's"^#!/usr/bin/env ruby"#!/usr/bin/ruby"'
%if %{enable_test} > 0
%check
pushd .%{gem_instdir}
# Drop bundler dependency
sed -i '/require "bundler"/ s/^/#/' Thorfile
tar xzvf %{SOURCE1}
# kill simplecov dependency
sed -i '/simplecov/,/end/ s/^/#/' spec/helper.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}
rspec spec
# Thor does not specify encoding of its imputs, what might cause issues.
# https://github.com/erikhuda/thor/issues/645
LC_ALL=C.UTF-8 rspec spec
popd
%endif
%files
%{_bindir}/thor
%doc %{gem_instdir}/LICENSE.md
%dir %{gem_instdir}
%{_bindir}/thor
%license %{gem_instdir}/LICENSE.md
%{gem_instdir}/bin
%{gem_libdir}
%exclude %{gem_instdir}/.*
%exclude %{gem_instdir}/.document
%exclude %{gem_cache}
%{gem_spec}
%files doc
%doc %{gem_docdir}
%doc %{gem_instdir}/CHANGELOG.md
%doc %{gem_instdir}/CONTRIBUTING.md
%doc %{gem_instdir}/README.md
%{gem_instdir}/Thorfile
%{gem_instdir}/spec
%{gem_instdir}/thor.gemspec
%changelog
* Tue Feb 05 2019 Vít Ondruch <vondruch@redhat.com> - 0.20.3-1
- Update to Thor 0.20.3.
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.19.1-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

@ -1 +1,2 @@
d775969c49fec36377b918725aa33019 thor-0.19.1.gem
SHA512 (thor-0.20.3-spec.tar.gz) = e180f8644376eca2a6e13265a5e6cc43e1813a43d3c00d7e46382193ce8f967e9e44b0d6245d278963ea61ca3e97c289054ea411b8ff916a9f82a9e28bab5b51
SHA512 (thor-0.20.3.gem) = 4c834408321f4f13b4878ee0e57a1fcd9a2294faf6d4c8c52ed909c2f14634b7810e3a0bffa1920f37ccd7baced2ff103a06f679f653a133bd647ac1e9add522

Loading…
Cancel
Save