# simple diff to change a node, way and relation by removing
# their tags
- diff = <<CHANGESET.strip_heredoc
+ diff = <<~CHANGESET
<osmChange>
<modify>
<node id='#{node.id}' lon='0' lat='0' changeset='#{changeset.id}' version='1'/>
</relation>
</modify>
</osmChange>
-CHANGESET
+ CHANGESET
# upload it
post "/api/0.6/changeset/#{changeset.id}/upload",
:params => diff,
:headers => {
- "HTTP_AUTHORIZATION" => format("Basic %s", Base64.encode64("#{user.display_name}:test")),
+ "HTTP_AUTHORIZATION" => format("Basic %<auth>s", :auth => Base64.encode64("#{user.display_name}:test")),
"HTTP_CONTENT_TYPE" => "application/xml"
}
assert_response :success,
# simple diff to change a node, way and relation by removing
# their tags
- diff = <<CHANGESET.strip_heredoc
+ diff = <<~CHANGESET
<osmChange>
<modify>
<node id='#{node.id}' lon='0' lat='0' changeset='#{changeset.id}' version='1'/>
</relation>
</modify>
</osmChange>
-CHANGESET
+ CHANGESET
# upload it
post "/api/0.6/changeset/#{changeset.id}/upload",
:params => gzip_content(diff),
:headers => {
- "HTTP_AUTHORIZATION" => format("Basic %s", Base64.encode64("#{user.display_name}:test")),
+ "HTTP_AUTHORIZATION" => format("Basic %<auth>s", :auth => Base64.encode64("#{user.display_name}:test")),
"HTTP_CONTENT_ENCODING" => "gzip",
"HTTP_CONTENT_TYPE" => "application/xml"
}
# simple diff to change a node, way and relation by removing
# their tags
- diff = <<CHANGESET.strip_heredoc
+ diff = <<~CHANGESET
<osmChange>
<modify>
<node id='#{node.id}' lon='0' lat='0' changeset='#{changeset.id}' version='1'/>
</relation>
</modify>
</osmChange>
-CHANGESET
+ CHANGESET
# upload it
post "/api/0.6/changeset/#{changeset.id}/upload",
:params => deflate_content(diff),
:headers => {
- "HTTP_AUTHORIZATION" => format("Basic %s", Base64.encode64("#{user.display_name}:test")),
+ "HTTP_AUTHORIZATION" => format("Basic %<auth>s", :auth => Base64.encode64("#{user.display_name}:test")),
"HTTP_CONTENT_ENCODING" => "deflate",
"HTTP_CONTENT_TYPE" => "application/xml"
}
post "/api/0.6/changeset/#{changeset.id}/upload",
:params => "",
:headers => {
- "HTTP_AUTHORIZATION" => format("Basic %s", Base64.encode64("#{user.display_name}:test")),
+ "HTTP_AUTHORIZATION" => format("Basic %<auth>s", :auth => Base64.encode64("#{user.display_name}:test")),
"HTTP_CONTENT_ENCODING" => "unknown",
"HTTP_CONTENT_TYPE" => "application/xml"
}