[DRE-commits] [ruby-varia-model] 02/03: Add patches
Hleb Valoshka
tsfgnu-guest at moszumanska.debian.org
Fri Jul 31 09:09:36 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-varia-model.
commit 44c1320ad4f1b6e7485051a26eaae7b9f3f962ca
Author: Hleb Valoshka <375gnu at gmail.com>
Date: Fri Jul 31 11:58:32 2015 +0300
Add patches
---
...re-hashie-hash_extensions-support-hashie-.patch | 18 +++++
.../0002-Don-t-change-LOAD_PATH-in-tests.patch | 18 +++++
...specs-to-RSpec-3.3.2-syntax-with-Transpec.patch | 88 ++++++++++++++++++++++
debian/patches/series | 3 +
4 files changed, 127 insertions(+)
diff --git a/debian/patches/0001-Don-t-require-hashie-hash_extensions-support-hashie-.patch b/debian/patches/0001-Don-t-require-hashie-hash_extensions-support-hashie-.patch
new file mode 100644
index 0000000..6c939da
--- /dev/null
+++ b/debian/patches/0001-Don-t-require-hashie-hash_extensions-support-hashie-.patch
@@ -0,0 +1,18 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Fri, 31 Jul 2015 11:57:49 +0300
+Subject: Don't require 'hashie/hash_extensions' (support hashie >= 3.0)
+
+---
+ lib/varia_model/attributes.rb | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/lib/varia_model/attributes.rb b/lib/varia_model/attributes.rb
+index 9bfb49a..1700634 100644
+--- a/lib/varia_model/attributes.rb
++++ b/lib/varia_model/attributes.rb
+@@ -1,5 +1,4 @@
+ require 'hashie'
+-require 'hashie/hash_extensions'
+ require 'hashie/mash'
+
+ module VariaModel
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..fd6c641
--- /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 11:58:18 +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 f12cff5..b0e0819 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'
+
diff --git a/debian/patches/0003-Convert-specs-to-RSpec-3.3.2-syntax-with-Transpec.patch b/debian/patches/0003-Convert-specs-to-RSpec-3.3.2-syntax-with-Transpec.patch
new file mode 100644
index 0000000..a6140a5
--- /dev/null
+++ b/debian/patches/0003-Convert-specs-to-RSpec-3.3.2-syntax-with-Transpec.patch
@@ -0,0 +1,88 @@
+From: Hleb Valoshka <375gnu at gmail.com>
+Date: Fri, 31 Jul 2015 12:06:15 +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
+
+* 7 conversions
+ from: expect(collection).to have(n).items
+ to: expect(collection.size).to eq(n)
+
+* 1 conversion
+ from: failure_message_for_should { }
+ to: failure_message { }
+
+For more details: https://github.com/yujinakayama/transpec#supported-conversions
+---
+ spec/support/matchers/each.rb | 2 +-
+ spec/unit/varia_model_spec.rb | 14 +++++++-------
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/spec/support/matchers/each.rb b/spec/support/matchers/each.rb
+index 677632a..e7b09a9 100644
+--- a/spec/support/matchers/each.rb
++++ b/spec/support/matchers/each.rb
+@@ -6,7 +6,7 @@ RSpec::Matchers.define :each do |check|
+ end
+ end
+
+- failure_message_for_should do |actual|
++ failure_message do |actual|
+ "at[#{@object}] #{check.failure_message_for_should}"
+ end
+ end
+diff --git a/spec/unit/varia_model_spec.rb b/spec/unit/varia_model_spec.rb
+index aec8c07..a04c1b5 100644
+--- a/spec/unit/varia_model_spec.rb
++++ b/spec/unit/varia_model_spec.rb
+@@ -23,19 +23,19 @@ describe VariaModel do
+ subject.attribute 'jamie.winsor'
+ subject.attribute 'brooke.winsor'
+
+- expect(subject.attributes).to have(2).items
++ expect(subject.attributes.size).to eq(2)
+ end
+
+ it "adds a validation if :required option is true" do
+ subject.attribute 'brooke.winsor', required: true
+
+- expect(subject.validations).to have(1).item
++ expect(subject.validations.size).to eq(1)
+ end
+
+ it "adds a validation if the :type option is provided" do
+ subject.attribute 'brooke.winsor', type: :string
+
+- expect(subject.validations).to have(1).item
++ expect(subject.validations.size).to eq(1)
+ end
+
+ it "sets a default value if :default option is provided" do
+@@ -399,13 +399,13 @@ describe VariaModel do
+ it "adds an error for each attribute that fails validations" do
+ subject.validate
+
+- expect(subject.errors).to have(1).item
++ expect(subject.errors.size).to eq(1)
+ end
+
+ it "adds a message for each failed validation" do
+ subject.validate
+
+- expect(subject.errors['brooke.winsor']).to have(1).item
++ expect(subject.errors['brooke.winsor'].size).to eq(1)
+ expect(subject.errors['brooke.winsor'][0]).to eql("A value is required for attribute: 'brooke.winsor'")
+ end
+ end
+@@ -428,8 +428,8 @@ describe VariaModel do
+ it "adds an error if it fails validation" do
+ subject.validate
+
+- expect(subject.errors).to have(1).item
+- expect(subject.errors['brooke.winsor']).to have(1).item
++ expect(subject.errors.size).to eq(1)
++ expect(subject.errors['brooke.winsor'].size).to eq(1)
+ expect(subject.errors['brooke.winsor'][0]).to eql("Expected attribute: 'brooke.winsor' to be a type of: 'String', 'NilClass'")
+ end
+ end
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..5a4d025
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+0001-Don-t-require-hashie-hash_extensions-support-hashie-.patch
+0002-Don-t-change-LOAD_PATH-in-tests.patch
+0003-Convert-specs-to-RSpec-3.3.2-syntax-with-Transpec.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-varia-model.git
More information about the Pkg-ruby-extras-commits
mailing list