Update README, gemspec, and bump version
This commit is contained in:
52
Gemfile.lock
52
Gemfile.lock
@@ -1,7 +1,7 @@
|
|||||||
PATH
|
PATH
|
||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
calligraphy (0.0.0)
|
calligraphy (0.1.0)
|
||||||
rails (>= 5.0)
|
rails (>= 5.0)
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
@@ -46,37 +46,27 @@ GEM
|
|||||||
tzinfo (~> 1.1)
|
tzinfo (~> 1.1)
|
||||||
arel (8.0.0)
|
arel (8.0.0)
|
||||||
builder (3.2.3)
|
builder (3.2.3)
|
||||||
coderay (1.1.2)
|
|
||||||
concurrent-ruby (1.0.5)
|
concurrent-ruby (1.0.5)
|
||||||
crass (1.0.2)
|
crass (1.0.3)
|
||||||
diff-lcs (1.3)
|
|
||||||
erubi (1.7.0)
|
erubi (1.7.0)
|
||||||
globalid (0.4.0)
|
globalid (0.4.1)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
i18n (0.9.0)
|
i18n (0.9.1)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
loofah (2.1.1)
|
loofah (2.1.1)
|
||||||
crass (~> 1.0.2)
|
crass (~> 1.0.2)
|
||||||
nokogiri (>= 1.5.9)
|
nokogiri (>= 1.5.9)
|
||||||
mail (2.6.6)
|
mail (2.7.0)
|
||||||
mime-types (>= 1.16, < 4)
|
mini_mime (>= 0.1.1)
|
||||||
method_source (0.8.2)
|
method_source (0.9.0)
|
||||||
mime-types (3.1)
|
mini_mime (1.0.0)
|
||||||
mime-types-data (~> 3.2015)
|
|
||||||
mime-types-data (3.2016.0521)
|
|
||||||
mini_portile2 (2.3.0)
|
mini_portile2 (2.3.0)
|
||||||
minitest (5.10.3)
|
minitest (5.10.3)
|
||||||
nio4r (2.1.0)
|
nio4r (2.1.0)
|
||||||
nokogiri (1.8.1)
|
nokogiri (1.8.1)
|
||||||
mini_portile2 (~> 2.3.0)
|
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 (2.0.3)
|
||||||
rack-test (0.7.0)
|
rack-test (0.8.0)
|
||||||
rack (>= 1.0, < 3)
|
rack (>= 1.0, < 3)
|
||||||
rails (5.1.4)
|
rails (5.1.4)
|
||||||
actioncable (= 5.1.4)
|
actioncable (= 5.1.4)
|
||||||
@@ -101,21 +91,7 @@ GEM
|
|||||||
method_source
|
method_source
|
||||||
rake (>= 0.8.7)
|
rake (>= 0.8.7)
|
||||||
thor (>= 0.18.1, < 2.0)
|
thor (>= 0.18.1, < 2.0)
|
||||||
rake (12.1.0)
|
rake (12.3.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)
|
|
||||||
sprockets (3.7.1)
|
sprockets (3.7.1)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
rack (> 1, < 3)
|
rack (> 1, < 3)
|
||||||
@@ -125,19 +101,17 @@ GEM
|
|||||||
sprockets (>= 3.0.0)
|
sprockets (>= 3.0.0)
|
||||||
thor (0.20.0)
|
thor (0.20.0)
|
||||||
thread_safe (0.3.6)
|
thread_safe (0.3.6)
|
||||||
tzinfo (1.2.3)
|
tzinfo (1.2.4)
|
||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
websocket-driver (0.6.5)
|
websocket-driver (0.6.5)
|
||||||
websocket-extensions (>= 0.1.0)
|
websocket-extensions (>= 0.1.0)
|
||||||
websocket-extensions (0.1.2)
|
websocket-extensions (0.1.3)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
calligraphy!
|
calligraphy!
|
||||||
pry-nav
|
|
||||||
rspec
|
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
1.15.4
|
1.16.0
|
||||||
|
|||||||
65
README.md
65
README.md
@@ -1 +1,64 @@
|
|||||||
# calligraphy
|
# 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.
|
||||||
|
|||||||
@@ -6,9 +6,10 @@ require 'calligraphy/version'
|
|||||||
Gem::Specification.new do |s|
|
Gem::Specification.new do |s|
|
||||||
s.name = 'calligraphy'
|
s.name = 'calligraphy'
|
||||||
s.version = Calligraphy::VERSION
|
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.author = 'Brandon Robins'
|
||||||
s.email = 'brandon.robins@onebnottwo.com'
|
s.email = 'brandon@onebnottwo.com'
|
||||||
s.homepage = 'http://www.github.com/eanlain/calligraphy'
|
s.homepage = 'http://www.github.com/eanlain/calligraphy'
|
||||||
s.license = 'MIT'
|
s.license = 'MIT'
|
||||||
|
|
||||||
@@ -16,7 +17,4 @@ Gem::Specification.new do |s|
|
|||||||
s.test_files = Dir['spec/**/*']
|
s.test_files = Dir['spec/**/*']
|
||||||
|
|
||||||
s.add_dependency 'rails', '>= 5.0'
|
s.add_dependency 'rails', '>= 5.0'
|
||||||
|
|
||||||
s.add_development_dependency 'pry-nav'
|
|
||||||
s.add_development_dependency 'rspec'
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
module Calligraphy
|
module Calligraphy
|
||||||
VERSION = '0.0.0'
|
VERSION = '0.1.0'
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user