-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathRakefile
42 lines (35 loc) · 1.34 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
require 'bundler'
require 'jeweler'
begin
Jeweler::Tasks.new do |gemspec|
gemspec.name = "sappy"
gemspec.summary = "Wrapping that shit!"
gemspec.description = "A wrapper for the SiteUptime API"
gemspec.email = ["[email protected]", "[email protected]"]
gemspec.homepage = "http://github.com/abcde/sappy"
gemspec.authors = ["Dylan Egan", "Tim Carey-Smith"]
# reject people's local copies of credentials
project_files = Dir.glob("{lib,spec}/**/*").reject { |file| file =~ %r!spec/credentials.rb! }
gemspec.files = %w(README.markdown Rakefile VERSION) + project_files
gemspec.rubyforge_project = 'abcde'
bundle = Bundler::Definition.from_gemfile("Gemfile")
bundle.dependencies.
select { |d| d.groups.include?(:runtime) }.
each { |d| gemspec.add_dependency(d.name, d.version_requirements.to_s) }
end
Jeweler::RubyforgeTasks.new
rescue LoadError
puts "Jeweler not available. Install it with: sudo gem install jeweler"
end
require 'spec/rake/spectask'
desc "Run specs"
Spec::Rake::SpecTask.new do |t|
t.spec_files = FileList['spec/**/*_spec.rb']
t.spec_opts = %w(-fs --color)
t.rcov = ENV['RCOV'] == "true"
t.rcov_opts << '--exclude' << 'spec'
t.rcov_opts << '--text-summary'
t.rcov_opts << '--sort' << 'coverage' << '--sort-reverse'
end
desc 'Default: Runs rspec'
task :default => :spec