Rebuild rubocop TODOs after auto-correcting

This commit is contained in:
James Mason 2018-04-04 10:18:51 -07:00
parent 31c50255e9
commit 84dbb52d11
No known key found for this signature in database
GPG key ID: 1B3951886C449023
580 changed files with 3689 additions and 3133 deletions

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class DeviseCreateUsers < ActiveRecord::Migration
def up
create_table(:users) do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateConferencesTable < ActiveRecord::Migration
def up
create_table :conferences do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreatePeopleTable < ActiveRecord::Migration
def up
create_table :people do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateRoomsTable < ActiveRecord::Migration
def up
create_table :rooms do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateTracksTable < ActiveRecord::Migration
def up
create_table :tracks do |t|
@ -11,6 +13,5 @@ class CreateTracksTable < ActiveRecord::Migration
end
end
def down
end
def down; end
end

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateEventsTable < ActiveRecord::Migration
def up
create_table :events do |t|
@ -26,6 +28,5 @@ class CreateEventsTable < ActiveRecord::Migration
end
end
def down
end
def down; end
end

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateEventTypes < ActiveRecord::Migration
def up
create_table :event_types do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateEventPeopleTable < ActiveRecord::Migration
def self.up
create_table :event_people do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateVenueTable < ActiveRecord::Migration
def up
create_table :venues do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateRolesTable < ActiveRecord::Migration
def self.up
create_table :roles do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class UserRolesTable < ActiveRecord::Migration
def self.up
create_table :roles_users, id: false do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateCfpTable < ActiveRecord::Migration
def up
create_table :call_for_papers do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateRegistrationsTable < ActiveRecord::Migration
def up
create_table :registrations do |t|
@ -14,6 +16,5 @@ class CreateRegistrationsTable < ActiveRecord::Migration
end
end
def down
end
def down; end
end

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateComments < ActiveRecord::Migration
def self.up
create_table :comments do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class ActsAsCommentableUpgradeMigration < ActiveRecord::Migration
def self.up
rename_column :comments, :comment, :body

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateEventAttachmentsTable < ActiveRecord::Migration
def up
create_table :event_attachments do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddRegistrationDatesToConferencesTable < ActiveRecord::Migration
def change
add_column :conferences, :registration_start_date, :date

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class RemoveCfpAndRegBooleansFromConferences < ActiveRecord::Migration
def up
remove_column :conferences, :cfp_open

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateVersions < ActiveRecord::Migration
def self.up
create_table :versions do |t|
@ -9,11 +11,11 @@ class CreateVersions < ActiveRecord::Migration
t.text :object_changes
t.datetime :created_at
end
add_index :versions, [:item_type, :item_id]
add_index :versions, %i[item_type item_id]
end
def self.down
remove_index :versions, [:item_type, :item_id]
remove_index :versions, %i[item_type item_id]
drop_table :versions
end
end

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateEmailTable < ActiveRecord::Migration
def up
create_table :email_settings do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddSubjectsToEmailSettings < ActiveRecord::Migration
def change
add_column :email_settings, :registration_subject, :string

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddLogoToConferencesTable < ActiveRecord::Migration
def change
add_column :conferences, :logo_file_name, :string

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class ChangeArrivalRegistrationsDateToDatetime < ActiveRecord::Migration
def up
change_column :registrations, :arrival, :datetime

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddMinimumAndMaximumAbstractLengthsToEventTypes < ActiveRecord::Migration
def change
add_column :event_types, :minimum_abstract_length, :integer, default: 0

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddDietaryChoiceToConferences < ActiveRecord::Migration
def change
add_column :conferences, :use_dietary_choices, :boolean, default: false

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateDietaryChoicesTable < ActiveRecord::Migration
def up
create_table :dietary_choices do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddDietaryChoiceToRegistration < ActiveRecord::Migration
def change
add_column :registrations, :dietary_choice_id, :integer

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddDietaryTextToRegistration < ActiveRecord::Migration
def change
add_column :registrations, :other_dietary_choice, :text

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddHandicappedAccessToRegistrations < ActiveRecord::Migration
def change
add_column :registrations, :handicapped_access_required, :boolean, default: false

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateSupporterLevelTable < ActiveRecord::Migration
def up
create_table :supporter_levels do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateTableSupporterRegistrations < ActiveRecord::Migration
def up
create_table :supporter_registrations do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddUseSupporterLevelsToConferences < ActiveRecord::Migration
def change
add_column :conferences, :use_supporter_levels, :boolean, default: false

View file

@ -1,8 +1,9 @@
# frozen_string_literal: true
class RenameAttendingSocialEventsWithPartner < ActiveRecord::Migration
def up
rename_column :registrations, :attending_social_events_with_partner, :attending_with_partner
end
def down
end
def down; end
end

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddIrcNickToPeopleTable < ActiveRecord::Migration
def change
add_column :people, :irc_nickname, :string

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateSocialEventsTable < ActiveRecord::Migration
def up
create_table :social_events do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateRegistrationsSocialEventsTable < ActiveRecord::Migration
def up
create_table :registrations_social_events, id: false do |t|

View file

@ -1,8 +1,9 @@
# frozen_string_literal: true
class SetRegistrationDefaultsToFalse < ActiveRecord::Migration
def up
change_column :registrations, :using_affiliated_lodging, :boolean, default: false
end
def down
end
def down; end
end

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddSpecialNeedsFieldToRegistrations < ActiveRecord::Migration
def change
add_column :registrations, :other_special_needs, :text

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class ChangeAttachmentDefault < ActiveRecord::Migration
def up
change_column_default(:event_attachments, :public, true)

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class ChangeVenueTypes < ActiveRecord::Migration
def up
change_column :venues, :name, :text

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddVideoIdToEvents < ActiveRecord::Migration
def change
add_column :events, :video_id, :string

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddRevisionToConference < ActiveRecord::Migration
def change
add_column :conferences, :revision, :integer

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateEventsRegistrationsTable < ActiveRecord::Migration
def up
create_table :events_registrations, id: false do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddRequireRegistrationToEvents < ActiveRecord::Migration
def change
add_column :events, :require_registration, :boolean

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddAttendedToRegistrations < ActiveRecord::Migration
def change
add_column :registrations, :attended, :boolean, default: 0

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddScheduleChangesToCallForPapers < ActiveRecord::Migration
def change
add_column :call_for_papers, :schedule_changes, :boolean, default: 0

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateVotes < ActiveRecord::Migration
def up
create_table :votes do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddRatingToCallForPapers < ActiveRecord::Migration
def change
add_column :call_for_papers, :rating, :integer, null: 1

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddRatingDescToCallForPapers < ActiveRecord::Migration
def change
add_column :call_for_papers, :rating_desc, :text

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddVolunteerToRegistrations < ActiveRecord::Migration
def change
add_column :registrations, :volunteer, :boolean

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddVolunteerExperienceToRegistrations < ActiveRecord::Migration
def change
add_column :people, :volunteer_experience, :text

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddTshirtToPeople < ActiveRecord::Migration
def change
add_column :people, :tshirt, :string

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddMobileToPeople < ActiveRecord::Migration
def change
add_column :people, :mobile, :string

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddLanguagesToPeople < ActiveRecord::Migration
def change
add_column :people, :languages, :string

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddUseVpositionsToConferences < ActiveRecord::Migration
def change
add_column :conferences, :use_vpositions, :boolean

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddUseVdaysToConferences < ActiveRecord::Migration
def change
add_column :conferences, :use_vdays, :boolean

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateVpositions < ActiveRecord::Migration
def up
create_table :vpositions do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateVdays < ActiveRecord::Migration
def up
create_table :vdays do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddCreatedAtToSupporterRegistrations < ActiveRecord::Migration
def change
add_column :supporter_registrations, :created_at, :datetime

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class ChangeDefaultRatingInCallForPapers < ActiveRecord::Migration
def up
change_column :call_for_papers, :rating, :integer, default: 3

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateVchoices < ActiveRecord::Migration
def change
create_table :vchoices do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class RegistrationsVchoices < ActiveRecord::Migration
def up
create_table :registrations_vchoices, id: false do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateQuestions < ActiveRecord::Migration
def change
create_table :questions do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateQuestionTypes < ActiveRecord::Migration
def change
create_table :question_types do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateAnswers < ActiveRecord::Migration
def change
create_table :answers do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateQanswers < ActiveRecord::Migration
def change
create_table :qanswers do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateConferencesQuestions < ActiveRecord::Migration
def change
create_table :conferences_questions, id: false do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateQanswersRegistrations < ActiveRecord::Migration
def change
create_table :qanswers_registrations, id: false do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateDifficultyLevels < ActiveRecord::Migration
def change
create_table :difficulty_levels do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddUseDifficultyLevelsToConference < ActiveRecord::Migration
def change
add_column :conferences, :use_difficulty_levels, :boolean, default: false

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddDifficultyLevelIdToEvents < ActiveRecord::Migration
def change
add_column :events, :difficulty_level_id, :integer

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddUseVolunteersToConference < ActiveRecord::Migration
def change
add_column :conferences, :use_volunteers, :boolean

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class UseVdaysVpositionsDefaults < ActiveRecord::Migration
def up
change_column :conferences, :use_vpositions, :boolean, default: false

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class RenameVideoToMediaOnEvents < ActiveRecord::Migration
def up
rename_column :events, :video_id, :media_id

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddSchedulePublicToCallForPapers < ActiveRecord::Migration
def change
add_column :call_for_papers, :schedule_public, :boolean

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddVideoToConferences < ActiveRecord::Migration
def change
add_column :conferences, :media_id, :string

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class RemoveRatingDescFromCfp < ActiveRecord::Migration
def up
remove_column :call_for_papers, :rating_desc

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddColorToConference < ActiveRecord::Migration
def change
add_column :conferences, :color, :string, default: '#000000'

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddDescriptionToConference < ActiveRecord::Migration
def change
add_column :conferences, :description, :text

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddRegistrationDescriptionToConference < ActiveRecord::Migration
def change
add_column :conferences, :registration_description, :text

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddTicketDescriptionToConference < ActiveRecord::Migration
def change
add_column :conferences, :ticket_description, :text

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddDescriptionToSupporterLevel < ActiveRecord::Migration
def change
add_column :supporter_levels, :description, :text

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddTicketPriceToSupporterLevel < ActiveRecord::Migration
def change
add_column :supporter_levels, :ticket_price, :string

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class RemoveColorDefaults < ActiveRecord::Migration
def change
change_column_default(:tracks, :color, nil)

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateOpenids < ActiveRecord::Migration
def change
create_table :openids do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateLodgings < ActiveRecord::Migration
def change
create_table :lodgings do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class RemoveHardDeadlineFromCallForPapers < ActiveRecord::Migration
def up
remove_column :call_for_papers, :hard_deadline

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateSponsorshipLevels < ActiveRecord::Migration
def change
create_table :sponsorship_levels do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreateSponsors < ActiveRecord::Migration
def change
create_table :sponsors do |t|

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class UpdateEventStates < ActiveRecord::Migration
def change
execute "UPDATE events SET state='new' WHERE state = 'review';"

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddSponsorDescriptionToConference < ActiveRecord::Migration
def change
add_column :conferences, :sponsor_description, :text

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddSponsorEmailToConference < ActiveRecord::Migration
def change
add_column :conferences, :sponsor_email, :string

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddPersonAttributesToUser < ActiveRecord::Migration
def change
add_column :users, :name, :string

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreatePhotos < ActiveRecord::Migration
def change
create_table :photos do |t|

View file

@ -1,13 +1,15 @@
# frozen_string_literal: true
class CreateEventUsers < ActiveRecord::Migration
class TempPerson < ActiveRecord::Base
class TempPerson < ApplicationRecord
self.table_name = 'people'
end
class TempEventPerson < ActiveRecord::Base
class TempEventPerson < ApplicationRecord
self.table_name = 'event_people'
end
class TempEventUser < ActiveRecord::Base
class TempEventUser < ApplicationRecord
self.table_name = 'event_users'
end

View file

@ -1,9 +1,11 @@
# frozen_string_literal: true
class MigrateDataPersonToUser < ActiveRecord::Migration
class TempPerson < ActiveRecord::Base
class TempPerson < ApplicationRecord
self.table_name = 'people'
end
class TempUser < ActiveRecord::Base
class TempUser < ApplicationRecord
self.table_name = 'users'
end
@ -11,11 +13,11 @@ class MigrateDataPersonToUser < ActiveRecord::Migration
TempPerson.all.each do |p|
user = TempUser.find_by(id: p.user_id)
next unless user
if p.public_name.empty?
user.name = p.email
else
user.name = p.public_name
end
user.name = if p.public_name.empty?
p.email
else
p.public_name
end
user.biography = p.biography
user.nickname = p.irc_nickname
user.affiliation = p.company

View file

@ -1,9 +1,11 @@
# frozen_string_literal: true
class ChangePersonIdToUserIdInRegistrations < ActiveRecord::Migration
class TempPerson < ActiveRecord::Base
class TempPerson < ApplicationRecord
self.table_name = 'people'
end
class TempRegistration < ActiveRecord::Base
class TempRegistration < ApplicationRecord
self.table_name = 'registrations'
end
@ -13,11 +15,10 @@ class ChangePersonIdToUserIdInRegistrations < ActiveRecord::Migration
TempPerson.all.each do |t|
registrations = TempRegistration.where(person_id: t.id)
unless registrations.empty?
registrations.each do |r|
r.user_id = t.user_id
r.save!
end
next if registrations.empty?
registrations.each do |r|
r.user_id = t.user_id
r.save!
end
end

View file

@ -1,9 +1,11 @@
# frozen_string_literal: true
class ChangePersonIdToUserIdInVotes < ActiveRecord::Migration
class TempPerson < ActiveRecord::Base
class TempPerson < ApplicationRecord
self.table_name = 'people'
end
class TempVote < ActiveRecord::Base
class TempVote < ApplicationRecord
self.table_name = 'votes'
end
@ -13,11 +15,10 @@ class ChangePersonIdToUserIdInVotes < ActiveRecord::Migration
TempPerson.all.each do |t|
votes = TempVote.where(person_id: t.id)
unless votes.empty?
votes.each do |v|
v.user_id = t.user_id
v.save!
end
next if votes.empty?
votes.each do |v|
v.user_id = t.user_id
v.save!
end
end

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddColorToEventType < ActiveRecord::Migration
def change
add_column :event_types, :color, :string

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddSocialUrlsToConference < ActiveRecord::Migration
def change
add_column :conferences, :twitter_url, :string

Some files were not shown because too many files have changed in this diff Show more