silent-postgres 0.0.6 → 0.0.7

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.
@@ -3,7 +3,7 @@ if Rails.env.development? || Rails.env.test?
3
3
  require "silent-postgres/railtie"
4
4
 
5
5
  module SilentPostgres
6
- SILENCED_METHODS = %w(tables indexes column_definitions pk_and_sequence_for last_insert_id)
6
+ SILENCED_METHODS = %w(tables table_exists? indexes column_definitions pk_and_sequence_for last_insert_id)
7
7
 
8
8
  def self.included(base)
9
9
  SILENCED_METHODS.each do |m|
@@ -12,10 +12,16 @@ if Rails.env.development? || Rails.env.test?
12
12
  end
13
13
 
14
14
  SILENCED_METHODS.each do |m|
15
+ m1, m2 = if m =~ /^(.*)\?$/
16
+ [$1, '?']
17
+ else
18
+ [m, nil]
19
+ end
20
+
15
21
  eval <<-METHOD
16
- def #{m}_with_silencer(*args)
22
+ def #{m1}_with_silencer#{m2}(*args)
17
23
  @logger.silence do
18
- #{m}_without_silencer(*args)
24
+ #{m1}_without_silencer#{m2}(*args)
19
25
  end
20
26
  end
21
27
  METHOD
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{silent-postgres}
5
- s.version = "0.0.6"
5
+ s.version = "0.0.7"
6
6
  s.summary = %q{Rails plugin that silences Postgresql connection adapter verbose output}
7
7
  s.email = ['bragi@ragnarson.com', 'dolzenko@gmail.com']
8
8
  s.homepage = %q{http://github.com/dolzenko/silent-postgres}
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: silent-postgres
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
5
- prerelease: false
4
+ hash: 17
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 6
10
- version: 0.0.6
9
+ - 7
10
+ version: 0.0.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - "\xC5\x81ukasz Piestrzeniewicz"
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-11-05 00:00:00 +00:00
19
+ date: 2011-01-15 00:00:00 +00:00
20
20
  default_executable:
21
21
  dependencies: []
22
22
 
@@ -67,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
67
  requirements: []
68
68
 
69
69
  rubyforge_project:
70
- rubygems_version: 1.3.7
70
+ rubygems_version: 1.4.2
71
71
  signing_key:
72
72
  specification_version: 3
73
73
  summary: Rails plugin that silences Postgresql connection adapter verbose output