carrierwave-upyun 0.2.0 → 0.2.1

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: 9db3fc705cd4eb65b80033ced7aafbd986729516
4
- data.tar.gz: fdd02b351fed04bc6d893ec8634a04fa11cdc22f
3
+ metadata.gz: 020c963a6143bae42379ba0749fbba0e727bc917
4
+ data.tar.gz: 0eaec5c9942a427404b7b27636df42f66ff5d39d
5
5
  SHA512:
6
- metadata.gz: 21fb21a5f762f4364cd5e7216d73321ab5cc5c2f830fd572f78ca9e50702709561bd2194937764f3ed23245bb4303ae7552645bf441ab017594004d5b42c8d78
7
- data.tar.gz: b480edd42e648e5029c53a1c4279eb7b9a14602ac9249c91951c453e87320882017464a8a445bbd06a6f72d863337a1796c848e34dba780e35f75bf3105ea571
6
+ metadata.gz: ded1279c00f182d4a113a7ccc65545546c77b911e697f13e957bcd39d2a28aa33b3e5901c38c4c0dedb90e5457d5f93cb9c6f99eba75b751ca82c2878df7b681
7
+ data.tar.gz: 832ef3790b00c755c8ad94d253ba6711dc01f15beb4d86cc0179454629d778e7edb9e38bdd814d4ffb8eddc5a74f02b6e40898392bec8352a597d2a8448fb90b
data/CHANGELOGS.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.2.1
2
+
3
+ - 修 CarrierWave::Storage::UpYun::File 继承 CarrierWave::SanitizedFile 以便能实现一些 CarrierWave 通用的方法。
4
+
1
5
  ## 0.2.0
2
6
 
3
7
  - 改用 Faraday 代替 rest-client,来发送 HTTP 请求;
data/README.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # CarrierWave for [UpYun (又拍云存储)](http://upyun.com)
2
2
 
3
- This gem adds support for [Upyun.com](http://www.upyun.com) to [CarrierWave](https://github.com/jnicklas/carrierwave/)
3
+ This gem adds support for [upyun.com](http://www.upyun.com) to [CarrierWave](https://github.com/jnicklas/carrierwave/)
4
+
5
+
6
+ - [![Gem Version](https://badge.fury.io/rb/carrierwave-upyun.png)](https://rubygems.org/gems/carrierwave-upyun)
4
7
 
5
8
 
6
9
  ## Installation
@@ -10,6 +13,8 @@ gem 'carrierwave'
10
13
  gem 'carrierwave-upyun'
11
14
  ```
12
15
 
16
+ > NOTE: 此 Gem 是一个 CarrierWave 的组件,你需要配合 CarrierWave 一起使用。
17
+
13
18
  ## Configuration
14
19
 
15
20
  You'll need to configure the to use this in config/initializes/carrierwave.rb
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "carrierwave-upyun"
6
- s.version = "0.2.0"
6
+ s.version = "0.2.1"
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["Nowa Zhu", "Jason Lee"]
9
9
  s.email = ["nowazhu@gmail.com", "huacnlee@gmail.com"]
@@ -17,7 +17,7 @@ module CarrierWave
17
17
  class UpYun < Abstract
18
18
  DEFAULT_API_URL = 'http://v0.api.upyun.com'
19
19
 
20
- class File
20
+ class File < CarrierWave::SanitizedFile
21
21
  def initialize(uploader, base, path)
22
22
  @uploader = uploader
23
23
  @path = path
data/spec/upload_spec.rb CHANGED
@@ -67,4 +67,12 @@ describe "Upload" do
67
67
  expect(res.size).to eq f1.size
68
68
  end
69
69
  end
70
+
71
+ describe 'CarrierWave::SanitizedFile' do
72
+ it 'should have responed_to identifier' do
73
+ f = CarrierWave::Storage::UpYun::File.new(nil, nil, nil)
74
+ expect(f).to respond_to(:identifier)
75
+ expect(f).to respond_to(:filename)
76
+ end
77
+ end
70
78
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carrierwave-upyun
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nowa Zhu
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-05-23 00:00:00.000000000 Z
12
+ date: 2015-05-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: carrierwave