kibo 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,29 +9,29 @@ module Kibo::Commands
9
9
  else
10
10
  h.check_missing_remotes(:error)
11
11
  end
12
- #
13
- # create a deployment branch, if there is none yet.
14
- checkout_branch Kibo.environment
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
- 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
23
-
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"
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
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Kibo
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
data/lib/kibo.rb CHANGED
@@ -1,6 +1,3 @@
1
- require "pp"
2
- require "heroku"
3
-
4
1
  module Kibo
5
2
  end
6
3
 
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" "September 2012" "Kibo 0.3.1" "Kibo Manual"
4
+ .TH "KIBO" "1" "September 2012" "Kibo 0.3.2" "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.3.1</li>
175
+ <li class='tl'>Kibo 0.3.2</li>
176
176
  <li class='tc'>September 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.3.1
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: -1974233322748316422
130
+ hash: -2765814247850884652
131
131
  required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  none: false
133
133
  requirements: