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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3fefeee566f1ed7d06b802fe303f25b0dca90680
4
- data.tar.gz: 02ed43827b5019697f254b7ebc1fe1ed9b26f00a
3
+ metadata.gz: 98f7dbcd1d1ddca41c48e3228ce8f22ca705fa8c
4
+ data.tar.gz: 155fd2cbcd5b7a81afc1f2a2ab5e77358fed8b2d
5
5
  SHA512:
6
- metadata.gz: ac6b9a79e134b783db1fdc7a87ec914cfb9e3719dcd56ffbe2c95e29fc355fc6f6da8288b1d0f281cf35b50d4df4da7feedeea42288dfbcf95a21d31fb124720
7
- data.tar.gz: f90b18091fd8c2759e492c524561a75dfc70d50fcdf7adb49cf6561c65c13e14025338987851619fe44825a211618cf435a86d5da4c061e8b9f53b1932e84260
6
+ metadata.gz: 52aec11a763819d3c7d5a057fde58fd42ceb9b873c3116e3d4529abbc8edcbf8885748d34dc6f62ecfa414f10570fe650c7d50c59e8f918f0966f9b8cede3b51
7
+ data.tar.gz: aa6c9538b99d3a4984f18f3b7ff8f2fcdd4e40e562e7dc93d581cbf98c20d16cc41f4bf6fe9b07e1f5ee0bc7e7ae6e5fa42c36902fbc96953fbb437da0ebd5e4
data/.gitignore CHANGED
@@ -1,4 +1,3 @@
1
1
  Gemfile.lock
2
- .idea
3
- *.iml
4
2
  *.gem
3
+ coverage
data/.travis.yml CHANGED
@@ -1,8 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
+ - 1.9.3
3
4
  - 2.0.0
4
- # - 1.9.3
5
- # - 2.1.0
5
+ - 2.1.0
6
6
  env:
7
7
  matrix:
8
8
  - TEST_ENV=ci
data/Gemfile CHANGED
@@ -5,4 +5,5 @@ gemspec
5
5
  group :test do
6
6
  gem 'rake'
7
7
  gem 'rspec'
8
+ gem 'coveralls'
8
9
  end
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 = %w( lib )
18
+ s.require_paths = [ 'lib' ]
19
19
 
20
20
  s.required_ruby_version = '>= 1.9.3'
21
21
 
22
- s.add_dependency 'faraday', '~> 0.9'
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
@@ -1,3 +1,3 @@
1
1
  module CMIS
2
- VERSION = '0.4.1'
2
+ VERSION = '0.4.2'
3
3
  end
data/readme.md CHANGED
@@ -1,33 +1,29 @@
1
1
  # CMIS ruby
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/cmis-ruby.png)](http://badge.fury.io/rb/cmis-ruby)
4
- [![Code Climate](https://codeclimate.com/github/UP-nxt/cmis-ruby.png)](https://codeclimate.com/github/UP-nxt/cmis-ruby)
5
- [![Build Status](https://travis-ci.org/UP-nxt/cmis-ruby.png?branch=master)](https://travis-ci.org/UP-nxt/cmis-ruby)
6
- [![Dependency Status](https://gemnasium.com/UP-nxt/cmis-ruby.png)](https://gemnasium.com/UP-nxt/cmis-ruby)
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
- ```ruby
23
- # get by object id
19
+ # get object by object id
24
20
  document = repository.object('f3y5wbb6slhkeq3ciu3uazbpxeu')
25
21
 
26
- # find by unique property
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: travis_cmis_ruby
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
- path = File.join(File.dirname(File.expand_path(__FILE__)), 'config.yml')
22
- config = YAML.load ERB.new(File.read(path)).result
23
-
24
- test_env = ENV['TEST_ENV'] || 'local'
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.1
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-24 00:00:00.000000000 Z
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: '0.9'
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: '0.9'
33
+ version: 0.9.0
28
34
  description: |
29
35
  CMIS browser binding client library in ruby.
30
36
  email: