google-cloud-billing 0.1.2 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ba5dc93854ef98c9c2443c67b563bda25b8088c69b28359c50b68294ee76aa8
4
- data.tar.gz: ef527588f53a73ee69253e335d0212c99b19c43b019d375bcb1cbe99cef65e21
3
+ metadata.gz: 1717fc83f1658f9e06bd8ea342f248c272b58434c325d4c388126c5d1d38a114
4
+ data.tar.gz: 15e69c2aa184f918d58448816d1d05c2b1b69956f135aff43332deed59fcb747
5
5
  SHA512:
6
- metadata.gz: 552d361a6b955b781ac9575547238642a1f8ddba8faf378ef6a5c8dfbdcd273dc7fe35c341ce9565bdbd71fd0ec87c956ca7136a5ab708a1eb469ca3bfba0cdc
7
- data.tar.gz: 5158521001346057b90ff22843ae3d2303fe26ef1f7b1ac2c5a173ba88b7071c6298f2b2794c961685e22de76b03d2e3fd78f769fee3643791806c4b18dd3764
6
+ metadata.gz: d6b80b9d07134778b32aaaf7a7a365e8446079ca7c28192f8e8d8d263f12a2b7cb3f6e4598e506f927b6cf061eed8f643c3a360a4903a448e9cac3e65440758c
7
+ data.tar.gz: 6040321c8e5d15057f7c87609812491bea3880ac502bc8c474615a1dfed6695cdaa98ca3857d4409f8961ac3f5dd7d771c4f6f0527f532f4f581f74cc2e32095
@@ -64,7 +64,7 @@ containers where writing files is difficult or not encouraged.
64
64
 
65
65
  The environment variables that google-cloud-billing
66
66
  checks for credentials are configured on the service Credentials class (such as
67
- `Google::Cloud::Billing::V1::CloudBilling::Credentials`):
67
+ `::Google::Cloud::Billing::V1::CloudBilling::Credentials`):
68
68
 
69
69
  1. `BILLING_CREDENTIALS` - Path to JSON file, or JSON contents
70
70
  2. `BILLING_KEYFILE` - Path to JSON file, or JSON contents
data/README.md CHANGED
@@ -38,7 +38,7 @@ In order to use this library, you first need to go through the following steps:
38
38
  To enable logging for this library, set the logger for the underlying [gRPC](https://github.com/grpc/grpc/tree/master/src/ruby) library.
39
39
  The logger that you set may be a Ruby stdlib [`Logger`](https://ruby-doc.org/stdlib/libdoc/logger/rdoc/Logger.html) as shown below,
40
40
  or a [`Google::Cloud::Logging::Logger`](https://googleapis.dev/ruby/google-cloud-logging/latest)
41
- that will write logs to [Stackdriver Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
41
+ that will write logs to [Cloud Logging](https://cloud.google.com/logging/). See [grpc/logconfig.rb](https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/logconfig.rb)
42
42
  and the gRPC [spec_helper.rb](https://github.com/grpc/grpc/blob/master/src/ruby/spec/spec_helper.rb) for additional information.
43
43
 
44
44
  Configuring a Ruby stdlib logger:
@@ -16,20 +16,4 @@
16
16
 
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
- gem "google-cloud-core"
20
- require "google/cloud" unless defined? Google::Cloud.new
21
- require "google/cloud/config"
22
- require "googleauth"
23
-
24
- # Set the default configuration
25
- Google::Cloud.configure.add_config! :billing do |config|
26
- config.add_field! :credentials, nil, match: [String, Hash, Google::Auth::Credentials]
27
- config.add_field! :lib_name, nil, match: String
28
- config.add_field! :lib_version, nil, match: String
29
- config.add_field! :interceptors, nil, match: Array
30
- config.add_field! :timeout, nil, match: Numeric
31
- config.add_field! :metadata, nil, match: Hash
32
- config.add_field! :retry_policy, nil, match: [Hash, Proc]
33
- end
34
-
35
- require "google/cloud/billing/version"
19
+ require "google/cloud/billing" unless defined? Google::Cloud::Billing::VERSION
@@ -16,7 +16,30 @@
16
16
 
17
17
  # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
18
 
19
- require "google-cloud-billing"
19
+ # Require this file early so that the version constant gets defined before
20
+ # requiring "google/cloud". This is because google-cloud-core will load the
21
+ # entrypoint (gem name) file, which in turn re-requires this file (hence
22
+ # causing a require cycle) unless the version constant is already defined.
23
+ require "google/cloud/billing/version"
24
+
25
+ require "googleauth"
26
+ gem "google-cloud-core"
27
+ require "google/cloud" unless defined? ::Google::Cloud.new
28
+ require "google/cloud/config"
29
+
30
+ # Set the default configuration
31
+ ::Google::Cloud.configure.add_config! :billing do |config|
32
+ config.add_field! :endpoint, "cloudbilling.googleapis.com", match: ::String
33
+ config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials]
34
+ config.add_field! :scope, nil, match: [::Array, ::String]
35
+ config.add_field! :lib_name, nil, match: ::String
36
+ config.add_field! :lib_version, nil, match: ::String
37
+ config.add_field! :interceptors, nil, match: ::Array
38
+ config.add_field! :timeout, nil, match: ::Numeric
39
+ config.add_field! :metadata, nil, match: ::Hash
40
+ config.add_field! :retry_policy, nil, match: [::Hash, ::Proc]
41
+ config.add_field! :quota_project, nil, match: ::String
42
+ end
20
43
 
21
44
  module Google
22
45
  module Cloud
@@ -36,7 +59,7 @@ module Google
36
59
  #
37
60
  # Retrieves GCP Console billing accounts and associates them with projects.
38
61
  #
39
- # @param version [String, Symbol] The API version to connect to. Optional.
62
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
40
63
  # Defaults to `:v1`.
41
64
  # @return [CloudBilling::Client] A client object for the specified version.
42
65
  #
@@ -68,7 +91,7 @@ module Google
68
91
  # Provides pricing information and metadata on Google Cloud Platform services
69
92
  # and SKUs.
70
93
  #
71
- # @param version [String, Symbol] The API version to connect to. Optional.
94
+ # @param version [::String, ::Symbol] The API version to connect to. Optional.
72
95
  # Defaults to `:v1`.
73
96
  # @return [CloudCatalog::Client] A client object for the specified version.
74
97
  #
@@ -97,8 +120,8 @@ module Google
97
120
  # The library version as recorded in instrumentation and logging.
98
121
  # * `interceptors` (*type:* `Array<GRPC::ClientInterceptor>`) -
99
122
  # An array of interceptors that are run before calls are executed.
100
- # * `timeout` (*type:* `Integer`) -
101
- # Default timeout in milliseconds.
123
+ # * `timeout` (*type:* `Numeric`) -
124
+ # Default timeout in seconds.
102
125
  # * `metadata` (*type:* `Hash{Symbol=>String}`) -
103
126
  # Additional gRPC headers to be sent with the call.
104
127
  # * `retry_policy` (*type:* `Hash`) -
@@ -109,13 +132,16 @@ module Google
109
132
  # * `:retry_codes` (*type:* `Array<String>`) -
110
133
  # The error codes that should trigger a retry.
111
134
  #
112
- # @return [Google::Cloud::Config] The default configuration used by this library
135
+ # @return [::Google::Cloud::Config] The default configuration used by this library
113
136
  #
114
137
  def self.configure
115
- yield Google::Cloud.configure.billing if block_given?
138
+ yield ::Google::Cloud.configure.billing if block_given?
116
139
 
117
- Google::Cloud.configure.billing
140
+ ::Google::Cloud.configure.billing
118
141
  end
119
142
  end
120
143
  end
121
144
  end
145
+
146
+ helper_path = ::File.join __dir__, "billing", "helpers.rb"
147
+ require "google/cloud/billing/helpers" if ::File.file? helper_path
@@ -16,7 +16,7 @@
16
16
  module Google
17
17
  module Cloud
18
18
  module Billing
19
- VERSION = "0.1.2".freeze
19
+ VERSION = "1.0.1".freeze
20
20
  end
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-billing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-25 00:00:00.000000000 Z
11
+ date: 2021-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: google-cloud-core
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.5'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.5'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: google-cloud-billing-v1
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -39,19 +25,19 @@ dependencies:
39
25
  - !ruby/object:Gem::Version
40
26
  version: '0.1'
41
27
  - !ruby/object:Gem::Dependency
42
- name: autotest-suffix
28
+ name: google-cloud-core
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
31
  - - "~>"
46
32
  - !ruby/object:Gem::Version
47
- version: '1.1'
48
- type: :development
33
+ version: '1.5'
34
+ type: :runtime
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
38
  - - "~>"
53
39
  - !ruby/object:Gem::Version
54
- version: '1.1'
40
+ version: '1.5'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: google-style
57
43
  requirement: !ruby/object:Gem::Requirement
@@ -72,56 +58,56 @@ dependencies:
72
58
  requirements:
73
59
  - - "~>"
74
60
  - !ruby/object:Gem::Version
75
- version: '5.10'
61
+ version: '5.14'
76
62
  type: :development
77
63
  prerelease: false
78
64
  version_requirements: !ruby/object:Gem::Requirement
79
65
  requirements:
80
66
  - - "~>"
81
67
  - !ruby/object:Gem::Version
82
- version: '5.10'
68
+ version: '5.14'
83
69
  - !ruby/object:Gem::Dependency
84
- name: minitest-autotest
70
+ name: minitest-focus
85
71
  requirement: !ruby/object:Gem::Requirement
86
72
  requirements:
87
73
  - - "~>"
88
74
  - !ruby/object:Gem::Version
89
- version: '1.0'
75
+ version: '1.1'
90
76
  type: :development
91
77
  prerelease: false
92
78
  version_requirements: !ruby/object:Gem::Requirement
93
79
  requirements:
94
80
  - - "~>"
95
81
  - !ruby/object:Gem::Version
96
- version: '1.0'
82
+ version: '1.1'
97
83
  - !ruby/object:Gem::Dependency
98
- name: minitest-focus
84
+ name: minitest-rg
99
85
  requirement: !ruby/object:Gem::Requirement
100
86
  requirements:
101
87
  - - "~>"
102
88
  - !ruby/object:Gem::Version
103
- version: '1.1'
89
+ version: '5.2'
104
90
  type: :development
105
91
  prerelease: false
106
92
  version_requirements: !ruby/object:Gem::Requirement
107
93
  requirements:
108
94
  - - "~>"
109
95
  - !ruby/object:Gem::Version
110
- version: '1.1'
96
+ version: '5.2'
111
97
  - !ruby/object:Gem::Dependency
112
- name: minitest-rg
98
+ name: rake
113
99
  requirement: !ruby/object:Gem::Requirement
114
100
  requirements:
115
- - - "~>"
101
+ - - ">="
116
102
  - !ruby/object:Gem::Version
117
- version: '5.2'
103
+ version: '12.0'
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
107
  requirements:
122
- - - "~>"
108
+ - - ">="
123
109
  - !ruby/object:Gem::Version
124
- version: '5.2'
110
+ version: '12.0'
125
111
  - !ruby/object:Gem::Dependency
126
112
  name: redcarpet
127
113
  requirement: !ruby/object:Gem::Requirement
@@ -197,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
197
183
  - !ruby/object:Gem::Version
198
184
  version: '0'
199
185
  requirements: []
200
- rubygems_version: 3.0.6
186
+ rubygems_version: 3.2.6
201
187
  signing_key:
202
188
  specification_version: 4
203
189
  summary: API Client library for the Billing API