subcontractor 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ OTVmMDFjYmZlNzI5MmIwYzNjNjAxMDJmZWRlZWM3YzcyZWFmM2RmNw==
5
+ data.tar.gz: !binary |-
6
+ MDcyODM1MGQ4YWI2ZjAxMjM3NjZlY2E5NTFmYjI4NTIzNTZkNDM5Mg==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ MzgzODJmM2ZmZjc2MDQwNzU2OGU5YWZhNGM2MGIxMjQ2Zjc5MDAxMWVlZDA2
10
+ YThjMzU1NTAyMjhhYWJiNDA3OTg2MzY4OWYyYjk4NDI3MTRhM2M5YWQ1NWEx
11
+ ODQwMWI2YzdiYTc2OWMwYWQ0ZDE1NzU3Y2Y0MDIxNmQwMTM0Yzk=
12
+ data.tar.gz: !binary |-
13
+ ODgwZmI3ZDcxMTM2ODgxZDc0MjllNWNjNTU5NjAxNjQxNzMwZGY1ZjYyY2Fm
14
+ MDU2Y2M1YWEwZmQ0NWNhZGY3ZWVjYjhjZTNlM2Q4MDc1ZWVhODg3NzdlYzU5
15
+ M2Y3MmVmMWE2MTEwZmU2MDc1ZmZhMTk4Y2Y5ZTI3OTU1YTYyN2U=
@@ -0,0 +1 @@
1
+ 2.4.0
data/Gemfile CHANGED
@@ -2,3 +2,5 @@ source "http://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in subcontractor.gemspec
4
4
  gemspec
5
+
6
+ gem "rake", "~> 12.0.0"
data/README.md CHANGED
@@ -27,7 +27,8 @@ The gem provides an executable called ```subcontract``` that you will use from y
27
27
  USAGE: subcontract [options] -- executable
28
28
  -r, --rvm RVM run in a specific RVM (use `.` for ruby from `PATH`)
29
29
  -b, --rbenv RBENV run in a specific RBENV (use `.` for local rbenv)
30
- -c, --choose-env ENV run in either a specified RBENV or RVM, whichever is present
30
+ -h, --chruby CHRUBY run in a specific CHRUBY
31
+ -c, --choose-env ENV run in either a specified RBENV, RVM or CHRUBY, whichever is present
31
32
  -d, --chdir PATH chdir to PATH before starting process
32
33
  -s, --signal SIGNAL signal to send to process to kill it, default TERM
33
34
  ```
@@ -84,7 +84,10 @@ module Subcontractor
84
84
  opt.on("-b", "--rbenv RBENV", "run in a specific RBENV") do |rbenv|
85
85
  options[:rbenv] = rbenv
86
86
  end
87
- opt.on("-c", "--choose-env ENV", "run in either specified RBENV or RVM, whichever is present") do |env|
87
+ opt.on("-h", "--chruby CHRUBY", "run in a specific CHRUBY") do |chruby|
88
+ options[:chruby] = chruby
89
+ end
90
+ opt.on("-c", "--choose-env ENV", "run in either specified RBENV, RVM, or CHRUBY, whichever is present") do |env|
88
91
  options[:choose_env] = env
89
92
  end
90
93
  opt.on("-d", "--chdir PATH", "chdir to PATH before starting process") do |path|
@@ -14,6 +14,8 @@ module Subcontractor
14
14
  @parts.unshift("#{_set_rbenv_version} rbenv exec")
15
15
  elsif _use_command?(:rvm)
16
16
  @parts.unshift("rvm #{_env_specifier(:rvm)} exec")
17
+ elsif _use_command?(:chruby)
18
+ @parts.unshift("chruby-exec #{_env_specifier(:chruby)} --")
17
19
  end
18
20
 
19
21
  @parts.join(" ")
@@ -1,3 +1,3 @@
1
1
  module Subcontractor
2
- VERSION = "0.8.0"
2
+ VERSION = "0.9.0"
3
3
  end
@@ -26,6 +26,14 @@ describe Subcontractor::CLI do
26
26
  end
27
27
  end
28
28
 
29
+ context "with --chruby" do
30
+ it "specifies a rbenv" do
31
+ ARGV = ["--chruby", "1.9.3", "test"]
32
+ SafePty.should_receive(:spawn).with("chruby-exec 1.9.3 -- test")
33
+ Subcontractor::CLI.new.run
34
+ end
35
+ end
36
+
29
37
  it "creates a valid command if no environment manager is specifed" do
30
38
  ARGV = ["test"]
31
39
  SafePty.should_receive(:spawn).with("test")
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
14
14
 
15
15
  s.rubyforge_project = "subcontractor"
16
16
 
17
- s.add_development_dependency("rspec")
17
+ s.add_development_dependency("rspec", "~> 3.5.0", ">= 3.5.0")
18
18
 
19
19
  s.files = `git ls-files`.split("\n")
20
20
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
metadata CHANGED
@@ -1,32 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: subcontractor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
5
- prerelease:
4
+ version: 0.9.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Tony Pitluga
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-10-25 00:00:00.000000000 Z
11
+ date: 2017-03-07 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rspec
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: 3.5.0
19
20
  - - ! '>='
20
21
  - !ruby/object:Gem::Version
21
- version: '0'
22
+ version: 3.5.0
22
23
  type: :development
23
24
  prerelease: false
24
25
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
26
  requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 3.5.0
27
30
  - - ! '>='
28
31
  - !ruby/object:Gem::Version
29
- version: '0'
32
+ version: 3.5.0
30
33
  description: rvm aware process launcher for foreman
31
34
  email:
32
35
  - tony.pitluga@gmail.com
@@ -36,7 +39,7 @@ extensions: []
36
39
  extra_rdoc_files: []
37
40
  files:
38
41
  - .gitignore
39
- - .rvmrc
42
+ - .ruby-version
40
43
  - Gemfile
41
44
  - README.md
42
45
  - Rakefile
@@ -58,26 +61,25 @@ files:
58
61
  - subcontractor.gemspec
59
62
  homepage: https://github.com/pitluga/subcontractor
60
63
  licenses: []
64
+ metadata: {}
61
65
  post_install_message:
62
66
  rdoc_options: []
63
67
  require_paths:
64
68
  - lib
65
69
  required_ruby_version: !ruby/object:Gem::Requirement
66
- none: false
67
70
  requirements:
68
71
  - - ! '>='
69
72
  - !ruby/object:Gem::Version
70
73
  version: '0'
71
74
  required_rubygems_version: !ruby/object:Gem::Requirement
72
- none: false
73
75
  requirements:
74
76
  - - ! '>='
75
77
  - !ruby/object:Gem::Version
76
78
  version: '0'
77
79
  requirements: []
78
80
  rubyforge_project: subcontractor
79
- rubygems_version: 1.8.23
81
+ rubygems_version: 2.2.2
80
82
  signing_key:
81
- specification_version: 3
83
+ specification_version: 4
82
84
  summary: rvm aware process launcher for foreman
83
85
  test_files: []
data/.rvmrc DELETED
@@ -1 +0,0 @@
1
- rvm ruby-1.8.7-p249@subcontractor