contrast-agent-lib 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/contrast-agent-lib.gemspec +2 -2
- data/lib/contrast-agent-lib.rb +3 -2
- data/lib/utils/os.rb +6 -0
- data/lib/utils/version.rb +1 -1
- 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: 33852f7c0ff32dda5f1bb383ea6e22cccbe9f6a8e9eb86d931d42fd87f4ba97d
|
4
|
+
data.tar.gz: f8d8483d5eccf6dac6a4c0d14fc0db4cd7a6310b0edaa6ee48d1e6cf2036637d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6223cc990aef9e0c680ff225a7e2a497fc1deb9760b2518a24d1d2dc7f7298f5806bdc6cc1caf1d2691248d13fe1f9a2f13e685e4eca6a539b383fe6be993505
|
7
|
+
data.tar.gz: 64d87019fb7f61c59d613efda6f06540261c8c52ae56918a70472f6d0edfaead92f24e54be21109550c14ce44a60429eb0a30ef8a83c3b2c886af5a8bdd93a05
|
data/contrast-agent-lib.gemspec
CHANGED
@@ -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', '
|
63
|
+
spec.required_ruby_version = ['>= 2.7.0', '<= 3.2.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
@@ -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
1
|
# Copyright (c) 2022 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
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.4
|
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: 2022-
|
15
|
+
date: 2022-11-29 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)
|
@@ -67,7 +68,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
67
68
|
- - ">="
|
68
69
|
- !ruby/object:Gem::Version
|
69
70
|
version: 2.7.0
|
70
|
-
- - "
|
71
|
+
- - "<="
|
71
72
|
- !ruby/object:Gem::Version
|
72
73
|
version: 3.2.0
|
73
74
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
@@ -76,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
76
77
|
- !ruby/object:Gem::Version
|
77
78
|
version: '0'
|
78
79
|
requirements: []
|
79
|
-
rubygems_version: 3.
|
80
|
+
rubygems_version: 3.3.26
|
80
81
|
signing_key:
|
81
82
|
specification_version: 4
|
82
83
|
summary: This is the Ruby Interface for Rust Agent Library
|