sct 1.0.6 → 1.0.7

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: 1fc131f8bc317386225d5f4fc54e8a3949b890ed962478c76e4d0cf61a6c24c7
4
- data.tar.gz: 8b5b694782cb53883193fcb79192b016e0a53085e492fa3ddd2222348186df16
3
+ metadata.gz: 6ecc8e55b65c59245e7d03238bb1218f47761e018c2ca2c0b14df9731b58dbb1
4
+ data.tar.gz: cb593b673991d65aa8ca36aad1629f26d18a4e0429b44d11d4a45c48b0f291f0
5
5
  SHA512:
6
- metadata.gz: d05370cc4b9c87de1d7dcdd2895003b8ef3c3d80175e1f5280ce28e66ab2d004387db2f949fbefd867627481171b64392763203105907567220936e49e794561
7
- data.tar.gz: a6f5276d96f817ee6ef80b6323f6a184eb72a389a0fd99c2ed6595c9583ebbc67114f575bc19e2deaab8bed0f4293d9d48c2b9e26e977abfb847af80e606d859
6
+ metadata.gz: a85dcbcbb4cbc902cc9cd266b38539d71ec3ac4fdc4e2e1353ab66719eab607efc572c109c7c6efbd23403544dc4fb4aec01700d5858b144fd7fce99c6277e2d
7
+ data.tar.gz: 76a9ea0399f166725fa1da20fe3b6bf0b1913ec671c46db970d5460b8180eef089cd4eb76f57bb6145766f24c02fd6d2f513f9d60b15da33afa657663455fa12
@@ -38,10 +38,18 @@ module Sct
38
38
  container = service_spec["container_name"]
39
39
  command = service_spec["command"] || ""
40
40
 
41
+ if Sct::Helper.is_windows?
42
+ host_machine_IP = (options.wsl_debugger ? `hostname -I | awk '{print $1}'` : `powershell.exe -c '(Test-Connection -ComputerName $env:computername -count 1).ipv4address.IPAddressToString' | dos2unix`).chomp
43
+ elsif Sct::Helper.is_mac_os?
44
+ host_machine_IP = `ipconfig getifaddr $(route get 8.8.8.8 | awk '/interface: / {print $2; }')`.chomp
45
+ else
46
+ host_machine_IP = `hostname -I | awk '{print $1}'`.chomp
47
+ end
48
+
41
49
  env = {
42
50
  "PUID" => `id -u`.chomp,
43
51
  "PGID" => `id -g`.chomp,
44
- "HOST_MACHINE_IP" => (options.wsl_debugger ? `hostname -I | awk '{print $1}'` : `powershell.exe -c '(Test-Connection -ComputerName $env:computername -count 1).ipv4address.IPAddressToString' | dos2unix`).chomp,
52
+ "HOST_MACHINE_IP" => host_machine_IP,
45
53
  "IDE_DEBUG_KEY" => "PHPSTORM",
46
54
  "IDE_DEBUG_SERVER" => "docker",
47
55
  }
@@ -1,3 +1,3 @@
1
1
  module Sct
2
- VERSION = "1.0.6"
2
+ VERSION = "1.0.7"
3
3
  end
@@ -66,6 +66,10 @@ module SctCore
66
66
  return !ENV["SUDO_USER"].nil? && !ENV["SUDO_USER"].empty?
67
67
  end
68
68
 
69
+ def self.is_mac_os?
70
+ return self.operating_system == MAC_OS
71
+ end
72
+
69
73
  def self.is_windows?
70
74
  return self.operating_system == WINDOWS
71
75
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sct
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Reshad Farid
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-22 00:00:00.000000000 Z
11
+ date: 2021-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colored