appnexusapi 0.1.0 → 0.1.1
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 +4 -4
- data/lib/appnexusapi/connection.rb +2 -1
- data/lib/appnexusapi/version.rb +1 -1
- data/spec/connection_spec.rb +11 -0
- data/spec/spec_helper.rb +9 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b63b8d101eca2cb66dc080d7c5ef7b3f9e1e9d4
|
4
|
+
data.tar.gz: 7ff8db291e71dc36607b0a44b69b9ab3feb90703
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d86ce4b73c88990700087390f737fc5e76c8112127221dd0fd904743ad6692c822ff343fb973267c165dbd2d35db1e79219fc79f4ca29284d39a52f443c5bfa2
|
7
|
+
data.tar.gz: 5889df3927d2e16cc88c1a21b023c59f11e63da0f19131cde60dc47c451f0c5f6c149c82eef13f2f6c5d416219ab3dc8a7082d5a15e2f283c88264a8130b1319
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'faraday_middleware'
|
2
2
|
require 'appnexusapi/faraday/raise_http_error'
|
3
|
+
require 'null_logger'
|
3
4
|
|
4
5
|
class AppnexusApi::Connection
|
5
6
|
RATE_EXCEEDED_DEFAULT_TIMEOUT = 15
|
@@ -8,7 +9,7 @@ class AppnexusApi::Connection
|
|
8
9
|
def initialize(config)
|
9
10
|
@config = config
|
10
11
|
@config['uri'] ||= 'https://api.appnexus.com/'
|
11
|
-
@logger = @config['logger'] || NullLogger.
|
12
|
+
@logger = @config['logger'] || NullLogger.instance
|
12
13
|
@connection = Faraday.new(@config['uri']) do |conn|
|
13
14
|
conn.response :logger, @logger, bodies: true
|
14
15
|
conn.request :json
|
data/lib/appnexusapi/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
require 'dotenv'
|
2
2
|
Dotenv.load
|
3
3
|
|
4
|
-
Bundler.require
|
5
4
|
require 'pry'
|
6
5
|
require 'logger'
|
7
6
|
require_relative '../lib/appnexusapi'
|
@@ -26,3 +25,12 @@ def connection
|
|
26
25
|
'logger' => test_logger
|
27
26
|
)
|
28
27
|
end
|
28
|
+
|
29
|
+
def connection_with_null_logger
|
30
|
+
AppnexusApi::Connection.new(
|
31
|
+
'username' => ENV['APPNEXUS_USERNAME'],
|
32
|
+
'password' => ENV['APPNEXUS_PASSWORD'],
|
33
|
+
'uri' => ENV['APPNEXUS_URI']
|
34
|
+
)
|
35
|
+
end
|
36
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appnexusapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Aaron
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -210,6 +210,7 @@ files:
|
|
210
210
|
- lib/appnexusapi/user_resource.rb
|
211
211
|
- lib/appnexusapi/user_service.rb
|
212
212
|
- lib/appnexusapi/version.rb
|
213
|
+
- spec/connection_spec.rb
|
213
214
|
- spec/creative_service_spec.rb
|
214
215
|
- spec/spec_helper.rb
|
215
216
|
homepage: http://simpli.fi
|
@@ -231,10 +232,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
231
232
|
version: '0'
|
232
233
|
requirements: []
|
233
234
|
rubyforge_project:
|
234
|
-
rubygems_version: 2.
|
235
|
+
rubygems_version: 2.4.5
|
235
236
|
signing_key:
|
236
237
|
specification_version: 4
|
237
238
|
summary: Unofficial Ruby API Wrapper for Appnexus
|
238
239
|
test_files:
|
240
|
+
- spec/connection_spec.rb
|
239
241
|
- spec/creative_service_spec.rb
|
240
242
|
- spec/spec_helper.rb
|