aggregate_root 0.17.0 → 0.18.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: 7d536f1587967debb20d4db8e4a4b782868f9802
4
- data.tar.gz: '087c3d16f08ceaec49effa9b4b00739827d69d22'
3
+ metadata.gz: 2b5b3069b14bd4c7759b9ddcf627d9a68cb4d0bd
4
+ data.tar.gz: 70688cfdc79948760a2c94769c302430a4cf9e19
5
5
  SHA512:
6
- metadata.gz: 3b7417ffa90b11cdacdf099890fd72ce82917966258d58b498521ff6eae903b5838da934dfabae841d2bb0fa58f7266e40016fcc3ab3ed5a58e14e3e07fb0d4b
7
- data.tar.gz: 8bc55c0a2ec2114e75aaffdf8e8b3c3209ef615492d807206324c6ff8df4eb8344439b0c9f934853d8dea4bbe127693686db8498687c6001883db93f69e22ef7
6
+ metadata.gz: 6fbc782e68fd317241d89eddcd0a007faf5b19a4fd106b6971502962f03db0a0cc4ec00c84fb8ae585f0cdac65cbdbcd51eecb15ef499b8143a068c16ab7b275
7
+ data.tar.gz: 61b891817481e50eab69d3bc95f6eb44d5dbc484a8397f7fd7c82aafc836a77d70ae38bb536cf8b5791ee440b1ad369cce7e0cd8f45018058960cead90aed2d2
data/Makefile CHANGED
@@ -1,9 +1,9 @@
1
- install-bundler: ## Install gem dependencies
1
+ GEM_VERSION = `cat ../RES_VERSION`
2
+
3
+ install: ## Install gem dependencies
2
4
  @echo "Installing gem dependencies"
3
5
  @bundle install
4
6
 
5
- install: install-bundler ## Prepare current development environment
6
-
7
7
  test: ## Run tests
8
8
  @echo "Running basic tests - beware: this won't guarantee build pass"
9
9
  @bundle exec rspec
@@ -12,13 +12,16 @@ mutate: test ## Run mutation tests
12
12
  @echo "Running mutation tests - only 100% free mutation will be accepted"
13
13
  @bundle exec mutant --include lib --require aggregate_root --use rspec "AggregateRoot*"
14
14
 
15
- release:
16
- @rake build
17
- @rake release:rubygem_push
15
+ build:
16
+ @gem build -V aggregate_root.gemspec
17
+ @mkdir -p pkg/
18
+ @mv aggregate_root-$(GEM_VERSION).gem pkg/
18
19
 
19
- .PHONY: help
20
+ release: build
21
+ @gem push pkg/aggregate_root-$(GEM_VERSION).gem
20
22
 
21
23
  help:
22
24
  @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
23
25
 
26
+ .PHONY: help
24
27
  .DEFAULT_GOAL := help
@@ -19,14 +19,12 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ['lib']
21
21
 
22
- spec.add_development_dependency 'bundler', '~> 1.9'
22
+ spec.add_development_dependency 'bundler', '~> 1.15'
23
23
  spec.add_development_dependency 'rake', '~> 10.0'
24
- spec.add_development_dependency 'pry'
25
- spec.add_development_dependency 'rspec'
26
- spec.add_development_dependency 'rails', '~> 4.2.1'
27
- spec.add_development_dependency 'ruby_event_store', '= 0.17.0'
28
- spec.add_development_dependency 'mutant', '0.8.12'
29
- spec.add_development_dependency 'mutant-rspec', '0.8.11'
24
+ spec.add_development_dependency 'rspec', '~> 3.6'
25
+ spec.add_development_dependency 'rails', '~> 4.2'
26
+ spec.add_development_dependency 'ruby_event_store', '= 0.18.0'
27
+ spec.add_development_dependency 'mutant-rspec', '~> 0.8.14'
30
28
 
31
29
  spec.add_dependency 'activesupport', '>= 3.0'
32
30
  end
@@ -7,7 +7,7 @@ module AggregateRoot
7
7
  def apply(*events)
8
8
  events.each do |event|
9
9
  apply_strategy.(self, event)
10
- unpublished_events << event
10
+ unpublished << event
11
11
  end
12
12
  end
13
13
 
@@ -28,10 +28,14 @@ module AggregateRoot
28
28
  @unpublished_events = nil
29
29
  end
30
30
 
31
+ def unpublished_events
32
+ unpublished.each
33
+ end
34
+
31
35
  private
32
36
  attr_reader :loaded_from_stream_name
33
37
 
34
- def unpublished_events
38
+ def unpublished
35
39
  @unpublished_events ||= []
36
40
  end
37
41
 
@@ -1,3 +1,3 @@
1
1
  module AggregateRoot
2
- VERSION = "0.17.0"
2
+ VERSION = "0.18.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aggregate_root
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arkency
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-15 00:00:00.000000000 Z
11
+ date: 2017-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.9'
19
+ version: '1.15'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.9'
26
+ version: '1.15'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,90 +38,62 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
- - !ruby/object:Gem::Dependency
42
- name: pry
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: rspec
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
- - - ">="
45
+ - - "~>"
60
46
  - !ruby/object:Gem::Version
61
- version: '0'
47
+ version: '3.6'
62
48
  type: :development
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
- - - ">="
52
+ - - "~>"
67
53
  - !ruby/object:Gem::Version
68
- version: '0'
54
+ version: '3.6'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: rails
71
57
  requirement: !ruby/object:Gem::Requirement
72
58
  requirements:
73
59
  - - "~>"
74
60
  - !ruby/object:Gem::Version
75
- version: 4.2.1
61
+ version: '4.2'
76
62
  type: :development
77
63
  prerelease: false
78
64
  version_requirements: !ruby/object:Gem::Requirement
79
65
  requirements:
80
66
  - - "~>"
81
67
  - !ruby/object:Gem::Version
82
- version: 4.2.1
68
+ version: '4.2'
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: ruby_event_store
85
71
  requirement: !ruby/object:Gem::Requirement
86
72
  requirements:
87
73
  - - '='
88
74
  - !ruby/object:Gem::Version
89
- version: 0.17.0
75
+ version: 0.18.0
90
76
  type: :development
91
77
  prerelease: false
92
78
  version_requirements: !ruby/object:Gem::Requirement
93
79
  requirements:
94
80
  - - '='
95
81
  - !ruby/object:Gem::Version
96
- version: 0.17.0
97
- - !ruby/object:Gem::Dependency
98
- name: mutant
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - '='
102
- - !ruby/object:Gem::Version
103
- version: 0.8.12
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - '='
109
- - !ruby/object:Gem::Version
110
- version: 0.8.12
82
+ version: 0.18.0
111
83
  - !ruby/object:Gem::Dependency
112
84
  name: mutant-rspec
113
85
  requirement: !ruby/object:Gem::Requirement
114
86
  requirements:
115
- - - '='
87
+ - - "~>"
116
88
  - !ruby/object:Gem::Version
117
- version: 0.8.11
89
+ version: 0.8.14
118
90
  type: :development
119
91
  prerelease: false
120
92
  version_requirements: !ruby/object:Gem::Requirement
121
93
  requirements:
122
- - - '='
94
+ - - "~>"
123
95
  - !ruby/object:Gem::Version
124
- version: 0.8.11
96
+ version: 0.8.14
125
97
  - !ruby/object:Gem::Dependency
126
98
  name: activesupport
127
99
  requirement: !ruby/object:Gem::Requirement
@@ -147,7 +119,6 @@ files:
147
119
  - Gemfile
148
120
  - Makefile
149
121
  - README.md
150
- - Rakefile
151
122
  - aggregate_root.gemspec
152
123
  - lib/aggregate_root.rb
153
124
  - lib/aggregate_root/configuration.rb
data/Rakefile DELETED
@@ -1,4 +0,0 @@
1
- require 'bundler/gem_tasks'
2
- require 'rspec/core/rake_task'
3
- RSpec::Core::RakeTask.new(:spec)
4
- task default: :spec