Giter Club home page Giter Club logo

rubydora's People

Contributors

atz avatar barmintor avatar bess avatar bkeese avatar botimer avatar carolyncole avatar cbeer avatar cjcolvar avatar dbrower avatar dchandekstark avatar elohanlon avatar jcoyne avatar jeremyf avatar jrgriffiniii avatar kelynch avatar mark-dce avatar mbklein avatar mjgiarlo avatar tpendragon avatar val99erie 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

Watchers

 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  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

rubydora's Issues

Object state not being stored for new objects

I'm trying to create a new object in fedora that has an object state of "I", but whenever I create a new object, the state always gets stored as "A". (The state is correctly "I" in memory, but if I examine the object in the fedora console or reload the object, the state will be "A".)

If you save the object a second time, it will have the correct state after that. The state just doesn't seem to stick the very first time you save it.

I wrote a failing spec to demonstrate the problem. (You should be able to paste this test into spec/lib/integration_test_spec.rb to get it to work.)

  it "should store object state" do
    pid = 'pid:1'
    @repository.find(pid).delete rescue nil 

    obj = Rubydora::DigitalObject.new(pid, @repository, { state: 'I' })
    obj.save
    expect(obj.state).to eq 'I' 

    profile = @repository.object_profile(pid)
    expect(profile['objState']).to eq 'I' 

    stored_obj = @repository.find(pid)
    expect(stored_obj.state).to eq 'I' 
  end

Versions for required gems?

Could you specify versions in your gemspec dependencies to prevent any issues in the future if a gem updates? It looks nice on rubygems.org and it will prevent old gems residing on a user's system or new updates breaking Rubydora if they change a function you are relying on.

Catch 500 errors on ingest

When calling RestApiClient#ingest we get an error: "500 Internal Server Error"

debugging indicates the server is giving this message:
The PID 'hydrangea:fixture_mods_article1' already exists in the registry; the object can't be re-created.

But it just raises a 500 exception up to the application level. We can probably throw something more helpful.

Rubydora::Datastream and false-ish attributes.

There is a bug on line 248 of Rubydora::Datastream

in to_api_params(), this will never allow you to set something that is false:

   h[attribute] = send(attribute) if send(attribute)

Chris Beer, do you think we can change this line to:

   h[attribute] = send(attribute) unless send(attribute).nil?

-Justin

add 'loggable' to Gemfile

For those interested in using rubydora outside of Hydra, adding the loggable gem to your Gemfile would permit quick installation and use of rubydora.

rubydora depends on mime-types >= 0

I'm preparing mime-types 2.0 for release, and it has some breaking API changes (not for most uses, but some esoteric features). The most important API change is that mime-types 2.0 no longer supports Ruby 1.8.

If this matters, the gemspec needs to be changed from >= 0 to ~> 1.16.

This was originally reported to samvera/active_fedora#251.

#search() session expiration

When doing a long running search (e.g. over the whole repository) it's possible to encounter a Rubydora::FedoraInvalidRequest:

/Users/justin/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rubydora-1.7.4/lib/rubydora/rest_api_client.rb:26:in `block (2 levels) in <module:RestApiClient>': See logger for details (Rubydora::FedoraInvalidRequest)
    from /Users/justin/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/activesupport-4.1.1/lib/active_support/rescuable.rb:114:in `instance_exec'
    from /Users/justin/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/activesupport-4.1.1/lib/active_support/rescuable.rb:114:in `block in handler_for_rescue'
    from /Users/justin/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/activesupport-4.1.1/lib/active_support/rescuable.rb:80:in `call'
    from /Users/justin/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/activesupport-4.1.1/lib/active_support/rescuable.rb:80:in `rescue_with_handler'
    from /Users/justin/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rubydora-1.7.4/lib/rubydora/rest_api_client.rb:97:in `rescue in find_objects'
    from /Users/justin/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rubydora-1.7.4/lib/rubydora/rest_api_client.rb:87:in `find_objects'
    from /Users/justin/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rubydora-1.7.4/lib/rubydora/repository.rb:19:in `find_objects'
    from /Users/justin/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rubydora-1.7.4/lib/rubydora/repository.rb:64:in `search'

Due to:

javax.ws.rs.WebApplicationException: org.fcrepo.server.errors.UnknownSessionTokenException: Session is expired or never existed.
    at org.fcrepo.server.rest.BaseRestResource.handleException(BaseRestResource.java:168)
    at org.fcrepo.server.rest.FedoraObjectSearchResource.searchObjects(FedoraObjectSearchResource.java:89)
    at sun.reflect.GeneratedMethodAccessor65.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:175)
    at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:67)
    at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:163)
    at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:71)
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:111)
    at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:63)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:689)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:647)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:638)
    at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:309)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:425)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:590)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.fcrepo.server.security.servletfilters.FilterRestApiFlash.doFilter(FilterRestApiFlash.java:79)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.fcrepo.server.security.servletfilters.FilterSetup.doFilter(FilterSetup.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.fcrepo.server.security.servletfilters.FilterSetup.doFilter(FilterSetup.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.fcrepo.server.security.servletfilters.FilterSetup.doFilter(FilterSetup.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.fcrepo.server.security.servletfilters.FilterSetup.doFilter(FilterSetup.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:567)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
    at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:574)
    at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527)
    at java.lang.Thread.run(Thread.java:619)
Caused by: org.fcrepo.server.errors.UnknownSessionTokenException: Session is expired or never existed.
    at org.fcrepo.server.search.FieldSearchSQLImpl.resumeFindObjects(FieldSearchSQLImpl.java:342)
    at org.fcrepo.server.search.FieldSearchSQLModule.resumeFindObjects(FieldSearchSQLModule.java:167)
    at org.fcrepo.server.storage.DefaultDOManager.resumeFindObjects(DefaultDOManager.java:1799)
    at org.fcrepo.server.access.DefaultAccess.resumeFindObjects(DefaultAccess.java:729)
    at org.fcrepo.server.rest.FedoraObjectSearchResource.searchObjects(FedoraObjectSearchResource.java:69)

Rubydora::Datastream#versionable acts like a string, not a real boolean

The versionable property of Rubydora::Datastream provides/requires "true" or "false" as a string instead of accepting a real Ruby true or false

1.8.7 :015 > obj = Dor::Item.load_instance 'druid:zm445fy5276'
 => #<Dor::Item:2256640760 @pid="druid:zm445fy5276" > 
1.8.7 :016 > ev = obj.datastreams['events']
 => #<EventsDS:2255891560 @pid="druid:zm445fy5276" @dsid="events" @controlGroup="X" @dirty="false" @mimeType="text/xml" > 
1.8.7 :017 > ev.versionable
 => "true" 
1.8.7 :018 > ev.send(:to_api_params)
 => {:mimeType=>"text/xml"} 
1.8.7 :019 > ev.versionable = false
 => false 
1.8.7 :020 > ev.versionable
 => "true" 
1.8.7 :021 > ev.send(:to_api_params)
 => {:versionable=>"true", :mimeType=>"text/xml"} 
1.8.7 :022 > ev.versionable = 'false'
 => "false" 
1.8.7 :023 > ev.versionable
 => "false" 
1.8.7 :024 > ev.send(:to_api_params)
 => {:versionable=>"false", :mimeType=>"text/xml"} 
1.8.7 :025 > 

RestApiClient.client ignores parameters after the first call

From rest_api_client.rb:

def client config = {}
  config = self.config.merge(config)
  @client ||= RestClient::Resource.new(config[:url], :user => config[:user], :password => config[:password], :timeout => config[:timeout], :open_timeout => config[:timeout])
end

The use of @client ||= means that any existing RestClient::Resource instance will take precedence, causing the passed-in config to be ignored. While I realize that it makes sense to create the client once per Repository object, and never change it, the fact that the client accessor takes parameters makes it look like it's possible to get more than one flavor of client without re-creating the parent object anew.

I discovered this while adding SSL client certificate support -- my code worked fine, but my tests initially failed because I tried to call client twice, with different config parameters (one with and one without the client cert), on the same Repository object.

I'm going to assume that this is the desired behavior, add a note to the documentation that config only matters the first time the method is called, and work around it. It's tempting (but wrong -- see next sentence) to re-create the client if new options are passed in. But that would prevent initializing the client with a particular set of options and then accessing it as a simple attribute, which probably is the desired behavior.

No action on this issue is necessary; I just wanted to bring it up in case you had something different in mind.

Rack::Test is an unspecified runtime dependency

The Rubydora::Datastream#behaves_like_io? method references the Rack::Test::UploadedFile class

def behaves_like_io?(obj)
      obj.is_a?(IO) || (defined?(Rack) && obj.is_a?(Rack::Test::UploadedFile))
end

https://github.com/projecthydra/rubydora/blob/master/lib/rubydora/datastream.rb#L405

However, the gemspec does not declare rack-test as a runtime dependency. I was using rubydora/active-fedora in a Sinatra webservice when I kept getting the error

NameError: uninitialized constant Rack::Test

because this dependency was missing

Assigning large files as datastream content fails

Large files (for some definition of large??) can't be read into Ruby, so they can't be added as object datastreams:

/Users/chris_beer/.rvm/gems/ruby-1.9.3-p0@hydradam/gems/rubydora-0.5.7/lib/rubydora/datastream.rb:121:in `read': Invalid argument - HDS/barcode334930_1.mov (Errno::EINVAL)
    from /Users/chris_beer/.rvm/gems/ruby-1.9.3-p0@hydradam/gems/rubydora-0.5.7/lib/rubydora/datastream.rb:121:in `content'
    from /Users/chris_beer/.rvm/gems/ruby-1.9.3-p0@hydradam/gems/activemodel-3.2.2/lib/active_model/dirty.rb:143:in `attribute_change'
    from /Users/chris_beer/.rvm/gems/ruby-1.9.3-p0@hydradam/gems/activemodel-3.2.2/lib/active_model/dirty.rb:117:in `block in changes'
    from /Users/chris_beer/.rvm/gems/ruby-1.9.3-p0@hydradam/gems/activemodel-3.2.2/lib/active_model/dirty.rb:117:in `map'
    from /Users/chris_beer/.rvm/gems/ruby-1.9.3-p0@hydradam/gems/activemodel-3.2.2/lib/active_model/dirty.rb:117:in `changes'
    from /Users/chris_beer/.rvm/gems/ruby-1.9.3-p0@hydradam/gems/rubydora-0.5.7/lib/rubydora/datastream.rb:245:in `to_api_params'
    from /Users/chris_beer/.rvm/gems/ruby-1.9.3-p0@hydradam/gems/rubydora-0.5.7/lib/rubydora/datastream.rb:210:in `block in create'
    from /Users/chris_beer/.rvm/gems/ruby-1.9.3-p0@hydradam/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:403:in `_run__3645590890494944274__create__594327490570200131__callbacks'
    from /Users/chris_beer/.rvm/gems/ruby-1.9.3-p0@hydradam/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:405:in `__run_callback'
    from /Users/chris_beer/.rvm/gems/ruby-1.9.3-p0@hydradam/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:385:in `_run_create_callbacks'
    from /Users/chris_beer/.rvm/gems/ruby-1.9.3-p0@hydradam/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:81:in `run_callbacks'
    from /Users/chris_beer/.rvm/gems/ruby-1.9.3-p0@hydradam/gems/rubydora-0.5.7/lib/rubydora/datastream.rb:209:in `create'
    from /Users/chris_beer/.rvm/gems/ruby-1.9.3-p0@hydradam/gems/rubydora-0.5.7/lib/rubydora/datastream.rb:221:in `block in save'
    from /Users/chris_beer/.rvm/gems/ruby-1.9.3-p0@hydradam/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:403:in `_run__3645590890494944274__save__594327490570200131__callbacks'
    from /Users/chris_beer/.rvm/gems/ruby-1.9.3-p0@hydradam/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:405:in `__run_callback'
    from /Users/chris_beer/.rvm/gems/ruby-1.9.3-p0@hydradam/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:385:in `_run_save_callbacks'
    from /Users/chris_beer/.rvm/gems/ruby-1.9.3-p0@hydradam/gems/activesupport-3.2.2/lib/active_support/callbacks.rb:81:in `run_callbacks'
    from /Users/chris_beer/.rvm/gems/ruby-1.9.3-p0@hydradam/gems/rubydora-0.5.7/lib/rubydora/datastream.rb:220:in `save'

See also:

1.9.3p0 :009 > f = open('HDS/barcode334930_1.mov')
 => #<File:HDS/barcode334930_1.mov> 
1.9.3p0 :010 > f.size
 => 3799020967 
1.9.3p0 :011 > f.read; 1
Errno::EINVAL: Invalid argument - HDS/barcode334930_1.mov
    from (irb):11:in `read'
    from (irb):11
    from /Users/chris_beer/.rvm/rubies/ruby-1.9.3-p0/bin/irb:16:in `<main>'

=== vs ====

1.9.3p0 :013 > f = open('/Users/chris_beer/Desktop/tmp')
 => #<File:/Users/chris_beer/Desktop/tmp> 
1.9.3p0 :014 > f.size
 => 3261 
1.9.3p0 :015 > f.read
 => "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<xsl:stylesheet xmlns=\"http://www.pbcore.org/PBCore/PBCoreNamespace.html\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" version=\"1.0\">\n    <xsl:output indent=\"yes\"/>\n    <xsl:strip-space elements=\"*\"/>\n    <xsl:template match=\"//ROW\">\n        <pbcoreDescriptionDocument xmlns=\"http://www.pbcore.org/PBCore/PBCoreNamespace.html\" schemaVersion=\"2.0\">\n            <pbcoreIdentifier>\n                <xsl:attribute name=\"source\">MARS Program Record ID</xsl:attribute>\n                <xsl:value-of select=\"ID_PROGRAM/text()\" />              \n            </pbcoreIdentifier>\n            <xsl:apply-templates select=\"*[normalize-space()]\"></xsl:apply-templates>\n        </pbcoreDescriptionDocument>\n    </xsl:template>\n                  \n    <xsl:template match=\"TITLE_SERIES\">\n        <pbcoreTitle>\n            <xsl:attribute name=\"titleType\">Series</xsl:attribute>\n            <xsl:value-of select=\"text()\" />\n        </pbcoreTitle>\n    </xsl:template>    \n\n    <xsl:template match=\"TITLE_PROGRAM\">\n      <pbcoreTitle>\n        <xsl:attribute name=\"titleType\">Program</xsl:attribute>\n        <xsl:value-of select=\"text()\" />\n      </pbcoreTitle>\n    </xsl:template>\n\n    <xsl:template match=\"DATE_RELEASE\">\n        <pbcoreAssetDate>\n            <xsl:attribute name=\"dateType\">broadcast</xsl:attribute>\n            <xsl:value-of select=\"text()\" />\n        </pbcoreAssetDate>\n    </xsl:template>\n\n    <xsl:template match=\"COVERAGE_DATE_PORTRAYED\">\n        <pbcoreCoverage>\n            <coverage>\n            <xsl:value-of select=\"text()\" />\n            </coverage>\n            <coverageType>temporal</coverageType>\n        </pbcoreCoverage>\n    </xsl:template>\n\n    \n    <xsl:template match=\"RIGHTS_SUMMARY\">\n        <pbcoreRightsSummary>\n            <rightsSummary>\n                <xsl:attribute name=\"annotation\">rights summary</xsl:attribute>\n                <xsl:attribute name=\"source\">WGBH MARS</xsl:attribute>\n                <xsl:value-of select=\"text()\"/>\n            </rightsSummary>\n        </pbcoreRightsSummary>\n    </xsl:template>\n\n    <xsl:template match=\"ID_NOLA\">\n        <pbcoreIdentifier>\n            <xsl:attribute name=\"source\">NOLA Code</xsl:attribute>\n            <xsl:value-of select=\"text()\" />\n        </pbcoreIdentifier>\n    </xsl:template>\n    \n    <xsl:template match=\"SOURCE_PROGRAM_NUMBER\">\n        <pbcoreTitle> \n            <xsl:attribute name=\"titleType\">Episode</xsl:attribute>\n            <xsl:value-of select=\"text()\"/>\n        </pbcoreTitle>\n    </xsl:template>\n                   \n    <xsl:template match=\"DESCRIPTION_PROGRAM\">\n        <pbcoreDescription>\n            <xsl:attribute name=\"descriptionType\">Program</xsl:attribute>\n            <xsl:attribute name=\"descriptionTypeRef\">http://metadataregistry.org/concept/show/id/1702.html</xsl:attribute>\n            <xsl:value-of select=\"text()\" />\n        </pbcoreDescription>\n    </xsl:template>\n    \n    <xsl:template match=\"Producer\">\n        <pbcoreCreator>\n            <creator><xsl:value-of select=\"text()\"/></creator>\n            <creatorRole ref=\"http://metadataregistry.org/concept/show/id/1425.html\">Producer</creatorRole>\n        </pbcoreCreator>\n    </xsl:template>\n    \n    <xsl:template match=\"text()\" />\n</xsl:stylesheet>" 

Can't get relationships from existing object

Not sure if I'm doing something wrong, but:

>  obj.class
=> Rubydora::DigitalObject
>  obj.relationships
=> {}
>  obj.datastreams["RELS-EXT"].content
=> \n<rdf:RDF xmlns:ns0=\"info:fedora/fedora-system:def/relations-external#\" xmlns:ns1=\"info:fedora/fedora-system:def/model#\" xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n  <rdf:Description rdf:about=\"info:fedora/sufia:rb68xc11m\">\n    <ns1:hasModel rdf:resource=\"info:fedora/afmodel:GenericFile\"></ns1:hasModel>\n    <ns0:isPartOf rdf:resource=\"info:fedora/sufia:rb68xc09k\"></ns0:isPartOf>\n  </rdf:Description>\n</rdf:RDF>\n"

There's an isPartOf in the content of the datastream and I thought calling .relationships would parse that out for me.

Modifying relationships fails on Fedora 3.6 - 3.6.2 due to URL-encoding PIDs

I've filed this bug with the Fedora team as 1187 ( https://jira.duraspace.org/browse/FCREPO-1187 ).

When Fedora switched to using Apache CXF to drive their REST installation an error in one of their regular expressions causes the add_relationship and purge_relationship calls to fail with a 404 error. I've forked Rubydora ( https://github.com/swieton/rubydora ) with a fix to the escaping of colons in order to work around this bug in Fedora 3.6.

The problem is that paths like /objects/foo:123/relationships/new work, but Rubydora is (correctly) encoding it as /objects/foo%3A123/relationships/new which does not work currently.

I'm not sure if there's anything to be done in Rubydora to resolve this (since it is a bug) but if you've seen these 404 errors, this is the cause.

Thanks!
Mike

is test coverage sufficient?

A requirement for being in the Samvera organization is: Good unit test coverage measured by community (e.g. 100% or 75% of what’s important)

As this hasn't been defined, we in the Core Component Maintenance Working Group would like to ask the product owner if you or any developers who work on this project know if they feel like the coverage is sufficient on this project to be confident in continuing work on it? If not, we encourage you to create an issue to increase test coverage and add the maintenance label. If so, please close this issue.

Thanks!

Bug in Datastream#entity_size

The reference to response.headers[:content_length] is incorrect and raises a NoMethodError. The method should probably just be:

def entity_size(response)
  response.content_length || response.body.size
end

This issue is filed for reference, not expecting a patch.

Upgrade to rest-client >= 1.7.1 slows writes to Fedora by over 30%

N.B. Unfortunately I don't have an answer yet to this issue and cannot make a pull rquest but felt to add it should others experience the same problem. When a solution is authored, either in this gem or rest-client, I'll be sure to link to this issue

I recently ran bundle update on my application and among the various gems that updated was rest-client, which upgraded from 1.6.8 to 1.7.1 and was released three days ago. rest-client is a dependency of rubydora whose .gemspec file does not put a limitation on the version of rest-client. I noticed a significant performance decrease when running my specs and successfully isolated the cause to rest-client.

Below is my git diff on Gemfile.lock and some time trials to prove problem. I even tried creating objects both with and without updates to Solr to ensure that the problem was with the write speed to Fedora. I create 10 AcquisitionProject objects (an ActiveFedora object) using FactoryGirl in four circumstances and use Ruby#Benchmark to give time results.

[10:25:15 curley@server:/opt/apps/andrew/ike] $ git diff Gemfile.lock
diff --git a/Gemfile.lock b/Gemfile.lock
index cda372b..c696b6a 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -220,6 +220,7 @@ GEM
     multi_json (1.10.1)
     net-http-persistent (1.9)
     net-ldap (0.5.1)
+    netrc (0.7.7)
     nokogiri (1.6.2.1)
       mini_portile (= 0.6.0)
     nom-xml (0.5.1)
@@ -309,12 +310,10 @@ GEM
       rdf (~> 1.1, >= 1.1.4)
     rdf-xsd (1.1.1)
       rdf (~> 1.1)
-    rdoc (4.1.1)
-      json (~> 1.4)
     ref (1.0.5)
-    rest-client (1.6.8)
-      mime-types (~> 1.16)
-      rdoc (>= 2.4.2)
+    rest-client (1.7.1)
+      mime-types (>= 1.16, < 3.0)
+      netrc (~> 0.7)
     rolify (3.4.0)
     rsolr (1.0.10)
       builder (>= 2.1.2)

Under rest-client 1.6.8

irb(main):001:0> ENABLE_SOLR_UPDATES=false
=> false
irb(main):002:0> Benchmark.realtime { 10.times { FactoryGirl.create(:base_acquisition_project) }}
=> 3.20260709
irb(main):003:0> Benchmark.realtime { 10.times { FactoryGirl.create(:base_acquisition_project) }}
=> 2.818982106
irb(main):004:0> ENABLE_SOLR_UPDATES=true
=> true
irb(main):005:0> Benchmark.realtime { 10.times { FactoryGirl.create(:base_acquisition_project) }}
=> 2.905722773
irb(main):006:0> Benchmark.realtime { 10.times { FactoryGirl.create(:base_acquisition_project) }}
=> 2.967691368

Under rest-client 1.7.1

irb(main):006:0> ENABLE_SOLR_UPDATES=false
=> false
irb(main):007:0> Benchmark.realtime { 10.times { FactoryGirl.create(:base_acquisition_project) }}
=> 3.989939417
irb(main):008:0> Benchmark.realtime { 10.times { FactoryGirl.create(:base_acquisition_project) }}
=> 3.729743344
irb(main):009:0> ENABLE_SOLR_UPDATES=true
=> true
irb(main):010:0> Benchmark.realtime { 10.times { FactoryGirl.create(:base_acquisition_project) }}
=> 3.913787696
irb(main):012:0> Benchmark.realtime { 10.times { FactoryGirl.create(:base_acquisition_project) }}
=> 3.761060276

I can find nothing on the rest-client issue tracker about others experiencing the same kind of slowness so perhaps the problem is somewhere in rubydora and it's use of the RestClient class.

Travis build fails on Java errors

Local tests pass, but Travis croaks now. It croaked on my first revision that only touched README, so I re-ran the last build from a year ago… also fails:
https://travis-ci.org/projecthydra/rubydora/builds/40822458

Java error:

java.lang.UnsupportedClassVersionError: org/eclipse/jetty/servlet/listener/ELContextCleaner : Unsupported major.minor version 52.0

So this is probably a hydra-jetty problem or something we have to tweak for JVM in Travis.

Persistent HTTP connections

As far as I can tell, the rubydora client is not sending Keep-Alive headers for its connections. This causes a lot of connection-setup overhead in our use case where we load lots of datastreams for the same object in succession.

Switching to Faraday and Net::HTTP::Persistent adapter should fix this -- I'm not sure RestClient supports keep-alive.

Broken pipe during add_datastream operation

We have a batch ingest process that is periodically blowing up while trying to ingest a batch of 8600+ TIFF image files. It will run for a few hours (3 or 4), ingest a few hundred files, and then blow up with a EPIPE: Broken pipe error. Stack trace is shown below. We can restart the batch … it will run for a few more hours, ingest another few hundred files (including the one it blew up on originally), and then hit the same error.

Broken pipe
/home/hydra/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/protocol.rb:199:in write' /home/hydra/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/protocol.rb:199:inwrite0'
/home/hydra/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/protocol.rb:173:in block in write' /home/hydra/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/protocol.rb:190:inwriting'
/home/hydra/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/protocol.rb:172:in write' /home/hydra/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/http.rb:1937:insend_request_with_body'
/home/hydra/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/http.rb:1919:in exec' /home/hydra/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/http.rb:1317:inblock in transport_request'
/home/hydra/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/http.rb:1316:in catch' /home/hydra/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/http.rb:1316:intransport_request'
/home/hydra/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/http.rb:1293:in request' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/rest-client-1.6.7/lib/restclient/net_http_ext.rb:51:inrequest'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/rest-client-1.6.7/lib/restclient/request.rb:176:in block in transmit' /home/hydra/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/net/http.rb:745:instart'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in transmit' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/rest-client-1.6.7/lib/restclient/request.rb:64:inexecute'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in execute' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/rest-client-1.6.7/lib/restclient/resource.rb:67:inpost'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/rubydora-1.6.5/lib/rubydora/rest_api_client.rb:345:in add_datastream' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/rubydora-1.6.5/lib/rubydora/datastream.rb:332:inblock in create'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:403:in _run__1195949710219390078__create__3443605849955014630__callbacks' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:405:in__run_callback'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:385:in _run_create_callbacks' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:81:inrun_callbacks'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/rubydora-1.6.5/lib/rubydora/datastream.rb:331:in create' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/active-fedora-6.6.0/lib/active_fedora/datastream.rb:47:increate'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/rubydora-1.6.5/lib/rubydora/datastream.rb:344:in block in save' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:403:in_run__1195949710219390078__save__3443605849955014630__callbacks'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:405:in __run_callback' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:385:in_run_save_callbacks'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:81:in run_callbacks' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/rubydora-1.6.5/lib/rubydora/datastream.rb:342:insave'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/active-fedora-6.6.0/lib/active_fedora/datastream.rb:42:in save' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/rubydora-1.6.5/lib/rubydora/digital_object.rb:232:inblock in save'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/rubydora-1.6.5/lib/rubydora/digital_object.rb:232:in each' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/rubydora-1.6.5/lib/rubydora/digital_object.rb:232:insave'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/active-fedora-6.6.0/lib/active_fedora/persistence.rb:154:in persist' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/active-fedora-6.6.0/lib/active_fedora/callbacks.rb:238:inblock in persist'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:425:in _run__2496742884448623930__save__3443605849955014630__callbacks' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:405:in__run_callback'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:385:in _run_save_callbacks' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:81:inrun_callbacks'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/active-fedora-6.6.0/lib/active_fedora/callbacks.rb:238:in persist' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/active-fedora-6.6.0/lib/active_fedora/persistence.rb:145:inupdate_record'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/active-fedora-6.6.0/lib/active_fedora/callbacks.rb:246:in block in update_record' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:403:in_run__2496742884448623930__update__3443605849955014630__callbacks'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:405:in __run_callback' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:385:in_run_update_callbacks'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/activesupport-3.2.16/lib/active_support/callbacks.rb:81:in run_callbacks' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/active-fedora-6.6.0/lib/active_fedora/callbacks.rb:246:inupdate_record'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/active-fedora-6.6.0/lib/active_fedora/persistence.rb:14:in save' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/active-fedora-6.6.0/lib/active_fedora/validations.rb:50:insave'
/srv/hydra/dul-hydra/lib/dul_hydra/batch/models/batch_object.rb:209:in populate_datastream' /srv/hydra/dul-hydra/lib/dul_hydra/batch/models/ingest_batch_object.rb:70:inblock in create_repository_object'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/activerecord-3.2.16/lib/active_record/associations/collection_proxy.rb:91:in each' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/activerecord-3.2.16/lib/active_record/associations/collection_proxy.rb:91:inmethod_missing'
/srv/hydra/dul-hydra/lib/dul_hydra/batch/models/ingest_batch_object.rb:70:in create_repository_object' /srv/hydra/dul-hydra/lib/dul_hydra/batch/models/ingest_batch_object.rb:39:iningest'
/srv/hydra/dul-hydra/lib/dul_hydra/batch/models/ingest_batch_object.rb:23:in process' /srv/hydra/dul-hydra/lib/dul_hydra/batch/scripts/batch_processor.rb:93:inprocess_object'
/srv/hydra/dul-hydra/lib/dul_hydra/batch/scripts/batch_processor.rb:66:in block in process_batch' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/activerecord-3.2.16/lib/active_record/associations/collection_proxy.rb:91:ineach'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/activerecord-3.2.16/lib/active_record/associations/collection_proxy.rb:91:in method_missing' /srv/hydra/dul-hydra/lib/dul_hydra/batch/scripts/batch_processor.rb:66:inprocess_batch'
/srv/hydra/dul-hydra/lib/dul_hydra/batch/scripts/batch_processor.rb:41:in execute' /srv/hydra/dul-hydra/lib/dul_hydra/batch/jobs/batch_processor_job.rb:8:inperform'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/backend/base.rb:105:in block in invoke_job' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:60:incall'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:60:in block in initialize' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:65:incall'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:65:in execute' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:38:inrun_callbacks'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/backend/base.rb:102:in invoke_job' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/worker.rb:206:inblock (2 levels) in run'
/home/hydra/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/timeout.rb:68:in timeout' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/worker.rb:206:inblock in run'
/home/hydra/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/benchmark.rb:295:in realtime' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/worker.rb:205:inrun'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/worker.rb:267:in block in reserve_and_run_one_job' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:60:incall'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:60:in block in initialize' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:65:incall'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:65:in execute' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:38:inrun_callbacks'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/worker.rb:267:in reserve_and_run_one_job' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/worker.rb:189:inblock in work_off'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/worker.rb:188:in times' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/worker.rb:188:inwork_off'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/worker.rb:153:in block (4 levels) in start' /home/hydra/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/benchmark.rb:295:inrealtime'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/worker.rb:152:in block (3 levels) in start' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:60:incall'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:60:in block in initialize' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:65:incall'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:65:in execute' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:38:inrun_callbacks'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/worker.rb:151:in block (2 levels) in start' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/worker.rb:150:inloop'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/worker.rb:150:in block in start' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/plugins/clear_locks.rb:7:incall'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/plugins/clear_locks.rb:7:in block (2 levels) in <class:ClearLocks>' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:78:incall'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:78:in block (2 levels) in add' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:60:incall'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:60:in block in initialize' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:78:incall'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:78:in block in add' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:65:incall'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:65:in execute' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/lifecycle.rb:38:inrun_callbacks'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/worker.rb:149:in start' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/command.rb:104:inrun'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/command.rb:92:in block in run_process' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/daemons-1.1.9/lib/daemons/application.rb:255:incall'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/daemons-1.1.9/lib/daemons/application.rb:255:in block in start_proc' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/daemons-1.1.9/lib/daemons/daemonize.rb:82:incall'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/daemons-1.1.9/lib/daemons/daemonize.rb:82:in call_as_daemon' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/daemons-1.1.9/lib/daemons/application.rb:259:instart_proc'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/daemons-1.1.9/lib/daemons/application.rb:296:in start' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/daemons-1.1.9/lib/daemons/application_group.rb:159:inblock (2 levels) in start_all'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/daemons-1.1.9/lib/daemons/application_group.rb:158:in fork' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/daemons-1.1.9/lib/daemons/application_group.rb:158:inblock in start_all'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/daemons-1.1.9/lib/daemons/application_group.rb:157:in each' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/daemons-1.1.9/lib/daemons/application_group.rb:157:instart_all'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/daemons-1.1.9/lib/daemons/controller.rb:80:in run' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/daemons-1.1.9/lib/daemons.rb:197:inblock in run_proc'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/daemons-1.1.9/lib/daemons/cmdline.rb:109:in call' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/daemons-1.1.9/lib/daemons/cmdline.rb:109:incatch_exceptions'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/daemons-1.1.9/lib/daemons.rb:196:in run_proc' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/command.rb:90:inrun_process'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/command.rb:83:in block in daemonize' /home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/command.rb:81:intimes'
/home/hydra/.rvm/gems/ruby-1.9.3-p327@develop/gems/delayed_job-4.0.0/lib/delayed/command.rb:81:in daemonize' script/delayed_job:5:in

'

new? returns false, even though we haven't saved

new? is checking to see if the profile exists, but profile will return {} even if it's not found in fedora.

obj = DigitalObject.new
obj.new?
=> true
obj.profile['objLabel'] = "My val"
obj.new?
=> false

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.