pg_eventstore 1.1.2 → 1.1.3

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
  SHA256:
3
- metadata.gz: edf4e7b2fb569adcc91434eecc16b269504108e980924f45543996b37f2fca67
4
- data.tar.gz: 451796b0e92415aadf14c7ef6e2627378d99181f4a37104f8ce50ea990b12c75
3
+ metadata.gz: 9d389d47246c77539e8cd138d22082f8b3186b0e422e563510483e85189a5f68
4
+ data.tar.gz: 0cf5820ee9979d7ef0f3385848e105c7b378bfcac1f756ed5a1242ea572f2ea1
5
5
  SHA512:
6
- metadata.gz: 78af9eb3c02e3f002765dfb888263a221e3f77cd005593ecff4c5a8443f781e992ecd30d0f81120f4afcd268b573afab5c8616f683aed0255104db7d1c6e3fa1
7
- data.tar.gz: d8c27f5efd39737c453b490e176bba7cb6d24456faee0b86fb317899ec7bb19d411ed5fdc3f7ed7742a23deb36e87b70d2ce44a4727bf78e23709f77958bd1b9
6
+ metadata.gz: e7e932435f9c6711af44a69e22fc8d4cbc2ce41f7f1cc1c1c43d269203d7d784076ace2af3d7296662ca8ab4b907df8a8692bf769d635c2d94a53a0b97df4b62
7
+ data.tar.gz: 745fd65a4c63290804765ceb96d2d3cacce3d2d5d0fecf4410fe962499fc948424734a1aa62a89d167af90afef6c3001808ae46102c04d4cfc6180ddd5bbcdd5
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.1.3]
4
+ - Fix issue with assets caching between different gem's versions
5
+
3
6
  ## [1.1.2]
4
7
  - Improve web app compatibility with rails
5
8
 
data/README.md CHANGED
@@ -47,32 +47,7 @@ Documentation chapters:
47
47
  - [Subscriptions](docs/subscriptions.md)
48
48
  - [Writing middlewares](docs/writing_middleware.md)
49
49
  - [How to make multiple commands atomic](docs/multiple_commands.md)
50
-
51
- ## Admin web UI
52
-
53
- `pg_eventstore` implements admin UI where you can browse various database objects. It is implemented as rack application. It doesn't have any authentication/authorization mechanism - it is your responsibility to take care of it.
54
-
55
- ### Rails integration
56
-
57
- In your `config/routes.rb`:
58
-
59
- ```ruby
60
- require 'pg_eventstore/web'
61
-
62
- mount PgEventstore::Web::Application, at: '/eventstore'
63
- ```
64
-
65
- ### Standalone application
66
-
67
- Create `config.ru` file and place next content in there:
68
-
69
- ```ruby
70
- require 'pg_eventstore/web'
71
-
72
- run PgEventstore::Web::Application
73
- ```
74
-
75
- Now you can use any web server to run it.
50
+ - [Admin UI](docs/admin_ui.md)
76
51
 
77
52
  ## Development
78
53
 
@@ -85,6 +60,8 @@ Then, run `rake spec` to run the tests. You can also run `bin/console` for an in
85
60
 
86
61
  To install this gem onto your local machine, run `bundle exec rake install`.
87
62
 
63
+ To run admin UI web server - run `puma` in your terminal. By default it will start web server on `http://0.0.0.0:9292`.
64
+
88
65
  ### Benchmarks
89
66
 
90
67
  There is a script to help you to tests the `pg_eventstore` implementation performance. You can run it using next command:
data/docs/admin_ui.md ADDED
@@ -0,0 +1,35 @@
1
+ # Admin UI
2
+
3
+ `pg_eventstore` implements admin UI where you can browse various database objects. Key features:
4
+
5
+ - events lookup using filtering by stream context, stream name, stream id and event type
6
+ - subscriptions management and monitoring
7
+
8
+ ![Events lookup](images/events_lookup.jpg)
9
+ ![Subscriptions](images/subscriptions.jpg)
10
+
11
+ ## Authorization
12
+
13
+ Admin UI is implemented as a rack application. It doesn't have any built-in authentication/authorization mechanism - it is your responsibility to take care of it.
14
+
15
+ ### Rails integration
16
+
17
+ In your `config/routes.rb`:
18
+
19
+ ```ruby
20
+ require 'pg_eventstore/web'
21
+
22
+ mount PgEventstore::Web::Application, at: '/eventstore'
23
+ ```
24
+
25
+ ### Standalone application
26
+
27
+ Create `config.ru` file and place next content in there:
28
+
29
+ ```ruby
30
+ require 'pg_eventstore/web'
31
+
32
+ run PgEventstore::Web::Application
33
+ ```
34
+
35
+ Now you can use any web server to run it.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PgEventstore
4
- VERSION = "1.1.2"
4
+ VERSION = "1.1.3"
5
5
  end
@@ -63,6 +63,12 @@ module PgEventstore
63
63
  def h(text)
64
64
  Rack::Utils.escape_html(text)
65
65
  end
66
+
67
+ # @param path [String]
68
+ # @return [String]
69
+ def asset_url(path)
70
+ url("#{path}?v=#{PgEventstore::VERSION}")
71
+ end
66
72
  end
67
73
 
68
74
  get '/' do
@@ -6,12 +6,12 @@
6
6
  <meta charset="utf-8">
7
7
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
8
8
  <meta name="viewport" content="width=device-width, initial-scale=1">
9
- <link rel="icon" href="<%= url("images/favicon.ico") %>" type="image/ico"/>
9
+ <link rel="icon" href="<%= asset_url("images/favicon.ico") %>" type="image/ico"/>
10
10
 
11
11
  <title>PG EventStore admin</title>
12
12
 
13
13
  <!-- Bootstrap -->
14
- <link href="<%= url("stylesheets/vendor/bootstrap.min.css") %>" rel="stylesheet">
14
+ <link href="<%= asset_url("stylesheets/vendor/bootstrap.min.css") %>" rel="stylesheet">
15
15
  <!-- Font Awesome -->
16
16
  <style>
17
17
  @font-face {
@@ -26,13 +26,13 @@
26
26
  font-style: normal;
27
27
  }
28
28
  </style>
29
- <link href="<%= url("stylesheets/vendor/font-awesome.min.css") %>" rel="stylesheet">
29
+ <link href="<%= asset_url("stylesheets/vendor/font-awesome.min.css") %>" rel="stylesheet">
30
30
 
31
31
  <!-- Custom Theme Style -->
32
- <link href="<%= url("stylesheets/vendor/gentelella.min.css") %>" rel="stylesheet">
33
- <link href="<%= url("stylesheets/vendor/select2.min.css") %>" rel="stylesheet">
34
- <link href="<%= url("stylesheets/vendor/select2-bootstrap4.min.css") %>" rel="stylesheet">
35
- <link href="<%= url("stylesheets/pg_eventstore.css") %>" rel="stylesheet">
32
+ <link href="<%= asset_url("stylesheets/vendor/gentelella.min.css") %>" rel="stylesheet">
33
+ <link href="<%= asset_url("stylesheets/vendor/select2.min.css") %>" rel="stylesheet">
34
+ <link href="<%= asset_url("stylesheets/vendor/select2-bootstrap4.min.css") %>" rel="stylesheet">
35
+ <link href="<%= asset_url("stylesheets/pg_eventstore.css") %>" rel="stylesheet">
36
36
  </head>
37
37
 
38
38
  <body class="nav-md">
@@ -134,14 +134,14 @@
134
134
  </div>
135
135
 
136
136
  <!-- jQuery -->
137
- <script src="<%= url("javascripts/vendor/jquery.min.js") %>"></script>
137
+ <script src="<%= asset_url("javascripts/vendor/jquery.min.js") %>"></script>
138
138
  <!-- Bootstrap -->
139
- <script src="<%= url("javascripts/vendor/bootstrap.bundle.min.js") %>"></script>
140
- <script src="<%= url("javascripts/vendor/select2.full.min.js") %>"></script>
139
+ <script src="<%= asset_url("javascripts/vendor/bootstrap.bundle.min.js") %>"></script>
140
+ <script src="<%= asset_url("javascripts/vendor/select2.full.min.js") %>"></script>
141
141
 
142
142
  <!-- Custom Theme Scripts -->
143
- <script src="<%= url("javascripts/gentelella.js") %>"></script>
144
- <script src="<%= url("javascripts/pg_eventstore.js") %>"></script>
143
+ <script src="<%= asset_url("javascripts/gentelella.js") %>"></script>
144
+ <script src="<%= asset_url("javascripts/pg_eventstore.js") %>"></script>
145
145
 
146
146
  </body>
147
147
  </html>
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.files = Dir.chdir(__dir__) do
26
26
  paths_to_exclude = %w[
27
27
  bin/ test/ spec/ features/ .git .circleci appveyor Gemfile .ruby-version .ruby-gemset .rspec docker-compose.yml
28
- Rakefile benchmark/ .yardopts db/structure.sql config.ru
28
+ Rakefile benchmark/ .yardopts db/structure.sql config.ru docs/images/
29
29
  ]
30
30
  `git ls-files -z`.split("\x0").reject do |f|
31
31
  (File.expand_path(f) == __FILE__) || f.start_with?(*paths_to_exclude) || File.extname(f) == ".map"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_eventstore
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Dzyzenko
@@ -70,6 +70,7 @@ files:
70
70
  - db/migrations/4_create_subscriptions_set_commands.sql
71
71
  - db/migrations/5_partitions.sql
72
72
  - db/migrations/6_add_commands_data.sql
73
+ - docs/admin_ui.md
73
74
  - docs/appending_events.md
74
75
  - docs/configuration.md
75
76
  - docs/events_and_streams.md