alamojoe 0.2.3 → 0.2.7

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: 76d6c18513112f475e98a8f7ecae88741a364f6121b9c5e4462fe96051839dab
4
- data.tar.gz: b7c764035fd1fd4b60caa3ba242202c946a2ad7d2b6789875b33a9025c5aa86d
3
+ metadata.gz: 5453108cf164bf1e38e28d2d45b35354458ea5c97cd625b749bf17e475576c77
4
+ data.tar.gz: 86f82f42f5e284b157111a207e1de363c851ce56550782da55308afbc468017e
5
5
  SHA512:
6
- metadata.gz: da580517d3e07c2bb63080220d1c105ee70599a245e40ccb9aad3b7db6acea7086e6a009a660ff879c7bff26d2e2528c6565d32a28b18be131fba332b7b288b7
7
- data.tar.gz: 00fe1ca087f259d34cb19e2c7cdec0a02bc450b730607106991babac171bd443faca4f116c8ac00eaa5f9e0f129c89b99adc760babd9f5690d99d17cc82a12a7
6
+ metadata.gz: b0a5dce508bd098c4cf372e5de454b9e0a2618efb146ef1be4c435b734d4ff8c166052b2abc67ffa7cac71092e2165c7983e1acbaf7f46edbd48b07e8cc5622d
7
+ data.tar.gz: 8ab609e5f9de1120c6800691e645c3efe438df33d986062907de608610c8bf2283c366807113e8831e247c90b0bf9a5f8393c868f46131150a0f61e0e7454748
data/lib/alamojoe.rb CHANGED
@@ -1,21 +1,31 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'ffi'
4
+ require 'json'
4
5
 
5
6
  require_relative 'alamojoe/version'
6
7
 
7
- puts Dir.pwd
8
-
9
- module Alamojoe
8
+ module AlamojoeCLib
10
9
  extend FFI::Library
11
10
 
12
11
  # set environment variables
13
12
  ENV['EXSEC_RUNTIME_LANGUAGE'] = 'RUBY'
14
13
  ENV['EXSEC_RUNTIME_LANGUAGE_VERSION'] = RUBY_VERSION
14
+ ENV['EXSEC_APP_DIR'] = Dir.pwd
15
15
 
16
16
  ffi_lib (__dir__ + '/libcore.so')
17
17
  attach_function :configure, [:string], :int
18
+ end
18
19
 
19
- class Error < StandardError
20
+ module Alamojoe
21
+ def self.configure(args)
22
+ if args.is_a?(Hash)
23
+ args[:sdk_version] = Alamojoe::VERSION
24
+ return Alamojoe.configure(args.to_json)
25
+ else
26
+ err_msg = '[ERROR] [fnGuard] configuration error. config values must be a hash, i.e., {policy_group_name: "my_policy_group_name"}'
27
+ puts(err_msg)
28
+ raise err_msg
29
+ end
20
30
  end
21
31
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alamojoe
4
- VERSION = "0.2.3"
4
+ VERSION = "0.2.7"
5
5
  end
data/lib/libcore.so CHANGED
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alamojoe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alamo Joe
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-19 00:00:00.000000000 Z
11
+ date: 2021-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi