soar_auditor_api 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0a95f40f0ca739e9f3579941814db62cbfd95958
4
- data.tar.gz: 282f41c6aca15d292e102a61961ad78cf901431b
3
+ metadata.gz: c350e5d094080196dc7869897c05ae704eee30a5
4
+ data.tar.gz: 27e92d4b5df9feb1c3794f5c0832f87ee4b12bbd
5
5
  SHA512:
6
- metadata.gz: d52ca0ad5461f7adb2f63ee93e0d97936cbac662826ee041aef8f2f2938adf7d766229f78ba4311045bde58f0790c6c6384346d2d508235ba6143bb3f7a7aa95
7
- data.tar.gz: 0355ff52d0d1eec76ac64115751a8a7379c3483e2542ad29cafc12ba887a8ccda67e814fdc8bc5b5a2ab28605397391714de86b242244f3fb8d383f6e217a09d
6
+ metadata.gz: 28a2a5c16f1f9e0042b2b9a23ded0a0f4095703cf2376022e0fd7915cade23614beeb0281039f25230474e128827bb12262505ce65eecf8ccc2cb56cd8755144
7
+ data.tar.gz: f7f97ebd0a60a08f42553a0b5a19feedfe3e97f05559127374f75eb7667162dcc8f0c674107cc710224b82393fe5590094a5420570599f66301d3bb3c7d62dc5
@@ -1,6 +1,6 @@
1
1
  require 'soar_auditor_api/version'
2
- require 'soar_auditor_api/serializable'
3
2
  require 'soar_auditor_api/auditor_api'
3
+ require 'soar_auditor_api/serializable'
4
4
 
5
5
  module SoarAuditorApi
6
6
  end
@@ -0,0 +1,18 @@
1
+ module SoarAuditorApi
2
+ class Serializable
3
+ def initialize (data)
4
+ @data = data
5
+ end
6
+
7
+ def serialize
8
+ require "base64"
9
+ utf8_data = @data.to_s.encode(Encoding::UTF_8)
10
+ urlsafe_base64_data = Base64.urlsafe_encode64(utf8_data)
11
+ "[serialized:#{urlsafe_base64_data}]"
12
+ end
13
+
14
+ def to_s
15
+ raise NotImplementedError, "Class must implement to_s method when extending Serializable"
16
+ end
17
+ end
18
+ end
@@ -1,3 +1,3 @@
1
1
  module SoarAuditorApi
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
data/sanity/Gemfile CHANGED
@@ -1,4 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'byebug'
4
+ #gem 'soar_auditor_api', :path => '/home/barney/git/soar_auditor_api'
4
5
  gem 'soar_auditor_api', "~> 0.0.8"
data/sanity/sanity.rb CHANGED
@@ -1,6 +1,4 @@
1
1
  require 'soar_auditor_api'
2
- require 'soar_auditor_api/serializable'
3
- require 'byebug'
4
2
 
5
3
  class SanityAuditor < SoarAuditorApi::AuditorAPI
6
4
  def configuration_is_valid?(configuration)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soar_auditor_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Barney de Villiers
@@ -86,6 +86,7 @@ files:
86
86
  - bin/setup
87
87
  - lib/soar_auditor_api.rb
88
88
  - lib/soar_auditor_api/auditor_api.rb
89
+ - lib/soar_auditor_api/serializable.rb
89
90
  - lib/soar_auditor_api/version.rb
90
91
  - sanity/.ruby-gemset
91
92
  - sanity/.ruby-version