alamojoe 0.2.4 → 0.2.8

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: 24572b4fdc6c8b6e1430b482ee42fb862869881c5909f47d5bc3054453b40faf
4
- data.tar.gz: 776b11796f99c5402ba9e1c9d4424921b3a9c98c0d9c261fba5934cb92a976a2
3
+ metadata.gz: ea61d115175615a4b0136a6d109d6cb2671c61043c8413ef66f3b660b9464ff2
4
+ data.tar.gz: e18254b34c1544579b46128bb3b8176ab391cb28d88633f0a2c368c5582a3e36
5
5
  SHA512:
6
- metadata.gz: 3b9ec2c09d56a8816789443dcc13aa5fb7397bdba0ed5e482d44921684ce2ddff921ef1674702ff59849c371651e34c1af5657dbca2dce659e5f173b972077e5
7
- data.tar.gz: b51e6ee7aceb80c9b5ed3b4c826e4af515b53323f634b9c906d81d924b76c3c418127d7ceda9839124891a6f29be5daea3b868412b6feb0012af68aec17cdccf
6
+ metadata.gz: beb0d4134c9f320e1af89d9447fb4f4e58d3a92812193c770e24e98b10559085280e04a6ae5cf6398bc44e4cc6b215755edc59485d1644eab5c7b54a2e7b57e1
7
+ data.tar.gz: fab5ac7f56070855a20cd199c13a97629e67b33c3ff1d72cc4293e46af3d1fa0f7c702b122d7c2bf12c879d7703a96035e54cc9e484a71e67d47a69d386de042
data/lib/alamojoe.rb CHANGED
@@ -1,10 +1,11 @@
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
- module Alamojoe
8
+ module AlamojoeCLib
8
9
  extend FFI::Library
9
10
 
10
11
  # set environment variables
@@ -14,7 +15,20 @@ module Alamojoe
14
15
 
15
16
  ffi_lib (__dir__ + '/libcore.so')
16
17
  attach_function :configure, [:string], :int
18
+ end
19
+
20
+ module Alamojoe
21
+ def self.configure(args)
22
+ puts('args', args)
23
+ puts('args.class', args.class)
17
24
 
18
- class Error < StandardError
25
+ if args.is_a?(Hash)
26
+ args[:sdk_version] = Alamojoe::VERSION
27
+ return Alamojoe.configure(args.to_json)
28
+ else
29
+ err_msg = '[ERROR] [fnGuard] configuration error. config values must be a hash, i.e., {policy_group_name: "my_policy_group_name"}'
30
+ puts(err_msg)
31
+ raise err_msg
32
+ end
19
33
  end
20
34
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alamojoe
4
- VERSION = "0.2.4"
4
+ VERSION = "0.2.8"
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.4
4
+ version: 0.2.8
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-20 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