rom-event_store 0.0.4 → 0.0.5

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: dd9b21f67358d6718d6f370b3189ec08aa06f037
4
- data.tar.gz: 5fc12e375870ca09b599f9fd81d8ca4f0d20ca00
3
+ metadata.gz: 50c037f5dd51b63ad51f6a74d3b8c51e8a9c66a2
4
+ data.tar.gz: 029bca73c26580e57ccb5ed9cf01b3d6a0c5a888
5
5
  SHA512:
6
- metadata.gz: a212f8ed1c9d145c23d47a303478a2869add9a178b9679429395e30d7529c2b9371a17c9b7ab53a202961291d2323ef058189274536840f742258069c5dbf411
7
- data.tar.gz: 212c693398e13a6d502669c7c71490e1326f3a05cfefb7d7a677515c4f43ea4302d11c1e90ace27ffe943ed9af0d62926b8acbaa5acef15efe9c7ae5a8333dde
6
+ metadata.gz: 00db3cad2e89917967fa39c376293ea4216397dd6f33487efa76c065da0c3cb83725705bcbdf278e8f4200e3a76dc0b799dca721cd58369574854e4413e56ca4
7
+ data.tar.gz: 1a2e104343da21a0c7712979444903fa72e626b90d092eb3b2c6553bd4c8f9b693fa1b96c33f150ba73ca54e4d19ce375ff2d056c1f483b80d235e22c6bf0eab
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --order random
data/.travis.yml CHANGED
@@ -5,14 +5,14 @@ bundler_args: --without yard guard benchmarks tools
5
5
  env:
6
6
  global:
7
7
  - JRUBY_OPTS='--dev -J-Xmx1024M'
8
- - CODECLIMATE_REPO_TOKEN=1180196768475653637086abfbc1c302a26abde3b8698a8e36c92b4004d193f3
8
+ - CODECLIMATE_REPO_TOKEN=3151eaf8f2a35e5c54b14e4618702237023acf89794b908bd1654c3cf8dae44f
9
9
  install:
10
10
  - "wget -nc http://download.geteventstore.com/binaries/EventStore-OSS-Linux-v3.0.3.tar.gz"
11
11
  - "tar -xvzf EventStore-OSS-Linux-v3.0.3.tar.gz"
12
12
  - "mv EventStore-OSS-Linux-v3.0.3 .event_store"
13
13
  - "cd .event_store && ./run-node.sh --db ./ESData &"
14
14
  - "sleep 5"
15
- - "curl -X POST --user admin:changeit 'http://127.0.0.1:2113/projection/$by_category/command/enable' -H 'Content-Length: 0'"
15
+ - "./bin/init-es"
16
16
  - "bundle install"
17
17
  script: "bundle exec rake ci"
18
18
  rvm:
data/CHANGELOG.md CHANGED
@@ -2,16 +2,16 @@
2
2
  ### Added
3
3
  * Asynchronous subscriptions to relations (live and catchup)
4
4
  * Partial reads from a relation (batch reads)
5
- * TCP driver as an own gem: [estore](https://github.com/rom-eventstore/estore) (help wanted!!)
5
+ * TCP driver as an own gem: [estore](https://github.com/eventstore-rb/estore) (help wanted!!)
6
6
  * `estore` gem updated (general refactoring and error handling improved. WIP)
7
7
 
8
- [Compare v0.0.3...v0.0.4](https://github.com/rom-eventstore/rom-event_store/compare/v0.0.3...v0.0.4)
8
+ [Compare v0.0.3...v0.0.4](https://github.com/rom-rb/rom-event_store/compare/v0.0.3...v0.0.4)
9
9
 
10
10
  ## v0.0.3 - 2015-04-01
11
11
  ### Added
12
12
  * [TCP driver](https://github.com/mathieuravaux/eventstore-ruby) to connect and read events from the Event Store
13
13
 
14
- [Compare v0.0.2...v0.0.3](https://github.com/rom-eventstore/rom-event_store/compare/v0.0.2...v0.0.3)
14
+ [Compare v0.0.2...v0.0.3](https://github.com/rom-rb/rom-event_store/compare/v0.0.2...v0.0.3)
15
15
 
16
16
  ## v0.0.2 - 2015-03-31
17
17
  ### Added
@@ -19,7 +19,7 @@
19
19
  * Read all events from a relation
20
20
  * Append events to a relation
21
21
 
22
- [Compare v0.0.1...v0.0.2](https://github.com/rom-eventstore/rom-event_store/compare/v0.0.3...v0.0.4)
22
+ [Compare v0.0.1...v0.0.2](https://github.com/rom-rb/rom-event_store/compare/v0.0.1...v0.0.2)
23
23
 
24
24
  ## v0.0.1 - 2015-03-30
25
25
  Initial release
data/Gemfile CHANGED
@@ -6,13 +6,11 @@ gemspec
6
6
  group :test do
7
7
  gem 'inflecto'
8
8
  gem 'rom', git: 'https://github.com/rom-rb/rom.git', branch: 'master'
9
- gem 'rspec', '~> 3.1'
10
9
  gem 'codeclimate-test-reporter', require: false
11
10
  end
12
11
 
13
12
  group :tools do
14
- gem 'rubocop'
15
-
13
+ gem 'rubocop', '~> 0.28.0'
16
14
  gem 'guard'
17
15
  gem 'guard-rspec'
18
16
  gem 'guard-rubocop'
data/README.md CHANGED
@@ -1,20 +1,17 @@
1
1
  [gem]: https://rubygems.org/gems/rom-event_store
2
- [travis]: https://travis-ci.org/rom-eventstore/rom-event_store
3
- [gemnasium]: https://gemnasium.com/rom-eventstore/rom-event_store
4
- [codeclimate]: https://codeclimate.com/github/rom-eventstore/rom-event_store
5
- [inchpages]: http://inch-ci.org/github/rom-eventstore/rom-event_store
6
- [gitter]: https://gitter.im/rom-eventstore/rom-event_store?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
2
+ [travis]: https://travis-ci.org/rom-rb/rom-event_store
3
+ [gemnasium]: https://gemnasium.com/rom-rb/rom-event_store
4
+ [codeclimate]: https://codeclimate.com/github/rom-rb/rom-event_store
5
+ [inchpages]: http://inch-ci.org/github/rom-rb/rom-event_store
7
6
 
8
7
  # ROM::EventStore
9
8
 
10
9
  [![Gem Version](https://badge.fury.io/rb/rom-event_store.svg)][gem]
11
- [![Build Status](https://travis-ci.org/rom-eventstore/rom-event_store.svg?branch=master)][travis]
12
- [![Dependency Status](https://gemnasium.com/rom-eventstore/rom-event_store.png)][gemnasium]
13
- [![Code Climate](https://codeclimate.com/github/rom-eventstore/rom-event_store/badges/gpa.svg)][codeclimate]
14
- [![Test Coverage](https://codeclimate.com/github/rom-eventstore/rom-event_store/badges/coverage.svg)][codeclimate]
15
- [![Inline docs](http://inch-ci.org/github/rom-eventstore/rom-event_store.svg?branch=master)][inchpages]
16
-
17
- [![Join the chat at https://gitter.im/rom-eventstore/rom-event_store](https://badges.gitter.im/Join%20Chat.svg)][gitter]
10
+ [![Build Status](https://travis-ci.org/rom-rb/rom-event_store.svg?branch=master)][travis]
11
+ [![Dependency Status](https://gemnasium.com/rom-rb/rom-event_store.png)][gemnasium]
12
+ [![Code Climate](https://codeclimate.com/github/rom-rb/rom-event_store/badges/gpa.svg)][codeclimate]
13
+ [![Test Coverage](https://codeclimate.com/github/rom-rb/rom-event_store/badges/coverage.svg)][codeclimate]
14
+ [![Inline docs](http://inch-ci.org/github/rom-rb/rom-event_store.svg?branch=master)][inchpages]
18
15
 
19
16
  Event Store support for [Ruby Object Mapper](https://github.com/rom-rb/rom)
20
17
 
@@ -34,6 +31,29 @@ Or install it yourself as:
34
31
 
35
32
  $ gem install rom-event_store
36
33
 
34
+ ## Development
35
+
36
+ You need to install [EventStore](http://geteventstore.com/) in order to be able
37
+ to run specs.
38
+
39
+ On OS X you can use [homebrew](http://brew.sh):
40
+
41
+ ```
42
+ brew install homebrew/binary/EventStore
43
+ ```
44
+
45
+ To start the server simply run:
46
+
47
+ ```
48
+ eventstore
49
+ ```
50
+
51
+ Before running specs you need to run (from the root of this project):
52
+
53
+ ```
54
+ bin/init-es
55
+ ```
56
+
37
57
  ## Usage
38
58
 
39
59
  See [spec/integration/adapter_spec.rb](spec/integration/adapter_spec.rb) for a sample usage.
data/bin/init-es ADDED
@@ -0,0 +1,3 @@
1
+ #!/bin/bash
2
+
3
+ curl -X POST --user admin:changeit 'http://127.0.0.1:2113/projection/$by_category/command/enable' -H 'Content-Length: 0' > /dev/null
@@ -37,7 +37,7 @@ module ROM
37
37
 
38
38
  def subscribe(&block)
39
39
  subscription = @connection.subscription(stream, @options)
40
- subscription.on_event(&block)
40
+ subscription.on_event { |event| block.call(dehydrate(event)) }
41
41
  subscription.start
42
42
  end
43
43
 
@@ -66,6 +66,7 @@ module ROM
66
66
  id: Estore::Package.parse_uuid(event.event_id),
67
67
  type: event.event_type,
68
68
  data: event.data,
69
+ stream: event.event_stream_id,
69
70
  number: event.event_number,
70
71
  created_at: Time.at(event.created_epoch / 1000)
71
72
  }
@@ -1,5 +1,5 @@
1
1
  module ROM
2
2
  module EventStore
3
- VERSION = '0.0.4'
3
+ VERSION = '0.0.5'
4
4
  end
5
5
  end
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
 
12
12
  spec.summary = 'Event Store support for Ruby Object Mapper'
13
13
  spec.description = spec.summary
14
- spec.homepage = 'https://github.com/rom-eventstore/rom-event_store'
14
+ spec.homepage = 'https://github.com/rom-rb/rom-event_store'
15
15
  spec.license = 'MIT'
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
@@ -24,5 +24,5 @@ Gem::Specification.new do |spec|
24
24
 
25
25
  spec.add_development_dependency 'bundler'
26
26
  spec.add_development_dependency 'rake', '~> 10.0'
27
- spec.add_development_dependency 'rubocop', '~> 0.28.0'
27
+ spec.add_development_dependency 'rspec', '~> 3.1'
28
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rom-event_store
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Héctor Ramón
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2015-04-05 00:00:00.000000000 Z
12
+ date: 2015-04-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rom
@@ -68,19 +68,19 @@ dependencies:
68
68
  - !ruby/object:Gem::Version
69
69
  version: '10.0'
70
70
  - !ruby/object:Gem::Dependency
71
- name: rubocop
71
+ name: rspec
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - "~>"
75
75
  - !ruby/object:Gem::Version
76
- version: 0.28.0
76
+ version: '3.1'
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - "~>"
82
82
  - !ruby/object:Gem::Version
83
- version: 0.28.0
83
+ version: '3.1'
84
84
  description: Event Store support for Ruby Object Mapper
85
85
  email:
86
86
  - hector0193@gmail.com
@@ -90,6 +90,7 @@ extensions: []
90
90
  extra_rdoc_files: []
91
91
  files:
92
92
  - ".gitignore"
93
+ - ".rspec"
93
94
  - ".rubocop.yml"
94
95
  - ".rubocop_todo.yml"
95
96
  - ".travis.yml"
@@ -98,6 +99,7 @@ files:
98
99
  - LICENSE
99
100
  - README.md
100
101
  - Rakefile
102
+ - bin/init-es
101
103
  - lib/rom-event_store.rb
102
104
  - lib/rom/event_store.rb
103
105
  - lib/rom/event_store/commands.rb
@@ -106,7 +108,7 @@ files:
106
108
  - lib/rom/event_store/repository.rb
107
109
  - lib/rom/event_store/version.rb
108
110
  - rom-event_store.gemspec
109
- homepage: https://github.com/rom-eventstore/rom-event_store
111
+ homepage: https://github.com/rom-rb/rom-event_store
110
112
  licenses:
111
113
  - MIT
112
114
  metadata: {}