freshli-commons 0.6.1 → 0.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.semver +1 -1
- data/lib/corgibytes/freshli/commons/execute.rb +16 -5
- data/lib/corgibytes/freshli/commons/test_services.rb +7 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d95cfbbcfd1f22a42fd6d51c485eba7d06fe0a92a813df113de230a53983c9b8
|
4
|
+
data.tar.gz: 87fd47d927a2c0a9eadd6d9a2f1fea52ddeca1e825fad10c7f5237b0b7da5472
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 999ee8589980e249c8c6f7eb8f0abd35979dc6c9b5401de2276542f8dade867f140bf608f4c55b10ca16799abe69f66b81ee3e19ab426af70e947005069fa66f
|
7
|
+
data.tar.gz: fe6e596e37061fae93c278aff9b7d2974e365f65cd15751a9261f18618d7ddde8a584b3d92547d4af3661679ec268fe0dac5c87fcbb5c08e7296fed1a5118529
|
data/.semver
CHANGED
@@ -1,12 +1,27 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'open3'
|
4
|
+
require 'mkmf'
|
4
5
|
|
5
6
|
module Corgibytes
|
6
7
|
module Freshli
|
7
8
|
module Commons
|
8
9
|
# Contains utility methods for executing commands and working with their output.
|
9
10
|
module Execute
|
11
|
+
|
12
|
+
def msbuild_dll_path
|
13
|
+
dotnet_exe_path = File.realpath(find_executable('dotnet'))
|
14
|
+
dotnet_dir = File.dirname(dotnet_exe_path)
|
15
|
+
sdk_dir = File.join(dotnet_dir, 'sdk', Dir.children(File.join(dotnet_dir, 'sdk')).max)
|
16
|
+
result = File.join(sdk_dir, 'MSBuild.dll')
|
17
|
+
result = result.gsub('/', '\\') if Gem.win_platform?
|
18
|
+
result
|
19
|
+
end
|
20
|
+
|
21
|
+
def null_output_target
|
22
|
+
Gem.win_platform? ? '\\\\.\\nul' : '/dev/null'
|
23
|
+
end
|
24
|
+
|
10
25
|
def enable_dotnet_command_colors
|
11
26
|
ENV['DOTNET_SYSTEM_CONSOLE_ALLOW_ANSI_COLOR_REDIRECTION'] = 'true'
|
12
27
|
end
|
@@ -31,7 +46,7 @@ module Corgibytes
|
|
31
46
|
end
|
32
47
|
end
|
33
48
|
|
34
|
-
BUFFER_LEN =
|
49
|
+
BUFFER_LEN = 8
|
35
50
|
|
36
51
|
def fill_buffer_from_stream(stream, buffer)
|
37
52
|
# loop through reading data until there is an EOF (value is nil)
|
@@ -89,10 +104,6 @@ module Corgibytes
|
|
89
104
|
end
|
90
105
|
exit_status
|
91
106
|
end
|
92
|
-
|
93
|
-
def null_output_target
|
94
|
-
Gem.win_platform? ? 'NUL:' : '/dev/null'
|
95
|
-
end
|
96
107
|
end
|
97
108
|
end
|
98
109
|
end
|
@@ -19,9 +19,13 @@ module Corgibytes
|
|
19
19
|
socket4 = Socket.new(Socket::Constants::AF_INET, Socket::Constants::SOCK_STREAM, 0)
|
20
20
|
socket4.bind(Socket.pack_sockaddr_in(port, '0.0.0.0'))
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
begin
|
23
|
+
# bind to a socket using both ipv4 and ipv6
|
24
|
+
socket6 = Socket.new(Socket::Constants::AF_INET6, Socket::Constants::SOCK_STREAM, 0)
|
25
|
+
socket6.bind(Socket.pack_sockaddr_in(port, '::'))
|
26
|
+
rescue Errno::EADDRINUSE
|
27
|
+
# if ipv6 is not available, then just use ipv4
|
28
|
+
end
|
25
29
|
|
26
30
|
@test_services[port] = { v4: socket4, v6: socket6 }
|
27
31
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: freshli-commons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- M. Scott Ford
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-08-
|
11
|
+
date: 2023-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aruba
|