Commit 0abc9025 authored by James Lopez's avatar James Lopez

Merge branch 'countries_option' into 'master'

Back port changes for country list Api

See merge request gitlab-org/gitlab-ce!32688
parents 3ffdae92 54b51d95
...@@ -447,3 +447,6 @@ gem 'unleash', '~> 0.1.5' ...@@ -447,3 +447,6 @@ gem 'unleash', '~> 0.1.5'
# Structured logging # Structured logging
gem 'lograge', '~> 0.5' gem 'lograge', '~> 0.5'
gem 'grape_logging', '~> 1.7' gem 'grape_logging', '~> 1.7'
# Countries list
gem 'countries', '~> 3.0'
...@@ -159,6 +159,10 @@ GEM ...@@ -159,6 +159,10 @@ GEM
contracts (0.11.0) contracts (0.11.0)
cork (0.3.0) cork (0.3.0)
colored2 (~> 3.1) colored2 (~> 3.1)
countries (3.0.0)
i18n_data (~> 0.8.0)
sixarm_ruby_unaccent (~> 1.1)
unicode_utils (~> 1.4)
crack (0.4.3) crack (0.4.3)
safe_yaml (~> 1.0.0) safe_yaml (~> 1.0.0)
crass (1.0.4) crass (1.0.4)
...@@ -458,6 +462,7 @@ GEM ...@@ -458,6 +462,7 @@ GEM
httpclient (2.8.3) httpclient (2.8.3)
i18n (1.6.0) i18n (1.6.0)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
i18n_data (0.8.0)
icalendar (2.4.1) icalendar (2.4.1)
ice_nine (0.11.2) ice_nine (0.11.2)
influxdb (0.2.3) influxdb (0.2.3)
...@@ -924,6 +929,7 @@ GEM ...@@ -924,6 +929,7 @@ GEM
json (>= 1.8, < 3) json (>= 1.8, < 3)
simplecov-html (~> 0.10.0) simplecov-html (~> 0.10.0)
simplecov-html (0.10.2) simplecov-html (0.10.2)
sixarm_ruby_unaccent (1.2.0)
slack-notifier (1.5.1) slack-notifier (1.5.1)
snowplow-tracker (0.6.1) snowplow-tracker (0.6.1)
contracts (~> 0.7, <= 0.11) contracts (~> 0.7, <= 0.11)
...@@ -988,6 +994,7 @@ GEM ...@@ -988,6 +994,7 @@ GEM
unf_ext unf_ext
unf_ext (0.0.7.5) unf_ext (0.0.7.5)
unicode-display_width (1.6.0) unicode-display_width (1.6.0)
unicode_utils (1.4.0)
unicorn (5.4.1) unicorn (5.4.1)
kgio (~> 2.6) kgio (~> 2.6)
raindrops (~> 0.7) raindrops (~> 0.7)
...@@ -1086,6 +1093,7 @@ DEPENDENCIES ...@@ -1086,6 +1093,7 @@ DEPENDENCIES
commonmarker (~> 0.17) commonmarker (~> 0.17)
concurrent-ruby (~> 1.1) concurrent-ruby (~> 1.1)
connection_pool (~> 2.0) connection_pool (~> 2.0)
countries (~> 3.0)
creole (~> 0.5.0) creole (~> 0.5.0)
danger (~> 6.0) danger (~> 6.0)
database_cleaner (~> 1.7.0) database_cleaner (~> 1.7.0)
......
...@@ -613,3 +613,10 @@ ...@@ -613,3 +613,10 @@
:why: https://bitbucket.org/atlassian/atlassian-jwt-ruby/src/master/LICENSE.txt :why: https://bitbucket.org/atlassian/atlassian-jwt-ruby/src/master/LICENSE.txt
:versions: [] :versions: []
:when: 2019-08-30 05:45:35.317663000 Z :when: 2019-08-30 05:45:35.317663000 Z
- - :license
- unicode_utils
- MIT
- :who: Aishwarya Subramanain
:why: https://github.com/hexorx/countries/blob/master/LICENSE
:versions: []
:when: 2019-09-11 13:08:28.431132000 Z
# frozen_string_literal: true
ISO3166.configure do |config|
config.locales = [:en]
end
# GitLab permits users to sign up in Ukraine except the Crimean Region: https://about.gitlab.com/handbook/people-operations/code-of-conduct/#trade-compliance-exportimport-control
# This overrides the display name for Ukraine to Ukraine (except Crimean Region)
# To be removed after https://gitlab.com/gitlab-org/gitlab-ee/issues/14784 is implemented
# Data fetched is based on https://github.com/hexorx/countries/blob/master/lib/countries/data/countries/UA.yaml
ISO3166::Data.register(
continent: "Europe",
address_format: "|-
{{recipient}}
{{street}}
{{city}} {{region_short}}
{{postalcode}}
{{country}}",
alpha2: "UA",
alpha3: "UKR",
country_code: '380',
international_prefix: '810',
ioc: "UKR",
gec: "UP",
name: "Ukraine (except Crimean Region)",
national_destination_code_lengths: [2],
national_number_lengths: [8, 9],
national_prefix: '8',
number: '804',
region: "Europe",
subregion: "Eastern Europe",
world_region: "EMEA",
un_locode: "UA",
nationality: "Ukrainian",
vat_rates: {
standard: 20
},
reduced: [7],
super_reduced: {
parking: { postal_code: true }
},
unofficial_names: %w(Ukraine Ucrania ウクライナ Oekraïne Украина Україна Украіна),
languages_official: ["uk"],
languages_spoken: ["uk"],
geo: {
latitude: 48.379433,
latitude_dec: '48.92656326293945',
longitude: 31.16558,
longitude_dec: '31.47578239440918',
max_latitude: 52.37958099999999,
max_longitude: 40.2285809,
min_latitude: 44.2924,
min_longitude: 22.137159,
bounds: {
northeast: { lat: 52.37958099999999, lng: 40.2285809 },
southwest: { lat: 44.2924, lng: 22.137159 }
}
},
currency_code: "UAH",
start_of_week: "monday"
)
...@@ -112,6 +112,7 @@ Rails.application.routes.draw do ...@@ -112,6 +112,7 @@ Rails.application.routes.draw do
draw :jira_connect draw :jira_connect
draw :username draw :username
draw :trial_registration draw :trial_registration
draw :country
end end
Gitlab.ee do Gitlab.ee do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment