[DRE-commits] [pry] 02/04: Add 'dont-try-to-write-outside-build-dir' patch
David Suárez
deiv-guest at moszumanska.debian.org
Wed Sep 24 18:31:01 UTC 2014
This is an automated email from the git hooks/post-receive script.
deiv-guest pushed a commit to branch master
in repository pry.
commit 978396832d1021ced12cb71a9578606f5b0567dc
Author: David Suárez <david.sephirot at gmail.com>
Date: Wed Sep 24 20:23:33 2014 +0200
Add 'dont-try-to-write-outside-build-dir' patch
---
debian/patches/dont-try-to-write-outside-build-dir | 34 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 35 insertions(+)
diff --git a/debian/patches/dont-try-to-write-outside-build-dir b/debian/patches/dont-try-to-write-outside-build-dir
new file mode 100644
index 0000000..4ad27eb
--- /dev/null
+++ b/debian/patches/dont-try-to-write-outside-build-dir
@@ -0,0 +1,34 @@
+Description: Don't try to write outside build dir
+ Change the path of pry history file inside build dir, to prevent FTBFS.
+
+Bug-Debian: https://bugs.debian.org/759900
+Forwarded: not-needed
+Author: David Suárez <david.sephirot at gmail.com>
+Last-Update: 2014-09-24
+
+--- pry-0.10.1.orig/spec/regression/readline_spec.rb
++++ pry-0.10.1/spec/regression/readline_spec.rb
+@@ -21,19 +21,23 @@ describe "Readline" do
+ it "is loaded on invoking 'pry'" do
+ code = <<-RUBY
+ require "pry"
++ Pry.config.history.file = "pry_history"
+ Pry.start self, input: StringIO.new("exit-all"), output: StringIO.new
+ puts defined?(Readline)
+ RUBY
+ `#@ruby -I #@pry_dir -e '#{code}'`.end_with?("constant\n").should == true
++ File.delete "pry_history"
+ end
+
+ it "is not loaded on invoking 'pry' if Pry.input is set" do
+ code = <<-RUBY
+ require "pry"
++ Pry.config.history.file = "pry_history"
+ Pry.input = StringIO.new("exit-all")
+ Pry.start self, output: StringIO.new
+ p defined?(Readline)
+ RUBY
+ `#@ruby -I #@pry_dir -e '#{code}'`.end_with?("nil\n").should == true
++ File.delete "pry_history"
+ end
+ end
diff --git a/debian/patches/series b/debian/patches/series
index c135c64..ed3892b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
0001-Import-upstream-rspec-files.patch
0002-Modify-upstream-spec-for-Debian-Package.patch
+dont-try-to-write-outside-build-dir
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/pry.git
More information about the Pkg-ruby-extras-commits
mailing list