adapi 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/README.markdown +223 -7
- data/adapi.gemspec +4 -4
- data/lib/adapi.rb +9 -6
- data/lib/adapi/api.rb +3 -10
- data/lib/adapi/campaign_criterion.rb +1 -1
- data/lib/adapi/config.rb +23 -0
- data/lib/adapi/constant_data/province.rb +1128 -0
- data/lib/adapi/location.rb +24 -9
- data/lib/adapi/version.rb +10 -1
- data/lib/httpi_monkeypatch.rb +17 -0
- data/lib/savon_monkeypatch.rb +43 -0
- data/test/factories/ad_group_factory.rb +10 -6
- data/test/factories/ad_text_factory.rb +11 -7
- data/test/factories/campaign_factory.rb +15 -0
- data/test/integration/create_campaign_test.rb +19 -4
- data/test/integration/find_location_test.rb +54 -0
- data/test/unit/ad/ad_text_test.rb +1 -1
- data/test/unit/ad_group_test.rb +1 -1
- data/test/unit/campaign_test.rb +50 -0
- metadata +24 -14
- data/lib/ads_common_monkeypatch.rb +0 -9
- data/lib/httpi_request_monkeypatch.rb +0 -40
@@ -1,9 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
# I can haz hack?! This hotfixes OAuth
|
4
|
-
# FIXME remove when new version of ads-common is released
|
5
|
-
|
6
|
-
# And not only this is monkeypatch, but we're changing constant as well...
|
7
|
-
# Look ma, no warnings!
|
8
|
-
AdsCommon::Auth::OAuthHandler::IGNORED_FIELDS.send('<<', :oauth_token_secret)
|
9
|
-
AdsCommon::Auth::OAuthHandler::IGNORED_FIELDS.send('<<', :oauth_token)
|
@@ -1,40 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
# manually hardcode timeouts for HTTPI to 5 minutes (300 seconds)
|
4
|
-
# HOTFIX there's no way how to do it properly through HTTPI
|
5
|
-
|
6
|
-
module HTTPI
|
7
|
-
class Request
|
8
|
-
def open_timeout
|
9
|
-
300
|
10
|
-
end
|
11
|
-
|
12
|
-
def read_timeout
|
13
|
-
300
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
# disable ssl authentication in curb
|
19
|
-
# HOTFIX for bug in HTTPI
|
20
|
-
|
21
|
-
module HTTPI
|
22
|
-
module Adapter
|
23
|
-
class Curb
|
24
|
-
|
25
|
-
private
|
26
|
-
|
27
|
-
def setup_client(request)
|
28
|
-
basic_setup request
|
29
|
-
setup_http_auth request if request.auth.http?
|
30
|
-
# setup_ssl_auth request.auth.ssl if request.auth.ssl?
|
31
|
-
# setup_ntlm_auth request if request.auth.ntlm?
|
32
|
-
|
33
|
-
# HOTFIX for bug in curb 0.7.16, see issue:
|
34
|
-
# https://github.com/taf2/curb/issues/96
|
35
|
-
client.resolve_mode = :ipv4
|
36
|
-
end
|
37
|
-
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|