-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
59 lines (50 loc) · 1.23 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
require 'awesome_print'
Rake::TaskManager.record_task_metadata = true
namespace 'unit' do
desc 'Unit tests'
task :tests do
gem 'test-unit'
require 'test/unit/ui/console/testrunner'
require_relative 'tests/rson'
::Test::Unit::UI::Console::TestRunner.run(
::Tests::RSON,
output_level: ::Test::Unit::UI::Console::TestRunner::VERBOSE,
show_detail_immediately: false
)
end
end
namespace 'gem' do
desc 'Gem build'
task :build do
require 'awesome_print'
require 'rubygems/commands/build_command'
build = Gem::Commands::BuildCommand.new
gemspec = [ File.basename(File.expand_path(__dir__)), 'gemspec' ].join('.')
build.options.store :args, [ gemspec ]
ap build.execute
end
desc 'Gem install'
task :install do
end
desc 'Gem push'
task :push do
sh 'gem push rson-0.0.5.gem'
end
end
namespace 'task' do
desc 'List available task'
task :list do
app = Rake.application
app.tasks.each do |task|
ap task:task,
scope:task.scope,
desc:task.full_comment
puts "%-20s # %s" % [task.name, task.full_comment]
end
end
end
desc 'List available tasks'
task :default do
#puts `rake -T -a`
Rake.application['task:list'].invoke
end