aggregate_root 0.3.5 → 0.3.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a912c235b0d7fbe5b6256df69193f5b6c6f224f1
4
- data.tar.gz: d5cac27e3b109a57d72557ba78478ee8e99521e0
3
+ metadata.gz: f9abd38a1384a162a47c5d1f171c3baf04dcd3f3
4
+ data.tar.gz: 0e02fdbe90c01263f7eb37a437ff04a4be12ad45
5
5
  SHA512:
6
- metadata.gz: 300afb93c419b4238dce79ce7dffc235f9a52bc1f68dd265c6ba3de5e07a906dadbccd5172b1071415e9d96ebf27a1202c64eec59a8fa671f9f3dfb1ca404245
7
- data.tar.gz: 201bb84c9b8f7162003a0d87b8ebc6f16fd4548aa304e7664a0cbcf05b8c37ef07212ea8d0da98c0119624a60afe6e42b868a764d58314526dd5b4fda2410a03
6
+ metadata.gz: aac50706e44673a3fe21bd9cf1285ee80f497597b8b84819028c1f634cb9c01da64249bf4a7b2b7bb9691c439be1710bca2984cbc7cd33c4a4297f71fe5c276a
7
+ data.tar.gz: 54e6b55343965234660ce8ae8d1369c7681753b4281474944f1764849f6d9ad789261baf72692e2f116b6c54732739468f0f0ba66fa31f37e8d2553d36424951
@@ -1,8 +1,11 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.1.5
3
+ - 2.1.10
4
+ - 2.2.5
5
+ - 2.3.1
4
6
  before_install: gem install bundler
5
7
  gemfile: Gemfile
8
+ script: make mutate
6
9
  env:
7
10
  - CODECLIMATE_REPO_TOKEN=3af5c60b54fff033bf0dc1af4f26762647bcf3b78268a94d67ea9530b5b52a61
8
11
  notifications:
@@ -1,3 +1,7 @@
1
+ ### 0.3.6 (18.10.2016)
2
+
3
+ * Change: ruby_event_store updated to 0.13.0
4
+
1
5
  ### 0.3.5 (11.08.2016)
2
6
 
3
7
  * Fix an issue when default apply strategy generated a wrong method name #7
@@ -0,0 +1,27 @@
1
+ # Contributing to AggregateRoot
2
+
3
+ Any kind of contribution is welcomed. Here is a few guidelines that we need contributors to follow.
4
+
5
+ ## Found a bug? Have a question?
6
+
7
+ * [Create a new issue](https://github.com/arkency/aggregate_root/issues/new), assuming one does not already exist.
8
+ * Clearly describe the issue including steps to reproduce when it is a bug.
9
+ * If possible provide a Pull Request with failing test case.
10
+
11
+ ## Getting Started
12
+
13
+ * Make sure you have a [GitHub account](https://github.com/signup/free).
14
+ * [Fork the repository](https://help.github.com/articles/fork-a-repo/) on GitHub.
15
+
16
+ ## Making Changes
17
+
18
+ * Create a feature branch from where you want to base your work.
19
+ * Do your work. Please try to keep your commits small and focussed.
20
+ * Make sure you have added the necessary tests for your changes.
21
+ * Push your changes to a feature branch in your fork of the repository.
22
+ * Submit a pull request to the AggregateRoot repository.
23
+
24
+ # Additional Resources
25
+
26
+ * [General GitHub documentation](http://help.github.com/)
27
+ * [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
@@ -0,0 +1,20 @@
1
+ install-bundler: ## Install gem dependencies
2
+ @echo "Installing gem dependencies"
3
+ @bundle install
4
+
5
+ install: install-bundler ## Prepare current development environment
6
+
7
+ test: ## Run tests
8
+ @echo "Running basic tests - beware: this won't guarantee build pass"
9
+ @bundle exec rspec
10
+
11
+ mutate: test ## Run mutation tests
12
+ @echo "Running mutation tests - only 100% free mutation will be accepted"
13
+ @bundle exec mutant --include lib --require aggregate_root --use rspec "AggregateRoot*"
14
+
15
+ .PHONY: help
16
+
17
+ help:
18
+ @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
19
+
20
+ .DEFAULT_GOAL := help
data/README.md CHANGED
@@ -142,6 +142,20 @@ There're already few blogposts about building an event sourced applications wth
142
142
  * [Testing Event Sourced application - the read side](http://blog.arkency.com/2015/09/testing-event-sourced-application-the-read-side/)
143
143
  * [One event to rule them all](http://blog.arkency.com/2016/01/one-event-to-rule-them-all/)
144
144
 
145
+ # Contributing
146
+
147
+ Check the contribution guide on [CONTRIBUTING.md](https://github.com/arkency/aggregate_root/blob/master/CONTRIBUTING.md)
148
+
149
+ We're aiming for 100% mutation coverage in this project.
150
+ Read the reasoning:
151
+
152
+ [Why I want to introduce mutation testing to the rails_event_store gem](http://blog.arkency.com/2015/04/why-i-want-to-introduce-mutation-testing-to-the-rails-event-store-gem/)
153
+
154
+ [Mutation testing and continuous integration](http://blog.arkency.com/2015/05/mutation-testing-and-continuous-integration/)
155
+
156
+ In practice, it means that we run `make mutate` as part of the CI process.
157
+ Whenever you fix a bug or add a new feature, we require that the coverage doesn't go down.
158
+
145
159
  ## About
146
160
 
147
161
  <img src="http://arkency.com/images/arkency.png" alt="Arkency" width="20%" align="left" />
@@ -24,7 +24,8 @@ Gem::Specification.new do |spec|
24
24
  spec.add_development_dependency 'pry'
25
25
  spec.add_development_dependency 'rspec'
26
26
  spec.add_development_dependency 'rails', '~> 4.2.1'
27
- spec.add_development_dependency 'ruby_event_store', '~> 0.12.0'
27
+ spec.add_development_dependency 'ruby_event_store', '~> 0.13.0'
28
+ spec.add_development_dependency 'mutant-rspec', '~> 0.8'
28
29
 
29
30
  spec.add_dependency 'activesupport', '>= 3.0'
30
31
  end
@@ -10,9 +10,5 @@ module AggregateRoot
10
10
 
11
11
  class Configuration
12
12
  attr_accessor :default_event_store
13
-
14
- def initialize
15
- @default_event_store = nil
16
- end
17
13
  end
18
14
  end
@@ -2,7 +2,7 @@ module AggregateRoot
2
2
  class DefaultApplyStrategy
3
3
  def call(aggregate, event)
4
4
  event_name_processed = event.class.to_s.underscore.gsub('/','_')
5
- aggregate.method("apply_#{event_name_processed}".to_sym).call(event)
5
+ aggregate.method("apply_#{event_name_processed}").call(event)
6
6
  end
7
7
  end
8
8
  end
@@ -1,3 +1,3 @@
1
1
  module AggregateRoot
2
- VERSION = '0.3.5'
2
+ VERSION = '0.3.6'
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.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arkency
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-08-11 00:00:00.000000000 Z
11
+ date: 2016-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -86,14 +86,28 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.12.0
89
+ version: 0.13.0
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.12.0
96
+ version: 0.13.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: mutant-rspec
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '0.8'
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'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: activesupport
99
113
  requirement: !ruby/object:Gem::Requirement
@@ -118,8 +132,10 @@ files:
118
132
  - ".gitignore"
119
133
  - ".travis.yml"
120
134
  - CHANGELOG.md
135
+ - CONTRIBUTING.md
121
136
  - Gemfile
122
137
  - LICENSE
138
+ - Makefile
123
139
  - README.md
124
140
  - Rakefile
125
141
  - aggregate_root.gemspec
@@ -149,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
165
  version: '0'
150
166
  requirements: []
151
167
  rubyforge_project:
152
- rubygems_version: 2.5.1
168
+ rubygems_version: 2.6.7
153
169
  signing_key:
154
170
  specification_version: 4
155
171
  summary: Event sourced (with Rails Event Store) aggregate root implementation