From b0275e379d29cf32c250394e84e3476569737df8 Mon Sep 17 00:00:00 2001 From: Brandon Robins Date: Tue, 21 Nov 2017 01:05:46 -0600 Subject: [PATCH] Update README, gemspec, and bump version --- Gemfile.lock | 52 ++++++++---------------------- README.md | 65 +++++++++++++++++++++++++++++++++++++- calligraphy.gemspec | 8 ++--- lib/calligraphy/version.rb | 2 +- 4 files changed, 81 insertions(+), 46 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 03e62d0..778b6f1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - calligraphy (0.0.0) + calligraphy (0.1.0) rails (>= 5.0) GEM @@ -46,37 +46,27 @@ GEM tzinfo (~> 1.1) arel (8.0.0) builder (3.2.3) - coderay (1.1.2) concurrent-ruby (1.0.5) - crass (1.0.2) - diff-lcs (1.3) + crass (1.0.3) erubi (1.7.0) - globalid (0.4.0) + globalid (0.4.1) activesupport (>= 4.2.0) - i18n (0.9.0) + i18n (0.9.1) concurrent-ruby (~> 1.0) loofah (2.1.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) - mail (2.6.6) - mime-types (>= 1.16, < 4) - method_source (0.8.2) - mime-types (3.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2016.0521) + mail (2.7.0) + mini_mime (>= 0.1.1) + method_source (0.9.0) + mini_mime (1.0.0) mini_portile2 (2.3.0) minitest (5.10.3) nio4r (2.1.0) nokogiri (1.8.1) mini_portile2 (~> 2.3.0) - pry (0.10.4) - coderay (~> 1.1.0) - method_source (~> 0.8.1) - slop (~> 3.4) - pry-nav (0.2.4) - pry (>= 0.9.10, < 0.11.0) rack (2.0.3) - rack-test (0.7.0) + rack-test (0.8.0) rack (>= 1.0, < 3) rails (5.1.4) actioncable (= 5.1.4) @@ -101,21 +91,7 @@ GEM method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (12.1.0) - rspec (3.7.0) - rspec-core (~> 3.7.0) - rspec-expectations (~> 3.7.0) - rspec-mocks (~> 3.7.0) - rspec-core (3.7.0) - rspec-support (~> 3.7.0) - rspec-expectations (3.7.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.7.0) - rspec-mocks (3.7.0) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.7.0) - rspec-support (3.7.0) - slop (3.6.0) + rake (12.3.0) sprockets (3.7.1) concurrent-ruby (~> 1.0) rack (> 1, < 3) @@ -125,19 +101,17 @@ GEM sprockets (>= 3.0.0) thor (0.20.0) thread_safe (0.3.6) - tzinfo (1.2.3) + tzinfo (1.2.4) thread_safe (~> 0.1) websocket-driver (0.6.5) websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.2) + websocket-extensions (0.1.3) PLATFORMS ruby DEPENDENCIES calligraphy! - pry-nav - rspec BUNDLED WITH - 1.15.4 + 1.16.0 diff --git a/README.md b/README.md index 954d053..6f7a76d 100644 --- a/README.md +++ b/README.md @@ -1 +1,64 @@ -# calligraphy \ No newline at end of file +# Calligraphy + +Calligraphy is a Web Distributed Authoring and Versioning (WebDAV) solution for Rails that: + +* Provides a framework for handling WebDAV requests (e.g. `PROPFIND`, `PROPPATCH`) +* Allows you to extend WedDAV functionality to any type of resource +* Passes 103/104 of the [Litmus](https://github.com/tolsen/litmus) tests (using `Calligraphy::FileResource`) + +## Getting Started + +Add the following line to your Gemfile: + +```ruby +gem 'calligraphy' +``` + +Then run `bundle install` + +Next, set up a `calligraphy_resource` route in `config/routes.rb` with a `resource_class`. + +```ruby +calligraphy_resource :webdav, resource_class: Calligraphy::FileResource +``` + +The above will create a route, `/webdav` that will be able to handle the following HTTP request methods: + +* `OPTIONS` +* `GET` +* `PUT` +* `DELETE` +* `COPY` +* `MOVE` +* `MKCOL` +* `PROPFIND` +* `PROPPATCH` +* `LOCK` +* `UNLOCK` + +The routes will also use the `Calligraphy::FileResource`, enabling Rails to carry out WebDAV actions on files. + +## Extensibility + +The `Calligraphy::Resource` class exposes all the methods used in the various `Calligraphy::WebDavRequest` classes. +To create a custom resource, simply inherit from `Calligraphy::Resource` and redefine the public methods you'd like to customize. + +For example, to create a `CalendarResource`: + +```ruby +module Calligraphy + class CalendarResource < Resource + + def propfind(nodes) + # custom implementation of propfind for CalendarResource + end + + ... + end +end +``` + +## License + +Calligraphy is Copyright © 2017 Brandon Robins. +It is free software, and may be redistributed under the terms specified in the [LICENSE](/LICENSE) file. diff --git a/calligraphy.gemspec b/calligraphy.gemspec index d7b030b..fb55543 100644 --- a/calligraphy.gemspec +++ b/calligraphy.gemspec @@ -6,9 +6,10 @@ require 'calligraphy/version' Gem::Specification.new do |s| s.name = 'calligraphy' s.version = Calligraphy::VERSION - s.summary = 'WebDAV extension for Rails 5+' + s.summary = 'WebDAV framework and extension for Rails 5' + s.description = 'WebDAV framework and extension for Rails 5' s.author = 'Brandon Robins' - s.email = 'brandon.robins@onebnottwo.com' + s.email = 'brandon@onebnottwo.com' s.homepage = 'http://www.github.com/eanlain/calligraphy' s.license = 'MIT' @@ -16,7 +17,4 @@ Gem::Specification.new do |s| s.test_files = Dir['spec/**/*'] s.add_dependency 'rails', '>= 5.0' - - s.add_development_dependency 'pry-nav' - s.add_development_dependency 'rspec' end diff --git a/lib/calligraphy/version.rb b/lib/calligraphy/version.rb index 9e091e7..59d9fbc 100644 --- a/lib/calligraphy/version.rb +++ b/lib/calligraphy/version.rb @@ -1,3 +1,3 @@ module Calligraphy - VERSION = '0.0.0' + VERSION = '0.1.0' end