mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 15:25:35 +08:00
add 'us-east-2' S3 region
This commit is contained in:
parent
3b1b00a869
commit
c66b9dcdbd
|
@ -1,6 +1,7 @@
|
|||
require_dependency 'enum_site_setting'
|
||||
|
||||
class S3RegionSiteSetting < EnumSiteSetting
|
||||
|
||||
def self.valid_value?(val)
|
||||
valid_values.include? val
|
||||
end
|
||||
|
@ -10,20 +11,22 @@ class S3RegionSiteSetting < EnumSiteSetting
|
|||
end
|
||||
|
||||
def self.valid_values
|
||||
[ 'us-east-1',
|
||||
'us-west-1',
|
||||
'us-west-2',
|
||||
'us-gov-west-1',
|
||||
'eu-west-1',
|
||||
'eu-west-2',
|
||||
'eu-central-1',
|
||||
'ap-southeast-1',
|
||||
'ap-southeast-2',
|
||||
'ap-south-1',
|
||||
[
|
||||
'ap-northeast-1',
|
||||
'ap-northeast-2',
|
||||
'ap-south-1',
|
||||
'ap-southeast-1',
|
||||
'ap-southeast-2',
|
||||
'cn-north-1',
|
||||
'eu-central-1',
|
||||
'eu-west-1',
|
||||
'eu-west-2',
|
||||
'sa-east-1',
|
||||
'cn-north-1'
|
||||
'us-east-1',
|
||||
'us-east-2',
|
||||
'us-gov-west-1',
|
||||
'us-west-1',
|
||||
'us-west-2',
|
||||
]
|
||||
end
|
||||
|
||||
|
|
|
@ -180,20 +180,21 @@ en:
|
|||
|
||||
s3:
|
||||
regions:
|
||||
us_east_1: "US East (N. Virginia)"
|
||||
us_west_1: "US West (N. California)"
|
||||
us_west_2: "US West (Oregon)"
|
||||
us_gov_west_1: "AWS GovCloud (US)"
|
||||
eu_west_1: "EU (Ireland)"
|
||||
eu_west_2: "EU (London)"
|
||||
eu_central_1: "EU (Frankfurt)"
|
||||
ap_southeast_1: "Asia Pacific (Singapore)"
|
||||
ap_southeast_2: "Asia Pacific (Sydney)"
|
||||
ap_south_1: "Asia Pacific (Mumbai)"
|
||||
ap_northeast_1: "Asia Pacific (Tokyo)"
|
||||
ap_northeast_2: "Asia Pacific (Seoul)"
|
||||
sa_east_1: "South America (Sao Paulo)"
|
||||
ap_south_1: "Asia Pacific (Mumbai)"
|
||||
ap_southeast_1: "Asia Pacific (Singapore)"
|
||||
ap_southeast_2: "Asia Pacific (Sydney)"
|
||||
cn_north_1: "China (Beijing)"
|
||||
eu_central_1: "EU (Frankfurt)"
|
||||
eu_west_1: "EU (Ireland)"
|
||||
eu_west_2: "EU (London)"
|
||||
sa_east_1: "South America (Sao Paulo)"
|
||||
us_east_1: "US East (N. Virginia)"
|
||||
us_east_2: "US East (Ohio)"
|
||||
us_gov_west_1: "AWS GovCloud (US)"
|
||||
us_west_1: "US West (N. California)"
|
||||
us_west_2: "US West (Oregon)"
|
||||
|
||||
edit: 'edit the title and category of this topic'
|
||||
not_implemented: "That feature hasn't been implemented yet, sorry!"
|
||||
|
|
|
@ -12,10 +12,4 @@ describe S3RegionSiteSetting do
|
|||
end
|
||||
end
|
||||
|
||||
describe 'values' do
|
||||
it 'returns all the S3 regions' do
|
||||
expect(S3RegionSiteSetting.values.map {|x| x[:value]}.sort).to eq(['us-east-1', 'us-west-1', 'us-west-2', 'us-gov-west-1', 'eu-west-1', 'eu-west-2', 'eu-central-1', 'ap-southeast-1', 'ap-southeast-2', 'ap-south-1', 'ap-northeast-1', 'ap-northeast-2', 'sa-east-1', 'cn-north-1'].sort)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user