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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c1fe9490b626641ff8d704bdfd304cd593bb95de
4
- data.tar.gz: d2b97f7554e814a004f4b36aba06f62f8d8718ea
3
+ metadata.gz: f980a0a7d00cd7ae3afde6b14bbf1d0ac2458532
4
+ data.tar.gz: aa0195339109ced497fdb7ba64be7d11e2eb0c8f
5
5
  SHA512:
6
- metadata.gz: a74dbe386ec32f1afe4551092360bcd3bb1c49858e3168ecbbf850f40bea0a030ef1386a05585c9a5077006316a2f40618752ad6ec7a20022e03c8b2ccb543e2
7
- data.tar.gz: 4b21d049118ff2a985b26ce6ef2e0eb3d884af7fc1cfb52397fed377120987ed74bdb4809b559238cf0d893283b3367d2dd3ee6ec4abae2b6804cef4af8c7d70
6
+ metadata.gz: ba37017768a9ce6ebd23949b28d573e798e531f8783108b7f5a29ba7c69f3991dc803d0216810615825269d794adec1533758c2788568cd3f4de705daa1fd84e
7
+ data.tar.gz: 5d38ccd26ac916312661160e8ed99ffd1ed4fdfd195b87e674b83e4cca7c24d31bec8dc1109352a049d989c7fa97bf5c42c819acefe6b423f4d793845081a865
data/lib/eventq_base.rb CHANGED
@@ -1,6 +1,8 @@
1
1
  require 'securerandom'
2
2
  require 'redlock'
3
3
  require 'class_kit'
4
+ require 'hash_kit'
5
+
4
6
 
5
7
  require_relative 'eventq_base/version'
6
8
  require_relative 'eventq_base/eventq_logger'
@@ -6,7 +6,11 @@ module EventQ
6
6
  end
7
7
 
8
8
  def self.serialization_provider
9
- @serialization_provider ||= EventQ::SerializationProviders::OJ_PROVIDER
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
- require_relative 'serialization_providers/oj_serialization_provider'
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
- @providers[OJ_PROVIDER] = EventQ::SerializationProviders::OjSerializationProvider
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
@@ -10,7 +10,6 @@ module EventQ
10
10
  end
11
11
 
12
12
  def serialize(object)
13
- require 'json'
14
13
  JSON.dump(object_to_hash(object))
15
14
  end
16
15
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module EventqBase
2
- VERSION = "1.14.1"
2
+ VERSION = "1.15.0"
3
3
  end
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.14.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-25 00:00:00.000000000 Z
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: