heroku_hatchet 1.1.0 → 1.1.1
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/hatchet/app.rb +19 -3
- data/lib/hatchet/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5315711673cc47ca589aa39f28e02f0b2d2b56b6
|
4
|
+
data.tar.gz: 5678646d4511dd25e033a8107344bb871db55fac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3401c9359d44dec14f649ceede85815b482a31544aa11c00406f1353cbc8ec125bb76a9a18f9d7b3e46673705749f0febb751d3b550df25a7689596a5e232260
|
7
|
+
data.tar.gz: 47cba782fcb59d14ae0919e215ee350629b89314f2f6cce1fa256e98b0cd83e91eee95eb9771b3926b2dc981bfe9479b1855bc29d6acf093803a404970ea8d62
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
## HEAD
|
2
2
|
|
3
|
+
## 1.1.1
|
4
|
+
|
5
|
+
- Ensure external commands run inside of `bundle_exec` block are run with propper environment variables set.
|
6
|
+
|
3
7
|
## 1.1.0
|
4
8
|
|
5
9
|
- Added `Hatchet::Runner` which can dynamically swap the backend (anvil/git) depending on the value of ENV['HATCHET_DEPLOY_STRATEGY'] you can use 'anvil' or 'git'.
|
data/lib/hatchet/app.rb
CHANGED
@@ -40,9 +40,13 @@ module Hatchet
|
|
40
40
|
# but programatically and with more control
|
41
41
|
def run(command, timeout = nil, &block)
|
42
42
|
heroku_command = "heroku run #{command} -a #{name}"
|
43
|
-
|
43
|
+
bundle_exec do
|
44
|
+
return `#{heroku_command}` if block.blank?
|
45
|
+
end
|
44
46
|
|
45
|
-
|
47
|
+
bundle_exec do
|
48
|
+
ReplRunner.new(command, heroku_command, startup_timeout: timeout).run(&block)
|
49
|
+
end
|
46
50
|
end
|
47
51
|
|
48
52
|
# set debug: true when creating app if you don't want it to be
|
@@ -119,12 +123,24 @@ module Hatchet
|
|
119
123
|
end
|
120
124
|
|
121
125
|
def api_key
|
122
|
-
@api_key ||= ENV['HEROKU_API_KEY'] || `heroku auth:token`.chomp
|
126
|
+
@api_key ||= ENV['HEROKU_API_KEY'] || bundle_exec {`heroku auth:token`.chomp }
|
123
127
|
end
|
124
128
|
|
125
129
|
def heroku
|
126
130
|
@heroku ||= Heroku::API.new(api_key: api_key)
|
127
131
|
end
|
132
|
+
|
133
|
+
private
|
134
|
+
# if someone uses bundle exec
|
135
|
+
def bundle_exec
|
136
|
+
if defined?(Bundler)
|
137
|
+
Bundler.with_clean_env do
|
138
|
+
yield
|
139
|
+
end
|
140
|
+
else
|
141
|
+
yield
|
142
|
+
end
|
143
|
+
end
|
128
144
|
end
|
129
145
|
end
|
130
146
|
|
data/lib/hatchet/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: heroku_hatchet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Schneeman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: heroku-api
|