[DRE-commits] [ruby-buff-config] 03/03: Add patches

Hleb Valoshka tsfgnu-guest at moszumanska.debian.org
Fri Jul 31 09:28:59 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-buff-config.

commit 0a8b2b87b25187dc4535debcaf10b3a910a5fe4d
Author: Hleb Valoshka <375gnu at gmail.com>
Date:   Fri Jul 31 12:25:41 2015 +0300

    Add patches
---
 ...specs-to-RSpec-3.3.2-syntax-with-Transpec.patch | 65 ++++++++++++++++++++++
 .../0002-Don-t-change-LOAD_PATH-in-tests.patch     | 18 ++++++
 debian/patches/series                              |  2 +
 3 files changed, 85 insertions(+)

diff --git a/debian/patches/0001-Convert-specs-to-RSpec-3.3.2-syntax-with-Transpec.patch b/debian/patches/0001-Convert-specs-to-RSpec-3.3.2-syntax-with-Transpec.patch
new file mode 100644
index 0000000..9910620
--- /dev/null
+++ b/debian/patches/0001-Convert-specs-to-RSpec-3.3.2-syntax-with-Transpec.patch
@@ -0,0 +1,65 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Fri, 31 Jul 2015 12:25:01 +0300
+Subject: Convert specs to RSpec 3.3.2 syntax with Transpec
+
+This conversion is done by Transpec 3.1.1 with the following command:
+    transpec
+
+* 3 conversions
+    from: obj.stub(:message)
+      to: allow(obj).to receive(:message)
+
+* 1 conversion
+    from: expect(collection).to have(n).items
+      to: expect(collection.size).to eq(n)
+
+For more details: https://github.com/yujinakayama/transpec#supported-conversions
+---
+ spec/buff/config/ruby_spec.rb | 6 +++---
+ spec/buff/config_spec.rb      | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/spec/buff/config/ruby_spec.rb b/spec/buff/config/ruby_spec.rb
+index de9a535..fc9d44e 100644
+--- a/spec/buff/config/ruby_spec.rb
++++ b/spec/buff/config/ruby_spec.rb
+@@ -51,7 +51,7 @@ describe Buff::Config::Ruby do
+     describe '::from_file' do
+       let(:filepath) { tmp_path.join('test_config.rb').to_s }
+ 
+-      before { File.stub(:read).with(filepath).and_return(ruby) }
++      before { allow(File).to receive(:read).with(filepath).and_return(ruby) }
+ 
+       it 'returns an instance of the inheriting class' do
+         expect(subject.from_file(filepath)).to be_a(subject)
+@@ -62,7 +62,7 @@ describe Buff::Config::Ruby do
+       end
+ 
+       context 'given a filepath that does not exist' do
+-        before { File.stub(:read).and_raise(Errno::ENOENT) }
++        before { allow(File).to receive(:read).and_raise(Errno::ENOENT) }
+ 
+         it 'raises a Buff::Errors::ConfigNotFound error' do
+           expect {
+@@ -118,7 +118,7 @@ describe Buff::Config::Ruby do
+   describe '#reload' do
+     before do
+       subject.path = 'foo/bar.rb'
+-      File.stub(:read).and_return(ruby)
++      allow(File).to receive(:read).and_return(ruby)
+     end
+ 
+     it 'returns self' do
+diff --git a/spec/buff/config_spec.rb b/spec/buff/config_spec.rb
+index 5536dee..45778b8 100644
+--- a/spec/buff/config_spec.rb
++++ b/spec/buff/config_spec.rb
+@@ -28,7 +28,7 @@ describe Buff::Config::Base do
+     end
+ 
+     it "contains just the sliced elements" do
+-      expect(@sliced).to have(1).item
++      expect(@sliced.size).to eq(1)
+     end
+   end
+ end
diff --git a/debian/patches/0002-Don-t-change-LOAD_PATH-in-tests.patch b/debian/patches/0002-Don-t-change-LOAD_PATH-in-tests.patch
new file mode 100644
index 0000000..4bc5217
--- /dev/null
+++ b/debian/patches/0002-Don-t-change-LOAD_PATH-in-tests.patch
@@ -0,0 +1,18 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Fri, 31 Jul 2015 12:25:28 +0300
+Subject: Don't change LOAD_PATH in tests
+
+---
+ spec/spec_helper.rb | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
+index 641fae5..7882886 100644
+--- a/spec/spec_helper.rb
++++ b/spec/spec_helper.rb
+@@ -1,5 +1,3 @@
+-$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
+-
+ require 'rspec'
+ require 'buff/ruby_engine'
+ require 'json_spec'
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..c28f674
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+0001-Convert-specs-to-RSpec-3.3.2-syntax-with-Transpec.patch
+0002-Don-t-change-LOAD_PATH-in-tests.patch

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



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