carrierwave-qiniu 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -1
- data/README.md +4 -4
- data/lib/carrierwave/qiniu/url.rb +3 -2
- data/lib/carrierwave-qiniu/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af0bea8f3675df09f0acfa6ea59724970b162bac
|
4
|
+
data.tar.gz: 011c55dbe3ba635428736b3db7b678ef4b53c154
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ad5482ab45762fbe170783bc0bcc23b2bb963332cd8f8a678c783eb635010c3075a7eb6eb8bd2e931670441e88fb9a11d0d40c66109aaf04e0703cfbfaa7053
|
7
|
+
data.tar.gz: d95400468ddb647036dce94d355f3f49033b415c6eb68fa4f2fdd8d07b13269644812e5d6f71c86c3e7440b78f6f4cd5b795f5aa4cf57f683ec94d0734d0675e
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Carrierwave::Qiniu
|
2
2
|
|
3
|
-
[![Gem Version](https://badge.fury.io/rb/carrierwave-qiniu@2x.png?1.1.
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/carrierwave-qiniu@2x.png?1.1.1)](http://badge.fury.io/rb/carrierwave-qiniu)
|
4
4
|
|
5
5
|
This gem adds storage support for [Qiniu](http://qiniutek.com) to [Carrierwave](https://github.com/jnicklas/carrierwave)
|
6
6
|
|
@@ -10,7 +10,7 @@ example: https://github.com/huobazi/carrierwave-qiniu-example
|
|
10
10
|
|
11
11
|
Add the following to your application's Gemfile:
|
12
12
|
|
13
|
-
gem 'carrierwave-qiniu', '~> 1.1.
|
13
|
+
gem 'carrierwave-qiniu', '~> 1.1.1'
|
14
14
|
# If you need to use locales other than English
|
15
15
|
gem 'carrierwave-i18n'
|
16
16
|
|
@@ -20,11 +20,11 @@ And then execute:
|
|
20
20
|
|
21
21
|
Or install it yourself as:
|
22
22
|
|
23
|
-
$ gem install carrierwave-qiniu -v 1.1.
|
23
|
+
$ gem install carrierwave-qiniu -v 1.1.1
|
24
24
|
|
25
25
|
## Usage
|
26
26
|
|
27
|
-
You'll need to configure it in config/
|
27
|
+
You'll need to configure it in config/initializers/carrierwave.rb
|
28
28
|
|
29
29
|
```ruby
|
30
30
|
::CarrierWave.configure do |config|
|
@@ -11,10 +11,12 @@ module CarrierWave
|
|
11
11
|
return super if args.empty?
|
12
12
|
|
13
13
|
# Usage: avatar.url(style: 'imageView/0/w/200')
|
14
|
+
url = super({})
|
15
|
+
return unless url
|
16
|
+
|
14
17
|
if args.first.is_a? Hash
|
15
18
|
options = args.first
|
16
19
|
if options[:style]
|
17
|
-
url = super({})
|
18
20
|
return "#{url}?#{options[:style]}"
|
19
21
|
end
|
20
22
|
else
|
@@ -24,7 +26,6 @@ module CarrierWave
|
|
24
26
|
options = args.last
|
25
27
|
|
26
28
|
# TODO: handle private url
|
27
|
-
url = super({})
|
28
29
|
# Usage: avatar.url(:version, inline: true)
|
29
30
|
if options.present? && options.is_a?(Hash) && options[:inline] && styles[version]
|
30
31
|
return "#{url}?#{styles[version]}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carrierwave-qiniu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marble Wu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: carrierwave
|