heroku_rails_deploy 0.4.2 → 0.4.3.rc0

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: 5225993d6fe08e1a17ac09674a703f621c046070
4
- data.tar.gz: f5a03afd9a6a4679d15a2b4293a4072bd3ba26a2
3
+ metadata.gz: 9ffaf525815cb7503f3a8c5c5d7b7b9613074a29
4
+ data.tar.gz: 8ed722908e19e0b95674a11e22958a136e1e7e68
5
5
  SHA512:
6
- metadata.gz: 729c4f961063b89e22abff5e016c36fe7274d553933daceb2ee0dd4addc41aff076314c72b71e4abd925cd2bfaae2f430328101f2065e8b29036f1ade91479e1
7
- data.tar.gz: d88b8b09ae6cf39c90eb233b46c7d2ea7efdd8cb3848bacffc63edeb49bb9911a748e6f534be59d85764a576d377de68400f30b0cb90a04d7d417aea2e5c6905
6
+ metadata.gz: c4cf171bbcef19600b0edeb21df1c04ea8b15749450e5f4b23035ef68c188bccd262bf4cf008049efeaa173d81b47799c0bcb9a7bb009c529ba878408cb82d6c
7
+ data.tar.gz: df23c5cd81a6b32bb36d53d9d33bac81a0824528fc2ca8551e857595be9bf14b674d96373db24a302acfe09e787290ea3b80ad034e5453a3064f30536d1e32c7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # heroku_rails_deploy
2
2
 
3
+ ## v0.4.3
4
+ - Display output while running migration commands.
5
+
3
6
  ## v0.4.2
4
7
  - Fix test for pending migrations.
5
8
 
@@ -135,10 +135,7 @@ module HerokuRailsDeploy
135
135
  end
136
136
 
137
137
  def pending_migrations?(app_name)
138
- run_heroku_command!(app_name, 'run rake db:abort_if_pending_migrations')
139
- false
140
- rescue
141
- true
138
+ run_heroku_command(app_name, 'run rake db:abort_if_pending_migrations')
142
139
  end
143
140
 
144
141
  def run_heroku_command!(app_name, command)
@@ -153,8 +150,11 @@ module HerokuRailsDeploy
153
150
  # If we're running a shell command, return the underlying
154
151
  # shell command exit code
155
152
  cli_command << ' --exit-code'
153
+ display_output = true
154
+ else
155
+ display_output = false
156
156
  end
157
- run_command(cli_command, validate: validate)
157
+ run_command(cli_command, validate: validate, display_output: display_output)
158
158
  end
159
159
 
160
160
  def registry_url(app_name)
@@ -187,17 +187,21 @@ module HerokuRailsDeploy
187
187
  "git@heroku.com:#{app_name}.git"
188
188
  end
189
189
 
190
- def run_command!(command, print_command: nil, quiet: false)
191
- run_command(command, print_command: print_command, quiet: quiet, validate: true)
190
+ def run_command!(command, print_command: nil, quiet: false, display_output: false)
191
+ run_command(command, print_command: print_command, quiet: quiet, display_output: display_output, validate: true)
192
192
  end
193
193
 
194
- def run_command(command, print_command: nil, validate: nil, quiet: false)
194
+ def run_command(command, print_command: nil, validate: nil, quiet: false, display_output: false)
195
195
  printed_command = print_command || command
196
196
  puts printed_command unless quiet
197
- output = Bundler.with_clean_env { `#{command}` }
197
+ if display_output
198
+ Bundler.with_clean_env { system(command) }
199
+ else
200
+ output = Bundler.with_clean_env { `#{command}` }
201
+ end
198
202
  exit_status = $CHILD_STATUS.exitstatus
199
- raise "Command '#{printed_command}' failed" if validate && exit_status.nonzero?
200
- output
203
+ raise "Command '#{printed_command}' failed" if validate && !exit_status.success?
204
+ display_output ? exit_status.success? : output
201
205
  end
202
206
  end
203
207
  end
@@ -1,3 +1,3 @@
1
1
  module HerokuRailsDeploy
2
- VERSION = '0.4.2'.freeze
2
+ VERSION = '0.4.3.rc0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heroku_rails_deploy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3.rc0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Salsify, Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-11 00:00:00.000000000 Z
11
+ date: 2017-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -165,12 +165,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
165
165
  version: '0'
166
166
  required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  requirements:
168
- - - ">="
168
+ - - ">"
169
169
  - !ruby/object:Gem::Version
170
- version: '0'
170
+ version: 1.3.1
171
171
  requirements: []
172
172
  rubyforge_project:
173
- rubygems_version: 2.6.12
173
+ rubygems_version: 2.6.11
174
174
  signing_key:
175
175
  specification_version: 4
176
176
  summary: Simple deployment of Rails app to Heroku