on_container 0.0.1 → 0.0.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
  SHA256:
3
- metadata.gz: f61b63568e23e08af3c0129b1df76cc8a74afa5b8eb9e26ed844e1569329776e
4
- data.tar.gz: a861e643c984f81524645ab76001871da968b5225a7a04d1f3183a186fdd008e
3
+ metadata.gz: e6c6b69a780d2c6b4f874f5e5ba73c5cd466cefaa12417387e17c56450feba6d
4
+ data.tar.gz: 3c0ad63961d07fdc00f3903346680270b51f26c5d30c3f2cd4fb53e63a065190
5
5
  SHA512:
6
- metadata.gz: 29c67a715453468d37fad0651d1e2e44874221d9610487ef201167d918ef30d27fcf0c96377c3ccf449f0c1684027ca8934e8f248fc9c07a5f5a74f03a1b42a6
7
- data.tar.gz: a9487e81209640d5e6927f8f764d51649fcd7d7c06b9d48efa6083e00cdeff78be0804f0f69168c5eb205c76afff98003ce6eba42e6f40e862060110f2fab554
6
+ metadata.gz: f250e92ac740599c98efbce04aefd437fae5a29d59bf3e0ff3334e7672391088c72ff4f7119878d7eb36dbe55cefaa594286095731c09247f97107cc4c04d572
7
+ data.tar.gz: 7816fdf82eef22a8fd907bf89dbfaf3e1866f68b131529638e94f8bd661a0d51401ac36095cfaeb124cde2fe90109d30b96bd67202fa117513f810b18f6aa00b
@@ -26,11 +26,11 @@ module OnContainer
26
26
  end
27
27
 
28
28
  def developer_uid?
29
- developer_uid_as_integer > 0
29
+ developer_uid > 0
30
30
  end
31
31
 
32
32
  def developer_uid
33
- @developer_uid ||= ENV['DEVELOPER_UID'].to_i
33
+ @developer_uid ||= ENV.fetch('DEVELOPER_UID', '').to_i
34
34
  end
35
35
 
36
36
  protected
@@ -38,7 +38,7 @@ module OnContainer
38
38
  def switch_to_developer_user
39
39
  target_user_name = target_user.name
40
40
  puts "Switching from 'root' user to '#{target_user_name}'..."
41
- exec 'su-exec', target_user_name, $0, *$*
41
+ Kernel.exec 'su-exec', target_user_name, $0, *$*
42
42
  end
43
43
 
44
44
  def warn_no_developer_uid
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OnContainer
4
- VERSION = '0.0.1'
4
+ VERSION = '0.0.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: on_container
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Quintanilla