dry-web-roda 0.6.2 → 0.6.3

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
  SHA1:
3
- metadata.gz: 669cb29fe96550f45f14eb056d582129fcf2439c
4
- data.tar.gz: 8859cf62ebd9af843df6525c8cace40ddbafc483
3
+ metadata.gz: dd98b628eb646092627a0322e5d9fec5d5df8922
4
+ data.tar.gz: e68b854855b73288d83dd46e337dea8352890d6f
5
5
  SHA512:
6
- metadata.gz: '08935e3269b27767a3e86ae34e1ddeccb0c40a2111d1b51f3ef1ca59f8107b80decddfabc9ca5dbe7bbab79d3bc1e9dab06e84247aa7798250dd187a2fdf99aa'
7
- data.tar.gz: 9b1b3264bfe6e8c4b208e55f9819faa040d091fb1a97c7b220b3b333e70e079e7567a7f5d1d514123e98eeea2c94512d61e964de4f60882941e961ab9cf862c2
6
+ metadata.gz: 49f813b5b909bc6b4d9f6772cc7a3a51560f2a440f60dfbbdbbe28ea4f653ccdc596453cc0fb51f2866c77467e923493e9a166103466d61527f38440ccf832d5
7
+ data.tar.gz: 8aee21a881953339e3e5552183ecf2b1ab2675d274dede6f8e0474def29e7fc98644f55af30b77d463c5032c4e19b15f37679fcbd12f14689d37ccd903aa0b64
@@ -1,3 +1,9 @@
1
+ # 0.6.3 - 2017-03-02
2
+
3
+ ### Changed
4
+
5
+ - Use the newly-released rom/rom-sql instrumentation plugin to generate SQL logs, rather than a local monkey patch (timriley)
6
+
1
7
  # 0.6.2 - 2017-02-20
2
8
 
3
9
  ### Fixed
@@ -13,8 +13,9 @@ gem "shotgun", ">= 0.9.2"
13
13
 
14
14
  # Database persistence
15
15
  gem "pg"
16
+ gem "rom", ">= 3.1.0"
16
17
  gem "rom-repository"
17
- gem "rom-sql"
18
+ gem "rom-sql", ">= 1.1.0"
18
19
 
19
20
  # Application dependencies
20
21
  gem "dry-matcher"
@@ -1,7 +1,6 @@
1
1
  <%= config[:camel_cased_app_name] %>::Container.finalize :monitor do |_container|
2
2
  init do
3
3
  require "dry/monitor"
4
- require "rom/instrumentation"
5
4
  end
6
5
 
7
6
  start do
@@ -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
 
@@ -13,8 +13,9 @@ gem "shotgun", ">= 0.9.2"
13
13
 
14
14
  # Database persistence
15
15
  gem "pg"
16
+ gem "rom", ">= 3.1.0"
16
17
  gem "rom-repository"
17
- gem "rom-sql"
18
+ gem "rom-sql", ">= 1.1.0"
18
19
 
19
20
  # Application dependencies
20
21
  gem "dry-matcher"
@@ -1,7 +1,6 @@
1
1
  <%= config[:camel_cased_app_name] %>::Container.finalize :monitor do |_container|
2
2
  init do
3
3
  require "dry/monitor"
4
- require "rom/instrumentation"
5
4
  end
6
5
 
7
6
  start do
@@ -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
 
@@ -1,7 +1,7 @@
1
1
  module Dry
2
2
  module Web
3
3
  module Roda
4
- VERSION = "0.6.2".freeze
4
+ VERSION = "0.6.3".freeze
5
5
  end
6
6
  end
7
7
  end
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.2
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-19 00:00:00.000000000 Z
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