kibo 0.3.1 → 0.3.2
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.
- data/lib/kibo/commands/deploy.rb +22 -22
- data/lib/kibo/commands/reconfigure.rb +2 -2
- data/lib/kibo/commands/spin.rb +2 -2
- data/lib/kibo/helpers.rb +7 -3
- data/lib/kibo/version.rb +1 -1
- data/lib/kibo.rb +0 -3
- data/man/kibo.1 +1 -1
- data/man/kibo.1.html +1 -1
- metadata +2 -2
data/lib/kibo/commands/deploy.rb
CHANGED
@@ -9,29 +9,29 @@ module Kibo::Commands
|
|
9
9
|
else
|
10
10
|
h.check_missing_remotes(:error)
|
11
11
|
end
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
#
|
13
|
+
# create a deployment branch, if there is none yet.
|
14
|
+
checkout_branch Kibo.environment
|
15
|
+
|
16
|
+
git "merge", "master"
|
17
|
+
run_commands Kibo.config.deployment["pre"]
|
18
|
+
W "pre commands done"
|
19
|
+
|
20
|
+
h.configured_remotes.each do |remote|
|
21
|
+
deploy_remote! remote
|
22
|
+
end
|
15
23
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
run_commands Kibo.config.deployment["post"]
|
26
|
-
rescue StandardError
|
27
|
-
W $!
|
28
|
-
raise
|
29
|
-
ensure
|
30
|
-
unless current_branch == "master"
|
31
|
-
git "reset", "--hard"
|
32
|
-
git "checkout", "master"
|
33
|
-
end
|
24
|
+
W "Deployment succeeded."
|
25
|
+
run_commands Kibo.config.deployment["post"]
|
26
|
+
rescue StandardError
|
27
|
+
W $!
|
28
|
+
raise
|
29
|
+
ensure
|
30
|
+
unless current_branch == "master"
|
31
|
+
git "reset", "--hard"
|
32
|
+
git "checkout", "master"
|
34
33
|
end
|
34
|
+
end
|
35
35
|
|
36
36
|
private
|
37
37
|
|
@@ -55,7 +55,7 @@ module Kibo::Commands
|
|
55
55
|
end
|
56
56
|
|
57
57
|
def deploy_remote!(remote)
|
58
|
-
git "push", remote, "master"
|
58
|
+
git "push", remote, "HEAD:master"
|
59
59
|
end
|
60
60
|
|
61
61
|
def run_commands(commands)
|
@@ -3,9 +3,9 @@ module Kibo::Commands
|
|
3
3
|
|
4
4
|
# kibo [options] reconfigure ... reconfigure all existing remotes
|
5
5
|
def reconfigure
|
6
|
-
check_missing_remotes :warn
|
6
|
+
h.check_missing_remotes :warn
|
7
7
|
|
8
|
-
configured_remotes.each do |remote|
|
8
|
+
h.configured_remotes.each do |remote|
|
9
9
|
configure_remote! remote
|
10
10
|
end
|
11
11
|
end
|
data/lib/kibo/commands/spin.rb
CHANGED
@@ -7,7 +7,7 @@ module Kibo::Commands
|
|
7
7
|
subcommand :spindown, "stops all remote instances"
|
8
8
|
|
9
9
|
def spinup
|
10
|
-
check_missing_remotes(Kibo.command_line.force? ? :warn : :error)
|
10
|
+
h.check_missing_remotes(Kibo.command_line.force? ? :warn : :error)
|
11
11
|
spin Kibo.config.processes
|
12
12
|
end
|
13
13
|
|
@@ -23,7 +23,7 @@ module Kibo::Commands
|
|
23
23
|
|
24
24
|
remotes.each do |remote|
|
25
25
|
if number_of_processes > 0
|
26
|
-
configure_remote remote
|
26
|
+
h.configure_remote remote
|
27
27
|
heroku "ps:scale", "#{name}=1", "--app", remote
|
28
28
|
number_of_processes -= 1
|
29
29
|
else
|
data/lib/kibo/helpers.rb
CHANGED
@@ -8,6 +8,10 @@ module Kibo::Helpers
|
|
8
8
|
extend self
|
9
9
|
|
10
10
|
extend Heroku
|
11
|
+
|
12
|
+
def sys
|
13
|
+
Kibo::System
|
14
|
+
end
|
11
15
|
|
12
16
|
def check_missing_remotes(mode = :warn)
|
13
17
|
return if missing_remotes.empty?
|
@@ -29,7 +33,7 @@ Missing remote(s): #{missing_remotes.map(&:inspect).join(", ")}. Run
|
|
29
33
|
# -- configure remotes ----------------------------------------------
|
30
34
|
|
31
35
|
def configure_remote!(remote)
|
32
|
-
heroku "config:set",
|
36
|
+
sys.heroku "config:set",
|
33
37
|
"RACK_ENV=#{environment}",
|
34
38
|
"RAILS_ENV=#{environment}",
|
35
39
|
"INSTANCE=#{instance_for_remote(remote)}",
|
@@ -45,8 +49,8 @@ Missing remote(s): #{missing_remotes.map(&:inspect).join(", ")}. Run
|
|
45
49
|
# name of the of the remote without the namespace part; e.g. the
|
46
50
|
# INSTANCE for the remote named "bountyhill-staging-twirl2" is
|
47
51
|
# "staging-twirl2".
|
48
|
-
instance = remote[config.namespace.length + 1 .. -1]
|
49
|
-
current_instance = heroku "config:get", "INSTANCE", "--app", remote
|
52
|
+
instance = remote[Kibo.config.namespace.length + 1 .. -1]
|
53
|
+
current_instance = sys.heroku "config:get", "INSTANCE", "--app", remote
|
50
54
|
return if instance == current_instance
|
51
55
|
end
|
52
56
|
|
data/lib/kibo/version.rb
CHANGED
data/lib/kibo.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.3.
|
4
|
+
version: 0.3.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -127,7 +127,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
127
127
|
version: '0'
|
128
128
|
segments:
|
129
129
|
- 0
|
130
|
-
hash: -
|
130
|
+
hash: -2765814247850884652
|
131
131
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
132
132
|
none: false
|
133
133
|
requirements:
|