Merge pull request #1430 from codyborders/master
Adds Style/Tab cop to rubocop.yml
This commit is contained in:
commit
46a6a59622
8 changed files with 26 additions and 33 deletions
|
|
@ -92,6 +92,10 @@ Style/SpaceAroundOperators:
|
||||||
Style/StringLiterals:
|
Style/StringLiterals:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
|
# This cop checks for tabs where spaces should be used.
|
||||||
|
Style/Tab:
|
||||||
|
Enabled: true
|
||||||
|
|
||||||
# Avoid trailing blank lines
|
# Avoid trailing blank lines
|
||||||
Style/TrailingBlankLines:
|
Style/TrailingBlankLines:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
|
||||||
|
|
@ -602,17 +602,6 @@ Style/SymbolProc:
|
||||||
- 'spec/controllers/admin/conferences_controller_spec.rb'
|
- 'spec/controllers/admin/conferences_controller_spec.rb'
|
||||||
- 'spec/support/flash.rb'
|
- 'spec/support/flash.rb'
|
||||||
|
|
||||||
# Offense count: 23
|
|
||||||
# Cop supports --auto-correct.
|
|
||||||
Style/Tab:
|
|
||||||
Exclude:
|
|
||||||
- 'db/migrate/20141031225545_add_require_handicapped_access_to_questions.rb'
|
|
||||||
- 'db/migrate/20141031225606_add_attending_with_partner_to_questions.rb'
|
|
||||||
- 'db/migrate/20141031225620_add_staying_at_suggested_hotel_to_questions.rb'
|
|
||||||
- 'db/migrate/20141031225635_add_attending_social_events_to_questions.rb'
|
|
||||||
- 'db/migrate/20141118162030_change_lodging_association_to_conference.rb'
|
|
||||||
- 'spec/features/campaign_spec.rb'
|
|
||||||
- 'spec/features/event_types_spec.rb'
|
|
||||||
|
|
||||||
# Offense count: 26
|
# Offense count: 26
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
|
|
|
||||||
|
|
@ -75,11 +75,11 @@ class AddRequireHandicappedAccessToQuestions < ActiveRecord::Migration
|
||||||
TempConferencesQuestions.find_or_create_by!(conference_id: c.id, question_id: q.id)
|
TempConferencesQuestions.find_or_create_by!(conference_id: c.id, question_id: q.id)
|
||||||
|
|
||||||
TempRegistration.where(conference_id: c.id).each do |r|
|
TempRegistration.where(conference_id: c.id).each do |r|
|
||||||
if r.handicapped_access_required
|
if r.handicapped_access_required
|
||||||
TempQanswerRegistration.find_or_create_by!(registration_id: r.id, qanswer_id: qa_yes.id)
|
TempQanswerRegistration.find_or_create_by!(registration_id: r.id, qanswer_id: qa_yes.id)
|
||||||
else
|
else
|
||||||
TempQanswerRegistration.find_or_create_by!(registration_id: r.id, qanswer_id: qa_no.id)
|
TempQanswerRegistration.find_or_create_by!(registration_id: r.id, qanswer_id: qa_no.id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
remove_column :registrations, :handicapped_access_required, :boolean
|
remove_column :registrations, :handicapped_access_required, :boolean
|
||||||
|
|
|
||||||
|
|
@ -75,11 +75,11 @@ class AddAttendingWithPartnerToQuestions < ActiveRecord::Migration
|
||||||
TempConferencesQuestions.find_or_create_by!(conference_id: c.id, question_id: q.id)
|
TempConferencesQuestions.find_or_create_by!(conference_id: c.id, question_id: q.id)
|
||||||
|
|
||||||
TempRegistration.where(conference_id: c.id).each do |r|
|
TempRegistration.where(conference_id: c.id).each do |r|
|
||||||
if r.attending_with_partner
|
if r.attending_with_partner
|
||||||
TempQanswerRegistration.find_or_create_by!(registration_id: r.id, qanswer_id: qa_yes.id)
|
TempQanswerRegistration.find_or_create_by!(registration_id: r.id, qanswer_id: qa_yes.id)
|
||||||
else
|
else
|
||||||
TempQanswerRegistration.find_or_create_by!(registration_id: r.id, qanswer_id: qa_no.id)
|
TempQanswerRegistration.find_or_create_by!(registration_id: r.id, qanswer_id: qa_no.id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
remove_column :registrations, :attending_with_partner, :boolean
|
remove_column :registrations, :attending_with_partner, :boolean
|
||||||
|
|
|
||||||
|
|
@ -75,11 +75,11 @@ class AddStayingAtSuggestedHotelToQuestions < ActiveRecord::Migration
|
||||||
TempConferencesQuestions.find_or_create_by!(conference_id: c.id, question_id: q.id)
|
TempConferencesQuestions.find_or_create_by!(conference_id: c.id, question_id: q.id)
|
||||||
|
|
||||||
TempRegistration.where(conference_id: c.id).each do |r|
|
TempRegistration.where(conference_id: c.id).each do |r|
|
||||||
if r.using_affiliated_lodging
|
if r.using_affiliated_lodging
|
||||||
TempQanswerRegistration.find_or_create_by!(registration_id: r.id, qanswer_id: qa_yes.id)
|
TempQanswerRegistration.find_or_create_by!(registration_id: r.id, qanswer_id: qa_yes.id)
|
||||||
else
|
else
|
||||||
TempQanswerRegistration.find_or_create_by!(registration_id: r.id, qanswer_id: qa_no.id)
|
TempQanswerRegistration.find_or_create_by!(registration_id: r.id, qanswer_id: qa_no.id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
remove_column :registrations, :using_affiliated_lodging, :boolean
|
remove_column :registrations, :using_affiliated_lodging, :boolean
|
||||||
|
|
|
||||||
|
|
@ -75,11 +75,11 @@ class AddAttendingSocialEventsToQuestions < ActiveRecord::Migration
|
||||||
TempConferencesQuestions.find_or_create_by!(conference_id: c.id, question_id: q.id)
|
TempConferencesQuestions.find_or_create_by!(conference_id: c.id, question_id: q.id)
|
||||||
|
|
||||||
TempRegistration.where(conference_id: c.id).each do |r|
|
TempRegistration.where(conference_id: c.id).each do |r|
|
||||||
if r.attending_social_events
|
if r.attending_social_events
|
||||||
TempQanswerRegistration.find_or_create_by!(registration_id: r.id, qanswer_id: qa_yes.id)
|
TempQanswerRegistration.find_or_create_by!(registration_id: r.id, qanswer_id: qa_yes.id)
|
||||||
else
|
else
|
||||||
TempQanswerRegistration.find_or_create_by!(registration_id: r.id, qanswer_id: qa_no.id)
|
TempQanswerRegistration.find_or_create_by!(registration_id: r.id, qanswer_id: qa_no.id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
remove_column :registrations, :attending_social_events, :boolean
|
remove_column :registrations, :attending_social_events, :boolean
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ class ChangeLodgingAssociationToConference < ActiveRecord::Migration
|
||||||
venue = TempVenue.find_by(conference_id: conference.id)
|
venue = TempVenue.find_by(conference_id: conference.id)
|
||||||
lodgings = TempLodging.where(venue_id: venue.id)
|
lodgings = TempLodging.where(venue_id: venue.id)
|
||||||
lodgings.each do |lodging|
|
lodgings.each do |lodging|
|
||||||
lodging.update_attributes(conference_id: conference.id)
|
lodging.update_attributes(conference_id: conference.id)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ feature EventType do
|
||||||
|
|
||||||
# Remove event type
|
# Remove event type
|
||||||
within('tr', text: 'Party') do
|
within('tr', text: 'Party') do
|
||||||
click_link 'Delete'
|
click_link 'Delete'
|
||||||
end
|
end
|
||||||
expect(flash).to eq('Event type successfully deleted.')
|
expect(flash).to eq('Event type successfully deleted.')
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue