heroku_hatchet 1.4.0 → 1.4.1

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: 85641de59bccc166a11c79ae67676af865b3be63
4
- data.tar.gz: 1d72d1da0c070b24cea2025a77e31365c61a52fa
3
+ metadata.gz: 346483244930032ded4f513e57880fbf3f7b89fc
4
+ data.tar.gz: 3644c127a1284e3ad2dbf3f8d9a1f6eaf06afdd3
5
5
  SHA512:
6
- metadata.gz: 815178819199dc926155789f1495b89042c7e4ff42493780f9f664401a8691cc8fdb53e65755daa74c7ed7d60fe88cf8717598b584565cd0f4d933c833102a9a
7
- data.tar.gz: ecbdce8901244371372846eb96435082c41f70d6d3fce9b2565516bd2d32a3675d2435a9ebde28bb50bd20b99c5f53ace8c2cfad08ba1561ea6bdef86cf0a42f
6
+ metadata.gz: 54aa5d970a0f9c1d8c2f4bf40c60f9d372061e1347abe1b0308a240158d2378e4ebdf31c8170b341f479f32d6261bed57b8924b1c21ec029d06b6a24f2689bd7
7
+ data.tar.gz: b4d7bcf342b9a6dcfef767d6643b798ffe88c25699662f80591697e0c737ef824c422962caebd377f82d9edaa059264424f912d7303408a4e24981655191d7a5
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## HEAD
2
2
 
3
+ ## 1.4.1
4
+
5
+ - Shell commands now escaped automatically
6
+
3
7
  ## 1.4.0
4
8
 
5
9
  - The App#setup! method now automatically tries to reap unused apps if the request fails.
data/lib/hatchet/app.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require 'shellwords'
2
+
1
3
  module Hatchet
2
4
  class App
3
5
  attr_reader :name, :stack, :directory, :repo_name
@@ -70,7 +72,8 @@ module Hatchet
70
72
  # but programatically and with more control
71
73
  def run(cmd_type, command = nil, options = {}, &block)
72
74
  command = cmd_type.to_s if command.nil?
73
- heroku_command = "heroku run #{command} -a #{name}"
75
+ heroku_options = (options.delete(:heroku) || {}).map {|k,v| "--#{k.to_s.shellescape}=#{v.to_s.shellescape}"}.join(" ")
76
+ heroku_command = "heroku run #{command.to_s.shellescape} -a #{name} #{ heroku_options }"
74
77
  bundle_exec do
75
78
  if block_given?
76
79
  ReplRunner.new(cmd_type, heroku_command, options).run(&block)
@@ -1,3 +1,3 @@
1
1
  module Hatchet
2
- VERSION = "1.4.0"
2
+ VERSION = "1.4.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heroku_hatchet
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Schneeman