lib/google/apis/generator/helpers.rb in google-api-client-0.20.1 vs lib/google/apis/generator/helpers.rb in google-api-client-0.21.0
- old
+ new
@@ -35,10 +35,12 @@
# Convert a parameter name to ruby conventions
# @param [String] name
# @return [String] updated param name
def normalize_param_name(name)
- name = ActiveSupport::Inflector.underscore(name.gsub(/\W/, '_'))
+ name = name.gsub(/\W/, '_')
+ name = name.gsub(/IPv4/, 'Ipv4')
+ name = ActiveSupport::Inflector.underscore(name)
if reserved?(name)
logger.warn { sprintf('Found reserved keyword \'%1$s\'', name) }
name += '_'
logger.warn { sprintf('Changed to \'%1$s\'', name) }
end