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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7fd7cc1b25005e13c3ed28ab106f5dbf3a57f1f5
4
- data.tar.gz: 7d98648b1bd7483c4baa2b6be888458340d53f04
3
+ metadata.gz: 2e9f7aaa99f7c79b9dc125f5a8d910a4cfebbca1
4
+ data.tar.gz: d1cdf601653dbb7f922d79a7c80292011a404721
5
5
  SHA512:
6
- metadata.gz: 73c422f340a7ca1b0dc1dce639be92004ea3bd68673f347891d9c5ace2f41fe3b531c6d2aa395ea706208f9af71bb9af66f62f9a1d8f9b82a4f199ba89b79da2
7
- data.tar.gz: 8db115685b7707a1158c802bdf69099ab574e281551fdaeff3bd12b8688d9b28e3c8859ffdac527a6cabccf29f512a609eaa982eda6255e7ff926440ebd1880b
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
- def self.synapse
7
- return postgresql if defined? :PG
8
- return mysql if defined? :Mysql2
9
- end
10
- def self.postgresql
11
- Synapse::Easy::Service.new application: :postgresql
12
- end
13
- def self.mysql
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
@@ -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
@@ -3,8 +3,10 @@ require "synapse/easy"
3
3
  module Boutons
4
4
  module Rails
5
5
  module Mailer
6
- def self.synapse
7
- Synapse::Easy::Service.new application: :smtp
6
+ class << self
7
+ def synapse
8
+ Synapse::Easy::Service.new application: :smtp
9
+ end
8
10
  end
9
11
  end
10
12
  end
@@ -1,3 +1,7 @@
1
+ require "replay_logger"
2
+
1
3
  module Synapse
2
- class Logger < ReplayLogger; end
4
+ module Logging
5
+ class Logger < ReplayLogger::Logger; end
6
+ end
3
7
  end
@@ -1,5 +1,5 @@
1
1
  module Boutons
2
2
  module Rails
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boutons-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mathias Kaufmann