Skip to content

Commit

Permalink
[ci][frontend] Apply Layout/SpaceAfterColon cop
Browse files Browse the repository at this point in the history
Updated via rubocop's --auto-correct
  • Loading branch information
bgeuken committed Oct 12, 2017
1 parent 4dee31e commit 97ed9b9
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 36 deletions.
9 changes: 0 additions & 9 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,6 @@ Layout/MultilineMethodCallIndentation:
Layout/MultilineOperationIndentation:
Enabled: false

# Offense count: 39
# Cop supports --auto-correct.
Layout/SpaceAfterColon:
Exclude:
- 'src/api/app/models/incident_updateinfo_counter_value.rb'
- 'src/api/test/functional/maintenance_test.rb'
- 'src/api/test/functional/product_test.rb'
- 'src/api/test/functional/source_controller_test.rb'

# Offense count: 3
# Cop supports --auto-correct.
Layout/SpaceAfterComma:
Expand Down
2 changes: 1 addition & 1 deletion src/api/app/models/incident_updateinfo_counter_value.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def self.find_or_create(time, updateinfo_counter, project)

# not yet released, get an uniq counter value for this incident and scheme
IncidentUpdateinfoCounterValue.create(released_at: time,
updateinfo_counter:updateinfo_counter,
updateinfo_counter: updateinfo_counter,
project: project,
value: updateinfo_counter.increase)
end
Expand Down
2 changes: 1 addition & 1 deletion src/api/test/functional/maintenance_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ def test_create_maintenance_project_and_release_packages
assert_match(/DUMMY bnc#1042/, @response.body)
get "/source/#{incident_project}/pack2.BaseDistro2.0_LinkedUpdateProject?view=issues"
assert_response :success
assert_xml_tag parent: { tag: 'issue', attributes: {change:"added"} },
assert_xml_tag parent: { tag: 'issue', attributes: {change: "added"} },
tag: 'name', content: '1042'

# add a new package with defined link target
Expand Down
12 changes: 6 additions & 6 deletions src/api/test/functional/product_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,11 @@ def test_simple_product_file
run_scheduler('local')
get "/build/home:Iggy/_result"
assert_response :success
assert_xml_tag parent: {tag: "result", attributes: {project:"home:Iggy", repository:"10.2", arch:"i586"} },
assert_xml_tag parent: {tag: "result", attributes: {project: "home:Iggy", repository: "10.2", arch: "i586"} },
tag: "status", attributes: { package: 'TestPack', code: 'scheduled' }
get "/build/home:tom:temporary/_result"
assert_response :success
assert_xml_tag parent: {tag: "result", attributes: {project:"home:tom:temporary", repository:"images", arch:"local"} },
assert_xml_tag parent: {tag: "result", attributes: {project: "home:tom:temporary", repository: "images", arch: "local"} },
tag: "status", attributes: { package: '_product:simple-cd-cd-i586_x86_64', code: 'blocked' }

login_king
Expand All @@ -180,20 +180,20 @@ def test_simple_product_file
run_scheduler('local') # run first, so the waiting_for are still there
get "/build/home:tom:temporary/_result"
assert_response :success
assert_xml_tag parent: {tag: "result", attributes: {project:"home:tom:temporary", repository:"images", arch:"local"} },
assert_xml_tag parent: {tag: "result", attributes: {project: "home:tom:temporary", repository: "images", arch: "local"} },
tag: "status", attributes: { package: '_product:simple-cd-cd-i586_x86_64', code: 'blocked' }
run_scheduler('i586') # but they get removed now ...
run_scheduler('x86_64')
run_scheduler('local') # check that i586 & x86_64 schedulers removed waiting_for
get "/build/home:Iggy/_result"
assert_response :success
assert_xml_tag parent: {tag: "result", attributes: {project:"home:Iggy", repository:"10.2", arch:"i586"} },
assert_xml_tag parent: {tag: "result", attributes: {project: "home:Iggy", repository: "10.2", arch: "i586"} },
tag: "status", attributes: { package: 'TestPack', code: 'succeeded' }
assert_xml_tag parent: {tag: "result", attributes: {project:"home:Iggy", repository:"10.2", arch:"x86_64"} },
assert_xml_tag parent: {tag: "result", attributes: {project: "home:Iggy", repository: "10.2", arch: "x86_64"} },
tag: "status", attributes: { package: 'TestPack', code: 'succeeded' }
get "/build/home:tom:temporary/_result"
assert_response :success
assert_xml_tag parent: {tag: "result", attributes: {project:"home:tom:temporary", repository:"images", arch:"local"} },
assert_xml_tag parent: {tag: "result", attributes: {project: "home:tom:temporary", repository: "images", arch: "local"} },
tag: "status", attributes: { package: '_product:simple-cd-cd-i586_x86_64', code: 'scheduled' }

delete "/source/home:Iggy/TestPack/DUMMY_CHANGE"
Expand Down
38 changes: 19 additions & 19 deletions src/api/test/functional/source_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2445,9 +2445,9 @@ def test_branch_repository_with_extra_policy
assert_response :success
get '/source/home:adrian:branches:home:adrian:TEMP/_meta'
assert_response :success
assert_xml_tag(tag: 'repository', attributes: {name:"repo1", rebuild: "local", block: "never"})
assert_xml_tag(tag: 'repository', attributes: {name:"repo2", rebuild: "local", block: "never"})
assert_xml_tag(tag: 'repository', attributes: {name:"repo3", rebuild: "local", block: "never"})
assert_xml_tag(tag: 'repository', attributes: {name: "repo1", rebuild: "local", block: "never"})
assert_xml_tag(tag: 'repository', attributes: {name: "repo2", rebuild: "local", block: "never"})
assert_xml_tag(tag: 'repository', attributes: {name: "repo3", rebuild: "local", block: "never"})
delete '/source/home:adrian:branches:home:adrian:TEMP'
assert_response :success

Expand All @@ -2456,9 +2456,9 @@ def test_branch_repository_with_extra_policy
assert_response :success
get '/source/home:adrian:branches:home:adrian:TEMP/_meta'
assert_response :success
assert_xml_tag(tag: 'repository', attributes: {name:"repo1", rebuild: "local"})
assert_xml_tag(tag: 'repository', attributes: {name:"repo2", rebuild: "transitive"})
assert_xml_tag(tag: 'repository', attributes: {name:"repo3"})
assert_xml_tag(tag: 'repository', attributes: {name: "repo1", rebuild: "local"})
assert_xml_tag(tag: 'repository', attributes: {name: "repo2", rebuild: "transitive"})
assert_xml_tag(tag: 'repository', attributes: {name: "repo3"})
delete '/source/home:adrian:branches:home:adrian:TEMP'
assert_response :success

Expand Down Expand Up @@ -2495,9 +2495,9 @@ def test_branch_repository_attribute_tests
assert_response :success
get '/source/home:adrian:branches:home:adrian:TEMP/_meta'
assert_response :success
assert_xml_tag(tag: 'repository', attributes: {name:"repo1"})
assert_xml_tag(tag: 'repository', attributes: {name:"repo2"})
assert_xml_tag(tag: 'repository', attributes: {name:"repo3"})
assert_xml_tag(tag: 'repository', attributes: {name: "repo1"})
assert_xml_tag(tag: 'repository', attributes: {name: "repo2"})
assert_xml_tag(tag: 'repository', attributes: {name: "repo3"})
delete '/source/home:adrian:branches:home:adrian:TEMP'
assert_response :success

Expand All @@ -2513,10 +2513,10 @@ def test_branch_repository_attribute_tests
assert_response :success
get '/source/home:adrian:branches:home:adrian:TEMP/_meta'
assert_response :success
assert_xml_tag(tag: 'repository', attributes: {name:"BaseDistro_repo"})
assert_no_xml_tag(tag: 'repository', attributes: {name:"repo1"})
assert_no_xml_tag(tag: 'repository', attributes: {name:"repo2"})
assert_no_xml_tag(tag: 'repository', attributes: {name:"repo3"})
assert_xml_tag(tag: 'repository', attributes: {name: "BaseDistro_repo"})
assert_no_xml_tag(tag: 'repository', attributes: {name: "repo1"})
assert_no_xml_tag(tag: 'repository', attributes: {name: "repo2"})
assert_no_xml_tag(tag: 'repository', attributes: {name: "repo3"})
delete '/source/home:adrian:branches:home:adrian:TEMP'
assert_response :success
delete "/source/home:adrian:TEMP/_attribute/OBS:BranchRepositoriesFromProject"
Expand All @@ -2534,19 +2534,19 @@ def test_branch_repository_attribute_tests
assert_response :success
get '/source/home:adrian:branches:home:adrian:TEMP/_meta'
assert_response :success
assert_no_xml_tag(tag: 'repository', attributes: {name:"repo1"})
assert_xml_tag(tag: 'repository', attributes: {name:"repo2"})
assert_no_xml_tag(tag: 'repository', attributes: {name:"repo3"})
assert_no_xml_tag(tag: 'repository', attributes: {name: "repo1"})
assert_xml_tag(tag: 'repository', attributes: {name: "repo2"})
assert_no_xml_tag(tag: 'repository', attributes: {name: "repo3"})
delete '/source/home:adrian:branches:home:adrian:TEMP'
assert_response :success
# again as maintenance branch
post '/source/home:adrian:TEMP/dummy', params: { cmd: 'branch', maintenance: 1 }
assert_response :success
get '/source/home:adrian:branches:home:adrian:TEMP/_meta'
assert_response :success
assert_no_xml_tag(tag: 'repository', attributes: {name:"home_adrian_TEMP_repo1"})
assert_xml_tag(tag: 'repository', attributes: {name:"home_adrian_TEMP_repo2"})
assert_no_xml_tag(tag: 'repository', attributes: {name:"home_adrian_TEMP_repo3"})
assert_no_xml_tag(tag: 'repository', attributes: {name: "home_adrian_TEMP_repo1"})
assert_xml_tag(tag: 'repository', attributes: {name: "home_adrian_TEMP_repo2"})
assert_no_xml_tag(tag: 'repository', attributes: {name: "home_adrian_TEMP_repo3"})
delete '/source/home:adrian:branches:home:adrian:TEMP'
assert_response :success

Expand Down

0 comments on commit 97ed9b9

Please sign in to comment.