wechat-sns 1.0.2 → 2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: fd7508abf1e7f1b78fac99e0625b09444804919e
4
- data.tar.gz: 714405df61964939214c2164110d0765ec4cf987
2
+ SHA256:
3
+ metadata.gz: 3e20513630e13494c761a589ff73ef79d2f94c9f55d9c7b3ce02002729e8138a
4
+ data.tar.gz: 8e5a7b88be8e7274353b8564da1b7a6d51adfe2bfffdcd306097a52ff67bbad7
5
5
  SHA512:
6
- metadata.gz: 9c0d04008964562a5fa1985b4da5047c0dccd36f47ba25293ac87ab3af31eb9ee70bf2ff21e95680ad0aa20e3dc7415ca7e7b338d56fff544c45726a2c41d436
7
- data.tar.gz: 33f041fe075d26897d49bfa1cf6934ddd18fb2316d985139eb94761e177aa8e85b201e19ba54eabe565fe37ecf3f18b63f54dcb3d32a2cc32748b0b6111dda1d
6
+ metadata.gz: d20d93022fe89e5406a8f64a15a639f0776cbf17aa6289593a5861abcc1ddfaa66a989a6ccd9ba433bc3d720863f8eef525f3fda07d9378a46193fe8cd5c3d33
7
+ data.tar.gz: b42015f5865db1b60abe226d92a8ed8dda706fb4e2d11137fab68ac7b09e57aa16dc59a767ec4289cfab7fdcbd82c205b85aaa10d42d1766e80a9d82bb4b16e9
data/CHANGELOG.md CHANGED
@@ -1,27 +1,38 @@
1
1
  # Wechat SNS Change Log 微信社交库变更日志
2
2
 
3
3
  ## v0.1
4
+
4
5
  1. Authorize Link class
5
6
 
6
7
  ## v0.2
8
+
7
9
  1. Access Token wrapper class
8
10
 
9
11
  ## v0.3
12
+
10
13
  1. User Profile wrapper class
11
14
 
12
15
  ## v0.4
16
+
13
17
  1. Improved Access Token wrapper class to paramiterize the Wechat App ID and Wechat App Secret
14
18
 
15
19
  ## v1.0
20
+
16
21
  1. Improved the wrapper classes to use Keyword Arguments
17
22
  2. Improved the Ruby Gem Specification to depend on [wechat-core](https://github.com/topbitdu/wechat-core) v0.3
18
23
 
19
24
  ## v1.0.1
25
+
20
26
  1. Improved the Ruby Gem Specification to depend on [wechat-core](https://github.com/topbitdu/wechat-core) v0.4
21
- 2. Improve the Access Token wrapper class for the argument validation & HTTP request
22
- 3. Improve the Authorize Link class for the argument validation
23
- 4. Improve the User Profile wrapper class for the argument validation & HTTP request
27
+ 2. Improved the Access Token wrapper class for the argument validation & HTTP request
28
+ 3. Improved the Authorize Link class for the argument validation
29
+ 4. Improved the User Profile wrapper class for the argument validation & HTTP request
24
30
 
25
31
  ## v1.0.2
26
- 1. Improve the Access Token wrapper class for the HTTP request
27
- 2. Improve the User Profile wrapper class for the HTTP request
32
+
33
+ 1. Improved the Access Token wrapper class for the HTTP request
34
+ 2. Improved the User Profile wrapper class for the HTTP request
35
+
36
+ ## v2.0
37
+
38
+ 1. Improved the Ruby Gem Specification to depend on [wechat-core](https://github.com/topbitdu/wechat-core) v1.0 & bundler v2.0
data/Gemfile.lock CHANGED
@@ -1,51 +1,54 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- wechat-sns (1.0.1)
5
- wechat-core (~> 0.4)
4
+ wechat-sns (2.0)
5
+ wechat-core (~> 1.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- activesupport (5.0.2)
10
+ activesupport (6.0.2.2)
11
11
  concurrent-ruby (~> 1.0, >= 1.0.2)
12
- i18n (~> 0.7)
12
+ i18n (>= 0.7, < 2)
13
13
  minitest (~> 5.1)
14
14
  tzinfo (~> 1.1)
15
- concurrent-ruby (1.0.5)
15
+ zeitwerk (~> 2.2)
16
+ concurrent-ruby (1.1.6)
16
17
  diff-lcs (1.3)
17
18
  httpclient (2.8.3)
18
- i18n (0.8.1)
19
- minitest (5.10.1)
20
- rake (10.5.0)
21
- rspec (3.5.0)
22
- rspec-core (~> 3.5.0)
23
- rspec-expectations (~> 3.5.0)
24
- rspec-mocks (~> 3.5.0)
25
- rspec-core (3.5.4)
26
- rspec-support (~> 3.5.0)
27
- rspec-expectations (3.5.0)
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)
28
30
  diff-lcs (>= 1.2.0, < 2.0)
29
- rspec-support (~> 3.5.0)
30
- rspec-mocks (3.5.0)
31
+ rspec-support (~> 3.6.0)
32
+ rspec-mocks (3.6.0)
31
33
  diff-lcs (>= 1.2.0, < 2.0)
32
- rspec-support (~> 3.5.0)
33
- rspec-support (3.5.0)
34
+ rspec-support (~> 3.6.0)
35
+ rspec-support (3.6.0)
34
36
  thread_safe (0.3.6)
35
- tzinfo (1.2.3)
37
+ tzinfo (1.2.7)
36
38
  thread_safe (~> 0.1)
37
- wechat-core (0.4.1)
38
- activesupport (>= 4.2)
39
- httpclient (>= 2.8)
39
+ wechat-core (1.0)
40
+ activesupport (~> 6.0)
41
+ httpclient (~> 2.8)
42
+ zeitwerk (2.3.0)
40
43
 
41
44
  PLATFORMS
42
45
  ruby
43
46
 
44
47
  DEPENDENCIES
45
- bundler (~> 1.11)
46
- rake (~> 10.0)
48
+ bundler (~> 2.0)
49
+ rake (~> 11.0)
47
50
  rspec (~> 3.0)
48
51
  wechat-sns!
49
52
 
50
53
  BUNDLED WITH
51
- 1.13.6
54
+ 2.1.4
data/ROADMAP.md CHANGED
@@ -1,27 +1,38 @@
1
1
  # Wechat SNS Road Map 微信社交库路线图
2
2
 
3
3
  ## v0.1
4
+
4
5
  1. Authorize Link class
5
6
 
6
7
  ## v0.2
8
+
7
9
  1. Access Token wrapper class
8
10
 
9
11
  ## v0.3
12
+
10
13
  1. User Profile wrapper class
11
14
 
12
15
  ## v0.4
16
+
13
17
  1. Improve Access Token wrapper class to paramiterize the Wechat App ID and Wechat App Secret
14
18
 
15
19
  ## v1.0
20
+
16
21
  1. Improve the wrapper classes to support Keyword Arguments
17
22
  2. Improve the Ruby Gem Specification to depend on [wechat-core](https://github.com/topbitdu/wechat-core) v0.3
18
23
 
19
24
  ## v1.0.1
25
+
20
26
  1. Improve the Ruby Gem Specification to depend on [wechat-core](https://github.com/topbitdu/wechat-core) v0.4
21
27
  2. Improve the Access Token wrapper class for the argument validation & HTTP request
22
28
  3. Improve the Authorize Link class for the argument validation
23
29
  4. Improve the User Profile wrapper class for the argument validation & HTTP request
24
30
 
25
31
  ## v1.0.2
32
+
26
33
  1. Improve the Access Token wrapper class for the HTTP request
27
34
  2. Improve the User Profile wrapper class for the HTTP request
35
+
36
+ ## v2.0
37
+
38
+ 1. Improve the Ruby Gem Specification to depend on [wechat-core](https://github.com/topbitdu/wechat-core) v1.0 & bundler v2.0
@@ -26,7 +26,6 @@ class Wechat::SNS::AccessToken
26
26
 
27
27
  assert_present! :access_token, access_token
28
28
  assert_present! :opend_id, opend_id
29
- #raise ArgumentError.new('The access_token argument is required.') if access_token.blank?
30
29
 
31
30
  get_json 'https://api.weixin.qq.com/sns/auth', body:
32
31
  {
@@ -87,6 +86,7 @@ class Wechat::SNS::AccessToken
87
86
  def self.create(app_id, app_secret, code, grant_type: 'authorization_code')
88
87
 
89
88
  assert_present! :app_id, app_id
89
+ assert_present! :app_secret, app_secret
90
90
 
91
91
  get_json 'https://api.weixin.qq.com/sns/oauth2/access_token', body:
92
92
  {
@@ -18,6 +18,7 @@ class Wechat::SNS::AuthorizeLink
18
18
  assert_present! :wechat_app_id, wechat_app_id
19
19
  assert_present! :redirect_link, redirect_link
20
20
  assert_present! :response_type, response_type
21
+ assert_present! :scope, scope
21
22
 
22
23
  "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{wechat_app_id}&redirect_uri=#{CGI::escape redirect_link}&response_type=#{response_type}&scope=#{scope}&state=#{state}#wechat_redirect"
23
24
  end
@@ -1,5 +1,5 @@
1
1
  module Wechat
2
2
  module SNS
3
- VERSION = '1.0.2'.freeze
3
+ VERSION = '2.0'.freeze
4
4
  end
5
5
  end
data/wechat-sns.gemspec CHANGED
@@ -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_development_dependency 'bundler', '~> 1.11'
30
- spec.add_development_dependency 'rake', '~> 10.0'
29
+ spec.add_development_dependency 'bundler', '~> 2.0'
30
+ spec.add_development_dependency 'rake', '~> 11.0'
31
31
  spec.add_development_dependency 'rspec', '~> 3.0'
32
32
 
33
- spec.add_dependency 'wechat-core', '~> 0.4'
33
+ spec.add_dependency 'wechat-core', '~> 1.0'
34
34
 
35
35
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wechat-sns
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: '2.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-03-30 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: bundler
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.11'
19
+ version: '2.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
- version: '1.11'
26
+ version: '2.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
- version: '10.0'
33
+ version: '11.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: '10.0'
40
+ version: '11.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.4'
61
+ version: '1.0'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.4'
68
+ version: '1.0'
69
69
  description: Wechat SNS Library is a wrapper for calling Wechat SNS APIs. 微信社交库封装了对微信社交API的调用。
70
70
  email:
71
71
  - topbit.du@gmail.com
@@ -112,8 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  - !ruby/object:Gem::Version
113
113
  version: '0'
114
114
  requirements: []
115
- rubyforge_project:
116
- rubygems_version: 2.6.4
115
+ rubygems_version: 3.1.2
117
116
  signing_key:
118
117
  specification_version: 4
119
118
  summary: Wechat SNS Library 微信社交库