Git Product home page Git Product logo

activecmis's People

Contributors

beno avatar chikamichi avatar joerixaop avatar timfel avatar zedtux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

activecmis's Issues

Difficulty creating new folder

The following code:

wanted_type = repository.type_by_id("cmis:folder")
new_folder = wanted_type.new("cmis:name" => "New Folder")
new_folder.file(repository.root_folder)
new_folder.save

results in this error:
/usr/lib/ruby/gems/1.8/gems/active_cmis-0.1.12/lib/active_cmis/object.rb:357:in id': wrong number of arguments (1 for 0) (ArgumentError) from /usr/lib/ruby/gems/1.8/gems/active_cmis-0.1.12/lib/active_cmis/object.rb:357:inrender_atom_entry'
from /usr/lib/ruby/gems/1.8/gems/nokogiri-1.4.4/lib/nokogiri/xml/builder.rb:366:in call' from /usr/lib/ruby/gems/1.8/gems/nokogiri-1.4.4/lib/nokogiri/xml/builder.rb:366:ininsert'
from /usr/lib/ruby/gems/1.8/gems/nokogiri-1.4.4/lib/nokogiri/xml/builder.rb:350:in method_missing' from /usr/lib/ruby/gems/1.8/gems/active_cmis-0.1.12/lib/active_cmis/object.rb:348:inrender_atom_entry'
from /usr/lib/ruby/gems/1.8/gems/nokogiri-1.4.4/lib/nokogiri/xml/builder.rb:293:in initialize' from /usr/lib/ruby/gems/1.8/gems/active_cmis-0.1.12/lib/active_cmis/object.rb:347:innew'
from /usr/lib/ruby/gems/1.8/gems/active_cmis-0.1.12/lib/active_cmis/object.rb:347:in render_atom_entry' from /usr/lib/ruby/gems/1.8/gems/active_cmis-0.1.12/lib/active_cmis/object.rb:416:insave_new_object'
from /usr/lib/ruby/gems/1.8/gems/active_cmis-0.1.12/lib/active_cmis/object.rb:159:in send' from /usr/lib/ruby/gems/1.8/gems/active_cmis-0.1.12/lib/active_cmis/object.rb:159:insave'
from /usr/lib/ruby/gems/1.8/gems/active_cmis-0.1.12/lib/active_cmis/object.rb:158:in each' from /usr/lib/ruby/gems/1.8/gems/active_cmis-0.1.12/lib/active_cmis/object.rb:158:insave'
from test_case.rb:13

Thanks and regards,
Brent

Is this gem thread-safe?

I'd like to use this gem in a thread-safe context (using config.threadsafe! rails option).
Do you think I'll face any issue with activecmis?

Thanks,
Antonio.

ActiveCMIS for CMIS1.1

Hi,

CMIS specification version 1.1 has now been approved by OASIS.
http://docs.oasis-open.org/cmis/CMIS/v1.1/CMIS-v1.1.html

Does ActiveCMIS have a plan to correspond CMIS 1.1?

In fact, I'm developing a new light-weight CMIS server "NemakiWare", whose backend is NoSQL CouchDB.

https://bitbucket.org/aegif

I'm also going to develop its new client with Ruby on Rails and ActiveCMIS!
But as the same time, I want to enhance NemakiWare to be more CMIS compliant, I mean, I want to use CMIS1.1 new feature insrtead of CMIS Extension data. The new ActiveCMIS client has to deal with CMIS1.1 feature.

For example:
NemakiWare needs some user-customizable property, they can be implemented as cmis:secondary object type which is a new feature of CMIS1.1. In addiotion, the concept of user/group could be expressed by "Item" object type which also comes into CMIS1.1.

To version up ActiveCMIS for 1.1, some core scripts(type.rb, object.rb...) seem to have to be changed. It could not be impossible by us (as ActiveCMIS is OpenSource :-)), though, it would be good by the knowledgeable developer like you, I think. I'd like to adopt a workaround that changes the atom parser of object.rb to extract cmis:secondary properties.

Anyway, could you please tell me if you have a plan for version up to 1.1? I decided to my development plan depending on it.

Thanks you in advance.

undefined method `request_uri' for #<URI::Generic:0x10a2a30e0 URL:test>

If the URL passed from the configuration is not a valid URL, URI raise an exception not managed by activecmis where it should.

cmis.yml

development:
  server_url: "test"

initializers/active_cmis.rb

require "active_cmis"

begin
  Fundlook::Repositories::Alfresco.repository = ActiveCMIS.load_config(Rails.env, File.join(Rails.root, "config", "cmis.yml"))
rescue Timeout::Error, SocketError => error
  Rails.logger.warn "Error while connecting with CMIS: #{error.message}"
end
thin start
>> Using rails adapter
/Users/guillaumeh/.rvm/gems/ree-1.8.7-2012.02@fundlook/bundler/gems/activecmis-7f99b627339b/lib/active_cmis/internal/connection.rb:45:in `get': undefined method `request_uri' for #<URI::Generic:0x10a2a30e0 URL:test> (NoMethodError)
    from /Users/guillaumeh/.rvm/gems/ree-1.8.7-2012.02@fundlook/bundler/gems/activecmis-7f99b627339b/lib/active_cmis/internal/connection.rb:70:in `get_xml'
    from /Users/guillaumeh/.rvm/gems/ree-1.8.7-2012.02@fundlook/bundler/gems/activecmis-7f99b627339b/lib/active_cmis/server.rb:107:in `repository_info__uncached'
    from /Users/guillaumeh/.rvm/gems/ree-1.8.7-2012.02@fundlook/bundler/gems/activecmis-7f99b627339b/lib/active_cmis/internal/caching.rb:28:in `repository_info'
    from /Users/guillaumeh/.rvm/gems/ree-1.8.7-2012.02@fundlook/bundler/gems/activecmis-7f99b627339b/lib/active_cmis/server.rb:79:in `uncached_repository'
    from /Users/guillaumeh/.rvm/gems/ree-1.8.7-2012.02@fundlook/bundler/gems/activecmis-7f99b627339b/lib/active_cmis/server.rb:74:in `repository'
    from /Users/guillaumeh/.rvm/gems/ree-1.8.7-2012.02@fundlook/bundler/gems/activecmis-7f99b627339b/lib/active_cmis/active_cmis.rb:49:in `connect'
    from /Users/guillaumeh/.rvm/gems/ree-1.8.7-2012.02@fundlook/bundler/gems/activecmis-7f99b627339b/lib/active_cmis/active_cmis.rb:79:in `load_config'
    from /Users/guillaumeh/Developments/fundlook/config/initializers/active_cmis.rb:4
    from /Users/guillaumeh/.rvm/gems/ree-1.8.7-2012.02@fundlook/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:171:in `load_without_new_constant_marking'
    from /Users/guillaumeh/.rvm/gems/ree-1.8.7-2012.02@fundlook/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:171:in `load'
    from /Users/guillaumeh/.rvm/gems/ree-1.8.7-2012.02@fundlook/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:547:in `new_constants_in'
    from /Users/guillaumeh/.rvm/gems/ree-1.8.7-2012.02@fundlook/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:171:in `load'
    from /Users/guillaumeh/.rvm/gems/ree-1.8.7-2012.02@fundlook/gems/rails-2.3.18/lib/initializer.rb:622:in `load_application_initializers'
    from /Users/guillaumeh/.rvm/gems/ree-1.8.7-2012.02@fundlook/gems/rails-2.3.18/lib/initializer.rb:621:in `each'
    from /Users/guillaumeh/.rvm/gems/ree-1.8.7-2012.02@fundlook/gems/rails-2.3.18/lib/initializer.rb:621:in `load_application_initializers'
    from /Users/guillaumeh/.rvm/gems/ree-1.8.7-2012.02@fundlook/gems/rails-2.3.18/lib/initializer.rb:176:in `process'

Unable to checkout a document with Nuxeo

Platform : http://cmis.demo.nuxeo.org

I wish to update a document, in order to do this, I have to create a pwc :

pwc = doc.checkout

But by doing this, I have this error :

RuntimeError (

<title>Apache Chemistry OpenCMIS - invalidArgument error</title>

HTTP Status 400 - invalidArgument

Object Id must be set!


org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException: Object Id must be set!
[...]

function changes() in repository.rb does not work with current alfresco (4.2.c)

it seems there is not type definition for some changelog entries. Some have the type ACL, some others dont have a type set

the alfresco web server exception says:

org.springframework.extensions.webscripts.WebScriptException - 02300206 Invalid typeId

ruby stack trace:

    from /home/olli/.rvm/gems/ruby-1.9.3-p374/gems/active_cmis-0.3.2/lib/active_cmis/internal/connection.rb:46:in `get'
    from /home/olli/.rvm/gems/ruby-1.9.3-p374/gems/active_cmis-0.3.2/lib/active_cmis/internal/connection.rb:70:in `get_xml'
    from /home/olli/.rvm/gems/ruby-1.9.3-p374/gems/active_cmis-0.3.2/lib/active_cmis/internal/connection.rb:77:in `get_atom_entry'
    from /home/olli/.rvm/gems/ruby-1.9.3-p374/gems/active_cmis-0.3.2/lib/active_cmis/repository.rb:133:in `type_by_id'
    from /home/olli/.rvm/gems/ruby-1.9.3-p374/gems/active_cmis-0.3.2/lib/active_cmis/object.rb:528:in `from_atom_entry'
    from /home/olli/.rvm/gems/ruby-1.9.3-p374/gems/active_cmis-0.3.2/lib/active_cmis/collection.rb:24:in `block in initialize'
    from /home/olli/.rvm/gems/ruby-1.9.3-p374/gems/nokogiri-1.5.6/lib/nokogiri/xml/node_set.rb:239:in `block in each'
    from /home/olli/.rvm/gems/ruby-1.9.3-p374/gems/nokogiri-1.5.6/lib/nokogiri/xml/node_set.rb:238:in `upto'
    from /home/olli/.rvm/gems/ruby-1.9.3-p374/gems/nokogiri-1.5.6/lib/nokogiri/xml/node_set.rb:238:in `each'
    from /home/olli/.rvm/gems/ruby-1.9.3-p374/gems/active_cmis-0.3.2/lib/active_cmis/collection.rb:191:in `map'
    from /home/olli/.rvm/gems/ruby-1.9.3-p374/gems/active_cmis-0.3.2/lib/active_cmis/collection.rb:191:in `receive_page'
    from /home/olli/.rvm/gems/ruby-1.9.3-p374/gems/active_cmis-0.3.2/lib/active_cmis/collection.rb:35:in `length'
    from /home/olli/.rvm/gems/ruby-1.9.3-p374/gems/active_cmis-0.3.2/lib/active_cmis/internal/caching.rb:28:in `length'
    from /home/olli/.rvm/gems/ruby-1.9.3-p374/gems/active_cmis-0.3.2/lib/active_cmis/collection.rb:67:in `at'
    from /home/olli/.rvm/gems/ruby-1.9.3-p374/gems/active_cmis-0.3.2/lib/active_cmis/collection.rb:90:in `first'
    from bin/alfy_cli.rb:33:in `<main>'

corresponding atom feed:
http://10.96.10.101:8080/alfresco/s/cmis/changes?maxItems=3

admin Alfresco (Community) http://10.96.10.101:8080/alfresco/images/logo/AlfrescoLogo16.ico http://www.alfresco.org/rss/atom/urn:uuid:changes <title>Change Log Entries</title> 2013-03-30T12:28:39.202+01:00 cmisra:numItems3/cmisra:numItems admin urn:uuid:436e40d5-3b1b-47d5-adfb-1c54c009e11b <title>Change Log Entry</title> 2013-01-21T16:38:11.017+01:00 cmisra:object cmis:properties cmis:valueworkspace://SpacesStore/436e40d5-3b1b-47d5-adfb-1c54c009e11b/cmis:value/cmis:propertyId /cmis:properties cmis:changeEventInfo cmis:changeTypesecurity/cmis:changeType cmis:changeTime2013-01-21T16:38:11.017+01:00/cmis:changeTime /cmis:changeEventInfo /cmisra:object admin urn:uuid:294c8736-eee0-4d11-957e-b6c9634715eb <title>Change Log Entry</title> 2013-01-21T16:39:46.904+01:00 cmisra:object cmis:properties cmis:valueworkspace://SpacesStore/294c8736-eee0-4d11-957e-b6c9634715eb/cmis:value/cmis:propertyId /cmis:properties cmis:changeEventInfo cmis:changeTypecreated/cmis:changeType cmis:changeTime2013-01-21T16:39:46.904+01:00/cmis:changeTime /cmis:changeEventInfo /cmisra:object admin urn:uuid:294c8736-eee0-4d11-957e-b6c9634715eb <title>Change Log Entry</title> 2013-01-21T16:39:46.959+01:00 cmisra:object cmis:properties cmis:valueworkspace://SpacesStore/294c8736-eee0-4d11-957e-b6c9634715eb/cmis:value/cmis:propertyId /cmis:properties cmis:changeEventInfo cmis:changeTypeupdated/cmis:changeType cmis:changeTime2013-01-21T16:39:46.959+01:00/cmis:changeTime /cmis:changeEventInfo /cmisra:object ######

Duplcate namespace

I have the following error when using cmis_4_redmine_2 with Alfresco 4.2 :

Error 500 Duplicate declaration for namespace prefix 'c'.

Following is the xml sent to the server :

<at:entry xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/"
xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/"
xmlns:cm="http://docs.oasis-open.org/ns/cmis/messaging/200908/"
xmlns:app="http://www.w3.org/2007/app"
xmlns:at="http://www.w3.org/2005/Atom"
xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/"
xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/"
xmlns:cm="http://docs.oasis-open.org/ns/cmis/messaging/200908/"
xmlns:app="http://www.w3.org/2007/app"
xmlns:at="http://www.w3.org/2005/Atom">
at:author
at:nameadmin/at:name
/at:author
at:titlemanuels/at:title
at:idrandom-garbage/at:id
cmisra:object
cmis:properties
<cmis:propertyId propertyDefinitionId="cmis:objectTypeId">
cmis:valuecmis:folder/cmis:value
/cmis:propertyId
<cmis:propertyString propertyDefinitionId="cmis:name">
cmis:valuemanuels/cmis:value
/cmis:propertyString
/cmis:properties
/cmisra:object
/at:entry

Unable to checkin a document with Alfresco 4.2c

Following my attempts to update a document (which doesn't work with Nuxeo, so I tried with Alfresco).

Here's my code :

pwc = doc.checkout
pwc.set_content_stream(:data=>contentStream, :overwrite => true)
pwc.checkin(false, "new version from redmine")

Unfortunately, this time I've a bug with the checkin function :

TypeError (can't convert String into Integer):
active_cmis (0.3.2) lib/active_cmis/object.rb:353:in []' active_cmis (0.3.2) lib/active_cmis/object.rb:353:inblock (2 levels) in render_atom_entry'
nokogiri-1.5.9-x86 (mingw32) lib/nokogiri/xml/builder.rb:391:in call' nokogiri-1.5.9-x86 (mingw32) lib/nokogiri/xml/builder.rb:391:ininsert'
nokogiri-1.5.9-x86 (mingw32) lib/nokogiri/xml/builder.rb:375:in method_missing' active_cmis (0.3.2) lib/active_cmis/object.rb:348:inblock in render_atom_entry'
nokogiri-1.5.9-x86 (mingw32) lib/nokogiri/xml/builder.rb:293:in initialize' active_cmis (0.3.2) lib/active_cmis/object.rb:347:innew'
active_cmis (0.3.2) lib/active_cmis/object.rb:347:in render_atom_entry' active_cmis (0.3.2) lib/active_cmis/document.rb:211:inrender_atom_entry'
active_cmis (0.3.2) lib/active_cmis/object.rb:437:in save_attributes' active_cmis (0.3.2) lib/active_cmis/document.rb:193:inblock in checkin'
active_cmis (0.3.2) lib/active_cmis/document.rb:192:in each' active_cmis (0.3.2) lib/active_cmis/document.rb:192:incheckin'
plugins/redmine_cmis/lib/cmis_module.rb:76:in `update_document_relative'

You can find cmis_module.rb there : https://github.com/BrunoSpy/cmis_4_redmine_2/blob/master/lib/cmis_module.rb

Object#update method fails due to no header

Update method failed with any attributes and values.
Debugging into the server which is implemented on OpenCMIS, I found AtomEntryParser recognize the atompub request body has only one line and failed to parse it.

set_versioning_state not working on update

We are implementing document replacement in our application and wanted to use versioning and no matter the value we pass to the set_versioning_state method, always a minor version is created.

When I'm checking the Alfresco log file, I see that the PUT call is missing the versioningState argument.

I will fix it soon and send a PR.

Error when using both ActiveCMIS and HTTParty gems

I am using the HTTParty gem and as soon as I add require 'active_cmis' the HTTParty get method fails with ``handle_deflation': undefined method[]' for nil:NilClass. This is in a Rails project but I have confirmed it also occurs in a one file Ruby project.

require 'rubygems'
require 'httparty'
require 'active_cmis'

class Ting
  include HTTParty
end

Ting.get('http://teamcoding.com')

Both ActiveCMIS and HTTParty use the Net::HTTP, but I couldn't find anywhere where it is monkey patched in either.

undefined method `authentcation_info when connecting

Disclaimer: I may be doing this wrong.

load_config works fine but I don't wish to use a yaml file.

server = ActiveCMIS::Server.new('http://localhost:8082/alfresco/service/cmis')
server = server.authenticate(:basic, 'admin', 'admin)
repo = server.repository('SOME NODE ID')
# => undefined method `authentcation_info' for Server http://localhost:8082/alfresco/service/cmis:ActiveCMIS::Server

The work around is to pass nil as a second parameter to server.repository.

I can see there is a mispelling of authentication here but correcting it did not help.

Ruby 1.9.3 connecting Alfresco 4.0 Repository

Hey :-)

thanks for gem! i start using it and found it very helpful.

I have an error by using ruby-1.9.3. The error do not occur if i switch to ruby-1.8.7

require 'pp'
require 'rubygems'
require 'active_cmis'

alfresco = ActiveCMIS.load_config('alfresco_public')

store = alfresco.object_by_id('workspace://SpacesStore/aab0c41f-e021-4427-842d-7ae010662a53')

puts "store found"

store.items.each do |item|
  if item.cmis.objectTypeId == "cmis:document"
    puts "is doc #{item.name}"
    item.content_stream.get_file('test_file')                  # content_stream is nil.....
  else
    puts "is directory #{item.name}"
  end
end

ruby-1.9.3 error, 1.8.7 no problems, occur on

store found
is doc testdoc.txt
/Users/cbaus/.rvm/gems/ruby-1.9.3-p194/gems/active_cmis-0.3.1/lib/active_cmis/internal/connection.rb:58:in `get_response': undefined method `code' for nil:NilClass (NoMethodError)
    from /Users/cbaus/.rvm/gems/ruby-1.9.3-p194/gems/active_cmis-0.3.1/lib/active_cmis/rendition.rb:62:in `get_data'
    from /Users/cbaus/.rvm/gems/ruby-1.9.3-p194/gems/active_cmis-0.3.1/lib/active_cmis/rendition.rb:48:in `get_file'
    from cmis_test_cli.rb:15:in `block in <main>'
    from /Users/cbaus/.rvm/gems/ruby-1.9.3-p194/gems/active_cmis-0.3.1/lib/active_cmis/collection.rb:100:in `block in each'
    from /Users/cbaus/.rvm/gems/ruby-1.9.3-p194/gems/active_cmis-0.3.1/lib/active_cmis/collection.rb:100:in `times'
    from /Users/cbaus/.rvm/gems/ruby-1.9.3-p194/gems/active_cmis-0.3.1/lib/active_cmis/collection.rb:100:in `each'
    from cmis_test_cli.rb:12:in `<main>'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.