diff --git a/dfp_api/ChangeLog b/dfp_api/ChangeLog index e022f3d50..130fce085 100755 --- a/dfp_api/ChangeLog +++ b/dfp_api/ChangeLog @@ -1,3 +1,10 @@ +1.0.0: + - Major version bump. The library has been stable and feature complete for + some time, and this is more accurately reflected by this version number. + - No longer include test files in the built gem. + - Removing support for multiple environments. + - Require google-ads-common 1.0.0 or later from now on. + 0.22.0: - Added support for v201708. - Removed support for v201608. diff --git a/dfp_api/dfp_api.yml b/dfp_api/dfp_api.yml index 39f295ce5..9260606cb 100755 --- a/dfp_api/dfp_api.yml +++ b/dfp_api/dfp_api.yml @@ -39,9 +39,6 @@ # Required for all calls other than GetAllNetworks and MakeTestNetwork. :network_code: INSERT_NETWORK_CODE_HERE -:service: - # Only production environment is now available. - :environment: PRODUCTION :connection: # Enable to request all responses to be compressed. :enable_gzip: false diff --git a/dfp_api/google-dfp-api.gemspec b/dfp_api/google-dfp-api.gemspec index c8166ed74..c74ce7055 100755 --- a/dfp_api/google-dfp-api.gemspec +++ b/dfp_api/google-dfp-api.gemspec @@ -36,6 +36,5 @@ Gem::Specification.new do |s| s.require_path = 'lib' s.files = Dir.glob('lib/**/*') + %w(COPYING README.md ChangeLog dfp_api.yml) - s.test_files = Dir.glob('test/**/test_*.rb') - s.add_dependency('google-ads-common', '~> 0.14.0') + s.add_dependency('google-ads-common', '~> 1.0.0') end diff --git a/dfp_api/lib/dfp_api/api_config.rb b/dfp_api/lib/dfp_api/api_config.rb index d9b1d34b9..bbe46d392 100755 --- a/dfp_api/lib/dfp_api/api_config.rb +++ b/dfp_api/lib/dfp_api/api_config.rb @@ -32,7 +32,6 @@ class << ApiConfig # Set defaults DEFAULT_VERSION = :v201708 - DEFAULT_ENVIRONMENT = :PRODUCTION LATEST_VERSION = :v201708 # Set other constants @@ -139,16 +138,14 @@ class << ApiConfig :UserTeamAssociationService, :WorkflowRequestService], } - # Configure the different environments, with the base URL for each one - @@environment_config = { - :PRODUCTION => { - :oauth_scope => 'https://www.googleapis.com/auth/dfp', - :header_ns => 'https://www.google.com/apis/ads/publisher/', - :v201611 => 'https://ads.google.com/apis/ads/publisher/', - :v201702 => 'https://ads.google.com/apis/ads/publisher/', - :v201705 => 'https://ads.google.com/apis/ads/publisher/', - :v201708 => 'https://ads.google.com/apis/ads/publisher/', - } + # Configure the base URL for each version and scope. + @@config = { + :oauth_scope => 'https://www.googleapis.com/auth/dfp', + :header_ns => 'https://www.google.com/apis/ads/publisher/', + :v201611 => 'https://ads.google.com/apis/ads/publisher/', + :v201702 => 'https://ads.google.com/apis/ads/publisher/', + :v201705 => 'https://ads.google.com/apis/ads/publisher/', + :v201708 => 'https://ads.google.com/apis/ads/publisher/' } public @@ -158,10 +155,6 @@ def self.default_version DEFAULT_VERSION end - def self.default_environment - DEFAULT_ENVIRONMENT - end - def self.latest_version LATEST_VERSION end @@ -174,9 +167,8 @@ def self.service_config @@service_config end - def self.environment_config(environment, key) - return @@environment_config.include?(environment) ? - @@environment_config[environment][key] : nil + def self.config(key) + @@config[key] end def self.subdir_config diff --git a/dfp_api/lib/dfp_api/version.rb b/dfp_api/lib/dfp_api/version.rb index 7f3cadbf1..f74a59684 100755 --- a/dfp_api/lib/dfp_api/version.rb +++ b/dfp_api/lib/dfp_api/version.rb @@ -19,6 +19,6 @@ module DfpApi module ApiConfig - CLIENT_LIB_VERSION = '0.22.0' + CLIENT_LIB_VERSION = '1.0.0' end end diff --git a/dfp_api/test/bugs/test_issue_00000007.rb b/dfp_api/test/bugs/test_issue_00000007.rb index 633775a4a..71c024273 100755 --- a/dfp_api/test/bugs/test_issue_00000007.rb +++ b/dfp_api/test/bugs/test_issue_00000007.rb @@ -25,7 +25,7 @@ require 'ads_common/config' require 'ads_common/savon_service' require 'ads_savon/soap/response' -require 'dfp_api/v201608/line_item_service' +require 'dfp_api/v201708/line_item_service' class HeaderHandler def prepare_request(http, soap) @@ -45,11 +45,11 @@ def initialize(namespace, endpoint, version) end def get_module() - return DfpApi::V201608::LineItemService + return DfpApi::V201708::LineItemService end def get_service_registry() - return DfpApi::V201608::LineItemService::LineItemServiceRegistry + return DfpApi::V201708::LineItemService::LineItemServiceRegistry end end @@ -61,8 +61,8 @@ class TestDfpIssue7 < Test::Unit::TestCase TEST_NAMESPACE = 'https://ads.google.com/apis/ads/publisher/' TEST_ENDPOINT = - 'https://ads.google.com/apis/ads/publisher/v201608/LineItemService?wsdl' - TEST_VERSION = :v201608 + 'https://ads.google.com/apis/ads/publisher/v201708/LineItemService?wsdl' + TEST_VERSION = :v201708 def test_issue_7_request() args = {:line_items => [ @@ -95,7 +95,7 @@ def test_issue_7_response() def get_xml_response_text() return < - + 1 0