google-ads-common 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +4 -0
- data/lib/ads_common/api_config.rb +0 -2
- data/lib/ads_common/build/savon_registry.rb +19 -0
- data/lib/ads_common/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '067293eb179d644ad5b96f6a03efed2ae0a9feda'
|
4
|
+
data.tar.gz: a5315b11005916c7ebc3ecfc00ed75d3db325b97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d7af7a96d81234c804467b962d17818bf076d1f22305e10df2e68339bb358924464b65385dbae5bd912e740f1f7c638d30d8dfdfa698accbe8215094becc80c
|
7
|
+
data.tar.gz: 24f0e5d3a6f77aeca775c2c88ef30fa65935561903d525ccefb039b880347fb3bed36f529d5bb07e0a93d5d8555f8f265a3b22062e41100f6b8f6d8bf25f8abe
|
data/ChangeLog
CHANGED
@@ -109,7 +109,6 @@ module AdsCommon
|
|
109
109
|
#
|
110
110
|
def endpoint(version, service)
|
111
111
|
base = get_wsdl_base(version)
|
112
|
-
# TODO(dklimkin): Unflatten subdir constants. Cross-API refactor 0.9.0.
|
113
112
|
if !subdir_config().nil?
|
114
113
|
base = base.to_s + subdir_config()[[version, service]].to_s
|
115
114
|
end
|
@@ -127,7 +126,6 @@ module AdsCommon
|
|
127
126
|
#
|
128
127
|
def subdir(version, service)
|
129
128
|
return nil if subdir_config().nil?
|
130
|
-
# TODO(dklimkin): Unflatten subdir constants. Cross-API refactor 0.9.0.
|
131
129
|
subdir_config()[[version, service]]
|
132
130
|
end
|
133
131
|
|
@@ -145,6 +145,9 @@ module AdsCommon
|
|
145
145
|
'sequence | complexContent/extension/sequence') do |seq_node|
|
146
146
|
type[:fields] += get_element_fields(seq_node)
|
147
147
|
end
|
148
|
+
|
149
|
+
extract_enumerations(type_element, type)
|
150
|
+
|
148
151
|
REXML::XPath.each(type_element, 'choice') do |seq_node|
|
149
152
|
type[:choices] ||= []
|
150
153
|
type[:choices] += get_element_fields(seq_node)
|
@@ -152,6 +155,22 @@ module AdsCommon
|
|
152
155
|
return type
|
153
156
|
end
|
154
157
|
|
158
|
+
# Extracts all possible enumerations for a type and adds them as an
|
159
|
+
# `enumerations` key on the type.
|
160
|
+
def extract_enumerations(type_element, type)
|
161
|
+
REXML::XPath.each(type_element,
|
162
|
+
"restriction[@base='xsd:string']") do |enum_node|
|
163
|
+
type.delete(:fields)
|
164
|
+
type[:type] = enum_node.attribute('base').to_s.gsub(/^.+:/, '')
|
165
|
+
end
|
166
|
+
REXML::XPath.each(type_element,
|
167
|
+
"restriction[@base='xsd:string']/enumeration") do |enum_node|
|
168
|
+
type[:enumerations] ||= []
|
169
|
+
type[:enumerations] << enum_node.attribute('value').to_s
|
170
|
+
end
|
171
|
+
return type
|
172
|
+
end
|
173
|
+
|
155
174
|
# Extracts input parameters of given method as an array.
|
156
175
|
def extract_input_parameters(op_node, doc)
|
157
176
|
op_name = get_element_name(op_node)
|
data/lib/ads_common/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-ads-common
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergio Gomes
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-
|
13
|
+
date: 2018-06-26 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: google-ads-savon
|
@@ -196,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
196
196
|
version: 1.3.6
|
197
197
|
requirements: []
|
198
198
|
rubyforge_project: google-ads-common
|
199
|
-
rubygems_version: 2.6.
|
199
|
+
rubygems_version: 2.6.13
|
200
200
|
signing_key:
|
201
201
|
specification_version: 4
|
202
202
|
summary: Common code for Google Ads APIs
|