google-api-client 0.9.4 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/README.md +34 -0
  4. data/api_names.yaml +3 -0
  5. data/api_names_out.yaml +1058 -20
  6. data/bin/generate-api +1 -1
  7. data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
  8. data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +203 -6
  9. data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +78 -0
  10. data/generated/google/apis/adexchangebuyer_v1_4/service.rb +36 -0
  11. data/generated/google/apis/admin_directory_v1.rb +1 -1
  12. data/generated/google/apis/adsense_v1_4.rb +1 -1
  13. data/generated/google/apis/adsensehost_v4_1.rb +1 -1
  14. data/generated/google/apis/androidenterprise_v1.rb +2 -3
  15. data/generated/google/apis/androidenterprise_v1/classes.rb +11 -4
  16. data/generated/google/apis/androidenterprise_v1/representations.rb +1 -0
  17. data/generated/google/apis/androidenterprise_v1/service.rb +5 -6
  18. data/generated/google/apis/androidpublisher_v2.rb +1 -1
  19. data/generated/google/apis/androidpublisher_v2/classes.rb +47 -0
  20. data/generated/google/apis/androidpublisher_v2/representations.rb +6 -0
  21. data/generated/google/apis/appengine_v1beta5.rb +2 -3
  22. data/generated/google/apis/appengine_v1beta5/classes.rb +143 -8
  23. data/generated/google/apis/appengine_v1beta5/representations.rb +42 -0
  24. data/generated/google/apis/appengine_v1beta5/service.rb +48 -6
  25. data/generated/google/apis/appstate_v1.rb +1 -1
  26. data/generated/google/apis/bigquery_v2.rb +1 -1
  27. data/generated/google/apis/bigquery_v2/classes.rb +68 -14
  28. data/generated/google/apis/bigquery_v2/representations.rb +30 -0
  29. data/generated/google/apis/books_v1.rb +1 -1
  30. data/generated/google/apis/books_v1/classes.rb +68 -3
  31. data/generated/google/apis/books_v1/representations.rb +21 -0
  32. data/generated/google/apis/calendar_v3.rb +2 -2
  33. data/generated/google/apis/calendar_v3/service.rb +1 -1
  34. data/generated/google/apis/cloudbuild_v1.rb +1 -1
  35. data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
  36. data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
  37. data/generated/google/apis/cloudresourcemanager_v1/service.rb +2 -2
  38. data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
  39. data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +2 -2
  40. data/generated/google/apis/clouduseraccounts_beta.rb +1 -1
  41. data/generated/google/apis/clouduseraccounts_beta/classes.rb +1 -1
  42. data/generated/google/apis/compute_beta.rb +1 -1
  43. data/generated/google/apis/compute_beta/classes.rb +138 -108
  44. data/generated/google/apis/compute_beta/representations.rb +16 -18
  45. data/generated/google/apis/compute_beta/service.rb +52 -2
  46. data/generated/google/apis/compute_v1.rb +1 -1
  47. data/generated/google/apis/compute_v1/classes.rb +55 -74
  48. data/generated/google/apis/compute_v1/representations.rb +14 -18
  49. data/generated/google/apis/compute_v1/service.rb +45 -1
  50. data/generated/google/apis/container_v1.rb +3 -3
  51. data/generated/google/apis/container_v1/classes.rb +200 -42
  52. data/generated/google/apis/container_v1/representations.rb +54 -0
  53. data/generated/google/apis/container_v1/service.rb +31 -30
  54. data/generated/google/apis/content_v2.rb +1 -1
  55. data/generated/google/apis/datastore_v1beta2.rb +2 -2
  56. data/generated/google/apis/datastore_v1beta2/service.rb +1 -1
  57. data/generated/google/apis/deploymentmanager_v2.rb +2 -3
  58. data/generated/google/apis/deploymentmanager_v2/classes.rb +7 -1
  59. data/generated/google/apis/deploymentmanager_v2/representations.rb +1 -0
  60. data/generated/google/apis/deploymentmanager_v2/service.rb +26 -27
  61. data/generated/google/apis/dfareporting_v2_3.rb +2 -2
  62. data/generated/google/apis/dfareporting_v2_3/classes.rb +1 -1
  63. data/generated/google/apis/dfareporting_v2_3/service.rb +2 -2
  64. data/generated/google/apis/dns_v1.rb +1 -1
  65. data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
  66. data/generated/google/apis/doubleclicksearch_v2/classes.rb +6 -4
  67. data/generated/google/apis/drive_v2.rb +1 -1
  68. data/generated/google/apis/drive_v2/classes.rb +10 -4
  69. data/generated/google/apis/drive_v2/representations.rb +1 -0
  70. data/generated/google/apis/drive_v3.rb +1 -1
  71. data/generated/google/apis/drive_v3/classes.rb +7 -0
  72. data/generated/google/apis/drive_v3/representations.rb +1 -0
  73. data/generated/google/apis/fusiontables_v2.rb +1 -1
  74. data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
  75. data/generated/google/apis/games_management_v1management.rb +1 -1
  76. data/generated/google/apis/games_v1.rb +1 -1
  77. data/generated/google/apis/genomics_v1.rb +2 -2
  78. data/generated/google/apis/genomics_v1/classes.rb +770 -82
  79. data/generated/google/apis/genomics_v1/representations.rb +287 -24
  80. data/generated/google/apis/genomics_v1/service.rb +412 -13
  81. data/generated/google/apis/gmail_v1.rb +1 -1
  82. data/generated/google/apis/groupssettings_v1.rb +1 -1
  83. data/generated/google/apis/groupssettings_v1/classes.rb +13 -6
  84. data/generated/google/apis/groupssettings_v1/representations.rb +1 -0
  85. data/generated/google/apis/identitytoolkit_v3.rb +1 -1
  86. data/generated/google/apis/identitytoolkit_v3/classes.rb +50 -0
  87. data/generated/google/apis/identitytoolkit_v3/representations.rb +10 -0
  88. data/generated/google/apis/logging_v2beta1.rb +2 -3
  89. data/generated/google/apis/logging_v2beta1/classes.rb +219 -63
  90. data/generated/google/apis/logging_v2beta1/representations.rb +24 -1
  91. data/generated/google/apis/logging_v2beta1/service.rb +25 -32
  92. data/generated/google/apis/oauth2_v2.rb +2 -2
  93. data/generated/google/apis/oauth2_v2/service.rb +1 -1
  94. data/generated/google/apis/plus_domains_v1.rb +1 -1
  95. data/generated/google/apis/plus_v1.rb +1 -1
  96. data/generated/google/apis/pubsub_v1.rb +1 -1
  97. data/generated/google/apis/pubsub_v1/classes.rb +20 -12
  98. data/generated/google/apis/pubsub_v1/service.rb +32 -35
  99. data/generated/google/apis/reseller_v1.rb +1 -1
  100. data/generated/google/apis/reseller_v1/classes.rb +23 -9
  101. data/generated/google/apis/reseller_v1/representations.rb +2 -0
  102. data/generated/google/apis/sheets_v1.rb +43 -0
  103. data/generated/google/apis/sheets_v1/classes.rb +4542 -0
  104. data/generated/google/apis/sheets_v1/representations.rb +1703 -0
  105. data/generated/google/apis/sheets_v1/service.rb +363 -0
  106. data/generated/google/apis/sqladmin_v1beta4.rb +3 -2
  107. data/generated/google/apis/sqladmin_v1beta4/classes.rb +4 -3
  108. data/generated/google/apis/sqladmin_v1beta4/service.rb +2 -1
  109. data/generated/google/apis/storage_v1.rb +1 -1
  110. data/generated/google/apis/vision_v1.rb +2 -2
  111. data/generated/google/apis/vision_v1/classes.rb +11 -11
  112. data/generated/google/apis/vision_v1/service.rb +1 -1
  113. data/generated/google/apis/webmasters_v3.rb +2 -2
  114. data/generated/google/apis/webmasters_v3/classes.rb +7 -0
  115. data/generated/google/apis/webmasters_v3/representations.rb +1 -0
  116. data/generated/google/apis/webmasters_v3/service.rb +1 -1
  117. data/generated/google/apis/youtube_partner_v1.rb +37 -0
  118. data/generated/google/apis/youtube_partner_v1/classes.rb +3656 -0
  119. data/generated/google/apis/youtube_partner_v1/representations.rb +1452 -0
  120. data/generated/google/apis/youtube_partner_v1/service.rb +3165 -0
  121. data/generated/google/apis/youtube_v3.rb +3 -2
  122. data/generated/google/apis/youtube_v3/classes.rb +100 -3
  123. data/generated/google/apis/youtube_v3/representations.rb +50 -0
  124. data/generated/google/apis/youtube_v3/service.rb +2 -1
  125. data/generated/google/apis/youtubereporting_v1.rb +1 -1
  126. data/generated/google/apis/youtubereporting_v1/classes.rb +17 -0
  127. data/generated/google/apis/youtubereporting_v1/representations.rb +2 -0
  128. data/generated/google/apis/youtubereporting_v1/service.rb +21 -3
  129. data/google-api-client.gemspec +2 -0
  130. data/lib/google/apis.rb +12 -2
  131. data/lib/google/apis/version.rb +1 -1
  132. data/script/generate +5 -2
  133. data/spec/google/apis/logging_spec.rb +55 -0
  134. metadata +12 -4
@@ -17,6 +17,8 @@ Gem::Specification.new do |spec|
17
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
18
  spec.require_paths = ['lib', 'generated', 'third_party']
19
19
 
20
+ spec.required_ruby_version = '~> 2.0'
21
+
20
22
  spec.add_runtime_dependency 'representable', '~> 2.3.0'
21
23
  spec.add_runtime_dependency 'retriable', '~> 2.0'
22
24
  spec.add_runtime_dependency 'addressable', '~> 2.3'
@@ -39,10 +39,20 @@ module Google
39
39
  logger
40
40
  end
41
41
 
42
- # Check to see if client is being used in a Rails environment and ge the logger if present
42
+ # Check to see if client is being used in a Rails environment and get the logger if present.
43
+ # Setting the ENV variable 'GOOGLE_API_USE_RAILS_LOGGER' to false will force the client
44
+ # to use its own logger.
45
+ #
43
46
  # @return [Logger]
44
47
  def self.rails_logger
45
- ::Rails.logger if defined?(::Rails) && ::Rails.respond_to?(:logger) && ::Rails.logger
48
+ if 'true' == ENV.fetch('GOOGLE_API_USE_RAILS_LOGGER', 'true') &&
49
+ defined?(::Rails) &&
50
+ ::Rails.respond_to?(:logger) &&
51
+ !::Rails.logger.nil?
52
+ ::Rails.logger
53
+ else
54
+ nil
55
+ end
46
56
  end
47
57
  end
48
58
  end
@@ -15,7 +15,7 @@
15
15
  module Google
16
16
  module Apis
17
17
  # Client library version
18
- VERSION = '0.9.4'
18
+ VERSION = '0.9.5'
19
19
 
20
20
  # Current operating system
21
21
  # @private
@@ -4,7 +4,7 @@
4
4
 
5
5
  DIR=$(dirname $( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ))
6
6
 
7
- APIS=(adexchangebuyer:v1.4 \
7
+ API_IDS=(adexchangebuyer:v1.4 \
8
8
  adexchangeseller:v2.0 \
9
9
  admin:directory_v1 \
10
10
  admin:datatransfer_v1 \
@@ -98,5 +98,8 @@ APIS=(adexchangebuyer:v1.4 \
98
98
  youtubereporting:v1 \
99
99
  )
100
100
 
101
+ URLS=(https://content.googleapis.com/discovery/v1/apis/youtubePartner/v1/rest \
102
+ https://content.googleapis.com/discovery/v1/apis/compute/beta/rest \
103
+ )
101
104
 
102
- echo 'a' | bundle exec bin/generate-api gen generated --from-discovery=true --names_out=$DIR/api_names_out.yaml --url='https://content.googleapis.com/discovery/v1/apis/compute/beta/rest' --id=${APIS[*]}
105
+ echo 'a' | bundle exec bin/generate-api gen generated --from-discovery=true --names_out=$DIR/api_names_out.yaml --url=${URLS[*]} --id=${API_IDS[*]}
@@ -16,6 +16,7 @@ require 'spec_helper'
16
16
  require 'google/apis'
17
17
  require 'google/apis/core/logging'
18
18
 
19
+
19
20
  RSpec.describe Google::Apis do
20
21
  it 'should have a default logger' do
21
22
  expect(Google::Apis.logger).to be_an_instance_of(Logger)
@@ -40,6 +41,60 @@ RSpec.describe Google::Apis do
40
41
  Google::Apis.logger = Logger.new(STDERR)
41
42
  expect(service.logger).to be Google::Apis.logger
42
43
  end
44
+ end
45
+
46
+ context 'with Rails' do
47
+
48
+ before(:example) do
49
+ Google::Apis.logger = nil
50
+ Kernel.const_set('Rails', Module.new) unless defined?(::Rails)
51
+ end
52
+
53
+ let(:logger) { Logger.new(STDERR) }
54
+
55
+ let(:service) do
56
+ Class.new do
57
+ include Google::Apis::Core::Logging
58
+ end.new
59
+ end
60
+
61
+ context 'with logger present' do
62
+ before(:example) do
63
+ allow(::Rails).to receive(:logger).and_return(logger)
64
+ end
65
+
66
+ it 'should use the Rails logger' do
67
+ expect(service.logger).to be Rails.logger
68
+ end
69
+ end
70
+
71
+ context 'with ENV bypass' do
72
+ before(:example) do
73
+ allow(::Rails).to receive(:logger).and_return(logger)
74
+ allow(::ENV).to receive(:fetch).and_return('false')
75
+ end
76
+
77
+ it 'should use own logger' do
78
+ expect(service.logger).not_to be Rails.logger
79
+ end
43
80
 
81
+ it 'should have a logger' do
82
+ expect(service.logger).to be_an_instance_of(Logger)
83
+ end
84
+ end
85
+
86
+ context 'with logger not present' do
87
+ before(:example) do
88
+ allow(::Rails).to receive(:logger).and_return(nil)
89
+ end
90
+
91
+ it 'should use own logger' do
92
+ expect(service.logger).not_to be Rails.logger
93
+ end
94
+
95
+ it 'should have a logger' do
96
+ expect(service.logger).to be_an_instance_of(Logger)
97
+ end
98
+ end
44
99
  end
45
100
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Bazyl
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2016-03-11 00:00:00.000000000 Z
14
+ date: 2016-04-14 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: representable
@@ -507,6 +507,10 @@ files:
507
507
  - generated/google/apis/script_v1/classes.rb
508
508
  - generated/google/apis/script_v1/representations.rb
509
509
  - generated/google/apis/script_v1/service.rb
510
+ - generated/google/apis/sheets_v1.rb
511
+ - generated/google/apis/sheets_v1/classes.rb
512
+ - generated/google/apis/sheets_v1/representations.rb
513
+ - generated/google/apis/sheets_v1/service.rb
510
514
  - generated/google/apis/site_verification_v1.rb
511
515
  - generated/google/apis/site_verification_v1/classes.rb
512
516
  - generated/google/apis/site_verification_v1/representations.rb
@@ -555,6 +559,10 @@ files:
555
559
  - generated/google/apis/youtube_analytics_v1/classes.rb
556
560
  - generated/google/apis/youtube_analytics_v1/representations.rb
557
561
  - generated/google/apis/youtube_analytics_v1/service.rb
562
+ - generated/google/apis/youtube_partner_v1.rb
563
+ - generated/google/apis/youtube_partner_v1/classes.rb
564
+ - generated/google/apis/youtube_partner_v1/representations.rb
565
+ - generated/google/apis/youtube_partner_v1/service.rb
558
566
  - generated/google/apis/youtube_v3.rb
559
567
  - generated/google/apis/youtube_v3/classes.rb
560
568
  - generated/google/apis/youtube_v3/representations.rb
@@ -669,9 +677,9 @@ require_paths:
669
677
  - third_party
670
678
  required_ruby_version: !ruby/object:Gem::Requirement
671
679
  requirements:
672
- - - ">="
680
+ - - "~>"
673
681
  - !ruby/object:Gem::Version
674
- version: '0'
682
+ version: '2.0'
675
683
  required_rubygems_version: !ruby/object:Gem::Requirement
676
684
  requirements:
677
685
  - - ">="