+
Rails Event Store is a library for publishing, consuming, storing and retrieving events. It's your best companion for going with an Event-Driven Architecture for your Rails application.
-
-
- -
-
- Introduce Publish-Subscribe bus
-
-
- -
-
- Decouple core business logic from external concerns in Hexagonal style architectures
-
-
- -
-
- Replace ActiveRecord callbacks and Observers
-
-
- -
-
- Introduce communication layer between loosely coupled components
-
-
- -
-
- React to published events synchronously or asynchronously
-
-
- -
-
- Extract side-effects from your controllers and services into event handlers
-
-
- -
-
- Build an Audit Log
-
-
- -
-
- Introduce Read Models
-
-
- -
-
- Implement Event Sourcing
-
+
+ -
+ Introduce Publish-Subscribe bus
+
+ -
+ Decouple core business logic from external concerns in Hexagonal style architectures
+
+ -
+ Replace ActiveRecord callbacks and Observers
+
+ -
+ Introduce communication layer between loosely coupled components
+
+ -
+ React to published events synchronously or asynchronously
+
+ -
+ Extract side-effects from your controllers and services into event handlers
+
+ -
+ Build an Audit Log
+
+ -
+ Introduce Read Models
+
+ -
+ Implement Event Sourcing
+
+
+ Join growing list of companies using Rails Event Store
+
-
- Join growing list of companies using Rails Event Store
-
-
-<%= partial "partials/site_footer" %>
\ No newline at end of file
+<%= partial "partials/site_footer" %>
diff --git a/ruby_event_store-active_record/lib/ruby_event_store/active_record/generators/database_adapter.rb b/ruby_event_store-active_record/lib/ruby_event_store/active_record/generators/database_adapter.rb
index b119b99c47..684da1f0dd 100644
--- a/ruby_event_store-active_record/lib/ruby_event_store/active_record/generators/database_adapter.rb
+++ b/ruby_event_store-active_record/lib/ruby_event_store/active_record/generators/database_adapter.rb
@@ -6,13 +6,13 @@ module ActiveRecord
InvalidDataTypeForAdapter = Class.new(StandardError)
class DatabaseAdapter
- NOT_SET = Object.new.freeze
+ NONE = Object.new.freeze
class PostgreSQL < self
SUPPORTED_DATA_TYPES = %w[binary json jsonb].freeze
- def initialize(data_type = NOT_SET)
- super("postgresql", data_type)
+ def adapter_name
+ "postgresql"
end
def template_directory
@@ -23,8 +23,8 @@ def template_directory
class MySQL < self
SUPPORTED_DATA_TYPES = %w[binary json].freeze
- def initialize(data_type = NOT_SET)
- super("mysql2", data_type)
+ def adapter_name
+ "mysql2"
end
def template_directory
@@ -35,21 +35,20 @@ def template_directory
class SQLite < self
SUPPORTED_DATA_TYPES = %w[binary].freeze
- def initialize(data_type = NOT_SET)
- super("sqlite", data_type)
+ def adapter_name
+ "sqlite"
end
end
- def initialize(adapter_name, data_type)
+ def initialize(data_type = NONE)
raise UnsupportedAdapter if instance_of?(DatabaseAdapter)
validate_data_type!(data_type)
- @adapter_name = adapter_name
@data_type = data_type
end
- attr_reader :adapter_name, :data_type
+ attr_reader :data_type
def supported_data_types
self.class::SUPPORTED_DATA_TYPES
@@ -68,7 +67,7 @@ def hash
def template_directory
end
- def self.from_string(adapter_name, data_type = NOT_SET)
+ def self.from_string(adapter_name, data_type = NONE)
raise NoMethodError unless eql?(DatabaseAdapter)
case adapter_name.to_s.downcase
@@ -86,7 +85,7 @@ def self.from_string(adapter_name, data_type = NOT_SET)
private
def validate_data_type!(data_type)
- if !data_type.eql?(NOT_SET) && !supported_data_types.include?(data_type)
+ if !data_type.eql?(NONE) && !supported_data_types.include?(data_type)
raise InvalidDataTypeForAdapter,
"#{class_name} doesn't support #{data_type.inspect}. Supported types are: #{supported_data_types.join(", ")}."
end
diff --git a/ruby_event_store-active_record/spec/database_adapter_spec.rb b/ruby_event_store-active_record/spec/database_adapter_spec.rb
index 053ff0b4df..06b13c0f76 100644
--- a/ruby_event_store-active_record/spec/database_adapter_spec.rb
+++ b/ruby_event_store-active_record/spec/database_adapter_spec.rb
@@ -27,7 +27,7 @@ module ActiveRecord
specify "raise on unknown adapter" do
expect { DatabaseAdapter.from_string("kakadudu") }.to raise_error(
UnsupportedAdapter,
- "Unsupported adapter: \"kakadudu\""
+ "Unsupported adapter: \"kakadudu\"",
)
expect { DatabaseAdapter.from_string(nil) }.to raise_error(UnsupportedAdapter, "Unsupported adapter: nil")
expect { DatabaseAdapter.from_string(123) }.to raise_error(UnsupportedAdapter, "Unsupported adapter: 123")
@@ -52,7 +52,7 @@ module ActiveRecord
end
specify "don't allow instance of parent class directly" do
- expect { DatabaseAdapter.new("postgresql", "jsonb") }.to raise_error(UnsupportedAdapter)
+ expect { DatabaseAdapter.new("jsonb") }.to raise_error(UnsupportedAdapter)
end
specify "template directory" do
@@ -72,7 +72,7 @@ module ActiveRecord
specify "MySQL doesn't support jsonb" do
expect { DatabaseAdapter::MySQL.new("jsonb") }.to raise_error InvalidDataTypeForAdapter,
- "MySQL doesn't support \"jsonb\". Supported types are: binary, json."
+ "MySQL doesn't support \"jsonb\". Supported types are: binary, json."
end
specify "PostgreSQL supports binary" do
diff --git a/ruby_event_store-browser/elm/package-lock.json b/ruby_event_store-browser/elm/package-lock.json
index c57b8fb97f..7d821be02e 100644
--- a/ruby_event_store-browser/elm/package-lock.json
+++ b/ruby_event_store-browser/elm/package-lock.json
@@ -12,7 +12,7 @@
"chokidar-cli": "^3.0.0",
"elm": "^0.19.1-5",
"elm-test": "^0.19.1-revision12",
- "tailwindcss": "^3.3.3",
+ "tailwindcss": "^3.3.6",
"uglify-js": "^3.17.4"
}
},
@@ -565,9 +565,9 @@
"dev": true
},
"node_modules/fast-glob": {
- "version": "3.2.12",
- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz",
- "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==",
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",
+ "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==",
"dev": true,
"dependencies": {
"@nodelib/fs.stat": "^2.0.2",
@@ -880,9 +880,9 @@
"dev": true
},
"node_modules/jiti": {
- "version": "1.18.2",
- "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.18.2.tgz",
- "integrity": "sha512-QAdOptna2NYiSSpv0O/BwoHBSmz4YhpzJHyi+fnMRTXFjp7B8i/YG5Z8IfusxB1ufjcD2Sre1F3R+nX3fvy7gg==",
+ "version": "1.21.0",
+ "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz",
+ "integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==",
"dev": true,
"bin": {
"jiti": "bin/jiti.js"
@@ -1723,9 +1723,9 @@
}
},
"node_modules/tailwindcss": {
- "version": "3.3.3",
- "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.3.tgz",
- "integrity": "sha512-A0KgSkef7eE4Mf+nKJ83i75TMyq8HqY3qmFIJSWy8bNt0v1lG7jUcpGpoTFxAwYcWOphcTBLPPJg+bDfhDf52w==",
+ "version": "3.3.6",
+ "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.3.6.tgz",
+ "integrity": "sha512-AKjF7qbbLvLaPieoKeTjG1+FyNZT6KaJMJPFeQyLfIp7l82ggH1fbHJSsYIvnbTFQOlkh+gBYpyby5GT1LIdLw==",
"dev": true,
"dependencies": {
"@alloc/quick-lru": "^5.2.0",
@@ -1733,10 +1733,10 @@
"chokidar": "^3.5.3",
"didyoumean": "^1.2.2",
"dlv": "^1.1.3",
- "fast-glob": "^3.2.12",
+ "fast-glob": "^3.3.0",
"glob-parent": "^6.0.2",
"is-glob": "^4.0.3",
- "jiti": "^1.18.2",
+ "jiti": "^1.19.1",
"lilconfig": "^2.1.0",
"micromatch": "^4.0.5",
"normalize-path": "^3.0.0",
diff --git a/ruby_event_store-browser/elm/package.json b/ruby_event_store-browser/elm/package.json
index 7e4081e139..ddc8bd66db 100644
--- a/ruby_event_store-browser/elm/package.json
+++ b/ruby_event_store-browser/elm/package.json
@@ -9,7 +9,7 @@
"chokidar-cli": "^3.0.0",
"elm": "^0.19.1-5",
"elm-test": "^0.19.1-revision12",
- "tailwindcss": "^3.3.3",
+ "tailwindcss": "^3.3.6",
"uglify-js": "^3.17.4"
}
}