rails-footnotes 4.1.2 → 4.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +2 -0
- data/README.rdoc +1 -2
- data/lib/rails-footnotes/notes/log_note.rb +6 -1
- data/lib/rails-footnotes/version.rb +1 -1
- data/spec/controllers/log_note_controller_spec.rb +0 -9
- data/spec/spec_helper.rb +2 -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: 30f78c7266a4f4e1ec31ead76bdfa0df95f83759
|
4
|
+
data.tar.gz: 87c90a35321e12cb18fcc551450038d2e2c83de2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 676ba9d1a928b9abc18a5eba12d3fd58aba70793120659944b39e3fc10db6cb88749a8b0e2eb85d10c736c5b8ccdb646ebae26d844b1e9c77627d35d39ae377c
|
7
|
+
data.tar.gz: 8d88e8d16638d10a8610adcd5e40d3e647664be877cbc0745da8f9b752a330d1ef1e39b62453d175a452e346d355fb765f316accb074948c04d45e898e3ab268
|
data/CHANGELOG
CHANGED
data/README.rdoc
CHANGED
@@ -12,7 +12,12 @@ module Footnotes
|
|
12
12
|
self.original_logger = Rails.logger
|
13
13
|
note_logger = NoteLogger.new(self.logs)
|
14
14
|
note_logger.level = self.original_logger.level
|
15
|
-
note_logger.formatter =
|
15
|
+
note_logger.formatter =
|
16
|
+
if self.original_logger.kind_of?(Logger)
|
17
|
+
self.original_logger.formatter
|
18
|
+
else
|
19
|
+
defined?(ActiveSupport::Logger) ? ActiveSupport::Logger::SimpleFormatter.new : Logger::SimpleFormatter.new
|
20
|
+
end
|
16
21
|
# Rails 3 don't have ActiveSupport::Logger#broadcast so we backported it
|
17
22
|
extend_module = defined?(ActiveSupport::Logger) ? ActiveSupport::Logger.broadcast(note_logger) : NoteLogger.broadcast(note_logger)
|
18
23
|
Rails.logger = self.original_logger.dup.extend(extend_module)
|
@@ -26,15 +26,6 @@ describe 'log note' do
|
|
26
26
|
Footnotes.enabled = false
|
27
27
|
end
|
28
28
|
|
29
|
-
before do
|
30
|
-
@original_logger = Rails.logger
|
31
|
-
Rails.logger = Logger.new(StringIO.new)
|
32
|
-
end
|
33
|
-
|
34
|
-
after do
|
35
|
-
Rails.logger = @original_logger
|
36
|
-
end
|
37
|
-
|
38
29
|
it 'Includes the log in the response' do
|
39
30
|
get :index
|
40
31
|
log_debug = first('fieldset#log_debug_info div', :visible => false)
|
data/spec/spec_helper.rb
CHANGED
@@ -5,7 +5,6 @@ rescue LoadError
|
|
5
5
|
end
|
6
6
|
ENV["RAILS_ENV"] ||= 'test'
|
7
7
|
require "rails-footnotes"
|
8
|
-
Rails.logger = Logger.new(STDOUT)
|
9
8
|
|
10
9
|
module FooBar
|
11
10
|
class Application < Rails::Application
|
@@ -20,6 +19,8 @@ end
|
|
20
19
|
|
21
20
|
RSpec.configure do |config|
|
22
21
|
|
22
|
+
Rails.application.initialize!
|
23
|
+
|
23
24
|
Rails.application.routes.draw do
|
24
25
|
get 'footnotes/foo'
|
25
26
|
get 'footnotes/foo_holder'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-footnotes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
4
|
+
version: 4.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roman V. Babenko
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2014-
|
15
|
+
date: 2014-11-06 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rails
|