soar_auditor_api 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/README.md +6 -0
- data/lib/soar_auditor_api/serializable.rb +11 -4
- data/lib/soar_auditor_api/version.rb +1 -1
- data/sanity/Gemfile +1 -1
- data/sanity/sanity.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f7d388c7150ce02b85c2930e5e8fe363fd6777f
|
4
|
+
data.tar.gz: 5b736712773043754a2b10dbd936f6f83e834bf6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2aba4a359f10c8182d21cb50984b9080443bc2e5e6a35a15e5e8fcda4bd28a216aee6f7877bb41c87f846974e5fc5e05c2c5b1e9b11b51841cf604d943f747f
|
7
|
+
data.tar.gz: 920aa0f288b90540c9e667da567715270480498cb57c73009d657954541b1973a847d2b1276196c1d63c6d07b04c704d3fcc4f383dc16d18fe405078f0a820b3
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -31,6 +31,12 @@ Behavioural driven testing can be performed:
|
|
31
31
|
|
32
32
|
$ bundle exec rspec -cfd spec/*
|
33
33
|
|
34
|
+
Sanity testing can be performed:
|
35
|
+
|
36
|
+
$ cd sanity
|
37
|
+
$ bundle install
|
38
|
+
$ bundle exec ruby sanity.rb
|
39
|
+
|
34
40
|
## Usage
|
35
41
|
|
36
42
|
### Auditors that extend from the AuditorAPI
|
@@ -5,14 +5,21 @@ module SoarAuditorApi
|
|
5
5
|
end
|
6
6
|
|
7
7
|
def serialize
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
begin
|
9
|
+
require "base64"
|
10
|
+
utf8_data = @data.to_s.encode(Encoding::UTF_8)
|
11
|
+
urlsafe_base64_data = Base64.urlsafe_encode64(utf8_data)
|
12
|
+
"[serialized:#{urlsafe_base64_data}]"
|
13
|
+
rescue
|
14
|
+
raise SerializationError, "General failure serializing the object data"
|
15
|
+
end
|
12
16
|
end
|
13
17
|
|
14
18
|
def to_s
|
15
19
|
raise NotImplementedError, "Class must implement to_s method when extending Serializable"
|
16
20
|
end
|
17
21
|
end
|
22
|
+
|
23
|
+
class SerializationError < StandardError
|
24
|
+
end
|
18
25
|
end
|
data/sanity/Gemfile
CHANGED
data/sanity/sanity.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: soar_auditor_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Barney de Villiers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|