dossier 2.9.3 → 2.10.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0e7f5e5c621df6121e3b3363a4e86235f0ab861a
4
- data.tar.gz: 711f5e8d526969571126c5ced2bf5107cbe43267
3
+ metadata.gz: 93987008f6194c281702669957217d7a95c69e58
4
+ data.tar.gz: 9549de90bae8c4d2e92b0090670bd70a9b4b6b9c
5
5
  SHA512:
6
- metadata.gz: c76b2b8235cb62dc965f58c44207d6e8e7173e1316f788402287938730896c2adb97c6fdb23f95f4a5498cb33789a841185151ef1c657c2947360f83dbc58770
7
- data.tar.gz: 94b7c57fc6df708ee1ba964031561282ecfc4615075c0a1635b2030ad9588e9a2d5108ae0c41b323fb2dd1636abd2212ac68905e6d5fd9de02aeb17dd97711d5
6
+ metadata.gz: abb7438d57a7d8f724054c371f5dc324773f63eeb783be4de9690206d24435199e24df268bb46b360120fc66f7aaf3f194ed567371f82f8ad0c2ae2d5edc3379
7
+ data.tar.gz: 3bf60dc6132b439fe35b0f35115a253f20b7f56b7b12f0a4c0a77fee2a66eaea4dbf1983f94c507aed376e0b4f39449051c818dace505827c114cfd542c08b09
@@ -34,6 +34,9 @@ module Dossier
34
34
  class UrlFormatter
35
35
  include ActionView::Helpers::UrlHelper
36
36
 
37
+ include ActionDispatch::Routing::UrlFor if defined?(ActionDispatch::Routing::UrlFor) # Rails 4.1
38
+ include ActionView::RoutingUrlFor if defined?(ActionView::RoutingUrlFor) # Rails 4.1
39
+
37
40
  def _routes
38
41
  Rails.application.routes
39
42
  end
@@ -3,13 +3,16 @@ module Dossier
3
3
  attr_reader :report
4
4
  attr_writer :engine
5
5
 
6
+ # Conditional for Rails 4.1 or < 4.1 Layout module
7
+ Layouts = defined?(ActionView::Layouts) ? ActionView::Layouts : AbstractController::Layouts
8
+
6
9
  def initialize(report)
7
10
  @report = report
8
11
  end
9
12
 
10
13
  def render(options = {})
11
14
  render_template :custom, options
12
- rescue ActionView::MissingTemplate => e
15
+ rescue ActionView::MissingTemplate => _e
13
16
  render_template :default, options
14
17
  end
15
18
 
@@ -37,16 +40,28 @@ module Dossier
37
40
  end
38
41
 
39
42
  class Engine < AbstractController::Base
40
- include AbstractController::Layouts
43
+ include AbstractController::Rendering
44
+ include Renderer::Layouts
41
45
  include ViewContextWithReportFormatter
46
+
42
47
  attr_reader :report
48
+ config.cache_store = ActionController::Base.cache_store
43
49
 
44
50
  layout 'dossier/layouts/application'
45
51
 
52
+ def render_to_body(options = {})
53
+ renderer = ActionView::Renderer.new(lookup_context)
54
+ renderer.render(view_context, options)
55
+ end
56
+
46
57
  def self._helpers
47
58
  Module.new do
48
59
  include Rails.application.helpers
49
- include Rails.application.routes_url_helpers
60
+ include Rails.application.routes.url_helpers
61
+
62
+ def default_url_options
63
+ {}
64
+ end
50
65
  end
51
66
  end
52
67
 
@@ -1,3 +1,3 @@
1
1
  module Dossier
2
- VERSION = "2.9.3"
2
+ VERSION = "2.10.0"
3
3
  end
@@ -23,11 +23,11 @@ Dummy::Application.configure do
23
23
  config.action_dispatch.best_standards_support = :builtin
24
24
 
25
25
  # Raise exception on mass assignment protection for Active Record models
26
- config.active_record.mass_assignment_sanitizer = :strict
26
+ # config.active_record.mass_assignment_sanitizer = :strict
27
27
 
28
28
  # Log the query plan for queries taking more than this (works
29
29
  # with SQLite, MySQL, and PostgreSQL)
30
- config.active_record.auto_explain_threshold_in_seconds = 0.5
30
+ # config.active_record.auto_explain_threshold_in_seconds = 0.5
31
31
 
32
32
  # Do not compress assets
33
33
  config.assets.compress = false
@@ -30,7 +30,7 @@ Dummy::Application.configure do
30
30
  config.action_mailer.delivery_method = :test
31
31
 
32
32
  # Raise exception on mass assignment protection for Active Record models
33
- config.active_record.mass_assignment_sanitizer = :strict
33
+ # config.active_record.mass_assignment_sanitizer = :strict
34
34
 
35
35
  # Print deprecation notices to the stderr
36
36
  config.active_support.deprecation = :stderr
Binary file