deis-rails 1.0.8 → 1.0.9

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 79accd5614f3373c71a3001df8c36170e5cd310d
4
- data.tar.gz: 09120a3ae6e0f420233529af191de4da3072e8dd
3
+ metadata.gz: a26e3de617087db46be70072c1050e3cb80b0b71
4
+ data.tar.gz: 8d54648720abe39d4d99aeb68204d53dcb8593e6
5
5
  SHA512:
6
- metadata.gz: 2bb0dc6fbb0b0094d1656a45c2143c114e84f9eecd9b8b726f6663c431d3b70cf3728508441ae6c4c0aa517e7a13cd544fa564a15a4c950dd5981a2429ff0fbb
7
- data.tar.gz: 016fd4e324d38ec6b27203da8e6a74a99cb9415152b2d91c6af1dd8d12ceb65c608f166d56bce9d3e50bd2bf82d16d07d6ef7f710fbe270dcadc3f3f0ba15736
6
+ metadata.gz: 8ffc49c088988240519bc973da1ae0e9ef00c70eac7d4ec4320163ccc7fca6fd52cebc85a94bedf584b1c57e9c43f3ff83c98fbf8b6f7c06477efc40b409d4af
7
+ data.tar.gz: b466b6e0049bf5fcc00c3e09ee24424b7a0140ccfa66233423d1a623a3694089962047735a08df7bd760c896102b2235b2cf68827b3efb20595efc7cc743c0cf
data/lib/deis/helpers.rb CHANGED
@@ -70,17 +70,25 @@ module Deis
70
70
  end
71
71
 
72
72
  def deis_command(*cmds)
73
+ @retry_count ||= 0
73
74
  shell :deis, *cmds
74
75
  rescue Errno::ENOENT
75
76
  deis_local_command *cmds
77
+ rescue Deis::NonZeroExitError => e
78
+ deis_command :login, username: ENV['DEIS_USERNAME'], password: ENV['DEIS_PASSWORD']
79
+ (@retry_count += 1) > 3 ? raise(e) : retry
76
80
  end
77
81
 
78
82
  def deis_local_command(*cmds)
79
- shell './deis', *cmds
80
- rescue Errno::ENOENT
83
+ @retry_count ||= 0
84
+ shell('./deis', *cmds).tap { @retry_count = nil }
85
+ rescue Errno::ENOENT => e
81
86
  shell 'curl -sSL http://deis.io/deis-cli/install.sh | sh -s 1.6.1'
82
87
  singleton_class.send :alias_method, :deis_command, :deis_local_command
83
- retry
88
+ (@retry_count += 1) > 3 ? raise(e) : retry
89
+ rescue Deis::NonZeroExitError => e
90
+ deis_command :login, username: ENV['DEIS_USERNAME'], password: ENV['DEIS_PASSWORD']
91
+ (@retry_count += 1) > 3 ? raise(e) : retry
84
92
  end
85
93
 
86
94
  def git_clone(url, flags = {})
data/lib/deis/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Deis
2
- VERSION = "1.0.8"
2
+ VERSION = "1.0.9 "
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deis-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Waldrip
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-04 00:00:00.000000000 Z
11
+ date: 2015-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport