dry-web-roda 0.6.2 → 0.6.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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/dry/web/roda/skeletons/flat_project/Gemfile +2 -1
- data/lib/dry/web/roda/skeletons/flat_project/system/boot/monitor.rb.tt +0 -1
- data/lib/dry/web/roda/skeletons/flat_project/system/boot/rom.rb.tt +4 -0
- data/lib/dry/web/roda/skeletons/umbrella_project/Gemfile +2 -1
- data/lib/dry/web/roda/skeletons/umbrella_project/system/boot/monitor.rb.tt +0 -1
- data/lib/dry/web/roda/skeletons/umbrella_project/system/boot/rom.rb.tt +5 -1
- data/lib/dry/web/roda/version.rb +1 -1
- metadata +2 -4
- data/lib/dry/web/roda/skeletons/flat_project/lib/rom/instrumentation.rb.tt +0 -22
- data/lib/dry/web/roda/skeletons/umbrella_project/lib/rom/instrumentation.rb.tt +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd98b628eb646092627a0322e5d9fec5d5df8922
|
4
|
+
data.tar.gz: e68b854855b73288d83dd46e337dea8352890d6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49f813b5b909bc6b4d9f6772cc7a3a51560f2a440f60dfbbdbbe28ea4f653ccdc596453cc0fb51f2866c77467e923493e9a166103466d61527f38440ccf832d5
|
7
|
+
data.tar.gz: 8aee21a881953339e3e5552183ecf2b1ab2675d274dede6f8e0474def29e7fc98644f55af30b77d463c5032c4e19b15f37679fcbd12f14689d37ccd903aa0b64
|
data/CHANGELOG.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
init do
|
4
4
|
require "sequel"
|
5
5
|
require "rom"
|
6
|
-
|
6
|
+
|
7
7
|
use :monitor
|
8
8
|
|
9
9
|
Sequel.database_timezone = :utc
|
@@ -15,6 +15,10 @@
|
|
15
15
|
extensions: [:error_sql]
|
16
16
|
)
|
17
17
|
|
18
|
+
rom_config.plugin(:sql, relations: :instrumentation) do |p|
|
19
|
+
p.notifications = notifications
|
20
|
+
end
|
21
|
+
|
18
22
|
persistence.register("config", rom_config)
|
19
23
|
end
|
20
24
|
|
data/lib/dry/web/roda/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dry-web-roda
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Solnica
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02
|
11
|
+
date: 2017-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-web
|
@@ -238,7 +238,6 @@ files:
|
|
238
238
|
- lib/dry/web/roda/skeletons/flat_project/lib/__underscored_app_name__/views/welcome.rb.tt
|
239
239
|
- lib/dry/web/roda/skeletons/flat_project/lib/persistence/commands/.keep
|
240
240
|
- lib/dry/web/roda/skeletons/flat_project/lib/persistence/relations/.keep
|
241
|
-
- lib/dry/web/roda/skeletons/flat_project/lib/rom/instrumentation.rb.tt
|
242
241
|
- lib/dry/web/roda/skeletons/flat_project/lib/types.rb
|
243
242
|
- lib/dry/web/roda/skeletons/flat_project/log/.keep
|
244
243
|
- lib/dry/web/roda/skeletons/flat_project/spec/app_helper.rb
|
@@ -291,7 +290,6 @@ files:
|
|
291
290
|
- lib/dry/web/roda/skeletons/umbrella_project/lib/__underscored_app_name__/view_context.rb.tt
|
292
291
|
- lib/dry/web/roda/skeletons/umbrella_project/lib/persistence/commands/.keep
|
293
292
|
- lib/dry/web/roda/skeletons/umbrella_project/lib/persistence/relations/.keep
|
294
|
-
- lib/dry/web/roda/skeletons/umbrella_project/lib/rom/instrumentation.rb.tt
|
295
293
|
- lib/dry/web/roda/skeletons/umbrella_project/lib/types.rb
|
296
294
|
- lib/dry/web/roda/skeletons/umbrella_project/log/.keep
|
297
295
|
- lib/dry/web/roda/skeletons/umbrella_project/spec/app_helper.rb
|
@@ -1,22 +0,0 @@
|
|
1
|
-
require "rom-sql"
|
2
|
-
|
3
|
-
module ROM
|
4
|
-
class Relation
|
5
|
-
# Monkey patch ROM::SQL to support query logs until an official API is available
|
6
|
-
module Instrumentation
|
7
|
-
def self.included(klass)
|
8
|
-
klass.option :notifications, reader: true, optional: false, default: proc {
|
9
|
-
<%= config[:camel_cased_app_name] %>::Container[:notifications]
|
10
|
-
}
|
11
|
-
end
|
12
|
-
|
13
|
-
def to_a
|
14
|
-
notifications.instrument(:sql, name: name.relation, query: dataset.sql) do
|
15
|
-
super
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
SQL::Relation.include(Instrumentation)
|
21
|
-
end
|
22
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
require "rom-sql"
|
2
|
-
|
3
|
-
module ROM
|
4
|
-
class Relation
|
5
|
-
# Monkey patch ROM::SQL to support query logs until an official API is available
|
6
|
-
module Instrumentation
|
7
|
-
def self.included(klass)
|
8
|
-
klass.option :notifications, reader: true, optional: false, default: proc {
|
9
|
-
<%= config[:camel_cased_app_name] %>::Container[:notifications]
|
10
|
-
}
|
11
|
-
end
|
12
|
-
|
13
|
-
def to_a
|
14
|
-
notifications.instrument(:sql, name: name.relation, query: dataset.sql) do
|
15
|
-
super
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
|
20
|
-
SQL::Relation.include(Instrumentation)
|
21
|
-
end
|
22
|
-
end
|