bwapi 11.0.1.pre.612 → 11.0.1.pre.615
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/lib/bwapi/client.rb +7 -0
- data/spec/bwapi/client_spec.rb +11 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MWQ5N2E2NmVhYjU2MTY3NzZkYjY2OTMzMzdjN2YyZTZhNzE5YTdmMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YWYwMmRiNjlkZTQyMjM2MWQ3ZDg2ODlkNzY1ZjU2NjhkZDczZmRkMw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YTg1NDA1YzkzNmE5OWQwZjAxZjBiNzdlOWVjZWIwMTQ0NzUzOGU2NzgxYTZh
|
10
|
+
Mzg4MDQyMzhjYzgxMTc1OTg1YzM0OWFiZTJiOTQ5NTlkYTY3NjRmYTVmYjJk
|
11
|
+
NjI4NDE0ZjhjOTVmNzhjNmVkZWY1NjJhMThhMDkxNmQ5NWMwYjQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OGU0YjE2OTUyYTA2Njk3ODk3OWUzODlkN2Y1YmU4MDZiZjM2Y2JiZTg4Zjgw
|
14
|
+
OTNlMWYzZDg2M2RiMDhjNmYyZjhiMWJiMzIwMWJhZDdlODgxMTczN2YwZjIy
|
15
|
+
ZjY3MDMxODM5NWQyY2M5OTJjOWEwZWEyMGViYTdiNTlmNDkwZDU=
|
data/lib/bwapi/client.rb
CHANGED
@@ -96,6 +96,13 @@ module BWAPI
|
|
96
96
|
@client_id == 'brandwatch-api-client' ? true : false
|
97
97
|
end
|
98
98
|
|
99
|
+
# Check if user is a brandwatch-api-superadmin-client type
|
100
|
+
#
|
101
|
+
# @return [Boolean] Application client status
|
102
|
+
def api_super_admin_client?
|
103
|
+
@client_id == 'brandwatch-api-superadmin-client' ? true : false
|
104
|
+
end
|
105
|
+
|
99
106
|
def access_token=(value)
|
100
107
|
reset_connection
|
101
108
|
@access_token = value
|
data/spec/bwapi/client_spec.rb
CHANGED
@@ -64,6 +64,17 @@ describe BWAPI::Client do
|
|
64
64
|
end
|
65
65
|
end
|
66
66
|
|
67
|
+
describe '.api_super_admin_client?' do
|
68
|
+
it 'returns true when client is a brandwatch-api-superadmin-client' do
|
69
|
+
bw = BWAPI::Client.new client_id: 'brandwatch-api-superadmin-client'
|
70
|
+
expect(bw.api_super_admin_client?).to eql(true)
|
71
|
+
end
|
72
|
+
|
73
|
+
it 'returns false when a client is not a brandwatch-api-superadmin-client' do
|
74
|
+
expect(BWAPI::Client.new.api_super_admin_client?).to eql(false)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
67
78
|
describe '.seconds_until_access_token_expires' do
|
68
79
|
it 'should return the number of seconds until the access token expires' do
|
69
80
|
bw = BWAPI::Client.new access_token_expiry: (Time.now + 3600).iso8601
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bwapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 11.0.1.pre.
|
4
|
+
version: 11.0.1.pre.615
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Chrisp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|