blsm-mp-wx 0.3.3 → 0.3.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
  SHA1:
3
- metadata.gz: 1c73f477410ef96688ed160391f917d9b8d2c256
4
- data.tar.gz: 003d583687cd0d1ea87cb3f8e22dfed170a41187
3
+ metadata.gz: bc2f011245c2e6fd4f6467197f3a524c796e8f80
4
+ data.tar.gz: 4357f0f930a6f09f26b5f33a9079261216d36244
5
5
  SHA512:
6
- metadata.gz: 8b7084c4133c7303944afa4972599f476ae2305d8dc8033b8b7c52ef4568cb0e8eb915a80795d0e11977832b4e5be433a1327d7731fbbc68ef87364d6eacd9fc
7
- data.tar.gz: 44f3b74eabfa55cfb87f0084711fd4307e660430d0505cbd6c18b8cfa94f9b06233adb12d1766d5915181474d44f86f42cddea910f65b74f8819348f2b0c339d
6
+ metadata.gz: 930900ba844e99cdf19d2449089c6d44d6bd9d3569c29170656d83b93f092ac53ccd0c1ef03b2b5fda2cbc57520d869077a02a528b3bbbaa388b7ca2eda0af91
7
+ data.tar.gz: 5699f5cef098b018924e96a01632b272df72429bd0b3325a76bd63f35306ebcf6533c4b402059319f01f984ea49e26985d1209da7281a80064eb44dbd7484a25
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- blsm-mp-wx (0.3.3)
4
+ blsm-mp-wx (0.3.4)
5
5
 
6
6
  GEM
7
7
  remote: https://ruby.taobao.org/
data/lib/blsm-mp-wx.rb CHANGED
@@ -373,6 +373,7 @@ module BlsmMpWx
373
373
  end
374
374
 
375
375
  res = parse_json(response_body)
376
+ return res unless res['access_token']
376
377
 
377
378
 
378
379
  conn = Faraday.new(:url => 'https://api.weixin.qq.com')
@@ -389,6 +390,8 @@ module BlsmMpWx
389
390
  end
390
391
 
391
392
  res = parse_json(response_body)
393
+ return res unless res['nickname']
394
+
392
395
  VdWxUser.find_or_create_by({app_id: app_id, openid: res['openid']}) do |u|
393
396
  u.update_attributes({nickname: res['nickname'],
394
397
  sex: res['sex'],
@@ -1,3 +1,3 @@
1
1
  module BlsmMpWx
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blsm-mp-wx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - saxer