contrast-agent-lib 0.1.3 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c48f5ba49fc4230ebce12b9ac7b9cd5e3821d9443ed26c990845ea435b17876
4
- data.tar.gz: 302b23aae1691c39ae6e4b1b09e88d61442ec859ec4b3ef56792f9fc3e32e496
3
+ metadata.gz: 33852f7c0ff32dda5f1bb383ea6e22cccbe9f6a8e9eb86d931d42fd87f4ba97d
4
+ data.tar.gz: f8d8483d5eccf6dac6a4c0d14fc0db4cd7a6310b0edaa6ee48d1e6cf2036637d
5
5
  SHA512:
6
- metadata.gz: b2f22e6e14cd583bd3660d754e5ac5473b654a6a59891d3dd4d27f4a3dd6c1d3f37b59a1e698dd26d819118580775dca0825a7860840afbd444a2204d6bbd201
7
- data.tar.gz: b38273a663ad3bc522a7390444c709f5dee5401387a27dd22a2fbbbfa0e0cfc50248c40b82b11ec6dad6c88cdc20cc2e7ff2073c3b79c54137dca2d0a69b8f29
6
+ metadata.gz: 6223cc990aef9e0c680ff225a7e2a497fc1deb9760b2518a24d1d2dc7f7298f5806bdc6cc1caf1d2691248d13fe1f9a2f13e685e4eca6a539b383fe6be993505
7
+ data.tar.gz: 64d87019fb7f61c59d613efda6f06540261c8c52ae56918a70472f6d0edfaead92f24e54be21109550c14ce44a60429eb0a30ef8a83c3b2c886af5a8bdd93a05
@@ -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.2.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
@@ -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
@@ -3,6 +3,6 @@
3
3
 
4
4
  module ContrastAgentLib
5
5
  module Version
6
- VERSION='0.1.3'
6
+ VERSION='0.1.4'
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
- # Preferably will be moved as pipeline step on tag only
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
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.3
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-10-07 00:00:00.000000000 Z
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.2.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