carrierwave-webdav 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/{LICENSE.txt → LICENSE} +0 -0
- data/README.md +37 -10
- data/lib/carrierwave/webdav/version.rb +1 -1
- metadata +2 -2
data/{LICENSE.txt → LICENSE}
RENAMED
File without changes
|
data/README.md
CHANGED
@@ -1,24 +1,50 @@
|
|
1
|
-
#
|
1
|
+
# CarrierWave for WebDAV
|
2
2
|
|
3
|
-
|
3
|
+
This gem adds support for WebDAV to
|
4
|
+
[CarrierWave](https://github.com/jnicklas/carrierwave/)
|
4
5
|
|
5
6
|
## Installation
|
6
7
|
|
7
|
-
|
8
|
+
Install the latest release:
|
8
9
|
|
9
|
-
gem
|
10
|
+
gem install carrierwave-webdav
|
10
11
|
|
11
|
-
|
12
|
+
Require it in your code:
|
12
13
|
|
13
|
-
|
14
|
+
require 'carrierwave/webdav'
|
14
15
|
|
15
|
-
Or
|
16
|
+
Or, in Rails you can add it to your Gemfile:
|
16
17
|
|
17
|
-
|
18
|
+
gem 'carrierwave-webdav', :require => 'carrierwave/webdav'
|
18
19
|
|
19
|
-
##
|
20
|
+
## Getting Started
|
20
21
|
|
21
|
-
|
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
|
+
|
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.
|
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
|
55
|
+
- LICENSE
|
56
56
|
- README.md
|
57
57
|
- Rakefile
|
58
58
|
- carrierwave-webdav.gemspec
|