Class: Shard::CLI::Commands
- Inherits:
-
Thor
- Object
- Thor
- Shard::CLI::Commands
- Defined in:
- lib/shard/cli/commands.rb
Instance Method Summary collapse
- #config ⇒ Object
- #exec(shard_line) ⇒ Object
- #fetch(shard_line) ⇒ Object
- #fork(shard_line) ⇒ Object
- #list(username) ⇒ Object
- #test(shard_line) ⇒ Object
- #view(shard_line) ⇒ Object
Instance Method Details
#config ⇒ Object
63 64 65 |
# File 'lib/shard/cli/commands.rb', line 63 def config Shard::CLI::Config.run end |
#exec(shard_line) ⇒ Object
27 28 29 |
# File 'lib/shard/cli/commands.rb', line 27 def exec(shard_line) Shard::Loader.load shard_line end |
#fetch(shard_line) ⇒ Object
39 40 41 |
# File 'lib/shard/cli/commands.rb', line 39 def fetch(shard_line) Shard::Saver.save shard_line, verbose: true end |
#fork(shard_line) ⇒ Object
95 96 97 |
# File 'lib/shard/cli/commands.rb', line 95 def fork(shard_line) Shard::CLI::Fork.run shard_line end |
#list(username) ⇒ Object
15 16 17 |
# File 'lib/shard/cli/commands.rb', line 15 def list(username) Shard::CLI::List.run(username) end |
#test(shard_line) ⇒ Object
51 52 53 |
# File 'lib/shard/cli/commands.rb', line 51 def test(shard_line) Shard::Loader.test shard_line end |
#view(shard_line) ⇒ Object
75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/shard/cli/commands.rb', line 75 def view(shard_line) if line = Shard::Ref.parse(shard_line) lister = Shard::Lister.new(line.user) shard = lister.shards[line.name] url = shard.url `open #{ url }` else puts "'#{ shard_line }' is not a valid shard reference." end end |