infopark_cloud_connector 6.8.3.115.227021242 → 6.8.3.174.51542603
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rails_connector/basic_obj.rb +1 -2
- data/lib/rails_connector/blob.rb +19 -52
- data/lib/rails_connector/cache_middleware.rb +0 -1
- data/lib/rails_connector/cms_backend.rb +179 -17
- data/lib/rails_connector/model_identity.rb +13 -0
- data/lib/rails_connector/workspace.rb +2 -11
- metadata +4 -49
- data/lib/rails_connector/chain.rb +0 -175
- data/lib/rails_connector/cms_base_model.rb +0 -55
- data/lib/rails_connector/content_cache.rb +0 -23
- data/lib/rails_connector/dict_storage.rb +0 -66
- data/lib/rails_connector/dynamo_cms_backend.rb +0 -136
- data/lib/rails_connector/obj_data_from_database.rb +0 -109
- data/lib/rails_connector/path_conversion.rb +0 -21
- data/lib/rails_connector/permission.rb +0 -39
- data/lib/rails_connector/revision.rb +0 -75
- data/lib/rails_connector/s3_blob.rb +0 -89
- data/lib/rails_connector/service_blob.rb +0 -48
- data/lib/rails_connector/service_cms_backend.rb +0 -194
- data/lib/rails_connector/version.rb +0 -38
- data/lib/rails_connector/workspace_data_from_database.rb +0 -19
@@ -1,38 +0,0 @@
|
|
1
|
-
module RailsConnector
|
2
|
-
|
3
|
-
class Version
|
4
|
-
def initialize(doc)
|
5
|
-
@doc = doc
|
6
|
-
end
|
7
|
-
|
8
|
-
def obj_id
|
9
|
-
@doc["obj_id"]
|
10
|
-
end
|
11
|
-
|
12
|
-
def revision_id
|
13
|
-
@doc["revision_id"]
|
14
|
-
end
|
15
|
-
|
16
|
-
def diff
|
17
|
-
if @doc["content_cache_id"]
|
18
|
-
case @doc["action"]
|
19
|
-
when "D"
|
20
|
-
0
|
21
|
-
else # "N", "E"
|
22
|
-
1
|
23
|
-
end
|
24
|
-
else
|
25
|
-
@doc["diff"]
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
def obj_data(patch_diff)
|
30
|
-
data = patch_diff < 0 ? @doc["before"] : @doc["current"]
|
31
|
-
data["obj_id"] = @doc["obj_id"]
|
32
|
-
data["obj_type"] = @doc["obj_type"]
|
33
|
-
|
34
|
-
data
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
end # module RailsConnector
|
@@ -1,19 +0,0 @@
|
|
1
|
-
module RailsConnector
|
2
|
-
|
3
|
-
class WorkspaceDataFromDatabase < CmsBaseModel
|
4
|
-
|
5
|
-
self.key_prefix = "ws"
|
6
|
-
|
7
|
-
property :revision_id
|
8
|
-
|
9
|
-
def revision
|
10
|
-
@revision ||= Revision.find(revision_id)
|
11
|
-
end
|
12
|
-
|
13
|
-
def content_cache_id=(id)
|
14
|
-
revision.content_cache_id = id
|
15
|
-
end
|
16
|
-
|
17
|
-
end
|
18
|
-
|
19
|
-
end # module RailsConnector
|