tencent-cloud 0.0.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 +7 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +93 -0
- data/Guardfile +43 -0
- data/LICENSE.md +21 -0
- data/README.md +51 -0
- data/lib/tencent/cloud.rb +17 -0
- data/lib/tencent/cloud/client.rb +174 -0
- data/lib/tencent/cloud/sms_api.rb +39 -0
- data/lib/tencent/cloud/version.rb +5 -0
- data/tencent-cloud.gemspec +30 -0
- metadata +179 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 592a86b70523e7839dd5f9b7ae296f7878410f5d45cf7ee69bbb4c695d4dade6
|
4
|
+
data.tar.gz: 9758fc685b5851df00344fff725e2ff3f41dd199e27d409ab201f3b47c3cbb67
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6b8861cbedbc17b1bf2bc4c0370529b46401571c1b9727b11101dc310623f9cb4c694de13c90243dec722029bf02bc377b983d5736b8af5aec2e92fc0c4798dd
|
7
|
+
data.tar.gz: 1848d712eac278f0f9670ef30ee930add8751348cd2d2c7a8af6329e4a8c059b68a14d4da496068cf44c93b63b9a531ec7e58d648127359c2771707ad0f45534
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
tencent-cloud (0.0.1)
|
5
|
+
faraday (~> 1.0)
|
6
|
+
multi_json (~> 1.0)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
addressable (2.7.0)
|
12
|
+
public_suffix (>= 2.0.2, < 5.0)
|
13
|
+
coderay (1.1.3)
|
14
|
+
crack (0.4.4)
|
15
|
+
diff-lcs (1.4.4)
|
16
|
+
faraday (1.1.0)
|
17
|
+
multipart-post (>= 1.2, < 3)
|
18
|
+
ruby2_keywords
|
19
|
+
ffi (1.13.1)
|
20
|
+
formatador (0.2.5)
|
21
|
+
guard (2.16.2)
|
22
|
+
formatador (>= 0.2.4)
|
23
|
+
listen (>= 2.7, < 4.0)
|
24
|
+
lumberjack (>= 1.0.12, < 2.0)
|
25
|
+
nenv (~> 0.1)
|
26
|
+
notiffany (~> 0.0)
|
27
|
+
pry (>= 0.9.12)
|
28
|
+
shellany (~> 0.0)
|
29
|
+
thor (>= 0.18.1)
|
30
|
+
guard-compat (1.2.1)
|
31
|
+
guard-rspec (4.7.3)
|
32
|
+
guard (~> 2.1)
|
33
|
+
guard-compat (~> 1.1)
|
34
|
+
rspec (>= 2.99.0, < 4.0)
|
35
|
+
hashdiff (1.0.1)
|
36
|
+
listen (3.3.2)
|
37
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
38
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
39
|
+
lumberjack (1.2.8)
|
40
|
+
method_source (1.0.0)
|
41
|
+
multi_json (1.15.0)
|
42
|
+
multipart-post (2.1.1)
|
43
|
+
nenv (0.3.0)
|
44
|
+
notiffany (0.1.3)
|
45
|
+
nenv (~> 0.1)
|
46
|
+
shellany (~> 0.0)
|
47
|
+
pry (0.13.1)
|
48
|
+
coderay (~> 1.1)
|
49
|
+
method_source (~> 1.0)
|
50
|
+
public_suffix (4.0.6)
|
51
|
+
rake (10.5.0)
|
52
|
+
rb-fsevent (0.10.4)
|
53
|
+
rb-inotify (0.10.1)
|
54
|
+
ffi (~> 1.0)
|
55
|
+
rspec (3.10.0)
|
56
|
+
rspec-core (~> 3.10.0)
|
57
|
+
rspec-expectations (~> 3.10.0)
|
58
|
+
rspec-mocks (~> 3.10.0)
|
59
|
+
rspec-core (3.10.0)
|
60
|
+
rspec-support (~> 3.10.0)
|
61
|
+
rspec-expectations (3.10.0)
|
62
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
63
|
+
rspec-support (~> 3.10.0)
|
64
|
+
rspec-its (1.3.0)
|
65
|
+
rspec-core (>= 3.0.0)
|
66
|
+
rspec-expectations (>= 3.0.0)
|
67
|
+
rspec-mocks (3.10.0)
|
68
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
69
|
+
rspec-support (~> 3.10.0)
|
70
|
+
rspec-support (3.10.0)
|
71
|
+
ruby2_keywords (0.0.2)
|
72
|
+
shellany (0.0.1)
|
73
|
+
thor (1.0.1)
|
74
|
+
webmock (3.10.0)
|
75
|
+
addressable (>= 2.3.6)
|
76
|
+
crack (>= 0.3.2)
|
77
|
+
hashdiff (>= 0.4.0, < 2.0.0)
|
78
|
+
|
79
|
+
PLATFORMS
|
80
|
+
ruby
|
81
|
+
|
82
|
+
DEPENDENCIES
|
83
|
+
bundler (~> 1.17)
|
84
|
+
guard (~> 2.0)
|
85
|
+
guard-rspec (~> 4.0)
|
86
|
+
rake (~> 10.0)
|
87
|
+
rspec (~> 3.0)
|
88
|
+
rspec-its (~> 1.0)
|
89
|
+
tencent-cloud!
|
90
|
+
webmock (~> 3.0)
|
91
|
+
|
92
|
+
BUNDLED WITH
|
93
|
+
1.17.3
|
data/Guardfile
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# A sample Guardfile
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
3
|
+
|
4
|
+
## Uncomment and set this to only include directories you want to watch
|
5
|
+
# directories %w(app lib config test spec features) \
|
6
|
+
# .select{|d| Dir.exist?(d) ? d : UI.warning("Directory #{d} does not exist")}
|
7
|
+
|
8
|
+
## Note: if you are using the `directories` clause above and you are not
|
9
|
+
## watching the project directory ('.'), then you will want to move
|
10
|
+
## the Guardfile to a watched dir and symlink it back, e.g.
|
11
|
+
#
|
12
|
+
# $ mkdir config
|
13
|
+
# $ mv Guardfile config/
|
14
|
+
# $ ln -s config/Guardfile .
|
15
|
+
#
|
16
|
+
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"
|
17
|
+
|
18
|
+
# Note: The cmd option is now required due to the increasing number of ways
|
19
|
+
# rspec may be run, below are examples of the most common uses.
|
20
|
+
# * bundler: 'bundle exec rspec'
|
21
|
+
# * bundler binstubs: 'bin/rspec'
|
22
|
+
# * spring: 'bin/rspec' (This will use spring if running and you have
|
23
|
+
# installed the spring binstubs per the docs)
|
24
|
+
# * zeus: 'zeus rspec' (requires the server to be started separately)
|
25
|
+
# * 'just' rspec: 'rspec'
|
26
|
+
|
27
|
+
guard :rspec, cmd: "bundle exec rspec" do
|
28
|
+
require "guard/rspec/dsl"
|
29
|
+
dsl = Guard::RSpec::Dsl.new(self)
|
30
|
+
|
31
|
+
# Feel free to open issues for suggestions and improvements
|
32
|
+
|
33
|
+
# RSpec files
|
34
|
+
rspec = dsl.rspec
|
35
|
+
watch(rspec.spec_helper) { rspec.spec_dir }
|
36
|
+
watch(rspec.spec_support) { rspec.spec_dir }
|
37
|
+
watch(rspec.spec_files)
|
38
|
+
|
39
|
+
# Ruby files
|
40
|
+
ruby = dsl.ruby
|
41
|
+
dsl.watch_spec_files_for(ruby.lib_files)
|
42
|
+
|
43
|
+
end
|
data/LICENSE.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# MIT LICENSE
|
2
|
+
|
3
|
+
Copyright (c) 2020 Ryan Wong <lazing@gmail.com>
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
# Tencent::Cloud
|
2
|
+
|
3
|
+
腾讯云 QCloud API 3.0 Ruby SDK
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'tencent-cloud'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install tencent-cloud
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
client = Tencent::Cloud::Client.new 'apguanzhou', 'AKIDz8krbsJ5yKBZQpn74WFkmLPx3*******', 'Gu5t9xGARNpq86cd98joQYCN3*******', SmsSdkAppid: 1234567890
|
25
|
+
client.switch_to 'cvm', 'cvm.tencentcloudapi.com' # 切换接口,设定服务和地址
|
26
|
+
response_body = client.post(a: 1, b: 2) # 响应报文体解析为Hash
|
27
|
+
client.post({a: 1, b: 2}, h1: 1, h2: 2) # 请求参数可以有两个:第一组Hash为报文体,第二组为头部
|
28
|
+
|
29
|
+
client.send_sms ['+8613912312345'], 1, ['code'], 'sign' # 实现常用方法包装
|
30
|
+
|
31
|
+
```
|
32
|
+
|
33
|
+
### 常用方法
|
34
|
+
|
35
|
+
#### SMS短信服务
|
36
|
+
详细内容参考`Tencent::Cloud::Sms` 或 `sms_spec.rb`
|
37
|
+
1. send_sms(numbers, template_id, params, sign = nil, **args)
|
38
|
+
|
39
|
+
## Development
|
40
|
+
|
41
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
42
|
+
|
43
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
44
|
+
|
45
|
+
## Contributing
|
46
|
+
|
47
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/dianping-api.
|
48
|
+
|
49
|
+
## License
|
50
|
+
|
51
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'logger'
|
2
|
+
|
3
|
+
module Tencent
|
4
|
+
module Cloud
|
5
|
+
|
6
|
+
def self.logger
|
7
|
+
@@logger ||= defined?(Rails) ? Rails.logger : ::Logger.new(STDOUT)
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.logger=(logger)
|
11
|
+
@@logger = logger
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
require 'tencent/cloud/client'
|
17
|
+
require 'tencent/cloud/sms_api'
|
@@ -0,0 +1,174 @@
|
|
1
|
+
require 'faraday'
|
2
|
+
require 'digest'
|
3
|
+
require 'openssl'
|
4
|
+
|
5
|
+
module Tencent
|
6
|
+
module Cloud
|
7
|
+
#
|
8
|
+
# create tencent cloud api client. request need different instance
|
9
|
+
#
|
10
|
+
# > client = Tencent::Cloud.client.new 'region', 'secret_id', 'secret_key'
|
11
|
+
# > client.swith_to 'cvm', 'cvm.tencentcloudapi.com' # optional. for quick api call will use defualt
|
12
|
+
# > client.post json_text # text or hash, hash will use MultiJson.dump to convert
|
13
|
+
#
|
14
|
+
class Client
|
15
|
+
attr_reader :host, :service, :secret_id, :secret_key, :region, :options
|
16
|
+
|
17
|
+
def initialize(region, secret_id, secret_key, **options)
|
18
|
+
@secret_id = secret_id
|
19
|
+
@region = region
|
20
|
+
@secret_key = secret_key
|
21
|
+
@options = options
|
22
|
+
end
|
23
|
+
|
24
|
+
def switch_to(service, host)
|
25
|
+
Cloud.logger.debug { {service: service, host: host} }
|
26
|
+
@service = service
|
27
|
+
@host = host
|
28
|
+
end
|
29
|
+
|
30
|
+
def connection
|
31
|
+
Faraday.new(url: "https://#{host}") do |conn|
|
32
|
+
conn.request :retry
|
33
|
+
# conn.request :url_encoded
|
34
|
+
conn.response :logger
|
35
|
+
conn.response :raise_error
|
36
|
+
conn.adapter :net_http
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def post(body = nil, headers = nil)
|
41
|
+
yield(self) if block_given?
|
42
|
+
params = body.is_a?(Hash) ? MultiJson.dump(body) : body
|
43
|
+
Cloud.logger.debug { { body: body, headers: headers } }
|
44
|
+
res = connection.post('/', params, public_headers(body, headers))
|
45
|
+
json(res.body)
|
46
|
+
end
|
47
|
+
|
48
|
+
def method_missing(symbol, *args)
|
49
|
+
key = camel_case(symbol.to_s)
|
50
|
+
# pp key, ::Tencent::Cloud.constants, ::Tencent::Cloud.const_defined?(key)
|
51
|
+
super(symbol, *args) unless ::Tencent::Cloud.const_defined?(key)
|
52
|
+
|
53
|
+
Tencent::Cloud.const_get(key).new region, secret_id, secret_key, options
|
54
|
+
end
|
55
|
+
|
56
|
+
def respond_to_missing?(method_name, include_private = false)
|
57
|
+
method_name.to_s.end_with?('_api') || super
|
58
|
+
end
|
59
|
+
|
60
|
+
def camel_case(key)
|
61
|
+
key.split('_').map(&:capitalize).join
|
62
|
+
end
|
63
|
+
|
64
|
+
def json(data)
|
65
|
+
return {} unless data && !data.empty?
|
66
|
+
|
67
|
+
MultiJson.load data, symbolize_keys: true
|
68
|
+
end
|
69
|
+
|
70
|
+
def public_headers(body, headers)
|
71
|
+
datus = (headers || {}).dup
|
72
|
+
datus.merge!(body) if body.is_a?(Hash)
|
73
|
+
{
|
74
|
+
'Authorization' => authorization(signature('POST', body)),
|
75
|
+
'Content-Type' => 'application/json; charset=utf-8', 'Host' => host,
|
76
|
+
'X-TC-Action' => datus[:Action], 'X-TC-Timestamp' => sign_timestamp,
|
77
|
+
'X-TC-Version' => datus[:Version], 'X-TC-Region' => region
|
78
|
+
}.merge!(headers || {})
|
79
|
+
end
|
80
|
+
|
81
|
+
def authorization(signature)
|
82
|
+
[
|
83
|
+
algorithm, ' ',
|
84
|
+
'Credential=', secret_id, '/', credential_scope, ', ',
|
85
|
+
'SignedHeaders=', signed_headers, ', ',
|
86
|
+
'Signature=', signature
|
87
|
+
].join
|
88
|
+
end
|
89
|
+
|
90
|
+
def algorithm
|
91
|
+
'TC3-HMAC-SHA256'
|
92
|
+
end
|
93
|
+
|
94
|
+
def sign_version
|
95
|
+
'tc3_request'
|
96
|
+
end
|
97
|
+
|
98
|
+
def credential_scope
|
99
|
+
[sign_date, service, sign_version].join('/')
|
100
|
+
end
|
101
|
+
|
102
|
+
def canonical_headers
|
103
|
+
{
|
104
|
+
'content-type' => 'application/json; charset=utf-8',
|
105
|
+
'host' => host
|
106
|
+
}.map { |p| p.join(':') }.join("\n") + "\n"
|
107
|
+
end
|
108
|
+
|
109
|
+
def signed_headers
|
110
|
+
%w[content-type host].join(';')
|
111
|
+
end
|
112
|
+
|
113
|
+
def hashed_request_payload(request_payload)
|
114
|
+
request_payload = MultiJson.dump(request_payload) if request_payload.is_a?(Hash)
|
115
|
+
hash_sha256(request_payload)
|
116
|
+
end
|
117
|
+
|
118
|
+
def hashed_canonical_request(request_method, hashed_request_payload)
|
119
|
+
res = [
|
120
|
+
request_method, '/', '',
|
121
|
+
canonical_headers, signed_headers,
|
122
|
+
hashed_request_payload
|
123
|
+
].join("\n")
|
124
|
+
hash_sha256(res)
|
125
|
+
end
|
126
|
+
|
127
|
+
def signature(request_method, request_payload)
|
128
|
+
hashed = hashed_request_payload(request_payload)
|
129
|
+
data = hashed_canonical_request(request_method, hashed)
|
130
|
+
content =
|
131
|
+
hmac_sha256(
|
132
|
+
secret_signing,
|
133
|
+
string_to_sign(data)
|
134
|
+
)
|
135
|
+
hex_encode(content)
|
136
|
+
end
|
137
|
+
|
138
|
+
def sign_date
|
139
|
+
sign_time.strftime '%F'
|
140
|
+
end
|
141
|
+
|
142
|
+
def sign_time
|
143
|
+
@sign_time ||= Time.now.getutc
|
144
|
+
end
|
145
|
+
|
146
|
+
def sign_timestamp
|
147
|
+
sign_time.to_i.to_s
|
148
|
+
end
|
149
|
+
|
150
|
+
def secret_signing
|
151
|
+
secret_date = hmac_sha256('TC3' + secret_key, sign_date)
|
152
|
+
secret_service = hmac_sha256(secret_date, service)
|
153
|
+
hmac_sha256(secret_service, sign_version)
|
154
|
+
end
|
155
|
+
|
156
|
+
def string_to_sign(hashed_canonical_request)
|
157
|
+
timestamp = sign_timestamp
|
158
|
+
[algorithm, timestamp, credential_scope, hashed_canonical_request].join("\n")
|
159
|
+
end
|
160
|
+
|
161
|
+
def hex_encode(content)
|
162
|
+
Digest.hexencode content
|
163
|
+
end
|
164
|
+
|
165
|
+
def hash_sha256(data)
|
166
|
+
Digest::SHA256.hexdigest(data).downcase
|
167
|
+
end
|
168
|
+
|
169
|
+
def hmac_sha256(key, data)
|
170
|
+
OpenSSL::HMAC.digest('SHA256', key, data)
|
171
|
+
end
|
172
|
+
end
|
173
|
+
end
|
174
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module Tencent
|
2
|
+
module Cloud
|
3
|
+
class SmsApi < Client
|
4
|
+
|
5
|
+
def initialize(*args)
|
6
|
+
super(*args)
|
7
|
+
switch_to('sms', 'sms.tencentcloudapi.com')
|
8
|
+
end
|
9
|
+
|
10
|
+
##
|
11
|
+
# Send SMS to client
|
12
|
+
#
|
13
|
+
# @param numbers [Array] client numbers in format +[country_code][number]
|
14
|
+
# @param template_id [String] sms template id
|
15
|
+
# @param params [Array] sms template params
|
16
|
+
# @param sign [String] optional for china local message
|
17
|
+
# @param args [Hash] other api parameters
|
18
|
+
def send_sms(numbers, template_id, params, sign = nil, **args)
|
19
|
+
headers = { Action: 'SendSms' }.merge(share_headers)
|
20
|
+
datus = {
|
21
|
+
PhoneNumberSet: numbers, TemplateID: template_id,
|
22
|
+
Sign: sign, TemplateParamSet: params
|
23
|
+
}
|
24
|
+
datus.merge!(args) if args
|
25
|
+
post(datus, headers)
|
26
|
+
end
|
27
|
+
|
28
|
+
def describe_sms_sign_list(list, international)
|
29
|
+
headers = { Action: 'DescribeSmsSignList' }.merge(share_headers)
|
30
|
+
datus = { SignIdSet: list, International: international }
|
31
|
+
post(datus, headers)
|
32
|
+
end
|
33
|
+
|
34
|
+
def share_headers
|
35
|
+
{ Version: '2019-07-11', SmsSdkAppid: options[:SmsSdkAppid].to_s }
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
$:.unshift File.expand_path('../lib', __FILE__)
|
4
|
+
require 'tencent/cloud/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = 'tencent-cloud'
|
8
|
+
s.version = Tencent::Cloud::VERSION
|
9
|
+
s.authors = ['Ryan Wong']
|
10
|
+
s.email = ['lazing@gmail.com']
|
11
|
+
s.homepage = 'https://github.com/lazing/tencent-cloud'
|
12
|
+
s.licenses = ['MIT']
|
13
|
+
s.summary = '[summary]'
|
14
|
+
s.description = '[description]'
|
15
|
+
|
16
|
+
s.files = Dir.glob('{bin/*,lib/**/*,[A-Z]*}')
|
17
|
+
s.platform = Gem::Platform::RUBY
|
18
|
+
s.require_paths = ['lib']
|
19
|
+
|
20
|
+
s.add_dependency 'faraday', '~> 1.0'
|
21
|
+
s.add_dependency 'multi_json', '~> 1.0'
|
22
|
+
|
23
|
+
s.add_development_dependency "bundler", "~> 1.17"
|
24
|
+
s.add_development_dependency "guard", "~> 2.0"
|
25
|
+
s.add_development_dependency "guard-rspec", "~> 4.0"
|
26
|
+
s.add_development_dependency "rake", "~> 10.0"
|
27
|
+
s.add_development_dependency "rspec", "~> 3.0"
|
28
|
+
s.add_development_dependency "rspec-its", "~> 1.0"
|
29
|
+
s.add_development_dependency 'webmock', "~> 3.0"
|
30
|
+
end
|
metadata
ADDED
@@ -0,0 +1,179 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: tencent-cloud
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ryan Wong
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-12-01 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: faraday
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: multi_json
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.17'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.17'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: guard
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '2.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '2.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: guard-rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '4.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '4.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rake
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '10.0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '10.0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '3.0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '3.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rspec-its
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '1.0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '1.0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: webmock
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '3.0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '3.0'
|
139
|
+
description: "[description]"
|
140
|
+
email:
|
141
|
+
- lazing@gmail.com
|
142
|
+
executables: []
|
143
|
+
extensions: []
|
144
|
+
extra_rdoc_files: []
|
145
|
+
files:
|
146
|
+
- Gemfile
|
147
|
+
- Gemfile.lock
|
148
|
+
- Guardfile
|
149
|
+
- LICENSE.md
|
150
|
+
- README.md
|
151
|
+
- lib/tencent/cloud.rb
|
152
|
+
- lib/tencent/cloud/client.rb
|
153
|
+
- lib/tencent/cloud/sms_api.rb
|
154
|
+
- lib/tencent/cloud/version.rb
|
155
|
+
- tencent-cloud.gemspec
|
156
|
+
homepage: https://github.com/lazing/tencent-cloud
|
157
|
+
licenses:
|
158
|
+
- MIT
|
159
|
+
metadata: {}
|
160
|
+
post_install_message:
|
161
|
+
rdoc_options: []
|
162
|
+
require_paths:
|
163
|
+
- lib
|
164
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
165
|
+
requirements:
|
166
|
+
- - ">="
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
version: '0'
|
169
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
requirements: []
|
175
|
+
rubygems_version: 3.0.6
|
176
|
+
signing_key:
|
177
|
+
specification_version: 4
|
178
|
+
summary: "[summary]"
|
179
|
+
test_files: []
|