simple_wechat 0.0.1

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 591aedde5b021ee5731d6aedd92f03c2621e7c4a
4
+ data.tar.gz: 538ec9d8d5815e3c20369f13b4121927b7b4cbb8
5
+ SHA512:
6
+ metadata.gz: 5df5d4e33cc32a02837a4e3f1e1bd15033568c575d6f182b9a7862783c89cd264b0ed30fc1d52c5ff7901b332348441ba5f99a7f47f174b8bc8ecd9511a8fdf4
7
+ data.tar.gz: edbd9f95b39606715251a4596a991174971118ee6e9f985bef06dee26b6b60418d7d9242c70d66d06989d1e5562531c888d0088e4753b325127f9d1c47f78c81
@@ -0,0 +1,15 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
15
+ /*.gem
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
@@ -0,0 +1,3 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.3
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in wechat.gemspec
4
+ gemspec
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 Yuan Cheung
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,88 @@
1
+ # SimpleWechat
2
+
3
+ [![Build Status](https://travis-ci.org/zhangyuan/wechat.svg)](https://travis-ci.org/zhangyuan/wechat)
4
+
5
+ Simple Wechat Api Wrapper.
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'simple_wechat'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install wechat
22
+
23
+ ## Usage
24
+
25
+ ### Fetch access token
26
+
27
+ ```ruby
28
+ client = SimpleWechat::Client.new("APPID", "APPSECRET")
29
+ access_token = client.get_access_token
30
+ # access_token and expires_in are wrapped in access_token.
31
+ ```
32
+
33
+ ### Fetch jsapi ticket
34
+
35
+ ```ruby
36
+ jsapi = SimpleWechat::JsApi.new
37
+ ticket = jsapi.get_ticket("ACCESS_TOKEN")
38
+ # ticket, errcode, errmsg, expires_in are wrapped in ticket.
39
+ ```
40
+
41
+ ### Get jsapi config
42
+
43
+ ```ruby
44
+ ticket = "sM4AOVdWfPE4DxkXGEs8VMCPGGVi4C3VM0P37wVUCFvkVAy_90u5h9nbSlYy3-Sl-HhTdfl2fzFy1AOcHKP7qg"
45
+ jsapi = SimpleWechat::JsApi.new
46
+ config = jsapi.get_config(ticket, "http://wx.qq.com", "APPID", ["previewImage"])
47
+ # now MultiJson.encode(config) can be passed into function wx.config() in javascript.
48
+ ```
49
+
50
+ ### OAuth
51
+
52
+ OAuth part is borrowed from `wechat-auth_client` ( https://github.com/zhangyuan/wechat-auth_client ).
53
+
54
+ > `REDIRECT_URL` should be configured in WeChat management system and route to callback action
55
+
56
+ ```ruby
57
+ class SessionsController < ApplicationController
58
+ def auth
59
+ redirect_to auth_client.authorize_url(REDIRECT_URL, state)
60
+ end
61
+
62
+ def callback
63
+ if state == params[:state]
64
+ access_token = auth_client.get_token(params[:code])
65
+ # do something with access_token.
66
+ # for example, call access_token.openid to get openid
67
+ end
68
+ end
69
+
70
+ private
71
+
72
+ def auth_client
73
+ @auth_client ||= SimpleWechat::Client.new(APP_ID, APP_SECRET).get_auth_client
74
+ end
75
+
76
+ def state
77
+ session[:state] ||= SecureRandom.hex(3)
78
+ end
79
+ end
80
+ ```
81
+
82
+ ## Contributing
83
+
84
+ 1. Fork it ( https://github.com/zhangyuan/wechat/fork )
85
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
86
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
87
+ 4. Push to the branch (`git push origin my-new-feature`)
88
+ 5. Create a new Pull Request
@@ -0,0 +1,5 @@
1
+ require "bundler/gem_tasks"
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+ task :default => :spec
@@ -0,0 +1,7 @@
1
+ require "simple_wechat/version"
2
+ require "simple_wechat/client"
3
+ require "simple_wechat/jsapi"
4
+ require "simple_wechat/auth_client"
5
+
6
+ module SimpleWechat
7
+ end
@@ -0,0 +1,40 @@
1
+ require "cgi"
2
+
3
+ module SimpleWechat
4
+ class AuthClient
5
+ class AccessToken
6
+ ATTRIBUTES = %w(access_token expires_in refresh_token openid scope errcode errmsg).freeze
7
+ attr_reader *ATTRIBUTES
8
+
9
+ def initialize(options = {})
10
+ ATTRIBUTES.each do |name|
11
+ instance_variable_set("@#{name}", options[name])
12
+ end
13
+ end
14
+ end
15
+
16
+ attr_reader :appid, :secret
17
+
18
+ def initialize(appid, secret)
19
+ @appid, @secret = appid, secret
20
+ end
21
+
22
+ def authorize_url(redirect_uri, state, options = {})
23
+ scope = options[:scope] ||= "snsapi_base"
24
+ "https://open.weixin.qq.com/connect/oauth2/authorize?appid=#{appid}&redirect_uri=#{CGI.escape redirect_uri}&response_type=code&scope=#{scope}&state=#{state}#wechat_redirect"
25
+ end
26
+
27
+ def get_token(code)
28
+ response = connection.get("https://api.weixin.qq.com/sns/oauth2/access_token?appid=#{appid}&secret=#{secret}&code=#{code}&grant_type=authorization_code")
29
+ access_token = AccessToken.new MultiJson.load(response.body)
30
+ end
31
+
32
+ def connection
33
+ @connection ||= begin
34
+ conn = Faraday.new do |faraday|
35
+ faraday.adapter Faraday.default_adapter
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,37 @@
1
+ module SimpleWechat
2
+ class Client
3
+ class AccessToken
4
+ ATTRIBUTES = %W(access_token expires_in errcode errmsg).freeze
5
+ attr_reader *ATTRIBUTES
6
+
7
+ def initialize(options = {})
8
+ ATTRIBUTES.each do |name|
9
+ instance_variable_set("@#{name}", options[name])
10
+ end
11
+ end
12
+ end
13
+
14
+ attr_reader :appid, :secret
15
+
16
+ def initialize(appid, secret)
17
+ @appid, @secret = appid, secret
18
+ end
19
+
20
+ def get_access_token
21
+ response = connection.get("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=#{appid}&secret=#{secret}")
22
+ AccessToken.new MultiJson.load(response.body)
23
+ end
24
+
25
+ def get_auth_client
26
+ AuthClient.new(appid, secret)
27
+ end
28
+
29
+ def connection
30
+ @connection ||= begin
31
+ conn = Faraday.new do |faraday|
32
+ faraday.adapter Faraday.default_adapter
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,52 @@
1
+ module SimpleWechat
2
+ class JsApi
3
+ class Ticket
4
+ ATTRIBUTES = %W(errcode errmsg ticket expires_in).freeze
5
+ attr_reader *ATTRIBUTES
6
+
7
+ def initialize(options = {})
8
+ ATTRIBUTES.each do |name|
9
+ instance_variable_set("@#{name}", options[name])
10
+ end
11
+ end
12
+ end
13
+
14
+ def get_ticket(access_token)
15
+ response = connection.get("https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=#{access_token}&type=jsapi")
16
+ Ticket.new MultiJson.load(response.body)
17
+ end
18
+
19
+ def sign(jsapi_ticket, noncestr, timestamp, url)
20
+ params = {
21
+ noncestr: noncestr,
22
+ timestamp: timestamp,
23
+ jsapi_ticket: jsapi_ticket,
24
+ url: url
25
+ }
26
+
27
+ text = params.keys.sort.map {|key| "#{key}=#{params[key]}"}.join('&')
28
+
29
+ Digest::SHA1.hexdigest(text)
30
+ end
31
+
32
+ def get_config(jsapi_ticket, url, appid, api_list, options = {})
33
+ timestamp = (options[:timestamp] || Time.now).to_i
34
+ noncestr = options[:noncestr] || SecureRandom.hex(10)
35
+ signature = sign(jsapi_ticket, noncestr, timestamp, url)
36
+ {
37
+ appId: appid,
38
+ timestamp: timestamp,
39
+ signature: signature,
40
+ jsApiList: api_list
41
+ }
42
+ end
43
+
44
+ def connection
45
+ @connection ||= begin
46
+ conn = Faraday.new do |faraday|
47
+ faraday.adapter Faraday.default_adapter
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,3 @@
1
+ module SimpleWechat
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'simple_wechat/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "simple_wechat"
8
+ spec.version = SimpleWechat::VERSION
9
+ spec.authors = ["Yuan Cheung"]
10
+ spec.email = ["advanimal@gmail.com"]
11
+ spec.summary = %q{Simple WeChat API wrapper}
12
+ spec.homepage = "https://github.com/zhangyuan/wechat"
13
+ spec.license = "MIT"
14
+
15
+ spec.files = `git ls-files -z`.split("\x0")
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
+ spec.require_paths = ["lib"]
19
+
20
+ spec.add_runtime_dependency "faraday", "~> 0.9"
21
+ spec.add_runtime_dependency "multi_json", "~> 1.2"
22
+ spec.add_development_dependency "bundler", "~> 1.6"
23
+ spec.add_development_dependency "rake", "~> 10.0"
24
+ spec.add_development_dependency "rspec", "~> 3.0"
25
+ spec.add_development_dependency "webmock", "~> 1.18"
26
+ end
@@ -0,0 +1,52 @@
1
+ require File.expand_path("../../spec_helper", __FILE__)
2
+
3
+ RSpec.describe SimpleWechat::AuthClient do
4
+ it 'should generate authorize_url' do
5
+ client = SimpleWechat::Client.new("theappid", "thesecret").get_auth_client
6
+ authorize_url = client.authorize_url("http://example.com/wechat", "999")
7
+ expected_url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=theappid&redirect_uri=http%3A%2F%2Fexample.com%2Fwechat&response_type=code&scope=snsapi_base&state=999#wechat_redirect"
8
+ expect(authorize_url).to eq(expected_url)
9
+ end
10
+
11
+ context "correct params" do
12
+ it 'should get token' do
13
+ client = SimpleWechat::AuthClient.new("theappid", "thesecret")
14
+ body = %q(
15
+ {
16
+ "access_token":"ACCESS_TOKEN",
17
+ "expires_in":7200,
18
+ "refresh_token":"REFRESH_TOKEN",
19
+ "openid":"OPENID",
20
+ "scope":"SCOPE"
21
+ }
22
+ )
23
+ stub_request(:get, "https://api.weixin.qq.com/sns/oauth2/access_token?appid=#{client.appid}&secret=#{client.secret}&code=thecode&grant_type=authorization_code").to_return(body: body)
24
+
25
+ access_token = client.get_token("thecode")
26
+
27
+ expect(access_token.access_token).to eq("ACCESS_TOKEN")
28
+ expect(access_token.expires_in).to eq(7200)
29
+ expect(access_token.refresh_token).to eq("REFRESH_TOKEN")
30
+ expect(access_token.openid).to eq("OPENID")
31
+ expect(access_token.scope).to eq("SCOPE")
32
+ end
33
+ end
34
+
35
+ context "invalid params" do
36
+ it 'should get error' do
37
+ client = SimpleWechat::AuthClient.new("theappid", "thesecret")
38
+ body = %q(
39
+ {
40
+ "errcode": 40029,
41
+ "errmsg": "invalid code"
42
+ }
43
+ )
44
+ stub_request(:get, "https://api.weixin.qq.com/sns/oauth2/access_token?appid=#{client.appid}&secret=#{client.secret}&code=thecode&grant_type=authorization_code").to_return(body: body)
45
+
46
+ access_token = client.get_token("thecode")
47
+
48
+ expect(access_token.errcode).to eq(40029)
49
+ expect(access_token.errmsg).to eq("invalid code")
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,32 @@
1
+ require File.expand_path("../../spec_helper", __FILE__)
2
+
3
+ describe "client" do
4
+ describe "access token" do
5
+ it "get access token" do
6
+ client = SimpleWechat::Client.new("APPID", "APPSECRET")
7
+
8
+ body = %Q({"access_token":"ACCESS_TOKEN", "expires_in":7200})
9
+ stub_request(:get, "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET").to_return(body: body)
10
+
11
+ access_token = client.get_access_token
12
+
13
+ expect(access_token).not_to be_nil
14
+ expect(access_token.access_token).to eq("ACCESS_TOKEN")
15
+ expect(access_token.expires_in).to eq(7200)
16
+ end
17
+
18
+ it "get error code and msg if get error from response" do
19
+ client = SimpleWechat::Client.new("APPID", "APPSECRET")
20
+
21
+ body = %Q({"errcode":40013,"errmsg":"invalid appid"})
22
+ stub_request(:get, "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET").to_return(body: body)
23
+
24
+ access_token = client.get_access_token
25
+
26
+ expect(access_token).not_to be_nil
27
+ expect(access_token.access_token).to be_nil
28
+ expect(access_token.errcode).to eq(40013)
29
+ expect(access_token.errmsg).to eq("invalid appid")
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,40 @@
1
+ require File.expand_path("../../spec_helper", __FILE__)
2
+
3
+ describe 'jsapi ticket' do
4
+ it 'gets ticket by access token' do
5
+ body = %Q({"errcode":0,"errmsg":"ok","ticket":"bxLdikRXVbTPdHSM05e5u5sUoXNKd8-41ZO3MhKoyN5OfkWITDGgnr2fwJ0m9E8NYzWKVZvdVtaUgWvsdshFKA","expires_in":7200})
6
+
7
+ stub_request(:get, "https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=ACCESS_TOKEN&type=jsapi").to_return(body: body)
8
+
9
+ jsapi = SimpleWechat::JsApi.new
10
+
11
+ ticket = jsapi.get_ticket("ACCESS_TOKEN")
12
+
13
+ expect(ticket).not_to be_nil
14
+ expect(ticket.errcode).to eq(0)
15
+ expect(ticket.errmsg).to eq("ok")
16
+ expect(ticket.ticket).to eq("bxLdikRXVbTPdHSM05e5u5sUoXNKd8-41ZO3MhKoyN5OfkWITDGgnr2fwJ0m9E8NYzWKVZvdVtaUgWvsdshFKA")
17
+ expect(ticket.expires_in).to eq(7200)
18
+ end
19
+
20
+ it "signs params with ticket" do
21
+ ticket = "sM4AOVdWfPE4DxkXGEs8VMCPGGVi4C3VM0P37wVUCFvkVAy_90u5h9nbSlYy3-Sl-HhTdfl2fzFy1AOcHKP7qg"
22
+ jsapi = SimpleWechat::JsApi.new
23
+
24
+ signature = jsapi.sign(ticket, "Wm3WZYTPz0wzccnW", "1414587457", "http://mp.weixin.qq.com")
25
+
26
+ expect(signature).to eq("f4d90daf4b3bca3078ab155816175ba34c443a7b")
27
+ end
28
+
29
+ it 'gets config' do
30
+ ticket = "sM4AOVdWfPE4DxkXGEs8VMCPGGVi4C3VM0P37wVUCFvkVAy_90u5h9nbSlYy3-Sl-HhTdfl2fzFy1AOcHKP7qg"
31
+ jsapi = SimpleWechat::JsApi.new
32
+
33
+ allow(Time).to receive(:now).and_return(Time.new(2010,1,1, 11, 00, 00, "+00:00"))
34
+ allow(SecureRandom).to receive(:hex).and_return("63828a411458c5455a4c")
35
+
36
+ config = jsapi.get_config(ticket, "http://wx.qq.com", "APPID", ["previewImage"])
37
+
38
+ expect(MultiJson.encode(config)).to eq(%Q({"appId":"APPID","timestamp":1262343600,"signature":"bac3e183806b8e69743c8583221fd7712dd93175","jsApiList":["previewImage"]}))
39
+ end
40
+ end
@@ -0,0 +1,12 @@
1
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
2
+
3
+ require 'rubygems'
4
+ require "bundler"
5
+ require 'bundler/setup'
6
+
7
+ Bundler.require
8
+
9
+ require "faraday"
10
+ require "multi_json"
11
+
12
+ require 'webmock/rspec'
metadata ADDED
@@ -0,0 +1,149 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: simple_wechat
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Yuan Cheung
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-01-20 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: faraday
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.9'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.9'
27
+ - !ruby/object:Gem::Dependency
28
+ name: multi_json
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.2'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.2'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.6'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.6'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '10.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '10.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: webmock
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.18'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.18'
97
+ description:
98
+ email:
99
+ - advanimal@gmail.com
100
+ executables: []
101
+ extensions: []
102
+ extra_rdoc_files: []
103
+ files:
104
+ - ".gitignore"
105
+ - ".rspec"
106
+ - ".travis.yml"
107
+ - Gemfile
108
+ - LICENSE.txt
109
+ - README.md
110
+ - Rakefile
111
+ - lib/simple_wechat.rb
112
+ - lib/simple_wechat/auth_client.rb
113
+ - lib/simple_wechat/client.rb
114
+ - lib/simple_wechat/jsapi.rb
115
+ - lib/simple_wechat/version.rb
116
+ - simple_wechat.gemspec
117
+ - spec/simple_wechat/auth_client_spec.rb
118
+ - spec/simple_wechat/client_spec.rb
119
+ - spec/simple_wechat/jsapi_ticket_spec.rb
120
+ - spec/spec_helper.rb
121
+ homepage: https://github.com/zhangyuan/wechat
122
+ licenses:
123
+ - MIT
124
+ metadata: {}
125
+ post_install_message:
126
+ rdoc_options: []
127
+ require_paths:
128
+ - lib
129
+ required_ruby_version: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - ">="
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
134
+ required_rubygems_version: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ requirements: []
140
+ rubyforge_project:
141
+ rubygems_version: 2.2.2
142
+ signing_key:
143
+ specification_version: 4
144
+ summary: Simple WeChat API wrapper
145
+ test_files:
146
+ - spec/simple_wechat/auth_client_spec.rb
147
+ - spec/simple_wechat/client_spec.rb
148
+ - spec/simple_wechat/jsapi_ticket_spec.rb
149
+ - spec/spec_helper.rb