Sha256: 68f13a0288ccfd3e68a3494b8f4f7141dfeb883710d551472e0c7d31a2145279

Contents?: true

Size: 1.28 KB

Versions: 13

Compression:

Stored size: 1.28 KB

Contents

# Ldp.rb

[![Build Status](https://travis-ci.org/cbeer/ldp.png?branch=master)](https://travis-ci.org/cbeer/ldp)

Linked Data Platform client library for Ruby

## Installation

Add this line to your application's Gemfile:

    gem 'ldp'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install ldp

## Usage

```ruby
host = 'http://localhost:8080'
client = Ldp::Client.new(host)
resource = Ldp::Resource.new(client, host + '/rest/node/to/update')
orm = Ldp::Orm.new(resource)

# view the current title(s)
orm.orm.value(RDF::DC11.title)

# update the title
orm.graph.delete([orm.resource.subject_uri, RDF::DC11.title, nil])
orm.graph.insert([orm.resource.subject_uri, RDF::DC11.title, 'a new title'])

# save changes
orm.save
```

### Fedora Commons notes
Due to some discrepancies with alpha version of Fedora Commons, you may need to do some things differently:
* [Can't load resources from Fedora 4](https://github.com/cbeer/ldp/issues/1)
* [orm.save with an rdf:type doesn't work with Fedora 4.0.0-alpha-3](https://github.com/cbeer/ldp/issues/2)

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ldp-0.2.2 README.md
ldp-0.2.1 README.md
ldp-0.2.0 README.md
ldp-0.1.0 README.md
ldp-0.0.10 README.md
ldp-0.0.9 README.md
ldp-0.0.8 README.md
ldp-0.0.7 README.md
ldp-0.0.6 README.md
ldp-0.0.5 README.md
ldp-0.0.4 README.md
ldp-0.0.3 README.md
ldp-0.0.2 README.md