[DRE-commits] [ruby-foreman] 04/13: Refresh patches

Antonio Terceiro terceiro at moszumanska.debian.org
Tue Jul 19 14:11:05 UTC 2016


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to branch master
in repository ruby-foreman.

commit 07834d5b389f599c0558033693f7ef0f18631e02
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Mon Jul 18 19:10:57 2016 -0300

    Refresh patches
---
 debian/changelog                                   |   2 +
 .../0001-Look-for-data-in-usr-share-foreman.patch  |   6 +-
 debian/patches/0002-Port-tests-to-fakefs-0.4.patch | 122 ---------------------
 debian/patches/series                              |   1 -
 4 files changed, 5 insertions(+), 126 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 0f846a4..44e54e4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,6 +9,8 @@ ruby-foreman (0.82.0-1) UNRELEASED; urgency=medium
 
   [ Antonio Terceiro ]
   * New upstream release
+  * Refresh patches
+  * 0002-Port-tests-to-fakefs-0.4.patch: dropped, applied upstream
 
  -- Antonio Terceiro <terceiro at debian.org>  Mon, 18 Jul 2016 19:07:57 -0300
 
diff --git a/debian/patches/0001-Look-for-data-in-usr-share-foreman.patch b/debian/patches/0001-Look-for-data-in-usr-share-foreman.patch
index 2afb4b9..df4ee59 100644
--- a/debian/patches/0001-Look-for-data-in-usr-share-foreman.patch
+++ b/debian/patches/0001-Look-for-data-in-usr-share-foreman.patch
@@ -8,7 +8,7 @@ Subject: Look for data in /usr/share/foreman
 
 --- a/lib/foreman/export/base.rb
 +++ b/lib/foreman/export/base.rb
-@@ -111,7 +111,7 @@ private ################################
+@@ -117,7 +117,7 @@ private ################################
      elsif File.exist?(file_path = File.expand_path(File.join("~/.foreman/templates", file)))
        File.read(file_path)
      else
@@ -17,7 +17,7 @@ Subject: Look for data in /usr/share/foreman
      end
    end
  
-@@ -123,7 +123,7 @@ private ################################
+@@ -129,7 +129,7 @@ private ################################
        matchers = []
        matchers << File.join(options[:template], name_without_first) if options[:template]
        matchers << File.expand_path("~/.foreman/templates/#{name}")
@@ -26,7 +26,7 @@ Subject: Look for data in /usr/share/foreman
        File.read(matchers.detect { |m| File.exists?(m) })
      end
    end
-@@ -153,4 +153,13 @@ private ################################
+@@ -164,4 +164,13 @@ private ################################
      end
    end
  
diff --git a/debian/patches/0002-Port-tests-to-fakefs-0.4.patch b/debian/patches/0002-Port-tests-to-fakefs-0.4.patch
deleted file mode 100644
index e122d03..0000000
--- a/debian/patches/0002-Port-tests-to-fakefs-0.4.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-From: Antonio Terceiro <terceiro at softwarelivre.org>
-Date: Wed, 4 Feb 2015 11:29:58 -0200
-Subject: Port tests to fakefs 0.4
-
-Submitted upstream at https://github.com/ddollar/foreman/pull/522
----
- spec/foreman/cli_spec.rb      |  1 -
- spec/foreman/engine_spec.rb   | 12 ++++++------
- spec/foreman/procfile_spec.rb |  1 +
- spec/spec_helper.rb           | 14 ++++++++++++++
- 4 files changed, 21 insertions(+), 7 deletions(-)
-
-diff --git a/spec/foreman/cli_spec.rb b/spec/foreman/cli_spec.rb
-index d62c13c..4b22d74 100644
---- a/spec/foreman/cli_spec.rb
-+++ b/spec/foreman/cli_spec.rb
-@@ -66,7 +66,6 @@ describe "Foreman::CLI", :fakefs do
-     end
- 
-     it "without a Procfile displays an error" do
--      FileUtils.rm_f "Procfile"
-       expect(foreman("check")).to eq("ERROR: Procfile does not exist.\n")
-     end
-   end
-diff --git a/spec/foreman/engine_spec.rb b/spec/foreman/engine_spec.rb
-index 6f534c7..8ac3536 100644
---- a/spec/foreman/engine_spec.rb
-+++ b/spec/foreman/engine_spec.rb
-@@ -62,14 +62,14 @@ describe "Foreman::Engine", :fakefs do
- 
-   describe "environment" do
-     it "should read env files" do
--      File.open("/tmp/env", "w") { |f| f.puts("FOO=baz") }
-+      write_file("/tmp/env") { |f| f.puts("FOO=baz") }
-       subject.load_env("/tmp/env")
-       expect(subject.env["FOO"]).to eq("baz")
-     end
- 
-     it "should read more than one if specified" do
--      File.open("/tmp/env1", "w") { |f| f.puts("FOO=bar") }
--      File.open("/tmp/env2", "w") { |f| f.puts("BAZ=qux") }
-+      write_file("/tmp/env1") { |f| f.puts("FOO=bar") }
-+      write_file("/tmp/env2") { |f| f.puts("BAZ=qux") }
-       subject.load_env "/tmp/env1"
-       subject.load_env "/tmp/env2"
-       expect(subject.env["FOO"]).to eq("bar")
-@@ -77,7 +77,7 @@ describe "Foreman::Engine", :fakefs do
-     end
- 
-     it "should handle quoted values" do
--      File.open("/tmp/env", "w") do |f|
-+      write_file("/tmp/env") do |f|
-         f.puts 'FOO=bar'
-         f.puts 'BAZ="qux"'
-         f.puts "FRED='barney'"
-@@ -91,7 +91,7 @@ describe "Foreman::Engine", :fakefs do
-     end
- 
-     it "should handle multiline strings" do
--      File.open("/tmp/env", "w") do |f|
-+      write_file("/tmp/env") do |f|
-         f.puts 'FOO="bar\nbaz"'
-       end
-       subject.load_env "/tmp/env"
-@@ -103,7 +103,7 @@ describe "Foreman::Engine", :fakefs do
-     end
- 
-     it "should set port from .env if specified" do
--      File.open("/tmp/env", "w") { |f| f.puts("PORT=9000") }
-+      write_file("/tmp/env") { |f| f.puts("PORT=9000") }
-       subject.load_env "/tmp/env"
-       expect(subject.send(:base_port)).to eq(9000)
-     end
-diff --git a/spec/foreman/procfile_spec.rb b/spec/foreman/procfile_spec.rb
-index 0f2f420..51b0251 100644
---- a/spec/foreman/procfile_spec.rb
-+++ b/spec/foreman/procfile_spec.rb
-@@ -36,6 +36,7 @@ describe Foreman::Procfile, :fakefs do
-   it "can write to a file" do
-     subject["foo"] = "./foo"
-     subject["bar"] = "./bar"
-+    Dir.mkdir('/tmp')
-     subject.save "/tmp/proc"
-     expect(File.read("/tmp/proc")).to eq("foo: ./foo\nbar: ./bar\n")
-   end
-diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
-index 3c510ed..2eaca35 100644
---- a/spec/spec_helper.rb
-+++ b/spec/spec_helper.rb
-@@ -82,6 +82,7 @@ def write_foreman_config(app)
- end
- 
- def write_procfile(procfile="Procfile", alpha_env="")
-+  FileUtils.mkdir_p(File.dirname(procfile))
-   File.open(procfile, "w") do |file|
-     file.puts "alpha: ./alpha" + " #{alpha_env}".rstrip
-     file.puts "\n"
-@@ -92,6 +93,13 @@ def write_procfile(procfile="Procfile", alpha_env="")
-   File.expand_path(procfile)
- end
- 
-+def write_file(file)
-+  FileUtils.mkdir_p(File.dirname(file))
-+  File.open(file, 'w') do |f|
-+    yield(f)
-+  end
-+end
-+
- def write_env(env=".env", options={"FOO"=>"bar"})
-   File.open(env, "w") do |file|
-     options.each do |key, val|
-@@ -163,4 +171,10 @@ RSpec.configure do |config|
-   config.order = 'rand'
-   config.include FakeFS::SpecHelpers, :fakefs
-   config.mock_with :rr
-+  config.before(:each) do
-+    FileUtils.mkdir_p('/tmp')
-+  end
-+  config.after(:each) do
-+    FileUtils.rm_rf('/tmp')
-+  end
- end
diff --git a/debian/patches/series b/debian/patches/series
index 4d7c3d9..c7b7ee6 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1,3 @@
 0001-Look-for-data-in-usr-share-foreman.patch
-0002-Port-tests-to-fakefs-0.4.patch
 0003-spec_helper-misc-changes-to-run-against-Debian-packa.patch
 0004-Add-missing-.env-file-required-for-tests.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-foreman.git



More information about the Pkg-ruby-extras-commits mailing list