wechat 0.12.5 → 0.13.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
2
  SHA256:
3
- metadata.gz: 856da08ed74214b680ea30b3d3a7ce4e3a6e36d998ce8c2a7eb3a3064a14d098
4
- data.tar.gz: 5554c5db01b56145348178387b942774161aca38d24cb20c859fcc4ca96fbc20
3
+ metadata.gz: 983ca9ebf1007ad2f68e079d7ed625c59a10e78198992abf84a5b9718592ff26
4
+ data.tar.gz: 976751bb11aba9a0fa30674a39eaef432eb39c177a315b396d95c458c0afde45
5
5
  SHA512:
6
- metadata.gz: 22f68f4a23dc7e8fa90d7529b689c0269242d33ba0f0fc74ea6fa45c2b61f4b68643ebfa1e911451c253a2127f127e4f09e8d767a4b9af64d1d34d1d6b8b13c6
7
- data.tar.gz: 0d491218b072ca09e8ff25f5a8fb0e3fcedc658f8f9fc3424068380233f5321e0277ab89d75626aec0cc00bef787c300fd8c88659d12008b2b795ce2dd60daef
6
+ metadata.gz: aeee17ba746530fbab18470172d83df90ff995ebdfa9ec92866361bbeacda03848e11a8ea278db6544ea57774513754b2dd914e7891154ca1344a03f8c5c4288
7
+ data.tar.gz: c22640b41f4d4d2d2cc01b7dd3568c76d6896f976d79f3d65c2ffb9dff975cb7ed6e0463b62b1f2991b6ec80494f96e263a3d330ee5661446dec7a075e063fc7
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,409 +1,8 @@
1
1
  # Changelog
2
2
 
3
- ## v0.12.5 (released at 5/20/2021)
3
+ ## v0.13.0 (released at 3/3/2021)
4
4
 
5
- * Add environment variable for configuring http proxy to ignore IP address changes everytime after app deployment, by @Awlter #312
5
+ * Support zeitwerk only and Rails 6+ only.
6
+ * Support Ruby 2.6+ only.
6
7
 
7
- ## v0.12.4 (released at 4/21/2021)
8
-
9
- * New material_add_news API, by @zlei1 #300
10
- * Support open_tag, by @xiajian2019 #299
11
-
12
- ## v0.12.3 (released at 3/15/2021)
13
-
14
- * Fix MpApi initialize bug, by @hardywu #296
15
-
16
- ## v0.12.2 (released at 3/3/2021)
17
-
18
- * New convert_to_userid API
19
-
20
- ## v0.12.1 (released at 28/12/2020)
21
-
22
- * Support Ruby 3.0.
23
- * Qcloud_token support.
24
- * CRUD of tencent cloud DB for miniapp
25
- * TCB storage API support.
26
- * Set default branch to *main*.
27
-
28
- ## v0.11.11 (released at 09/13/2020)
29
-
30
- * FIX: fix_load_controller_wechat not support MP type, by @Msms-NJ #281
31
-
32
- ## v0.11.10 (released at 09/02/2020)
33
-
34
- * ADD: Wechat::MpApi.wxa_msg_sec_check.
35
-
36
- ## v0.11.9 (released at 04/29/2020)
37
-
38
- * CHG: upgrade ssl_version to 1.2 by @paicha #276
39
-
40
- ## v0.11.8 (released at 03/09/2020)
41
-
42
- * ADD: Wechat::CorpApi.news_message_send
43
- * FIX: Wechat API Change material/get_material. reported by @0000sir #275
44
-
45
- ## v0.11.7 (released at 11/15/2019)
46
-
47
- * ADD: Wechat::MpApi.subscribe_message_send. by @paicha #271
48
- * FIX: FrozenError: can't modify frozen String. by @paicha #272
49
- * New translatecontent support.
50
-
51
- ## v0.11.6 (released at 09/02/2019)
52
-
53
- * Fix private method `next_migration_number` introduced at #267, by @zpdsky #270
54
- * Give more clear warning about missing Rails in console. by @emtfe #268
55
-
56
- ## v0.11.5 (released at 08/30/2019)
57
-
58
- * Add rubocop check in CI by @hophacker #267
59
- * Support Rails 6 and Windows at #266
60
-
61
- ## v0.11.4 (released at 08/15/2019)
62
-
63
- * rails 6 redirect_to use allow_other_host: true by @Chen-George-Zhen #263
64
-
65
- ## v0.11.3 (released at 07/02/2019)
66
-
67
- * New addvoicetorecofortext and queryrecoresultfortext support.
68
- * improve existing class detect by @3014zhangshuo #261
69
- * new wxa_get_wxacode_unlimit API for miniapp by @paicha #260
70
-
71
- ## v0.11.2 (released at 05/08/2019)
72
-
73
- * bugfix short_url to shorturl in wechat console tool by @yuanxinyu #259
74
- * allow a message to be sent to a party (department) by @hophacker #256
75
-
76
- ## v0.11.1 (released at 03/01/2019)
77
-
78
- * Let Message support markdown, text included; allow textcard btntxt to be omitted by @hophacker #251
79
- * Enterprise account add checkin api by @hophacker #254
80
- * Suggest use secret to differentiate different acces_tokens and tickets in Enterprise account by @hophacker #255
81
-
82
-
83
- ## v0.11.0 (released at 01/22/2019)
84
-
85
- * Support Ruby 2.6.0 official
86
- * Bump http gem to 4.0
87
- * New clear quota API by @3014zhangshuo #244
88
- * Wechat::Message support textcard by @hophacker #249
89
- * New getusersummary and getusercumulate API #247
90
-
91
- ## v0.10.3 (released at 10/07/2018)
92
-
93
- * Fix new share problem in iOS by @killernova #242
94
-
95
- ## v0.10.2 (released at 8/27/2018)
96
-
97
- * Fix incompatible with Rails 5.2.1 by @chloerei #239
98
-
99
- ## v0.10.1 (released at 7/1/2018)
100
-
101
- * Allow custom_message_send using Hash as message, previous only allow Wechat::Message. by @zuoliang0 and @fogisland #234
102
-
103
- ## v0.10.0 (released at 5/31/2018)
104
-
105
- * Support multi wechat account at wechat_responder. by @tuliren #223
106
- * Support wechat mini program apis & signature check. by @oiahoon #225
107
- * Support sent template message with miniprogram. by @falm #228
108
- * Fix request_content could be nil. by @paicha #229
109
-
110
- ## v0.9.0 (released at 4/15/2018)
111
-
112
- * Support multi wechat account dynamically loading from DB. by @tuliren #222
113
- * user_create API for enterprise account. #206
114
- * Will ignore template_message_send error 43004 by @insub #214
115
- * using template with version if the migration version available by @killernova #220
116
- * Remove Deprecation oauth2_url
117
- * Remove Ruby 2.2 support, add Rails 5.2 and http v3 support
118
-
119
- ## v0.8.12 (released at 9/13/2017)
120
-
121
- * Read oauth2_state from ticket store every time to avoid invalid oauth2_state by @xiewenwei #196
122
-
123
- ## v0.8.11 (released at 7/25/2017)
124
-
125
- * oauth2 state code not refresh at the same time of jsapi tickets refresh bug, many thanks @xiewenwei #192
126
- * Add string type scene support for qrcode_create_scene. by @libuchao #191
127
-
128
- ## v0.8.10 (released at 6/19/2017)
129
-
130
- * fix material_delete correctly.
131
-
132
- ## v0.8.9 (released at 6/18/2017)
133
-
134
- * wechat material_delete failed to work, thanks @Victorialice report #78
135
-
136
- ## v0.8.8 (released at 5/18/2017)
137
-
138
- * Better support multiple account. by @xiewenwei #187
139
- * Allow load figaro via RAILS_ENV. by @goofansu #186
140
-
141
- ## v0.8.7 (released at 4/23/2017)
142
-
143
- * Support new wxa_get_wxacode API for miniapp.
144
- * Add InvalidCredentialError, support audio/amr, voice/speex as file and text/plain as json. by @acenqiu #184
145
-
146
- ## v0.8.6 (released at 3/17/2017)
147
-
148
- * Support Rails 5.1 officially.
149
- * make sure the formfile can be created outside. by @mechiland #181
150
-
151
- ## v0.8.5 (released at 3/14/2017)
152
-
153
- * Support mass send API #176
154
- * Support new media_hq API
155
- * Support new createwxaqrcode API for miniapp
156
- * Fix wechat_responder not proper injected in rails 5 API #165
157
- * parse response support XML return, by @zhangbin #167
158
- * WeChat only allow 8 article per one news, by @kikyous #175
159
- * Store token at cookies, by @jstdoit #174
160
-
161
- ## v0.8.4 (released at 1/12/2017)
162
-
163
- * Support Ruby 2.4.0
164
- * Add support of Enterprise RedPacket API, by @zhangbin #169
165
-
166
- ## v0.8.3 (released at 11/26/2016)
167
-
168
- * Fix wechat template key has camelCase problem, by @RyanChenDji #159
169
- * Fix long time of oauth2_state bug for wechat_oauth2 methods, by @IvanChou #162
170
-
171
- ## v0.8.2 (released at 11/2/2016)
172
-
173
- * Bug which if not using multi-account but using web login.
174
-
175
- ## v0.8.1 (released at 11/2/2016)
176
-
177
- * After allow sub controller using wechat_api, it's possible not initialise at first time. by @IvanChou #155
178
- * Support web application login scope snsapi_login.
179
- * Add unionid support for public account.
180
- * Remove OpenId in Enterprise OAuth2 as it's not supported by Tecent.
181
-
182
- ## v0.8.0 (released at 10/24/2016)
183
-
184
- * Complete support multi-wechat public account. by @xiewenwei #150
185
- * Support loading configure value from Figaro if application.yml exist.
186
-
187
- ## v0.7.20 (released at 8/29/2016)
188
-
189
- * Apply opt and config together when loading controller_wechat, to simplify wechat_responder params. by @bzhang443 #147
190
-
191
- ## v0.7.19 (released at 8/25/2016)
192
-
193
- * Enterprise account now custom_image/voice/file works now. by @zymiboxpay #145
194
- * Fix timeout setting no effective since introduct HTTP. found by @hsluo #74
195
-
196
- ## v0.7.18 (released at 8/21/2016)
197
-
198
- * Support label_location message, similar to location event, but sent by user with Label. #144
199
- * Add gem signature as additional security methods.
200
-
201
- ## v0.7.17 (released at 8/18/2016)
202
-
203
- * Allow declare wechat_api at ApplicationController, but using wechat at sub controller. #104
204
-
205
- ## v0.7.16 (released at 7/27/2016)
206
-
207
- * FIX: consider '' in params as equal with nil, in ControllerApi#wechat_public_oauth2, by @snow #135
208
- * New tag API for public account, by @pynixwang #127
209
- * fix SSLv3 error by use TLSv1_client, by @IvanChou #133
210
-
211
- ## v0.7.15 (released at 7/03/2016)
212
-
213
- * RSpec testing case on Rails 5 now.
214
- * Resolve Rails 5 ActionController::Parameters issue.
215
-
216
- ## v0.7.14 (released at 5/29/2016)
217
-
218
- * Fix when access_token failed lead ticket can not refresh problem.
219
- * Default duration should be 1 hours instead of 0 seconds for wechat_oauth2.
220
- * New shorturl allowing convert from long URL to short.
221
-
222
- ## v0.7.13 (released at 5/14/2016)
223
-
224
- * Wechat.config.oauth2_cookie_duration need convert to secondes, found by @gabrieltong #111
225
-
226
- ## v0.7.12 (released at 5/12/2016)
227
-
228
- * Fix web_userinfo wrong URL, found by @gabrieltong #110
229
-
230
- ## v0.7.11 (released at 4/18/2016)
231
-
232
- * To cover wrong release 0.7.10, nothing change
233
-
234
- ## v0.7.10 (released at 4/18/2016) (yanked)
235
-
236
- ## v0.7.9 (released at 4/12/2016)
237
-
238
- * wechat_oauth2 support public account now.
239
- * Refresh and store state on jsapi ticket, using it on oauth2_url to more secure.
240
- * Remove extra sending payload in message template send json
241
- * Allow setting oauth2_cookie_duration in config
242
-
243
- ## v0.7.8 (released at 3/31/2016)
244
-
245
- * New wechat_api, similar to wechat_responder, but without messange handle DSL, support web page only wechat application
246
- * New media_uploadimg API.
247
- * New file type of Message.
248
- * Improved multi account support per different controller.
249
-
250
- ## v0.7.7 (released at 3/18/2016)
251
-
252
- * New wechat_oauth2, only support enterprise account still.
253
- * fix 'skip_before_action :verify_authenticity_token' bug for v5.0.0.beta3 by @vkill #97
254
- * Support Rails 3.2 again after support Rails 5.0, by @guange2015 #96
255
-
256
- ## v0.7.6 (released at 3/05/2016)
257
-
258
- * Support wechat public account conditional menu. #95
259
-
260
- ## v0.7.5 (released at 2/21/2016)
261
-
262
- * New wechat_config_js to simplify the Wechat jsapi config.
263
- * Support sent shortvideo.
264
-
265
- ## v0.7.4 (released at 1/23/2016)
266
-
267
- * Add Redis store token/ticket support, close #76, #60
268
- * Rails 5 support without deprecate warning or other not necessory call. #82
269
-
270
- ## v0.7.3 (released at 1/19/2016)
271
-
272
- * Allow transfer_customer_service to specific account.
273
- * New customservice_getonlinekflist API.
274
- * session support class WechatSession no need table_exists? methods exist.
275
-
276
- ## v0.7.2 (released at 1/18/2016)
277
-
278
- * Optional session support by @zfben #81, #88, #91
279
- * Replace after_wechat_response with Rails Nofications facility, by @zfben, original issue is #79
280
- * New user_batchget API. #89
281
- * Support Rails 3.2 again after support Rails 5.0. by @guange2015 #87
282
- * Fetch setting from RAILS_ENV first, then fetch default. by @kikyous #85
283
- * Warning not support on :scan with regular expression, reason see #84
284
-
285
- ## v0.7.1 (released at 1/11/2016)
286
-
287
- * Fix after using http, upload file function break. #78
288
- * Add callback function after_wechat_response support. by @zfben #79
289
- * Should using department_id instead of departmentid at enterprise api: user_simplelist/user_list.
290
-
291
- ## v0.7.0 (released at 1/1/2016)
292
-
293
- * Using [http](https://github.com/httprb/http) instead of rest-client for performance reason. (not support upload file yet)
294
-
295
- ## v0.6.10 (released at 1/17/2016)
296
-
297
- * Support Rails 3.2 again after support Rails 5.0. by @guange2015 #87
298
- * Fetch setting from RAILS_ENV first, then fetch default. by @kikyous #85
299
- * Warning not support on :scan with regular expression. by @kikyous #84
300
-
301
- ## v0.6.9 (released at 1/6/2016)
302
-
303
- * Fix token refresh bug on multi worker. #76
304
- * Rewrite the token relative code to add more storage support in future.
305
-
306
- ## v0.6.8 (released at 12/25/2015)
307
-
308
- * Support Rails 5.0.0.beta1.
309
- * English README available
310
- * Fix oauth2_url calling error, fix #75
311
-
312
- ## v0.6.7 (released at 12/18/2015)
313
-
314
- * Add timeout configuration option, close #74
315
- * New getuserinfo and oauth2_url to support getting FromUserName from web page.
316
-
317
- ## v0.6.6 (released at 12/15/2015)
318
-
319
- * Add jsapi_ticket support for Enterprise Account
320
- * Default generated WechatsController < ActionController::Base, as many Rails application may having #authenticate_user or #set_current_user in ApplicationController, so easily affect the first time using experience.
321
- * New syntax `on :view, with: 'VIEW_URL'` support.
322
- * New command `upload_replaceparty` which combine three sub command to make uploading department easier.
323
- * New command `upload_replaceuser` which combine three sub command to make uploading user easier.
324
-
325
- ## v0.6.5 (released at 11/24/2015)
326
-
327
- * Handle 48001 error if token is expire/not valid, close #71
328
- * ApiLoader will do config reading and initialize the api instead of spreading the logic.
329
-
330
- ## v0.6.4 (released at 11/16/2015)
331
-
332
- * Command mode now display different command set based on enterprise/public account setting
333
- * Move config logic in command/wechat to ApiLoader class
334
- * Unsubscribe can only reply plain text 'success' #68
335
- * Fix 404 qrcode download problem, by @huangxiangdan #69
336
-
337
- ## v0.6.3 (released at 11/14/2015)
338
-
339
- * Official testing and support public encrypt mode, also fix one cipher bug, many thanks to @hlltc #67
340
- * hlltc report public account FILE_BASE no longer needs, clean code #67
341
- * Media command line reflect recent Tecent json schema change. #67
342
-
343
- ## v0.6.2 (released at 11/05/2015)
344
-
345
- * Tecent report location API changed, so change wechat gems also. #64
346
-
347
- ## v0.6.1 (released at 10/20/2015)
348
-
349
- * Handle 40001, invalid credential, access_token is invalid or not latest hint # 57
350
- * Support at Rails 4.2.1 wechat can not run #58
351
-
352
- ## v0.6.0 (released at 10/08/2015)
353
-
354
- ### Scan and Batch job are BREAK CHANGE!
355
-
356
- * Scan 2D barcode using new syntax `on :scan, with: 'BINDING_QR_CODE' ` instead of `on :event, with: 'BINDING_QR_CODE' ` in previous version #55
357
- Which will fix can not using `on :event, with: "scan" ` problem
358
- * Batch job using new syntax `on :batch_job, with: 'replace_user' `
359
- instead of previous `on :event, with: 'replace_user' `.
360
- * Click menu support new syntax `on :click, with: 'BOOK_LUNCH' `, but `on :event, with: 'BOOK_LUNCH' ` still supported. perfer `on :click` because it running faster and more nature expression.
361
- * Wechat::Responder using Hash for new :client and :batch_job event, avoid time consuming Array match responder
362
- * Fix refresh token not working problem under ruby 2.0.0 #54
363
- * New department_update, user_batchdelete, convert_to_openid API
364
-
365
- ## v0.5.0 (released at 9/25/2015)
366
-
367
- * Only relay on activesupport on run time, so will greatly improve wechat cli startup time
368
- * Add rails generator support `rails g wechat:install`
369
- * Add batch job support for enterprise account like batch create user/department, both API, callback responder and CLI
370
- * Add material management API and CLI
371
- * Add tag API and CLI for enterprise account
372
- * Add QR code scene function for public account
373
-
374
- ## v0.4.2 (released at 9/7/2015)
375
-
376
- * Fix wrong number of arguments at Wechat::Responder.on by using arity #47
377
- * Fix can not access wechat method after using instance level context.
378
- * Fix skip_verify_ssl parameter error.
379
-
380
- ## v0.4.1 (released at 9/6/2015)
381
-
382
- * Limit news articles collection to 10, close #5
383
- * Resolve the conflict with gem "responders" by @seamon #45
384
-
385
- ## v0.4.0 (released at 9/5/2015)
386
-
387
- * Enable the verify SSL for enterprise mode by default, as security is more importent than speed, but still can switch off by configure
388
- * Support scancode_push/scancode_waitmsg event.
389
- * New API method can get wechat server IP list
390
- * New API to query/create department/media/material
391
- * Fix can not read token_file in mingw bug, which introduce at #43
392
-
393
- ## v0.3.0 (released at 8/30/2015)
394
-
395
- * New user group management API
396
- * Allow transfer to customer service on fallback. #42
397
- * Read and write access_token properly using file locking, #43
398
-
399
- ## v0.2.0 (released at 8/27/2015)
400
-
401
- * Add wechat enterprise account support
402
- * Make responder execute in action context, by @lazing #15
403
- * jsapi_ticket support, by @feitian124 #27
404
- * Rename gems to wechat and ambitious to being #1 gems about development wechat. thanks Xiaoning transfer this gem name.
405
- * Original gem `wechat-rails` author skinnyworm trasfer to Eric-Guo as maintainer
406
-
407
- ## v0.1.1
408
-
409
- * Initial release from [wechat-rails](https://github.com/skinnyworm/wechat-rails).
8
+ Previous changelog see https://github.com/Eric-Guo/wechat/blob/master/CHANGELOG_OLD.md
data/README-CN.md CHANGED
@@ -27,12 +27,16 @@ WeChat gem帮助开发者方便地在Rails环境中集成[微信公众平台](ht
27
27
 
28
28
  ```
29
29
  gem install "wechat"
30
+ # 如果使用 Ruby 版本小于 2.6
31
+ # gem install wechat -v 0.12.2
30
32
  ```
31
33
 
32
34
  或者添加下面这行到 `Gemfile`:
33
35
 
34
36
  ```
35
37
  gem 'wechat'
38
+ # 如果使用 Rails 版本小于 6
39
+ # gem 'wechat', '~> 0.12.2'
36
40
  ```
37
41
 
38
42
  运行下面这行代码来安装:
@@ -362,7 +366,6 @@ Wechat Public Account commands:
362
366
  wechat groups # 查询所有分组
363
367
  wechat material_get [MEDIA_ID, PATH] # 永久媒体下载
364
368
  wechat material_add [MEDIA_TYPE, PATH] # 永久媒体上传
365
- wechat material_add_news [MPNEWS_YAML_PATH] # 永久图文素材上传
366
369
  wechat material_count # 获取永久素材总数
367
370
  wechat material_delete [MEDIA_ID] # 删除永久素材
368
371
  wechat material_list [TYPE, OFFSET, COUNT] # 获取永久素材列表
data/README.md CHANGED
@@ -34,12 +34,16 @@ Use `gem install`
34
34
 
35
35
  ```
36
36
  gem install "wechat"
37
+ # If your ruby version < 2.6
38
+ # gem install wechat -v 0.12.2
37
39
  ```
38
40
 
39
41
  Or add it to your app's `Gemfile`:
40
42
 
41
43
  ```
42
44
  gem 'wechat'
45
+ # If your rails version < 6.0
46
+ # gem 'wechat', '~> 0.12.2'
43
47
  ```
44
48
 
45
49
  Run the following command to install it:
@@ -391,9 +395,8 @@ Wechat Public Account commands:
391
395
  wechat group_delete [GROUP_ID] # 删除分组
392
396
  wechat group_update [GROUP_ID, NEW_GROUP_NAME] # 修改分组名
393
397
  wechat groups # 查询所有分组
394
- wechat material_get [MEDIA_ID, PATH] # 永久媒体下载
398
+ wechat material_get [MEDIA_ID, PATH] # 永久媒体下载
395
399
  wechat material_add [MEDIA_TYPE, PATH] # 永久媒体上传
396
- wechat material_add_news [MPNEWS_YAML_PATH] # 永久图文素材上传
397
400
  wechat material_count # 获取永久素材总数
398
401
  wechat material_delete [MEDIA_ID] # 删除永久素材
399
402
  wechat material_list [TYPE, OFFSET, COUNT] # 获取永久素材列表
data/bin/wechat CHANGED
@@ -6,13 +6,10 @@ $LOAD_PATH.unshift(lib) if File.directory?(lib) && !$LOAD_PATH.include?(lib)
6
6
  require 'thor'
7
7
  require 'wechat'
8
8
  require 'json'
9
- require 'active_support' # To support Rails 4.2.1, see #17936
10
- require 'active_support/dependencies/autoload'
11
9
  require 'active_support/core_ext'
12
10
  require 'active_support/json'
13
11
  require 'fileutils'
14
12
  require 'yaml'
15
- require 'wechat/api_loader'
16
13
  require 'cgi'
17
14
 
18
15
  class App < Thor
@@ -411,12 +408,6 @@ class App < Thor
411
408
  puts wechat_api.material_add(type, path)
412
409
  end
413
410
 
414
- desc 'material_add_news [MPNEWS_YAML_PATH]', '永久图文素材上传'
415
- def material_add_news(mpnews_yaml_path)
416
- new = YAML.load(File.read(mpnews_yaml_path))
417
- puts wechat_api.material_add_news(Wechat::Message.new(MsgType: 'mpnews').mpnews(new['articles']))
418
- end
419
-
420
411
  desc 'material_delete [MEDIA_ID]', '删除永久素材'
421
412
  def material_delete(media_id)
422
413
  puts wechat_api.material_delete(media_id)
@@ -45,18 +45,17 @@ module ActionController
45
45
 
46
46
  access_token = opts[:access_token] || cfg.access_token
47
47
  jsapi_ticket = opts[:jsapi_ticket] || cfg.jsapi_ticket
48
- qcloud_env = opts[:qcloud_env] || cfg.qcloud_env
49
48
  qcloud_token = opts[:qcloud_token] || cfg.qcloud_token
50
49
 
51
50
  api_type = opts[:type] || cfg.type
52
51
  secret = corpid.present? ? opts[:corpsecret] || cfg.corpsecret : opts[:secret] || cfg.secret
53
52
 
54
- get_wechat_api(api_type, corpid, appid, secret, access_token, agentid, timeout, skip_verify_ssl, jsapi_ticket, qcloud_env, qcloud_token, qcloud_token_lifespan)
53
+ get_wechat_api(api_type, corpid, appid, secret, access_token, agentid, timeout, skip_verify_ssl, jsapi_ticket, qcloud_token, qcloud_token_lifespan)
55
54
  end
56
55
 
57
- def get_wechat_api(api_type, corpid, appid, secret, access_token, agentid, timeout, skip_verify_ssl, jsapi_ticket, qcloud_env, qcloud_token, qcloud_token_lifespan)
56
+ def get_wechat_api(api_type, corpid, appid, secret, access_token, agentid, timeout, skip_verify_ssl, jsapi_ticket, qcloud_token, qcloud_token_lifespan)
58
57
  if api_type && api_type.to_sym == :mp
59
- Wechat::MpApi.new(appid, secret, access_token, timeout, skip_verify_ssl, jsapi_ticket, qcloud_env, qcloud_token, qcloud_token_lifespan)
58
+ Wechat::MpApi.new(appid, secret, access_token, timeout, skip_verify_ssl, jsapi_ticket, qcloud_token, qcloud_token_lifespan)
60
59
  elsif corpid.present?
61
60
  Wechat::CorpApi.new(corpid, secret, access_token, agentid, timeout, skip_verify_ssl, jsapi_ticket)
62
61
  else
@@ -64,15 +63,4 @@ module ActionController
64
63
  end
65
64
  end
66
65
  end
67
-
68
- if defined? Base
69
- class << Base
70
- include WechatResponder
71
- end
72
- end
73
- if defined? API
74
- class << API
75
- include WechatResponder
76
- end
77
- end
78
66
  end
@@ -31,7 +31,7 @@ module Wechat
31
31
  private
32
32
 
33
33
  def migration_version
34
- "[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]" if Rails.version >= '5.0.0'
34
+ "[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]"
35
35
  end
36
36
  end
37
37
  end
@@ -31,7 +31,7 @@ module Wechat
31
31
  private
32
32
 
33
33
  def migration_version
34
- "[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]" if Rails.version >= '5.0.0'
34
+ "[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]"
35
35
  end
36
36
  end
37
37
  end
data/lib/wechat/api.rb CHANGED
@@ -1,11 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'wechat/api_base'
4
- require 'wechat/http_client'
5
- require 'wechat/token/public_access_token'
6
- require 'wechat/ticket/public_jsapi_ticket'
7
- require 'wechat/concern/common'
8
-
9
3
  module Wechat
10
4
  class Api < ApiBase
11
5
  def initialize(appid, secret, token_file, timeout, skip_verify_ssl, jsapi_ticket_file)
data/lib/wechat/cipher.rb CHANGED
@@ -43,7 +43,7 @@ module Wechat
43
43
  msg = decode_padding(msg)
44
44
  msg_len = msg[16, 4].reverse.unpack1('V')
45
45
  content = msg[20, msg_len]
46
- app_id = msg[(msg_len + 20)..-1]
46
+ app_id = msg[(msg_len + 20)..]
47
47
 
48
48
  [content, app_id]
49
49
  end
@@ -152,10 +152,6 @@ module Wechat
152
152
  post_file 'material/add_material', file, params: { type: type }
153
153
  end
154
154
 
155
- def material_add_news(mpnews_message)
156
- post 'material/add_news', mpnews_message.to_json
157
- end
158
-
159
155
  def material_delete(media_id)
160
156
  post 'material/del_material', JSON.generate(media_id: media_id)
161
157
  end
@@ -58,7 +58,7 @@ module Wechat
58
58
  cookies.signed_or_encrypted[:we_access_token] = { value: access_info['access_token'], expires: self.class.oauth2_cookie_duration.from_now }
59
59
  yield access_info['openid'], access_info
60
60
  else
61
- Rails::VERSION::MAJOR >= 6 ? (redirect_to generate_oauth2_url(oauth2_params), allow_other_host: true) : (redirect_to generate_oauth2_url(oauth2_params))
61
+ redirect_to generate_oauth2_url(oauth2_params), allow_other_host: true
62
62
  end
63
63
  end
64
64
 
@@ -73,7 +73,7 @@ module Wechat
73
73
  cookies.signed_or_encrypted[:we_deviceid] = { value: userinfo['DeviceId'], expires: self.class.oauth2_cookie_duration.from_now }
74
74
  yield userinfo['UserId'], userinfo
75
75
  else
76
- Rails::VERSION::MAJOR >= 6 ? (redirect_to generate_oauth2_url(oauth2_params), allow_other_host: true) : (redirect_to generate_oauth2_url(oauth2_params))
76
+ redirect_to generate_oauth2_url(oauth2_params), allow_other_host: true
77
77
  end
78
78
  end
79
79
 
@@ -1,10 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'wechat/api_base'
4
- require 'wechat/http_client'
5
- require 'wechat/token/corp_access_token'
6
- require 'wechat/ticket/corp_jsapi_ticket'
7
-
8
3
  module Wechat
9
4
  class CorpApi < ApiBase
10
5
  attr_reader :agentid
@@ -34,8 +34,7 @@ module Wechat
34
34
  timestamp: "#{js_hash[:timestamp]}",
35
35
  nonceStr: "#{js_hash[:noncestr]}",
36
36
  signature: "#{js_hash[:signature]}",
37
- jsApiList: ['#{config_options[:api]&.join("','")}'],
38
- openTagList: ['#{config_options[:open_tags]&.join("','")}']
37
+ jsApiList: ['#{config_options[:api].join("','")}']
39
38
  });
40
39
  WECHAT_CONFIG_JS
41
40
  javascript_tag config_js, type: 'application/javascript'
@@ -13,9 +13,6 @@ module Wechat
13
13
  else
14
14
  HTTP.timeout(:global, write: timeout, connect: timeout, read: timeout)
15
15
  end
16
-
17
- @httprb = @httprb.via(ENV['WECHAT_PROXY_URL'], ENV['WECHAT_PROXY_PORT'].to_i, ENV['WECHAT_PROXY_USERNAME'], ENV['WECHAT_PROXY_PASSWORD']) if ENV['WECHAT_PROXY_URL']
18
-
19
16
  @ssl_context = OpenSSL::SSL::SSLContext.new
20
17
  @ssl_context.ssl_version = 'TLSv1_2'
21
18
  @ssl_context.verify_mode = OpenSSL::SSL::VERIFY_NONE if skip_verify_ssl
data/lib/wechat/mp_api.rb CHANGED
@@ -1,13 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'wechat/api_base'
4
- require 'wechat/http_client'
5
- require 'wechat/token/public_access_token'
6
- require 'wechat/ticket/public_jsapi_ticket'
7
- require 'wechat/qcloud/token'
8
- require 'wechat/concern/common'
9
- require 'wechat/concern/qcloud'
10
-
11
3
  module Wechat
12
4
  class MpApi < ApiBase
13
5
  def initialize(appid, secret, token_file, timeout, skip_verify_ssl, jsapi_ticket_file, qcloud_env, qcloud_token_file, qcloud_token_lifespan)
@@ -2,7 +2,6 @@
2
2
 
3
3
  require 'English'
4
4
  require 'rexml/document'
5
- require 'wechat/signature'
6
5
 
7
6
  module Wechat
8
7
  module Responder
@@ -11,24 +10,9 @@ module Wechat
11
10
  include Cipher
12
11
 
13
12
  included do
14
- # Rails 5 remove before_filter and skip_before_filter
15
- if respond_to?(:skip_before_action)
16
- if respond_to?(:verify_authenticity_token)
17
- skip_before_action :verify_authenticity_token
18
- else
19
- # Rails 5 API mode won't define verify_authenticity_token
20
- # https://github.com/rails/rails/blob/v5.0.0.beta3/actionpack/lib/abstract_controller/callbacks.rb#L66
21
- # https://github.com/rails/rails/blob/v5.0.0.beta3/activesupport/lib/active_support/callbacks.rb#L640
22
- skip_before_action :verify_authenticity_token, raise: false
23
- end
24
-
25
- before_action :config_account, only: %i[show create]
26
- before_action :verify_signature, only: %i[show create]
27
- else
28
- skip_before_filter :verify_authenticity_token
29
- before_filter :config_account, only: %i[show create]
30
- before_filter :verify_signature, only: %i[show create]
31
- end
13
+ skip_before_action :verify_authenticity_token, raise: false
14
+ before_action :config_account, only: %i[show create]
15
+ before_action :verify_signature, only: %i[show create]
32
16
  end
33
17
 
34
18
  module ClassMethods
@@ -180,15 +164,9 @@ module Wechat
180
164
  def show
181
165
  if @we_corpid.present?
182
166
  echostr, _corp_id = unpack(decrypt(Base64.decode64(params[:echostr]), @we_encoding_aes_key))
183
- if Rails::VERSION::MAJOR >= 4
184
- render plain: echostr
185
- else
186
- render text: echostr
187
- end
188
- elsif Rails::VERSION::MAJOR >= 4
189
- render plain: params[:echostr]
167
+ render plain: echostr
190
168
  else
191
- render text: params[:echostr]
169
+ render plain: params[:echostr]
192
170
  end
193
171
  end
194
172
 
@@ -197,11 +175,7 @@ module Wechat
197
175
  response_msg = run_responder(request_msg)
198
176
 
199
177
  if response_msg.respond_to? :to_xml
200
- if Rails::VERSION::MAJOR >= 4
201
- render plain: process_response(response_msg)
202
- else
203
- render text: process_response(response_msg)
204
- end
178
+ render plain: process_response(response_msg)
205
179
  else
206
180
  head :ok, content_type: 'text/html'
207
181
  end
@@ -248,15 +222,9 @@ module Wechat
248
222
  end
249
223
 
250
224
  data_hash = data.fetch('xml', {})
251
- if Rails::VERSION::MAJOR >= 5
252
- data_hash = data_hash.to_unsafe_hash if data_hash.instance_of?(ActionController::Parameters)
253
- HashWithIndifferentAccess.new(data_hash).tap do |msg|
254
- msg[:Event]&.downcase!
255
- end
256
- else
257
- HashWithIndifferentAccess.new_from_hash_copying_default(data_hash).tap do |msg|
258
- msg[:Event]&.downcase!
259
- end
225
+ data_hash = data_hash.to_unsafe_hash if data_hash.instance_of?(ActionController::Parameters)
226
+ HashWithIndifferentAccess.new(data_hash).tap do |msg|
227
+ msg[:Event]&.downcase!
260
228
  end
261
229
  end
262
230
 
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'wechat/ticket/jsapi_base'
4
-
5
3
  module Wechat
6
4
  module Ticket
7
5
  class CorpJsapiTicket < JsapiBase
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'wechat/ticket/jsapi_base'
4
-
5
3
  module Wechat
6
4
  module Ticket
7
5
  class PublicJsapiTicket < JsapiBase
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'wechat/token/access_token_base'
4
-
5
3
  module Wechat
6
4
  module Token
7
5
  class CorpAccessToken < AccessTokenBase
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'wechat/token/access_token_base'
4
-
5
3
  module Wechat
6
4
  module Token
7
5
  class PublicAccessToken < AccessTokenBase
data/lib/wechat.rb CHANGED
@@ -1,20 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'zeitwerk'
4
+ loader = Zeitwerk::Loader.for_gem
5
+ loader.ignore("#{__dir__}/generators/**/*.rb")
6
+ loader.setup
7
+
3
8
  require 'base64'
4
9
  require 'openssl/cipher'
5
- require 'wechat/api_loader'
6
- require 'wechat/api'
7
- require 'wechat/mp_api'
8
- require 'wechat/corp_api'
9
- require 'wechat/helpers'
10
- require 'action_controller/wechat_responder'
11
10
 
12
11
  module Wechat
13
- autoload :Message, 'wechat/message'
14
- autoload :Responder, 'wechat/responder'
15
- autoload :Cipher, 'wechat/cipher'
16
- autoload :ControllerApi, 'wechat/controller_api'
17
-
18
12
  class AccessTokenExpiredError < StandardError; end
19
13
 
20
14
  class InvalidCredentialError < StandardError; end
@@ -55,3 +49,21 @@ module Wechat
55
49
  end
56
50
 
57
51
  ActionView::Base.include Wechat::Helpers if defined? ActionView::Base
52
+ require 'action_controller/wechat_responder' # To make wechat_api and wechat_responder available
53
+
54
+ module ActionController
55
+ if defined? Base
56
+ ActiveSupport.on_load(:action_controller_base) do
57
+ class << Base
58
+ include WechatResponder
59
+ end
60
+ end
61
+ end
62
+ if defined? API
63
+ ActiveSupport.on_load(:action_controller_api) do
64
+ class << API
65
+ include WechatResponder
66
+ end
67
+ end
68
+ end
69
+ end
data.tar.gz.sig CHANGED
@@ -1,2 +1 @@
1
- r�c�h��w)Q��x �/��~�Z20O)k@ң|8��5�4o�F��~�j�̸�����I�p��eş����gf8��ӻ�����q�h�/҇ck��b�l�®�q���-[�,ݔs��M��He���}�^�?��2��Ͼ8nt����4JS6���^$cD hJ���cu��Ǻ�����3��; �����۝��4+�� |��\mqn�Fñ[.p�o��9��=ODz�`N���c٨ӊUjR������uu�� q�����2j:%<��%
2
- ��֟�z���fY�\�6��<{P�F��7Fb !���-���!���}?�KϹ���9VC���=�R����zY�
1
+ ;�2"pV�ε�G7W��7T������ץ'+%��x��!9��%�}[����sVl�:c>mn>j1y���<*�L^�Qw��jť�_��xY��|�6��g�2�h]T$<s�����'���#'��u��*��=[�3dPDH#�0�����23U�e&�r�������C[ZQh�ς=�B���\�q�[�dOz� �c�QgsY��dac�4t¿l���*���.�µ�e0��땚-ٕ4\3�2�c�sL�6�&�O]�?���!vA~<���4�^$�Ϸ�����4���o��̹����n߉����5͖����K'�ڎ/@������U�b��j�ғ#�/RL�Jvs҃&�F m'
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.12.5
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Skinnyworm
@@ -11,31 +11,31 @@ bindir: bin
11
11
  cert_chain:
12
12
  - |
13
13
  -----BEGIN CERTIFICATE-----
14
- MIIEODCCAqCgAwIBAgIBATANBgkqhkiG9w0BAQsFADAjMSEwHwYDVQQDDBhlcmlj
15
- L0RDPWNsb3VkLW1lcy9EQz1jb20wHhcNMjEwOTE1MDIxMDMzWhcNMjIwOTE1MDIx
16
- MDMzWjAjMSEwHwYDVQQDDBhlcmljL0RDPWNsb3VkLW1lcy9EQz1jb20wggGiMA0G
17
- CSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDfweHJdAqu5+BQ6t+F923czZvUynqe
18
- DyacqWVUbDg53oVwYxldDNqUea5hMlSs1UWj2sJ5ZHiU02ly0QVyDCw/5pFP2CKJ
19
- ukQbw35ZoCF0t2i0/GPYAtBMxb1qUynkxDAtCefQG33lBt2u9scgE9xOIiPrxtJg
20
- shl3XFYmOx1ol66JR540l7NBS1OHR7UV6WiJrRW1cZTcR+py7jIbo6ud/rhZVHCO
21
- B2RTZtpH1I7ilknT1/NXMX6aw+XoNda4w+4lsrHfqKssfwJcsGMq1IbbG8illxRT
22
- wsYLiUXNJaAacT9HVO4B0jIFPP5Me7FIkiqZZKr7uyHNQE0S/5OOUkIM0v5kkUOF
23
- IE+A6WwVCyi05+JNcbLuxeSZnNeqQcXiqxl1RcodIJxw0VTcSE1CO2eYCsvfzLJ2
24
- fn9fLaSA/mrosg72UV126GeXu/y/N6gf3F6ZHM2qAMZhJ9ZUR03bUVIqApsJN28g
25
- JOkm/lV0PutN0Y2UrD0gSKxgrN24ZSsWlBECAwEAAaN3MHUwCQYDVR0TBAIwADAL
26
- BgNVHQ8EBAMCBLAwHQYDVR0OBBYEFHHJIHijHoPxeoZDyGAvLbBalVvoMB0GA1Ud
27
- EQQWMBSBEmVyaWNAY2xvdWQtbWVzLmNvbTAdBgNVHRIEFjAUgRJlcmljQGNsb3Vk
28
- LW1lcy5jb20wDQYJKoZIhvcNAQELBQADggGBACYpors2s6sGEq0ErgijhSkAQRoj
29
- W1EO3ORYYyCRFPFX1KLtUpFuXi/1rZoMoSug2Lpr+GWqt7eZIwNoryjYMbuE/sOn
30
- sANkOvLx8x4RMlmTFe+WkPiV9NasFqNn7EBSpjqQRWRlCuh6rMiYzzxNbbNvbRT4
31
- WMhBf7eWRpr1TBXDr51E8RtA+LG6wZuJFnKWBisgKOmpUw79f7EvIQAGS3MEWk/g
32
- fSvIf14zM5Dw0whGa/n60jgSc5yiW3/75GXt8608BK+bs5dViJ/3ofuIhqpOvvdp
33
- 4Oiv2zIXsfUIGAIwHN5mLwAwHty1d0s8Kt0jtJAXDUODgTuXaBj/aOqTZUUgp8Kv
34
- 6SoPdaa0LFPbkI2eiUN1xUPelsgKz0kyRBJtkMnSKFxcCxw7VHGRGFsw0ORZodQ3
35
- ZM9IDtdMg8E/4ujwilV8HKmgU77vVN6vSMvxx8zQFSz9a6GbdpB4egPZ++peSk/Q
36
- uaIJtOX6M4VC6u7eZfotARKyUy6EcoN2zNqEAQ==
14
+ MIIEQDCCAqigAwIBAgIBATANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBplcmlj
15
+ Lmd1b2N6L0RDPWdtYWlsL0RDPWNvbTAeFw0yMDA5MDIwNDUzMjFaFw0yMTA5MDIw
16
+ NDUzMjFaMCUxIzAhBgNVBAMMGmVyaWMuZ3VvY3ovREM9Z21haWwvREM9Y29tMIIB
17
+ ojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAwSfWr5RlUBlv9OuNgmxjPwhU
18
+ 7eoT/m7K5h0PzUaue+dtno4WqjodoCPHF6r9hh8Ys0h1VAPu3sobH2gNaL18M0CY
19
+ bmq+ik6LgH5tX2E6c2BmhMuURt2y1YvIwvx0dDOlEXll9J8ZVqGyo3Rm9AIblA3/
20
+ w/V5VJGCj3XY6iipNkHHDlSWSYeD2mNr0wJW8EAUFFcyRddpotxR9Es8JwUpXdj8
21
+ Bc5a/OWxKvzqLVlu76zYRYuZ41+3gWNxYF9OPnp55sNtsboGh5LJSdXZOs5+gMw9
22
+ gEW/KsP4GSMlqBT7SQEO5EH3qjp3aatHaMT8Fq9h3AnNESQMubMWtlPqEYyrYkli
23
+ wr8A8SGiX3rCkNG0cc4zVsagtXm4csbSeaIjLV57LA2sKngI4/kw55UYlloAtGPh
24
+ qNEqsPLbN/RkyS1zQjf14mQBpBt3SdxnT7YDSPIYiAPTtLuThcy3Flgh6cDX1RH7
25
+ FQPZJzQ7pSb/3Edj+VBaYhpo+y4ySLxx9DOLfm6lAgMBAAGjezB5MAkGA1UdEwQC
26
+ MAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBRWBfZurpq8AmvpfBq7eSA0ivhotDAf
27
+ BgNVHREEGDAWgRRlcmljLmd1b2N6QGdtYWlsLmNvbTAfBgNVHRIEGDAWgRRlcmlj
28
+ Lmd1b2N6QGdtYWlsLmNvbTANBgkqhkiG9w0BAQsFAAOCAYEAJ1tLpEqCXma9fFeU
29
+ l6N4tEDrwYVxdbkXgOScUZBsagNlEM9vvskygivKu8AV8ffdtsg9OAuhdfAjPjX+
30
+ GvGnmuoweHFTsIrOhNryqFDgvkufBczmFLOskjRuzt4NoBNgge8+xoNo+N9o/0jz
31
+ GZi69Dth2i92rffuEzyFbfA9xzkjL+uSqJRJVDP5UbIWGnQ99M4GfplJZWRkmoX9
32
+ 5Ek/ZVhzEz6kdZuZErloYKqjWWvFHUFAYmJd3fqKpb468yTIaL4bl4aUl2+xLdyK
33
+ fPI/ZWGy2uNjffzbrhJ+Ti6qAdubkJoMIqrfbrFV1ew2Bxkp/93etXVNjAgHNmu1
34
+ o3VAf3sbhnj33jAri7JYx/1MhAcJXlvpKxX9QnYouxU/RgzBF7oqcT0dJ2jWUnAI
35
+ spvOK5/LPXWX6ZGc2SR8SH/s7ftYH2EkeM1VUbtemow08NdgCwJ4IG+fRQ9dcrJ+
36
+ L9TbpLHvVrCe1w8duMqNeUmqj+M1iC/5Zst2vIe14QcOTuAh
37
37
  -----END CERTIFICATE-----
38
- date: 2022-05-20 00:00:00.000000000 Z
38
+ date: 2021-03-03 00:00:00.000000000 Z
39
39
  dependencies:
40
40
  - !ruby/object:Gem::Dependency
41
41
  name: activesupport
@@ -43,7 +43,7 @@ dependencies:
43
43
  requirements:
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: '3.2'
46
+ version: '6.0'
47
47
  - - "<"
48
48
  - !ruby/object:Gem::Version
49
49
  version: '7'
@@ -53,7 +53,7 @@ dependencies:
53
53
  requirements:
54
54
  - - ">="
55
55
  - !ruby/object:Gem::Version
56
- version: '3.2'
56
+ version: '6.0'
57
57
  - - "<"
58
58
  - !ruby/object:Gem::Version
59
59
  version: '7'
@@ -66,7 +66,7 @@ dependencies:
66
66
  version: 1.0.4
67
67
  - - "<"
68
68
  - !ruby/object:Gem::Version
69
- version: '6'
69
+ version: '5'
70
70
  type: :runtime
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
@@ -76,7 +76,7 @@ dependencies:
76
76
  version: 1.0.4
77
77
  - - "<"
78
78
  - !ruby/object:Gem::Version
79
- version: '6'
79
+ version: '5'
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: nokogiri
82
82
  requirement: !ruby/object:Gem::Requirement
@@ -119,48 +119,62 @@ dependencies:
119
119
  - - ">="
120
120
  - !ruby/object:Gem::Version
121
121
  version: '0'
122
+ - !ruby/object:Gem::Dependency
123
+ name: zeitwerk
124
+ requirement: !ruby/object:Gem::Requirement
125
+ requirements:
126
+ - - "~>"
127
+ - !ruby/object:Gem::Version
128
+ version: '2.4'
129
+ type: :runtime
130
+ prerelease: false
131
+ version_requirements: !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - "~>"
134
+ - !ruby/object:Gem::Version
135
+ version: '2.4'
122
136
  - !ruby/object:Gem::Dependency
123
137
  name: rubocop
124
138
  requirement: !ruby/object:Gem::Requirement
125
139
  requirements:
126
140
  - - "~>"
127
141
  - !ruby/object:Gem::Version
128
- version: '1.0'
142
+ version: '1.9'
129
143
  type: :development
130
144
  prerelease: false
131
145
  version_requirements: !ruby/object:Gem::Requirement
132
146
  requirements:
133
147
  - - "~>"
134
148
  - !ruby/object:Gem::Version
135
- version: '1.0'
149
+ version: '1.9'
136
150
  - !ruby/object:Gem::Dependency
137
151
  name: rails
138
152
  requirement: !ruby/object:Gem::Requirement
139
153
  requirements:
140
154
  - - ">="
141
155
  - !ruby/object:Gem::Version
142
- version: '5.1'
156
+ version: '6.0'
143
157
  type: :development
144
158
  prerelease: false
145
159
  version_requirements: !ruby/object:Gem::Requirement
146
160
  requirements:
147
161
  - - ">="
148
162
  - !ruby/object:Gem::Version
149
- version: '5.1'
163
+ version: '6.0'
150
164
  - !ruby/object:Gem::Dependency
151
165
  name: rspec-rails
152
166
  requirement: !ruby/object:Gem::Requirement
153
167
  requirements:
154
168
  - - "~>"
155
169
  - !ruby/object:Gem::Version
156
- version: '5.0'
170
+ version: '4.0'
157
171
  type: :development
158
172
  prerelease: false
159
173
  version_requirements: !ruby/object:Gem::Requirement
160
174
  requirements:
161
175
  - - "~>"
162
176
  - !ruby/object:Gem::Version
163
- version: '5.0'
177
+ version: '4.0'
164
178
  - !ruby/object:Gem::Dependency
165
179
  name: sqlite3
166
180
  requirement: !ruby/object:Gem::Requirement
@@ -237,14 +251,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
237
251
  requirements:
238
252
  - - ">="
239
253
  - !ruby/object:Gem::Version
240
- version: '2.4'
254
+ version: '2.6'
241
255
  required_rubygems_version: !ruby/object:Gem::Requirement
242
256
  requirements:
243
257
  - - ">="
244
258
  - !ruby/object:Gem::Version
245
259
  version: '0'
246
260
  requirements: []
247
- rubygems_version: 3.3.14
261
+ rubygems_version: 3.2.12
248
262
  signing_key:
249
263
  specification_version: 4
250
264
  summary: DSL for wechat message handling and API
metadata.gz.sig CHANGED
Binary file