bushido 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@ require 'bushido'
3
3
 
4
4
  options = {}
5
5
 
6
- commands = [:login, :remove_account, :claim, :list, :create, :show, :start, :stop, :restart, :update, :open, :logs, :add_var, :remove_var, :api_key].sort
6
+ commands = [:login, :remove_account, :claim, :list, :create, :show, :start, :stop, :restart, :update, :open, :logs, :add_var, :remove_var, :ssh_key, :api_key].sort
7
7
 
8
8
  help_docs = {
9
9
  :login => "bushido login - Authorizes this machine to work under your Bushido account",
@@ -20,6 +20,7 @@ help_docs = {
20
20
  :open => "bushido open [NAME] - Open browser window to the running Bushido app",
21
21
  :create => "bushido create [NAME] - Creates a new app",
22
22
  :logs => "bushido logs [NAME] - Retrieves all of the logs for an app and returns them in a JSON structure",
23
+ :ssh_key => "bushido ssh_key [NAME] - Retrieves ssh_key for NAME, only needed for private repos (e.g. on github)",
23
24
  :add_var => "bushido add_var [NAME] [KEY] [VALUE] - Adds an environmental variable for an app to use",
24
25
  :remove_var => "bushido remove_var [NAME] [KEY] - Removes an existing environmental variable from an app"
25
26
  }
@@ -72,6 +73,7 @@ if command
72
73
  when :remove_var then Bushido::App.remove_var(ARGV[1], ARGV[2])
73
74
  when :clear_logs then Bushido::App.clear_logs(ARGV[1])
74
75
  when :logs then Bushido::App.logs(ARGV[1])
76
+ when :ssh_key then Bushido::App.ssh_key(ARGV[1])
75
77
  else
76
78
  puts "I don't know how to '#{command}'"
77
79
  puts "I do know how to do these though: #{commands.join(', ')}"
@@ -10,5 +10,6 @@ module Bushido
10
10
  require "bushido/command"
11
11
  require "bushido/app"
12
12
 
13
- Temple = ENV["HOST"] || "http://nok.tea.sh/"
13
+ host = ENV["HOST"] || "bushi.do"
14
+ Temple = "http://#{host}/"
14
15
  end
@@ -88,6 +88,10 @@ module Bushido
88
88
  def logs(name)
89
89
  puts get(name, {:gift => "logs"})
90
90
  end
91
+
92
+ def ssh_key(name)
93
+ puts get(name, {:gift => "ssh_key"})["ssh_key"]
94
+ end
91
95
  end
92
96
  end
93
97
  end
@@ -1,3 +1,3 @@
1
1
  module Bushido
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: bushido
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.8
5
+ version: 0.0.9
6
6
  platform: ruby
7
7
  authors:
8
8
  - Sean Grove
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-02-13 00:00:00 -08:00
13
+ date: 2011-02-21 00:00:00 -08:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency