zquickblox 0.1.3 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/zquickblox/user/find_user_request.rb +12 -0
- data/lib/zquickblox/user.rb +8 -0
- data/lib/zquickblox/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8504cbc6edd677249804261a809d424f4e34d64
|
4
|
+
data.tar.gz: f6f6473eee8da00b508b24d6c84e507ade0ee483
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7621e3d66779f8448ecdd1188e5d968e649894d17ac69c4510e54ce4f49db078e9c3d0a9730116a531f327fcf32f3a32420a9c6cabfe93c79fb08d18c8d9207d
|
7
|
+
data.tar.gz: 91243d9e0d41ad9903e58cf7a948488d671e1fedecf215596c1abb92e54cb42511b18dbb6e211ab5604d9add7456ec67e81d23c83472870fb8cac9fa4a89fc5f
|
data/README.md
CHANGED
@@ -36,8 +36,8 @@ You need to config your Quickblox as below:
|
|
36
36
|
|
37
37
|
```ruby
|
38
38
|
ZQuickblox.configure do |config|
|
39
|
-
config.app_id = ENV['QB_APP_ID']
|
40
|
-
config.auth_key = ENV['QB_AUTH_KEY']
|
39
|
+
config.app_id = ENV['QB_APP_ID']
|
40
|
+
config.auth_key = ENV['QB_AUTH_KEY']
|
41
41
|
config.auth_secret = ENV['QB_AUTH_SECRET']
|
42
42
|
end
|
43
43
|
```
|
data/lib/zquickblox/user.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require_relative "user/create_user_request"
|
2
|
+
require_relative "user/find_user_request"
|
2
3
|
|
3
4
|
module ZQuickblox
|
4
5
|
module User
|
@@ -12,6 +13,13 @@ module ZQuickblox
|
|
12
13
|
return user
|
13
14
|
end
|
14
15
|
|
16
|
+
def find(login)
|
17
|
+
request = ZQuickblox::User::FindUserRequest.new(login)
|
18
|
+
run_request(request)
|
19
|
+
return true if request.response.status == 200
|
20
|
+
return false
|
21
|
+
end
|
22
|
+
|
15
23
|
def run_request(request)
|
16
24
|
session = ZQuickblox::Session.create
|
17
25
|
request.header("QB-Token", session.token)
|
data/lib/zquickblox/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zquickblox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thuong Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -105,6 +105,7 @@ files:
|
|
105
105
|
- lib/zquickblox/signature.rb
|
106
106
|
- lib/zquickblox/user.rb
|
107
107
|
- lib/zquickblox/user/create_user_request.rb
|
108
|
+
- lib/zquickblox/user/find_user_request.rb
|
108
109
|
- lib/zquickblox/util.rb
|
109
110
|
- lib/zquickblox/version.rb
|
110
111
|
- zquickblox.gemspec
|
@@ -134,4 +135,3 @@ signing_key:
|
|
134
135
|
specification_version: 4
|
135
136
|
summary: A good friend of Quickblox.
|
136
137
|
test_files: []
|
137
|
-
has_rdoc:
|