weixin_authorize 1.5.9 → 1.6.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
  SHA1:
3
- metadata.gz: fa3f0b2aefa861605741941f844ab85f1ac94643
4
- data.tar.gz: 5c03d38761626e496e6c4bddea72ad852030d393
3
+ metadata.gz: 6ae5accd2ca51dbfc3abbd41c541a8913493f554
4
+ data.tar.gz: a5fdabeca49c96650bdbadf256904dafb357b7be
5
5
  SHA512:
6
- metadata.gz: ac931c8e944a128b00598578d642fd6a7d65ec396fa95cfa6f5b2b79fdd9be79f8604c623a6268d8d85eea01a05489e1dfd0a816f9df7693063ba2aa10f7ee49
7
- data.tar.gz: 604d3424ebac5db36b727828a1155645d1354c4857e678891fe2c64f0f84bfe917f10ce07d23df271d5611bc302d4064a4b01278c144e131ea11ee08763c1c92
6
+ metadata.gz: 99ddcf2475e65599290e0413742f4214f666860b52e6b5ba4bdef7559e6170822e4c9803450c9b3096620a3044da2a3c21612ff2aaaf962bbe9754c3d465bc53
7
+ data.tar.gz: 8fea13921210dbc0e0d9b8741c6a3ab33de5177bc4ae076ec32b6c1f3b7374e9517e0b2fb2592f10286f3037e069a175cd9001d9f522021494925c72a6b65750
@@ -54,8 +54,8 @@ module WeixinAuthorize
54
54
  "http://file.api.weixin.qq.com/cgi-bin"
55
55
  end
56
56
 
57
- def mp_endpoint
58
- "https://mp.weixin.qq.com/cgi-bin"
57
+ def mp_endpoint(url)
58
+ "https://mp.weixin.qq.com/cgi-bin#{url}"
59
59
  end
60
60
 
61
61
  end
@@ -1,3 +1,3 @@
1
1
  module WeixinAuthorize
2
- VERSION = "1.5.9"
2
+ VERSION = "1.6.0"
3
3
  end
@@ -12,7 +12,7 @@ describe WeixinAuthorize::Api::Groups do
12
12
  it "create a group" do
13
13
  response = $client.create_group(group_name)
14
14
  if response.code == WeixinAuthorize::OK_CODE
15
- expect(response["group"]["name"]).to eq(group_name)
15
+ expect(response.result["group"]["name"]).to eq(group_name)
16
16
  else
17
17
  expect(response.code).to eq(-1)
18
18
  puts "SB WEIXIN says: system error"
@@ -14,5 +14,11 @@ describe WeixinAuthorize::Api::Qrcode do
14
14
  expect(response.code).to eq(WeixinAuthorize::OK_CODE)
15
15
  expect(response.result.keys).to eq(["ticket"])
16
16
  end
17
-
17
+
18
+ it "#return_qr_url" do
19
+ response = $client.create_qr_limit_scene("1234")
20
+ qr_url = $client.qr_code_url(response.result["ticket"])
21
+ expect(response.code).to eq(WeixinAuthorize::OK_CODE)
22
+ expect(qr_url).to match(/(\S+\.(com|net|org|edu|gov)(\/\S+)?)/)
23
+ end
18
24
  end
data/spec/spec_helper.rb CHANGED
@@ -37,9 +37,9 @@ SimpleCov.start
37
37
  ENV['CODECLIMATE_REPO_TOKEN'] = "c91fecbbd9e414e7cc3ad7a7d99207145de0ac65a3368de09e8c19295343d399"
38
38
  CodeClimate::TestReporter.start
39
39
 
40
- ENV["APPID"]="wx986f04063d341d04"
41
- ENV["APPSECRET"]="1a941cd88cb4579ba98ec06b6813af03"
42
- ENV["OPENID"]="o9k6BuB0kydAcPTc7sPxppB1GQqA"
40
+ ENV["APPID"]="wxe371e0960de5426a"
41
+ ENV["APPSECRET"]="572b93d3d20aea242692a804243a141b"
42
+ ENV["OPENID"]="oEEoyuEasxionjR5HygmEOQGwRcw"
43
43
 
44
44
  # Comment to test for ClientStorage
45
45
  redis = Redis.new(:host => "127.0.0.1",:port => "6379")
metadata CHANGED
@@ -1,111 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: weixin_authorize
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.9
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - lanrion
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-26 00:00:00.000000000 Z
11
+ date: 2014-05-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 1.6.7
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.6.7
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: redis
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: 3.0.7
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 3.0.7
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: carrierwave
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: 0.10.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.10.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: mini_magick
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: 3.7.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
68
  version: 3.7.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: yajl-ruby
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: 1.2.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: 1.2.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '1.3'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '1.3'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rake
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  description: weixin api authorize access_token
@@ -115,10 +115,10 @@ executables: []
115
115
  extensions: []
116
116
  extra_rdoc_files: []
117
117
  files:
118
- - .coveralls.yml
119
- - .gitignore
120
- - .rspec
121
- - .travis.yml
118
+ - ".coveralls.yml"
119
+ - ".gitignore"
120
+ - ".rspec"
121
+ - ".travis.yml"
122
122
  - Gemfile
123
123
  - LICENSE.txt
124
124
  - README.md
@@ -163,12 +163,12 @@ require_paths:
163
163
  - lib
164
164
  required_ruby_version: !ruby/object:Gem::Requirement
165
165
  requirements:
166
- - - '>='
166
+ - - ">="
167
167
  - !ruby/object:Gem::Version
168
168
  version: '0'
169
169
  required_rubygems_version: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - '>='
171
+ - - ">="
172
172
  - !ruby/object:Gem::Version
173
173
  version: '0'
174
174
  requirements: []