euston 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/euston.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'euston'
3
- s.version = '1.2.2'
4
- s.date = '2011-10-18'
3
+ s.version = '1.2.3'
4
+ s.date = '2011-10-24'
5
5
  s.platform = RUBY_PLATFORM.to_s == 'java' ? 'java' : Gem::Platform::RUBY
6
6
  s.authors = ['Lee Henson', 'Guy Boertje']
7
7
  s.email = ['lee.m.henson@gmail.com', 'guyboertje@gmail.com']
@@ -23,7 +23,13 @@ module Euston
23
23
  end
24
24
 
25
25
  def read_attribute_for_validation key
26
- @body[key]
26
+ match = /^__(.*)/.match(key.to_s)
27
+
28
+ if match.nil?
29
+ @body[key]
30
+ else
31
+ headers[match[1].to_sym]
32
+ end
27
33
  end
28
34
 
29
35
  def type
@@ -39,5 +45,9 @@ module Euston
39
45
  end
40
46
 
41
47
  attr_reader :body
48
+
49
+ validates :__id, :presence => true, :format => { :with => /^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$/ }
50
+ validates :__type, :presence => true
51
+ validates :__version, :presence => true, :numericality => { :greater_than => 0, :only_integer => true }
42
52
  end
43
53
  end
@@ -1,3 +1,3 @@
1
1
  module Euston
2
- VERSION = "1.2.2"
2
+ VERSION = "1.2.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: euston
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2011-10-18 00:00:00.000000000 Z
13
+ date: 2011-10-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activemodel
17
- requirement: &75071220 !ruby/object:Gem::Requirement
17
+ requirement: &70270530479600 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 3.0.10
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *75071220
25
+ version_requirements: *70270530479600
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: activesupport
28
- requirement: &75070980 !ruby/object:Gem::Requirement
28
+ requirement: &70270530478760 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 3.0.10
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *75070980
36
+ version_requirements: *70270530478760
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: fuubar
39
- requirement: &75070750 !ruby/object:Gem::Requirement
39
+ requirement: &70270530478060 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ~>
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: 0.0.0
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *75070750
47
+ version_requirements: *70270530478060
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rspec
50
- requirement: &75070520 !ruby/object:Gem::Requirement
50
+ requirement: &70270530477300 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ~>
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: 2.6.0
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *75070520
58
+ version_requirements: *70270530477300
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: uuid
61
- requirement: &75070290 !ruby/object:Gem::Requirement
61
+ requirement: &70270530476640 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ~>
@@ -66,7 +66,7 @@ dependencies:
66
66
  version: 2.3.0
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *75070290
69
+ version_requirements: *70270530476640
70
70
  description: ''
71
71
  email:
72
72
  - lee.m.henson@gmail.com
@@ -124,4 +124,8 @@ rubygems_version: 1.8.10
124
124
  signing_key:
125
125
  specification_version: 3
126
126
  summary: Cqrs tooling.
127
- test_files: []
127
+ test_files:
128
+ - spec/aggregate_command_map_spec.rb
129
+ - spec/aggregate_root_samples.rb
130
+ - spec/aggregate_root_spec.rb
131
+ - spec/spec_helper.rb