carrierwave-tencent_cos 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: db44f732d27e0fbde638932b0cd150192257d058
4
- data.tar.gz: d02f3445dc9479134bca75d8f0767064a182d658
3
+ metadata.gz: 45b650db7b7c8e6101d8b07f8a888798e15e5828
4
+ data.tar.gz: 84d01558adff5585ea9a6eafb52f80bc9ee246fa
5
5
  SHA512:
6
- metadata.gz: 1c213cac313f81953883893ba396e5b22353444159a1f56bd14de58dbf4fedfdcbd2fd01171ace6eb108438d5bae4041e4d23424242679fb6ac8d9e185b8d78f
7
- data.tar.gz: 895d74a528ce98decd93b894b61e8fdb0494e20c7c816301f5ed6464669fe2e2fffc43a6ec9d1584929c22486285deb3cfd81a51dda9d280e9238c01257b667e
6
+ metadata.gz: c28a27a94c9706d3cfeeded99b65e4cc8b868e6fb6cb21abce556f3a538ddc5a25f17375b4eee85ff305d1ffab1835716d409b34f7ac714dd03f2d649cf72cf3
7
+ data.tar.gz: 0c2203871ee75c3c66746aefd2628728269054b6128b3f804a49a9d98b9410b88cc735c3b3192f5d012d5ad57748d14813bb589f832342864a5fad59f6885237
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2018 xia
3
+ Copyright (c) 2018 xia xiongjun
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # CarrierWave::TencentCos
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/carrierwave/tencent_cos`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ This gem adds storage support for Tencent COS to CarrierWave.
6
4
 
7
5
  ## Installation
8
6
 
@@ -22,7 +20,27 @@ Or install it yourself as:
22
20
 
23
21
  ## Usage
24
22
 
25
- TODO: Write usage instructions here
23
+ Configure in `config/initializes/carrierwave.rb`
24
+
25
+ ```ruby
26
+ CarrierWave.configure do |conf|
27
+ conf.storage = :tencent_cos # set as default storage
28
+ conf.tencent_cos = {
29
+ secret_id: ENV['SECRET_ID_1'],
30
+ secret_key: ENV['SECRET_KEY_1'],
31
+ host: ENV['HOST_1'],
32
+ parent_path: '/app_name_1'
33
+ }
34
+ end
35
+ ```
36
+
37
+ You can also set the storage to `:tencent_cos` in the specified uploader:
38
+
39
+ ```ruby
40
+ class PictureUploader < CarrierWave::Uploader::Base
41
+ storage :tencent_cos
42
+ end
43
+ ```
26
44
 
27
45
  ## Development
28
46
 
@@ -41,3 +59,9 @@ The gem is available as open source under the terms of the [MIT License](https:/
41
59
  ## Code of Conduct
42
60
 
43
61
  Everyone interacting in the CarrierWave::TencentCos project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/xxjapp/carrierwave-tencent_cos/blob/master/CODE_OF_CONDUCT.md).
62
+
63
+ ## Links
64
+
65
+ * [ruby gem carrierwave-tencent_cos](https://rubygems.org/gems/carrierwave-tencent_cos)
66
+ * [ruby gem tencent_cos_sdk](https://rubygems.org/gems/tencent_cos_sdk)
67
+ * [carrierwave](https://github.com/carrierwaveuploader/carrierwave)
@@ -1,5 +1,5 @@
1
1
  module CarrierWave
2
2
  module TencentCos
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carrierwave-tencent_cos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - xia xiongjun