2010-03-29 22:01:47 +00:00
|
|
|
require File.expand_path('../config/application', __FILE__)
|
|
|
|
|
2011-06-29 01:05:07 +00:00
|
|
|
require 'rubygems'
|
|
|
|
|
2011-07-10 17:59:54 +00:00
|
|
|
require 'rake/dsl_definition'
|
2010-03-29 22:01:47 +00:00
|
|
|
require 'rake'
|
2011-06-29 01:05:07 +00:00
|
|
|
require 'rdoc/task'
|
|
|
|
require 'rubygems/package_task'
|
2010-03-29 22:01:47 +00:00
|
|
|
|
2010-07-30 00:13:44 +00:00
|
|
|
Locomotive::Application.load_tasks
|
2010-06-03 15:32:40 +00:00
|
|
|
|
2010-09-28 06:04:40 +00:00
|
|
|
gemspec = eval(File.read('locomotive_cms.gemspec'))
|
2011-06-29 01:05:07 +00:00
|
|
|
Gem::PackageTask.new(gemspec) do |pkg|
|
2010-09-28 06:04:40 +00:00
|
|
|
pkg.gem_spec = gemspec
|
2010-06-03 15:32:40 +00:00
|
|
|
end
|
|
|
|
|
2011-06-29 01:05:07 +00:00
|
|
|
desc 'build the gem and release it to rubygems.org'
|
2010-09-28 06:04:40 +00:00
|
|
|
task :release => :gem do
|
2011-06-29 01:05:07 +00:00
|
|
|
sh "gem push pkg/custom_fields-#{gemspec.version}.gem"
|
2011-02-12 19:22:11 +00:00
|
|
|
end
|
|
|
|
|
2011-07-04 13:43:05 +00:00
|
|
|
task :default => [:spec, :cucumber]
|
2011-08-13 23:24:02 +00:00
|
|
|
|
|
|
|
# only for running the tests suite in the order observed in *nix systems
|
|
|
|
task :spec_nix do
|
|
|
|
files = %w(
|
|
|
|
lib/core_ext_spec.rb
|
|
|
|
lib/locomotive/routing/site_dispatcher_spec.rb
|
|
|
|
lib/locomotive/bushido_spec.rb
|
|
|
|
lib/locomotive/render_spec.rb
|
|
|
|
lib/locomotive/httparty/patches_spec.rb
|
|
|
|
lib/locomotive/httparty/webservice_spec.rb
|
|
|
|
lib/locomotive/configuration_spec.rb
|
|
|
|
lib/locomotive/liquid/tags/consume_spec.rb
|
|
|
|
lib/locomotive/liquid/tags/with_scope_spec.rb
|
|
|
|
lib/locomotive/liquid/tags/nav_spec.rb
|
|
|
|
lib/locomotive/liquid/tags/editable/content_spec.rb
|
|
|
|
lib/locomotive/liquid/tags/editable/short_text_spec.rb
|
|
|
|
lib/locomotive/liquid/tags/seo_spec.rb
|
|
|
|
lib/locomotive/liquid/tags/paginate_spec.rb
|
|
|
|
lib/locomotive/liquid/drops/content_spec.rb
|
|
|
|
lib/locomotive/liquid/drops/contents_spec.rb
|
|
|
|
lib/locomotive/liquid/drops/page_spec.rb
|
|
|
|
lib/locomotive/liquid/drops/site_spec.rb
|
|
|
|
lib/locomotive/liquid/filters/resize_spec.rb
|
|
|
|
lib/locomotive/liquid/filters/html_spec.rb
|
|
|
|
lib/locomotive/liquid/filters/date_spec.rb
|
|
|
|
lib/locomotive/liquid/filters/text_spec.rb
|
|
|
|
lib/locomotive/liquid/filters/misc_spec.rb
|
|
|
|
lib/locomotive/heroku_spec.rb
|
|
|
|
lib/locomotive/import_spec.rb
|
|
|
|
lib/locomotive/export_spec.rb
|
|
|
|
models/content_instance_spec.rb
|
|
|
|
models/editable_element_spec.rb
|
|
|
|
models/account_spec.rb
|
|
|
|
models/content_type_spec.rb
|
|
|
|
models/snippet_spec.rb
|
|
|
|
models/ability_spec.rb
|
|
|
|
models/membership_spec.rb
|
|
|
|
models/page_spec.rb
|
|
|
|
models/asset_spec.rb
|
|
|
|
models/theme_asset_spec.rb
|
|
|
|
models/site_spec.rb
|
|
|
|
cells/admin/main_menu_cell_spec.rb
|
|
|
|
cells/admin/global_actions_spec.rb
|
|
|
|
cells/admin/settings_menu_cell_spec.rb
|
|
|
|
requests/seo_trailing_slash_spec.rb
|
|
|
|
).collect { |f| File.join('spec', f) }.join(' ')
|
|
|
|
|
|
|
|
sh "bundle exec rspec #{files}"
|
2011-10-17 14:55:09 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
task :travis do
|
2011-10-17 15:53:21 +00:00
|
|
|
["rspec spec", "cucumber -b"].each do |cmd|
|
2011-10-17 14:55:09 +00:00
|
|
|
puts "Starting to run #{cmd}..."
|
|
|
|
system("export DISPLAY=:99.0 && bundle exec #{cmd}")
|
|
|
|
raise "#{cmd} failed!" unless $?.exitstatus == 0
|
|
|
|
end
|
|
|
|
end
|