hanzo 0.4 → 0.4.1

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: ee58f7c379b832bd57123231fa0b9d8dbfce0937
4
- data.tar.gz: 431e13f48384cdb4b37fee61d4739348cf80ceb0
3
+ metadata.gz: a28658e25ddf5c37427874f58e6e970ef5d1a3a5
4
+ data.tar.gz: 3ff25cb36005ca28fa94d67cb11bc3ec0df76ec8
5
5
  SHA512:
6
- metadata.gz: bab2c11ec726133a33ddfc705b311cb31964f345e14db730fd223e0439c106b46d6b89e2e5d47d4b74ed96ef50939a182000324038b6be3490083ef4a6fd9904
7
- data.tar.gz: 80d5ea3f9f210b29cea313a717a8fc298d8c5dcaa032d21dacc349e2d147feb9132bdfd60b29f01b84ad4586e7be1a64382022a80f0d8a491089c64bec25dfd9
6
+ metadata.gz: e99a736659312795d29f0247537bf55c96983c311ed7f27c396d256d4dfbf96247ca0c6b59f20333ebea6ca005cec743c82b00e991179171be18536eb52f8acf
7
+ data.tar.gz: c4117034cb797dd9f501fcb92d372e5bd823c1bc4c2800cca754eb9df12a3490e5e7cf51cbbe90c837934a3f6ca6634c0d52348d5ac81be55af9d1c6afd64222
@@ -34,7 +34,7 @@ module Hanzo
34
34
  def fetch_variables
35
35
  @variables = Hanzo::Installers::Remotes.environments.keys.inject({}) do |memo, env|
36
36
  # Fetch the variables over at Heroku
37
- config = Hanzo.run("heroku config -r #{env}").split("\n")
37
+ config = Hanzo.run("heroku config -r #{env}", true).split("\n")
38
38
 
39
39
  # Reject the first line (Heroku header)
40
40
  config = config.reject { |line| line =~ /^=/ }
data/lib/hanzo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Hanzo
2
- VERSION = '0.4'
2
+ VERSION = '0.4.1'
3
3
  end
data/lib/hanzo.rb CHANGED
@@ -8,9 +8,19 @@ require 'hanzo/heroku'
8
8
  require 'hanzo/version'
9
9
 
10
10
  module Hanzo
11
- def self.run(command)
11
+ def self.run(command, fetch_output = false)
12
12
  print(command, :green)
13
- ::Bundler.with_clean_env { system(command) }
13
+ output = true
14
+
15
+ ::Bundler.with_clean_env do
16
+ if fetch_output
17
+ output = `#{command}`
18
+ else
19
+ system(command)
20
+ end
21
+ end
22
+
23
+ output
14
24
  end
15
25
 
16
26
  def self.print(text = '', *colors)
@@ -34,8 +34,8 @@ RUBY
34
34
  Hanzo.should_receive(:title).with(fetch_environment_title)
35
35
  Hanzo.should_receive(:title).with(compare_environment_title)
36
36
 
37
- Hanzo.should_receive(:run).with("#{config_cmd} -r #{environment_one_name}").and_return(environment_one)
38
- Hanzo.should_receive(:run).with("#{config_cmd} -r #{environment_two_name}").and_return(environment_two)
37
+ Hanzo.should_receive(:run).with("#{config_cmd} -r #{environment_one_name}", true).and_return(environment_one)
38
+ Hanzo.should_receive(:run).with("#{config_cmd} -r #{environment_two_name}", true).and_return(environment_two)
39
39
 
40
40
  Hanzo.should_receive(:print).with("Missing variables in #{environment_one_name}", :yellow)
41
41
  Hanzo.should_receive(:print).with(['- SMTP_USERNAME'])
metadata CHANGED
@@ -1,69 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hanzo
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.4'
4
+ version: 0.4.1
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-02-20 00:00:00.000000000 Z
11
+ date: 2014-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: highline
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: 1.6.19
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: 1.6.19
69
69
  description: Hanzo is a tool to handle deployments in multiple environments on Heroku.
@@ -74,9 +74,9 @@ executables:
74
74
  extensions: []
75
75
  extra_rdoc_files: []
76
76
  files:
77
- - .gitignore
78
- - .rspec
79
- - .travis.yml
77
+ - ".gitignore"
78
+ - ".rspec"
79
+ - ".travis.yml"
80
80
  - Gemfile
81
81
  - LICENSE.md
82
82
  - README.md
@@ -107,17 +107,17 @@ require_paths:
107
107
  - lib
108
108
  required_ruby_version: !ruby/object:Gem::Requirement
109
109
  requirements:
110
- - - '>='
110
+ - - ">="
111
111
  - !ruby/object:Gem::Version
112
112
  version: '0'
113
113
  required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - '>='
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  requirements: []
119
119
  rubyforge_project:
120
- rubygems_version: 2.1.0
120
+ rubygems_version: 2.2.2
121
121
  signing_key:
122
122
  specification_version: 4
123
123
  summary: Hanzo is a tool to handle deployments in multiple environments on Heroku.