sourced-message 0.1.0 → 0.1.1

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sourced/message.rb +3 -2
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 31c91f70a00fff9b43bef2a60f506086bac336a5faa52a902c405c9374afe6b5
4
- data.tar.gz: 2a0923e44fe974832e726ec16d2d57b9c8e09de4351984ff92d62c8da1c4ac9f
3
+ metadata.gz: ab48ba13a4c9d34b8b50fac74177da86672fb65bc55ebccd869b53299c24129c
4
+ data.tar.gz: 7c055a6c838bc91f31971bbdc8eb1b1b598d2531ee8627317ba9e2eae572acb3
5
5
  SHA512:
6
- metadata.gz: 7877198025efae1bd7c6264da63091381dd319e5e84507fdd8f45452f3fc68298f6eafcedb005d78e75491df241c14c7364b826f81d534ecf18e9219f5661b89
7
- data.tar.gz: da2f6ee90b5d568708a6a5c6b98f2fd856a6df853d35f1c9a9e482d857e7211becf8b7ef3837abaec0bf62c85f7999198977ecb14062f44f3b7bdf48affe79f2
6
+ metadata.gz: 19774b1fa8a68caa0b3074da601e03710f94f7996a2b6ef2b7dcc593abb32d6c34f8a17a71ea7d5be5ad508e4dafde6ad617518de054f04e3b1f2c56e97c4ac1
7
+ data.tar.gz: b859d67f328cca620ffc66d15f87cfa33054d0b726bdbb17344a7a5d9f6be1adef325b8abfe960bc6f2a6d702dc95fb3583f2bb4ef42539d35251e851acf798d
@@ -22,7 +22,7 @@ module Sourced
22
22
  # +Sourced::Message.registry[type]+ resolves a type registered under any
23
23
  # subclass. Resolve from this root to see the whole tree.
24
24
  class Message < Plumb::Types::Data
25
- VERSION = '0.1.0'
25
+ VERSION = '0.1.1'
26
26
 
27
27
  EMPTY_ARRAY = [].freeze
28
28
 
@@ -40,12 +40,13 @@ module Sourced
40
40
  UnknownMessageError = Class.new(ArgumentError)
41
41
  # Raised by {#at} when a message would be scheduled in the past.
42
42
  PastMessageDateError = Class.new(ArgumentError)
43
+ LaxTime = Types::Time | Types::String.build(::Time, :parse).policy(:rescue, ::ArgumentError)
43
44
 
44
45
  attribute :id, Types::AutoUUID
45
46
  attribute :type, Types::String.present
46
47
  attribute? :causation_id, Types::UUID::V4
47
48
  attribute? :correlation_id, Types::UUID::V4
48
- attribute :created_at, Types::Forms::Time.default { Time.now }
49
+ attribute :created_at, LaxTime.default { Time.now }
49
50
  attribute :metadata, Types::Hash.default(Plumb::BLANK_HASH)
50
51
  attribute :payload, Types::Static[nil]
51
52
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sourced-message
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ismael Celis
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - ">="
17
17
  - !ruby/object:Gem::Version
18
- version: 0.0.17
18
+ version: 0.0.18
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - ">="
24
24
  - !ruby/object:Gem::Version
25
- version: 0.0.17
25
+ version: 0.0.18
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: fugit
28
28
  requirement: !ruby/object:Gem::Requirement