piliv2 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 698dc78d73f17a61df99562bafa0147e5b0a03cc
4
- data.tar.gz: 805206f6c3a86feeaf724fae2b3ef338a831dba8
3
+ metadata.gz: 97dfebd5e4030f8629b73f5393148f569795776e
4
+ data.tar.gz: d57d317deeb66269684db8420c83753bbeb95c0b
5
5
  SHA512:
6
- metadata.gz: 71ff1db811bc913d6982f2a75785342747db9737c9a0e53961d48dfc774b908dc47320822689e8f12f5ff1d81ff1235449b3834aa5bd820dab6f0b25b36772a3
7
- data.tar.gz: 1517952e3cfd76a6e3eb9500fe02a6e974dea49d9661c31f1675188c0c3be476e3d995ffb95cfc7ab04bb49ce76a7492f0232a79d5e5e2dc3ae01ab019c69648
6
+ metadata.gz: 4a9d18ae1309ab3453b69b793833377ae05af23b23c3cdd5c8528344d4e955ba7c720e5e7f326eb43fa0fb225f4c919773f2510f5d4222702fd447603415566d
7
+ data.tar.gz: 65f99cb8f596fed33b714b7211e23e72c780f9a3cec43947376950c24bd2d3a7322ddb14bf4bcd133958f1514a1936978a9ea3616fa469cd3ab29776f41bf76c
data/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ ## CHANGE LOG
2
+
3
+ ### v2.0.1
4
+
5
+ - 使用 `openssl` 替代被废弃的 `digest/hmac`。[#29](https://github.com/pili-engineering/pili-sdk-ruby/pull/29)
6
+
7
+ ### v2.0.0
8
+
9
+ - 初始版本
data/lib/pili/auth.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  # coding: utf-8
2
- require 'digest/hmac'
2
+
3
+ require 'openssl'
3
4
  require "base64"
4
5
 
5
6
  module Pili
@@ -13,7 +14,8 @@ module Pili
13
14
  end
14
15
 
15
16
  def sign(data)
16
- signature = Base64.urlsafe_encode64(Digest::HMAC.digest(data, @secret_key, Digest::SHA1))
17
+ digest = OpenSSL::HMAC.digest(OpenSSL::Digest.new("sha1"), @secret_key, data)
18
+ signature = Base64.urlsafe_encode64(digest)
17
19
  "#{@access_key}:#{signature}"
18
20
  end
19
21
 
data/lib/pili/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pili
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
data/pili.gemspec CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Pili Engineer"]
10
10
  spec.email = ["pili@qiniu.com"]
11
11
  spec.summary = %q{Pili Streaming Cloud Server-Side Library For Ruby.}
12
- spec.description = %q{Pili Streaming Cloud Server-Side Library For Ruby.}
12
+ spec.description = %q{Pili Streaming Cloud Server-Side Library For Ruby. Quick setup, fast play.}
13
13
  spec.homepage = "https://github.com/pili-engineering/pili-sdk-ruby"
14
14
  spec.license = "MIT"
15
15
 
@@ -18,6 +18,6 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_development_dependency "bundler"
22
- spec.add_development_dependency "rake"
21
+ spec.add_development_dependency "bundler", '~> 0'
22
+ spec.add_development_dependency "rake", '~> 0'
23
23
  end
metadata CHANGED
@@ -1,44 +1,45 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: piliv2
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pili Engineer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-01 00:00:00.000000000 Z
11
+ date: 2016-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- description: Pili Streaming Cloud Server-Side Library For Ruby.
41
+ description: Pili Streaming Cloud Server-Side Library For Ruby. Quick setup, fast
42
+ play.
42
43
  email:
43
44
  - pili@qiniu.com
44
45
  executables: []
@@ -47,6 +48,7 @@ extra_rdoc_files: []
47
48
  files:
48
49
  - ".gitignore"
49
50
  - ".travis.yml"
51
+ - CHANGELOG.md
50
52
  - Gemfile
51
53
  - LICENSE
52
54
  - README.md