carrierwave-qiniu 0.2.2 → 0.2.3

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
  SHA1:
3
- metadata.gz: fd2c088b63699b4a104b7d9e9b727218909c0f00
4
- data.tar.gz: f26b4ff276ef9ce1302f8a6defffb153c765e603
3
+ metadata.gz: 1283fa0bce68604381eb4205a7f8822d8c3d4cec
4
+ data.tar.gz: 5c4bf47715f08955f616054a6953858360fa2678
5
5
  SHA512:
6
- metadata.gz: b791a994c6807846af2d5840df21f232e8a29bab92d064633c19e0af7be5bf979fcab45d2bf3c61e42704982e6268d075ab9b2b2cb45e9366124828e031aa21e
7
- data.tar.gz: 459eb0bbcf617d18b62f17bd1995bd7040392cd2a9f1af4bbd99d31e87f3bab39a05d7fcd2e50ddd90bb12eb01be2d6725ccc5506ece5aa0bb70d9f4326096c7
6
+ metadata.gz: b56cbc02bdea0362f2c922724bda4c295a4d893d59a643272ab31150986c1de26d54be141c0057fdfab9737c1257cfea0c8eab941126b7775d7e3004dfe5c4c8
7
+ data.tar.gz: 41935e2de0415de62d26d06834bdfe41cdc768c4701746dbb2d57ac9e7956bcb358dfed967add495d5844e59cdc03705a97b9e2acf0ac35bfacc4038ce139bf1
data/CHANGELOG.md CHANGED
@@ -1,12 +1,19 @@
1
1
 
2
2
  ## CHANGE LOG
3
3
 
4
+ ### v0.2.3
5
+
6
+ - Add extension method
7
+ https://github.com/huobazi/carrierwave-qiniu/pull/50
8
+
4
9
  ### v0.2.2
5
- 增加对七牛SDK中复制图片功能的支持
10
+
11
+ - 增加对七牛SDK中复制图片功能的支持
6
12
  https://github.com/huobazi/carrierwave-qiniu/pull/49
7
13
 
8
14
  ### v0.2.1
9
- 增加
15
+
16
+ - 增加
10
17
 
11
18
  qiniu_callback_url
12
19
  qiniu_callback_body
@@ -165,6 +165,10 @@ module CarrierWave
165
165
  file_info['fsize'] || 0
166
166
  end
167
167
 
168
+ def extension
169
+ path.split('.').last
170
+ end
171
+
168
172
  private
169
173
 
170
174
  def qiniu_connection
@@ -17,13 +17,10 @@ module CarrierWave
17
17
  old_cache! new_file
18
18
 
19
19
  if new_file.kind_of? CarrierWave::Storage::Qiniu::File
20
-
21
20
  @file.copy_from_path = new_file.path
22
-
23
21
  elsif new_file.kind_of? CarrierWave::Uploader::Base
24
-
22
+ return unless new_file.file.present?
25
23
  @file.copy_from_path = new_file.file.path
26
-
27
24
  end
28
25
 
29
26
  end
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
  module Carrierwave
3
3
  module Qiniu
4
- VERSION = "0.2.2"
4
+ VERSION = "0.2.3"
5
5
  end
6
- end
6
+ 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: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marble Wu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-20 00:00:00.000000000 Z
11
+ date: 2016-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: carrierwave