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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ffb24d7d697c09db406447acfedef8f683044736
4
- data.tar.gz: f23154a732d475110df4b607d8168e0818f531d7
3
+ metadata.gz: 30f78c7266a4f4e1ec31ead76bdfa0df95f83759
4
+ data.tar.gz: 87c90a35321e12cb18fcc551450038d2e2c83de2
5
5
  SHA512:
6
- metadata.gz: 04383c31311d242b02852f00d9640cd31b79baac0696e5dbafdcd6e335069feaeb49b675bbcbfa1535b3a1ddc0cef493dfba91bb1d2d6849192055bd1651b5e6
7
- data.tar.gz: f4515392b32c4af3995400edaf6802115db1658f06eae7df587a262974c1e6d642d8befe26181481a50083e16a033d16880ef292e3a6c7451159867aa8c52a39
6
+ metadata.gz: 676ba9d1a928b9abc18a5eba12d3fd58aba70793120659944b39e3fc10db6cb88749a8b0e2eb85d10c736c5b8ccdb646ebae26d844b1e9c77627d35d39ae377c
7
+ data.tar.gz: 8d88e8d16638d10a8610adcd5e40d3e647664be877cbc0745da8f9b752a330d1ef1e39b62453d175a452e346d355fb765f316accb074948c04d45e898e3ab268
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ == Footnotes v4.1.3 ==
2
+ * Improve fix done in 4.1.2 that broke support with rails 3 (thanks kirikiriyamama)
1
3
  == Footnotes v4.1.2 ==
2
4
  * Fix errors when some log formatters return nil
3
5
  == Footnotes v4.1.1 ==
data/README.rdoc CHANGED
@@ -18,8 +18,7 @@ Installing Rails Footnotes is very easy.
18
18
 
19
19
  === Rails 3.2.x/4.x
20
20
 
21
- gem 'rails-footnotes', '>= 4.0.0', '<5'
22
-
21
+ gem 'rails-footnotes', '~> 4.0'
23
22
 
24
23
  After you install RailsFootnotes and add it to your Gemfile, you need to run the generator:
25
24
 
@@ -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 = self.original_logger.kind_of?(Logger) ? self.original_logger.formatter : ActiveSupport::Logger::SimpleFormatter.new
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)
@@ -1,3 +1,3 @@
1
1
  module Footnotes
2
- VERSION = "4.1.2"
2
+ VERSION = "4.1.3"
3
3
  end
@@ -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.2
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-10-21 00:00:00.000000000 Z
15
+ date: 2014-11-06 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rails