wechat-jsapi 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -2
- data/Gemfile.lock +30 -18
- data/ROADMAP.md +3 -0
- data/lib/wechat/jsapi/signature.rb +8 -0
- data/lib/wechat/jsapi/ticket.rb +5 -2
- data/lib/wechat/jsapi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa2aa289708afa2d120dec5ceb9ba85e8c246650
|
4
|
+
data.tar.gz: c6a7ecc48c7603fbaddfe5c554ec985dc1a198d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ebf461a257255367f5cf29a5ff191dbe48d4df9a418c1c51721f737f7d0790047758a4ae20b4426d645225cf0785f9b9353a22d0a8ef8471207326459d27402
|
7
|
+
data.tar.gz: e7ddf76b8bfecf8091944583c4de6f729c033a8fc48c6db76515a1b03e09aeb5f8f105cb8d16a0d0eca892f3a17563d03f35ffcb0b45ea0305b72a9755df55d6
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,9 @@
|
|
5
5
|
2. Ticket wrapper class
|
6
6
|
|
7
7
|
## v0.1.1
|
8
|
-
1.
|
9
|
-
2.
|
8
|
+
1. Improved the Ruby Gem Specification to depend on [wechat-core](https://github.com/topbitdu/wechat-core) v0.4
|
9
|
+
2. Improved the Signature class for the argument validation
|
10
10
|
3. Improve the Ticket wrapper class for the argument validation & HTTP request
|
11
|
+
|
12
|
+
## v0.1.2
|
13
|
+
1. Improve the Ticket wrapper class for the HTTP request
|
data/Gemfile.lock
CHANGED
@@ -1,30 +1,42 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
wechat-jsapi (0.1)
|
5
|
-
wechat-core (~> 0.
|
4
|
+
wechat-jsapi (0.1.1)
|
5
|
+
wechat-core (~> 0.4)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
|
11
|
-
|
10
|
+
activesupport (5.0.2)
|
11
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
12
|
+
i18n (~> 0.7)
|
13
|
+
minitest (~> 5.1)
|
14
|
+
tzinfo (~> 1.1)
|
15
|
+
concurrent-ruby (1.0.5)
|
16
|
+
diff-lcs (1.3)
|
17
|
+
httpclient (2.8.3)
|
18
|
+
i18n (0.8.1)
|
19
|
+
minitest (5.10.1)
|
12
20
|
rake (10.5.0)
|
13
|
-
rspec (3.
|
14
|
-
rspec-core (~> 3.
|
15
|
-
rspec-expectations (~> 3.
|
16
|
-
rspec-mocks (~> 3.
|
17
|
-
rspec-core (3.
|
18
|
-
rspec-support (~> 3.
|
19
|
-
rspec-expectations (3.
|
21
|
+
rspec (3.5.0)
|
22
|
+
rspec-core (~> 3.5.0)
|
23
|
+
rspec-expectations (~> 3.5.0)
|
24
|
+
rspec-mocks (~> 3.5.0)
|
25
|
+
rspec-core (3.5.4)
|
26
|
+
rspec-support (~> 3.5.0)
|
27
|
+
rspec-expectations (3.5.0)
|
20
28
|
diff-lcs (>= 1.2.0, < 2.0)
|
21
|
-
rspec-support (~> 3.
|
22
|
-
rspec-mocks (3.
|
29
|
+
rspec-support (~> 3.5.0)
|
30
|
+
rspec-mocks (3.5.0)
|
23
31
|
diff-lcs (>= 1.2.0, < 2.0)
|
24
|
-
rspec-support (~> 3.
|
25
|
-
rspec-support (3.
|
26
|
-
|
27
|
-
|
32
|
+
rspec-support (~> 3.5.0)
|
33
|
+
rspec-support (3.5.0)
|
34
|
+
thread_safe (0.3.6)
|
35
|
+
tzinfo (1.2.2)
|
36
|
+
thread_safe (~> 0.1)
|
37
|
+
wechat-core (0.4.1)
|
38
|
+
activesupport (>= 4.2)
|
39
|
+
httpclient (>= 2.8)
|
28
40
|
|
29
41
|
PLATFORMS
|
30
42
|
ruby
|
@@ -36,4 +48,4 @@ DEPENDENCIES
|
|
36
48
|
wechat-jsapi!
|
37
49
|
|
38
50
|
BUNDLED WITH
|
39
|
-
1.
|
51
|
+
1.13.6
|
data/ROADMAP.md
CHANGED
@@ -8,3 +8,6 @@
|
|
8
8
|
1. Improve the Ruby Gem Specification to depend on [wechat-core](https://github.com/topbitdu/wechat-core) v0.4
|
9
9
|
2. Improve the Signature class for the argument validation
|
10
10
|
3. Improve the Ticket wrapper class for the argument validation & HTTP request
|
11
|
+
|
12
|
+
## v0.1.2
|
13
|
+
1. Improve the Ticket wrapper class for the HTTP request
|
@@ -1,3 +1,11 @@
|
|
1
|
+
##
|
2
|
+
# Singature 类提供生成JS-SDK权限验证的签名的方法。如:
|
3
|
+
# link = 'https://product-wechat.company.com/home'
|
4
|
+
# ticket = // your ticket
|
5
|
+
# timestamp = Time.now.to_i.to_s
|
6
|
+
# nonce = SecureRandom.hex 8
|
7
|
+
# singature = Wechat::JSAPI::Signature.create link, ticket, timestamp, nonce
|
8
|
+
|
1
9
|
class Wechat::JSAPI::Signature
|
2
10
|
|
3
11
|
extend Wechat::Core::Common
|
data/lib/wechat/jsapi/ticket.rb
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
##
|
2
|
+
# Ticket 类提供根据访问令牌 access_token 获取 JSAPI Ticket 的方法。如:
|
3
|
+
# jsapi_ticket = Wechat::JSAPI::Ticket.create access_token
|
4
|
+
|
1
5
|
class Wechat::JSAPI::Ticket
|
2
6
|
|
3
7
|
extend Wechat::Core::Common
|
@@ -17,8 +21,7 @@ class Wechat::JSAPI::Ticket
|
|
17
21
|
|
18
22
|
assert_present! :access_token, access_token
|
19
23
|
|
20
|
-
|
21
|
-
message.body
|
24
|
+
get_json "https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=#{access_token}&type=jsapi"
|
22
25
|
|
23
26
|
end
|
24
27
|
|
data/lib/wechat/jsapi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wechat-jsapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Topbit Du
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|