Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Active Sharepoint

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 examples
Octocat-spinner-32 lib
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile
Octocat-spinner-32 VERSION
Octocat-spinner-32 activesp.gemspec
README.rdoc

ActiveSP Release 0.0.3 “Under Pressure” (Aug 27th 2010)

What?

ActiveSP is a library for talking to SharePoint through its web services in an object-oriented way.

At the moment it only provides read-only access and write access to list items. Full write access is on the way!

Why?

Because Ruby is great and SharePoint's popularity is a fact of life.

When?

This library is pure Ruby and does not need a Ruby VM running on .NET (such as IronRuby). Use this library when using IronRuby is not an option, or when it needs to run on more than IronRuby.

The web services are not fully functional and somewhat slow, so if you can use the .NET platform then consider talking to the .NET API's directly instead.

How?

Install the gem and its dependencies:

gem install activesp

Create a file test.rb like this:

require 'rubygems'
require 'activesp'

def browse(item, indentation = 0)
  puts "  " * indentation + "- " + item.class.to_s + " : " + item.url
  case item
  when ActiveSP::Site
    puts "  " * indentation + "    Title = #{item.Title}, Description = #{item.Description}"
    item.sites.each { |site| browse(site, indentation + 1) }
    item.lists.each { |list| browse(list, indentation + 1) }
  when ActiveSP::List
    puts "  " * indentation + "    Description = #{item.Description}, Hidden = #{item.Hidden}"
    item.items.each { |item| browse(item, indentation + 1) }
  when ActiveSP::Folder
    item.items.each { |item| browse(item, indentation + 1) }
  when ActiveSP::Item
    item.content_urls.each do |url|
      puts "  " * indentation + "    Content URL = #{url}"
    end
  end
end

c = ActiveSP::Connection.new(:login => "your login", :password => "your password", :root => "URL of root site")

browse(c.root)

Run ruby test.rb and it will print the structure of your SharePoint site.

The examples directory contains this example plus a few others. We will add more along the way.

Support

We support read access to sites (webs), lists, items, documents, folders, content type, columns (fields), content, users, groups, roles.

We support write access to list items (including documents): create, update and delete list items.

We do not yet support life cycles, versions, full write support.

Compatibility

We have tested ActiveSP with SharePoint 2007 and SharePoint 2010. ActiveSP has been tested on Mac OS X with Ruby 1.8.6, but we do not see any reason why it would not work on Linux or Windows, or with other Ruby implementations.

For release 0.0.3, we have not tested extensively on SharePoint 2007 so we can't guarantee compatibility.

Changelog

ActiveSP Release 0.0.3 “Under Pressure” (Aug 27th 2010)

  • Added write support for list items (including documents): create, update, delete

  • Use association proxies for list items and item attachments

  • Decode field names (e.g., File_x0020_Type becomes File Type)

  • A few bug fixes

  • Added method to ask for list changes since token

ActiveSP Release 0.0.1 “Space Oddity” (Apr 9th 2010)

  • Initial release

License

ActiveSP is released under the MIT license. The usual disclaimers apply, including that we are not responsible for inevitable Ruby addiction.

See the LICENSE file included in the distribution for further details.

Who?

ActiveSP is copyright © 2010 XAOP bvba

Visit us at www.xaop.com.

Something went wrong with that request. Please try again.