kibo 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/kibo/commands/helpers.rb +4 -3
- data/lib/kibo/commands/heroku_runner.rb +15 -0
- data/lib/kibo/commands/logs.rb +2 -2
- data/lib/kibo/commands/setup.rb +4 -4
- data/lib/kibo/commands/spin.rb +1 -1
- data/lib/kibo/version.rb +1 -1
- data/man/kibo.1 +1 -1
- data/man/kibo.1.html +1 -1
- metadata +3 -2
@@ -8,8 +8,9 @@ module Kibo::Commands
|
|
8
8
|
|
9
9
|
extend Forwardable
|
10
10
|
|
11
|
-
delegate [:git, :git?, :
|
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
|
data/lib/kibo/commands/logs.rb
CHANGED
@@ -20,8 +20,8 @@ module Kibo::Commands
|
|
20
20
|
|
21
21
|
$stdout.sync = true
|
22
22
|
|
23
|
-
|
24
|
-
|
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
|
data/lib/kibo/commands/setup.rb
CHANGED
@@ -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
|
data/lib/kibo/commands/spin.rb
CHANGED
@@ -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
data/man/kibo.1
CHANGED
data/man/kibo.1.html
CHANGED
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.
|
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:
|
184
|
+
hash: 2037268821653346675
|
184
185
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
185
186
|
none: false
|
186
187
|
requirements:
|