cmis-ruby 0.3.6 → 0.3.7
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.
- checksums.yaml +4 -4
- data/cmis-ruby.gemspec +19 -18
- data/lib/cmis-ruby.rb +2 -2
- data/lib/cmis/children.rb +9 -9
- data/lib/cmis/connection.rb +6 -6
- data/lib/cmis/document.rb +18 -18
- data/lib/cmis/folder.rb +23 -23
- data/lib/cmis/object.rb +37 -37
- data/lib/cmis/policy.rb +8 -8
- data/lib/cmis/query.rb +1 -1
- data/lib/cmis/relationships.rb +9 -9
- data/lib/cmis/repository.rb +24 -24
- data/lib/cmis/server.rb +7 -8
- data/lib/cmis/type.rb +8 -8
- data/lib/cmis/version.rb +1 -1
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97132317b4609f109b961b1069bd5423e6bb1b89
|
4
|
+
data.tar.gz: a43ebf5d4525804e207d040c0c58feda45e48fd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ea0dff54def6be22aa39c6ac2738993b6b6dfbb21bc34e0c001bdf2ba6012ac125a5c0cc6382633cefdcc064d53c0a95fd3c8710dcc59b98b971a622b2792b0
|
7
|
+
data.tar.gz: 29ee254a5eda2bca3b4220d64b219ed97b0815a42ed4330aa185ebc77c87cdfa94b32e98e9df20696279193f541a0434df520fee8be0d311ee93f086642e4530
|
data/cmis-ruby.gemspec
CHANGED
@@ -1,25 +1,26 @@
|
|
1
|
-
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
1
|
+
$LOAD_PATH.unshift 'lib'
|
4
2
|
require 'cmis/version'
|
5
3
|
|
6
4
|
Gem::Specification.new do |s|
|
7
|
-
s.name
|
8
|
-
s.version
|
9
|
-
s.
|
10
|
-
s.
|
11
|
-
s.
|
12
|
-
s.
|
5
|
+
s.name = 'cmis-ruby'
|
6
|
+
s.version = CMIS::VERSION
|
7
|
+
s.date = Time.now.strftime('%Y-%m-%d')
|
8
|
+
s.authors = ['Kenneth Geerts', 'Michael Brackx']
|
9
|
+
s.email = ['kenneth@up-nxt.com']
|
10
|
+
s.homepage = 'https://github.com/UP-nxt'
|
11
|
+
s.summary = 'Ruby client for CMIS'
|
12
|
+
s.license = 'Apache-2.0'
|
13
|
+
s.has_rdoc = false
|
13
14
|
|
14
|
-
s.files
|
15
|
-
s.executables
|
16
|
-
s.test_files
|
17
|
-
s.require_paths
|
15
|
+
s.files = `git ls-files`.split($/)
|
16
|
+
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
|
+
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
18
|
+
s.require_paths = [ 'lib' ]
|
18
19
|
|
19
|
-
s.add_dependency
|
20
|
-
s.add_dependency
|
20
|
+
s.add_dependency 'faraday', '~> 0.9'
|
21
|
+
s.add_dependency 'activesupport', '>= 3.2', '< 5.0'
|
21
22
|
|
22
|
-
s.description = <<-
|
23
|
-
|
24
|
-
|
23
|
+
s.description = <<-DESCRIPTION
|
24
|
+
CMIS browser binding client library in ruby.
|
25
|
+
DESCRIPTION
|
25
26
|
end
|
data/lib/cmis-ruby.rb
CHANGED
data/lib/cmis/children.rb
CHANGED
@@ -80,15 +80,15 @@ module CMIS
|
|
80
80
|
end
|
81
81
|
|
82
82
|
def do_get_children
|
83
|
-
|
84
|
-
result =
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
83
|
+
server = @folder.repository.server
|
84
|
+
result = server.execute!({ cmisselector: 'children',
|
85
|
+
repositoryId: @folder.repository.id,
|
86
|
+
objectId: @folder.cmis_object_id,
|
87
|
+
maxItems: @max_items,
|
88
|
+
skipCount: @skip_count,
|
89
|
+
orderBy: @order_by,
|
90
|
+
includeRelationships: @include_relationships,
|
91
|
+
filter: @filter}, @opts)
|
92
92
|
|
93
93
|
results = result['objects'].map { |o| build_object_with_relationships(o) }
|
94
94
|
QueryResult.new(results, result['numItems'], result['hasMoreItems'])
|
data/lib/cmis/connection.rb
CHANGED
@@ -3,9 +3,8 @@ module CMIS
|
|
3
3
|
def initialize(options)
|
4
4
|
options.symbolize_keys!
|
5
5
|
|
6
|
-
service_url = options[:service_url] || ENV['CMIS_BROWSER_URL']
|
7
|
-
|
8
|
-
option `:service_url` or ENV['CMIS_BROWSER_URL'] must be set"
|
6
|
+
@service_url = options[:service_url] || ENV['CMIS_BROWSER_URL'] or raise \
|
7
|
+
"option `:service_url` or ENV['CMIS_BROWSER_URL'] must be set"
|
9
8
|
|
10
9
|
adapter = (options[:adapter] || :net_http).to_sym
|
11
10
|
|
@@ -69,8 +68,8 @@ module CMIS
|
|
69
68
|
|
70
69
|
repository_info = repository_infos[repository_id]
|
71
70
|
@url_cache[repository_id] = {
|
72
|
-
repository_url: repository_info[
|
73
|
-
root_folder_url: repository_info[
|
71
|
+
repository_url: repository_info[:repositoryUrl],
|
72
|
+
root_folder_url: repository_info[:rootFolderUrl]
|
74
73
|
}
|
75
74
|
end
|
76
75
|
@url_cache[repository_id]
|
@@ -137,7 +136,8 @@ module CMIS
|
|
137
136
|
env[:body] = JSON.parse(env[:body]).with_indifferent_access
|
138
137
|
if env[:body].is_a?(Hash) && ex = env[:body][:exception]
|
139
138
|
ruby_exception = "CMIS::Exceptions::#{ex.camelize}".constantize
|
140
|
-
|
139
|
+
message = "#{ex.underscore.humanize}: #{env[:body][:message]}"
|
140
|
+
raise ruby_exception, message
|
141
141
|
end
|
142
142
|
end
|
143
143
|
end
|
data/lib/cmis/document.rb
CHANGED
@@ -13,29 +13,29 @@ module CMIS
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def create_in_folder(folder, opts = {})
|
16
|
-
r =
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
16
|
+
r = server.execute!({ cmisaction: 'createDocument',
|
17
|
+
repositoryId: repository.id,
|
18
|
+
properties: properties,
|
19
|
+
objectId: folder.cmis_object_id,
|
20
|
+
folderId: folder.cmis_object_id,
|
21
|
+
content: @local_content }, opts)
|
22
22
|
|
23
23
|
ObjectFactory.create(r, repository)
|
24
24
|
end
|
25
25
|
|
26
26
|
def copy_in_folder(folder, opts = {})
|
27
|
-
id =
|
28
|
-
|
29
|
-
|
30
|
-
|
27
|
+
id = server.execute!({ cmisaction: 'createDocument',
|
28
|
+
repositoryId: repository.id,
|
29
|
+
sourceId: cmis_object_id,
|
30
|
+
objectId: folder.cmis_object_id }, opts)
|
31
31
|
|
32
32
|
repository.object(id)
|
33
33
|
end
|
34
34
|
|
35
35
|
def content(opts = {})
|
36
|
-
|
37
|
-
|
38
|
-
|
36
|
+
server.execute!({ cmisselector: 'content',
|
37
|
+
repositoryId: repository.id,
|
38
|
+
objectId: cmis_object_id }, opts)
|
39
39
|
|
40
40
|
rescue Exceptions::Constraint
|
41
41
|
# Check for specific constraint?
|
@@ -55,11 +55,11 @@ module CMIS
|
|
55
55
|
if detached?
|
56
56
|
@local_content = content
|
57
57
|
else
|
58
|
-
update_change_token
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
58
|
+
update_change_token server.execute!({ cmisaction: 'setContent',
|
59
|
+
repositoryId: repository.id,
|
60
|
+
objectId: cmis_object_id,
|
61
|
+
content: content,
|
62
|
+
changeToken: change_token }, opts)
|
63
63
|
end
|
64
64
|
end
|
65
65
|
end
|
data/lib/cmis/folder.rb
CHANGED
@@ -28,21 +28,21 @@ module CMIS
|
|
28
28
|
return object.create_in_folder(self, opts)
|
29
29
|
|
30
30
|
when Folder
|
31
|
-
o =
|
32
|
-
|
33
|
-
|
34
|
-
|
31
|
+
o = server.execute!({ cmisaction: 'createFolder',
|
32
|
+
repositoryId: repository.id,
|
33
|
+
properties: object.properties,
|
34
|
+
objectId: cmis_object_id }, opts)
|
35
35
|
|
36
36
|
when Policy
|
37
|
-
o =
|
38
|
-
|
39
|
-
|
40
|
-
|
37
|
+
o = server.execute!({ cmisaction: 'createPolicy',
|
38
|
+
repositoryId: repository.id,
|
39
|
+
properties: object.properties,
|
40
|
+
objectId: cmis_object_id }, opts)
|
41
41
|
when Item
|
42
|
-
o =
|
43
|
-
|
44
|
-
|
45
|
-
|
42
|
+
o = server.execute!({ cmisaction: 'createItem',
|
43
|
+
repositoryId: repository.id,
|
44
|
+
properties: object.properties,
|
45
|
+
objectId: cmis_object_id }, opts)
|
46
46
|
|
47
47
|
else
|
48
48
|
raise "Unexpected base_type_id: #{object.base_type_id}"
|
@@ -52,23 +52,23 @@ module CMIS
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def delete_tree(opts = {})
|
55
|
-
|
56
|
-
|
57
|
-
|
55
|
+
server.execute!({ cmisaction: 'deleteTree',
|
56
|
+
repositoryId: repository.id,
|
57
|
+
objectId: cmis_object_id }, opts)
|
58
58
|
end
|
59
59
|
|
60
60
|
def add(object, opts = {})
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
61
|
+
server.execute!({ cmisaction: 'addObjectToFolder',
|
62
|
+
repositoryId: repository.id,
|
63
|
+
objectId: object.cmis_object_id,
|
64
|
+
folderId: cmis_object_id }, opts)
|
65
65
|
end
|
66
66
|
|
67
67
|
def remove(object, opts = {})
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
68
|
+
server.execute!({ cmisaction: 'removeObjectFromFolder',
|
69
|
+
repositoryId: repository.id,
|
70
|
+
objectId: object.cmis_object_id,
|
71
|
+
folderId: cmis_object_id }, opts)
|
72
72
|
end
|
73
73
|
end
|
74
74
|
end
|
data/lib/cmis/object.rb
CHANGED
@@ -20,32 +20,32 @@ module CMIS
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def delete(opts = {})
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
23
|
+
server.execute!({ cmisaction: 'delete',
|
24
|
+
repositoryId: repository.id,
|
25
|
+
objectId: cmis_object_id,
|
26
|
+
allVersions: true }, opts)
|
27
27
|
end
|
28
28
|
|
29
29
|
def update_properties(properties, opts = {})
|
30
|
-
update_change_token
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
30
|
+
update_change_token server.execute!({ cmisaction: 'update',
|
31
|
+
repositoryId: repository.id,
|
32
|
+
objectId: cmis_object_id,
|
33
|
+
properties: properties,
|
34
|
+
changeToken: change_token }, opts)
|
35
35
|
end
|
36
36
|
|
37
37
|
def parents(opts = {})
|
38
|
-
result =
|
39
|
-
|
40
|
-
|
38
|
+
result = server.execute!({ cmisselector: 'parents',
|
39
|
+
repositoryId: repository.id,
|
40
|
+
objectId: cmis_object_id }, opts)
|
41
41
|
|
42
42
|
result.map { |o| ObjectFactory.create(o['object'], repository) }
|
43
43
|
end
|
44
44
|
|
45
45
|
def allowable_actions(opts = {})
|
46
|
-
|
47
|
-
|
48
|
-
|
46
|
+
server.execute!({ cmisselector: 'allowableActions',
|
47
|
+
repositoryId: repository.id,
|
48
|
+
objectId: cmis_object_id }, opts)
|
49
49
|
end
|
50
50
|
|
51
51
|
def relationships(opts = {})
|
@@ -53,9 +53,9 @@ module CMIS
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def policies(opts = {})
|
56
|
-
result =
|
57
|
-
|
58
|
-
|
56
|
+
result = server.execute!({ cmisselector: 'policies',
|
57
|
+
repositoryId: repository.id,
|
58
|
+
objectId: cmis_object_id }, opts)
|
59
59
|
|
60
60
|
result.map { |r| Policy.new(r, repository) }
|
61
61
|
end
|
@@ -67,7 +67,7 @@ module CMIS
|
|
67
67
|
objectId: cmis_object_id }
|
68
68
|
params.update!(folderId: folder.cmis_object_id) if folder
|
69
69
|
|
70
|
-
|
70
|
+
server.execute!(params, opts)
|
71
71
|
end
|
72
72
|
|
73
73
|
def move(target_folder, opts = {})
|
@@ -77,31 +77,31 @@ module CMIS
|
|
77
77
|
raise 'Cannot move object because it is not in exactly one folder'
|
78
78
|
end
|
79
79
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
80
|
+
server.execute!({ cmisaction: 'move',
|
81
|
+
repositoryId: repository.id,
|
82
|
+
objectId: cmis_object_id,
|
83
|
+
targetFolderId: target_folder.cmis_object_id,
|
84
|
+
sourceFolderId: object_parents.first.cmis_object_id }, opts)
|
85
85
|
end
|
86
86
|
|
87
87
|
def acls(opts = {})
|
88
|
-
|
89
|
-
|
90
|
-
|
88
|
+
server.execute!({ cmisselector: 'acl',
|
89
|
+
repositoryId: repository.id,
|
90
|
+
objectId: cmis_object_id }, opts)
|
91
91
|
end
|
92
92
|
|
93
93
|
def add_aces(aces, opts = {})
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
94
|
+
server.execute!({ cmisaction: 'applyACL',
|
95
|
+
repositoryId: repository.id,
|
96
|
+
objectId: cmis_object_id,
|
97
|
+
addACEs: aces }, opts)
|
98
98
|
end
|
99
99
|
|
100
100
|
def remove_aces(aces, opts = {})
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
101
|
+
server.execute!({ cmisaction: 'applyACL',
|
102
|
+
repositoryId: repository.id,
|
103
|
+
objectId: cmis_object_id,
|
104
|
+
removeACEs: aces }, opts)
|
105
105
|
end
|
106
106
|
|
107
107
|
def detached?
|
@@ -110,8 +110,8 @@ module CMIS
|
|
110
110
|
|
111
111
|
private
|
112
112
|
|
113
|
-
def
|
114
|
-
repository.
|
113
|
+
def server
|
114
|
+
repository.server if repository
|
115
115
|
end
|
116
116
|
end
|
117
117
|
end
|
data/lib/cmis/policy.rb
CHANGED
@@ -8,17 +8,17 @@ module CMIS
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def apply_to(object, opts = {})
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
11
|
+
server.execute!({ cmisaction: 'applyPolicy',
|
12
|
+
repositoryId: repository_id,
|
13
|
+
policyId: cmis_object_id,
|
14
|
+
objectId: object.cmis_object_id }, opts)
|
15
15
|
end
|
16
16
|
|
17
17
|
def remove_from(object, opts = {})
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
18
|
+
server.execute!({ cmisaction: 'removePolicy',
|
19
|
+
repositoryId: repository_id,
|
20
|
+
policyId: cmis_object_id,
|
21
|
+
objectId: object.cmis_object_id }, opts)
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
data/lib/cmis/query.rb
CHANGED
@@ -88,7 +88,7 @@ module CMIS
|
|
88
88
|
params.merge!(cmisaction: 'query', statement: @statement)
|
89
89
|
end
|
90
90
|
|
91
|
-
result = @repository.
|
91
|
+
result = @repository.server.execute!(params, @opts)
|
92
92
|
|
93
93
|
results = result['results'].map do |r|
|
94
94
|
ObjectFactory.create(r, @repository)
|
data/lib/cmis/relationships.rb
CHANGED
@@ -80,15 +80,15 @@ module CMIS
|
|
80
80
|
end
|
81
81
|
|
82
82
|
def do_get_relationships
|
83
|
-
|
84
|
-
result =
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
83
|
+
server = @object.repository.server
|
84
|
+
result = server.execute!({ cmisselector: 'relationships',
|
85
|
+
repositoryId: @object.repository.id,
|
86
|
+
objectId: @object.cmis_object_id,
|
87
|
+
maxItems: @max_items,
|
88
|
+
skipCount: @skip_count,
|
89
|
+
relationshipDirection: @direction,
|
90
|
+
includeSubRelationshipTypes: @include_subtypes,
|
91
|
+
typeId: @type_id }, @opts)
|
92
92
|
|
93
93
|
results = result['objects'].map do |r|
|
94
94
|
ObjectFactory.create(r, @object.repository)
|
data/lib/cmis/repository.rb
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
module CMIS
|
2
2
|
class Repository
|
3
|
-
attr_reader :
|
3
|
+
attr_reader :server
|
4
4
|
|
5
|
-
def initialize(raw,
|
5
|
+
def initialize(raw, server)
|
6
6
|
@hash = raw
|
7
7
|
@hash.each_key do |key|
|
8
8
|
class_eval "def #{key.underscore};@hash['#{key}'];end"
|
9
9
|
class_eval "def #{key.gsub('repository', '').underscore};@hash['#{key}'];end" if key =~ /^repository/
|
10
10
|
end
|
11
11
|
|
12
|
-
@
|
12
|
+
@server = server
|
13
13
|
end
|
14
14
|
|
15
15
|
def new_document
|
@@ -37,33 +37,33 @@ module CMIS
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def root(opts = {})
|
40
|
-
result =
|
41
|
-
|
42
|
-
|
40
|
+
result = server.execute!({ cmisselector: 'object',
|
41
|
+
repositoryId: id,
|
42
|
+
objectId: root_folder_id }, opts)
|
43
43
|
|
44
44
|
ObjectFactory.create(result, self)
|
45
45
|
end
|
46
46
|
|
47
47
|
def object(cmis_object_id, opts = {})
|
48
|
-
result =
|
49
|
-
|
50
|
-
|
48
|
+
result = server.execute!({ cmisselector: 'object',
|
49
|
+
repositoryId: id,
|
50
|
+
objectId: cmis_object_id }, opts)
|
51
51
|
|
52
52
|
ObjectFactory.create(result, self)
|
53
53
|
end
|
54
54
|
|
55
55
|
def types(opts = {})
|
56
|
-
result =
|
57
|
-
|
58
|
-
|
56
|
+
result = server.execute!({ cmisselector: 'typeDescendants',
|
57
|
+
repositoryId: id,
|
58
|
+
includePropertyDefinitions: true }, opts)
|
59
59
|
|
60
60
|
construct_types(result)
|
61
61
|
end
|
62
62
|
|
63
63
|
def type(type_id, opts = {})
|
64
|
-
result =
|
65
|
-
|
66
|
-
|
64
|
+
result = server.execute!({ cmisselector: 'typeDefinition',
|
65
|
+
repositoryId: id,
|
66
|
+
typeId: type_id }, opts)
|
67
67
|
|
68
68
|
Type.new(result, self)
|
69
69
|
end
|
@@ -76,9 +76,9 @@ module CMIS
|
|
76
76
|
end
|
77
77
|
|
78
78
|
def create_type(type, opts = {})
|
79
|
-
result =
|
80
|
-
|
81
|
-
|
79
|
+
result = server.execute!({ cmisaction: 'createType',
|
80
|
+
repositoryId: id,
|
81
|
+
type: JSON.generate(type.to_hash) }, opts)
|
82
82
|
|
83
83
|
Type.new(result, self)
|
84
84
|
end
|
@@ -86,17 +86,17 @@ module CMIS
|
|
86
86
|
def create_relationship(object, opts = {})
|
87
87
|
raise 'Object is not a Relationship' unless object.is_a?(Relationship)
|
88
88
|
|
89
|
-
result =
|
90
|
-
|
91
|
-
|
89
|
+
result = server.execute!({ cmisaction: 'createRelationship',
|
90
|
+
repositoryId: id,
|
91
|
+
properties: object.properties }, opts)
|
92
92
|
|
93
93
|
ObjectFactory.create(result, self)
|
94
94
|
end
|
95
95
|
|
96
96
|
def content_changes(change_log_token, opts = {})
|
97
|
-
|
98
|
-
|
99
|
-
|
97
|
+
server.execute!({ cmisselector: 'contentChanges',
|
98
|
+
repositoryId: id,
|
99
|
+
changeLogToken: change_log_token }, opts)
|
100
100
|
end
|
101
101
|
|
102
102
|
def query(statement, opts = {})
|
data/lib/cmis/server.rb
CHANGED
@@ -1,24 +1,23 @@
|
|
1
1
|
module CMIS
|
2
|
-
class Server
|
3
|
-
attr_reader :connection
|
2
|
+
class Server < Connection
|
4
3
|
|
5
4
|
def initialize(options = {})
|
6
|
-
|
5
|
+
super
|
7
6
|
end
|
8
7
|
|
9
8
|
def repositories(opts = {})
|
10
|
-
result =
|
9
|
+
result = execute!({}, opts)
|
11
10
|
|
12
11
|
result.values.map do |r|
|
13
|
-
Repository.new(r,
|
12
|
+
Repository.new(r, self)
|
14
13
|
end
|
15
14
|
end
|
16
15
|
|
17
16
|
def repository(repository_id, opts = {})
|
18
|
-
result =
|
19
|
-
|
17
|
+
result = execute!({ cmisselector: 'repositoryInfo',
|
18
|
+
repositoryId: repository_id }, opts)
|
20
19
|
|
21
|
-
Repository.new(result[repository_id],
|
20
|
+
Repository.new(result[repository_id], self)
|
22
21
|
end
|
23
22
|
|
24
23
|
def has_repository?(repository_id)
|
data/lib/cmis/type.rb
CHANGED
@@ -40,17 +40,17 @@ module CMIS
|
|
40
40
|
hash = to_hash
|
41
41
|
hash['propertyDefinitions'] = new_defs
|
42
42
|
|
43
|
-
result =
|
44
|
-
|
45
|
-
|
43
|
+
result = server.execute!({ cmisaction: 'updateType',
|
44
|
+
repositoryId: repository.id,
|
45
|
+
type: JSON.generate(hash) }, opts)
|
46
46
|
|
47
47
|
Type.new(result, repository)
|
48
48
|
end
|
49
49
|
|
50
50
|
def delete(opts = {})
|
51
|
-
|
52
|
-
|
53
|
-
|
51
|
+
server.execute!({ cmisaction: 'deleteType',
|
52
|
+
repositoryId: repository.id,
|
53
|
+
typeId: id }, opts)
|
54
54
|
end
|
55
55
|
|
56
56
|
def document_type?
|
@@ -98,8 +98,8 @@ module CMIS
|
|
98
98
|
|
99
99
|
private
|
100
100
|
|
101
|
-
def
|
102
|
-
repository.
|
101
|
+
def server
|
102
|
+
repository.server if repository
|
103
103
|
end
|
104
104
|
end
|
105
105
|
end
|
data/lib/cmis/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cmis-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenneth Geerts
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-03-
|
12
|
+
date: 2014-03-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
@@ -17,14 +17,14 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 0.9
|
20
|
+
version: '0.9'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 0.9
|
27
|
+
version: '0.9'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: activesupport
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -48,7 +48,7 @@ dependencies:
|
|
48
48
|
description: |
|
49
49
|
CMIS browser binding client library in ruby.
|
50
50
|
email:
|
51
|
-
-
|
51
|
+
- kenneth@up-nxt.com
|
52
52
|
executables: []
|
53
53
|
extensions: []
|
54
54
|
extra_rdoc_files: []
|
@@ -93,7 +93,8 @@ files:
|
|
93
93
|
- spec/server_spec.rb
|
94
94
|
- spec/type_spec.rb
|
95
95
|
homepage: https://github.com/UP-nxt
|
96
|
-
licenses:
|
96
|
+
licenses:
|
97
|
+
- Apache-2.0
|
97
98
|
metadata: {}
|
98
99
|
post_install_message:
|
99
100
|
rdoc_options: []
|
@@ -124,4 +125,4 @@ test_files:
|
|
124
125
|
- spec/repository_spec.rb
|
125
126
|
- spec/server_spec.rb
|
126
127
|
- spec/type_spec.rb
|
127
|
-
has_rdoc:
|
128
|
+
has_rdoc: false
|