-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathRakefile
executable file
·46 lines (35 loc) · 1.07 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
begin
require 'bundler/setup'
rescue LoadError
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end
Bundler.setup(ENV['RAILS_ENV'] || :default)
APP_RAKEFILE = File.expand_path('../test/dummy/Rakefile', __FILE__)
#load 'rails/tasks/engine.rake'
load 'rails/tasks/engine.rake'
load 'rails/tasks/statistics.rake'
Bundler::GemHelper.install_tasks
desc "Generate and deploy all docs"
task docs: ['guides:generate', 'guides:deploy'] do
pwd = Dir.pwd
system('bundle exec yardoc')
system("cp -r #{pwd}/docs/ruby /tmp/ruby")
Dir.chdir '/tmp/ruby' do
system('git init')
system('git remote add origin git@github.com:Yellowen/faalis_apidoc.git')
system('git checkout -b gh-pages')
system('echo "api.faalis.io" > CNAME')
system('git add .')
system('git commit -a -m "new release"')
system('git push origin gh-pages -f')
end
system("rm -rf /tmp/ruby ")
end
require 'rake/testtask'
Rake::TestTask.new(:test) do |t|
t.libs << 'lib'
t.libs << 'test'
t.pattern = 'test/**/*_test.rb'
t.verbose = false
end
task default: :test