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 +4 -4
- data/lib/dossier/formatter.rb +3 -0
- data/lib/dossier/renderer.rb +18 -3
- data/lib/dossier/version.rb +1 -1
- data/spec/dummy/config/environments/development.rb +2 -2
- data/spec/dummy/config/environments/test.rb +1 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/test.log +2320 -54820
- metadata +44 -52
- data/spec/dummy/app/assets/javascripts/application.js +0 -15
- data/spec/dummy/app/assets/stylesheets/application.css +0 -13
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/log/development.log +0 -4542
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93987008f6194c281702669957217d7a95c69e58
|
4
|
+
data.tar.gz: 9549de90bae8c4d2e92b0090670bd70a9b4b6b9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: abb7438d57a7d8f724054c371f5dc324773f63eeb783be4de9690206d24435199e24df268bb46b360120fc66f7aaf3f194ed567371f82f8ad0c2ae2d5edc3379
|
7
|
+
data.tar.gz: 3bf60dc6132b439fe35b0f35115a253f20b7f56b7b12f0a4c0a77fee2a66eaea4dbf1983f94c507aed376e0b4f39449051c818dace505827c114cfd542c08b09
|
data/lib/dossier/formatter.rb
CHANGED
@@ -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
|
data/lib/dossier/renderer.rb
CHANGED
@@ -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 =>
|
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::
|
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.
|
60
|
+
include Rails.application.routes.url_helpers
|
61
|
+
|
62
|
+
def default_url_options
|
63
|
+
{}
|
64
|
+
end
|
50
65
|
end
|
51
66
|
end
|
52
67
|
|
data/lib/dossier/version.rb
CHANGED
@@ -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
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|