Skip to content
Newer
Older
100644 23 lines (18 sloc) 946 Bytes
9084398 @saberma init rails.
saberma authored
1 # Add your own tasks in files placed in lib/tasks ending in .rake,
2 # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
4 require File.expand_path('../config/application', __FILE__)
5 require 'rake'
6
6fd77b1 @saberma add resque rake.
saberma authored
7 require 'resque/tasks'
06c526c @saberma move index operation to resque job.
saberma authored
8 require 'resque_scheduler/tasks'
f9dfb48 @saberma generate theme archieve file. #149.
saberma authored
9 task "resque:setup" => :environment do
10 Resque.before_fork = Proc.new { ActiveRecord::Base.establish_connection } # 第二次执行resque任务时失败 PGError: ERROR: prepared statement "a3" already exists 参考 http://j.mp/rpVqhc http://j.mp/rqj9CQ ;Rails已经打了补丁,未发布版本 http://j.mp/ntPQMr
11 end
6fd77b1 @saberma add resque rake.
saberma authored
12
ed2965d @saberma try to use travis xvfb 2.
saberma authored
13 task :travis do
14 #["rspec spec", "rake jasmine:ci", "rake cucumber"].each do |cmd|
15 ["rspec spec/requests/shopqi/login_spec.rb"].each do |cmd|
16 puts "Starting to run #{cmd}..."
17 system("export DISPLAY=:99.0 && bundle exec #{cmd}")
18 raise "#{cmd} failed!" unless $?.exitstatus == 0
19 end
20 end
21
6fd77b1 @saberma add resque rake.
saberma authored
22 Shopqi::Application.load_tasks
Something went wrong with that request. Please try again.