qcloud-vod-sdk 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +52 -0
- data/README.md +54 -0
- data/Rakefile +2 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/qcloud_vod.rb +39 -0
- data/lib/qcloud_vod/api/v1/t_events.rb +24 -0
- data/lib/qcloud_vod/api/v1/t_media.rb +30 -0
- data/lib/qcloud_vod/api/v1/t_task.rb +28 -0
- data/lib/qcloud_vod/configuration.rb +5 -0
- data/lib/qcloud_vod/error.rb +18 -0
- data/lib/qcloud_vod/http.rb +74 -0
- data/lib/qcloud_vod/sign.rb +48 -0
- data/lib/qcloud_vod/utils.rb +20 -0
- data/lib/qcloud_vod/version.rb +3 -0
- data/qcloud-vod-sdk.gemspec +45 -0
- metadata +149 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c707232241b42f52f421e523b31a20cea881c5ae2923775b0a85eb15a2030f10
|
4
|
+
data.tar.gz: f5824468217cef98c707b042649da1df3f3d86980135968d22715728022e3e79
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0af9029a02d0fc632ddc65083af902a9f9b8533dc74f8f291cfdf175c4ca2f679b065daec48735beb9a74e5cc18b80a7587b99e77ee774d203b6311517de91be
|
7
|
+
data.tar.gz: 75a139772f90a03be1db037f034985761798ea7fc6e878fadaa2c5bdbf5327e57ea47080a546ae456a87a067d41a06d2f02a6b6fba6f3181bf7b8f4e08cddd24
|
data/.gitignore
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at TODO: Write your email address. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
qcloud-vod-sdk (0.1.1)
|
5
|
+
activesupport
|
6
|
+
addressable
|
7
|
+
httmultiparty
|
8
|
+
httparty
|
9
|
+
|
10
|
+
GEM
|
11
|
+
remote: https://gems.ruby-china.com/
|
12
|
+
specs:
|
13
|
+
activesupport (5.2.3)
|
14
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
15
|
+
i18n (>= 0.7, < 2)
|
16
|
+
minitest (~> 5.1)
|
17
|
+
tzinfo (~> 1.1)
|
18
|
+
addressable (2.6.0)
|
19
|
+
public_suffix (>= 2.0.2, < 4.0)
|
20
|
+
concurrent-ruby (1.1.5)
|
21
|
+
httmultiparty (0.3.16)
|
22
|
+
httparty (>= 0.7.3)
|
23
|
+
mimemagic
|
24
|
+
multipart-post
|
25
|
+
httparty (0.16.4)
|
26
|
+
mime-types (~> 3.0)
|
27
|
+
multi_xml (>= 0.5.2)
|
28
|
+
i18n (1.6.0)
|
29
|
+
concurrent-ruby (~> 1.0)
|
30
|
+
mime-types (3.2.2)
|
31
|
+
mime-types-data (~> 3.2015)
|
32
|
+
mime-types-data (3.2019.0331)
|
33
|
+
mimemagic (0.3.3)
|
34
|
+
minitest (5.11.3)
|
35
|
+
multi_xml (0.6.0)
|
36
|
+
multipart-post (2.0.0)
|
37
|
+
public_suffix (3.0.3)
|
38
|
+
rake (10.5.0)
|
39
|
+
thread_safe (0.3.6)
|
40
|
+
tzinfo (1.2.5)
|
41
|
+
thread_safe (~> 0.1)
|
42
|
+
|
43
|
+
PLATFORMS
|
44
|
+
ruby
|
45
|
+
|
46
|
+
DEPENDENCIES
|
47
|
+
bundler (~> 2.0)
|
48
|
+
qcloud-vod-sdk!
|
49
|
+
rake (~> 10.0)
|
50
|
+
|
51
|
+
BUNDLED WITH
|
52
|
+
2.0.1
|
data/README.md
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
# Qcloud::Vod::Sdk
|
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/qcloud/vod/sdk`. 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
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'qcloud-vod-sdk'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install qcloud-vod-sdk
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
```ruby
|
25
|
+
QcloudVod.configure do |config|
|
26
|
+
config.secret_key = "*******"
|
27
|
+
config.secret_id = "************"
|
28
|
+
end
|
29
|
+
# get event list
|
30
|
+
QcloudVod.pull_events
|
31
|
+
|
32
|
+
#describe_tasks before 3 days data
|
33
|
+
QcloudVod.describe_tasks
|
34
|
+
|
35
|
+
# get media info ,params is array max 18
|
36
|
+
QcloudVod.info([fieldid])
|
37
|
+
```
|
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]/qcloud-vod-sdk. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
48
|
+
|
49
|
+
## Code of Conduct
|
50
|
+
|
51
|
+
Everyone interacting in the Qcloud::Vod::Sdk project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/qcloud-vod-sdk/blob/master/CODE_OF_CONDUCT.md).
|
52
|
+
|
53
|
+
## Document
|
54
|
+
+ [VOD RESTful API文档](https://cloud.tencent.com/document/product/266/31752)
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "qcloud_vod"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/lib/qcloud_vod.rb
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'qcloud_vod/version'
|
2
|
+
require 'qcloud_vod/configuration'
|
3
|
+
require 'qcloud_vod/sign'
|
4
|
+
require 'qcloud_vod/http'
|
5
|
+
require 'qcloud_vod/api/v1/t_task'
|
6
|
+
require 'qcloud_vod/api/v1/t_events'
|
7
|
+
require 'qcloud_vod/api/v1/t_media'
|
8
|
+
|
9
|
+
require 'qcloud_vod/utils'
|
10
|
+
module QcloudVod
|
11
|
+
|
12
|
+
class << self
|
13
|
+
include Api::V1::TTask
|
14
|
+
include Api::V1::TEvents
|
15
|
+
include Api::V1::TMedia
|
16
|
+
|
17
|
+
|
18
|
+
def configure
|
19
|
+
@configuration ||= Configuration.new
|
20
|
+
yield @configuration
|
21
|
+
@configuration
|
22
|
+
end
|
23
|
+
|
24
|
+
def config
|
25
|
+
@configuration
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
|
30
|
+
def authorization
|
31
|
+
Sign.new(config)
|
32
|
+
end
|
33
|
+
|
34
|
+
def http
|
35
|
+
Http.new(config)
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module QcloudVod
|
2
|
+
module Api
|
3
|
+
module V1
|
4
|
+
module TEvents
|
5
|
+
|
6
|
+
def pull_events
|
7
|
+
r_method = "GET"
|
8
|
+
r_host = "vod.tencentcloudapi.com/"
|
9
|
+
|
10
|
+
options = { Action: 'PullEvents' }
|
11
|
+
options.merge!({ SignatureMethod: 'HmacSHA1'})
|
12
|
+
options.merge!({ Region: ''})
|
13
|
+
sign = authorization.get_value(r_method,r_host,options,Time.now.to_i+86400)
|
14
|
+
|
15
|
+
options.merge!({ Signature: sign})
|
16
|
+
|
17
|
+
res = http.get("https://vod.tencentcloudapi.com/?#{options.to_query}")
|
18
|
+
ActiveSupport::HashWithIndifferentAccess.new(JSON.parse(res.body))
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module QcloudVod
|
2
|
+
module Api
|
3
|
+
module V1
|
4
|
+
module TMedia
|
5
|
+
|
6
|
+
def info(file_ids=[])
|
7
|
+
r_method = "GET"
|
8
|
+
r_host = "vod.tencentcloudapi.com/"
|
9
|
+
|
10
|
+
options = { Action: 'DescribeMediaInfos' }
|
11
|
+
file_ids[0..18].each_with_index do |f,i|
|
12
|
+
options.merge!({ "FileIds.#{i}": f })
|
13
|
+
end
|
14
|
+
options.merge!({ SignatureMethod: 'HmacSHA1'})
|
15
|
+
options.merge!({ Region: ''})
|
16
|
+
sign = authorization.get_value(r_method,r_host,options,Time.now.to_i+86400)
|
17
|
+
|
18
|
+
options.merge!({ Signature: sign})
|
19
|
+
|
20
|
+
res = http.get("https://vod.tencentcloudapi.com/?#{options.to_query}")
|
21
|
+
p res.methods
|
22
|
+
p res.response
|
23
|
+
p res.body
|
24
|
+
ActiveSupport::HashWithIndifferentAccess.new(JSON.parse(res.body))
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module QcloudVod
|
2
|
+
module Api
|
3
|
+
module V1
|
4
|
+
module TTask
|
5
|
+
|
6
|
+
def describe_tasks
|
7
|
+
r_method = "GET"
|
8
|
+
r_host = "vod.tencentcloudapi.com/"
|
9
|
+
|
10
|
+
options = { Action: 'DescribeTasks' }
|
11
|
+
options.merge!({ Status: 'FINISH' })
|
12
|
+
options.merge!({ SignatureMethod: 'HmacSHA1'})
|
13
|
+
options.merge!({ Region: ''})
|
14
|
+
sign = authorization.get_value(r_method,r_host,options,Time.now.to_i+86400)
|
15
|
+
|
16
|
+
options.merge!({ Signature: sign})
|
17
|
+
|
18
|
+
res = http.get("https://vod.tencentcloudapi.com/?#{options.to_query}")
|
19
|
+
p res.methods
|
20
|
+
p res.response
|
21
|
+
p res.body
|
22
|
+
ActiveSupport::HashWithIndifferentAccess.new(JSON.parse(res.body))
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module QcloudVod
|
2
|
+
class Error < StandardError; end
|
3
|
+
|
4
|
+
class RequestError < Error
|
5
|
+
attr_reader :code
|
6
|
+
attr_reader :message
|
7
|
+
attr_reader :origin_response
|
8
|
+
|
9
|
+
def initialize(response)
|
10
|
+
if response.parsed_response.key?('Code')
|
11
|
+
@code = response.parsed_response['Code']
|
12
|
+
@message = response.parsed_response['Message']
|
13
|
+
end
|
14
|
+
@origin_response = response
|
15
|
+
super("API ERROR Code=#{@code}, Message=#{@message}")
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
require 'httparty'
|
2
|
+
require 'httmultiparty'
|
3
|
+
require 'addressable/uri'
|
4
|
+
require 'qcloud_vod/error'
|
5
|
+
module QcloudVod
|
6
|
+
class Http
|
7
|
+
include HTTParty
|
8
|
+
include HTTMultiParty
|
9
|
+
|
10
|
+
attr_reader :config
|
11
|
+
|
12
|
+
def initialize(config)
|
13
|
+
@config = config
|
14
|
+
end
|
15
|
+
|
16
|
+
def get(url, options = {})
|
17
|
+
request('GET', url, options)
|
18
|
+
end
|
19
|
+
|
20
|
+
def post(url, options = {})
|
21
|
+
request('POST', url, options)
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def request(verb, url, options = {})
|
27
|
+
query = options.fetch(:query, {})
|
28
|
+
headers = options.fetch(:headers, {})
|
29
|
+
body = options.delete(:body)
|
30
|
+
|
31
|
+
append_headers!(headers, verb, body, options)
|
32
|
+
options = { headers: headers, query: query, body: body }
|
33
|
+
append_options!(options, url)
|
34
|
+
|
35
|
+
wrap(self.class.__send__(verb.downcase, url, options))
|
36
|
+
end
|
37
|
+
|
38
|
+
def wrap(response)
|
39
|
+
if response.code == 200
|
40
|
+
response
|
41
|
+
else
|
42
|
+
# raise QcloudVod::Http::ResponseError.new(action, res) if result['Response']['Error']
|
43
|
+
fail RequestError, response
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def append_headers!(headers, _verb, body, _options)
|
48
|
+
append_default_headers!(headers)
|
49
|
+
append_body_headers!(headers, body)
|
50
|
+
end
|
51
|
+
|
52
|
+
def append_options!(options, url)
|
53
|
+
options.merge!(uri_adapter: Addressable::URI)
|
54
|
+
# if config.ssl_ca_file
|
55
|
+
# options.merge!(ssl_ca_file: config.ssl_ca_file)
|
56
|
+
# elsif url.start_with?('https://')
|
57
|
+
# options.merge!(verify_peer: true)
|
58
|
+
# end
|
59
|
+
end
|
60
|
+
|
61
|
+
def append_default_headers!(headers)
|
62
|
+
headers.merge!(default_headers)
|
63
|
+
end
|
64
|
+
|
65
|
+
def append_body_headers!(headers, body)
|
66
|
+
headers.merge!('Content-Length' => Utils.content_size(body).to_s) if body
|
67
|
+
end
|
68
|
+
|
69
|
+
def default_headers
|
70
|
+
{}
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|
74
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'base64'
|
2
|
+
require 'openssl'
|
3
|
+
require 'digest'
|
4
|
+
require 'active_support/all'
|
5
|
+
|
6
|
+
module QcloudVod
|
7
|
+
class Sign
|
8
|
+
attr_reader :config
|
9
|
+
|
10
|
+
# 用于对请求进行签名
|
11
|
+
# @param config [Configration] specify configuration for sign
|
12
|
+
#
|
13
|
+
def initialize(config)
|
14
|
+
@config = config
|
15
|
+
end
|
16
|
+
|
17
|
+
def get_value(r_method,r_host,params,expireTime=current_time+86400)
|
18
|
+
sign_base(r_method,r_host,params,expireTime)
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
def sign_base(r_method,r_host,params,expireTime)
|
23
|
+
params.merge!({ SecretId: secret_id })
|
24
|
+
params.merge!({ Timestamp: current_time })
|
25
|
+
params.merge!({ Nonce: rdm })
|
26
|
+
params.merge!({ Version: '2018-07-17' })
|
27
|
+
src_str = "#{r_method}#{r_host}?#{params.to_query}"
|
28
|
+
Base64.encode64("#{OpenSSL::HMAC.digest('sha1', secret_key, src_str)}").delete("\n").strip
|
29
|
+
end
|
30
|
+
|
31
|
+
def secret_id
|
32
|
+
config.secret_id
|
33
|
+
end
|
34
|
+
|
35
|
+
def secret_key
|
36
|
+
config.secret_key
|
37
|
+
end
|
38
|
+
|
39
|
+
def current_time
|
40
|
+
Time.now.to_i
|
41
|
+
end
|
42
|
+
|
43
|
+
def rdm
|
44
|
+
rand(10**9)
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module QcloudVod
|
2
|
+
class Utils
|
3
|
+
class << self
|
4
|
+
# 对 path 进行 url_encode
|
5
|
+
def url_encode(path)
|
6
|
+
ERB::Util.url_encode(path).gsub('%2F', '/')
|
7
|
+
end
|
8
|
+
|
9
|
+
# 计算 content 的大小
|
10
|
+
def content_size(content)
|
11
|
+
if content.respond_to?(:size)
|
12
|
+
content.size
|
13
|
+
elsif content.is_a?(IO)
|
14
|
+
content.stat.size
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "qcloud_vod/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "qcloud-vod-sdk"
|
8
|
+
spec.version = QcloudVod::VERSION
|
9
|
+
spec.authors = ["jack"]
|
10
|
+
spec.email = ["qinshenyong@socialdatamax.com"]
|
11
|
+
|
12
|
+
spec.summary = 'a gem is qcloud vod package'
|
13
|
+
spec.description = 'a gem is qcloud vod package'
|
14
|
+
spec.homepage = "https://github.com/cs-cj/qcloud-vod-sdk"
|
15
|
+
|
16
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
17
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
18
|
+
if spec.respond_to?(:metadata)
|
19
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
20
|
+
|
21
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
22
|
+
spec.metadata["source_code_uri"] = "https://github.com/cs-cj/qcloud-vod-sdk"
|
23
|
+
# spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
|
24
|
+
else
|
25
|
+
raise "RubyGems 2.0 or newer is required to protect against " \
|
26
|
+
"public gem pushes."
|
27
|
+
end
|
28
|
+
|
29
|
+
# Specify which files should be added to the gem when it is released.
|
30
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
31
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
32
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
33
|
+
end
|
34
|
+
spec.bindir = "exe"
|
35
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
36
|
+
spec.require_paths = ["lib"]
|
37
|
+
|
38
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
39
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
40
|
+
|
41
|
+
spec.add_dependency 'httparty'
|
42
|
+
spec.add_dependency 'httmultiparty'
|
43
|
+
spec.add_dependency 'addressable'
|
44
|
+
spec.add_dependency 'activesupport'
|
45
|
+
end
|
metadata
ADDED
@@ -0,0 +1,149 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: qcloud-vod-sdk
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- jack
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-04-10 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: httparty
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: httmultiparty
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: addressable
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: activesupport
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
description: a gem is qcloud vod package
|
98
|
+
email:
|
99
|
+
- qinshenyong@socialdatamax.com
|
100
|
+
executables: []
|
101
|
+
extensions: []
|
102
|
+
extra_rdoc_files: []
|
103
|
+
files:
|
104
|
+
- ".gitignore"
|
105
|
+
- CODE_OF_CONDUCT.md
|
106
|
+
- Gemfile
|
107
|
+
- Gemfile.lock
|
108
|
+
- README.md
|
109
|
+
- Rakefile
|
110
|
+
- bin/console
|
111
|
+
- bin/setup
|
112
|
+
- lib/qcloud_vod.rb
|
113
|
+
- lib/qcloud_vod/api/v1/t_events.rb
|
114
|
+
- lib/qcloud_vod/api/v1/t_media.rb
|
115
|
+
- lib/qcloud_vod/api/v1/t_task.rb
|
116
|
+
- lib/qcloud_vod/configuration.rb
|
117
|
+
- lib/qcloud_vod/error.rb
|
118
|
+
- lib/qcloud_vod/http.rb
|
119
|
+
- lib/qcloud_vod/sign.rb
|
120
|
+
- lib/qcloud_vod/utils.rb
|
121
|
+
- lib/qcloud_vod/version.rb
|
122
|
+
- qcloud-vod-sdk.gemspec
|
123
|
+
homepage: https://github.com/cs-cj/qcloud-vod-sdk
|
124
|
+
licenses: []
|
125
|
+
metadata:
|
126
|
+
allowed_push_host: https://rubygems.org
|
127
|
+
homepage_uri: https://github.com/cs-cj/qcloud-vod-sdk
|
128
|
+
source_code_uri: https://github.com/cs-cj/qcloud-vod-sdk
|
129
|
+
post_install_message:
|
130
|
+
rdoc_options: []
|
131
|
+
require_paths:
|
132
|
+
- lib
|
133
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
138
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
139
|
+
requirements:
|
140
|
+
- - ">="
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: '0'
|
143
|
+
requirements: []
|
144
|
+
rubyforge_project:
|
145
|
+
rubygems_version: 2.7.9
|
146
|
+
signing_key:
|
147
|
+
specification_version: 4
|
148
|
+
summary: a gem is qcloud vod package
|
149
|
+
test_files: []
|