infopark_rails_connector 6.8.3.73.75172665 → 6.8.3.115.227021242
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.
@@ -52,12 +52,13 @@ module RailsConnector
|
|
52
52
|
|
53
53
|
def cms_path_or_url_for_objs(obj, path_or_url, options = {})
|
54
54
|
permalink = obj.permalink
|
55
|
+
ignore_body_data_url = options.delete(:ignore_body_data_url)
|
55
56
|
if permalink && !Configuration.editor_interface_enabled?
|
56
57
|
__send__("cms_permalink_#{path_or_url}", options.merge(:permalink => permalink))
|
57
58
|
elsif obj.homepage? && !Configuration.editor_interface_enabled?
|
58
59
|
__send__("root_#{path_or_url}", options)
|
59
60
|
else
|
60
|
-
if obj.body_data_url
|
61
|
+
if obj.body_data_url && !ignore_body_data_url
|
61
62
|
obj.body_data_url
|
62
63
|
elsif obj.binary? && !obj.file_extension.blank?
|
63
64
|
__send__("cms_id_#{path_or_url}",
|
@@ -81,6 +82,7 @@ module RailsConnector
|
|
81
82
|
url = link.url
|
82
83
|
end
|
83
84
|
|
85
|
+
options.delete(:ignore_body_data_url)
|
84
86
|
url = merge_options(url, options) if options.any?
|
85
87
|
url
|
86
88
|
end
|
@@ -25,6 +25,13 @@ module RailsConnector
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
+
def display_original_value(value)
|
29
|
+
case value
|
30
|
+
when HtmlString then convert_links(value, :ignore_body_data_url => true).html_safe
|
31
|
+
else display_value(value)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
28
35
|
# Renders a field from the CMS, including an edit marker for the preview
|
29
36
|
# If the option :marker is +false+, no edit marker will be rendered.
|
30
37
|
#
|
@@ -69,7 +76,7 @@ module RailsConnector
|
|
69
76
|
LINK_PATTERN = '<?\binternallink:(\d+)\b>?'
|
70
77
|
LINK_EXPRESSION = %r(#{LINK_PATTERN})
|
71
78
|
|
72
|
-
def convert_links(content_attribute)
|
79
|
+
def convert_links(content_attribute, cms_path_options = {})
|
73
80
|
return content_attribute unless content_attribute =~ LINK_EXPRESSION
|
74
81
|
link_map = content_attribute.source.text_links.each_with_object({}) do |link, map|
|
75
82
|
map[link.id.to_s] = link
|
@@ -79,7 +86,7 @@ module RailsConnector
|
|
79
86
|
if link.blank?
|
80
87
|
"#{CmsRoutingHelper::LINK_TO_UNREACHABLE}#{$2}"
|
81
88
|
else
|
82
|
-
uri = "#{cms_path(link)}#{$2}"
|
89
|
+
uri = "#{cms_path(link, cms_path_options)}#{$2}"
|
83
90
|
if link.markdown?
|
84
91
|
markdown_link(link, uri)
|
85
92
|
else
|
data/config/ca-bundle.crt
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
##
|
2
|
-
## /Network/Servers/xs2.infopark/Users/develop/dcc/tmp/
|
2
|
+
## /Network/Servers/xs2.infopark/Users/develop/dcc/tmp/Rails_Connector__Alex_P___208/repos/rails_connector/config/ca-bundle.crt -- Bundle of CA Root Certificates
|
3
3
|
##
|
4
|
-
## Converted at:
|
4
|
+
## Converted at: Fri Mar 1 08:24:34 2013 UTC
|
5
5
|
##
|
6
6
|
## This is a bundle of X.509 certificates of public Certificate Authorities
|
7
7
|
## (CA). These were automatically extracted from Mozilla's root certificates
|
@@ -31,8 +31,7 @@ module RailsConnector
|
|
31
31
|
if params[:id]
|
32
32
|
Obj.find(params[:id])
|
33
33
|
elsif params[:permalink].present?
|
34
|
-
|
35
|
-
Obj.find_by_permalink!(permalink)
|
34
|
+
self.class.find_permalink_by_param(params[:permalink])
|
36
35
|
else
|
37
36
|
if callback = RailsConnector::Configuration.choose_homepage_callback
|
38
37
|
callback_result = callback.call(env)
|
@@ -59,6 +58,11 @@ module RailsConnector
|
|
59
58
|
env["action_dispatch.request.path_parameters"]
|
60
59
|
end
|
61
60
|
|
61
|
+
def self.find_permalink_by_param(permalink_param)
|
62
|
+
permalink = Array(permalink_param).join("/")
|
63
|
+
Obj.find_by_permalink!(permalink)
|
64
|
+
end
|
65
|
+
|
62
66
|
end
|
63
67
|
|
64
68
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: infopark_rails_connector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.8.3.
|
4
|
+
version: 6.8.3.115.227021242
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-03-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -363,7 +363,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
363
363
|
version: '0'
|
364
364
|
segments:
|
365
365
|
- 0
|
366
|
-
hash: -
|
366
|
+
hash: -826410701
|
367
367
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
368
368
|
none: false
|
369
369
|
requirements:
|