activestorage_qinium 0.2.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/activestorage_qinium.gemspec +1 -1
- data/lib/active_storage/service/qinium_service.rb +12 -0
- data/lib/active_storage_qinium/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e590bb1798ce61b646b065e247820d3febcc2eebb0efa5475e2240701ccbf14a
|
4
|
+
data.tar.gz: 7711785ef96a898e174fa7157608a2b8f1e4d84a3b8e9a386ea0ff07fdf3c5f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e53820bad4cb1197da14cef634b6476d11b35222321033b90a4c7b7d356de72418dd33ebb2d3daaf660c167a6b13af1f1498e6e1571e3cc29bbd794abf0c830
|
7
|
+
data.tar.gz: a706dc0cb47e2b2e91832439d815e72e1a53ecce9426330ad28811860e61084dd99476d79f65f08034b1d57d5ee976c621ee58802096251f3ffb64c1f9724083
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
activestorage_qinium (0.
|
5
|
-
qinium (~> 0.
|
4
|
+
activestorage_qinium (0.3.0)
|
5
|
+
qinium (~> 0.3.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
@@ -12,7 +12,7 @@ GEM
|
|
12
12
|
parallel (1.22.1)
|
13
13
|
parser (3.1.1.0)
|
14
14
|
ast (~> 2.4.1)
|
15
|
-
qinium (0.
|
15
|
+
qinium (0.3.0)
|
16
16
|
rainbow (3.1.1)
|
17
17
|
rake (13.0.6)
|
18
18
|
regexp_parser (2.5.0)
|
@@ -110,6 +110,18 @@ module ActiveStorage
|
|
110
110
|
end
|
111
111
|
end
|
112
112
|
|
113
|
+
def fetch(target_url, key)
|
114
|
+
instrument :fetch, target_url: target_url, key: key do
|
115
|
+
qiniu.object.fetch(target_url, key)
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
def copy(source_bucket, source_key, target_bucket, target_key)
|
120
|
+
instrument :fetch, source_bucket: source_bucket, source_key: source_key, target_bucket: target_bucket, target_key: target_key do
|
121
|
+
qiniu.object.copy(source_bucket, source_key, target_bucket, target_key)
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
113
125
|
def exist?(key)
|
114
126
|
instrument :exist, key: key do |payload|
|
115
127
|
answer = items_for(key).any?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activestorage_qinium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- xiaohui
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: qinium
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.4.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.4.0
|
27
27
|
description: Wraps the Qiniu Storage Service as an Active Storage service, support
|
28
28
|
muti-tenant settings. https://www.qiniu.com
|
29
29
|
email:
|
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
71
|
requirements: []
|
72
|
-
rubygems_version: 3.
|
72
|
+
rubygems_version: 3.5.16
|
73
73
|
signing_key:
|
74
74
|
specification_version: 4
|
75
75
|
summary: A muti-tenant SDK wrap the Qiniu Storage Service as an Active Storage service
|