boutons-rails 0.0.1 → 0.0.2
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/lib/boutons/rails/database.rb +8 -9
- data/lib/boutons/rails/engine.rb +3 -1
- data/lib/boutons/rails/mailer.rb +4 -2
- data/lib/boutons/rails/synapse.rb +5 -1
- data/lib/boutons/rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2e9f7aaa99f7c79b9dc125f5a8d910a4cfebbca1
|
|
4
|
+
data.tar.gz: d1cdf601653dbb7f922d79a7c80292011a404721
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f46bed496f97491b5cb19a69460690d755704b63e73132237e0b66b8e99946099096faeceb74b177e9f268a7edb6aeeb8592f70d5f7e9480849ababf86c8b3c0
|
|
7
|
+
data.tar.gz: c7f3ef9833befc5a46f4e91e98262b7161c8e5032256559241d3062241f9ae448e110ca8f60cf97bbae12271443045f61ec254f356d5befb506adfc2a7cc74b8
|
|
@@ -3,15 +3,14 @@ require "synapse/easy"
|
|
|
3
3
|
module Boutons
|
|
4
4
|
module Rails
|
|
5
5
|
module Database
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
Synapse::Easy::Service.new application: :mysql
|
|
6
|
+
class << self
|
|
7
|
+
def synapse
|
|
8
|
+
return create :postgresql if defined? :PG
|
|
9
|
+
return create :mysql if defined? :Mysql2
|
|
10
|
+
end
|
|
11
|
+
def create app
|
|
12
|
+
Synapse::Easy::Service.new application: app
|
|
13
|
+
end
|
|
15
14
|
end
|
|
16
15
|
end
|
|
17
16
|
end
|
data/lib/boutons/rails/engine.rb
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
require "boutons"
|
|
2
2
|
require "boutons/rails/database"
|
|
3
3
|
require "boutons/rails/mailer"
|
|
4
|
+
require "boutons/rails/synapse"
|
|
4
5
|
|
|
5
6
|
module Boutons
|
|
6
7
|
module Rails
|
|
@@ -11,7 +12,8 @@ module Boutons
|
|
|
11
12
|
Boutons.add Boutons::Rails::Mailer.synapse
|
|
12
13
|
end
|
|
13
14
|
config.after_initialize do |app|
|
|
14
|
-
Boutons.with_loggers do |logger|
|
|
15
|
+
Boutons.with_loggers.each do |logger|
|
|
16
|
+
next unless logger.respond_to? :replay_to
|
|
15
17
|
logger.replay_to ::Rails.logger
|
|
16
18
|
end
|
|
17
19
|
Boutons.log_with ::Rails.logger, synapses: :all
|
data/lib/boutons/rails/mailer.rb
CHANGED