-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
91 lines (77 loc) · 2.53 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
require 'rake/clean'
require 'spec/stats.rb'
begin
require 'spec/rake/spectask'
rescue LoadError
puts 'To use rspec for testing you must install rspec gem:'
puts '$ sudo gem install rspec'
exit
end
begin
require 'jeweler'
rescue LoadError
puts "Jeweler not available. Install it with: sudo gem install jeweler"
end
Jeweler::Tasks.new do |gemspec|
gemspec.name = "orange-more"
gemspec.summary = "Plugins for Orange"
gemspec.description = "Orange is a Ruby framework for building managed websites with code as simple as Sinatra"
gemspec.email = "[email protected]"
gemspec.homepage = "http://github.com/therabidbanana/orange"
gemspec.authors = ["David Haslem"]
gemspec.files = FileList['lib/**/*']
gemspec.test_files = FileList['spec/**/*.rb']
gemspec.add_dependency('orange-core', '>= 0.5.7')
gemspec.add_dependency('dm-is-awesome_set', '>= 0.11.0')
gemspec.add_dependency('dm-timestamps', '>= 1.0.0')
gemspec.add_dependency('omniauth', '>= 0')
gemspec.add_dependency('openid_dm_store', '>= 0')
gemspec.add_dependency('radius', '>= 0')
gemspec.add_dependency('rest-client', '>= 0')
gemspec.add_dependency('mail', '>= 0')
gemspec.add_dependency('i18n', '>= 0')
gemspec.add_dependency('gattica', '>= 0')
gemspec.add_development_dependency "rspec", ">= 0"
gemspec.add_development_dependency "rack-test", ">= 0"
end
Jeweler::GemcutterTasks.new
desc "Report code statistics on the application and specs code"
task :stats do
stats_directories = {
"Specs" => "spec",
"Application" => "lib"
}.map {|name, dir| [name, "#{Dir.pwd}/#{dir}"]}
SpecStatistics.new(*stats_directories).to_s
end
CLEAN = Rake::FileList['doc/', 'coverage/', 'db/*']
desc "Test is same as running specs"
task :test => :spec
desc "rcov is same as running specs_with_rcov"
task :rcov => :specs_with_rcov
desc "Default task is to run tests"
task :default => :spec
desc "Generate documentation with yard"
task :doc do
sh "yardoc"
end
desc "Opens Coverage File"
task :show_cov do
sh "open coverage/index.html"
end
desc "Run the specs under spec"
Spec::Rake::SpecTask.new do |t|
t.spec_opts = ['--options', "spec/spec.opts"]
t.spec_files = FileList['spec/**/*_spec.rb']
end
desc "Run all specs with RCov"
Spec::Rake::SpecTask.new('specs_with_rcov') do |t|
t.spec_files = FileList['spec/**/*.rb']
t.rcov = true
t.rcov_opts = ['--exclude', 'spec,1.8/gems,1.9/gems']
end
desc "Runs basic example"
task :serve, :server do |t, args|
opts = {:server => 'basic'}.merge args
cd "./examples/#{opts[:server]}"
sh "rackup"
end