public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in dev-ruby/rspec-mocks/files: rspec-mocks-2.4.0-no-cucumber.patch
@ 2011-02-02 14:13 Diego Petteno (flameeyes)
  0 siblings, 0 replies; 2+ messages in thread
From: Diego Petteno (flameeyes) @ 2011-02-02 14:13 UTC (permalink / raw
  To: gentoo-commits

flameeyes    11/02/02 14:13:26

  Added:                rspec-mocks-2.4.0-no-cucumber.patch
  Log:
  Don't force cucumber presence and add ruby19 support.
  
  (Portage version: 2.2.0_alpha19/cvs/Linux x86_64)

Revision  Changes    Path
1.1                  dev-ruby/rspec-mocks/files/rspec-mocks-2.4.0-no-cucumber.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ruby/rspec-mocks/files/rspec-mocks-2.4.0-no-cucumber.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-ruby/rspec-mocks/files/rspec-mocks-2.4.0-no-cucumber.patch?rev=1.1&content-type=text/plain

Index: rspec-mocks-2.4.0-no-cucumber.patch
===================================================================
From 3bb79545449eda5361af6b6d1902e70833659445 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes@gmail.com>
Date: Wed, 2 Feb 2011 15:02:26 +0100
Subject: [PATCH] Don't force cucumber presence on Rakefile.

Only define the cucumber tasks if cucumber is available, allowing for the
Rakefile to work without Cucumber installed.
---
 Rakefile |   49 +++++++++++++++++++++++++++----------------------
 1 files changed, 27 insertions(+), 22 deletions(-)

diff --git a/Rakefile b/Rakefile
index 8171c40..7197927 100644
--- a/Rakefile
+++ b/Rakefile
@@ -5,15 +5,6 @@ Bundler::GemHelper.install_tasks
 require 'rake'
 require 'rspec/core/rake_task'
 require 'rspec/mocks/version'
-require 'cucumber/rake/task'
-
-class Cucumber::Rake::Task::ForkedCucumberRunner
-  # When cucumber shells out, we still need it to run in the context of our
-  # bundle.
-  def run
-    sh "bundle exec #{RUBY} " + args.join(" ")
-  end
-end
 
 task :cleanup_rcov_files do
   rm_rf 'coverage.data'
@@ -24,8 +15,6 @@ RSpec::Core::RakeTask.new(:spec) do |t|
   t.rspec_opts = %w[--color]
 end
 
-Cucumber::Rake::Task.new(:cucumber)
-
 namespace :spec do
   desc "Run all examples using rcov"
   RSpec::Core::RakeTask.new :rcov => :cleanup_rcov_files do |t|
@@ -35,17 +24,35 @@ namespace :spec do
   end
 end
 
-namespace :cucumber do
-  desc "Run cucumber features using rcov"
-  Cucumber::Rake::Task.new :rcov => :cleanup_rcov_files do |t|
-    t.cucumber_opts = %w{--format progress}
-    t.rcov = true
-    t.rcov_opts =  %[-Ilib -Ispec --exclude "gems/*,features"]
-    t.rcov_opts << %[--text-report --sort coverage --aggregate coverage.data]
+task :default => :spec
+
+begin
+  require 'cucumber/rake/task'
+
+  class Cucumber::Rake::Task::ForkedCucumberRunner
+    # When cucumber shells out, we still need it to run in the context of our
+    # bundle.
+    def run
+      sh "bundle exec #{RUBY} " + args.join(" ")
+    end
   end
-end
 
-task :default => [:spec, :cucumber]
+  Cucumber::Rake::Task.new(:cucumber)
+
+  namespace :cucumber do
+    desc "Run cucumber features using rcov"
+    Cucumber::Rake::Task.new :rcov => :cleanup_rcov_files do |t|
+      t.cucumber_opts = %w{--format progress}
+      t.rcov = true
+      t.rcov_opts =  %[-Ilib -Ispec --exclude "gems/*,features"]
+      t.rcov_opts << %[--text-report --sort coverage --aggregate coverage.data]
+    end
+  end
+
+  task :default => :cucumber
+rescue LoadError
+  $stderr.puts "unable to load cucumber, some tasks unavailable"
+end
 
 task :clobber do
   rm_rf 'pkg'
@@ -66,5 +73,3 @@ task :relish, :version do |t, args|
   raise "rake relish[VERSION]" unless args[:version]
   sh "relish push rspec/rspec-mocks:#{args[:version]}"
 end
-
-task :default => [:spec, :cucumber]
-- 
1.7.4







^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] gentoo-x86 commit in dev-ruby/rspec-mocks/files: rspec-mocks-2.4.0-no-cucumber.patch
@ 2014-11-18 12:00 Manuel Rueger (mrueg)
  0 siblings, 0 replies; 2+ messages in thread
From: Manuel Rueger (mrueg) @ 2014-11-18 12:00 UTC (permalink / raw
  To: gentoo-commits

mrueg       14/11/18 12:00:00

  Removed:              rspec-mocks-2.4.0-no-cucumber.patch
  Log:
  Cleanup patches.
  
  (Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key )


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-11-18 12:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-18 12:00 [gentoo-commits] gentoo-x86 commit in dev-ruby/rspec-mocks/files: rspec-mocks-2.4.0-no-cucumber.patch Manuel Rueger (mrueg)
  -- strict thread matches above, loose matches on Subject: below --
2011-02-02 14:13 Diego Petteno (flameeyes)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox