contrast-agent-lib 0.1.3 → 0.1.5
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/Gemfile +1 -1
- data/contrast-agent-lib.gemspec +3 -3
- data/lib/contrast-agent-lib.rb +4 -3
- data/lib/utils/os.rb +7 -1
- data/lib/utils/version.rb +2 -2
- data/scripts/build_gem.sh +1 -3
- data/usage_files/libcontrast_c.dylib +0 -0
- data/usage_files/libcontrast_c.so +0 -0
- data/usage_files/libcontrast_c_musl.so +0 -0
- data/usage_files/libcontrast_darwin_arm.dylib +0 -0
- metadata +5 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 02b67425c85e2068bc3ae91548a28eaa053093a56fc17084d6226d01a7d8d2dc
|
|
4
|
+
data.tar.gz: 599dd1586f591e3d7cdf2708597b46d658073b1e0ab11b97e6e134b89f2bec26
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ce65bdeb6d28f2f568d1eb15f063098a87e200c96b859371f06d0c6bcfe2e889758e577afc7ea68f08e20a6f4c0ca4924812e843febfa9bd0283ad66b5c99d94
|
|
7
|
+
data.tar.gz: a853e074e29a8462e198de5e366494661ee4f733f0e6d48692d768b00726295b43836dbbfd6c37454c10bda9ca405ddaf47eddab9671769eba4025d98b49c303
|
data/Gemfile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c)
|
|
1
|
+
# Copyright (c) 2023 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
|
|
4
4
|
source 'https://rubygems.org'
|
data/contrast-agent-lib.gemspec
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c)
|
|
1
|
+
# Copyright (c) 2023 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
|
|
4
4
|
require_relative './lib/utils/version'
|
|
@@ -60,9 +60,9 @@ Gem::Specification.new do |spec|
|
|
|
60
60
|
spec.require_paths = ['lib']
|
|
61
61
|
spec.homepage = 'https://www.contrastsecurity.com'
|
|
62
62
|
spec.license = 'CONTRAST SECURITY (see license file)'
|
|
63
|
-
spec.required_ruby_version = ['>= 2.7.0', '< 3.
|
|
63
|
+
spec.required_ruby_version = ['>= 2.7.0', '< 3.3.0']
|
|
64
64
|
|
|
65
65
|
add_authors(spec)
|
|
66
66
|
add_files(spec)
|
|
67
67
|
add_development_dependencies(spec)
|
|
68
|
-
end
|
|
68
|
+
end
|
data/lib/contrast-agent-lib.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c)
|
|
1
|
+
# Copyright (c) 2023 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
|
|
4
4
|
require 'ffi'
|
|
@@ -10,12 +10,13 @@ module ContrastAgentLib
|
|
|
10
10
|
include ContrastAgentLib::OS
|
|
11
11
|
LINUX_LIB = File.join(__dir__, '..', 'usage_files/libcontrast_c.so')
|
|
12
12
|
MAC_LIB = File.join(__dir__, '..', 'usage_files/libcontrast_c.dylib')
|
|
13
|
+
MAC_M1_LIB = File.join(__dir__, '..', 'usage_files/libcontrast_darwin_arm.dylib')
|
|
13
14
|
ALPINE_LIB = File.join(__dir__, '..', 'usage_files/libcontrast_c_musl.so')
|
|
14
15
|
# Since we need two different extensions for each platform we
|
|
15
16
|
# need to detect the used OS before loading the dynamic library.
|
|
16
17
|
CONTRAST_C = if ContrastAgentLib::OS.linux?
|
|
17
18
|
ContrastAgentLib::OS.alpine? ? ALPINE_LIB : LINUX_LIB
|
|
18
19
|
else
|
|
19
|
-
MAC_LIB
|
|
20
|
+
ContrastAgentLib::OS.m1_mac? ? MAC_M1_LIB : MAC_LIB
|
|
20
21
|
end
|
|
21
|
-
end
|
|
22
|
+
end
|
data/lib/utils/os.rb
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
# Copyright (c)
|
|
1
|
+
# Copyright (c) 2023 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
|
|
4
|
+
require 'rbconfig'
|
|
5
|
+
|
|
4
6
|
module ContrastAgentLib
|
|
5
7
|
module OS
|
|
6
8
|
class << self
|
|
@@ -17,6 +19,10 @@ module ContrastAgentLib
|
|
|
17
19
|
@_mac
|
|
18
20
|
end
|
|
19
21
|
|
|
22
|
+
def m1_mac?
|
|
23
|
+
mac? && RbConfig::CONFIG['host_cpu'].include?('arm64')
|
|
24
|
+
end
|
|
25
|
+
|
|
20
26
|
def unix?
|
|
21
27
|
!windows?
|
|
22
28
|
end
|
data/lib/utils/version.rb
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# Copyright (c)
|
|
1
|
+
# Copyright (c) 2023 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details.
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
|
|
4
4
|
module ContrastAgentLib
|
|
5
5
|
module Version
|
|
6
|
-
VERSION='0.1.
|
|
6
|
+
VERSION='0.1.5'
|
|
7
7
|
end
|
|
8
8
|
end
|
data/scripts/build_gem.sh
CHANGED
|
@@ -5,6 +5,4 @@ set -Eeuo pipefail
|
|
|
5
5
|
gem build contrast-agent-lib.gemspec
|
|
6
6
|
|
|
7
7
|
# Push to RubyGems
|
|
8
|
-
#
|
|
9
|
-
#curl -u username https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials;
|
|
10
|
-
#chmod 0600 ~/.gem/credentials
|
|
8
|
+
# This is moved as separate job in the pipeline
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: contrast-agent-lib
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- teodor.raychev@contrastsecurity.com
|
|
@@ -12,7 +12,7 @@ authors:
|
|
|
12
12
|
autorequire:
|
|
13
13
|
bindir: bin
|
|
14
14
|
cert_chain: []
|
|
15
|
-
date:
|
|
15
|
+
date: 2023-01-19 00:00:00.000000000 Z
|
|
16
16
|
dependencies:
|
|
17
17
|
- !ruby/object:Gem::Dependency
|
|
18
18
|
name: ffi
|
|
@@ -54,6 +54,7 @@ files:
|
|
|
54
54
|
- usage_files/libcontrast_c.dylib
|
|
55
55
|
- usage_files/libcontrast_c.so
|
|
56
56
|
- usage_files/libcontrast_c_musl.so
|
|
57
|
+
- usage_files/libcontrast_darwin_arm.dylib
|
|
57
58
|
homepage: https://www.contrastsecurity.com
|
|
58
59
|
licenses:
|
|
59
60
|
- CONTRAST SECURITY (see license file)
|
|
@@ -69,14 +70,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
69
70
|
version: 2.7.0
|
|
70
71
|
- - "<"
|
|
71
72
|
- !ruby/object:Gem::Version
|
|
72
|
-
version: 3.
|
|
73
|
+
version: 3.3.0
|
|
73
74
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
75
|
requirements:
|
|
75
76
|
- - ">="
|
|
76
77
|
- !ruby/object:Gem::Version
|
|
77
78
|
version: '0'
|
|
78
79
|
requirements: []
|
|
79
|
-
rubygems_version: 3.
|
|
80
|
+
rubygems_version: 3.4.4
|
|
80
81
|
signing_key:
|
|
81
82
|
specification_version: 4
|
|
82
83
|
summary: This is the Ruby Interface for Rust Agent Library
|