Sha256: 1d825618ceff287db705ccae0fecf0c612fd8fa951e1487e1412928aed6305b0

Contents?: true

Size: 1.56 KB

Versions: 13

Compression:

Stored size: 1.56 KB

Contents

# this is in a separate rakefile because our main one depends on the bundled gems
# already being installed.  This must be able to run w/o bundled gems installed.

def rake(command = "")
  sh "rake #{command}"
end

desc "Run a full build: install necessary gems with bundler, runs specs, run cukes"
task :build => :bundle_install do
  rake
end

desc "Install necessary gems with bundler and runs specs"
task :spec => :bundle_install do
  rake "spec"
end

desc "Install necessary gems with bundler and runs cukes"
task :cucumber => :bundle_install do
  rake "cucumber"
end

desc "Prints description of current ruby interpreter"
task :print_ruby_description do
  description = if defined?(RUBY_DESCRIPTION)
    RUBY_DESCRIPTION
  else
    # RUBY_DESCRIPTION is undefined on 1.8.6
    "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE} patchlevel #{RUBY_PATCHLEVEL}) [#{RUBY_PLATFORM}]"
  end

  puts
  puts "=" * 80
  puts "Using #{description}"
  puts "=" * 80
  puts
end

task :bundle_install => :ensure_bundler_installed do
  # Unfortunately, there is no version of ruby-debug that installs cleanly on 1.9.1 and 1.9.2.
  # Our Gemfile specifies different versions using conditionals, but we still need to bundle update
  # to get bundler to use the different versions.
  if RUBY_VERSION =~ /^1\.9/
    sh "bundle update ruby-debug-base19"
  end

  sh "bundle install"
end

task :ensure_bundler_installed => :print_ruby_description do
  installed = begin
    require 'rubygems'
    require 'bundler'
    true
  rescue LoadError
    false
  end

  unless installed
    sh "gem install bundler"
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
messagebus_ruby_api-0.4.7 spec/ruby/1.9.1/gems/rspec-core-2.5.1/script/FullBuildRakeFile
messagebus_ruby_api-0.4.4 spec/ruby/1.9.1/gems/rspec-core-2.5.1/script/FullBuildRakeFile
rspec-core-2.6.4 script/FullBuildRakeFile
rspec-core-2.6.3 script/FullBuildRakeFile
rspec-core-2.6.3.beta1 script/FullBuildRakeFile
rspec-core-2.6.2.rc script/FullBuildRakeFile
rspec-core-2.6.0 script/FullBuildRakeFile
rspec-core-2.6.0.rc6 script/FullBuildRakeFile
rspec-core-2.5.2 script/FullBuildRakeFile
rspec-core-2.6.0.rc4 script/FullBuildRakeFile
rspec-core-2.6.0.rc2 script/FullBuildRakeFile
rspec-core-2.5.1 script/FullBuildRakeFile
rspec-core-2.5.0 script/FullBuildRakeFile