infopark_fiona_connector 7.0.1.5.2.3.rc4 → 7.0.1.5.2.3.rc5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/cms_controller.rb +1 -1
  3. data/app/controllers/rails_connector/default_cms_controller.rb +0 -2
  4. data/app/helpers/cms_helper.rb +1 -1
  5. data/app/helpers/cms_routing_helper.rb +1 -1
  6. data/app/helpers/rails_connector/cms_asset_helper.rb +4 -5
  7. data/app/helpers/rails_connector/cms_tag_helper.rb +0 -3
  8. data/app/helpers/rails_connector/default_cms_helper.rb +0 -2
  9. data/app/helpers/rails_connector/default_cms_routing_helper.rb +15 -16
  10. data/app/helpers/rails_connector/display_helper.rb +31 -33
  11. data/app/helpers/rails_connector/editing_helper.rb +2 -8
  12. data/app/helpers/rails_connector/layout_helper.rb +2 -5
  13. data/app/helpers/rails_connector/marker_helper.rb +63 -64
  14. data/app/helpers/rails_connector/table_of_contents_helper.rb +1 -3
  15. data/config/cms_routes.rb +15 -15
  16. data/lib/gem_dependencies.rb +8 -7
  17. data/lib/generators/rails_connector/install/install_generator.rb +6 -6
  18. data/lib/generators/rails_connector/install/templates/initializers/rails_connector.rb +1 -1
  19. data/lib/infopark_fiona_connector.rb +9 -9
  20. data/lib/rails_connector/attr_dict.rb +26 -18
  21. data/lib/rails_connector/attribute.rb +18 -21
  22. data/lib/rails_connector/authenticable.rb +12 -5
  23. data/lib/rails_connector/basic_obj.rb +64 -57
  24. data/lib/rails_connector/blob.rb +2 -5
  25. data/lib/rails_connector/blob_mapping.rb +2 -3
  26. data/lib/rails_connector/blob_mysql.rb +3 -5
  27. data/lib/rails_connector/blob_oracle.rb +5 -7
  28. data/lib/rails_connector/channel.rb +5 -6
  29. data/lib/rails_connector/cms_accessible.rb +16 -17
  30. data/lib/rails_connector/cms_base_model.rb +2 -4
  31. data/lib/rails_connector/cms_dispatch_controller.rb +3 -6
  32. data/lib/rails_connector/cms_env.rb +4 -7
  33. data/lib/rails_connector/cms_test_request.rb +1 -1
  34. data/lib/rails_connector/configuration.rb +12 -16
  35. data/lib/rails_connector/content.rb +0 -4
  36. data/lib/rails_connector/core_extensions/time.rb +3 -4
  37. data/lib/rails_connector/date_attribute.rb +1 -3
  38. data/lib/rails_connector/default_search_request.rb +1 -1
  39. data/lib/rails_connector/engine.rb +18 -21
  40. data/lib/rails_connector/errors.rb +2 -5
  41. data/lib/rails_connector/fiona_datetime.rb +2 -2
  42. data/lib/rails_connector/fiona_engine.rb +3 -4
  43. data/lib/rails_connector/html_string.rb +0 -2
  44. data/lib/rails_connector/job.rb +0 -3
  45. data/lib/rails_connector/link.rb +7 -4
  46. data/lib/rails_connector/link_list.rb +1 -5
  47. data/lib/rails_connector/link_resolvable.rb +1 -5
  48. data/lib/rails_connector/lucene_search_request.rb +20 -24
  49. data/lib/rails_connector/markdown_string.rb +0 -2
  50. data/lib/rails_connector/meta.rb +25 -30
  51. data/lib/rails_connector/meta/eager_loader.rb +14 -12
  52. data/lib/rails_connector/named_link.rb +12 -16
  53. data/lib/rails_connector/news.rb +3 -3
  54. data/lib/rails_connector/obj_class.rb +23 -25
  55. data/lib/rails_connector/obj_class_attr.rb +1 -1
  56. data/lib/rails_connector/object_with_meta_data.rb +0 -5
  57. data/lib/rails_connector/permission.rb +2 -6
  58. data/lib/rails_connector/ses.rb +3 -8
  59. data/lib/rails_connector/ses/verity_accessor.rb +43 -46
  60. data/lib/rails_connector/string_tagging.rb +0 -3
  61. data/lib/rails_connector/verity_search_request.rb +6 -9
  62. data/lib/search_request.rb +1 -1
  63. data/lib/version.rb +1 -1
  64. metadata +2 -2
@@ -1,8 +1,6 @@
1
1
  module RailsConnector
2
-
3
2
  # adds flavour to strings
4
3
  module StringTagging
5
-
6
4
  # html flavour
7
5
  def self.tag_as_html(string, source)
8
6
  unless string.blank?
@@ -25,5 +23,4 @@ module RailsConnector
25
23
  string
26
24
  end
27
25
  end
28
-
29
26
  end
@@ -1,6 +1,4 @@
1
- # encoding: utf-8
2
1
  module RailsConnector
3
-
4
2
  # This class provides an implementation for accessing the Verity based search server.
5
3
  # It should be customized by subclassing.
6
4
  # @api public
@@ -24,7 +22,7 @@ module RailsConnector
24
22
  # <tt>:collections</tt>:: The collections to be searched, default: <tt>['cm-contents']</tt>
25
23
  # <tt>:base_query</tt>:: The VQL base query, default: <tt>nil</tt>
26
24
  # @api public
27
- def initialize(query_string, options=nil)
25
+ def initialize(query_string, options = nil)
28
26
  @query_string = self.class.sanitize(query_string)
29
27
  @options = Configuration.search_options.merge(options || {})
30
28
  end
@@ -34,15 +32,15 @@ module RailsConnector
34
32
  # Uses the #base_query and +options+ given in #new.
35
33
  # @api public
36
34
  def fetch_hits
37
- SES::VerityAccessor.new(vql_query_for(@query_string), {:base_query => base_query}.merge(@options)).search
35
+ SES::VerityAccessor.new(vql_query_for(@query_string), { base_query: base_query }.merge(@options)).search
38
36
  end
39
37
 
40
38
  # Removes unwanted characters from +text+.
41
39
  def self.sanitize(text)
42
- text.strip.gsub(/[<>"'´`,()\[\]{}=!@\\]/, '')
40
+ text.strip.gsub(/[<>"'´`,()\[\]{}=!@\\]/, "")
43
41
  end
44
42
 
45
- def vql_query_for(query_string = '')
43
+ def vql_query_for(query_string = "")
46
44
  words = query_string.split(/\s+/).map do |word|
47
45
  word unless %w(and or not).include?(word.downcase)
48
46
  end.compact.join(", ")
@@ -54,7 +52,7 @@ module RailsConnector
54
52
  # A base query is used to reduce the number of documents before executing the actual query.
55
53
  # By default, all base query conditions must be met, they are combined using the +AND+ operator.
56
54
  def base_query
57
- "<#AND> (#{base_query_conditions.values.compact.join(', ')})"
55
+ "<#AND> (#{base_query_conditions.values.compact.join(", ")})"
58
56
  end
59
57
 
60
58
  # A hash of conditions, combined to a base query by #base_query.
@@ -78,12 +76,11 @@ module RailsConnector
78
76
  conditions[:content] = '("released" <#IN> state)'
79
77
  conditions[:suppressExport] = '("0" <#IN> suppressExport)'
80
78
  conditions[:validFrom] = "(validFrom < #{Time.now.to_iso})"
81
- conditions[:validUntil] = %!<#OR> (
79
+ conditions[:validUntil] = %!<#OR> (
82
80
  (validUntil = ""),
83
81
  (validUntil > #{Time.now.to_iso})
84
82
  )!
85
83
  conditions
86
84
  end
87
85
  end
88
-
89
86
  end
@@ -1,2 +1,2 @@
1
1
  class SearchRequest < RailsConnector::DefaultSearchRequest
2
- end
2
+ end
@@ -1,7 +1,7 @@
1
1
  module RailsConnector
2
2
  module Version
3
3
  def self.get
4
- '7.0.1.5.2.3.rc4'
4
+ "7.0.1.5.2.3.rc5"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infopark_fiona_connector
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.1.5.2.3.rc4
4
+ version: 7.0.1.5.2.3.rc5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Infopark AG
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-13 00:00:00.000000000 Z
11
+ date: 2020-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails