Skip to content

Commit

Permalink
changing to underscore
Browse files Browse the repository at this point in the history
  • Loading branch information
rambleraptor committed Aug 17, 2018
1 parent ab7bd7b commit 3da41a3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions templates/ansible/resource.erb
Original file line number Diff line number Diff line change
Expand Up @@ -292,14 +292,14 @@ def update_fields(module, request, response):
-%>
<% unless props_statement.empty? -%>
if <%= props_statement -%>:
<%= props.first.name.downcase -%>_update(module, request, response)
<%= props.first.name.underscore -%>_update(module, request, response)
<% end # unless props_statement.empty? -%>
<% end # update_props.each -%>
<% end # if empty -%>


<% update_props.each do |key, props| -%>
def <%= props.first.name.downcase -%>_update(module, request, response):
def <%= props.first.name.underscore -%>_update(module, request, response):
auth = GcpSession(module, <%= quote_string(prod_name) -%>)
auth.<%= key[:update_verb].downcase -%>(
''.join([
Expand Down
2 changes: 1 addition & 1 deletion templates/chef/resource.erb
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ module Google
.map { |prop| "(@current_resource.#{prop.name.underscore} != @new_resource.#{prop.name.underscore})" }.join(' || ')
-%>
if <%= prop_statement %>
<%= props.first.name.downcase -%>_update(@current_resource)
<%= props.first.name.underscore -%>_update(@current_resource)
end
<% end # update_props.each -%>
<% if !object.input -%>
Expand Down
2 changes: 1 addition & 1 deletion templates/puppet/resource.erb
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ Puppet::Type.type(:<%= object.out_name -%>).provide(:google) do
<% update_props = properties_by_custom_update(object.all_user_properties) -%>
<% update_props.each do |key, props| -%>
<% prop_statement = props.map { |prop| "@dirty[:#{prop.name.underscore}]" }.join(' || ') -%>
<%= props.first.name.downcase -%>_update(@resource) if <%= prop_statement %>
<%= props.first.name.underscore -%>_update(@resource) if <%= prop_statement %>
<% end # update_props.each -%>
<% if object&.handlers&.flush.nil? -%>
<% if object.input && update_props.empty?-%>
Expand Down
2 changes: 1 addition & 1 deletion templates/puppetchef/update_props.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% update_props = properties_by_custom_update(object.all_user_properties) -%>
<% update_props.each do |key, props| -%>
def <%= props[0].name.downcase -%>_update(data)
def <%= props[0].name.underscore -%>_update(data)
::Google::<%= product_ns -%>::Network::<%= key[:update_verb].capitalize -%>.new(
<%= indent(build_url([object.__product.base_url, key[:update_url]]), 4) -%>,
<% if provider == 'puppet' -%>
Expand Down

0 comments on commit 3da41a3

Please sign in to comment.