infopark_cloud_connector 6.8.0.beta.200.809.bdfa8c3 → 6.8.0.beta.200.856.8c0fec5
Sign up to get free protection for your applications and to get access to all the features.
@@ -21,6 +21,8 @@ module RailsConnector
|
|
21
21
|
Kvom::Adapter::CouchdbAdapter.new(connection_spec)
|
22
22
|
when "dynamo"
|
23
23
|
Kvom::Adapter::DynamodbAdapter.new(connection_spec)
|
24
|
+
when "file"
|
25
|
+
Kvom::Adapter::FilesystemAdapter.new(connection_spec)
|
24
26
|
else
|
25
27
|
raise "Unexpected database type #{connection_spec["type"]}"
|
26
28
|
end
|
@@ -13,12 +13,16 @@ module RailsConnector
|
|
13
13
|
property :editable
|
14
14
|
|
15
15
|
# Selects the revision with the given id as current revision
|
16
|
-
def self.current=(
|
17
|
-
@current =
|
16
|
+
def self.current=(revision_or_proc)
|
17
|
+
@current = revision_or_proc
|
18
18
|
end
|
19
19
|
|
20
20
|
def self.current
|
21
|
-
@current
|
21
|
+
if @current.respond_to? :call
|
22
|
+
@current = @current.call
|
23
|
+
else
|
24
|
+
@current || default
|
25
|
+
end
|
22
26
|
end
|
23
27
|
|
24
28
|
def self.find_by_label(label_name)
|
@@ -11,8 +11,10 @@ class WorkspaceSelectionMiddleware
|
|
11
11
|
|
12
12
|
def call(env)
|
13
13
|
handle_workspace_parameter(env)
|
14
|
-
|
15
|
-
|
14
|
+
preview_workspace = session(env)[CURRENT_WORKSPACE_SESSION_KEY]
|
15
|
+
Revision.current = proc do
|
16
|
+
preview_workspace ? Revision.find(preview_workspace) : Revision.default
|
17
|
+
end
|
16
18
|
@app.call(env)
|
17
19
|
end
|
18
20
|
|
@@ -28,14 +30,6 @@ class WorkspaceSelectionMiddleware
|
|
28
30
|
end
|
29
31
|
end
|
30
32
|
|
31
|
-
def workspace_to_show(env)
|
32
|
-
if preview_workspace = session(env)[CURRENT_WORKSPACE_SESSION_KEY]
|
33
|
-
Revision.find(preview_workspace)
|
34
|
-
else
|
35
|
-
Revision.default
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
33
|
def session(env)
|
40
34
|
env[Rack::Session::Abstract::ENV_SESSION_KEY]
|
41
35
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: infopark_cloud_connector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 990885735
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 6
|
@@ -9,12 +9,13 @@ version: !ruby/object:Gem::Version
|
|
9
9
|
- 0
|
10
10
|
- beta
|
11
11
|
- 200
|
12
|
-
-
|
13
|
-
- bdfa
|
12
|
+
- 856
|
14
13
|
- 8
|
15
14
|
- c
|
16
|
-
-
|
17
|
-
|
15
|
+
- 0
|
16
|
+
- fec
|
17
|
+
- 5
|
18
|
+
version: 6.8.0.beta.200.856.8c0fec5
|
18
19
|
platform: ruby
|
19
20
|
authors:
|
20
21
|
- Infopark AG
|
@@ -22,11 +23,10 @@ autorequire:
|
|
22
23
|
bindir: bin
|
23
24
|
cert_chain: []
|
24
25
|
|
25
|
-
date: 2012-07-
|
26
|
+
date: 2012-07-23 00:00:00 +02:00
|
26
27
|
default_executable:
|
27
28
|
dependencies:
|
28
29
|
- !ruby/object:Gem::Dependency
|
29
|
-
type: :runtime
|
30
30
|
requirement: &id001 !ruby/object:Gem::Requirement
|
31
31
|
none: false
|
32
32
|
requirements:
|
@@ -38,11 +38,11 @@ dependencies:
|
|
38
38
|
- 1
|
39
39
|
- 2
|
40
40
|
version: 1.1.2
|
41
|
-
prerelease: false
|
42
|
-
name: couchrest
|
43
41
|
version_requirements: *id001
|
44
|
-
|
42
|
+
name: couchrest
|
43
|
+
prerelease: false
|
45
44
|
type: :runtime
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
46
|
requirement: &id002 !ruby/object:Gem::Requirement
|
47
47
|
none: false
|
48
48
|
requirements:
|
@@ -54,32 +54,34 @@ dependencies:
|
|
54
54
|
- 3
|
55
55
|
- 6
|
56
56
|
version: 1.3.6
|
57
|
-
prerelease: false
|
58
|
-
name: aws-sdk
|
59
57
|
version_requirements: *id002
|
60
|
-
|
58
|
+
name: aws-sdk
|
59
|
+
prerelease: false
|
61
60
|
type: :runtime
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
62
|
requirement: &id003 !ruby/object:Gem::Requirement
|
63
63
|
none: false
|
64
64
|
requirements:
|
65
65
|
- - "="
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
hash:
|
67
|
+
hash: 990885735
|
68
68
|
segments:
|
69
69
|
- 6
|
70
70
|
- 8
|
71
71
|
- 0
|
72
72
|
- beta
|
73
73
|
- 200
|
74
|
-
-
|
75
|
-
- bdfa
|
74
|
+
- 856
|
76
75
|
- 8
|
77
76
|
- c
|
78
|
-
-
|
79
|
-
|
80
|
-
|
81
|
-
|
77
|
+
- 0
|
78
|
+
- fec
|
79
|
+
- 5
|
80
|
+
version: 6.8.0.beta.200.856.8c0fec5
|
82
81
|
version_requirements: *id003
|
82
|
+
name: kvom
|
83
|
+
prerelease: false
|
84
|
+
type: :runtime
|
83
85
|
description: The Cloud Connector for Infopark CMS Fiona enables you to develop modern, dynamic Web 2.0 applications using Ruby on Rails and at the same time display CMS managed content.
|
84
86
|
email: info@infopark.de
|
85
87
|
executables: []
|