[DRE-commits] [ruby-grape] 03/05: Add patches
Hleb Valoshka
tsfgnu-guest at moszumanska.debian.org
Tue Jul 7 12:46:55 UTC 2015
This is an automated email from the git hooks/post-receive script.
tsfgnu-guest pushed a commit to branch master
in repository ruby-grape.
commit ee398c5f14a12b59430b3bea8d87f5f0015e64de
Author: Hleb Valoshka <375gnu at gmail.com>
Date: Tue Jul 7 14:04:54 2015 +0300
Add patches
---
.../0001-Do-not-require-bundler-nor-rubygems.patch | 26 ++++++++++++++++++++++
...002-Allow-release-absence-in-Rack.release.patch | 21 +++++++++++++++++
...ending-until-ruby-rack-contrib-is-package.patch | 25 +++++++++++++++++++++
debian/patches/series | 3 +++
4 files changed, 75 insertions(+)
diff --git a/debian/patches/0001-Do-not-require-bundler-nor-rubygems.patch b/debian/patches/0001-Do-not-require-bundler-nor-rubygems.patch
new file mode 100644
index 0000000..b6f04bb
--- /dev/null
+++ b/debian/patches/0001-Do-not-require-bundler-nor-rubygems.patch
@@ -0,0 +1,26 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Tue, 7 Jul 2015 14:04:37 +0300
+Subject: Do not require bundler nor rubygems
+
+---
+ spec/spec_helper.rb | 9 ---------
+ 1 file changed, 9 deletions(-)
+
+diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
+index c6cd2d0..8740e51 100644
+--- a/spec/spec_helper.rb
++++ b/spec/spec_helper.rb
+@@ -1,13 +1,4 @@
+-$LOAD_PATH.unshift(File.dirname(__FILE__))
+-$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
+-$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'support'))
+-
+ require 'grape'
+-
+-require 'rubygems'
+-require 'bundler'
+-Bundler.setup :default, :test
+-
+ require 'json'
+ require 'rack/test'
+ require 'base64'
diff --git a/debian/patches/0002-Allow-release-absence-in-Rack.release.patch b/debian/patches/0002-Allow-release-absence-in-Rack.release.patch
new file mode 100644
index 0000000..7c96a38
--- /dev/null
+++ b/debian/patches/0002-Allow-release-absence-in-Rack.release.patch
@@ -0,0 +1,21 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Tue, 7 Jul 2015 15:13:18 +0300
+Subject: Allow release absence in Rack.release
+
+---
+ spec/grape/integration/rack_spec.rb | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/spec/grape/integration/rack_spec.rb b/spec/grape/integration/rack_spec.rb
+index 259deef..1b48597 100644
+--- a/spec/grape/integration/rack_spec.rb
++++ b/spec/grape/integration/rack_spec.rb
+@@ -21,7 +21,7 @@ describe Rack do
+
+ unless RUBY_PLATFORM == 'java'
+ major, minor, release = Rack.release.split('.').map(&:to_i)
+- pending 'Rack 1.5.3 or 1.6.1 required' unless major >= 1 && ((minor == 5 && release >= 3) || (minor >= 6))
++ pending 'Rack 1.5.3 or 1.6.1 required' unless major >= 1 && ((minor == 5 && release && release >= 3) || (minor >= 6))
+ end
+
+ expect(JSON.parse(app.call(env)[2].body.first)['params_keys']).to match_array('test')
diff --git a/debian/patches/0003-Mark-test-pending-until-ruby-rack-contrib-is-package.patch b/debian/patches/0003-Mark-test-pending-until-ruby-rack-contrib-is-package.patch
new file mode 100644
index 0000000..b00d9c3
--- /dev/null
+++ b/debian/patches/0003-Mark-test-pending-until-ruby-rack-contrib-is-package.patch
@@ -0,0 +1,25 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Tue, 7 Jul 2015 15:14:04 +0300
+Subject: Mark test pending until ruby-rack-contrib is packaged
+
+---
+ spec/grape/entity_spec.rb | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/spec/grape/entity_spec.rb b/spec/grape/entity_spec.rb
+index 2677dd4..41a079a 100644
+--- a/spec/grape/entity_spec.rb
++++ b/spec/grape/entity_spec.rb
+@@ -264,7 +264,11 @@ XML
+ end
+
+ it 'presents with jsonp utilising Rack::JSONP' do
+- require 'rack/contrib'
++ begin
++ require 'rack/contrib'
++ rescue LoadError
++ pending "ruby-rack-contrib is not packaged yet"
++ end
+
+ # Include JSONP middleware
+ subject.use Rack::JSONP
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..0cd7d79
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+0001-Do-not-require-bundler-nor-rubygems.patch
+0002-Allow-release-absence-in-Rack.release.patch
+0003-Mark-test-pending-until-ruby-rack-contrib-is-package.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-grape.git
More information about the Pkg-ruby-extras-commits
mailing list