bwapi 7.0.3.pre.296 → 7.0.4.pre.311
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/bwapi.gemspec +1 -1
- data/lib/bwapi/connection.rb +0 -1
- data/lib/bwapi/request.rb +12 -7
- data/lib/bwapi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjFlYjA5ZGFjNTQ0ODQ5MWZlM2JhZTExZTBhY2EzMWViMWRmMjdiNA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MjQ0NzA1MDYyNWQyYTJkYWE3OTk2MzhhNzNlMjY4YTE4OTFkNGE0Ng==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NmZhOWI1N2FjZWQxMTIwNmQzZTI1YWRhMGJiY2E4OWU0MmRlZWNkN2FlYjM3
|
10
|
+
MmU4MDQzYjdiYWE5MDg2OTRjZDgyNTFlZmI1MDhlMDAzMWRjNzkyY2M5MmNm
|
11
|
+
MDE5YjgyNDJjOGRmYTRiYmIzMjVmMTkwNWM5NDc4YWM5NzJlOTA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NGI2N2M4ODRjMTUyY2QzYzJjMTU4YzA4ZGI5NTM1MjNjNzEzZGJiYjMwMTRh
|
14
|
+
NTZhMDc4NDAxODcyYWZlYTg4MzNiZDFjZjUxYmJkNjNkMzhmYTEwNWNlYWQz
|
15
|
+
MGFmOWZkYjBjZGZiMTdlMjFmYmU1MjZiMzI2NjI2YjgzM2YzYzE=
|
data/bwapi.gemspec
CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
|
|
6
6
|
s.name = 'bwapi'
|
7
7
|
s.version = BWAPI::VERSION
|
8
8
|
s.version = BWAPI::VERSION + ".pre.#{ENV['TRAVIS_BUILD_NUMBER']}" if ENV['TRAVIS']
|
9
|
-
s.date = '2014-05-
|
9
|
+
s.date = '2014-05-02'
|
10
10
|
s.summary = 'Brandwatch API Wrapper'
|
11
11
|
s.description = 'A Ruby wrapper for the Brandwatch API'
|
12
12
|
s.author = 'Jonathan Chrisp'
|
data/lib/bwapi/connection.rb
CHANGED
data/lib/bwapi/request.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
+
require 'faraday'
|
4
|
+
|
3
5
|
module BWAPI
|
4
6
|
# Request module to handle all requests to API
|
5
7
|
module Request
|
@@ -57,6 +59,9 @@ module BWAPI
|
|
57
59
|
authorization: access_token ? "bearer #{access_token}" : '',
|
58
60
|
user_agent: user_agent
|
59
61
|
},
|
62
|
+
request: {
|
63
|
+
params_encoder: Faraday::FlatParamsEncoder
|
64
|
+
},
|
60
65
|
url: api_endpoint,
|
61
66
|
ssl: { verify: verify_ssl }
|
62
67
|
}
|
@@ -69,19 +74,19 @@ module BWAPI
|
|
69
74
|
# @param opts [Hash] Request parameters
|
70
75
|
# @return [Hashie::Mash] Response
|
71
76
|
def request(method, path, opts = {})
|
72
|
-
response = connection(connection_options).send(method) do |
|
77
|
+
response = connection(connection_options).send(method) do |r|
|
73
78
|
case method
|
74
79
|
when :get
|
75
|
-
|
80
|
+
r.url path, opts
|
76
81
|
when :delete
|
77
|
-
|
82
|
+
r.url path, opts
|
78
83
|
when :patch, :post, :put
|
79
|
-
if opts.key?
|
84
|
+
if opts.is_a?(Hash) && opts.key?(:force_urlencoded)
|
80
85
|
opts.delete(:force_urlencoded)
|
81
|
-
|
86
|
+
r.url path, opts
|
82
87
|
else
|
83
|
-
|
84
|
-
|
88
|
+
r.path = path
|
89
|
+
r.body = opts
|
85
90
|
end
|
86
91
|
end
|
87
92
|
end
|
data/lib/bwapi/version.rb
CHANGED
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: 7.0.
|
4
|
+
version: 7.0.4.pre.311
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Chrisp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|