programmable-ventouse 0.1.4 → 0.1.5

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.
@@ -1,18 +1,20 @@
1
- module SuppressLoggingFor
2
- def self.suppress_logging_for *actions
3
- unless defined? @@actions_without_logging
4
- @@actions_without_logging = []
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
- def process(request, *)
7
- if @@actions_without_logging.include?((request['action'] || 'index').to_sym)
8
- logger.silence { super }
9
- else
10
- super
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
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.2.0
75
+ rubygems_version: 1.3.5
75
76
  signing_key:
76
77
  specification_version: 2
77
78
  summary: Various usefull ruby/rails shit.