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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0c428247fce9389f9462b6bc03cd38c920a218d8
4
- data.tar.gz: 0d857a67840260a9f25b112588b17ab3d36ca146
3
+ metadata.gz: 72a81e640b88d888b06df31b59bea074b8c90ce5
4
+ data.tar.gz: a9cb4cb76d6f3accbc497128711f01dfb1f80ca9
5
5
  SHA512:
6
- metadata.gz: 500e3604183f5e7451a8dc685759f22c555986a85cfff3681d6daf578ff74d7d7d1119e3eece1f5c147d4ef825dcc03ac820b400fd8c258f3dead1d197573115
7
- data.tar.gz: 249976f6364930eaf0e79d3b1ef4419bf0e338759247e735912000f792fed60f20677fc6e47c947c1a54d22e7a6ea9847c7cae4a57c0e7178d41b8982a7005bb
6
+ metadata.gz: f5f245824acff4b87a55faaf4a96cbc8148747e65fc3e6806371f45e2cbcf4dd5b6066b55beb40d5843c07f45eadcf700bba4ad87886be7b8cfefe2763079081
7
+ data.tar.gz: 60fe67a113b9f2b5eb8e009f8fd18b8267b5198180d7f1d48cfa3a507330d30d32ecd6584a825eca91816acd04dda9da568ecc89beee9bbbaa8b883716a4a963
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## HEAD
2
2
 
3
+ ## 1.3.2 (02-18-2014)
4
+
5
+ - App#run interface now matches ReplRunner
6
+
3
7
  ## 1.3.1
4
8
 
5
9
  - Fix dependencies
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(command, timeout = nil, &block)
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
- return `#{heroku_command}` if block.blank?
73
- end
74
-
75
- bundle_exec do
76
- ReplRunner.new(command, heroku_command, startup_timeout: timeout).run(&block)
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 block.present?
137
+ block.call(self, heroku, output) if block_given?
137
138
  end
138
139
  ensure
139
140
  self.teardown!
@@ -1,3 +1,3 @@
1
1
  module Hatchet
2
- VERSION = "1.3.1"
2
+ VERSION = "1.3.2"
3
3
  end
@@ -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.1
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-04 00:00:00.000000000 Z
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: '0'
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: '0'
110
+ version: 0.0.3
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: threaded
113
113
  requirement: !ruby/object:Gem::Requirement