silent-postgres 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/init.rb ADDED
@@ -0,0 +1 @@
1
+ require 'silent-postgres'
File without changes
@@ -1,12 +1,20 @@
1
- # Rails 3 initialization
2
1
  module SilentPostgres
3
- require 'rails'
4
- class Railtie < Rails::Railtie
5
- initializer 'silent_postgres.insert_into_active_record' do
6
- ActiveSupport.on_load :active_record do
7
- puts "Silencing Postgres"
8
- ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.send(:include, SilentPostgres)
2
+ def self.init!
3
+ puts "Silencing Postgres"
4
+ ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.send(:include, SilentPostgres)
5
+ end
6
+
7
+ if defined?(Rails::Railtie)
8
+ # Rails 3
9
+ class Railtie < Rails::Railtie
10
+ initializer 'silent_postgres.insert_into_active_record' do
11
+ ActiveSupport.on_load :active_record do
12
+ SilentPostgres.init!
13
+ end
9
14
  end
10
15
  end
16
+ else
17
+ # Rails 2
18
+ init!
11
19
  end
12
20
  end
@@ -1,9 +1,9 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{silent-postgres}
3
- s.version = "0.0.3"
3
+ s.version = "0.0.4"
4
4
  s.summary = %q{Rails plugin that silences Postgresql connection adapter verbose output}
5
5
  s.email = ['bragi@ragnarson.com', 'dolzenko@gmail.com']
6
6
  s.homepage = %q{http://github.com/dolzenko/silent-postgres}
7
7
  s.authors = ["Łukasz Piestrzeniewicz", "Evgeniy Dolzhenko"]
8
- s.files = ["MIT-LICENSE", "README", "lib", "silent-postgres.gemspec", "lib/silent-postgres", "lib/silent-postgres/railtie.rb", "lib/silent-postgres.rb"]
8
+ s.files = ["MIT-LICENSE", "README", "lib", "silent-postgres.gemspec", "lib/silent-postgres", "lib/silent-postgres/railtie.rb", "lib/silent-postgres.rb", "init.rb"]
9
9
  end
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: 25
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
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-09-15 00:00:00 -07:00
19
+ date: 2010-09-22 00:00:00 -07:00
20
20
  default_executable:
21
21
  dependencies: []
22
22
 
@@ -36,6 +36,7 @@ files:
36
36
  - silent-postgres.gemspec
37
37
  - lib/silent-postgres/railtie.rb
38
38
  - lib/silent-postgres.rb
39
+ - init.rb
39
40
  has_rdoc: true
40
41
  homepage: http://github.com/dolzenko/silent-postgres
41
42
  licenses: []