carrierwave-webdav 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
File without changes
data/README.md CHANGED
@@ -1,24 +1,50 @@
1
- # Carrierwave::WebDAV
1
+ # CarrierWave for WebDAV
2
2
 
3
- TODO: Write a gem description
3
+ This gem adds support for WebDAV to
4
+ [CarrierWave](https://github.com/jnicklas/carrierwave/)
4
5
 
5
6
  ## Installation
6
7
 
7
- Add this line to your application's Gemfile:
8
+ Install the latest release:
8
9
 
9
- gem 'carrierwave-webdav'
10
+ gem install carrierwave-webdav
10
11
 
11
- And then execute:
12
+ Require it in your code:
12
13
 
13
- $ bundle
14
+ require 'carrierwave/webdav'
14
15
 
15
- Or install it yourself as:
16
+ Or, in Rails you can add it to your Gemfile:
16
17
 
17
- $ gem install carrierwave-webdav
18
+ gem 'carrierwave-webdav', :require => 'carrierwave/webdav'
18
19
 
19
- ## Usage
20
+ ## Getting Started
20
21
 
21
- TODO: Write usage instructions here
22
+ Follow the "Getting Started" directions in the main
23
+ [Carrierwave repository](https://raw.github.com/jnicklas/carrierwave/).
24
+
25
+ ## Using WebDAV store
26
+
27
+ In Rails, add WebDAV settings to `config/initializers/carrierwave.rb`
28
+
29
+ ```ruby
30
+ CarrierWave.configure do |config|
31
+ config.storage = :webdav
32
+ config.webdav_server = 'https://your.webdav_server.com/dav' # Your WebDAV url.
33
+ config.webdav_username = 'your webdav username'
34
+ config.webdav_password = 'your webdav password'
35
+ end
36
+ ```
37
+
38
+ In your uploader, set the storage to `:webdav`:
39
+
40
+ ```ruby
41
+ class AvatarUploader < CarrierWave::Uploader::Base
42
+ storage :webdav
43
+ end
44
+ ```
45
+
46
+ Since WebDAV doesn't make the files available via HTTP, you'll need to stream
47
+ them yourself. In Rails for example, you could use the `send_data` method.
22
48
 
23
49
  ## Contributing
24
50
 
@@ -27,3 +53,4 @@ TODO: Write usage instructions here
27
53
  3. Commit your changes (`git commit -am 'Add some feature'`)
28
54
  4. Push to the branch (`git push origin my-new-feature`)
29
55
  5. Create new Pull Request
56
+
@@ -1,5 +1,5 @@
1
1
  module CarrierWave
2
2
  module WebDAV
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: carrierwave-webdav
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.0
5
+ version: 0.1.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Qinix
@@ -52,7 +52,7 @@ extra_rdoc_files: []
52
52
  files:
53
53
  - .gitignore
54
54
  - Gemfile
55
- - LICENSE.txt
55
+ - LICENSE
56
56
  - README.md
57
57
  - Rakefile
58
58
  - carrierwave-webdav.gemspec