active_cmis 0.1.12 → 0.1.13
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/active_cmis/active_cmis.rb +2 -2
- data/lib/active_cmis/internal/connection.rb +13 -1
- data/lib/active_cmis/object.rb +2 -2
- data/lib/active_cmis/version.rb +1 -1
- metadata +71 -53
@@ -23,7 +23,7 @@ module ActiveCMIS
|
|
23
23
|
def self.connect(config)
|
24
24
|
if config.is_a? Hash
|
25
25
|
if config.has_key? "log_file"
|
26
|
-
trace_file = config["
|
26
|
+
trace_file = config["log_file"]
|
27
27
|
if trace_file == "-"
|
28
28
|
trace_file = STDOUT
|
29
29
|
end
|
@@ -32,7 +32,7 @@ module ActiveCMIS
|
|
32
32
|
logger = default_logger
|
33
33
|
end
|
34
34
|
if config.has_key? "log_level"
|
35
|
-
logger.level = Logger.const_get(config["
|
35
|
+
logger.level = (Logger.const_get(config["log_level"].upcase) rescue config["log_level"].to_i)
|
36
36
|
else
|
37
37
|
logger.level = Logger::WARN
|
38
38
|
end
|
@@ -128,8 +128,20 @@ module ActiveCMIS
|
|
128
128
|
end
|
129
129
|
end
|
130
130
|
|
131
|
+
def http_class
|
132
|
+
@http_class ||= begin
|
133
|
+
if proxy = ENV['HTTP_PROXY'] || ENV['http_proxy'] then
|
134
|
+
p_uri = URI.parse(proxy)
|
135
|
+
p_user, p_pass = p_uri.user, p_uri.password if p_uri.user
|
136
|
+
Net::HTTP::Proxy(p_uri.host, p_uri.port, p_user, p_pass)
|
137
|
+
else
|
138
|
+
Net::HTTP
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
131
143
|
def authenticate_request(uri, req)
|
132
|
-
http =
|
144
|
+
http = http_class.new(uri.host, uri.port)
|
133
145
|
if uri.scheme == 'https'
|
134
146
|
http.use_ssl = true
|
135
147
|
end
|
data/lib/active_cmis/object.rb
CHANGED
@@ -352,9 +352,9 @@ module ActiveCMIS
|
|
352
352
|
end
|
353
353
|
xml["at"].title attributes["cmis:name"]
|
354
354
|
if attributes["cmis:objectId"]
|
355
|
-
xml["at"].
|
355
|
+
xml["at"].id_ attributes["cmis:objectId"]
|
356
356
|
else
|
357
|
-
xml["at"].
|
357
|
+
xml["at"].id_ "random-garbage"
|
358
358
|
end
|
359
359
|
xml["cra"].object do
|
360
360
|
xml["c"].properties do
|
data/lib/active_cmis/version.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,39 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_cmis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 1
|
4
5
|
prerelease:
|
5
|
-
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
- 13
|
10
|
+
version: 0.1.13
|
6
11
|
platform: ruby
|
7
12
|
authors:
|
8
|
-
|
13
|
+
- Joeri Samson
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
17
|
|
13
|
-
date: 2011-04-
|
18
|
+
date: 2011-04-09 00:00:00 +02:00
|
14
19
|
default_executable:
|
15
20
|
dependencies:
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: nokogiri
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 5
|
30
|
+
segments:
|
31
|
+
- 1
|
32
|
+
- 4
|
33
|
+
- 1
|
34
|
+
version: 1.4.1
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id001
|
27
37
|
description: A CMIS library implementing both reading and updating capabilities through the AtomPub/REST binding to CMIS.
|
28
38
|
email: joeri@xaop.com
|
29
39
|
executables: []
|
@@ -31,38 +41,38 @@ executables: []
|
|
31
41
|
extensions: []
|
32
42
|
|
33
43
|
extra_rdoc_files:
|
34
|
-
|
35
|
-
|
36
|
-
|
44
|
+
- LICENSE
|
45
|
+
- README.md
|
46
|
+
- TODO
|
37
47
|
files:
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
48
|
+
- LICENSE
|
49
|
+
- README.md
|
50
|
+
- Rakefile
|
51
|
+
- TODO
|
52
|
+
- lib/active_cmis.rb
|
53
|
+
- lib/active_cmis/acl.rb
|
54
|
+
- lib/active_cmis/acl_entry.rb
|
55
|
+
- lib/active_cmis/active_cmis.rb
|
56
|
+
- lib/active_cmis/atomic_types.rb
|
57
|
+
- lib/active_cmis/attribute_prefix.rb
|
58
|
+
- lib/active_cmis/collection.rb
|
59
|
+
- lib/active_cmis/document.rb
|
60
|
+
- lib/active_cmis/exceptions.rb
|
61
|
+
- lib/active_cmis/folder.rb
|
62
|
+
- lib/active_cmis/internal/caching.rb
|
63
|
+
- lib/active_cmis/internal/connection.rb
|
64
|
+
- lib/active_cmis/internal/utils.rb
|
65
|
+
- lib/active_cmis/ns.rb
|
66
|
+
- lib/active_cmis/object.rb
|
67
|
+
- lib/active_cmis/policy.rb
|
68
|
+
- lib/active_cmis/property_definition.rb
|
69
|
+
- lib/active_cmis/rel.rb
|
70
|
+
- lib/active_cmis/relationship.rb
|
71
|
+
- lib/active_cmis/rendition.rb
|
72
|
+
- lib/active_cmis/repository.rb
|
73
|
+
- lib/active_cmis/server.rb
|
74
|
+
- lib/active_cmis/type.rb
|
75
|
+
- lib/active_cmis/version.rb
|
66
76
|
has_rdoc: true
|
67
77
|
homepage: http://xaop.com/labs/activecmis/
|
68
78
|
licenses: []
|
@@ -71,23 +81,31 @@ post_install_message:
|
|
71
81
|
rdoc_options: []
|
72
82
|
|
73
83
|
require_paths:
|
74
|
-
|
84
|
+
- lib
|
75
85
|
required_ruby_version: !ruby/object:Gem::Requirement
|
76
86
|
none: false
|
77
87
|
requirements:
|
78
|
-
|
79
|
-
|
80
|
-
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
hash: 59
|
91
|
+
segments:
|
92
|
+
- 1
|
93
|
+
- 8
|
94
|
+
- 6
|
95
|
+
version: 1.8.6
|
81
96
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
82
97
|
none: false
|
83
98
|
requirements:
|
84
|
-
|
85
|
-
|
86
|
-
|
99
|
+
- - ">="
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
hash: 3
|
102
|
+
segments:
|
103
|
+
- 0
|
104
|
+
version: "0"
|
87
105
|
requirements: []
|
88
106
|
|
89
107
|
rubyforge_project:
|
90
|
-
rubygems_version: 1.
|
108
|
+
rubygems_version: 1.6.2
|
91
109
|
signing_key:
|
92
110
|
specification_version: 3
|
93
111
|
summary: A library to interact with CMIS repositories through the AtomPub/REST binding
|