bwapi 9.0.0.pre.379 → 9.0.0.pre.385
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/bwapi.gemspec +2 -1
- data/lib/bwapi/client/oauth.rb +4 -4
- data/lib/bwapi/connection.rb +5 -6
- data/lib/bwapi/response/error.rb +2 -0
- data/lib/bwapi/response/logger.rb +2 -0
- data/lib/bwapi/response/performance.rb +2 -0
- metadata +26 -6
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTU0NTM5NzlkOWNmZWM1NGQ1ZTMyNjRjZjczOTI0NWFhMTI4NGIzZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NWI0NDUyMjRmMjQ0YWEyZjc5YzYyM2M2N2QwNTA1MWEyMDMxN2QwZg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NjFiODYzOTJiODNmYjVjMWQ0ZDQ1NGZkYTZlZGQ2ZmMxODlkNWFiYThkMGFh
|
10
|
+
Y2QwOTlmY2VlN2U3NmIxOWMyMTFkYmMyNGYxMzRjNjE2NjZlNTNjNGZiNWQ4
|
11
|
+
YWQ0Mzg5ZTgyMDgzZjQzYmZmZTBkN2U5YTgyNWI3OGEzNTA2NjY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NTRjYTg2YzA5YzI2NTMyMGU3NGY2OTE0NjJhOGQzYjcwOTlmYzExZTA5Mzlk
|
14
|
+
NWFjMWM2ZWEwZTdhZWFhYTZmMTBlMDYxMDc5Njk0NzVhYTIzOWIxMWNlMDIw
|
15
|
+
MGVkZGNiYjRkNGMyNDVhMzFkMDE0MjNlOGI2MjliZmU0YTI3NTM=
|
data/bwapi.gemspec
CHANGED
@@ -19,7 +19,8 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.add_runtime_dependency 'allotment', '~> 1.1.0', '>= 1.1.0'
|
20
20
|
s.add_runtime_dependency 'faraday', '~> 0.9.0', '>= 0.9.0'
|
21
21
|
s.add_runtime_dependency 'faraday_middleware', '~> 0.9.1', '>= 0.9.1'
|
22
|
-
s.add_runtime_dependency '
|
22
|
+
s.add_runtime_dependency 'faraday_middleware-parse_oj', '~> 0.3.0', '>= 0.3.0'
|
23
|
+
s.add_runtime_dependency 'oj', '~> 2.10.0', '>= 2.10.0'
|
23
24
|
|
24
25
|
s.files = `git ls-files`.split("\n")
|
25
26
|
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
data/lib/bwapi/client/oauth.rb
CHANGED
@@ -60,10 +60,10 @@ module BWAPI
|
|
60
60
|
#
|
61
61
|
# @param opts [Hash] options hash of parameters
|
62
62
|
def oauth_request(opts = {})
|
63
|
-
|
64
|
-
self.access_token =
|
65
|
-
self.refresh_token =
|
66
|
-
|
63
|
+
response = post('oauth/token', opts)
|
64
|
+
self.access_token = response['access_token']
|
65
|
+
self.refresh_token = response['refresh_token'] if application_client?
|
66
|
+
response
|
67
67
|
end
|
68
68
|
end
|
69
69
|
end
|
data/lib/bwapi/connection.rb
CHANGED
@@ -2,6 +2,7 @@ require 'bwapi/response/error'
|
|
2
2
|
require 'bwapi/response/logger'
|
3
3
|
require 'bwapi/response/performance'
|
4
4
|
require 'faraday_middleware'
|
5
|
+
require 'faraday_middleware/parse_oj'
|
5
6
|
|
6
7
|
module BWAPI
|
7
8
|
# Connection module
|
@@ -31,14 +32,12 @@ module BWAPI
|
|
31
32
|
RACK_BUILDER_CLASS.new do |builder|
|
32
33
|
builder.request :json
|
33
34
|
|
34
|
-
builder.
|
35
|
-
builder.
|
36
|
-
builder.
|
35
|
+
builder.response :performance, self if debug
|
36
|
+
builder.response :error
|
37
|
+
builder.response :logger, self if debug
|
37
38
|
|
38
|
-
builder.response :
|
39
|
+
builder.response :oj
|
39
40
|
builder.response :follow_redirects
|
40
|
-
builder.response :json, content_type: /\bjson$/
|
41
|
-
|
42
41
|
builder.adapter Faraday.default_adapter
|
43
42
|
end
|
44
43
|
end
|
data/lib/bwapi/response/error.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bwapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.0.0.pre.
|
4
|
+
version: 9.0.0.pre.385
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Chrisp
|
@@ -111,25 +111,45 @@ dependencies:
|
|
111
111
|
- !ruby/object:Gem::Version
|
112
112
|
version: 0.9.1
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
|
-
name:
|
114
|
+
name: faraday_middleware-parse_oj
|
115
115
|
requirement: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
117
|
- - ~>
|
118
118
|
- !ruby/object:Gem::Version
|
119
|
-
version: 3.
|
119
|
+
version: 0.3.0
|
120
120
|
- - ! '>='
|
121
121
|
- !ruby/object:Gem::Version
|
122
|
-
version: 3.
|
122
|
+
version: 0.3.0
|
123
123
|
type: :runtime
|
124
124
|
prerelease: false
|
125
125
|
version_requirements: !ruby/object:Gem::Requirement
|
126
126
|
requirements:
|
127
127
|
- - ~>
|
128
128
|
- !ruby/object:Gem::Version
|
129
|
-
version: 3.
|
129
|
+
version: 0.3.0
|
130
130
|
- - ! '>='
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version: 3.
|
132
|
+
version: 0.3.0
|
133
|
+
- !ruby/object:Gem::Dependency
|
134
|
+
name: oj
|
135
|
+
requirement: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - ~>
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: 2.10.0
|
140
|
+
- - ! '>='
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: 2.10.0
|
143
|
+
type: :runtime
|
144
|
+
prerelease: false
|
145
|
+
version_requirements: !ruby/object:Gem::Requirement
|
146
|
+
requirements:
|
147
|
+
- - ~>
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: 2.10.0
|
150
|
+
- - ! '>='
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 2.10.0
|
133
153
|
description: A Ruby wrapper for the Brandwatch API
|
134
154
|
email: jonathan@brandwatch.com
|
135
155
|
executables:
|