-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathRakefile
More file actions
39 lines (33 loc) · 972 Bytes
/
Rakefile
File metadata and controls
39 lines (33 loc) · 972 Bytes
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
$LOAD_PATH << 'lib'
require 'suse/connect'
require 'rspec/core/rake_task'
require 'date'
Dir.glob('lib/tasks/*.rake') { |f| load f }
# The last_comment method has been silently removed from Rake 11.0.1,
# then restored with a deprecation warning:
# https://github.com/ruby/rake/blob/v11.1.2/lib/rake/task_manager.rb#L9-L12
#
# We currently happen to use the affected 11.0.x versions in our build pipeline, so this is really needed.
module MonkeypatchRakeLastComment
def last_comment
last_description
end
end
Rake::Application.send :include, MonkeypatchRakeLastComment unless Rake::Application.method_defined? :last_comment
task default: [:spec, :rubocop]
desc 'Run RSpec'
RSpec::Core::RakeTask.new(:spec)
desc 'Run console loaded with gem'
task :console do
require 'irb'
require 'irb/completion'
require 'byebug'
require 'awesome_print'
require 'date'
ARGV.clear
IRB.start
end
desc 'Run Rubocop'
task :rubocop do
sh 'bundle exec rubocop'
end