google-ads-googleads 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4cf7ec45c64d8e3b15c113cedc904e46d667d301740608146d0985537f6e3e44
4
- data.tar.gz: 0a33073c1cf8401df2388172f6026d4c0cbe3a4f8f8e81b5da710ac57766dc01
3
+ metadata.gz: d909d1d6d9386d5ce00534af05b6ce762f3f981a4242aa501f3a884ed8f82695
4
+ data.tar.gz: 88cef4570b6123d494d04d13ac64c42abc540e87fbf1426186982480c29f8109
5
5
  SHA512:
6
- metadata.gz: 0d36f3d385b11ce0efa43e7c4008af8569f4b3f1133d8c151eb1cf472958c50489c3dbd43c8180935588a21ef47413fea5135785187b84297a3ab27b28f2d012
7
- data.tar.gz: 7c42c6b2bc5edb4f5b795ffe5b5316d0e5a539a6ceaa5dd1a913b5c7f1c54a61c4bc5f0873ea3ac8c215ebe8599699a54df712dd962a94fc3b9c6e50725bc945
6
+ metadata.gz: f13b5d6f77f0bb1a9aa061365e9459507a3990301e7d25b5cce1b3ff945b4335c2bbc1f53465aa821b7281e08bac00f987d61d451d120500baf0cfe8f8f92246
7
+ data.tar.gz: 73d88a624bfdb3ec1dad7772057c8ac9418cea5459e0ed13786f7bee964f3c94823145fe39931f7350e952eb128b2e7a42cfb014bfad66c58f6f3420888e56d6
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ 1.1.1:
2
+ - Add `ExtensionFeedItem` as an operation look up
3
+ - Fixes various broken resource types
4
+
1
5
  1.1.0:
2
6
  - Adding support for Google Ads API v1_1.
3
7
  - Refactored proto and path lookup utils to be accessible before client
data/README.md CHANGED
@@ -49,23 +49,23 @@ See and run the [Authentication example][] to generate your refresh token.
49
49
  Once this is generated, you can provide it to the library in a few different
50
50
  ways.
51
51
 
52
- The simplest is to copy the [adwords_config.rb][] to your home directory and
52
+ The simplest is to copy the [google_ads_config.rb][] to your home directory and
53
53
  simply modify it to include the client ID, client secret, and refresh token.
54
54
  The library will automatically read it from the home directory if instantiated
55
55
  with no arguments:
56
56
 
57
- adwords = Google::Ads::GoogleAds::GoogleAdsClient.new
57
+ client = Google::Ads::GoogleAds::GoogleAdsClient.new
58
58
 
59
59
  Alternatively, if you prefer to keep the file elsewhere, you can instantiate the
60
60
  library by passing the path to where you keep this file:
61
61
 
62
- adwords = Google::Ads::GoogleAds::GoogleAdsClient.new('path/to/file.rb')
62
+ client = Google::Ads::GoogleAds::GoogleAdsClient.new('path/to/file.rb')
63
63
 
64
64
  If you prefer not to store this information in a file at all, and would rather
65
65
  pass the information programmatically at runtime, you can accomplish that this
66
66
  way:
67
67
 
68
- adwords = Google::Ads::GoogleAds::GoogleAdsClient.new do |config|
68
+ client = Google::Ads::GoogleAds::GoogleAdsClient.new do |config|
69
69
  config.client_id = 'INSERT_CLIENT_ID_HERE'
70
70
  config.client_secret = 'INSERT_CLIENT_SECRET_HERE'
71
71
  config.refresh_token = 'INSERT_REFRESH_TOKEN_HERE'
@@ -73,11 +73,11 @@ way:
73
73
  end
74
74
 
75
75
  You can also modify these properties after instantiation by using the
76
- `configure` method on the `AdwordsClient`, using the same structure as above.
76
+ `configure` method on the `GoogleAdsClient`, using the same structure as above.
77
77
 
78
78
  [Authorization guide]: https://developers.google.com/google-ads/api/docs/oauth/overview
79
79
  [Authentication example]: https://github.com/googleads/google-ads-ruby/blob/master/examples/authentication/authenticate_in_standalone_application.rb
80
- [adwords_config.rb]: https://github.com/googleads/google-ads-ruby/blob/master/google_ads_config.rb
80
+ [google_ads_config.rb]: https://github.com/googleads/google-ads-ruby/blob/master/google_ads_config.rb
81
81
 
82
82
  ## Usage
83
83
 
@@ -87,8 +87,8 @@ To include the gem in your code:
87
87
 
88
88
  To fetch a specific service, for example CampaignService:
89
89
 
90
- adwords = Google::Ads::GoogleAds::GoogleAdsClient.new
91
- campaign_service = adwords.service(:Campaign)
90
+ client = Google::Ads::GoogleAds::GoogleAdsClient.new
91
+ campaign_service = client.service(:Campaign)
92
92
 
93
93
  See the provided [examples][] for more detailed demonstrations of how to use the
94
94
  library.
@@ -116,3 +116,4 @@ Author:
116
116
  Maintainer:
117
117
 
118
118
  - Michael Cloonan
119
+ - Sam Phippen
data/Rakefile CHANGED
@@ -5,3 +5,36 @@ require 'rake/testtask'
5
5
  Rake::TestTask.new do |t|
6
6
  t.test_files = FileList['test/**/test_*.rb']
7
7
  end
8
+
9
+ def apply_patches
10
+ clean = system(<<~EOD)
11
+ bash -c 'if [ -z "$(git status --porcelain)" ]; then exit 0; else exit 1; fi'
12
+ EOD
13
+
14
+ raise "Working directory is not clean" unless clean
15
+
16
+ patches = Dir["patches/*.patch"]
17
+ patches.each do |patch|
18
+ puts "PATCH #{patch}"
19
+ res = system("git apply #{patch}")
20
+ if res
21
+ `git add -u`
22
+ `git commit -m 'Applying #{patch} for v#{Google::Ads::GoogleAds::CLIENT_LIB_VERSION} release'`
23
+ else
24
+ puts "FAIL #{patch}: may not be a big deal because already applied or no longer needed"
25
+ end
26
+ end
27
+ end
28
+
29
+ task :validate_protos do
30
+ res = system("./scripts/validate_protos.rb")
31
+ if !res
32
+ raise "Couldn't load all protos"
33
+ end
34
+ end
35
+
36
+ task :apply_patches do |t|
37
+ apply_patches
38
+ end
39
+
40
+ task :build => [:apply_patches, :validate_protos]
@@ -44,7 +44,7 @@ module Google
44
44
  @logger.debug(build_request_message(metadata, request))
45
45
  @logger.debug(build_success_response_message(response))
46
46
  if response.respond_to?(:partial_failure_error) && response.partial_failure_error
47
- @logger.warn(build_partial_failure_message(response))
47
+ @logger.debug(build_partial_failure_message(response))
48
48
  end
49
49
  response
50
50
  rescue Exception
@@ -678,6 +678,7 @@ module Google
678
678
  Customer: ['customer_service_pb', 'CustomerOperation'],
679
679
  ConversionAction: ['conversion_action_service_pb', 'ConversionActionOperation'],
680
680
  DismissRecommendation: ['recommendation_service_pb', 'DismissRecommendationRequest::DismissRecommendationOperation'],
681
+ ExtensionFeedItem: ['extension_feed_item_service_pb', 'ExtensionFeedItemOperation'],
681
682
  ExtensionFeedItemOperation: ['extension_feed_item_service_pb', 'ExtensionFeedItemOperation'],
682
683
  FeedItem: ['feed_item_service_pb', 'FeedItemOperation'],
683
684
  FeedItemTarget: ['feed_item_target_service_pb', 'FeedItemTargetOperation'],
@@ -17,6 +17,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
17
17
  end
18
18
  end
19
19
 
20
- module Google::Ads::GoogleAds::V1::Services
20
+ module Google::Ads::GoogleAds::V1::Resources
21
21
  DetailPlacementView = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.DetailPlacementView").msgclass
22
22
  end
@@ -16,6 +16,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
16
16
  end
17
17
  end
18
18
 
19
- module Google::Ads::GoogleAds::V1::Services
19
+ module Google::Ads::GoogleAds::V1::Resources
20
20
  GroupPlacementView = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.GroupPlacementView").msgclass
21
21
  end
@@ -20,6 +20,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
20
20
  end
21
21
  end
22
22
 
23
- module Google::Ads::GoogleAds::V1::Enums
23
+ module Google::Ads::GoogleAds::V1::Resources
24
24
  ProductBiddingCategoryConstant = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.ProductBiddingCategoryConstant").msgclass
25
25
  end
@@ -19,7 +19,7 @@
19
19
  module Google
20
20
  module Ads
21
21
  module GoogleAds
22
- CLIENT_LIB_VERSION = '1.1.0'.freeze
22
+ CLIENT_LIB_VERSION = '1.1.1'.freeze
23
23
  end
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-ads-googleads
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-28 00:00:00.000000000 Z
11
+ date: 2019-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-gax