infopark_fiona_connector 6.8.1.26.236500544 → 6.8.2.7.128454143

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,7 +8,7 @@ module RailsConnector
8
8
  # [children] an Array of objects, Obj, of which this one is the parent
9
9
  # [parent] the Obj of which this one is a child - nil for the root object
10
10
  # @api public
11
- class Obj < CmsBaseModel
11
+ class BasicObj < CmsBaseModel
12
12
  CRYPT_KEY = "\xd7\x28\x9c\x63\xd6\x29\xdf\x20\xcd\x32\xcf\x30\xcf\x30\xcf\x30\xdf\x20\xb6\x49"\
13
13
  "\x91\x6e\x99\x66\x90\x6f\x8f\x70\x9e\x61\x8d\x72\x94\x6b\xdf\x20\xbe\x41\xb8\x47\xc4\x3b"\
14
14
  "\xdf\x20\xbd\x42\x9a\x65\x8d\x72\x93\x6c\x96\x69\x91\x6e".freeze
@@ -23,7 +23,7 @@ module RailsConnector
23
23
  when :released then configure_column_information("objs", true)
24
24
  when :edited
25
25
  configure_column_information("preview_objs", false)
26
- has_many(:permissions, :class_name => "::RailsConnector::Permission", :foreign_key => "object_id")
26
+ has_many(:arel_permissions, :class_name => "::RailsConnector::Permission", :foreign_key => "object_id")
27
27
  else
28
28
  raise "configure_for_content called with unknown parameter #{which}"
29
29
  end
@@ -44,7 +44,7 @@ module RailsConnector
44
44
 
45
45
  # Patch to avoid a type_condition being added by ActiveRecord::Base.add_conditions! for Obj.find(params):
46
46
  def self.descends_from_active_record?
47
- superclass == CmsBaseModel
47
+ self == BasicObj || superclass == BasicObj
48
48
  end
49
49
 
50
50
  # A CMS administrator can specify the <tt>obj_class</tt> for a given CMS object.
@@ -59,8 +59,7 @@ module RailsConnector
59
59
  # for a model in the RailsConnector namespace (RailsConnector::Permission etc.)
60
60
 
61
61
  def self.compute_type(type_name)
62
- try_type { type_name.constantize } ||
63
- self
62
+ try_type { type_name.constantize } || ::Obj
64
63
  end
65
64
 
66
65
  def self.reset_type_cache
@@ -69,7 +68,7 @@ module RailsConnector
69
68
 
70
69
  # @api public
71
70
  def permissions
72
- @@use_cached_permissions ? attr_dict.permissions : super
71
+ @@use_cached_permissions ? attr_dict.permissions : arel_permissions
73
72
  end
74
73
 
75
74
  # @api public
@@ -91,7 +90,7 @@ module RailsConnector
91
90
  Obj.find(2001)
92
91
  end
93
92
 
94
- # Returns the homepage object. This can be overwritten in your application's +ObjExtensions+.
93
+ # Returns the homepage object. This can be overwritten in your application's +Obj+.
95
94
  # Use <tt>Obj#homepage?</tt> to check if an object is the homepage.
96
95
  # @api public
97
96
  def self.homepage
@@ -142,7 +141,7 @@ module RailsConnector
142
141
  #
143
142
  # The default is +obj.name+.
144
143
  #
145
- # You can customize this part by overwriting +obj.slug+ in {ObjExtentions}.
144
+ # You can customize this part by overwriting +obj.slug+ in {Obj}.
146
145
  # @return [String]
147
146
  # @api public
148
147
  def slug
@@ -202,7 +201,7 @@ module RailsConnector
202
201
  # @api public
203
202
  def active?(time_when = nil)
204
203
  return false if !valid_from
205
- time_then = time_when || Obj.preview_time
204
+ time_then = time_when || BasicObj.preview_time
206
205
  valid_from <= time_then && (!valid_until || time_then <= valid_until)
207
206
  end
208
207
 
@@ -3,7 +3,7 @@ module RailsConnector
3
3
  # This class provides methods used to retrieve objects from CMS based an entry
4
4
  # in CMS of the obj_class <tt>NamedLink</tt>.
5
5
  # @api public
6
- class NamedLink < Obj
6
+ class NamedLink
7
7
 
8
8
  # @api public
9
9
  class NotFound < StandardError
@@ -18,7 +18,7 @@ module RailsConnector
18
18
  def self.generate_named_links_cache
19
19
  return if @@named_links_cache
20
20
 
21
- found_objects = self.all
21
+ found_objects = BasicObj.find_all_by_obj_class('NamedLink')
22
22
  Rails.logger.warn "Couldn't find NamedLink CMS Object!" if found_objects.empty?
23
23
  Rails.logger.warn "More than one NamedLink CMS Object found!" if found_objects.size > 1
24
24
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infopark_fiona_connector
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.8.1.26.236500544
4
+ version: 6.8.2.7.128454143
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-01-25 00:00:00.000000000 Z
12
+ date: 2013-01-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mime-types
@@ -76,6 +76,7 @@ files:
76
76
  - lib/rails_connector/attr_value_provider.bundle
77
77
  - lib/rails_connector/attr_value_provider.so
78
78
  - lib/rails_connector/attr_value_provider64.so
79
+ - lib/rails_connector/basic_obj.rb
79
80
  - lib/rails_connector/blob.rb
80
81
  - lib/rails_connector/blob_mysql.rb
81
82
  - lib/rails_connector/blob_oracle.rb
@@ -90,7 +91,6 @@ files:
90
91
  - lib/rails_connector/lucene_search_request.rb
91
92
  - lib/rails_connector/named_link.rb
92
93
  - lib/rails_connector/news.rb
93
- - lib/rails_connector/obj.rb
94
94
  - lib/rails_connector/permission.rb
95
95
  - lib/rails_connector/rack_middlewares.rb
96
96
  - lib/rails_connector/ses/verity_accessor.rb
@@ -110,7 +110,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
110
110
  version: '0'
111
111
  segments:
112
112
  - 0
113
- hash: 865577871
113
+ hash: 1027616381
114
114
  required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  none: false
116
116
  requirements: