forked from RiotGamesMinions/nexus_cli
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathThorfile
66 lines (53 loc) · 1.3 KB
/
Thorfile
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
65
66
# encoding: utf-8
$:.push File.expand_path("../lib", __FILE__)
require 'bundler'
require 'bundler/setup'
require 'thor/rake_compat'
require 'nexus_cli'
class Default < Thor
include Thor::RakeCompat
Bundler::GemHelper.install_tasks
desc "build", "Build nexus-cli-#{NexusCli.version}.gem into the pkg directory"
def build
Rake::Task["build"].execute
end
desc "install", "Build and install nexus-cli-#{NexusCli.version}.gem into system gems"
def install
Rake::Task["install"].execute
end
desc "release", "Create tag v#{NexusCli.version} and build and push nexus-cli-#{NexusCli.version}.gem to Rubygems"
def release
Rake::Task["release"].execute
end
class Spec < Thor
include Thor::Actions
namespace :spec
default_task :all
desc "all", "run all tests"
def all
unless run_unit && run_acceptance
exit 1
end
end
desc "unit", "run only unit tests"
def unit
unless run_unit
exit 1
end
end
desc "acceptance", "Run acceptance tests"
def acceptance
unless run_acceptance
exit 1
end
end
no_tasks do
def run_unit
run "rspec --color --format=documentation spec"
end
def run_acceptance
run "cucumber --color --format pretty"
end
end
end
end