[DRE-commits] [ruby-vcr] 03/03: Enabling tests and patches
Balasankar C
balasankarc-guest at moszumanska.debian.org
Fri May 15 18:08:28 UTC 2015
This is an automated email from the git hooks/post-receive script.
balasankarc-guest pushed a commit to branch master
in repository ruby-vcr.
commit 9273f154cbe3788a2325869f7af5f1dee1989e6f
Author: Balasankar C <balasankarc at autistici.org>
Date: Fri May 15 23:37:51 2015 +0530
Enabling tests and patches
---
debian/patches/color | 16 ++++++++++++++++
debian/patches/coveralls | 38 ++++++++++++++++++++++++++++++++++++++
debian/patches/git-test | 35 +++++++++++++++++++++++++++++++++++
debian/patches/series | 3 +++
debian/ruby-tests.rake | 4 +---
5 files changed, 93 insertions(+), 3 deletions(-)
diff --git a/debian/patches/color b/debian/patches/color
new file mode 100644
index 0000000..ad3529e
--- /dev/null
+++ b/debian/patches/color
@@ -0,0 +1,16 @@
+Description: Fix RSpec configuration
+ RSpec 3.0 uses config.color instead of config.color_enabled
+Last-Update: 2015-05-15
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/spec/spec_helper.rb
++++ b/spec/spec_helper.rb
+@@ -53,7 +53,7 @@
+
+ RSpec.configure do |config|
+ config.order = :rand
+- config.color_enabled = true
++ config.color = true
+
+ config.expect_with :rspec do |expectations|
+ expectations.syntax = :expect
diff --git a/debian/patches/coveralls b/debian/patches/coveralls
new file mode 100644
index 0000000..b4e9b30
--- /dev/null
+++ b/debian/patches/coveralls
@@ -0,0 +1,38 @@
+Description: Remove coverall dependency
+ Remove usage of coveralls
+Last-Update: 2015-05-15
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/spec/spec_helper.rb
++++ b/spec/spec_helper.rb
+@@ -1,30 +1,5 @@
+ require 'rubygems'
+
+-using_git = File.exist?(File.expand_path('../../.git/', __FILE__))
+-require 'bundler/setup' if using_git
+-
+-if RUBY_VERSION.to_f >= 1.9 && RUBY_ENGINE == 'ruby'
+- require 'simplecov'
+-
+- SimpleCov.start do
+- add_filter "/spec"
+- add_filter "/features"
+- add_filter "/bin"
+- add_filter "/bundle"
+-
+- # internet_connection mostly contains logic copied from the ruby 1.8.7
+- # stdlib for which I haven't written tests.
+- add_filter "internet_connection"
+- end
+-
+- SimpleCov.at_exit do
+- File.open(File.join(SimpleCov.coverage_path, 'coverage_percent.txt'), 'w') do |f|
+- f.write SimpleCov.result.covered_percent
+- end
+- SimpleCov.result.format!
+- end
+-end
+-
+ require 'rspec'
+
+ require "support/fixnum_extension"
diff --git a/debian/patches/git-test b/debian/patches/git-test
new file mode 100644
index 0000000..4569062
--- /dev/null
+++ b/debian/patches/git-test
@@ -0,0 +1,35 @@
+Description: Disable git based tests
+ Disable the tests that assume that the source uses a git based structure.
+Last-Update: 2015-05-15
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/spec/quality_spec.rb
++++ b/spec/quality_spec.rb
+@@ -36,16 +36,16 @@
+ end
+ end
+
+- it "has no malformed whitespace" do
+- error_messages = []
+- Dir.chdir(File.expand_path("../..", __FILE__)) do
+- `git ls-files`.split("\n").each do |filename|
+- next if filename =~ /vendor|.feature|.yml|.gitmodules/
+- error_messages << check_for_tab_characters(filename)
+- error_messages << check_for_extra_spaces(filename)
+- end
+- end
+- expect(error_messages.compact).to be_well_formed
+- end
++# it "has no malformed whitespace" do
++ #error_messages = []
++ #Dir.chdir(File.expand_path("../..", __FILE__)) do
++ #`git ls-files`.split("\n").each do |filename|
++ #next if filename =~ /vendor|.feature|.yml|.gitmodules/
++ #error_messages << check_for_tab_characters(filename)
++ #error_messages << check_for_extra_spaces(filename)
++ #end
++ #end
++ #expect(error_messages.compact).to be_well_formed
++ #end
+ end
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..249de9a
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,3 @@
+git-test
+color
+coveralls
diff --git a/debian/ruby-tests.rake b/debian/ruby-tests.rake
index 393e0e4..99987ae 100644
--- a/debian/ruby-tests.rake
+++ b/debian/ruby-tests.rake
@@ -1,9 +1,7 @@
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |spec|
- #spec.ruby_opts = "-I./spec -r./spec/capture_warnings -rspec_helper"
- spec.ruby_opts = "-I./spec -rspec_helper"
- spec.pattern = './spec/**/*_spec.rb'
+ spec.pattern = './spec/*_spec.rb'
end
task :default => :spec
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-vcr.git
More information about the Pkg-ruby-extras-commits
mailing list