cmis-ruby 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -2
- data/.travis.yml +2 -2
- data/Gemfile +1 -0
- data/cmis-ruby.gemspec +4 -4
- data/lib/cmis/version.rb +1 -1
- data/readme.md +13 -13
- data/spec/config.yml +1 -1
- data/spec/spec_helper.rb +12 -9
- metadata +12 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98f7dbcd1d1ddca41c48e3228ce8f22ca705fa8c
|
4
|
+
data.tar.gz: 155fd2cbcd5b7a81afc1f2a2ab5e77358fed8b2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52aec11a763819d3c7d5a057fde58fd42ceb9b873c3116e3d4529abbc8edcbf8885748d34dc6f62ecfa414f10570fe650c7d50c59e8f918f0966f9b8cede3b51
|
7
|
+
data.tar.gz: aa6c9538b99d3a4984f18f3b7ff8f2fcdd4e40e562e7dc93d581cbf98c20d16cc41f4bf6fe9b07e1f5ee0bc7e7ae6e5fa42c36902fbc96953fbb437da0ebd5e4
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/cmis-ruby.gemspec
CHANGED
@@ -5,8 +5,8 @@ Gem::Specification.new do |s|
|
|
5
5
|
s.name = 'cmis-ruby'
|
6
6
|
s.version = CMIS::VERSION
|
7
7
|
s.date = Time.now.strftime('%Y-%m-%d')
|
8
|
-
s.authors = ['Kenneth Geerts', 'Michael Brackx']
|
9
|
-
s.email = ['kenneth@up-nxt.com']
|
8
|
+
s.authors = [ 'Kenneth Geerts', 'Michael Brackx' ]
|
9
|
+
s.email = [ 'kenneth@up-nxt.com' ]
|
10
10
|
s.homepage = 'https://github.com/UP-nxt'
|
11
11
|
s.summary = 'Ruby client for CMIS'
|
12
12
|
s.license = 'Apache-2.0'
|
@@ -15,11 +15,11 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.files = `git ls-files`.split($/)
|
16
16
|
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
17
|
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
18
|
-
s.require_paths =
|
18
|
+
s.require_paths = [ 'lib' ]
|
19
19
|
|
20
20
|
s.required_ruby_version = '>= 1.9.3'
|
21
21
|
|
22
|
-
s.add_dependency 'faraday', '
|
22
|
+
s.add_dependency 'faraday', '>= 0.8.9', '<= 0.9.0'
|
23
23
|
|
24
24
|
s.description = <<-DESCRIPTION
|
25
25
|
CMIS browser binding client library in ruby.
|
data/lib/cmis/version.rb
CHANGED
data/readme.md
CHANGED
@@ -1,33 +1,29 @@
|
|
1
1
|
# CMIS ruby
|
2
2
|
|
3
|
-
[![Gem Version](https://
|
4
|
-
[![
|
5
|
-
[![Build Status](
|
6
|
-
[![
|
3
|
+
[![Gem Version](https://img.shields.io/gem/v/cmis-ruby.svg)](https://rubygems.org/gems/cmis-ruby)
|
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
|
+
[![Code Climate](http://img.shields.io/codeclimate/github/UP-nxt/cmis-ruby.svg)](https://codeclimate.com/github/UP-nxt/cmis-ruby)
|
7
|
+
[![Coverage Status](https://img.shields.io/coveralls/UP-nxt/cmis-ruby.svg)](https://coveralls.io/r/UP-nxt/cmis-ruby)
|
7
8
|
|
8
9
|
**CMIS ruby** is a [CMIS](http://chemistry.apache.org/project/cmis.html) client library, using the the _CMIS Browser Binding_ ([CMIS 1.1](http://docs.oasis-open.org/cmis/CMIS/v1.1/CMIS-v1.1.html)).
|
9
10
|
|
10
11
|
## Example usage
|
11
12
|
|
12
|
-
#### `CMIS::Server` and `CMIS::Repository`
|
13
|
-
|
14
13
|
```ruby
|
14
|
+
# get the repository object
|
15
15
|
server = CMIS::Server.new(service_url: 'http://33.33.33.100:8080/browser',
|
16
16
|
username: 'foo', password: 'bar')
|
17
17
|
repository = server.repository('my_repository')
|
18
|
-
```
|
19
|
-
|
20
|
-
#### `CMIS::document`
|
21
18
|
|
22
|
-
|
23
|
-
# get by object id
|
19
|
+
# get object by object id
|
24
20
|
document = repository.object('f3y5wbb6slhkeq3ciu3uazbpxeu')
|
25
21
|
|
26
|
-
#
|
22
|
+
# or by unique property
|
27
23
|
document = repository.find_object('cmis:document',
|
28
24
|
'cmis:name' => 'some_unique_name')
|
29
25
|
|
30
|
-
# set content
|
26
|
+
# set document content
|
31
27
|
document.content = { stream: StringIO.new('Apple is a fruit'),
|
32
28
|
mime_type: 'text/plain',
|
33
29
|
filename: 'apple.txt' }
|
@@ -37,6 +33,10 @@ document = repository.new_document
|
|
37
33
|
document.name = 'new_document'
|
38
34
|
document.object_type_id = 'cmis:document'
|
39
35
|
document = document.create_in_folder(repository.root)
|
36
|
+
|
37
|
+
# query for first 50 documents where the property foo is 'bar'
|
38
|
+
query = repository.query("select * from cmis:document where foo='bar'")
|
39
|
+
query.each_result(limit: 50) { |document| puts document.cmis_object_id }
|
40
40
|
```
|
41
41
|
|
42
42
|
## Running specs
|
data/spec/config.yml
CHANGED
@@ -8,7 +8,7 @@ ci:
|
|
8
8
|
service_url: https://cmis-service.ci.apps.up-nxt.com/browser
|
9
9
|
username: <%= ENV['CI_USERNAME'] %>
|
10
10
|
password: <%= ENV['CI_PASSWORD'] %>
|
11
|
-
repository:
|
11
|
+
repository: travis_cmis_ruby_<%= RUBY_VERSION.tr(?., ?_) %>
|
12
12
|
nuxeo:
|
13
13
|
server:
|
14
14
|
service_url: http://cmis.demo.nuxeo.com/nuxeo/json/cmis
|
data/spec/spec_helper.rb
CHANGED
@@ -1,6 +1,9 @@
|
|
1
|
+
require 'coveralls'
|
2
|
+
Coveralls.wear!
|
3
|
+
|
1
4
|
require 'cmis-ruby'
|
2
|
-
require 'yaml'
|
3
5
|
require 'erb'
|
6
|
+
require 'yaml'
|
4
7
|
|
5
8
|
module SpecHelpers
|
6
9
|
def server
|
@@ -18,16 +21,16 @@ module SpecHelpers
|
|
18
21
|
private
|
19
22
|
|
20
23
|
def options
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
if config.key?(test_env)
|
26
|
-
config[test_env]
|
27
|
-
else
|
28
|
-
raise "No configuration found for environment `#{test_env}`"
|
24
|
+
@@options ||= begin
|
25
|
+
path = File.join(File.dirname(File.expand_path(__FILE__)), 'config.yml')
|
26
|
+
config = YAML.load(ERB.new(File.read(path)).result)
|
27
|
+
config[config_key] or raise "No configuration found for `#{config_key}`"
|
29
28
|
end
|
30
29
|
end
|
30
|
+
|
31
|
+
def config_key
|
32
|
+
ENV['TEST_ENV'] || 'local'
|
33
|
+
end
|
31
34
|
end
|
32
35
|
|
33
36
|
RSpec.configure do |c|
|
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.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenneth Geerts
|
@@ -9,22 +9,28 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-03-
|
12
|
+
date: 2014-03-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
20
|
+
version: 0.8.9
|
21
|
+
- - "<="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.9.0
|
21
24
|
type: :runtime
|
22
25
|
prerelease: false
|
23
26
|
version_requirements: !ruby/object:Gem::Requirement
|
24
27
|
requirements:
|
25
|
-
- - "
|
28
|
+
- - ">="
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: 0.8.9
|
31
|
+
- - "<="
|
26
32
|
- !ruby/object:Gem::Version
|
27
|
-
version:
|
33
|
+
version: 0.9.0
|
28
34
|
description: |
|
29
35
|
CMIS browser binding client library in ruby.
|
30
36
|
email:
|