Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 🎸 全角半角違いを握りつぶさない #254

Merged
merged 1 commit into from
Jul 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,10 @@ def tweet_template(rank_number, number_of_votes, product_name, attack_name)
'幻想水滸伝 紡がれし百年の時' => '紡時'
}

origin_record = if product_name == 'ラプソディア' && attack_name == 'Wリーダー攻撃'
# 特例(スプレッドシートからのデータは厳密にスクリーニングをしておくべき)
OnRawSheetUniteAttack.find_by(
sheet_name: product_name_to_sheet_name[product_name],
name: 'Wリーダー攻撃'
)
else
OnRawSheetUniteAttack.find_by(
sheet_name: product_name_to_sheet_name[product_name],
name: attack_name
)
end
origin_record = OnRawSheetUniteAttack.find_by(
sheet_name: product_name_to_sheet_name[product_name],
name: attack_name
)

character_names = Presenter::UniteAttacks.character_names(origin_record)
annotation = origin_record.page_annotation.present? ? "※#{origin_record.page_annotation}\n" : ''
Expand Down
16 changes: 4 additions & 12 deletions lib/tasks/update_kana_column_on_counting_all_atacks.rake
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,10 @@ namespace :update_kana_column_on_counting_all_atacks do
CountingUniteAttack.all.each do |record|
next if record.is_invisible || record.is_out_of_counting || record.product_name.blank? || record.unite_attack_name.blank?

origin_records = if record.product_name == 'ラプソディア' && record.unite_attack_name == 'Wリーダー攻撃'
# 特例(スプレッドシートからのデータは厳密にスクリーニングをしておくべき)
OnRawSheetUniteAttack.where(
sheet_name: product_name_to_sheet_name[record.product_name],
name: 'Wリーダー攻撃'
)
else
OnRawSheetUniteAttack.where(
sheet_name: product_name_to_sheet_name[record.product_name],
name: record.unite_attack_name
)
end
origin_records = OnRawSheetUniteAttack.where(
sheet_name: product_name_to_sheet_name[record.product_name],
name: record.unite_attack_name
)

raise if origin_records.size != 1

Expand Down