infopark_rails_connector 6.8.0.210.ed204b0 → 6.8.0.322.c003f11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. data/.yardopts +5 -0
  2. data/README +9 -20
  3. data/app/controllers/cms_controller.rb +3 -2
  4. data/app/controllers/comments_controller.rb +2 -2
  5. data/app/controllers/crm_form_controller.rb +5 -0
  6. data/app/controllers/pdf_controller.rb +1 -0
  7. data/app/controllers/rails_connector/default_cms_controller.rb +8 -4
  8. data/app/controllers/rails_connector/default_comments_controller.rb +1 -2
  9. data/app/controllers/rails_connector/default_crm_form_controller.rb +13 -0
  10. data/app/controllers/rails_connector/default_pdf_controller.rb +2 -0
  11. data/app/controllers/rails_connector/default_rss_controller.rb +4 -1
  12. data/app/controllers/rails_connector/default_search_controller.rb +2 -0
  13. data/app/controllers/rails_connector/default_user_controller.rb +10 -0
  14. data/app/controllers/rails_connector/pdf_external_controller.rb +2 -1
  15. data/app/controllers/rails_connector/time_machine_controller.rb +1 -1
  16. data/app/controllers/rss_controller.rb +1 -0
  17. data/app/controllers/search_controller.rb +5 -0
  18. data/app/controllers/seo_sitemap_controller.rb +2 -0
  19. data/app/controllers/user_controller.rb +5 -0
  20. data/app/helpers/cms_helper.rb +2 -1
  21. data/app/helpers/cms_routing_helper.rb +2 -1
  22. data/app/helpers/crm_form_helper.rb +4 -0
  23. data/app/helpers/rails_connector/cms_asset_helper.rb +3 -0
  24. data/app/helpers/rails_connector/default_cms_helper.rb +1 -1
  25. data/app/helpers/rails_connector/default_cms_routing_helper.rb +10 -5
  26. data/app/helpers/rails_connector/default_crm_form_helper.rb +4 -0
  27. data/app/helpers/rails_connector/default_user_helper.rb +7 -1
  28. data/app/helpers/rails_connector/display_helper.rb +7 -5
  29. data/app/helpers/rails_connector/layout_helper.rb +3 -0
  30. data/app/helpers/rails_connector/link_helper.rb +3 -0
  31. data/app/helpers/rails_connector/mandatory_label_helper.rb +1 -1
  32. data/app/helpers/rails_connector/menu_helper.rb +2 -1
  33. data/app/helpers/rails_connector/micronav_helper.rb +2 -0
  34. data/app/helpers/rails_connector/seo_helper.rb +2 -0
  35. data/app/helpers/rails_connector/table_of_contents_helper.rb +2 -0
  36. data/app/helpers/rails_connector/time_machine_helper.rb +2 -0
  37. data/app/helpers/rails_connector/tracking_helper.rb +2 -0
  38. data/app/helpers/ratings_helper.rb +1 -1
  39. data/app/helpers/user_helper.rb +4 -0
  40. data/app/mailers/confirmation_mailer.rb +5 -0
  41. data/app/models/crm_form.rb +1 -0
  42. data/app/models/rails_connector/default_comment.rb +1 -1
  43. data/app/models/rails_connector/link_list.rb +3 -1
  44. data/lib/generators/rails_connector/comments/comments_generator.rb +0 -1
  45. data/lib/generators/rails_connector/comments/templates/migration.rb +0 -1
  46. data/lib/generators/rails_connector/install/install_generator.rb +0 -1
  47. data/lib/generators/rails_connector/install/templates/obj_extensions.rb +2 -1
  48. data/lib/generators/rails_connector/ratings/ratings_generator.rb +0 -1
  49. data/lib/generators/rails_connector/ratings/templates/migration.rb +0 -1
  50. data/lib/infopark_rails_connector.rb +4 -2
  51. data/lib/rails_connector/authenticable.rb +2 -2
  52. data/lib/rails_connector/cms_accessible.rb +14 -10
  53. data/lib/rails_connector/cms_dispatch_controller.rb +0 -1
  54. data/lib/rails_connector/cms_env.rb +0 -1
  55. data/lib/rails_connector/cms_test_request.rb +1 -1
  56. data/lib/rails_connector/commentable.rb +2 -2
  57. data/lib/rails_connector/configuration/google_analytics.rb +7 -4
  58. data/lib/rails_connector/configuration/pdf_generator.rb +3 -0
  59. data/lib/rails_connector/configuration/rss.rb +8 -2
  60. data/lib/rails_connector/configuration.rb +56 -27
  61. data/lib/rails_connector/core_extensions/time.rb +1 -1
  62. data/lib/rails_connector/crm.rb +54 -46
  63. data/lib/rails_connector/engine.rb +1 -1
  64. data/lib/rails_connector/fop.rb +2 -2
  65. data/lib/rails_connector/fop_on_rails/document/dom_tree.rb +1 -1
  66. data/lib/rails_connector/fop_on_rails/document/images.rb +1 -1
  67. data/lib/rails_connector/fop_on_rails/document/tables.rb +1 -1
  68. data/lib/rails_connector/fop_on_rails/document.rb +1 -1
  69. data/lib/rails_connector/fop_on_rails.rb +2 -2
  70. data/lib/rails_connector/googlebot_checker.rb +0 -1
  71. data/lib/rails_connector/html_string.rb +2 -2
  72. data/lib/rails_connector/link_resolvable.rb +1 -1
  73. data/lib/rails_connector/liquid_support/field_value_drop.rb +1 -1
  74. data/lib/rails_connector/liquid_support/link_drop.rb +1 -1
  75. data/lib/rails_connector/liquid_support/liquid_template_handler.rb +6 -6
  76. data/lib/rails_connector/liquid_support/named_object_drop.rb +1 -1
  77. data/lib/rails_connector/liquid_support/obj_drop.rb +1 -1
  78. data/lib/rails_connector/liquid_support/obj_filters.rb +1 -1
  79. data/lib/rails_connector/liquid_support.rb +4 -2
  80. data/lib/rails_connector/markdown_string.rb +2 -2
  81. data/lib/rails_connector/rateable.rb +1 -1
  82. data/lib/rails_connector/seo.rb +15 -7
  83. data/lib/rails_connector/ses.rb +13 -5
  84. data/lib/rails_connector/string_tagging.rb +1 -1
  85. data/lib/rails_connector/syndicateable.rb +3 -1
  86. data/lib/search_request.rb +1 -0
  87. metadata +15 -66
@@ -1,6 +1,6 @@
1
1
  module RailsConnector::LiquidSupport
2
2
 
3
- module FieldValueDropPatcher #:nodoc:
3
+ module FieldValueDropPatcher
4
4
  def self.patch(mod)
5
5
  mod.module_eval do
6
6
  return if method_defined?(:field_value_drop_patched)
@@ -33,9 +33,9 @@ module RailsConnector::LiquidSupport
33
33
  # Example:
34
34
  # {% template 'name-of-partial' %}
35
35
  class TemplateTag < Liquid::Tag
36
- Syntax = /(#{Liquid::QuotedFragment}+)/ #:nodoc:
36
+ Syntax = /(#{Liquid::QuotedFragment}+)/
37
37
 
38
- def initialize(tag_name, markup, tokens) #:nodoc:
38
+ def initialize(tag_name, markup, tokens)
39
39
 
40
40
  if markup =~ Syntax
41
41
  @partial_name = $1
@@ -46,7 +46,7 @@ module RailsConnector::LiquidSupport
46
46
  super
47
47
  end
48
48
 
49
- def render(context) #:nodoc:
49
+ def render(context)
50
50
  context.registers[:action_view].controller.__send__(
51
51
  :render_to_string, :partial => context[@partial_name]
52
52
  )
@@ -57,7 +57,7 @@ module RailsConnector::LiquidSupport
57
57
 
58
58
  # Das LiquidTemplateRepository kann Liquid-Templates anwenden.
59
59
  # Zunächst muss das Template kompiliert werden, danach kann es gerendert werden.
60
- class LiquidTemplateRepository #:nodoc:
60
+ class LiquidTemplateRepository
61
61
 
62
62
  cattr_accessor :compiled_templates
63
63
  self.compiled_templates = {}
@@ -151,7 +151,7 @@ module RailsConnector::LiquidSupport
151
151
  # Der Grund ist, dass die Klassen, die in Rails als TemplateHandler registriert
152
152
  # sind von Rails eingefroren werden (mittels Object.freeze) und daher keine
153
153
  # Klassenvariablen haben können.
154
- class LiquidTemplateHandler #:nodoc:
154
+ class LiquidTemplateHandler
155
155
  def self.call(template)
156
156
  template_id = LiquidTemplateRepository.compile(template)
157
157
  "#{LiquidTemplateRepository}.render('#{template_id}', self)"
@@ -3,7 +3,7 @@ require "singleton"
3
3
  module RailsConnector::LiquidSupport
4
4
 
5
5
  # Dieser Drop realisiert den Zugriff auf Objekte, die per NamedLink referenziert werden
6
- class NamedObjectDrop < Liquid::Drop #:nodoc:
6
+ class NamedObjectDrop < Liquid::Drop
7
7
  include Singleton
8
8
 
9
9
  def before_method(method)
@@ -1,7 +1,7 @@
1
1
  module RailsConnector::LiquidSupport
2
2
 
3
3
  # Dieser Drop kapselt ein Obj. Der Zugriff auf das Obj ist nur für [] und ausgewählte Methoden erlaubt.
4
- class ObjDrop < Liquid::Drop #:nodoc:
4
+ class ObjDrop < Liquid::Drop
5
5
  def initialize(obj)
6
6
  @obj = obj
7
7
  end
@@ -1,4 +1,4 @@
1
- module RailsConnector::LiquidSupport #:nodoc:
1
+ module RailsConnector::LiquidSupport
2
2
 
3
3
  # Filters in general are methods used in Liquid templates.
4
4
  # ObjFilters are filters specifically for dealing with CMS objects.
@@ -1,7 +1,7 @@
1
1
  require 'liquid'
2
2
 
3
3
  # A collection of modules and classes needed to enable Liquid templates with Rails Connector
4
-
4
+ # @api public
5
5
  module RailsConnector::LiquidSupport
6
6
 
7
7
  # Helpers can be made available in Liquid templates by enabling them in the
@@ -11,13 +11,15 @@ module RailsConnector::LiquidSupport
11
11
  # :helper_a,
12
12
  # :helper_b
13
13
  # )
14
+ # @api public
14
15
  def self.enable_helpers(*helpers)
15
16
  helpers.each do |helper|
16
17
  GeneralHelperTag << helper
17
18
  end
18
19
  end
19
20
 
20
- # set to true if an error in a liquid template should lead to an 500 server error
21
+ # set to +true+ if an error in a liquid template should lead to an 500 server error
22
+ # @api public
21
23
  mattr_accessor :raise_template_errors
22
24
 
23
25
  end
@@ -1,7 +1,7 @@
1
1
  module RailsConnector
2
2
 
3
3
  # Include this module in order to tag the string as one with Markdown content
4
- module MarkdownString #:nodoc:
4
+ module MarkdownString
5
5
  include LinkResolvable
6
6
  # Returns whether the String contains Markdown (default to true, overrides String.markdown?).
7
7
  def markdown?
@@ -11,7 +11,7 @@ module RailsConnector
11
11
 
12
12
  end
13
13
 
14
- class String #:nodoc:
14
+ class String
15
15
  # Returns whether the String contains Markdown (default to false).
16
16
  def markdown?
17
17
  false
@@ -1,6 +1,6 @@
1
1
  module RailsConnector
2
2
  #
3
- # This module provides a mixin for the CMS object model. It provides a +ratings+ association and well as several helper methods.
3
+ # This module provides a mixin for the CMS object model. It provides a {ratings} association and well as several helper methods.
4
4
  module Rateable
5
5
 
6
6
  # returns all Ratings for this Obj.
@@ -1,12 +1,15 @@
1
1
  module RailsConnector
2
2
  # Search Engine Optimization methods
3
+ # @api public
3
4
  module SEO
4
5
 
5
6
  # The methods contained herein are attached to the Obj model class.
7
+ # @api public
6
8
  module ClassMethods
7
9
  # Finds all objects that shall be included in the SEO <tt>sitemap.xml</tt>.
8
- # On each exportable none-image object, <tt>included_in_seo_sitemap?</tt> is called.
9
- # Overwrite <tt>included_in_seo_sitemap?</tt> in your +ObjExtensions+ to adjust the criteria.
10
+ # On each exportable none-image object, {InstanceMethods#included_in_seo_sitemap?} is called.
11
+ # Overwrite <tt>included_in_seo_sitemap?</tt> in your {ObjExtensions} to adjust the criteria.
12
+ # @api public
10
13
  def find_all_for_sitemap
11
14
  start = Obj.homepage
12
15
  children = start.toclist
@@ -17,33 +20,38 @@ module RailsConnector
17
20
  end
18
21
 
19
22
  # The methods contained herein are included in the Obj model.
23
+ # @api public
20
24
  module InstanceMethods
21
25
 
22
- # Returns +true+ by default. Overwrite in your +ObjExtensions+ as you like.
26
+ # Returns +true+ by default. Overwrite in your {ObjExtensions} as you like.
27
+ # @api public
23
28
  def readable_for_googlebots?
24
29
  true
25
30
  end
26
31
 
27
32
  # Default implementation: objects have to be <tt>active?</tt> and at least of one of: permitted for anyone (<tt>permitted_groups = []</tt>), <tt>readable_for_googlebots?</tt>.
28
- # Overwrite in your +ObjExtensions+ as you like.
33
+ # Overwrite in your {ObjExtensions} as you like.
34
+ # @api public
29
35
  def included_in_seo_sitemap?
30
36
  (permitted_groups.empty? || readable_for_googlebots?) && active?
31
37
  end
32
38
 
33
39
  # Returns an html-stripped <tt>Obj#body</tt>, truncated to 300 chars.
34
- # Overwrite in your +ObjExtensions+ as you like. For example, point to a CMS field.
40
+ # Overwrite in your {ObjExtensions} as you like. For example, point to a CMS field.
41
+ # @api public
35
42
  def seo_description
36
43
  HTML::FullSanitizer.new.sanitize(body.strip.gsub(%r{[\n|\r]}, " ")).mb_chars[0,300] if body
37
44
  end
38
45
 
39
- # Returns +nil+ by default. Overwrite in your +ObjExtensions+ as you like.
46
+ # Returns +nil+ by default. Overwrite in your {ObjExtensions} as you like.
40
47
  # For example, point to a CMS field of your objects.
48
+ # @api public
41
49
  def seo_keywords
42
50
  nil
43
51
  end
44
52
  end
45
53
 
46
- def self.included(receiver) # :nodoc:
54
+ def self.included(receiver)
47
55
  receiver.extend ClassMethods
48
56
  receiver.send :include, InstanceMethods
49
57
  end
@@ -1,16 +1,17 @@
1
1
  module RailsConnector
2
2
 
3
3
  # This module accesses the Infopark Search Engine Server.
4
+ # @api public
4
5
  module SES
5
6
 
6
7
  autoload :VerityAccessor, "rails_connector/ses/verity_accessor"
7
8
 
8
9
  # This method enables Obj to perform searches using the SES Search Engine Server.
9
- def self.enable #:nodoc:
10
+ def self.enable
10
11
  ::Obj.extend Obj::ClassMethods
11
12
  end
12
13
 
13
- module Obj #:nodoc:
14
+ module Obj
14
15
  # Extends the model class Obj with the class method find_with_ses.
15
16
  module ClassMethods
16
17
  # Queries the search engine and returns a SearchResult. The parameters
@@ -25,42 +26,49 @@ module RailsConnector
25
26
  end
26
27
  end
27
28
 
28
- class SearchError < StandardError # :nodoc:
29
+ class SearchError < StandardError
29
30
  end
30
31
 
31
32
  # SearchResult is the list of hits in response to a search query. Since the
32
33
  # maximum number of hits to return has been specified, there might be more
33
34
  # hits available in the search engine.
35
+ # @api public
34
36
  class SearchResult < Array
35
37
  # The total number of hits.
38
+ # @api public
36
39
  attr_reader :total_hits
37
40
 
38
- def initialize(total_hits) # :nodoc:
41
+ def initialize(total_hits)
39
42
  super()
40
43
  @total_hits = total_hits
41
44
  end
42
45
  end
43
46
 
44
47
  # A hit represents a found document for a particular search query.
48
+ # @api public
45
49
  class Hit
46
50
  # The ID of the found Obj.
51
+ # @api public
47
52
  attr_reader :id
48
53
 
49
54
  # The score of the hit.
55
+ # @api public
50
56
  attr_reader :score
51
57
 
52
58
  # The raw result hash returned by the search engine, for a low-level access.
53
59
  # Don't use this unless you know what you're doing.
54
60
  # Be aware that this is not migration safe.
61
+ # @api public
55
62
  attr_reader :doc
56
63
 
57
- def initialize(id, score, doc={}) # :nodoc:
64
+ def initialize(id, score, doc={})
58
65
  @id = id
59
66
  @score = score
60
67
  @doc = doc
61
68
  end
62
69
 
63
70
  # Returns the hit's corresponding Obj (or nil if none found in the database).
71
+ # @api public
64
72
  def obj
65
73
  @obj ||= ::Obj.find(@id)
66
74
  rescue RailsConnector::ResourceNotFound
@@ -1,7 +1,7 @@
1
1
  module RailsConnector
2
2
 
3
3
  # adds flavour to strings
4
- module StringTagging #:nodoc: all
4
+ module StringTagging
5
5
 
6
6
  # html flavour
7
7
  def self.tag_as_html(string, source)
@@ -2,8 +2,10 @@ module RailsConnector
2
2
  # This module is included if the <tt>:rss</tt> addon is
3
3
  # enabled:
4
4
  # RailsConnector::Configuration.enable(:rss)
5
+ # @api public
5
6
  module Syndicateable
6
- # Overwrite this method in your +ObjExtensions+ in order to display another field in your feed.
7
+ # Overwrite this method in your {ObjExtensions} in order to display another field in your feed.
8
+ # @api public
7
9
  def rss_description
8
10
  body
9
11
  end
@@ -1,2 +1,3 @@
1
+ # @api public
1
2
  class SearchRequest < RailsConnector::DefaultSearchRequest
2
3
  end
metadata CHANGED
@@ -1,18 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infopark_rails_connector
3
3
  version: !ruby/object:Gem::Version
4
- hash: 93109800
4
+ hash: 448206178
5
5
  prerelease: 10
6
6
  segments:
7
7
  - 6
8
8
  - 8
9
9
  - 0
10
- - 210
11
- - ed
12
- - 204
13
- - b
14
- - 0
15
- version: 6.8.0.210.ed204b0
10
+ - 322
11
+ - c
12
+ - 3
13
+ - f
14
+ - 11
15
+ version: 6.8.0.322.c003f11
16
16
  platform: ruby
17
17
  authors:
18
18
  - Infopark AG
@@ -20,7 +20,7 @@ autorequire:
20
20
  bindir: bin
21
21
  cert_chain: []
22
22
 
23
- date: 2012-11-06 00:00:00 +01:00
23
+ date: 2012-11-14 00:00:00 +01:00
24
24
  default_executable:
25
25
  dependencies:
26
26
  - !ruby/object:Gem::Dependency
@@ -206,57 +206,11 @@ executables: []
206
206
 
207
207
  extensions: []
208
208
 
209
- extra_rdoc_files:
210
- - app/helpers/crm_form_helper.rb
211
- - app/helpers/user_helper.rb
212
- - app/helpers/cms_routing_helper.rb
213
- - app/helpers/cms_helper.rb
214
- - app/helpers/ratings_helper.rb
215
- - app/helpers/rails_connector/display_helper.rb
216
- - app/helpers/rails_connector/default_cms_helper.rb
217
- - app/helpers/rails_connector/time_machine_helper.rb
218
- - app/helpers/rails_connector/link_helper.rb
219
- - app/helpers/rails_connector/cms_asset_helper.rb
220
- - app/helpers/rails_connector/layout_helper.rb
221
- - app/helpers/rails_connector/default_user_helper.rb
222
- - app/helpers/rails_connector/table_of_contents_helper.rb
223
- - app/helpers/rails_connector/menu_helper.rb
224
- - app/helpers/rails_connector/seo_helper.rb
225
- - app/helpers/rails_connector/default_crm_form_helper.rb
226
- - app/helpers/rails_connector/default_ratings_helper.rb
227
- - app/helpers/rails_connector/micronav_helper.rb
228
- - app/helpers/rails_connector/tracking_helper.rb
229
- - app/helpers/rails_connector/error_messages_helper.rb
230
- - app/helpers/rails_connector/mandatory_label_helper.rb
231
- - app/helpers/rails_connector/default_cms_routing_helper.rb
232
- - app/controllers/rss_controller.rb
233
- - app/controllers/search_controller.rb
234
- - app/controllers/pdf_controller.rb
235
- - app/controllers/ratings_controller.rb
236
- - app/controllers/user_controller.rb
237
- - app/controllers/cms_controller.rb
238
- - app/controllers/seo_sitemap_controller.rb
239
- - app/controllers/rails_connector/default_rss_controller.rb
240
- - app/controllers/rails_connector/default_search_controller.rb
241
- - app/controllers/rails_connector/time_machine_controller.rb
242
- - app/controllers/rails_connector/default_comments_controller.rb
243
- - app/controllers/rails_connector/default_pdf_controller.rb
244
- - app/controllers/rails_connector/default_cms_controller.rb
245
- - app/controllers/rails_connector/pdf_external_controller.rb
246
- - app/controllers/rails_connector/default_crm_form_controller.rb
247
- - app/controllers/rails_connector/default_ratings_controller.rb
248
- - app/controllers/rails_connector/default_user_controller.rb
249
- - app/controllers/comments_controller.rb
250
- - app/controllers/crm_form_controller.rb
251
- - app/models/crm_form.rb
252
- - app/models/obj.rb
253
- - app/models/named_link.rb
254
- - app/models/rails_connector/default_comment.rb
255
- - app/models/rails_connector/default_rating.rb
256
- - app/models/rails_connector/link_list.rb
257
- - app/mailers/confirmation_mailer.rb
258
- - README
209
+ extra_rdoc_files: []
210
+
259
211
  files:
212
+ - .yardopts
213
+ - README
260
214
  - app/assets/images/admin/minus.gif
261
215
  - app/assets/images/bg80.png
262
216
  - app/assets/images/edit.png
@@ -438,18 +392,13 @@ files:
438
392
  - lib/search_request.rb
439
393
  - lib/tasks/check.rake
440
394
  - lib/tasks/cms_license_check.rake
441
- - README
442
- has_rdoc: true
395
+ has_rdoc: yard
443
396
  homepage: http://www.infopark.de
444
397
  licenses: []
445
398
 
446
399
  post_install_message:
447
- rdoc_options:
448
- - --charset=UTF-8
449
- - --title
450
- - Infopark Rails Connector
451
- - --main
452
- - README
400
+ rdoc_options: []
401
+
453
402
  require_paths:
454
403
  - lib
455
404
  required_ruby_version: !ruby/object:Gem::Requirement