procodile 1.0.24 → 1.0.25

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
  SHA256:
3
- metadata.gz: 8c569df8d2c6c6856ccafe238692a99dea26e8a995e71ea1b0d8c091a89d11e2
4
- data.tar.gz: 51160b5b73404487af17a384d06effe2c68b9e080ce0f46e036a4a883402c9bc
3
+ metadata.gz: b3d3def54b66108295fec7739f72e705e74f9d37f4efeadca3ed05f724f469ea
4
+ data.tar.gz: 51e6c4e743cf8668a06340b903f8684c4c956df3d3511218f22ca9d333421420
5
5
  SHA512:
6
- metadata.gz: 75c724357246a55bb06154b517d94d99bf67b9e8a35d87544a24f459a446241b983bd4434dedd971d98f987b96089243ae5e16bf9d88285e346f59e51b2049d6
7
- data.tar.gz: 7a44a64b4800fa54f6487cd2a9b02e4451d16dd7fa1c9663fa0a545efd7c775eb8f0b945237b3504c631e1964109246840acb93fea4d2261fab2186caa06eb7a
6
+ metadata.gz: 6d2b4f7032e1fe41e3cba82db8da9c167d858269da1993bc38c716853543c38b08a467872ee81bde016cd9dd0bec74dd8ff51d907a2511b1f7556cd7a027d6d6
7
+ data.tar.gz: 5095105af1bbc9299f4712cdf0f4703a92331711a6b38e513e9bd49f29e03c8ac78eeabb29fcd57043ecf467746accaf033ee6f807eaeff18bc13aa6fa498e7a
Binary file
Binary file
@@ -2,6 +2,7 @@ require 'fileutils'
2
2
  require 'procodile/version'
3
3
  require 'procodile/error'
4
4
  require 'procodile/message'
5
+ require 'procodile/rbenv'
5
6
  require 'procodile/supervisor'
6
7
  require 'procodile/signal_handler'
7
8
  require 'procodile/control_client'
@@ -382,7 +383,10 @@ module Procodile
382
383
  end
383
384
 
384
385
  begin
385
- Kernel.exec(environment, desired_command)
386
+ Dir.chdir(@config.root)
387
+ Rbenv.without do
388
+ Kernel.exec(environment, desired_command)
389
+ end
386
390
  rescue Errno::ENOENT => e
387
391
  raise Error, e.message
388
392
  end
@@ -1,4 +1,5 @@
1
1
  require 'procodile/logger'
2
+ require 'procodile/rbenv'
2
3
 
3
4
  module Procodile
4
5
  class Instance
@@ -143,7 +144,7 @@ module Procodile
143
144
  end
144
145
  @tag = @supervisor.tag.dup if @supervisor.tag
145
146
  Dir.chdir(@process.config.root)
146
- without_rbenv do
147
+ Rbenv.without do
147
148
  @pid = ::Process.spawn(environment_variables, @process.command, :out => log_destination, :err => log_destination, :pgroup => true)
148
149
  end
149
150
  log_destination.close
@@ -383,24 +384,5 @@ module Procodile
383
384
  false
384
385
  end
385
386
 
386
- #
387
- # If procodile is executed through rbenv it will pollute our environment which means that
388
- # any spawned processes will be invoked with procodile's ruby rather than the ruby that
389
- # the application wishes to use
390
- #
391
- def without_rbenv(&block)
392
- previous_environment = ENV.select { |k,v| k =~ /\A(RBENV\_)/ }
393
- if previous_environment.size > 0
394
- previous_environment.each { |key, value| ENV[key] = nil }
395
- previous_environment['PATH'] = ENV['PATH']
396
- ENV['PATH'] = ENV['PATH'].split(':').select { |p| !(p =~ /\.rbenv\/versions/) }.join(':')
397
- end
398
- yield
399
- ensure
400
- previous_environment.each do |key, value|
401
- ENV[key] = value
402
- end
403
- end
404
-
405
387
  end
406
388
  end
@@ -0,0 +1,24 @@
1
+ module Procodile
2
+ module Rbenv
3
+
4
+ #
5
+ # If procodile is executed through rbenv it will pollute our environment which means that
6
+ # any spawned processes will be invoked with procodile's ruby rather than the ruby that
7
+ # the application wishes to use
8
+ #
9
+ def self.without(&block)
10
+ previous_environment = ENV.select { |k,v| k =~ /\A(RBENV\_)/ }
11
+ if previous_environment.size > 0
12
+ previous_environment.each { |key, value| ENV[key] = nil }
13
+ previous_environment['PATH'] = ENV['PATH']
14
+ ENV['PATH'] = ENV['PATH'].split(':').select { |p| !(p =~ /\.rbenv\/versions/) }.join(':')
15
+ end
16
+ yield
17
+ ensure
18
+ previous_environment.each do |key, value|
19
+ ENV[key] = value
20
+ end
21
+ end
22
+
23
+ end
24
+ end
@@ -1,3 +1,3 @@
1
1
  module Procodile
2
- VERSION = '1.0.24'
2
+ VERSION = '1.0.25'
3
3
  end
metadata CHANGED
@@ -1,14 +1,36 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: procodile
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.24
4
+ version: 1.0.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Cooke
8
8
  autorequire:
9
9
  bindir: bin
10
- cert_chain: []
11
- date: 2019-10-09 00:00:00.000000000 Z
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDZDCCAkygAwIBAgIBATANBgkqhkiG9w0BAQUFADA8MQswCQYDVQQDDAJtZTEZ
14
+ MBcGCgmSJomT8ixkARkWCWFkYW1jb29rZTESMBAGCgmSJomT8ixkARkWAmlvMB4X
15
+ DTE5MDUxNDEzNTIxM1oXDTIwMDUxMzEzNTIxM1owPDELMAkGA1UEAwwCbWUxGTAX
16
+ BgoJkiaJk/IsZAEZFglhZGFtY29va2UxEjAQBgoJkiaJk/IsZAEZFgJpbzCCASIw
17
+ DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMUohRlPw3iIOhWZq+qf5N1ATm1H
18
+ 7gBO4TpsUrw/FL/+urFExzt1+4MPfiKjILge48vKpjoTfuZusRsOQebaFidOfmhk
19
+ sEqa941CvN3OeUYARA53ORlmoLDLmdcrxq430+woFp4uuSYwim/2YQgIMdgiOTqs
20
+ cHaM9yh/xUGMnH4lB9bBDNfggMmkSFb6P8Ax4rvdX3EVv5P58RHwHszd+UI4fyy9
21
+ 0W143m6ntNmqena4ZOc7HtWtRyDHHXXzlGgmghKEZgOA+/LO53VHp+cM0JqB7lq5
22
+ ZxN43fQrIT5yY9Dy7dRBeiDo53WNJPspa5soEivCBVYstMqfd+LGk/BnsyMCAwEA
23
+ AaNxMG8wCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFGlRGerNfr6J
24
+ Dprgl6DQ3kLvgVvPMBoGA1UdEQQTMBGBD21lQGFkYW1jb29rZS5pbzAaBgNVHRIE
25
+ EzARgQ9tZUBhZGFtY29va2UuaW8wDQYJKoZIhvcNAQEFBQADggEBAK2TQPMeW9qh
26
+ NDNoVbbplfSc8/uscSP2DfssCbhXQqeDfF2z+kQpxv8iAc++KTlotqOaX5A6RvLb
27
+ NvuwMHPJRQJ2e8rbuN8Sh3tUjbkAEv3SFw4hqbKmtp0j2oKBU0dxHWNfp+5ulh2l
28
+ UXnQAt4zg3v1hTD1VrwLqG/hyk9xAaWB38lEDBuPhLrDIdDJklg9bD1E2TUvoMrg
29
+ L6TIbdP1TRrxINO1D9GzboR+OuWos7qMLBEEbjat/fQchYrW1KLcHIUCyrGkZTLm
30
+ 3wUJNGnT5XYq+qvTqmjkTSTfdGvZCM63C6bGdN5CAyMokGOOatGqyCMAONolWnfC
31
+ gm3t2GWWrxY=
32
+ -----END CERTIFICATE-----
33
+ date: 2019-10-13 00:00:00.000000000 Z
12
34
  dependencies:
13
35
  - !ruby/object:Gem::Dependency
14
36
  name: json
@@ -45,6 +67,7 @@ files:
45
67
  - lib/procodile/logger.rb
46
68
  - lib/procodile/message.rb
47
69
  - lib/procodile/process.rb
70
+ - lib/procodile/rbenv.rb
48
71
  - lib/procodile/signal_handler.rb
49
72
  - lib/procodile/status_cli_output.rb
50
73
  - lib/procodile/supervisor.rb
@@ -0,0 +1,3 @@
1
+ �mʟut�B�su���)�,�1a����l�:�A5�7y��HwK�L�C�//��10o͊�@_� ��c7��;�y��v�)S�ܔZLpt��M�}��YX0,˨kN*|�ֈJ�G� p
2
+ G�*�����$��e����5�ʾ�I�w��4q�A�ZTȏ�Ǟ‘)����Lj'��eVL
3
+ e�a��\K/ٍ�C�y�����l�٭6'QY��nL@�+�+8�dA�k�VE0�[�