third_party_wxa 0.2.2 → 0.2.4

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: 0776e8379885c9c2a1b7061f77e4ee70929b1aaa9d645ea9ab253f741dfc9e47
4
- data.tar.gz: 75efc358ba23c3a5ada52d9211e0ede8f525ddd23c0120a927ea25b2cfea8d87
3
+ metadata.gz: 299ad55c809a181eb2edf05fdb1a42853cc00b1f90f47a5974b47e2446e33e27
4
+ data.tar.gz: 63351888433ff85ff07a469898ca46414c5a53713c782617ee7a8f5d357530d8
5
5
  SHA512:
6
- metadata.gz: da0a2312fc358ce7b0cc4a0f1208d4cd5ad99b8f13eab80d505044eccc7164dcfeab9e4b2d621695423337a42861f120643f10902b19346e922c04536aebf3b5
7
- data.tar.gz: 4d1c249c83906876fd79330d89910842fe933320f321c11c7365cfc11f90f5f9585bc3509b34df68a5fea9fe974646291da0bdc1a5e48dd1cafde8ad326e2b89
6
+ metadata.gz: 3477aa284f073b0840edc5bd378e52cf369e14e234bd75eecf1234765154052a8e8346b0bbdc34db468c7f5f912a918227fb0e7abc0c44da10fee350cfce4093
7
+ data.tar.gz: 01c7338901b34f371b63bd65250771d575c7bea6ae2aca941009de8adc43da95e11291446d7443d3c61522a712ab35be2f642666677a163ff7f6d3499f7f6481
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- third_party_wxa (0.2.2)
4
+ third_party_wxa (0.2.4)
5
5
  activesupport
6
6
  json (>= 1.8.6)
7
7
  redis
@@ -11,7 +11,7 @@ module ThirdPartyWxa
11
11
  component_access_token: get_component_access_token,
12
12
  grant_type: 'authorization_code'
13
13
  }.merge!(options.slice(:appid, :js_code))
14
- http_get 'sns', 'component/jscode2session', params
14
+ ThirdPartyWxa.http_get_without_component_access_token 'sns', 'component/jscode2session', params
15
15
  end
16
16
 
17
17
  end
@@ -15,9 +15,10 @@ module ThirdPartyWxa
15
15
  attr_accessor :pre_auth_code, :pre_expire_at #10分钟
16
16
  attr_accessor :token_store
17
17
 
18
- def initialize
18
+ def initialize ticket = nil
19
19
  @appid = ThirdPartyWxa.appid
20
20
  @appsecret = ThirdPartyWxa.appsecret
21
+ @component_verify_ticket = ticket
21
22
  @token_store = token_store_init
22
23
  p "third party wxa use #{@token_store.class.to_s}"
23
24
  end
@@ -1,3 +1,3 @@
1
1
  module ThirdPartyWxa
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.4"
3
3
  end
@@ -1,6 +1,7 @@
1
1
  require 'rest_client'
2
2
  require 'redis'
3
3
  require 'active_support'
4
+ require 'active_support/core_ext'
4
5
  require 'third_party_wxa/config'
5
6
  require "third_party_wxa/api"
6
7
  require 'third_party_wxa/plugin'
@@ -19,6 +20,7 @@ module ThirdPartyWxa
19
20
  def http_get_without_component_access_token scope, url, url_params={}
20
21
  url = "#{BASE}#{scope}/#{url}"
21
22
  p "get ----- #{url}"
23
+ p url_params
22
24
  JSON.parse RestClient.get URI.encode(url), {params: url_params}
23
25
  end
24
26
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: third_party_wxa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - hzy