-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from huacnlee/master
Faraday 代替 rest-client, 精简代码
- Loading branch information
Showing
11 changed files
with
211 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
--colour | ||
--format nested |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
## 0.2.0 | ||
|
||
- 改用 Faraday 代替 rest-client,来发送 HTTP 请求; | ||
- 精简代码; | ||
- 移除 `upyun_bucket_domain` 配置信息,请用 `upyun_bucket_host` 代替; | ||
|
||
## 0.1.8 | ||
|
||
- 修复 upyun_bucket_domain 选项处理错误; | ||
- 修复不含 'http://' 前缀的值处理出错的问题; | ||
|
||
## 0.1.7 | ||
|
||
- SSL Host 配置支持; | ||
- Fix issue 16 并减少连接; #18 | ||
|
||
## 0.1.6 | ||
|
||
- 改进 Upyun 初始化,将少连接的过程; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
source "http://ruby.taobao.org/" | ||
source 'https://rubygems.org' | ||
|
||
gemspec | ||
|
||
group :test do | ||
gem "rails", "~> 3.2.13" | ||
gem 'sqlite3' | ||
gem 'mini_magick' | ||
gem 'rspec','~> 2.6.0' | ||
end | ||
gem "rake" | ||
gem 'rails', '4.2.0' | ||
gem 'sqlite3' | ||
gem 'mini_magick' | ||
gem 'rspec' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,115 +1,136 @@ | ||
PATH | ||
remote: . | ||
specs: | ||
carrierwave-upyun (0.1.6) | ||
carrierwave-upyun (0.2.0) | ||
carrierwave (>= 0.5.7) | ||
rest-client (>= 1.6.7) | ||
faraday (>= 0.8.0) | ||
|
||
GEM | ||
remote: http://ruby.taobao.org/ | ||
remote: https://rubygems.org/ | ||
specs: | ||
actionmailer (3.2.13) | ||
actionpack (= 3.2.13) | ||
mail (~> 2.5.3) | ||
actionpack (3.2.13) | ||
activemodel (= 3.2.13) | ||
activesupport (= 3.2.13) | ||
builder (~> 3.0.0) | ||
actionmailer (4.2.0) | ||
actionpack (= 4.2.0) | ||
actionview (= 4.2.0) | ||
activejob (= 4.2.0) | ||
mail (~> 2.5, >= 2.5.4) | ||
rails-dom-testing (~> 1.0, >= 1.0.5) | ||
actionpack (4.2.0) | ||
actionview (= 4.2.0) | ||
activesupport (= 4.2.0) | ||
rack (~> 1.6.0) | ||
rack-test (~> 0.6.2) | ||
rails-dom-testing (~> 1.0, >= 1.0.5) | ||
rails-html-sanitizer (~> 1.0, >= 1.0.1) | ||
actionview (4.2.0) | ||
activesupport (= 4.2.0) | ||
builder (~> 3.1) | ||
erubis (~> 2.7.0) | ||
journey (~> 1.0.4) | ||
rack (~> 1.4.5) | ||
rack-cache (~> 1.2) | ||
rack-test (~> 0.6.1) | ||
sprockets (~> 2.2.1) | ||
activemodel (3.2.13) | ||
activesupport (= 3.2.13) | ||
builder (~> 3.0.0) | ||
activerecord (3.2.13) | ||
activemodel (= 3.2.13) | ||
activesupport (= 3.2.13) | ||
arel (~> 3.0.2) | ||
tzinfo (~> 0.3.29) | ||
activeresource (3.2.13) | ||
activemodel (= 3.2.13) | ||
activesupport (= 3.2.13) | ||
activesupport (3.2.13) | ||
i18n (= 0.6.1) | ||
multi_json (~> 1.0) | ||
arel (3.0.2) | ||
builder (3.0.4) | ||
carrierwave (0.8.0) | ||
rails-dom-testing (~> 1.0, >= 1.0.5) | ||
rails-html-sanitizer (~> 1.0, >= 1.0.1) | ||
activejob (4.2.0) | ||
activesupport (= 4.2.0) | ||
globalid (>= 0.3.0) | ||
activemodel (4.2.0) | ||
activesupport (= 4.2.0) | ||
builder (~> 3.1) | ||
activerecord (4.2.0) | ||
activemodel (= 4.2.0) | ||
activesupport (= 4.2.0) | ||
arel (~> 6.0) | ||
activesupport (4.2.0) | ||
i18n (~> 0.7) | ||
json (~> 1.7, >= 1.7.7) | ||
minitest (~> 5.1) | ||
thread_safe (~> 0.3, >= 0.3.4) | ||
tzinfo (~> 1.1) | ||
arel (6.0.0) | ||
builder (3.2.2) | ||
carrierwave (0.10.0) | ||
activemodel (>= 3.2.0) | ||
activesupport (>= 3.2.0) | ||
diff-lcs (1.1.3) | ||
json (>= 1.7) | ||
mime-types (>= 1.16) | ||
diff-lcs (1.2.5) | ||
erubis (2.7.0) | ||
hike (1.2.2) | ||
i18n (0.6.1) | ||
journey (1.0.4) | ||
json (1.7.7) | ||
mail (2.5.3) | ||
i18n (>= 0.4.0) | ||
mime-types (~> 1.16) | ||
treetop (~> 1.4.8) | ||
mime-types (1.23) | ||
faraday (0.9.1) | ||
multipart-post (>= 1.2, < 3) | ||
globalid (0.3.5) | ||
activesupport (>= 4.1.0) | ||
i18n (0.7.0) | ||
json (1.8.2) | ||
loofah (2.0.1) | ||
nokogiri (>= 1.5.9) | ||
mail (2.6.3) | ||
mime-types (>= 1.16, < 3) | ||
mime-types (2.5) | ||
mini_magick (3.3) | ||
subexec (~> 0.1.0) | ||
multi_json (1.7.2) | ||
polyglot (0.3.3) | ||
rack (1.4.5) | ||
rack-cache (1.2) | ||
rack (>= 0.4) | ||
rack-ssl (1.3.3) | ||
rack | ||
rack-test (0.6.2) | ||
mini_portile (0.6.2) | ||
minitest (5.6.1) | ||
multipart-post (2.0.0) | ||
nokogiri (1.6.6.2) | ||
mini_portile (~> 0.6.0) | ||
rack (1.6.0) | ||
rack-test (0.6.3) | ||
rack (>= 1.0) | ||
rails (3.2.13) | ||
actionmailer (= 3.2.13) | ||
actionpack (= 3.2.13) | ||
activerecord (= 3.2.13) | ||
activeresource (= 3.2.13) | ||
activesupport (= 3.2.13) | ||
bundler (~> 1.0) | ||
railties (= 3.2.13) | ||
railties (3.2.13) | ||
actionpack (= 3.2.13) | ||
activesupport (= 3.2.13) | ||
rack-ssl (~> 1.3.2) | ||
rails (4.2.0) | ||
actionmailer (= 4.2.0) | ||
actionpack (= 4.2.0) | ||
actionview (= 4.2.0) | ||
activejob (= 4.2.0) | ||
activemodel (= 4.2.0) | ||
activerecord (= 4.2.0) | ||
activesupport (= 4.2.0) | ||
bundler (>= 1.3.0, < 2.0) | ||
railties (= 4.2.0) | ||
sprockets-rails | ||
rails-deprecated_sanitizer (1.0.3) | ||
activesupport (>= 4.2.0.alpha) | ||
rails-dom-testing (1.0.6) | ||
activesupport (>= 4.2.0.beta, < 5.0) | ||
nokogiri (~> 1.6.0) | ||
rails-deprecated_sanitizer (>= 1.0.1) | ||
rails-html-sanitizer (1.0.2) | ||
loofah (~> 2.0) | ||
railties (4.2.0) | ||
actionpack (= 4.2.0) | ||
activesupport (= 4.2.0) | ||
rake (>= 0.8.7) | ||
rdoc (~> 3.4) | ||
thor (>= 0.14.6, < 2.0) | ||
rake (0.9.6) | ||
rdoc (3.12.2) | ||
json (~> 1.4) | ||
rest-client (1.6.7) | ||
mime-types (>= 1.16) | ||
rspec (2.6.0) | ||
rspec-core (~> 2.6.0) | ||
rspec-expectations (~> 2.6.0) | ||
rspec-mocks (~> 2.6.0) | ||
rspec-core (2.6.4) | ||
rspec-expectations (2.6.0) | ||
diff-lcs (~> 1.1.2) | ||
rspec-mocks (2.6.0) | ||
sprockets (2.2.2) | ||
hike (~> 1.2) | ||
multi_json (~> 1.0) | ||
thor (>= 0.18.1, < 2.0) | ||
rake (0.9.2.2) | ||
rspec (3.2.0) | ||
rspec-core (~> 3.2.0) | ||
rspec-expectations (~> 3.2.0) | ||
rspec-mocks (~> 3.2.0) | ||
rspec-core (3.2.3) | ||
rspec-support (~> 3.2.0) | ||
rspec-expectations (3.2.1) | ||
diff-lcs (>= 1.2.0, < 2.0) | ||
rspec-support (~> 3.2.0) | ||
rspec-mocks (3.2.1) | ||
diff-lcs (>= 1.2.0, < 2.0) | ||
rspec-support (~> 3.2.0) | ||
rspec-support (3.2.2) | ||
sprockets (3.0.3) | ||
rack (~> 1.0) | ||
tilt (~> 1.1, != 1.3.0) | ||
sqlite3 (1.3.7) | ||
sprockets-rails (2.2.4) | ||
actionpack (>= 3.0) | ||
activesupport (>= 3.0) | ||
sprockets (>= 2.8, < 4.0) | ||
sqlite3 (1.3.10) | ||
subexec (0.1.0) | ||
thor (0.18.1) | ||
tilt (1.3.7) | ||
treetop (1.4.12) | ||
polyglot | ||
polyglot (>= 0.3.1) | ||
tzinfo (0.3.37) | ||
thor (0.19.1) | ||
thread_safe (0.3.5) | ||
tzinfo (1.2.2) | ||
thread_safe (~> 0.1) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
carrierwave-upyun! | ||
mini_magick | ||
rails (~> 3.2.13) | ||
rspec (~> 2.6.0) | ||
rails (= 4.2.0) | ||
rake | ||
rspec | ||
sqlite3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
require "carrierwave/storage/upyun" | ||
require "carrierwave/upyun/configuration" | ||
|
||
CarrierWave.configure do |config| | ||
config.storage_engines.merge!({:upyun => "CarrierWave::Storage::UpYun"}) | ||
config.storage_engines.merge!({upyun: "CarrierWave::Storage::UpYun"}) | ||
end | ||
|
||
CarrierWave::Uploader::Base.send(:include, CarrierWave::UpYun::Configuration) |
Oops, something went wrong.