nexaas_id-client 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/nexaas_id/resources/widget.rb +12 -1
- data/lib/nexaas_id/version.rb +1 -1
- data/spec/nexaas_id/resources/widget_spec.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 514641b029e1c683b93818a9ac35ce4ad01969d80d51ce50ef97023e35d0dff9
|
4
|
+
data.tar.gz: dd10b848d5d02a3c8b44c3f7b050839847ad20049f229cdb299cd0bcbc40570c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd58dcbaa0e7a23d512252be729ca3335bf9b54ed3592e122d2a5257317600bd884c5bb499c4215a6af8d72ea38dc9a923e7d5b969dacb9aea9cd46c0d232ba7
|
7
|
+
data.tar.gz: 81b0e19df9ff7ceda3a0f95c413358abdac532f5cc40234e7ae8238376d696f8decd6a28e54d2b7200bbf9cdb07306201da24b29ad3da3ea6bddcb7bb6989f9a
|
data/README.md
CHANGED
@@ -8,7 +8,7 @@ This is the official Ruby client for the [Nexaas ID](https://id.nexaas.com) API.
|
|
8
8
|
[![Code Climate Grade](https://codeclimate.com/github/myfreecomm/nexaas-id-client-ruby.png)](https://codeclimate.com/github/myfreecomm/nexaas-id-client-ruby)
|
9
9
|
[![Inline docs](http://inch-ci.org/github/myfreecomm/nexaas-id-client-ruby.svg)](http://inch-ci.org/github/myfreecomm/nexaas-id-client-ruby)
|
10
10
|
|
11
|
-
Nexaas ID API docs: https://id.nexaas.com/
|
11
|
+
Nexaas ID API docs: https://docs.id.nexaas.com/
|
12
12
|
|
13
13
|
nexaas-id-client-ruby RDoc documentation: http://rubydoc.info/github/myfreecomm/nexaas-id-client-ruby/frames/
|
14
14
|
|
@@ -13,7 +13,6 @@
|
|
13
13
|
#
|
14
14
|
# @see NexaasID::Client::Identity#initialize
|
15
15
|
class NexaasID::Resources::Widget < NexaasID::Resources::Base
|
16
|
-
|
17
16
|
# Retrieves the user's navbar URL
|
18
17
|
#
|
19
18
|
# [API]
|
@@ -25,4 +24,16 @@ class NexaasID::Resources::Widget < NexaasID::Resources::Base
|
|
25
24
|
def navbar_url
|
26
25
|
%(#{configuration.url}/api/v1/widgets/navbar?access_token=#{api.token})
|
27
26
|
end
|
27
|
+
|
28
|
+
# Retrieves the user's widget URL
|
29
|
+
#
|
30
|
+
# [API]
|
31
|
+
# Method: <tt>GET /api/v1/widgets/user</tt>
|
32
|
+
#
|
33
|
+
# Documentation:
|
34
|
+
#
|
35
|
+
# @return [String] user's widget URL
|
36
|
+
def widget_url(callback = 'initWidget')
|
37
|
+
%(#{configuration.url}/api/v1/widgets/user.js?access_token=#{api.token}&callback=#{callback})
|
38
|
+
end
|
28
39
|
end
|
data/lib/nexaas_id/version.rb
CHANGED
@@ -21,4 +21,16 @@ describe NexaasID::Resources::Widget do
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
24
|
+
|
25
|
+
describe "widget_url" do
|
26
|
+
subject { resource.widget_url }
|
27
|
+
let(:regexp) { %r(#{Regexp.quote(configuration.url)}/api/v1/widgets/user.js\?access_token=(.+?)&callback=initWidget$) }
|
28
|
+
|
29
|
+
it 'returns the navbar url for this user' do
|
30
|
+
VCR.use_cassette('identity/widget/widget_url/success') do
|
31
|
+
expect(subject).to match(regexp)
|
32
|
+
expect(Faraday.get(subject).status).to eq(200)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
24
36
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nexaas_id-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rodrigo Tassinari de Oliveira
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2018-10-
|
14
|
+
date: 2018-10-31 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: multi_json
|