Class: HW::Runner
- Inherits:
-
HW
- Object
- Thor
- HW
- HW::Runner
show all
- Includes:
- Base
- Defined in:
- lib/hw/runner.rb
Constant Summary
Constants inherited
from HW
CONFIG_PATH, DEFAULT_SOURCE, DIRECTORY, MAJOR, MINOR, PRE, RESERVED_WORDS, SOURCES_PATH, TINY, VERSION
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Base
included
Class Method Details
.start(given_args = ARGV, config = {}) ⇒ Object
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# File 'lib/hw/runner.rb', line 6
def self.start(given_args = ARGV, config = {})
unless self.is_a_reserved_task?(given_args)
name = ARGV.first
if Packages.reserved?(name)
Packages.register(name, "hw/packages/#{name}")
else
Packages.add(name)
end
end
super(given_args, config)
end
|
Instance Method Details
#add_source(name, source) ⇒ Object
26
27
28
|
# File 'lib/hw/runner.rb', line 26
def add_source name, source
Sources.add(name, source)
end
|
#update ⇒ Object
Also known as:
install
32
33
34
35
36
37
38
39
40
41
42
|
# File 'lib/hw/runner.rb', line 32
def update
"Updating hw"
Sources.ensure_defaults
if options["pull"]
Sources.fetch
else
warn "Sources not updated"
info "Remove `-p false` to update your sources"
end
end
|