rails-flog 1.1.0 → 1.1.1
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/README.md +2 -1
- data/lib/flog/params_formattable.rb +4 -5
- data/lib/flog/sql_formattable.rb +4 -5
- data/lib/flog/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d92f9e5659c4ddc5b1cff2a221c211024678286
|
4
|
+
data.tar.gz: 3f436f911028bb5e1ec6edf651f77c4d4edc6b94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc59c520f5e43959612424651280796903b23f48277e68c7373272d5602c4fcd846efe499b0cc01a7cb92df1313017d1db7b19ec6184e68132bb6bb9fb03e46c
|
7
|
+
data.tar.gz: c4701cef3be35296f50ab97cfd01d782b886b8e7291f667e153fc7a7184f4457ac813695ca9bc73d92d433a250445d49a828aeb6c1217dfebf8173ef1bdbf6e6
|
data/README.md
CHANGED
@@ -70,7 +70,7 @@ Processing by IssuesController#create as HTML
|
|
70
70
|
|
71
71
|
## Installation
|
72
72
|
|
73
|
-
Add this line to your application's Gemfile:
|
73
|
+
Add this line to your application's Gemfile:
|
74
74
|
(Recommendation: use only `:development` and `:test` enviroment)
|
75
75
|
|
76
76
|
gem 'rails-flog', :require => "flog"
|
@@ -108,3 +108,4 @@ If you put a file named `no-flog.txt` to `<rails_app>/tmp` direcotry, `rails-flo
|
|
108
108
|
|
109
109
|
- v1.0.0 (2013-11-28 JST): First release
|
110
110
|
- v1.1.0 (2013-12-02 JST): Add feature that disables format by no-flog.txt
|
111
|
+
- v1.1.1 (2013-12-06 JST): Change to alias_method_change from alias for method aliasing
|
@@ -7,17 +7,16 @@ require "flog/status"
|
|
7
7
|
class ActionController::LogSubscriber
|
8
8
|
include Flog::PayloadValueShuntable
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
def start_processing(event)
|
13
|
-
return original_start_processing(event) unless Flog::Status.enabled?
|
10
|
+
def start_processing_with_flog(event)
|
11
|
+
return start_processing_without_flog(event) unless Flog::Status.enabled?
|
14
12
|
|
15
13
|
replaced = replace_params(event.payload[:params])
|
16
14
|
|
17
15
|
shunt_payload_value(event.payload, :params, replaced) do
|
18
|
-
|
16
|
+
start_processing_without_flog(event)
|
19
17
|
end
|
20
18
|
end
|
19
|
+
alias_method_chain :start_processing, :flog
|
21
20
|
|
22
21
|
private
|
23
22
|
def replace_params(params)
|
data/lib/flog/sql_formattable.rb
CHANGED
@@ -5,17 +5,16 @@ require "flog/payload_value_shuntable"
|
|
5
5
|
class ActiveRecord::LogSubscriber
|
6
6
|
include Flog::PayloadValueShuntable
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
def sql(event)
|
11
|
-
return original_sql(event) unless Flog::Status.enabled?
|
8
|
+
def sql_with_flog(event)
|
9
|
+
return sql_without_flog(event) unless Flog::Status.enabled?
|
12
10
|
|
13
11
|
formatted = format_sql(event.payload[:sql])
|
14
12
|
|
15
13
|
shunt_payload_value(event.payload, :sql, "\n\t#{formatted}") do
|
16
|
-
|
14
|
+
sql_without_flog(event)
|
17
15
|
end
|
18
16
|
end
|
17
|
+
alias_method_chain :sql, :flog
|
19
18
|
|
20
19
|
private
|
21
20
|
def format_sql(sql)
|
data/lib/flog/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-flog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pinzolo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|