Sha256: ae8824b4fdfafdb87077101cf2a47442651ce543f9f2531b4f7a63effdbb000c

Contents?: true

Size: 924 Bytes

Versions: 19

Compression:

Stored size: 924 Bytes

Contents

$:.push File.expand_path('../lib', __FILE__)
require 'bundler'

def load_library_env
  lib_name =  ENV['SPREE_BUILD'] ? 'spree-returnly' : 'solidus-returnly'

  puts "Loading #{lib_name}"

  Bundler::GemHelper.install_tasks name: lib_name
end


load_library_env

begin
  require 'spree/testing_support/extension_rake'
  require 'rspec/core/rake_task'

  RSpec::Core::RakeTask.new(:spec)

  task default: %i(first_run spec)
rescue LoadError
  # no rspec available
end

task :first_run do
  if Dir['spec/dummy'].empty?
    Rake::Task[:test_app].invoke
    Dir.chdir('../../')
  end
end

task :both_releases do
  %w(spree-returnly solidus-returnly).each do |lib_name|
    Bundler::GemHelper.install_tasks name: lib_name
    Rake::Task[:release].invoke
  end

  load_library_env
end

desc 'Generates a dummy app for testing'
task :test_app do
  ENV['LIB_NAME'] = 'solidus-returnly'
  Rake::Task['extension:test_app'].invoke
end

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
spree-returnly-0.13.1 Rakefile
solidus-returnly-0.13.1 Rakefile
spree-returnly-0.13.0 Rakefile
solidus-returnly-0.13.0 Rakefile
solidus-returnly-0.12.0 Rakefile
solidus-returnly-0.11.0 Rakefile
solidus-returnly-0.10.0 Rakefile
solidus-returnly-0.9.0 Rakefile
solidus-returnly-0.8.1 Rakefile
solidus-returnly-0.8.0 Rakefile
solidus-returnly-0.7.1 Rakefile
solidus-returnly-0.7.0 Rakefile
solidus-returnly-0.6.2 Rakefile
solidus-returnly-0.6.1 Rakefile
solidus-returnly-0.6.0 Rakefile
solidus-returnly-0.5.1 Rakefile
solidus-returnly-0.5.0 Rakefile
solidus-returnly-0.5.0.rc1 Rakefile
solidus-returnly-0.5.0.pre Rakefile