wechat 0.16.0 → 0.16.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +9 -0
- data/bin/wechat +6 -0
- data/lib/generators/wechat/templates/config/wechat.yml +11 -10
- data/lib/wechat/api_loader.rb +9 -1
- data/lib/wechat/concern/common.rb +5 -0
- data/lib/wechat.rb +1 -0
- data.tar.gz.sig +0 -0
- metadata +31 -49
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc8214345aa67e306a93fb57034de6f8ecc898c630e5abb56f29424b8a360110
|
4
|
+
data.tar.gz: 7152a97b68aada44c5be152e57dbe55233efabe58124c9d36c73b560b213c51e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aed67b12d96ee44e7ab75b8f3fe2bf5170379efd9b94e2d6fab8a92a4a5f99d477ea032a2d1826b3ddc73b195a42ca0f2f72d6a92d27632eb2de0be8c593d62d
|
7
|
+
data.tar.gz: 7c00e2715896186abfee532190aae993a766fc0a583f41545c62856a4d70554a6a365312a4d0d6e5eeba3e7259f6d552203e0079a70df73ed21677c924a63aa7
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## v0.16.2 (released at 2022-12-09)
|
4
|
+
|
5
|
+
* Drop support ruby 2.6 and allow ruby 3.2 will released psych v5.0.0. by @iuhoay #314
|
6
|
+
|
7
|
+
## v0.16.1 (released at 2022-07-20)
|
8
|
+
|
9
|
+
* Add api urllink.generate support. by @iuhoay #313
|
10
|
+
* Fix WARNING: Zeitwerk defines the constant ActionController after the directory
|
11
|
+
|
3
12
|
## v0.16.0 (released at 2022-06-06)
|
4
13
|
|
5
14
|
* Support wechat draft. #305
|
data/bin/wechat
CHANGED
@@ -230,6 +230,12 @@ class App < Thor
|
|
230
230
|
puts wechat_api.wxa_msg_sec_check(content)
|
231
231
|
end
|
232
232
|
|
233
|
+
desc 'wxa_generate_urllink [PATH]', '获取小程序 URL Link'
|
234
|
+
def wxa_generate_urllink(path)
|
235
|
+
body_hash = { path: path, expire_type: 0 }
|
236
|
+
puts wechat_api.wxa_generate_urllink(body_hash)
|
237
|
+
end
|
238
|
+
|
233
239
|
desc 'media_uploadnews [MPNEWS_YAML_PATH]', '上传图文消息素材'
|
234
240
|
def media_uploadnews(mpnews_yaml_path)
|
235
241
|
mpnew = Wechat::ApiLoader.load_yaml(File.read(mpnews_yaml_path))
|
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
---
|
2
|
+
default_setting: &default_setting
|
2
3
|
corpid: "corpid"
|
3
4
|
corpsecret: "corpsecret"
|
4
5
|
agentid: 1
|
@@ -28,45 +29,45 @@ production:
|
|
28
29
|
oauth2_cookie_duration: <%%= ENV['WECHAT_OAUTH2_COOKIE_DURATION'] %> # seconds
|
29
30
|
|
30
31
|
development:
|
31
|
-
<<: *
|
32
|
+
<<: *default_setting
|
32
33
|
trusted_domain_fullname: "http://your_dev.proxy.qqbrowser.cc"
|
33
34
|
|
34
35
|
test:
|
35
|
-
<<: *
|
36
|
+
<<: *default_setting
|
36
37
|
|
37
38
|
# Multiple Accounts
|
38
39
|
#
|
39
40
|
# wx2_development:
|
40
|
-
# <<: *
|
41
|
+
# <<: *default_setting
|
41
42
|
# appid: "my_appid"
|
42
43
|
# secret: "my_secret"
|
43
44
|
# access_token: "tmp/wechat_access_token2"
|
44
45
|
# jsapi_ticket: "tmp/wechat_jsapi_ticket2"
|
45
46
|
#
|
46
47
|
# wx2_test:
|
47
|
-
# <<: *
|
48
|
+
# <<: *default_setting
|
48
49
|
# appid: "my_appid"
|
49
50
|
# secret: "my_secret"
|
50
51
|
#
|
51
52
|
# wx2_production:
|
52
|
-
# <<: *
|
53
|
+
# <<: *default_setting
|
53
54
|
# appid: "my_appid"
|
54
55
|
# secret: "my_secret"
|
55
56
|
#
|
56
57
|
# wx3_development:
|
57
|
-
# <<: *
|
58
|
+
# <<: *default_setting
|
58
59
|
# appid: "my_appid"
|
59
60
|
# secret: "my_secret"
|
60
61
|
# access_token: "tmp/wechat_access_token3"
|
61
62
|
# jsapi_ticket: "tmp/wechat_jsapi_ticket3"
|
62
63
|
#
|
63
64
|
# wx3_test:
|
64
|
-
# <<: *
|
65
|
+
# <<: *default_setting
|
65
66
|
# appid: "my_appid"
|
66
67
|
# secret: "my_secret"
|
67
68
|
#
|
68
69
|
# wx3_production:
|
69
|
-
# <<: *
|
70
|
+
# <<: *default_setting
|
70
71
|
# appid: "my_appid"
|
71
72
|
# secret: "my_secret"
|
72
|
-
#
|
73
|
+
#
|
data/lib/wechat/api_loader.rb
CHANGED
@@ -43,7 +43,15 @@ module Wechat
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def self.load_yaml(result)
|
46
|
-
YAML.respond_to?(:unsafe_load)
|
46
|
+
if YAML.respond_to?(:unsafe_load)
|
47
|
+
YAML.unsafe_load(result)
|
48
|
+
else
|
49
|
+
begin
|
50
|
+
YAML.safe_load(result, aliases: true)
|
51
|
+
rescue ArgumentError
|
52
|
+
YAML.safe_load(result)
|
53
|
+
end
|
54
|
+
end
|
47
55
|
end
|
48
56
|
|
49
57
|
private_class_method def self.loading_config!
|
@@ -104,6 +104,11 @@ module Wechat
|
|
104
104
|
post 'msg_sec_check', JSON.generate(content: content), base: Wechat::Api::WXA_BASE
|
105
105
|
end
|
106
106
|
|
107
|
+
def wxa_generate_urllink(body_hash)
|
108
|
+
# https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/url-link/urllink.generate.html
|
109
|
+
post 'generate_urllink', JSON.generate(body_hash), base: Wechat::Api::WXA_BASE
|
110
|
+
end
|
111
|
+
|
107
112
|
def menu
|
108
113
|
get 'menu/get'
|
109
114
|
end
|
data/lib/wechat.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wechat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.16.
|
4
|
+
version: 0.16.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Skinnyworm
|
@@ -11,31 +11,32 @@ bindir: bin
|
|
11
11
|
cert_chain:
|
12
12
|
- |
|
13
13
|
-----BEGIN CERTIFICATE-----
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
14
|
+
MIIEeDCCAuCgAwIBAgIBATANBgkqhkiG9w0BAQsFADBBMRMwEQYDVQQDDAplcmlj
|
15
|
+
Lmd1b2N6MRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZFgNj
|
16
|
+
b20wHhcNMjIxMjA5MDcyMTE1WhcNMjMxMjA5MDcyMTE1WjBBMRMwEQYDVQQDDApl
|
17
|
+
cmljLmd1b2N6MRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZ
|
18
|
+
FgNjb20wggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQC6jGarls5mU792
|
19
|
+
leWot9tWKXnnvVnj1oUPea8M77PpHcYMVmjUTkjgsrKiOFNv2nAjUIDrUaLJvuKi
|
20
|
+
95zZYLIT3uWqI9QvSSDr+rs4HyIDcXuWWB89GpKN5WgyCVel6V9X5PN0C5hIiz8T
|
21
|
+
ThW7ZqkS8mTmHm2micL8/lmnelpxj9EjCin7xOCvebB9pdA7Y0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yez2xpxlRDA+bEkF74AEVwMYozjP8VNM1ERTG+8kROuQjGV
|
37
|
+
aWhGk3yVuHjmlBvfDpPqmux3ulWXnvHulcYiPxETh/m3PUfIKMTHydjAz88=
|
37
38
|
-----END CERTIFICATE-----
|
38
|
-
date: 2022-
|
39
|
+
date: 2022-12-09 00:00:00.000000000 Z
|
39
40
|
dependencies:
|
40
41
|
- !ruby/object:Gem::Dependency
|
41
42
|
name: activesupport
|
@@ -85,20 +86,6 @@ dependencies:
|
|
85
86
|
- - ">="
|
86
87
|
- !ruby/object:Gem::Version
|
87
88
|
version: 1.6.0
|
88
|
-
- !ruby/object:Gem::Dependency
|
89
|
-
name: psych
|
90
|
-
requirement: !ruby/object:Gem::Requirement
|
91
|
-
requirements:
|
92
|
-
- - ">="
|
93
|
-
- !ruby/object:Gem::Version
|
94
|
-
version: 3.3.2
|
95
|
-
type: :runtime
|
96
|
-
prerelease: false
|
97
|
-
version_requirements: !ruby/object:Gem::Requirement
|
98
|
-
requirements:
|
99
|
-
- - ">="
|
100
|
-
- !ruby/object:Gem::Version
|
101
|
-
version: 3.3.2
|
102
89
|
- !ruby/object:Gem::Dependency
|
103
90
|
name: thor
|
104
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -270,15 +257,10 @@ licenses:
|
|
270
257
|
metadata:
|
271
258
|
bug_tracker_uri: https://github.com/Eric-Guo/wechat/issues
|
272
259
|
changelog_uri: https://github.com/Eric-Guo/wechat/releases
|
273
|
-
documentation_uri: https://github.com/Eric-Guo/wechat/tree/v0.16.
|
274
|
-
source_code_uri: https://github.com/Eric-Guo/wechat/tree/v0.16.
|
260
|
+
documentation_uri: https://github.com/Eric-Guo/wechat/tree/v0.16.2#readme
|
261
|
+
source_code_uri: https://github.com/Eric-Guo/wechat/tree/v0.16.2
|
275
262
|
rubygems_mfa_required: 'true'
|
276
|
-
post_install_message:
|
277
|
-
*****WECHAT BREAK CHANGE*****
|
278
|
-
Including correct version of `psych` after upgrade wechat, if not sure, using v3.3.2.
|
279
|
-
Ruby 3.1’s incompatible changes to its YAML module (Psych 4), detail see:
|
280
|
-
https://www.ctrl.blog/entry/ruby-psych4.html
|
281
|
-
*****************************
|
263
|
+
post_install_message:
|
282
264
|
rdoc_options: []
|
283
265
|
require_paths:
|
284
266
|
- lib
|
@@ -286,14 +268,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
286
268
|
requirements:
|
287
269
|
- - ">="
|
288
270
|
- !ruby/object:Gem::Version
|
289
|
-
version: '2.
|
271
|
+
version: '2.7'
|
290
272
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
291
273
|
requirements:
|
292
274
|
- - ">="
|
293
275
|
- !ruby/object:Gem::Version
|
294
276
|
version: 1.8.11
|
295
277
|
requirements: []
|
296
|
-
rubygems_version: 3.3.
|
278
|
+
rubygems_version: 3.3.26
|
297
279
|
signing_key:
|
298
280
|
specification_version: 4
|
299
281
|
summary: DSL for wechat message handling and API
|
metadata.gz.sig
CHANGED
Binary file
|