subcontractor 0.3.2 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -13,7 +13,7 @@ gem install subcontractor
13
13
  or with bundler
14
14
 
15
15
  ```ruby
16
- gem 'subcontractor', '0.3.2'
16
+ gem 'subcontractor', '0.3.0'
17
17
  ```
18
18
 
19
19
  The gem provides an executable called ```subcontract``` that you will use from your Procfile. You can see what it does by running ```subcontract --help```
@@ -41,6 +41,12 @@ rails: rails s
41
41
  another_app: subcontract --rvm "--with-rubies rvmrc" --chdir ../another_app --signal INT -- rails s -p 3001
42
42
  ```
43
43
 
44
+ Newer versions of RVM use a slightly different syntax for referencing the app .rvmrc file.
45
+
46
+ ```
47
+ new_rvm_app: push: subcontract --rvm --with-rubies default-with-rvmrc do --chdir ../push --signal INT -- bundle exec rails server
48
+ ```
49
+
44
50
  ### Contributions
45
51
  * Fork the project
46
52
  * Make your change
@@ -13,6 +13,9 @@ module Subcontractor
13
13
  trap("TERM") do
14
14
  send_kill(signal, find_pids_to_kill(pid))
15
15
  end
16
+ trap("INT") do
17
+ send_kill(signal, find_pids_to_kill(pid))
18
+ end
16
19
  until stdin.eof?
17
20
  puts stdin.gets
18
21
  end
@@ -34,7 +37,7 @@ module Subcontractor
34
37
 
35
38
  def find_child_pids(pids)
36
39
  lines = `ps axo pid,ppid`
37
- child_pids = lines.split("\n").collect{|x| x.split("\s")}.select do |(child_pid, parent_pid)|
40
+ child_pids = lines.map(&:split).select do |(child_pid, parent_pid)|
38
41
  pids.include?(parent_pid.to_i)
39
42
  end.map(&:first).map(&:to_i)
40
43
  end
@@ -1,3 +1,3 @@
1
1
  module Subcontractor
2
- VERSION = "0.3.2"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: subcontractor
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
5
- prerelease:
4
+ hash: 15
5
+ prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 3
9
- - 2
10
- version: 0.3.2
8
+ - 4
9
+ - 0
10
+ version: 0.4.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tony Pitluga
@@ -15,7 +15,8 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-01-27 00:00:00 Z
18
+ date: 2012-06-15 00:00:00 -05:00
19
+ default_executable:
19
20
  dependencies: []
20
21
 
21
22
  description: rvm aware process launcher for foreman
@@ -46,6 +47,7 @@ files:
46
47
  - lib/subcontractor/cli.rb
47
48
  - lib/subcontractor/version.rb
48
49
  - subcontractor.gemspec
50
+ has_rdoc: true
49
51
  homepage: https://github.com/pitluga/subcontractor
50
52
  licenses: []
51
53
 
@@ -75,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
77
  requirements: []
76
78
 
77
79
  rubyforge_project: subcontractor
78
- rubygems_version: 1.8.6
80
+ rubygems_version: 1.3.7
79
81
  signing_key:
80
82
  specification_version: 3
81
83
  summary: rvm aware process launcher for foreman