evt-message_store 2.3.0.1 → 2.3.0.2

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
  SHA256:
3
- metadata.gz: b777645958ebee32e1bf5f9936e8a1ae7e15cc70703b3bc42a377dfeeb04d7df
4
- data.tar.gz: 8164c917bf8faa2a81ab55f80e9b1b6a68b9995c7e0f72f021439377383f68b8
3
+ metadata.gz: 10704ac2544b2ef44429b0e55c4c44ccc78fe460c141b1927997b00d7d2dea75
4
+ data.tar.gz: b217d7aa1b18943f71cfb8c450c3820da418ec6c465acfe23c02cf948563a925
5
5
  SHA512:
6
- metadata.gz: 49d31552762c49038c07718febda3aad7870ab0e3525ed5d6c781977bc6048cf29766ca808b011db0612132b787c8790911b616c93c523c2dfa39b2cefbe6a7a
7
- data.tar.gz: d831863202b65b48fbf7bb28595e1aba068610409989ccedf101ca7b33f3cc5727f55cdb1f73f87907550ef5effb004bdfdde022c747a4f067fb545b48a138df
6
+ metadata.gz: a898788cd605db367f529f2f750899b40cf164908ee8297c0e3e3e092c246953704a2021be8a25c5b9ace959b14a82536184f641228b6845cb7a49ee3ba2730c
7
+ data.tar.gz: 0272bc2fe2995e8448ccaee0e452037782a03581c0b77844233d27eaec2614971c2625959409c68b273a2027df7609a683ffb52ab21e179b41e075f0ed8203d0
@@ -1,5 +1,6 @@
1
1
  require 'securerandom'
2
2
 
3
+ require 'clock/controls'
3
4
  require 'identifier/uuid/controls'
4
5
 
5
6
  require 'message_store/controls/random_value'
@@ -8,52 +8,54 @@ module MessageStore
8
8
 
9
9
  module Raw
10
10
  def self.example
11
- time = ::Time.parse("Jan 1 00:00:00 UTC 2000")
12
- Clock::UTC.now(time)
11
+ Clock::Controls::Time::Raw.example
13
12
  end
14
13
  end
15
14
 
16
15
  module ISO8601
17
16
  def self.example(time=nil)
18
- time ||= Raw.example
19
- Clock::UTC.iso8601(time)
17
+ Clock::Controls::Time::ISO8601.example(time)
18
+ end
19
+
20
+ def self.precision
21
+ 3
20
22
  end
21
23
  end
22
24
 
23
25
  module Processed
24
26
  def self.example(time=nil, offset_milliseconds: nil)
25
- time ||= Time::Raw.example
26
- time = Raw.example(time, offset_milliseconds: offset_milliseconds)
27
- ISO8601.example(time)
27
+ offset_milliseconds ||= self.offset_milliseconds
28
+ Clock::Controls::Time::Offset.example(offset_milliseconds, time: time, precision: ISO8601.precision)
28
29
  end
29
30
 
30
31
  module Raw
31
32
  def self.example(time=nil, offset_milliseconds: nil)
32
- time ||= Time::Raw.example
33
- offset_milliseconds ||= 11
34
- offset = Rational(offset_milliseconds, 1000)
35
- time += offset
36
- time
33
+ offset_milliseconds ||= Processed.offset_milliseconds
34
+ Clock::Controls::Time::Offset::Raw.example(offset_milliseconds, time: time, precision: ISO8601.precision)
37
35
  end
38
36
  end
37
+
38
+ def self.offset_milliseconds
39
+ 11
40
+ end
39
41
  end
40
42
 
41
43
  module Effective
42
44
  def self.example(time=nil, offset_milliseconds: nil)
43
- time ||= Time::Raw.example
44
- time = Raw.example(time, offset_milliseconds: offset_milliseconds)
45
- ISO8601.example(time)
45
+ offset_milliseconds ||= self.offset_milliseconds
46
+ Clock::Controls::Time::Offset.example(offset_milliseconds, time: time, precision: ISO8601.precision)
46
47
  end
47
48
 
48
49
  module Raw
49
50
  def self.example(time=nil, offset_milliseconds: nil)
50
- time ||= Time::Raw.example
51
- offset_milliseconds ||= 1
52
- offset = Rational(offset_milliseconds, 1000)
53
- time += offset
54
- time
51
+ offset_milliseconds ||= Effective.offset_milliseconds
52
+ Clock::Controls::Time::Offset::Raw.example(offset_milliseconds, time: time, precision: ISO8601.precision)
55
53
  end
56
54
  end
55
+
56
+ def self.offset_milliseconds
57
+ 1
58
+ end
57
59
  end
58
60
  end
59
61
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evt-message_store
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0.1
4
+ version: 2.3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Eventide Project
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-16 00:00:00.000000000 Z
11
+ date: 2020-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: evt-casing
@@ -178,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
178
  - !ruby/object:Gem::Version
179
179
  version: '0'
180
180
  requirements: []
181
- rubygems_version: 3.0.1
181
+ rubygems_version: 3.1.2
182
182
  signing_key:
183
183
  specification_version: 4
184
184
  summary: Common primitives for platform-specific message store implementations