soar_auditor_api 0.0.9 → 0.0.10

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
  SHA1:
3
- metadata.gz: c350e5d094080196dc7869897c05ae704eee30a5
4
- data.tar.gz: 27e92d4b5df9feb1c3794f5c0832f87ee4b12bbd
3
+ metadata.gz: 4f7d388c7150ce02b85c2930e5e8fe363fd6777f
4
+ data.tar.gz: 5b736712773043754a2b10dbd936f6f83e834bf6
5
5
  SHA512:
6
- metadata.gz: 28a2a5c16f1f9e0042b2b9a23ded0a0f4095703cf2376022e0fd7915cade23614beeb0281039f25230474e128827bb12262505ce65eecf8ccc2cb56cd8755144
7
- data.tar.gz: f7f97ebd0a60a08f42553a0b5a19feedfe3e97f05559127374f75eb7667162dcc8f0c674107cc710224b82393fe5590094a5420570599f66301d3bb3c7d62dc5
6
+ metadata.gz: f2aba4a359f10c8182d21cb50984b9080443bc2e5e6a35a15e5e8fcda4bd28a216aee6f7877bb41c87f846974e5fc5e05c2c5b1e9b11b51841cf604d943f747f
7
+ data.tar.gz: 920aa0f288b90540c9e667da567715270480498cb57c73009d657954541b1973a847d2b1276196c1d63c6d07b04c704d3fcc4f383dc16d18fe405078f0a820b3
data/.gitignore CHANGED
@@ -11,7 +11,7 @@ juddi-distro-*
11
11
  *.swp
12
12
  *.gem
13
13
  *.rbc
14
- /Gemfile.lock
14
+ Gemfile.lock
15
15
  /.config
16
16
  /coverage/
17
17
  /InstalledFiles
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
- 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}]"
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
@@ -1,3 +1,3 @@
1
1
  module SoarAuditorApi
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
data/sanity/Gemfile CHANGED
@@ -2,4 +2,4 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem 'byebug'
4
4
  #gem 'soar_auditor_api', :path => '/home/barney/git/soar_auditor_api'
5
- gem 'soar_auditor_api', "~> 0.0.8"
5
+ gem 'soar_auditor_api', "~> 0.0.10"
data/sanity/sanity.rb CHANGED
@@ -33,7 +33,8 @@ class Main
33
33
  @iut << 'Rack::CommonLogger requires this'
34
34
 
35
35
  serializable_object = TestSerializable.new("some data")
36
- serializable_object.to_s
36
+ puts serializable_object.to_s
37
+
37
38
  end
38
39
  end
39
40
 
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.9
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-27 00:00:00.000000000 Z
11
+ date: 2016-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler