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 +5 -5
- data/CHANGELOG.md +16 -5
- data/Gemfile.lock +29 -26
- data/ROADMAP.md +11 -0
- data/lib/wechat/sns/access_token.rb +1 -1
- data/lib/wechat/sns/authorize_link.rb +1 -0
- data/lib/wechat/sns/version.rb +1 -1
- data/wechat-sns.gemspec +3 -3
- metadata +9 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 3e20513630e13494c761a589ff73ef79d2f94c9f55d9c7b3ce02002729e8138a
|
|
4
|
+
data.tar.gz: 8e5a7b88be8e7274353b8564da1b7a6d51adfe2bfffdcd306097a52ff67bbad7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
22
|
-
3.
|
|
23
|
-
4.
|
|
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
|
-
|
|
27
|
-
|
|
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 (
|
|
5
|
-
wechat-core (~> 0
|
|
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 (
|
|
10
|
+
activesupport (6.0.2.2)
|
|
11
11
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
12
|
-
i18n (
|
|
12
|
+
i18n (>= 0.7, < 2)
|
|
13
13
|
minitest (~> 5.1)
|
|
14
14
|
tzinfo (~> 1.1)
|
|
15
|
-
|
|
15
|
+
zeitwerk (~> 2.2)
|
|
16
|
+
concurrent-ruby (1.1.6)
|
|
16
17
|
diff-lcs (1.3)
|
|
17
18
|
httpclient (2.8.3)
|
|
18
|
-
i18n (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
rspec-
|
|
24
|
-
rspec-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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.
|
|
30
|
-
rspec-mocks (3.
|
|
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.
|
|
33
|
-
rspec-support (3.
|
|
34
|
+
rspec-support (~> 3.6.0)
|
|
35
|
+
rspec-support (3.6.0)
|
|
34
36
|
thread_safe (0.3.6)
|
|
35
|
-
tzinfo (1.2.
|
|
37
|
+
tzinfo (1.2.7)
|
|
36
38
|
thread_safe (~> 0.1)
|
|
37
|
-
wechat-core (0
|
|
38
|
-
activesupport (
|
|
39
|
-
httpclient (
|
|
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 (~>
|
|
46
|
-
rake (~>
|
|
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.
|
|
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
|
data/lib/wechat/sns/version.rb
CHANGED
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', '~>
|
|
30
|
-
spec.add_development_dependency 'rake', '~>
|
|
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
|
|
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:
|
|
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:
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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
|
|
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
|
|
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
|
-
|
|
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 微信社交库
|