cmis-ruby 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cmis/connection.rb +3 -1
- data/lib/cmis/version.rb +1 -1
- data/spec/cmis-ruby/folder_spec.rb +2 -2
- data/spec/cmis-ruby/query_spec.rb +4 -12
- data/spec/cmis-ruby/repository_spec.rb +2 -2
- data/spec/cmis-ruby/server_spec.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bb95818afeb6acaa281164e2dde6ae648658624
|
4
|
+
data.tar.gz: 1ad3be58cd153a1ea23b2b3ff1e7f95d0f2cdb89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d74c6e1a323f1ccfaba6fc6c23219a81e21e0c24c508705fa1aeae72b52aeb5fe3835a1a801ee6fbd0f09e8c9ee590f7f7998f012ead2e49a515b61b4a6ff30
|
7
|
+
data.tar.gz: 6b331f8b8532a14ce626db734961ca31b8fe47fc680defbc5e2a7f2e1936f08a4237396d2a47aebfff816ea52d3aa489d665d5e84f57eebc6e4464434a42bd28
|
data/lib/cmis/connection.rb
CHANGED
@@ -20,10 +20,12 @@ module CMIS
|
|
20
20
|
builder.basic_auth(options[:username], options[:password])
|
21
21
|
end
|
22
22
|
|
23
|
-
builder.adapter (options[:adapter] || :net_http).to_sym
|
24
23
|
builder.response :follow_redirects, standards_compliant: true
|
25
24
|
builder.response :logger if options[:log_requests]
|
26
25
|
builder.use ResponseParser
|
26
|
+
|
27
|
+
# The adapter must be the last one
|
28
|
+
builder.adapter (options[:adapter] || :net_http).to_sym
|
27
29
|
end
|
28
30
|
|
29
31
|
@repository_infos = {}
|
data/lib/cmis/version.rb
CHANGED
@@ -12,11 +12,11 @@ module CMIS
|
|
12
12
|
end
|
13
13
|
|
14
14
|
it 'returns true for the root folder' do
|
15
|
-
expect(repository.root.root?).to
|
15
|
+
expect(repository.root.root?).to be true
|
16
16
|
end
|
17
17
|
|
18
18
|
it 'returns false for another folder' do
|
19
|
-
expect(@folder.root?).to
|
19
|
+
expect(@folder.root?).to be false
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
@@ -13,21 +13,13 @@ module CMIS
|
|
13
13
|
|
14
14
|
context 'when querying with a limit' do
|
15
15
|
it 'should execute only one query if limit is under 10' do
|
16
|
-
CMIS::Query.
|
17
|
-
|
18
|
-
result = documents_query_result(limit: 3)
|
19
|
-
expect(result.size).to eq(3)
|
20
|
-
|
21
|
-
@query.should have_received(:do_query).exactly(1).times
|
16
|
+
expect_any_instance_of(CMIS::Query).to receive(:do_query).once.and_call_original
|
17
|
+
documents_query_result(limit: 3)
|
22
18
|
end
|
23
19
|
|
24
20
|
it 'should execute only 2 queries if limit is 20' do
|
25
|
-
CMIS::Query.
|
26
|
-
|
27
|
-
result = documents_query_result(limit: 20)
|
28
|
-
expect(result.size).to eq(20)
|
29
|
-
|
30
|
-
@query.should have_received(:do_query).exactly(2).times
|
21
|
+
expect_any_instance_of(CMIS::Query).to receive(:do_query).twice.and_call_original
|
22
|
+
documents_query_result(limit: 20)
|
31
23
|
end
|
32
24
|
|
33
25
|
it 'should receive 5 documents if limit is 5' do
|
@@ -100,11 +100,11 @@ module CMIS
|
|
100
100
|
|
101
101
|
describe '#type?' do
|
102
102
|
it 'returns true for a present type' do
|
103
|
-
expect(repository.type?('apple')).to
|
103
|
+
expect(repository.type?('apple')).to be true
|
104
104
|
end
|
105
105
|
|
106
106
|
it 'returns false for an absent type' do
|
107
|
-
expect(repository.type?('banana')).to
|
107
|
+
expect(repository.type?('banana')).to be false
|
108
108
|
end
|
109
109
|
end
|
110
110
|
|
@@ -28,12 +28,12 @@ module CMIS
|
|
28
28
|
|
29
29
|
describe '#repository?' do
|
30
30
|
it 'returns true for a present repository' do
|
31
|
-
expect(server.repository?(repository_id)).to
|
31
|
+
expect(server.repository?(repository_id)).to be true
|
32
32
|
end
|
33
33
|
|
34
34
|
it 'returns false for an absent repository' do
|
35
35
|
absent_repository_id = SecureRandom.uuid
|
36
|
-
expect(server.repository?(absent_repository_id)).to
|
36
|
+
expect(server.repository?(absent_repository_id)).to be false
|
37
37
|
end
|
38
38
|
end
|
39
39
|
end
|
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.
|
4
|
+
version: 0.5.5
|
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-
|
12
|
+
date: 2014-06-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|