-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathRakefile
59 lines (45 loc) · 1.18 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
# encoding: UTF-8
require 'rubygems'
require 'bundler/setup'
require 'bundler/gem_tasks'
require 'coveralls/rake/task'
require 'rspec/core/rake_task'
Coveralls::RakeTask.new
RSpec::Core::RakeTask.new(:test)
desc 'Run continuous integration test'
task :ci do
Rake::Task['test:unit'].invoke
# unless ENV['TRAVIS'] == 'true' && ENV['TRAVIS_SECURE_ENV_VARS'] == 'false'
# Rake::Task['test:integration'].invoke
# end
Rake::Task['test:cop'].invoke if RUBY_VERSION.start_with?('2.2') == false
Rake::Task['coveralls:push'].invoke
end
desc 'Run Rubocop'
task :cop do
exec 'rubocop lib/'
end
namespace :test do
desc 'Run unit tests'
RSpec::Core::RakeTask.new(:unit) do |t|
t.pattern = 'spec/unit/**/*.rb'
end
desc "Run coding style tests"
RSpec::Core::RakeTask.new(:cop) do |t|
# Rake::Task['cop'].invoke
end
task :all => [:unit, :cop]
end
desc 'Get all tasks'
task :tasklist do
puts Rake.application.tasks
end
task :usage do
puts 'No rake task specified, use rake -T to list them'
# puts "No rake task specified so listing them ..."
# Rake.application['tasklist'].invoke
end
task :default => [:usage]
if $0 == __FILE__
Rake.application['usage'].invoke
end