hanzo 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a28658e25ddf5c37427874f58e6e970ef5d1a3a5
4
- data.tar.gz: 3ff25cb36005ca28fa94d67cb11bc3ec0df76ec8
3
+ metadata.gz: 05ff7891e2f1cd3041503706e0e8f29d743666a6
4
+ data.tar.gz: 2383e9fc6c162684aea15a41ef99e82844d990d2
5
5
  SHA512:
6
- metadata.gz: e99a736659312795d29f0247537bf55c96983c311ed7f27c396d256d4dfbf96247ca0c6b59f20333ebea6ca005cec743c82b00e991179171be18536eb52f8acf
7
- data.tar.gz: c4117034cb797dd9f501fcb92d372e5bd823c1bc4c2800cca754eb9df12a3490e5e7cf51cbbe90c837934a3f6ca6634c0d52348d5ac81be55af9d1c6afd64222
6
+ metadata.gz: 74429412cca30fffd9865f3082a7b9a25572e264a73a46f25e84264dbd0e4e4e990c86213400c3a65ca3db4ece09e0ddf472f4974d39704a960f5c0ab6642544
7
+ data.tar.gz: e06c64150b810ea024dc36f699d4f6a2aabb3e45f945dedf894817e839f2ca73bb60f6541452f7b1e2ef3ad0a4b222bf8d9f96ff9fe1bc85eb4cb2f02cefdadf
data/README.md CHANGED
@@ -22,7 +22,8 @@ gem 'hanzo'
22
22
 
23
23
  ## Usage
24
24
 
25
- Create an `.heroku-remotes` file at the root of your app.
25
+ Create an `.heroku-remotes` file at the root of your app that will contain the name of the
26
+ environment as the key and the Heroku app name as the value.
26
27
 
27
28
  ```yaml
28
29
  qa: heroku-app-name-qa
@@ -32,19 +33,28 @@ production: heroku-app-name-production
32
33
 
33
34
  ### Install remotes
34
35
 
36
+ Whenever you add a new environment to your `.heroku-remotes` file, you'll have to install those
37
+ remotes locally by running `hanzo install`.
38
+
35
39
  ```bash
36
- > bundle exec hanzo install
40
+ > hanzo install
37
41
 
38
42
  -----> Creating git remotes
39
43
  Adding qa
44
+ git remote rm qa 2>&1 > /dev/null
45
+ git remote add qa git@heroku.com:heroku-app-name-qa.git
40
46
  Adding staging
47
+ git remote rm staging 2>&1 > /dev/null
48
+ git remote add staging git@heroku.com:heroku-app-name-staging.git
41
49
  Adding production
50
+ git remote rm production 2>&1 > /dev/null
51
+ git remote add production git@heroku.com:heroku-app-name-production.git
42
52
  ```
43
53
 
44
54
  ### Deploy a branch or a tag
45
55
 
46
56
  ```bash
47
- > bundle exec hanzo deploy qa
57
+ > hanzo deploy qa
48
58
 
49
59
  -----> Branch to deploy: |HEAD|
50
60
  ```
@@ -70,7 +80,7 @@ Heroku labs feature for all your environments.
70
80
 
71
81
  ## License
72
82
 
73
- `Hanzo` is © 2013 [Mirego](http://www.mirego.com) and may be freely distributed under the [New BSD license](http://opensource.org/licenses/BSD-3-Clause). See the [`LICENSE.md`](https://github.com/mirego/hanzo/blob/master/LICENSE.md) file.
83
+ `Hanzo` is © 2014 [Mirego](http://www.mirego.com) and may be freely distributed under the [New BSD license](http://opensource.org/licenses/BSD-3-Clause). See the [`LICENSE.md`](https://github.com/mirego/hanzo/blob/master/LICENSE.md) file.
74
84
 
75
85
  ## About Mirego
76
86
 
data/lib/hanzo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Hanzo
2
- VERSION = '0.4.1'
2
+ VERSION = '0.4.2'
3
3
  end
data/lib/hanzo.rb CHANGED
@@ -12,7 +12,7 @@ module Hanzo
12
12
  print(command, :green)
13
13
  output = true
14
14
 
15
- ::Bundler.with_clean_env do
15
+ _run do
16
16
  if fetch_output
17
17
  output = `#{command}`
18
18
  else
@@ -23,6 +23,14 @@ module Hanzo
23
23
  output
24
24
  end
25
25
 
26
+ def self._run(&blk)
27
+ if defined?(Bundler)
28
+ ::Bundler.with_clean_env(&blk)
29
+ else
30
+ blk.call
31
+ end
32
+ end
33
+
26
34
  def self.print(text = '', *colors)
27
35
  colors = colors.map { |c| HighLine.const_get(c.to_s.upcase) }
28
36
  text = text.join("\n ") if text.is_a?(Array)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hanzo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Garneau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-06 00:00:00.000000000 Z
11
+ date: 2014-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler