wechat-validation 0.2.1 → 1.0

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
- SHA1:
3
- metadata.gz: 7e976d382b0682e853dfc2b5ca3300cf709ceef1
4
- data.tar.gz: 78b7cce53115b76455f2c649e542a221917f0931
2
+ SHA256:
3
+ metadata.gz: 2bb424f703d5c856c6d2cbdf5aa99c89236ce1761800cff951cefe8a0636f6ce
4
+ data.tar.gz: e05df5f32d84d978acfe8ff6e7c77a4cfd6870939235e0b9322ec9a8cfcc672a
5
5
  SHA512:
6
- metadata.gz: 18fbf333ab842251899bce8e91ef54accd63f17856715e198c9b4a1d2f6c6767237409fed730e6a8df9460f318196667ffa420926b663e63ac5761b783b47d26
7
- data.tar.gz: 96a68cb7b7ef16e86e363425204f2781586c5ea248155fc7a9abeccf39bf72d04f21f9e974c670d03dcc562388941d6deb7096fa374f155bf008f09ec6471088
6
+ metadata.gz: a1167bbf8c9d2ebd77670e671452570dcbb864cd32b8efe867e185aa4f336bd38268bbc247304a34992d2356a8fe979b02eafec801ffd44b77d7405a9af6d137
7
+ data.tar.gz: e50d37e1b4cdef3f475eaa703aa97a39fb7db718499d91dfaee212536c0f79b1c49c947d4147321c29849ff5f34f4d89a68d6a329289289ac7fd33fbb6256722
data/CHANGELOG.md CHANGED
@@ -1,11 +1,18 @@
1
1
  # Wechat Validation Change Log 微信验证库变更日志
2
2
 
3
3
  ## v0.1
4
+
4
5
  1. Wechat::Validation.sign method
5
6
 
6
7
  ## v0.2
7
- 1. Deprecated the Wechat Validation ::sign method, use Wechat Validation Signature ::create instead
8
+
9
+ 1. Improve the Wechat Validation to deprecate the .``sign`` method, use Wechat Validation Signature .``create`` instead
8
10
 
9
11
  ## v0.2.1
10
- 1. Improve the Ruby Gem Specification to depend on [wechat-core](https://github.com/topbitdu/wechat-core) v0.4
11
- 2. Improve the Signature class for the argument validation
12
+
13
+ 1. Improved the Ruby Gem Specification to depend on [wechat-core](https://github.com/topbitdu/wechat-core) v0.4
14
+ 2. Improved the Signature class for the argument validation
15
+
16
+ ## v1.0
17
+
18
+ 1. Improved the Ruby Gem Specification to depend on [wechat-core](https://github.com/topbitdu/wechat-core) v1.0, rake v11.0 & bundler v2.0
data/Gemfile.lock CHANGED
@@ -1,39 +1,54 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- wechat-validation (0.2.1)
5
- wechat-core (>= 0.4)
4
+ wechat-validation (1.0)
5
+ wechat-core (~> 1.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- diff-lcs (1.2.5)
11
- httpclient (2.8.2.4)
12
- rake (10.5.0)
13
- rspec (3.4.0)
14
- rspec-core (~> 3.4.0)
15
- rspec-expectations (~> 3.4.0)
16
- rspec-mocks (~> 3.4.0)
17
- rspec-core (3.4.4)
18
- rspec-support (~> 3.4.0)
19
- rspec-expectations (3.4.0)
10
+ activesupport (6.0.2.2)
11
+ concurrent-ruby (~> 1.0, >= 1.0.2)
12
+ i18n (>= 0.7, < 2)
13
+ minitest (~> 5.1)
14
+ tzinfo (~> 1.1)
15
+ zeitwerk (~> 2.2)
16
+ concurrent-ruby (1.1.6)
17
+ diff-lcs (1.3)
18
+ httpclient (2.8.3)
19
+ i18n (1.8.2)
20
+ concurrent-ruby (~> 1.0)
21
+ minitest (5.14.0)
22
+ rake (11.3.0)
23
+ rspec (3.6.0)
24
+ rspec-core (~> 3.6.0)
25
+ rspec-expectations (~> 3.6.0)
26
+ rspec-mocks (~> 3.6.0)
27
+ rspec-core (3.6.0)
28
+ rspec-support (~> 3.6.0)
29
+ rspec-expectations (3.6.0)
20
30
  diff-lcs (>= 1.2.0, < 2.0)
21
- rspec-support (~> 3.4.0)
22
- rspec-mocks (3.4.1)
31
+ rspec-support (~> 3.6.0)
32
+ rspec-mocks (3.6.0)
23
33
  diff-lcs (>= 1.2.0, < 2.0)
24
- rspec-support (~> 3.4.0)
25
- rspec-support (3.4.1)
26
- wechat-core (0.4)
27
- httpclient (>= 2.8)
34
+ rspec-support (~> 3.6.0)
35
+ rspec-support (3.6.0)
36
+ thread_safe (0.3.6)
37
+ tzinfo (1.2.7)
38
+ thread_safe (~> 0.1)
39
+ wechat-core (1.0)
40
+ activesupport (~> 6.0)
41
+ httpclient (~> 2.8)
42
+ zeitwerk (2.3.0)
28
43
 
29
44
  PLATFORMS
30
45
  ruby
31
46
 
32
47
  DEPENDENCIES
33
- bundler (~> 1.11)
34
- rake (~> 10.0)
48
+ bundler (~> 2.0)
49
+ rake (~> 11.0)
35
50
  rspec (~> 3.0)
36
51
  wechat-validation!
37
52
 
38
53
  BUNDLED WITH
39
- 1.12.5
54
+ 2.1.4
data/ROADMAP.md CHANGED
@@ -1,15 +1,23 @@
1
1
  # Wechat Validation Road Map 微信验证库路线图
2
2
 
3
3
  ## v0.1
4
+
4
5
  1. Wechat::Validation.sign method
5
6
 
6
7
  ## v0.2
7
- 1. Improve the Wechat Validation to deprecate the ::sign method, use Wechat Validation Signature ::create instead
8
+
9
+ 1. Improve the Wechat Validation to deprecate the .``sign`` method, use Wechat Validation Signature .``create`` instead
8
10
 
9
11
  ## v0.2.1
12
+
10
13
  1. Improve the Ruby Gem Specification to depend on [wechat-core](https://github.com/topbitdu/wechat-core) v0.4
11
14
  2. Improve the Signature class for the argument validation
12
15
 
13
16
  ## v1.0
17
+
18
+ 1. Improve the Ruby Gem Specification to depend on [wechat-core](https://github.com/topbitdu/wechat-core) v1.0, rake v11.0 & bundler v2.0
19
+
20
+ ## v1.1
21
+
14
22
  1. Remove the deprecated classes & methods
15
23
  2. Improve the Signature class for argument validation
@@ -1,7 +1,21 @@
1
+ ##
2
+ # Signature 是参数签名类,用于生成参数签名。如:
3
+ # nonce = # Get the nonce from the request parameters.
4
+ # timestamp = # Get the timestamp from the request parameters.
5
+ # token = # Load the token from the configuration file.
6
+ # actual_signature = # Get the actual signature from the request parameters.
7
+ # expected_signature = Wechat::Validation::Signature.create nonce, timestamp, token
8
+ # if expected_signature==actual_signature
9
+ # # The signature is matched.
10
+ # else
11
+ # # The signature is not matched.
12
+ # end
13
+
1
14
  class Wechat::Validation::Signature
2
15
 
3
16
  extend Wechat::Core::Common
4
17
 
18
+ ##
5
19
  # 验证服务器地址的有效性
6
20
  # http://mp.weixin.qq.com/wiki/8/f9a0b8382e0b77d87b3bcc1ce6fbc104.html#.E7.AC.AC.E4.BA.8C.E6.AD.A5.EF.BC.9A.E9.AA.8C.E8.AF.81.E6.9C.8D.E5.8A.A1.E5.99.A8.E5.9C.B0.E5.9D.80.E7.9A.84.E6.9C.89.E6.95.88.E6.80.A7
7
21
  #
@@ -1,5 +1,5 @@
1
1
  module Wechat
2
2
  module Validation
3
- VERSION = '0.2.1'.freeze
3
+ VERSION = '1.0'.freeze
4
4
  end
5
5
  end
@@ -26,10 +26,10 @@ Gem::Specification.new do |spec|
26
26
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
27
  spec.require_paths = [ 'lib' ]
28
28
 
29
- spec.add_dependency 'wechat-core', '~> 0.4'
29
+ spec.add_dependency 'wechat-core', '~> 1.0'
30
30
 
31
- spec.add_development_dependency 'bundler', '~> 1.11'
32
- spec.add_development_dependency 'rake', '~> 10.0'
31
+ spec.add_development_dependency 'bundler', '~> 2.0'
32
+ spec.add_development_dependency 'rake', '~> 11.0'
33
33
  spec.add_development_dependency 'rspec', '~> 3.0'
34
34
 
35
35
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wechat-validation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: '1.0'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Topbit Du
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-12 00:00:00.000000000 Z
11
+ date: 2020-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: wechat-core
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.4'
19
+ version: '1.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.4'
26
+ version: '1.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.11'
33
+ version: '2.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
- version: '1.11'
40
+ version: '2.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '10.0'
47
+ version: '11.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '10.0'
54
+ version: '11.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -111,8 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  - !ruby/object:Gem::Version
112
112
  version: '0'
113
113
  requirements: []
114
- rubyforge_project:
115
- rubygems_version: 2.6.4
114
+ rubygems_version: 3.1.2
116
115
  signing_key:
117
116
  specification_version: 4
118
117
  summary: Wechat Server Validation Library 微信服务器验证库