forked from automaticruby/automaticruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
59 lines (51 loc) · 1.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
# -*- mode: ruby; coding: utf-8 -*-
require 'rubygems'
require 'rspec/core'
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |spec|
spec.rspec_opts = ["-c"]
spec.pattern = FileList['spec/**/*_spec.rb']
end
namespace :spec do
desc "Run RSpec for plugins"
RSpec::Core::RakeTask.new(:plugins) do |spec|
spec.rspec_opts = ["-c"]
spec.pattern = FileList['spec/plugins/**/*_spec.rb']
end
desc "Run RSpec for main procedure"
RSpec::Core::RakeTask.new(:lib) do |spec|
spec.rspec_opts = ["-c"]
spec.pattern = FileList['spec/lib/**/*_spec.rb']
end
end
task :default => :spec
require 'jeweler'
Jeweler::Tasks.new do |gem|
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
gem.name = "automatic"
gem.homepage = "https://github.com/automaticruby/automaticruby"
gem.license = "GPL"
gem.summary = %Q{Automatic Ruby}
gem.description = %Q{Ruby framework for the general-purpose automatic processing}
gem.email = "[email protected]"
gem.authors = ["id774"]
# dependencies defined in Gemfile
end
Jeweler::RubygemsDotOrgTasks.new
if RUBY_VERSION >= '1.9.0'
desc "Run RSpec code examples with simplecov"
task :simplecov do
ENV['COVERAGE'] = "on"
Rake::Task[:spec].invoke
end
else
desc "Run RSpec code examples with rcov"
RSpec::Core::RakeTask.new(:rcov) do |spec|
spec.pattern = FileList['spec/**/*_spec.rb']
exclude_files = [
"gems",
]
spec.rcov_opts = ['--exclude', exclude_files.join(",")]
spec.rcov = true
end
end