[DRE-commits] [ruby-sinatra-contrib] 01/04: Added patch for RSpec3 (Closes: #795117)

Jonas Genannt genannt at moszumanska.debian.org
Wed Aug 19 10:11:37 UTC 2015


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

genannt pushed a commit to branch master
in repository ruby-sinatra-contrib.

commit b781a9f9659cd56f5ff01d9623aa87c83bf1439e
Author: Jonas Genannt <jonas at brachium-system.net>
Date:   Wed Aug 19 12:12:50 2015 +0200

    Added patch for RSpec3 (Closes: #795117)
---
 debian/patches/rspec3.patch | 294 ++++++++++++++++++++++++++++++++++++++++++++
 debian/patches/series       |   1 +
 2 files changed, 295 insertions(+)

diff --git a/debian/patches/rspec3.patch b/debian/patches/rspec3.patch
new file mode 100644
index 0000000..457eed0
--- /dev/null
+++ b/debian/patches/rspec3.patch
@@ -0,0 +1,294 @@
+From e31165da6325773f1dee57cc824b3c9c557af473 Mon Sep 17 00:00:00 2001
+From: Ashley Williams <ashley at bocoup.com>
+Date: Fri, 15 May 2015 10:38:16 -0400
+Subject: [PATCH] fix specs to account for deprecation notices - use `be true`
+ instead of `be_true` - use `be false` instead of `be_false`
+Bug: https://github.com/sinatra/sinatra-contrib/commit/e31165da6325773f1dee57cc824b3c9c557af473
+
+---
+ spec/cookies_spec.rb   | 30 +++++++++++++++---------------
+ spec/extension_spec.rb |  2 +-
+ spec/namespace_spec.rb | 42 +++++++++++++++++++++---------------------
+ spec/streaming_spec.rb |  4 ++--
+ 4 files changed, 39 insertions(+), 39 deletions(-)
+
+diff --git a/spec/cookies_spec.rb b/spec/cookies_spec.rb
+index 86b45cc..388a5e5 100644
+--- a/spec/cookies_spec.rb
++++ b/spec/cookies_spec.rb
+@@ -32,7 +32,7 @@ def cookies(*set_cookies)
+     it 'runs the block' do
+       ran = false
+       cookie_route { ran = true }
+-      ran.should be_true
++      ran.should be true
+     end
+ 
+     it 'returns the block result' do
+@@ -274,7 +274,7 @@ def cookies(*set_cookies)
+         cookies.each do |key, value|
+           key.should   == 'foo'
+           value.should == 'baz'
+-          seen.should  == false
++          seen.should == false
+           seen = true
+         end
+       end
+@@ -434,7 +434,7 @@ def cookies(*set_cookies)
+       cookie_route do
+         cookies['foo'] = 'bar'
+         cookies.empty?
+-      end.should be_false
++      end.should be false
+     end
+ 
+     it 'becomes true if response cookies are removed' do
+@@ -442,14 +442,14 @@ def cookies(*set_cookies)
+         cookies['foo'] = 'bar'
+         cookies.delete :foo
+         cookies.empty?
+-      end.should be_true
++      end.should be true
+     end
+ 
+     it 'becomes true if request cookies are removed' do
+       cookie_route('foo=bar') do
+         cookies.delete :foo
+         cookies.empty?
+-      end.should be_true
++      end.should be_truthy
+     end
+ 
+     it 'becomes true after clear' do
+@@ -457,7 +457,7 @@ def cookies(*set_cookies)
+         cookies['foo'] = 'bar'
+         cookies.clear
+         cookies.empty?
+-      end.should be_true
++      end.should be_truthy
+     end
+   end
+ 
+@@ -594,19 +594,19 @@ def cookies(*set_cookies)
+ 
+   describe :key? do
+     it 'checks request cookies' do
+-      cookies('foo=bar').key?('foo').should be_true
++      cookies('foo=bar').key?('foo').should be true
+     end
+ 
+     it 'checks response cookies' do
+       jar = cookies
+       jar['foo'] = 'bar'
+-      jar.key?(:foo).should be_true
++      jar.key?(:foo).should be true
+     end
+ 
+     it 'does not use deleted cookies' do
+       jar = cookies('foo=bar')
+       jar.delete :foo
+-      jar.key?('foo').should be_false
++      jar.key?('foo').should be false
+     end
+   end
+ 
+@@ -621,19 +621,19 @@ def cookies(*set_cookies)
+ 
+   describe :member? do
+     it 'checks request cookies' do
+-      cookies('foo=bar').member?('foo').should be_true
++      cookies('foo=bar').member?('foo').should be true
+     end
+ 
+     it 'checks response cookies' do
+       jar = cookies
+       jar['foo'] = 'bar'
+-      jar.member?(:foo).should be_true
++      jar.member?(:foo).should be true
+     end
+ 
+     it 'does not use deleted cookies' do
+       jar = cookies('foo=bar')
+       jar.delete :foo
+-      jar.member?('foo').should be_false
++      jar.member?('foo').should be false
+     end
+   end
+ 
+@@ -775,19 +775,19 @@ def cookies(*set_cookies)
+ 
+   describe :value? do
+     it 'checks request cookies' do
+-      cookies('foo=bar').value?('bar').should be_true
++      cookies('foo=bar').value?('bar').should be true
+     end
+ 
+     it 'checks response cookies' do
+       jar = cookies
+       jar[:foo] = 'bar'
+-      jar.value?('bar').should be_true
++      jar.value?('bar').should be true
+     end
+ 
+     it 'does not use deleted cookies' do
+       jar = cookies('foo=bar')
+       jar.delete :foo
+-      jar.value?('bar').should_not be_true
++      jar.value?('bar').should be false
+     end
+   end
+ 
+diff --git a/spec/extension_spec.rb b/spec/extension_spec.rb
+index 7a677f4..97db575 100644
+--- a/spec/extension_spec.rb
++++ b/spec/extension_spec.rb
+@@ -23,7 +23,7 @@ module ExampleExtension
+   before { mock_app { register ExampleExtension }}
+ 
+   it('allows using set') { settings.foo.should == :bar }
+-  it('implements configure') { settings.reload_stuff.should be_false }
++  it('implements configure') { settings.reload_stuff.should be false }
+ 
+   it 'allows defing routes' do
+     get('/').should be_ok
+diff --git a/spec/namespace_spec.rb b/spec/namespace_spec.rb
+index ad8c59e..0195fe2 100644
+--- a/spec/namespace_spec.rb
++++ b/spec/namespace_spec.rb
+@@ -118,14 +118,14 @@ def namespace(*args, &block)
+           ran = false
+           namespace('/foo') { before { ran = true }}
+           send(verb, '/foo')
+-          ran.should be_true
++          ran.should be true
+         end
+ 
+         specify 'are not triggered for a different namespace' do
+           ran = false
+           namespace('/foo') { before { ran = true }}
+           send(verb, '/fox')
+-          ran.should be_false
++          ran.should be false
+         end
+       end
+ 
+@@ -134,14 +134,14 @@ def namespace(*args, &block)
+           ran = false
+           namespace('/foo') { after { ran = true }}
+           send(verb, '/foo')
+-          ran.should be_true
++          ran.should be true
+         end
+ 
+         specify 'are not triggered for a different namespace' do
+           ran = false
+           namespace('/foo') { after { ran = true }}
+           send(verb, '/fox')
+-          ran.should be_false
++          ran.should be false
+         end
+       end
+ 
+@@ -176,13 +176,13 @@ def namespace(*args, &block)
+               send(verb, '/*') { 'ok' }
+             end
+             send(verb, '/foo', {}, 'HTTP_HOST' => 'example.org', 'HTTP_ACCEPT' => 'text/plain')
+-            ran.should be_false
++            ran.should be false
+             send(verb, '/foo', {}, 'HTTP_HOST' => 'example.com', 'HTTP_ACCEPT' => 'text/html')
+-            ran.should be_false
++            ran.should be false
+             send(verb, '/bar', {}, 'HTTP_HOST' => 'example.com', 'HTTP_ACCEPT' => 'text/plain')
+-            ran.should be_false
++            ran.should be false
+             send(verb, '/foo', {}, 'HTTP_HOST' => 'example.com', 'HTTP_ACCEPT' => 'text/plain')
+-            ran.should be_true
++            ran.should be true
+           end
+ 
+           specify 'are accepted in the after-filter' do
+@@ -192,13 +192,13 @@ def namespace(*args, &block)
+               send(verb, '/*') { 'ok' }
+             end
+             send(verb, '/foo', {}, 'HTTP_HOST' => 'example.org', 'HTTP_ACCEPT' => 'text/plain')
+-            ran.should be_false
++            ran.should be false
+             send(verb, '/foo', {}, 'HTTP_HOST' => 'example.com', 'HTTP_ACCEPT' => 'text/html')
+-            ran.should be_false
++            ran.should be false
+             send(verb, '/bar', {}, 'HTTP_HOST' => 'example.com', 'HTTP_ACCEPT' => 'text/plain')
+-            ran.should be_false
++            ran.should be false
+             send(verb, '/foo', {}, 'HTTP_HOST' => 'example.com', 'HTTP_ACCEPT' => 'text/plain')
+-            ran.should be_true
++            ran.should be true
+           end
+         end
+ 
+@@ -231,9 +231,9 @@ def namespace(*args, &block)
+               send(verb) { 'ok' }
+             end
+             send(verb, '/foo', {}, 'HTTP_HOST' => 'example.org')
+-            ran.should be_false
++            ran.should be false
+             send(verb, '/foo', {}, 'HTTP_HOST' => 'example.com')
+-            ran.should be_true
++            ran.should be true
+           end
+ 
+           specify 'are accepted in the route definition' do
+@@ -252,11 +252,11 @@ def namespace(*args, &block)
+                 send(verb) { 'ok' }
+               end
+               send(verb, '/', {}, 'HTTP_HOST' => 'example.org', 'HTTP_ACCEPT' => 'text/plain')
+-              ran.should be_false
++              ran.should be false
+               send(verb, '/', {}, 'HTTP_HOST' => 'example.com', 'HTTP_ACCEPT' => 'text/html')
+-              ran.should be_false
++              ran.should be false
+               send(verb, '/', {}, 'HTTP_HOST' => 'example.com', 'HTTP_ACCEPT' => 'text/plain')
+-              ran.should be_true
++              ran.should be true
+             end
+ 
+             specify 'are accepted in the filters' do
+@@ -266,13 +266,13 @@ def namespace(*args, &block)
+                 send(verb, '/*') { 'ok' }
+               end
+               send(verb, '/foo', {}, 'HTTP_HOST' => 'example.org', 'HTTP_ACCEPT' => 'text/plain')
+-              ran.should be_false
++              ran.should be false
+               send(verb, '/foo', {}, 'HTTP_HOST' => 'example.com', 'HTTP_ACCEPT' => 'text/html')
+-              ran.should be_false
++              ran.should be false
+               send(verb, '/far', {}, 'HTTP_HOST' => 'example.com', 'HTTP_ACCEPT' => 'text/plain')
+-              ran.should be_false
++              ran.should be false
+               send(verb, '/foo', {}, 'HTTP_HOST' => 'example.com', 'HTTP_ACCEPT' => 'text/plain')
+-              ran.should be_true
++              ran.should be true
+             end
+           end
+         end
+diff --git a/spec/streaming_spec.rb b/spec/streaming_spec.rb
+index f5c1bb9..a881682 100644
+--- a/spec/streaming_spec.rb
++++ b/spec/streaming_spec.rb
+@@ -26,7 +26,7 @@ def use(*args)
+     it 'runs the given block' do
+       ran = false
+       stream { ran = true }
+-      ran.should be_true
++      ran.should be true
+     end
+ 
+     it 'returns the stream object' do
+@@ -334,7 +334,7 @@ def call(env)
+         fired = false
+         out.callback { fired = true }
+         out.close
+-        fired.should be_true
++        fired.should be true
+       end
+     end
+ 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..a47c924
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+rspec3.patch

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



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