Rakefile in comable_backend-0.1.0 vs Rakefile in comable_backend-0.2.0
- old
+ new
@@ -4,26 +4,24 @@
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end
require 'rdoc/task'
-$LOAD_PATH.unshift File.expand_path('..', __FILE__)
-require 'tasks/release'
-
RDoc::Task.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'Comable'
rdoc.options << '--line-numbers'
rdoc.rdoc_files.include('lib/**/*.rb')
end
-if ENV['COMABLE_NESTED']
- task default: ['app:spec', 'rubocop']
-else
- APP_RAKEFILE = File.expand_path('../spec/dummy/Rakefile', __FILE__)
- load 'rails/tasks/engine.rake'
+APP_RAKEFILE = File.expand_path('../spec/dummy/Rakefile', __FILE__)
+load 'rails/tasks/engine.rake'
+if File.exist?('comable.gemspec')
+ $LOAD_PATH.unshift File.expand_path('..', __FILE__)
+ require 'tasks/release'
+
namespace :app do
namespace :spec do
desc 'Run the code examples'
RSpec::Core::RakeTask.new(:all) do |t|
FRAMEWORKS.each do |framework|
@@ -45,11 +43,11 @@
task 'app:db:migrate' => 'migrate:all'
namespace :migrate do
task :all do
FRAMEWORKS.each do |framework|
- command = "cd #{framework} && test -d db && bundle exec rake db:migrate RAILS_ENV=#{Rails.env} COMABLE_NESTED=true"
+ command = "cd #{framework} && test -d db && bundle exec rake db:migrate RAILS_ENV=#{Rails.env}"
puts command
system command
end
end
end
@@ -60,20 +58,22 @@
task 'app:db:migrate' => 'reset:all'
namespace :reset do
task :all do
FRAMEWORKS.each do |framework|
- command = "cd #{framework} && test -d db && bundle exec rake db:migrate:reset RAILS_ENV=#{Rails.env} COMABLE_NESTED=true"
+ command = "cd #{framework} && test -d db && bundle exec rake db:migrate:reset RAILS_ENV=#{Rails.env}"
puts command
system command
end
end
end
end
end
task default: ['app:spec:all', 'rubocop']
end
+
+task default: ['app:spec', 'rubocop']
Bundler::GemHelper.install_tasks
# from https://github.com/rspec/rspec-rails/issues/936
task 'test:prepare'