-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
64 lines (55 loc) · 1.59 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
require 'bundler/gem_tasks'
require 'rubocop/rake_task'
RuboCop::RakeTask.new
namespace 'rubocop' do
desc 'fix double quotes [Style/StringLiterals]'
task :fix_quotes do
sh 'bundle exec rubocop --only Style/StringLiterals -a'
end
desc 'Fix trailing whitespaces [Style/TrailingWhitespace]'
task :fix_whitespace do
sh 'bundle exec rubocop --auto-correct -c .rubocop-spaces.yml'
end
end
require 'yard'
desc 'Run yarddoc for the source'
YARD::Rake::YardocTask.new do |t|
t.files = ['lib/**/*.rb', '-', 'README.md']
t.options = ['--markup=markdown', '--exclude=play.rb', '--exclude=fix_utf.rb']
t.stats_options = ['--list-undoc']
end
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
task default: :spec
namespace :spec do
desc 'Run only base specs withouth INTEGRATION'
task base: :spec
desc 'integration'
task :integration do
ENV['INTEGRATION'] = '1'
# Rake::Task[:spec].execute
sh "rspec --pattern 'integration/**/*_spec.rb'"
end
end
desc 'rebuild without SCM-checks'
task :rebuild do
# get the project for this gem
project = Gem::Tasks::Project.new
# build the gem with the standard 'gem build' command
# and move the result to the PKG_DIR
builder = Gem::Builder.new(project.gemspec)
mv builder.build, project.class::PKG_DIR
end
desc 'console_integr'
task :console_integr do
$LOAD_PATH.unshift('spec/')
$LOAD_PATH.unshift('lib/')
ENV['INTEGRATION'] = '1'
require 'irb'
require 'irb/completion'
require 'ad_dir'
require 'spec_helper' #
require 'real_dir_helper' # create_user, create_group helpers
ARGV.clear
IRB.start
end