infopark_cloud_connector 6.8.3.115.227021242 → 6.8.3.174.51542603

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.
@@ -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