heroku_hatchet 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/bin/hatchet +2 -2
- data/hatchet.gemspec +1 -1
- data/lib/hatchet/app.rb +8 -7
- data/lib/hatchet/version.rb +1 -1
- data/test/hatchet/anvil_test.rb +4 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72a81e640b88d888b06df31b59bea074b8c90ce5
|
4
|
+
data.tar.gz: a9cb4cb76d6f3accbc497128711f01dfb1f80ca9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5f245824acff4b87a55faaf4a96cbc8148747e65fc3e6806371f45e2cbcf4dd5b6066b55beb40d5843c07f45eadcf700bba4ad87886be7b8cfefe2763079081
|
7
|
+
data.tar.gz: 60fe67a113b9f2b5eb8e009f8fd18b8267b5198180d7f1d48cfa3a507330d30d32ecd6584a825eca91816acd04dda9da568ecc89beee9bbbaa8b883716a4a963
|
data/CHANGELOG.md
CHANGED
data/bin/hatchet
CHANGED
@@ -64,13 +64,13 @@ class HatchetCLI < Thor
|
|
64
64
|
end
|
65
65
|
|
66
66
|
def pull(path, git_repo)
|
67
|
-
`cd #{path} && git pull --rebase #{git_repo} master`
|
67
|
+
puts `cd #{path} && git pull --rebase #{git_repo} master --quiet`
|
68
68
|
end
|
69
69
|
|
70
70
|
def clone(path, git_repo)
|
71
71
|
path = File.join(path, '..') # up one dir to prevent repos/codetriage/codetriage/#...
|
72
72
|
FileUtils.mkdir_p(path)
|
73
|
-
`cd #{path} && git clone #{git_repo}`
|
73
|
+
puts `cd #{path} && git clone #{git_repo} --quiet`
|
74
74
|
end
|
75
75
|
end
|
76
76
|
|
data/hatchet.gemspec
CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |gem|
|
|
24
24
|
gem.add_dependency "anvil-cli", "~> 0"
|
25
25
|
gem.add_dependency "excon", "~> 0"
|
26
26
|
gem.add_dependency "thor", "~> 0"
|
27
|
-
gem.add_dependency "repl_runner", "~> 0"
|
27
|
+
gem.add_dependency "repl_runner", "~> 0.0.3"
|
28
28
|
gem.add_dependency "threaded", "~> 0"
|
29
29
|
|
30
30
|
|
data/lib/hatchet/app.rb
CHANGED
@@ -66,14 +66,15 @@ module Hatchet
|
|
66
66
|
|
67
67
|
# runs a command on heroku similar to `$ heroku run #foo`
|
68
68
|
# but programatically and with more control
|
69
|
-
def run(
|
69
|
+
def run(cmd_type, command = nil, options = {}, &block)
|
70
|
+
command = cmd_type.to_s if command.nil?
|
70
71
|
heroku_command = "heroku run #{command} -a #{name}"
|
71
72
|
bundle_exec do
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
73
|
+
if block_given?
|
74
|
+
ReplRunner.new(cmd_type, heroku_command, options).run(&block)
|
75
|
+
else
|
76
|
+
`#{heroku_command}`
|
77
|
+
end
|
77
78
|
end
|
78
79
|
end
|
79
80
|
|
@@ -133,7 +134,7 @@ module Hatchet
|
|
133
134
|
in_directory do
|
134
135
|
self.setup!
|
135
136
|
self.push_with_retry!
|
136
|
-
block.call(self, heroku, output) if
|
137
|
+
block.call(self, heroku, output) if block_given?
|
137
138
|
end
|
138
139
|
ensure
|
139
140
|
self.teardown!
|
data/lib/hatchet/version.rb
CHANGED
data/test/hatchet/anvil_test.rb
CHANGED
@@ -14,6 +14,10 @@ class AnvilTest < Test::Unit::TestCase
|
|
14
14
|
cmd.run("cat Gemfile") {|r| assert_match "gem 'pg'", r}
|
15
15
|
cmd.run("ls public/assets") {|r| assert_match "application.css", r}
|
16
16
|
end
|
17
|
+
|
18
|
+
app.run(:irb, "rails c") do |cmd|
|
19
|
+
cmd.run("1+1") {|r| assert_match "2", r }
|
20
|
+
end
|
17
21
|
end
|
18
22
|
end
|
19
23
|
end
|
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.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Schneeman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: heroku-api
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 0.0.3
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 0.0.3
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: threaded
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|