pg_application_name 1.1.0 → 1.2.0
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.
@@ -20,13 +20,17 @@ module ActiveRecord
|
|
20
20
|
|
21
21
|
def self.initialize_connection_application_name(application_name)
|
22
22
|
self.connection_application_name = application_name
|
23
|
-
ActiveRecord::Base.connection.set_server_application_name
|
23
|
+
if ActiveRecord::Base.connection.respond_to? :set_server_application_name
|
24
|
+
ActiveRecord::Base.connection.set_server_application_name(self.connection_application_name)
|
25
|
+
end
|
24
26
|
end
|
25
27
|
|
26
28
|
private
|
27
29
|
def new_connection_with_set_application_name
|
28
30
|
c = new_connection_without_set_application_name
|
29
|
-
c.set_server_application_name
|
31
|
+
if c.respond_to? :set_server_application_name
|
32
|
+
c.set_server_application_name(self.class.connection_application_name)
|
33
|
+
end
|
30
34
|
c
|
31
35
|
end
|
32
36
|
alias_method_chain :new_connection, :set_application_name
|
data/pg_application_name.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.name = 'pg_application_name'
|
8
8
|
s.version = PgApplicationName::VERSION
|
9
9
|
s.license = 'New BSD License'
|
10
|
-
s.date = '
|
10
|
+
s.date = '2013-03-22'
|
11
11
|
s.summary = "Stamp an ActiveRecord connection to a postgres database with an appropriate application_name."
|
12
12
|
s.description = "This gem stamps an identification mark on the postgres database connection using the postgres connection variable 'application_name'. Such a stamp can be viewed in pg_stat_activity."
|
13
13
|
s.authors = ["Keith Gabryelski"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_application_name
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-03-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: pg
|