Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 79 lines (70 sloc) 2.134 kb
ade5068 @karmi Initial commit; empty Bundler gem
authored
1 require 'bundler'
2 Bundler::GemHelper.install_tasks
6a92423 @karmi Cleanup .gemspec; Add License and Readme; Add Rake tasks
authored
3
4 task :default => :test
5
6 require 'rake/testtask'
7 Rake::TestTask.new(:test) do |test|
8 test.libs << 'lib' << 'test'
2a13174 @karmi [TEST] Correct class names for integration tests, change test Rake ta…
authored
9 test.test_files = FileList['test/unit/*_test.rb', 'test/integration/*_test.rb']
6a92423 @karmi Cleanup .gemspec; Add License and Readme; Add Rake tasks
authored
10 test.verbose = true
2a13174 @karmi [TEST] Correct class names for integration tests, change test Rake ta…
authored
11 # test.warning = true
6a92423 @karmi Cleanup .gemspec; Add License and Readme; Add Rake tasks
authored
12 end
13
4be93d1 @karmi Moved all tests to test/unit and added Rake task accordingly
authored
14 namespace :test do
15 Rake::TestTask.new(:unit) do |test|
16 test.libs << 'lib' << 'test'
f908d42 @karmi Refactor Rakefile, so `rdoc` and `rcov` are optional (eg. for CI)
authored
17 test.test_files = FileList["test/unit/*_test.rb"]
4be93d1 @karmi Moved all tests to test/unit and added Rake task accordingly
authored
18 test.verbose = true
19 end
6adebbf @karmi Added infrastructure for integration tests
authored
20 Rake::TestTask.new(:integration) do |test|
21 test.libs << 'lib' << 'test'
f908d42 @karmi Refactor Rakefile, so `rdoc` and `rcov` are optional (eg. for CI)
authored
22 test.test_files = FileList["test/integration/*_test.rb"]
6adebbf @karmi Added infrastructure for integration tests
authored
23 test.verbose = true
24 end
4be93d1 @karmi Moved all tests to test/unit and added Rake task accordingly
authored
25 end
26
44213de @karmi Added RCov tasks and scented RDoc with SDoc
authored
27 # Generate documentation
f908d42 @karmi Refactor Rakefile, so `rdoc` and `rcov` are optional (eg. for CI)
authored
28 begin
ef6145c @michaelklishin Require rdoc before sdoc, otherwise any rake operation fails
michaelklishin authored
29 require 'rdoc'
f908d42 @karmi Refactor Rakefile, so `rdoc` and `rcov` are optional (eg. for CI)
authored
30 require 'rdoc/task'
31 Rake::RDocTask.new do |rdoc|
32 rdoc.rdoc_dir = 'rdoc'
33 rdoc.title = "Tire"
34 rdoc.rdoc_files.include('README.markdown')
35 rdoc.rdoc_files.include('lib/**/*.rb')
36 end
37 rescue LoadError
38 task :rdoc do
39 abort "[!] RDoc gem is not available."
40 end
6a92423 @karmi Cleanup .gemspec; Add License and Readme; Add Rake tasks
authored
41 end
44213de @karmi Added RCov tasks and scented RDoc with SDoc
authored
42
43 # Generate coverage reports
44 begin
45 require 'rcov/rcovtask'
46 Rcov::RcovTask.new do |test|
47 test.libs << 'test'
48 test.rcov_opts = ['--exclude', 'gems/*']
49 test.pattern = 'test/**/*_test.rb'
50 test.verbose = true
51 end
52 rescue LoadError
53 task :rcov do
f908d42 @karmi Refactor Rakefile, so `rdoc` and `rcov` are optional (eg. for CI)
authored
54 abort "[!] RCov gem is not available."
44213de @karmi Added RCov tasks and scented RDoc with SDoc
authored
55 end
56 end
ae131a5 @karmi Added Rake task to generate website/documentation with Rocco [http://…
authored
57
58 namespace :web do
59
ad8b38f @karmi Added file with the full DSL example, used for documentation/website
authored
60 desc "Update the Github website"
61 task :update => :generate do
ae131a5 @karmi Added Rake task to generate website/documentation with Rocco [http://…
authored
62 current_branch = `git branch --no-color`.split("\n").select { |line| line =~ /^\* / }.to_s.gsub(/\* (.*)/, '\1')
63 (puts "Unable to determine current branch"; exit(1) ) unless current_branch
9dd4fb7 @karmi Updated the`web:generate` Rake task
authored
64 system "git checkout web"
19e570b @karmi [GEM] Updated gem name to "tire" and renamed all files from "slingsho…
authored
65 system "cp examples/tire-dsl.html index.html"
66 system "git add index.html && git co -m 'Updated Tire website'"
ae131a5 @karmi Added Rake task to generate website/documentation with Rocco [http://…
authored
67 system "git push origin web:gh-pages -f"
9dd4fb7 @karmi Updated the`web:generate` Rake task
authored
68 system "git checkout #{current_branch}"
ae131a5 @karmi Added Rake task to generate website/documentation with Rocco [http://…
authored
69 end
ad8b38f @karmi Added file with the full DSL example, used for documentation/website
authored
70
71 desc "Generate the Rocco documentation page"
72 task :generate do
19e570b @karmi [GEM] Updated gem name to "tire" and renamed all files from "slingsho…
authored
73 system "rocco examples/tire-dsl.rb"
9dd4fb7 @karmi Updated the`web:generate` Rake task
authored
74 html = File.read('examples/tire-dsl.html').gsub!(/>tire\-dsl\.rb</, '>tire.rb<')
19e570b @karmi [GEM] Updated gem name to "tire" and renamed all files from "slingsho…
authored
75 File.open('examples/tire-dsl.html', 'w') { |f| f.write html }
76 system "open examples/tire-dsl.html"
ad8b38f @karmi Added file with the full DSL example, used for documentation/website
authored
77 end
ae131a5 @karmi Added Rake task to generate website/documentation with Rocco [http://…
authored
78 end
Something went wrong with that request. Please try again.