Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 73 lines (64 sloc) 2.072 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'
17 test.pattern = 'test/unit/*_test.rb'
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'
22 test.pattern = 'test/integration/*_test.rb'
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
7cbb1f5 @karmi [GEM] Added "rdoc" as dependency and updated requiring RDoc tasks
authored
28 begin; require 'sdoc'; rescue LoadError; end
29 require 'rdoc/task'
6a92423 @karmi Cleanup .gemspec; Add License and Readme; Add Rake tasks
authored
30 Rake::RDocTask.new do |rdoc|
31 rdoc.rdoc_dir = 'rdoc'
19e570b @karmi [GEM] Updated gem name to "tire" and renamed all files from "slingsho…
authored
32 rdoc.title = "Tire"
6a92423 @karmi Cleanup .gemspec; Add License and Readme; Add Rake tasks
authored
33 rdoc.rdoc_files.include('README.rdoc')
34 rdoc.rdoc_files.include('lib/**/*.rb')
35 end
44213de @karmi Added RCov tasks and scented RDoc with SDoc
authored
36
37 # Generate coverage reports
38 begin
39 require 'rcov/rcovtask'
40 Rcov::RcovTask.new do |test|
41 test.libs << 'test'
42 test.rcov_opts = ['--exclude', 'gems/*']
43 test.pattern = 'test/**/*_test.rb'
44 test.verbose = true
45 end
46 rescue LoadError
47 task :rcov do
48 abort "RCov is not available. In order to run rcov, you must: sudo gem install rcov"
49 end
50 end
ae131a5 @karmi Added Rake task to generate website/documentation with Rocco [http://…
authored
51
52 namespace :web do
53
ad8b38f @karmi Added file with the full DSL example, used for documentation/website
authored
54 desc "Update the Github website"
55 task :update => :generate do
ae131a5 @karmi Added Rake task to generate website/documentation with Rocco [http://…
authored
56 current_branch = `git branch --no-color`.split("\n").select { |line| line =~ /^\* / }.to_s.gsub(/\* (.*)/, '\1')
57 (puts "Unable to determine current branch"; exit(1) ) unless current_branch
9dd4fb7 @karmi Updated the`web:generate` Rake task
authored
58 system "git checkout web"
19e570b @karmi [GEM] Updated gem name to "tire" and renamed all files from "slingsho…
authored
59 system "cp examples/tire-dsl.html index.html"
60 system "git add index.html && git co -m 'Updated Tire website'"
ae131a5 @karmi Added Rake task to generate website/documentation with Rocco [http://…
authored
61 system "git push origin web:gh-pages -f"
9dd4fb7 @karmi Updated the`web:generate` Rake task
authored
62 system "git checkout #{current_branch}"
ae131a5 @karmi Added Rake task to generate website/documentation with Rocco [http://…
authored
63 end
ad8b38f @karmi Added file with the full DSL example, used for documentation/website
authored
64
65 desc "Generate the Rocco documentation page"
66 task :generate do
19e570b @karmi [GEM] Updated gem name to "tire" and renamed all files from "slingsho…
authored
67 system "rocco examples/tire-dsl.rb"
9dd4fb7 @karmi Updated the`web:generate` Rake task
authored
68 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
69 File.open('examples/tire-dsl.html', 'w') { |f| f.write html }
70 system "open examples/tire-dsl.html"
ad8b38f @karmi Added file with the full DSL example, used for documentation/website
authored
71 end
ae131a5 @karmi Added Rake task to generate website/documentation with Rocco [http://…
authored
72 end
Something went wrong with that request. Please try again.