event-sourcing 0.2.0.pre → 0.2.1.pre

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: 1887675acd16105bd77fb6d7cf83281590a965e0352817d55c7c83a0ea56bf50
4
- data.tar.gz: 00cce85ada5a577a081c18d60fc59d66bf007878b52d57b286c835f2898d7bec
3
+ metadata.gz: 96d248391ed71d7e3a56d1d3107a4e488d514f4c20182103148d576738927f76
4
+ data.tar.gz: '09e0513bf3f06d9a86b28f4bd0b4c17eccf47ca9a0534b58a30769c0618f7608'
5
5
  SHA512:
6
- metadata.gz: 5279909deeb3b0f88b008180eb810a03139552de6374859b617707366a4dac3ba17380aa245a83e8e8b9b3ff6f1a7c6c383a1b66d54e36bf01f5aa2f9d96d5b6
7
- data.tar.gz: 75b7e45e8479284f550d42b66bdde7e61d388fb990f55c0963d050133513fbc14d04ab10bd067ce4a11ee37181e03f3ce3f01d130da5999ddb3c221ccd39537b
6
+ metadata.gz: 66c4b323e9407d45255ce6426938b99e042d6317cf261ae2830e77211193f8e52dbd8644f64eac81f79711634ba10d709303d94dc2c4e2f67c2f57f9058b8c9f
7
+ data.tar.gz: 1f2c26f0c09b58014279426fe97f0e39833049e96208621006ed93a0d297d6dd2fb85c55baaf09caaf2204033ef2eb23180f1d3a2f67e4b6cb497ca0912ce70c
@@ -1,2 +1,3 @@
1
+ require "event_sourcing"
1
2
  require "event_sourcing/rails/command_record"
2
3
  require "event_sourcing/rails/event_record"
@@ -1,3 +1,3 @@
1
1
  module EventSourcing
2
- VERSION = "0.2.0.pre"
2
+ VERSION = "0.2.1.pre"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: event-sourcing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.pre
4
+ version: 0.2.1.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Conversation Dev Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-27 00:00:00.000000000 Z
11
+ date: 2018-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -25,80 +25,73 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.16'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rake
28
+ name: pg
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: '1.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: '1.0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rspec
42
+ name: rails
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '3.0'
47
+ version: '5.0'
48
+ - - "<"
49
+ - !ruby/object:Gem::Version
50
+ version: '6'
48
51
  type: :development
49
52
  prerelease: false
50
53
  version_requirements: !ruby/object:Gem::Requirement
51
54
  requirements:
52
55
  - - "~>"
53
56
  - !ruby/object:Gem::Version
54
- version: '3.0'
57
+ version: '5.0'
58
+ - - "<"
59
+ - !ruby/object:Gem::Version
60
+ version: '6'
55
61
  - !ruby/object:Gem::Dependency
56
- name: rails
62
+ name: rake
57
63
  requirement: !ruby/object:Gem::Requirement
58
64
  requirements:
59
- - - ">="
65
+ - - "~>"
60
66
  - !ruby/object:Gem::Version
61
- version: '5'
67
+ version: '10.0'
62
68
  type: :development
63
69
  prerelease: false
64
70
  version_requirements: !ruby/object:Gem::Requirement
65
71
  requirements:
66
- - - ">="
72
+ - - "~>"
67
73
  - !ruby/object:Gem::Version
68
- version: '5'
74
+ version: '10.0'
69
75
  - !ruby/object:Gem::Dependency
70
- name: pg
76
+ name: rspec
71
77
  requirement: !ruby/object:Gem::Requirement
72
78
  requirements:
73
- - - ">="
79
+ - - "~>"
74
80
  - !ruby/object:Gem::Version
75
- version: '1'
81
+ version: '3.0'
76
82
  type: :development
77
83
  prerelease: false
78
84
  version_requirements: !ruby/object:Gem::Requirement
79
85
  requirements:
80
- - - ">="
86
+ - - "~>"
81
87
  - !ruby/object:Gem::Version
82
- version: '1'
83
- description: Event sourcing implementation for TC projects
88
+ version: '3.0'
89
+ description: Simple Ruby Event Sourcing framework, with Rails support
84
90
  email:
85
91
  executables: []
86
92
  extensions: []
87
93
  extra_rdoc_files: []
88
94
  files:
89
- - ".gitignore"
90
- - ".rspec"
91
- - ".ruby-gemset"
92
- - ".ruby-version"
93
- - ".travis.yml"
94
- - CODE_OF_CONDUCT.md
95
- - Gemfile
96
- - LICENSE.txt
97
- - README.md
98
- - Rakefile
99
- - bin/console
100
- - bin/setup
101
- - event-sourcing.gemspec
102
95
  - lib/event_sourcing.rb
103
96
  - lib/event_sourcing/command.rb
104
97
  - lib/event_sourcing/event.rb
@@ -107,7 +100,7 @@ files:
107
100
  - lib/event_sourcing/rails/command_record.rb
108
101
  - lib/event_sourcing/rails/event_record.rb
109
102
  - lib/event_sourcing/version.rb
110
- homepage: https://github.com/conversation/tc-event-sourcing
103
+ homepage: https://github.com/conversation/event-sourcing
111
104
  licenses:
112
105
  - MIT
113
106
  metadata: {}
@@ -130,5 +123,5 @@ rubyforge_project:
130
123
  rubygems_version: 2.7.7
131
124
  signing_key:
132
125
  specification_version: 4
133
- summary: TC Event sourcing library
126
+ summary: The Conversation Event sourcing library
134
127
  test_files: []
data/.gitignore DELETED
@@ -1,15 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
- Gemfile.lock
10
-
11
- # rspec failure tracking
12
- .rspec_status
13
-
14
- # JetBrains
15
- .idea/
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
@@ -1 +0,0 @@
1
- tc-event-sourcing
@@ -1 +0,0 @@
1
- 2.5.1
@@ -1,10 +0,0 @@
1
- ---
2
- addons:
3
- postgresql: 9.6
4
- before_install: gem install bundler -v 1.17.0
5
- before_script: createdb -U postgres event_sourcing_test
6
- language: ruby
7
- rvm:
8
- - 2.4.5
9
- - 2.5.3
10
- script: bundle exec rake spec
@@ -1,74 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
16
-
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
-
23
- Examples of unacceptable behavior by participants include:
24
-
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
28
- * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
31
- * Other conduct which could reasonably be considered inappropriate in a
32
- professional setting
33
-
34
- ## Our Responsibilities
35
-
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
39
-
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
45
-
46
- ## Scope
47
-
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
54
-
55
- ## Enforcement
56
-
57
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at tiagopadrela@gmail.com. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
63
-
64
- Project maintainers who do not follow or enforce the Code of Conduct in good
65
- faith may face temporary or permanent repercussions as determined by other
66
- members of the project's leadership.
67
-
68
- ## Attribution
69
-
70
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at [http://contributor-covenant.org/version/1/4][version]
72
-
73
- [homepage]: http://contributor-covenant.org
74
- [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile DELETED
@@ -1,6 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
-
5
- # Specify your gem's dependencies in event-sourcing.gemspec
6
- gemspec
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2018 The Conversation Media Group
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
data/README.md DELETED
@@ -1,102 +0,0 @@
1
- # EventSourcing
2
-
3
- Simple Ruby Event Sourcing framework, with Rails support. Inspired by [Kickstarter](https://www.kickstarter.com/)'s
4
- ["Event Sourcing made Simple"](https://kickstarter.engineering/event-sourcing-made-simple-4a2625113224) blog post.
5
-
6
- `EventSourcing` gives you a toolset to configure and store sequences of events on any Ruby application, making it
7
- possible to query an object state at any given point of time.
8
-
9
- As Martin Fowler describes the Event Sourcing concept:
10
-
11
- > Event Sourcing ensures that all changes to application state are stored as a sequence of events. Not just can we query
12
- these events, we can also use the event log to reconstruct past states, and as a foundation to automatically adjust the
13
- state to cope with retroactive changes.
14
- > - Source: https://martinfowler.com/eaaDev/EventSourcing.html
15
-
16
- ## Installation
17
-
18
- Add this line to your application's Gemfile:
19
-
20
- ```ruby
21
- gem 'event-sourcing'
22
- ```
23
-
24
- And then execute:
25
-
26
- $ bundle
27
-
28
- Or install it yourself as:
29
-
30
- $ gem install event-sourcing
31
-
32
- ## Concepts
33
-
34
- This frameworks introduces artifacts and rules to keep track of object state changes.
35
-
36
- The core artifacts of this framework are:
37
-
38
- - **Aggregates**: represent the current state of the application
39
- - Usually they are persistence objects, such as "models"
40
- - **Events**: provide history of an aggregate, applying changes to an aggregate
41
- - "Applying" an event is also known as "Calculator" on other event sourcing literature
42
- - **Commands**: validates and persists events
43
- - **Reactors**: trigger side effects as events happen
44
- - **Event Dispatcher**: manage which reactors will be executed after an event happens
45
-
46
- While state changing actions obey the rationale:
47
-
48
- - Aggregate state changes should be executed through a Command
49
- - Events are immutable, as they represent series of changes to an Aggregate
50
- - Reactors may be triggered after an Event occurs
51
-
52
- ## Usage
53
-
54
- This framework can be used on any Ruby project, as it allows you to customize how you can handle Event persistence and
55
- event dispatching control flow.
56
-
57
- You can find an implementation sample at the [PORO app's README file](examples/poro_app/README.md).
58
-
59
- ## Usage with Rails
60
-
61
- You can also use this framework with Rails, as it includes an `event_sourcing/rails` module to ease up configuration.
62
-
63
- **Note:** this Rails implementation requires a database that implements serializable attributes by default,
64
- such as PostgreSQL JSON/Binary JSON columns.
65
-
66
- To include the Rails module, add this line to your application's Gemfile:
67
-
68
- ```ruby
69
- gem "event-sourcing", require: "event_sourcing/rails"
70
- ```
71
-
72
- Further installation steps and a sample implementation can be found at the [Rails' README file](examples/rails_app/README.md).
73
-
74
- ## Contributing
75
-
76
- - System requirements
77
- - Postgres 8.4+
78
- - Ruby 2.3+
79
-
80
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests.
81
-
82
- You can also run `bin/console` for an interactive prompt that will allow you to experiment.
83
-
84
- Bug reports and pull requests are welcome on GitHub at https://github.com/conversation/event-sourcing.
85
-
86
- This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere
87
-
88
- to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
89
-
90
- ## License
91
-
92
- The gem is available as open source under the terms of the [MIT License](LICENSE.txt).
93
-
94
- ## Code of Conduct
95
-
96
- Everyone interacting in the The Conversation project’s codebases, issue trackers, chat rooms and mailing lists is
97
- expected to follow the [code of conduct](https://github.com/conversation/event-sourcing/blob/master/CODE_OF_CONDUCT.md).
98
-
99
- ## Related Projects
100
-
101
- Thank you very much [Kickstarter](https://www.kickstarter.com/) for making the ["Event Sourcing made Simple"](https://kickstarter.engineering/event-sourcing-made-simple-4a2625113224)
102
- blog post. This project is heavily inspired on concepts described on it and its [Rails demo app](https://github.com/pcreux/event-sourcing-rails-todo-app-demo).
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task :default => :spec
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "event_sourcing"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
@@ -1,28 +0,0 @@
1
- lib = File.expand_path("../lib", __FILE__)
2
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
-
4
- require "event_sourcing/version"
5
- require "event_sourcing"
6
-
7
- Gem::Specification.new do |spec|
8
- spec.name = "event-sourcing"
9
- spec.version = EventSourcing::VERSION
10
- spec.authors = ["The Conversation Dev Team"]
11
-
12
- spec.summary = "TC Event sourcing library"
13
- spec.description = "Event sourcing implementation for TC projects"
14
- spec.homepage = "https://github.com/conversation/tc-event-sourcing"
15
- spec.license = "MIT"
16
-
17
- # Specify which files should be added to the gem when it is released.
18
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
19
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
20
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|examples)/}) }
21
- end
22
-
23
- spec.add_development_dependency "bundler", "~> 1.16"
24
- spec.add_development_dependency "rake", "~> 10.0"
25
- spec.add_development_dependency "rspec", "~> 3.0"
26
- spec.add_development_dependency "rails", ">= 5"
27
- spec.add_development_dependency "pg", ">= 1"
28
- end