programmable-ventouse 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ventouse/suppress_logging_for.rb +14 -12
- metadata +3 -2
@@ -1,18 +1,20 @@
|
|
1
|
-
module
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
module ActionController
|
2
|
+
class Base
|
3
|
+
def self.suppress_logging_for *actions
|
4
|
+
unless respond_to? :actions_without_logging
|
5
|
+
cattr_accessor :actions_without_logging
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
self.actions_without_logging = []
|
8
|
+
|
9
|
+
define_method :process do |request, *args|
|
10
|
+
if self.class.actions_without_logging.include?((request['action'] || 'index').to_sym)
|
11
|
+
logger.silence { super }
|
12
|
+
else
|
13
|
+
super
|
14
|
+
end
|
11
15
|
end
|
12
16
|
end
|
17
|
+
self.actions_without_logging.concat actions.flatten
|
13
18
|
end
|
14
|
-
@@actions_without_logging.concat actions.flatten
|
15
19
|
end
|
16
20
|
end
|
17
|
-
|
18
|
-
ActionController::Base.send :include, SuppressLoggingFor
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: programmable-ventouse
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilia Ablamonov
|
@@ -48,6 +48,7 @@ files:
|
|
48
48
|
- test/declarations_test.rb
|
49
49
|
has_rdoc: true
|
50
50
|
homepage: http://github.com/programmable/ventouse
|
51
|
+
licenses:
|
51
52
|
post_install_message:
|
52
53
|
rdoc_options:
|
53
54
|
- --quiet
|
@@ -71,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
71
72
|
requirements: []
|
72
73
|
|
73
74
|
rubyforge_project:
|
74
|
-
rubygems_version: 1.
|
75
|
+
rubygems_version: 1.3.5
|
75
76
|
signing_key:
|
76
77
|
specification_version: 2
|
77
78
|
summary: Various usefull ruby/rails shit.
|