eventq_base 1.14.1 → 1.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/eventq_base.rb +2 -0
- data/lib/eventq_base/configuration.rb +5 -1
- data/lib/eventq_base/serialization_providers.rb +6 -2
- data/lib/eventq_base/serialization_providers/json_serialization_provider.rb +0 -1
- data/lib/eventq_base/serialization_providers/oj_serialization_provider.rb +1 -2
- data/lib/eventq_base/version.rb +1 -1
- metadata +44 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f980a0a7d00cd7ae3afde6b14bbf1d0ac2458532
|
4
|
+
data.tar.gz: aa0195339109ced497fdb7ba64be7d11e2eb0c8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba37017768a9ce6ebd23949b28d573e798e531f8783108b7f5a29ba7c69f3991dc803d0216810615825269d794adec1533758c2788568cd3f4de705daa1fd84e
|
7
|
+
data.tar.gz: 5d38ccd26ac916312661160e8ed99ffd1ed4fdfd195b87e674b83e4cca7c24d31bec8dc1109352a049d989c7fa97bf5c42c819acefe6b423f4d793845081a865
|
data/lib/eventq_base.rb
CHANGED
@@ -6,7 +6,11 @@ module EventQ
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def self.serialization_provider
|
9
|
-
|
9
|
+
if RUBY_PLATFORM =~ /java/
|
10
|
+
@serialization_provider ||= EventQ::SerializationProviders::JSON_PROVIDER
|
11
|
+
else
|
12
|
+
@serialization_provider ||= EventQ::SerializationProviders::OJ_PROVIDER
|
13
|
+
end
|
10
14
|
end
|
11
15
|
|
12
16
|
def self.signature_provider=(value)
|
@@ -1,5 +1,7 @@
|
|
1
1
|
require_relative 'serialization_providers/json_serialization_provider'
|
2
|
-
|
2
|
+
unless RUBY_PLATFORM =~ /java/
|
3
|
+
require_relative 'serialization_providers/oj_serialization_provider'
|
4
|
+
end
|
3
5
|
require_relative 'serialization_providers/binary_serialization_provider'
|
4
6
|
|
5
7
|
module EventQ
|
@@ -12,7 +14,9 @@ module EventQ
|
|
12
14
|
class Manager
|
13
15
|
def initialize
|
14
16
|
@providers = {}
|
15
|
-
|
17
|
+
unless RUBY_PLATFORM =~ /java/
|
18
|
+
@providers[OJ_PROVIDER] = EventQ::SerializationProviders::OjSerializationProvider
|
19
|
+
end
|
16
20
|
@providers[JSON_PROVIDER] = EventQ::SerializationProviders::JsonSerializationProvider
|
17
21
|
@providers[BINARY_PROVIDER] = EventQ::SerializationProviders::BinarySerializationProvider
|
18
22
|
end
|
@@ -3,16 +3,15 @@ module EventQ
|
|
3
3
|
class OjSerializationProvider
|
4
4
|
|
5
5
|
def initialize
|
6
|
+
require 'oj'
|
6
7
|
@json_serializer = EventQ::SerializationProviders::JsonSerializationProvider.new
|
7
8
|
end
|
8
9
|
|
9
10
|
def serialize(object)
|
10
|
-
require 'oj'
|
11
11
|
return Oj.dump(object, mode: :object)
|
12
12
|
end
|
13
13
|
|
14
14
|
def deserialize(json)
|
15
|
-
require 'oj'
|
16
15
|
begin
|
17
16
|
return Oj.load(json)
|
18
17
|
rescue Oj::ParseError
|
data/lib/eventq_base/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eventq_base
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vaughanbrittonsage
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -66,6 +66,48 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: redlock
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: oj
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: openssl
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
69
111
|
description: This gem contains the base classes and contracts required by any eventq
|
70
112
|
implementations.
|
71
113
|
email:
|