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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +34 -0
- data/api_names.yaml +3 -0
- data/api_names_out.yaml +1058 -20
- data/bin/generate-api +1 -1
- data/generated/google/apis/adexchangebuyer_v1_4.rb +1 -1
- data/generated/google/apis/adexchangebuyer_v1_4/classes.rb +203 -6
- data/generated/google/apis/adexchangebuyer_v1_4/representations.rb +78 -0
- data/generated/google/apis/adexchangebuyer_v1_4/service.rb +36 -0
- data/generated/google/apis/admin_directory_v1.rb +1 -1
- data/generated/google/apis/adsense_v1_4.rb +1 -1
- data/generated/google/apis/adsensehost_v4_1.rb +1 -1
- data/generated/google/apis/androidenterprise_v1.rb +2 -3
- data/generated/google/apis/androidenterprise_v1/classes.rb +11 -4
- data/generated/google/apis/androidenterprise_v1/representations.rb +1 -0
- data/generated/google/apis/androidenterprise_v1/service.rb +5 -6
- data/generated/google/apis/androidpublisher_v2.rb +1 -1
- data/generated/google/apis/androidpublisher_v2/classes.rb +47 -0
- data/generated/google/apis/androidpublisher_v2/representations.rb +6 -0
- data/generated/google/apis/appengine_v1beta5.rb +2 -3
- data/generated/google/apis/appengine_v1beta5/classes.rb +143 -8
- data/generated/google/apis/appengine_v1beta5/representations.rb +42 -0
- data/generated/google/apis/appengine_v1beta5/service.rb +48 -6
- data/generated/google/apis/appstate_v1.rb +1 -1
- data/generated/google/apis/bigquery_v2.rb +1 -1
- data/generated/google/apis/bigquery_v2/classes.rb +68 -14
- data/generated/google/apis/bigquery_v2/representations.rb +30 -0
- data/generated/google/apis/books_v1.rb +1 -1
- data/generated/google/apis/books_v1/classes.rb +68 -3
- data/generated/google/apis/books_v1/representations.rb +21 -0
- data/generated/google/apis/calendar_v3.rb +2 -2
- data/generated/google/apis/calendar_v3/service.rb +1 -1
- data/generated/google/apis/cloudbuild_v1.rb +1 -1
- data/generated/google/apis/cloudmonitoring_v2beta2.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1/service.rb +2 -2
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +1 -1
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +2 -2
- data/generated/google/apis/clouduseraccounts_beta.rb +1 -1
- data/generated/google/apis/clouduseraccounts_beta/classes.rb +1 -1
- data/generated/google/apis/compute_beta.rb +1 -1
- data/generated/google/apis/compute_beta/classes.rb +138 -108
- data/generated/google/apis/compute_beta/representations.rb +16 -18
- data/generated/google/apis/compute_beta/service.rb +52 -2
- data/generated/google/apis/compute_v1.rb +1 -1
- data/generated/google/apis/compute_v1/classes.rb +55 -74
- data/generated/google/apis/compute_v1/representations.rb +14 -18
- data/generated/google/apis/compute_v1/service.rb +45 -1
- data/generated/google/apis/container_v1.rb +3 -3
- data/generated/google/apis/container_v1/classes.rb +200 -42
- data/generated/google/apis/container_v1/representations.rb +54 -0
- data/generated/google/apis/container_v1/service.rb +31 -30
- data/generated/google/apis/content_v2.rb +1 -1
- data/generated/google/apis/datastore_v1beta2.rb +2 -2
- data/generated/google/apis/datastore_v1beta2/service.rb +1 -1
- data/generated/google/apis/deploymentmanager_v2.rb +2 -3
- data/generated/google/apis/deploymentmanager_v2/classes.rb +7 -1
- data/generated/google/apis/deploymentmanager_v2/representations.rb +1 -0
- data/generated/google/apis/deploymentmanager_v2/service.rb +26 -27
- data/generated/google/apis/dfareporting_v2_3.rb +2 -2
- data/generated/google/apis/dfareporting_v2_3/classes.rb +1 -1
- data/generated/google/apis/dfareporting_v2_3/service.rb +2 -2
- data/generated/google/apis/dns_v1.rb +1 -1
- data/generated/google/apis/doubleclicksearch_v2.rb +1 -1
- data/generated/google/apis/doubleclicksearch_v2/classes.rb +6 -4
- data/generated/google/apis/drive_v2.rb +1 -1
- data/generated/google/apis/drive_v2/classes.rb +10 -4
- data/generated/google/apis/drive_v2/representations.rb +1 -0
- data/generated/google/apis/drive_v3.rb +1 -1
- data/generated/google/apis/drive_v3/classes.rb +7 -0
- data/generated/google/apis/drive_v3/representations.rb +1 -0
- data/generated/google/apis/fusiontables_v2.rb +1 -1
- data/generated/google/apis/games_configuration_v1configuration.rb +1 -1
- data/generated/google/apis/games_management_v1management.rb +1 -1
- data/generated/google/apis/games_v1.rb +1 -1
- data/generated/google/apis/genomics_v1.rb +2 -2
- data/generated/google/apis/genomics_v1/classes.rb +770 -82
- data/generated/google/apis/genomics_v1/representations.rb +287 -24
- data/generated/google/apis/genomics_v1/service.rb +412 -13
- data/generated/google/apis/gmail_v1.rb +1 -1
- data/generated/google/apis/groupssettings_v1.rb +1 -1
- data/generated/google/apis/groupssettings_v1/classes.rb +13 -6
- data/generated/google/apis/groupssettings_v1/representations.rb +1 -0
- data/generated/google/apis/identitytoolkit_v3.rb +1 -1
- data/generated/google/apis/identitytoolkit_v3/classes.rb +50 -0
- data/generated/google/apis/identitytoolkit_v3/representations.rb +10 -0
- data/generated/google/apis/logging_v2beta1.rb +2 -3
- data/generated/google/apis/logging_v2beta1/classes.rb +219 -63
- data/generated/google/apis/logging_v2beta1/representations.rb +24 -1
- data/generated/google/apis/logging_v2beta1/service.rb +25 -32
- data/generated/google/apis/oauth2_v2.rb +2 -2
- data/generated/google/apis/oauth2_v2/service.rb +1 -1
- data/generated/google/apis/plus_domains_v1.rb +1 -1
- data/generated/google/apis/plus_v1.rb +1 -1
- data/generated/google/apis/pubsub_v1.rb +1 -1
- data/generated/google/apis/pubsub_v1/classes.rb +20 -12
- data/generated/google/apis/pubsub_v1/service.rb +32 -35
- data/generated/google/apis/reseller_v1.rb +1 -1
- data/generated/google/apis/reseller_v1/classes.rb +23 -9
- data/generated/google/apis/reseller_v1/representations.rb +2 -0
- data/generated/google/apis/sheets_v1.rb +43 -0
- data/generated/google/apis/sheets_v1/classes.rb +4542 -0
- data/generated/google/apis/sheets_v1/representations.rb +1703 -0
- data/generated/google/apis/sheets_v1/service.rb +363 -0
- data/generated/google/apis/sqladmin_v1beta4.rb +3 -2
- data/generated/google/apis/sqladmin_v1beta4/classes.rb +4 -3
- data/generated/google/apis/sqladmin_v1beta4/service.rb +2 -1
- data/generated/google/apis/storage_v1.rb +1 -1
- data/generated/google/apis/vision_v1.rb +2 -2
- data/generated/google/apis/vision_v1/classes.rb +11 -11
- data/generated/google/apis/vision_v1/service.rb +1 -1
- data/generated/google/apis/webmasters_v3.rb +2 -2
- data/generated/google/apis/webmasters_v3/classes.rb +7 -0
- data/generated/google/apis/webmasters_v3/representations.rb +1 -0
- data/generated/google/apis/webmasters_v3/service.rb +1 -1
- data/generated/google/apis/youtube_partner_v1.rb +37 -0
- data/generated/google/apis/youtube_partner_v1/classes.rb +3656 -0
- data/generated/google/apis/youtube_partner_v1/representations.rb +1452 -0
- data/generated/google/apis/youtube_partner_v1/service.rb +3165 -0
- data/generated/google/apis/youtube_v3.rb +3 -2
- data/generated/google/apis/youtube_v3/classes.rb +100 -3
- data/generated/google/apis/youtube_v3/representations.rb +50 -0
- data/generated/google/apis/youtube_v3/service.rb +2 -1
- data/generated/google/apis/youtubereporting_v1.rb +1 -1
- data/generated/google/apis/youtubereporting_v1/classes.rb +17 -0
- data/generated/google/apis/youtubereporting_v1/representations.rb +2 -0
- data/generated/google/apis/youtubereporting_v1/service.rb +21 -3
- data/google-api-client.gemspec +2 -0
- data/lib/google/apis.rb +12 -2
- data/lib/google/apis/version.rb +1 -1
- data/script/generate +5 -2
- data/spec/google/apis/logging_spec.rb +55 -0
- metadata +12 -4
data/google-api-client.gemspec
CHANGED
@@ -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'
|
data/lib/google/apis.rb
CHANGED
@@ -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
|
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
|
-
|
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
|
data/lib/google/apis/version.rb
CHANGED
data/script/generate
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
DIR=$(dirname $( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ))
|
6
6
|
|
7
|
-
|
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
|
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
|
+
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-
|
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
|
- - ">="
|