Skip to content

Commit

Permalink
Add exceptions list
Browse files Browse the repository at this point in the history
While working with the style, I discovered that AWS Auto Scaling service
has no prefix on the status page. So I decided to add an exceptions
list.
  • Loading branch information
soulim committed Sep 7, 2020
1 parent a68e5e3 commit b3a4a6d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 1 addition & 2 deletions AWS/Names.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ swap:
AWS Worklink: Amazon Worklink
AWS WorkMail: Amazon WorkMail
AWS WorkSpaces: Amazon WorkSpaces
Amazon Auto Scaling: Auto Scaling
AWS Auto Scaling: Auto Scaling
Amazon Auto Scaling: AWS Auto Scaling
Amazon Amplify: AWS Amplify
Amazon App Mesh: AWS App Mesh
Amazon Application Discovery Service: AWS Application Discovery Service
Expand Down
7 changes: 7 additions & 0 deletions bin/gen
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,17 @@
#
# bin/list | bin/gen

EXCEPTIONS = {
'Auto Scaling' => 'AWS Auto Scaling'
}

rules = ARGF.each_line.each_with_object({}) do |line, acc|
next if line.empty?

full_name = line.strip
# Some services have "incorrect" names on the status page. Therefore, these
# names are manually fixed.
full_name = EXCEPTIONS[full_name] if EXCEPTIONS.key?(full_name)

if full_name.start_with?('Amazon')
short_name = full_name.gsub(/(Amazon)/, '')
Expand Down

0 comments on commit b3a4a6d

Please sign in to comment.