carrierwave-qiniu 1.1.7 → 1.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c28afe90d4591dd7736101b5786c4116f4fd5c6f6ead62d5158b08fcf2383fd1
4
- data.tar.gz: f5d85a46d048ebaa638f1dce6b41712cebf9de22bbe6a2d254dcfac009940a90
3
+ metadata.gz: 26e9ac6a7fc4b16de529b49ceda0a7e397e6cbffb5dee7dd5e22b8781a9e93e6
4
+ data.tar.gz: 445d456bfed1453e6daa4f0aae75bd540c67ccab359e7968c876c22fea74197a
5
5
  SHA512:
6
- metadata.gz: a09bf317e8d01b3ab5eb203b659243154fbcf39fc75acc6ba4c9b1d9628ff1f6eaf67cd491af096e0b90e917c5f2c8922a3e089e6631f6f46fee97c330a841a9
7
- data.tar.gz: cdb4a8714098091c8863e5571cdfdce5f1f8789af27cc34a1f4826abe36455a8ef761a8d74ad2e99ba303e41f08ff0d52998789b57bdaeb0d95e9e26f68a068a
6
+ metadata.gz: 2a9df16d1a6b680815907f80b38f75b5fe199bcc72e0ce536bd58f91bf9d1429fdcc44146ce1ee53bd11ca3489f6f4156d60e0d365183b631609728dd042be63
7
+ data.tar.gz: 37c437d0f628abd9178ac1fb701a215ee7e4038a983be6e9990215aad010fa650c3dce9013e9ca482fccb990dc5c22aa3a8f429ca25acffd946430141321bf57
@@ -1,6 +1,16 @@
1
1
 
2
2
  ## CHANGE LOG
3
3
 
4
+ ### v1.1.8
5
+
6
+ - Fix warning in ruby 2.7.
7
+
8
+ ### v1.1.7
9
+
10
+ - Upgrade to rails 6 and qiniu 6.9
11
+
12
+ https://github.com/huobazi/carrierwave-qiniu/pull/85
13
+
4
14
  ### v1.1.6
5
15
 
6
16
  - Add filename to storage qiniu file
@@ -191,4 +191,4 @@ DEPENDENCIES
191
191
  sqlite3
192
192
 
193
193
  BUNDLED WITH
194
- 1.17.3
194
+ 2.1.2
@@ -1 +1 @@
1
- theme: jekyll-theme-hacker
1
+ theme: jekyll-theme-architect
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
  module Carrierwave
3
3
  module Qiniu
4
- VERSION = "1.1.7"
4
+ VERSION = "1.1.8"
5
5
  end
6
6
  end
@@ -89,7 +89,7 @@ module CarrierWave
89
89
  end
90
90
 
91
91
  def download_url(path)
92
- encode_path = URI.escape(path) #fix chinese file name, same as encodeURIComponent in js but preserve slash '/'
92
+ encode_path = path_escape(path)
93
93
  primitive_url = "#{@qiniu_protocol}://#{@qiniu_bucket_domain}/#{encode_path}"
94
94
  @qiniu_bucket_private ? \
95
95
  ::Qiniu::Auth.authorize_download_url(primitive_url, :expires_in => @qiniu_private_url_expires_in) \
@@ -119,6 +119,12 @@ module CarrierWave
119
119
 
120
120
  end
121
121
 
122
+ #fix chinese file name, same as encodeURIComponent in js but preserve slash '/'
123
+ def path_escape(value)
124
+ #CGI.escape(value)#.gsub("%2F", "/")
125
+ ::URI::DEFAULT_PARSER.escape value
126
+ end
127
+
122
128
  end
123
129
 
124
130
  class File
@@ -102,13 +102,13 @@ describe "CarrierWave Qiniu" do
102
102
  puts 'The image was uploaded to:'
103
103
  puts photo.image.url
104
104
 
105
- open(photo.image.url).should_not be_nil
105
+ URI.open(photo.image.url).should_not be_nil
106
106
 
107
107
 
108
108
  puts "The thumb image:"
109
109
  puts photo.image.url(:thumb)
110
110
 
111
- open(photo.image.thumb.url).should_not be_nil
111
+ URI.open(photo.image.thumb.url).should_not be_nil
112
112
 
113
113
  end
114
114
 
@@ -129,7 +129,7 @@ describe "CarrierWave Qiniu" do
129
129
 
130
130
  expect(photo2.image.url).not_to eq(photo.image.url)
131
131
 
132
- open(photo2.image.url).should_not be_nil
132
+ URI.open(photo2.image.url).should_not be_nil
133
133
  end
134
134
 
135
135
  describe 'after remove' do
@@ -148,7 +148,7 @@ describe "CarrierWave Qiniu" do
148
148
  expect(@photo.image.file).to be_nil
149
149
  end
150
150
 
151
- it 'url will be nill' do
151
+ it 'url will be nil' do
152
152
  expect(@photo.image.url).to be_nil
153
153
  end
154
154
  end
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.7
4
+ version: 1.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marble Wu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-11 00:00:00.000000000 Z
11
+ date: 2019-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: carrierwave