cmis-ruby 0.5.28 → 0.5.29

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c1c897e1a19d696085646c92c0fc1c63500765a7
4
- data.tar.gz: 627e5e1aaeca5ff09435f4f6f04654cf14433958
3
+ metadata.gz: c9b91a0784115c82ad38cc357860be6222e30a88
4
+ data.tar.gz: 41c1d8e058ee7b0ccf26040d599164d63b2417c2
5
5
  SHA512:
6
- metadata.gz: ad4518ef5d0e1150bd7c62ee17dfc333dff16ab0bd0921867334235c664173702f8770eda6d4e2a93cf26bf29ec32e73ee844b8a7891768512604ba8e1cd1227
7
- data.tar.gz: 30ed1ea6be7428319cc65ffd86e00f6a235a0f6cb0cd0bd678102d2f8b4d242f83ad38d3ccd56a53089fcae93498aa61beab3d6c6fbf17c3bb328138a306fb17
6
+ metadata.gz: 544d945c420f8124b319353f1aeed3032360c94522b9004da357193f52672f7b5b70104631f817b26f33a0f9c4bc688d86889fc2908595f0c24c1ac682f66a27
7
+ data.tar.gz: 2791465b90f439a9e6e6fdf58b6b863e9ed57c96ff807829c79b0f86aaaba62ac7a7c605e24454546f8ffd9b37a14e3dd5781d9ad47c54a20ae97888fd9a12a7
@@ -56,6 +56,12 @@ module CMIS
56
56
  ObjectFactory.create(result, self)
57
57
  end
58
58
 
59
+ def type_tree(opts = {})
60
+ server.execute!({ cmisselector: 'typeDescendants',
61
+ repositoryId: id,
62
+ includePropertyDefinitions: false }, opts)
63
+ end
64
+
59
65
  def types(opts = {})
60
66
  result = server.execute!({ cmisselector: 'typeDescendants',
61
67
  repositoryId: id,
data/lib/cmis/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module CMIS
2
- VERSION = '0.5.28'
2
+ VERSION = '0.5.29'
3
3
  end
data/readme.md CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  [![Gem Version](https://img.shields.io/gem/v/cmis-ruby.svg)](https://rubygems.org/gems/cmis-ruby)
4
4
  [![Dependency Status](http://img.shields.io/gemnasium/UP-nxt/cmis-ruby.svg)](https://gemnasium.com/UP-nxt/cmis-ruby)
5
- [![Build Status](http://img.shields.io/travis/UP-nxt/cmis-ruby.svg)](https://travis-ci.org/UP-nxt/cmis-ruby)
6
5
  [![Code Climate](http://img.shields.io/codeclimate/github/UP-nxt/cmis-ruby.svg)](https://codeclimate.com/github/UP-nxt/cmis-ruby)
7
6
  [![Coverage Status](https://img.shields.io/coveralls/UP-nxt/cmis-ruby.svg)](https://coveralls.io/r/UP-nxt/cmis-ruby)
8
7
 
@@ -22,7 +21,7 @@ repository = server.repository('my_repository')
22
21
  document = repository.object('f3y5wbb6slhkeq3ciu3uazbpxeu')
23
22
 
24
23
  # or by unique property
25
- document = repository.find_object('cmis:document',
24
+ document = repository.find_object('cmis:document',
26
25
  'cmis:name' => 'some_unique_name')
27
26
 
28
27
  # set document content
@@ -43,7 +42,7 @@ query.each_result(limit: 50) { |document| puts document.cmis_object_id }
43
42
 
44
43
  ## Running specs
45
44
 
46
- The default rake task runs the specs. This requires a separate CMIS server. The environment variable `TEST_ENV` selects the test environment from `spec/config.yml`. The Travis build uses the private `ci` environment.
45
+ The default rake task runs the specs. This requires a separate CMIS server. The environment variable `TEST_ENV` selects the test environment from `spec/config.yml`.
47
46
 
48
47
  ## Contributing
49
48
 
@@ -134,6 +134,20 @@ module CMIS
134
134
  end
135
135
  end
136
136
 
137
+ describe '#type_tree' do
138
+ it 'returns type tree' do
139
+ type_tree = repository.type_tree
140
+ expect(type_tree).to be_a(Array)
141
+ expect(type_tree.size).to eq 5
142
+ ids = type_tree.map { |elem| elem['type']['id'] }
143
+ expect(ids).to include('cmis:document', 'cmis:folder', 'cmis:item', 'cmis:relationship', 'cmis:secondary')
144
+ document_type = type_tree.select { |elem| elem['type']['id'] == 'cmis:document' }.first
145
+ document_subtypes = document_type['children']
146
+ expect(document_subtypes.size).to eq 1
147
+ expect(document_subtypes.first['type']['id']).to eq 'apple'
148
+ end
149
+ end
150
+
137
151
  def create_apple_type
138
152
  type = repository.new_type
139
153
  type.id = 'apple'
data/spec/config.yml CHANGED
@@ -3,18 +3,12 @@ local:
3
3
  server:
4
4
  service_url: http://33.33.33.100:8150/browser
5
5
  repository: test
6
- dev:
7
- server:
8
- service_url: http://localhost:8150/browser
9
- username: cmis_ruby_test
10
- password: cmis_ruby_test
11
- repository: demo
12
6
  ci:
13
7
  server:
14
- service_url: https://cmis-service.ci.apps.up-nxt.com/browser
15
- username: <%= ENV['CI_USERNAME'] %>
16
- password: <%= ENV['CI_PASSWORD'] %>
17
- repository: travis_cmis_ruby_<%= RUBY_VERSION.tr(?., ?_) %>
8
+ service_url: <%= ENV['CMIS_SERVICE_URL'] %>
9
+ username: <%= ENV['SERVICE_USER'] %>
10
+ password: <%= ENV['SERVICE_PASSWORD'] %>
11
+ repository: <%= ENV['REPOSITORY'] %>
18
12
  nuxeo:
19
13
  server:
20
14
  service_url: http://cmis.demo.nuxeo.com/nuxeo/json/cmis
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.5.28
4
+ version: 0.5.29
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: 2016-02-11 00:00:00.000000000 Z
12
+ date: 2016-02-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
@@ -48,7 +48,6 @@ extensions: []
48
48
  extra_rdoc_files: []
49
49
  files:
50
50
  - ".gitignore"
51
- - ".travis.yml"
52
51
  - Gemfile
53
52
  - LICENSE
54
53
  - Rakefile
data/.travis.yml DELETED
@@ -1,12 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 1.9.3
4
- - 2.0.0
5
- - 2.1.0
6
- - rbx-2
7
- env:
8
- matrix:
9
- - TEST_ENV=ci
10
- global:
11
- - secure: PwEKZ/1SJmQQzWeGa1y7EKkIHbfcPrM2jalmCYdPcmJ8Yyp0t/0PbRXmc75QRBjFwkkGo/q1kyfdAImAtqmnTEMToaxoDAJw+DbSjbhN1n3e7heD5eFjaqUtUVZsf1LKR6cXO/L6ZdeNBcQwwlbwN+8I5QJjW0NJGADME+zerP0=
12
- - secure: SJRgR4WQzUisGk2Og18WbIsfqRCTIctUVjyEGPptYtLtEVo18A3O46MUZAlm6vyHAMpdq+u35KRw2xdJh7hkYg5yTp6jZG0aziDlhiNn6eOUaH/VZ/xBIZiSj+ceFxaq1G4UjfQnxJMqoadsjhApnNE2iQkgme5izXqmLY0e3tc=