kibo 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,8 +8,9 @@ module Kibo::Commands
8
8
 
9
9
  extend Forwardable
10
10
 
11
- delegate [:git, :git?, :heroku, :sys] => Kibo::System
12
-
13
- # -- which remotes are defined, present and configured --------------
11
+ delegate [:git, :git?, :sys] => Kibo::System
14
12
 
13
+ def heroku!(*args)
14
+ Kibo::System.heroku *args
15
+ end
15
16
  end
@@ -0,0 +1,15 @@
1
+ # --spin up/spin down remotes
2
+ module Kibo::Commands
3
+ subcommand :heroku, "run a command on all heroku instances"
4
+
5
+ def heroku
6
+ #W "ARGV", ARGV
7
+
8
+ Kibo.config.instances.each do |instance|
9
+ cmd = [ "heroku", *ARGV, "--app", instance ]
10
+
11
+ W cmd.join(" ")
12
+ system *cmd
13
+ end
14
+ end
15
+ end
@@ -20,8 +20,8 @@ module Kibo::Commands
20
20
 
21
21
  $stdout.sync = true
22
22
 
23
- heroku = Heroku::Auth.client
24
- heroku.read_logs(instance, [ "tail=1" ]) do |chunk|
23
+ client = Heroku::Auth.client
24
+ client.read_logs(instance, [ "tail=1" ]) do |chunk|
25
25
  chunk.split("\n").each do |line|
26
26
  $stdout.puts line.split(": ", 2)[1]
27
27
  end
@@ -45,7 +45,7 @@ module Kibo::Commands
45
45
  if Kibo::Heroku.apps.include?(instance)
46
46
  git :remote, :add, instance, heroku_url
47
47
  else
48
- heroku "apps:create", instance, "--remote", instance
48
+ heroku! "apps:create", instance, "--remote", instance
49
49
  end
50
50
 
51
51
  true
@@ -53,7 +53,7 @@ module Kibo::Commands
53
53
 
54
54
  def share_instance(instance)
55
55
  Kibo.config.sharing.each do |email|
56
- heroku "sharing:add", email, "--app", instance
56
+ heroku! "sharing:add", email, "--app", instance
57
57
  end
58
58
  end
59
59
 
@@ -74,12 +74,12 @@ module Kibo::Commands
74
74
 
75
75
  missing = instance_addons - existing_instance_addons
76
76
  missing.each do |addon|
77
- heroku "addons:add", addon, "--app", instance
77
+ heroku! "addons:add", addon, "--app", instance
78
78
  end
79
79
  end
80
80
 
81
81
  def configure_instance(instance)
82
- heroku "config:set", "INSTANCE=#{instance.instance_name}", "--app", instance
82
+ heroku! "config:set", "INSTANCE=#{instance.instance_name}", "--app", instance
83
83
  end
84
84
 
85
85
  def verify_heroku_login
@@ -16,7 +16,7 @@ module Kibo::Commands
16
16
  def spin(mode)
17
17
  Kibo.config.instances.each do |instance|
18
18
  count = mode == :up ? instance.count : 0
19
- heroku "ps:scale", "#{instance.role}=#{count}", "--app", instance
19
+ heroku! "ps:scale", "#{instance.role}=#{count}", "--app", instance
20
20
  end
21
21
  end
22
22
  end
data/lib/kibo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Kibo
2
- VERSION = "0.4.2"
2
+ VERSION = "0.4.3"
3
3
  end
data/man/kibo.1 CHANGED
@@ -1,7 +1,7 @@
1
1
  .\" generated with Ronn/v0.7.3
2
2
  .\" http://github.com/rtomayko/ronn/tree/0.7.3
3
3
  .
4
- .TH "KIBO" "1" "October 2012" "Kibo 0.4.2" "Kibo Manual"
4
+ .TH "KIBO" "1" "October 2012" "Kibo 0.4.3" "Kibo Manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBkibo\fR \- manage heroku applications
data/man/kibo.1.html CHANGED
@@ -172,7 +172,7 @@ kibo -e production spindown
172
172
 
173
173
 
174
174
  <ol class='man-decor man-foot man foot'>
175
- <li class='tl'>Kibo 0.4.2</li>
175
+ <li class='tl'>Kibo 0.4.3</li>
176
176
  <li class='tc'>October 2012</li>
177
177
  <li class='tr'>kibo(1)</li>
178
178
  </ol>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kibo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -147,6 +147,7 @@ files:
147
147
  - lib/kibo/commands/deploy.rb
148
148
  - lib/kibo/commands/generate.rb
149
149
  - lib/kibo/commands/helpers.rb
150
+ - lib/kibo/commands/heroku_runner.rb
150
151
  - lib/kibo/commands/info.rb
151
152
  - lib/kibo/commands/logs.rb
152
153
  - lib/kibo/commands/setup.rb
@@ -180,7 +181,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
180
181
  version: '0'
181
182
  segments:
182
183
  - 0
183
- hash: 3119348914101748523
184
+ hash: 2037268821653346675
184
185
  required_rubygems_version: !ruby/object:Gem::Requirement
185
186
  none: false
186
187
  requirements: