Class: RightSupport::CI::RakeTask Deprecated
- Includes:
- Rake::DSL
- Defined in:
- lib/right_support/ci/rake_task.rb
Overview
Deprecated.
Please do not use this class
A Rake task definition that creates a CI namespace with appropriate tests.
Instance Attribute Summary collapse
-
#ci_namespace ⇒ Object
The namespace in which to define the continuous integration tasks.
-
#output_path ⇒ Object
The base directory for output files.
Instance Method Summary collapse
-
#initialize(*args) {|_self| ... } ⇒ RakeTask
constructor
A new instance of RakeTask.
Constructor Details
#initialize(*args) {|_self| ... } ⇒ RakeTask
Returns a new instance of RakeTask.
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/right_support/ci/rake_task.rb', line 48 def initialize(*args) @ci_namespace = args.shift || :ci yield self if block_given? @output_path ||= 'measurement' namespace @ci_namespace do task :prep do FileUtils.mkdir_p(@output_path) FileUtils.mkdir_p(File.join(@output_path, 'rspec')) FileUtils.mkdir_p(File.join(@output_path, 'cucumber')) end if require_succeeds?('rspec/core/rake_task') # RSpec 2 desc "Run RSpec examples" RSpec::Core::RakeTask.new(:spec => :prep) do |t| t.rspec_opts = ['-r', 'right_support/ci', '-f', JavaSpecFormatter.name, '-o', File.join(@output_path, 'rspec', 'rspec.xml')] end elsif require_succeeds?('spec/rake/spectask') # RSpec 1 Spec::Rake::SpecTask.new(:spec => :prep) do |t| desc "Run RSpec Examples" t.spec_opts = ['-r', 'right_support/ci', '-f', JavaSpecFormatter.name + ":" + File.join(@output_path, 'rspec', 'rspec.xml')] end end if require_succeeds?('cucumber/rake/task') desc "Run Cucumber features" Cucumber::Rake::Task.new do |t| t.cucumber_opts = ['--no-color', '--format', JavaCucumberFormatter.name, '--out', File.join(@output_path, 'cucumber')] end task :cucumber => [:prep] end end end |
Instance Attribute Details
#ci_namespace ⇒ Object
The namespace in which to define the continuous integration tasks.
Default :ci
41 42 43 |
# File 'lib/right_support/ci/rake_task.rb', line 41 def ci_namespace @ci_namespace end |
#output_path ⇒ Object
The base directory for output files.
Default ‘measurement’
46 47 48 |
# File 'lib/right_support/ci/rake_task.rb', line 46 def output_path @output_path end |