wechat 0.7.11 → 0.7.12

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
2
  SHA1:
3
- metadata.gz: 116461d643a7ce8bcee13205b330adaa55cdbbc9
4
- data.tar.gz: 5135952c36e164855393dfe2e4a8929664b7dff2
3
+ metadata.gz: e0fc18cb6f01dcb1f5fd99f3947937f9b0c811b5
4
+ data.tar.gz: 07cf6c337ecc83aee938c27838b91692e92b1137
5
5
  SHA512:
6
- metadata.gz: 379c865b5e66795d56ed8aa9701e010dea78b030d4c99d027c436aef1a83c846369dda50194090aae38cad37903b6c4e37c32f638741d2106ca82013b1c26994
7
- data.tar.gz: 6b439ec1e93a6f2d23224ea09472218a26cfb2d25304665a5355bf250dff108757a719561a25adb538f0e09926e9a28ff7d7ed00ed22d6a2b3f43219d9f1b339
6
+ metadata.gz: c8a09c74e9b7e43849df936d836635a44ab01f05e251b18466ad6d45615e4d0c50ce237df520737040ea2ad53b81ffd8f3bb25dcd2c43a22abe6c0b28490f10c
7
+ data.tar.gz: 75225026ae2156e10d4420b5287794b86c252825c07e3ec090b5dcf0a50c400616a6201be69ee6e922c34859c079029f8af8635fc8e7175581b3998a6f2c3b23
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.7.12 (released at 5/12/2016)
4
+
5
+ * Fix web_userinfo wrong URL, found by @gabrieltong #110
6
+
3
7
  ## v0.7.11 (released at 4/18/2016)
4
8
 
5
9
  * To cover wrong release 0.7.10, nothing change
@@ -68,6 +68,14 @@ Redis存贮相比默认的文件存贮,可以允许Rails应用运行在多台
68
68
 
69
69
  ## 配置
70
70
 
71
+ #### 微信的第一次配置
72
+
73
+ 请先确保在服务器上配置成功,再到微信官网提交链接。否则微信会提示错误。
74
+
75
+ 默认通过`rails g wechat:install`生成的URL是: `http://your-server.com/wechat`
76
+
77
+ appid/corpid,以及secret的配置请阅读下一节
78
+
71
79
  #### 命令行程序的配置
72
80
 
73
81
  要使用命令行程序,需要在home目录中创建一个`~/.wechat.yml`,包含以下内容。其中`access_token`是存放access_token的文件位置。
@@ -676,7 +684,7 @@ end
676
684
 
677
685
  * 企业号接受菜单消息时,Wechat腾讯服务器无法解析部分域名,请使用IP绑定回调URL,用户的普通消息目前不受影响。
678
686
  * 企业号全量覆盖成员使用的csv通讯录格式,直接将下载的模板导入[是不工作的](http://qydev.weixin.qq.com/qa/index.php?qa=13978),必须使用Excel打开,然后另存为csv格式才会变成合法格式。
679
-
687
+ * 如果使用nginx+unicron部署方案,并且使用了https,必须设置`trusted_domain_fullname`为https,否则会导致JS-SDK签名失效。
680
688
 
681
689
  [version-badge]: https://badge.fury.io/rb/wechat.svg
682
690
  [rubygems]: https://rubygems.org/gems/wechat
data/README.md CHANGED
@@ -75,6 +75,14 @@ Redis store support Rails application running in multi-server, no need to enable
75
75
 
76
76
  ## Configuration
77
77
 
78
+ #### Configure for wechat for first time
79
+
80
+ Make sure finish all the setup on rails side first, then submit to wechat. Otherwise, wechat will raise error.
81
+
82
+ URL address for wechat by running `rails g wechat:install` is `http://your-server.com/wechat`
83
+
84
+ How to setup appid/corpid and secret see below section.
85
+
78
86
  #### Configure for command line
79
87
 
80
88
  To using `wechat` command solely, needs created configure file `~/.wechat.yml` and including below content for public account. the access_token will be write as a file.
@@ -689,7 +697,7 @@ end
689
697
 
690
698
  * Sometime, enterprise account can not receive the menu message due to Tencent server can not resolved the DNS, so using IP as a callback URL more stable, but it's never happen for user sent text message.
691
699
  * Enterprise batch replace users using a CSV format file, but if you using the download template directly, it's [not working](http://qydev.weixin.qq.com/qa/index.php?qa=13978), must open the CSV file in excel first, then save as CSV format again, seems Tencent only support Excel save as CSV file format.
692
-
700
+ * If you using unicorn behind nginx and https, you need setting `trusted_domain_fullname` and point to https, other will got http and lead invalid signature in the JS-SDK.
693
701
 
694
702
  [version-badge]: https://badge.fury.io/rb/wechat.svg
695
703
  [rubygems]: https://rubygems.org/gems/wechat
@@ -155,7 +155,7 @@ module Wechat
155
155
  end
156
156
 
157
157
  def web_userinfo(web_access_token, openid, lang = 'zh_CN')
158
- client.get 'sns/userinfo', params: { access_token: web_access_token, openid: openid, lang: lang }, base: OAUTH2_BASE
158
+ client.get 'userinfo', params: { access_token: web_access_token, openid: openid, lang: lang }, base: OAUTH2_BASE
159
159
  end
160
160
  end
161
161
  end
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.7.11
4
+ version: 0.7.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Skinnyworm
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-04-18 00:00:00.000000000 Z
12
+ date: 2016-05-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
185
  version: '0'
186
186
  requirements: []
187
187
  rubyforge_project:
188
- rubygems_version: 2.4.8
188
+ rubygems_version: 2.6.4
189
189
  signing_key:
190
190
  specification_version: 4
191
191
  summary: DSL for wechat message handling and API