From c935cf296d1ad13da757f90e27381761937415e2 Mon Sep 17 00:00:00 2001 From: Ben Bruscella Date: Fri, 26 Feb 2016 10:20:56 +1100 Subject: [PATCH 1/3] added name for other 2 GB countries Scotland and Wales --- data/scotland.json | 2 +- data/wales.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data/scotland.json b/data/scotland.json index f931d2a..56442cc 100644 --- a/data/scotland.json +++ b/data/scotland.json @@ -1 +1 @@ -{"flag":"","geoJSON":{},"ISO":{"alpha2":"GB","alpha3":"GBR"},"provinces":["Aberdeen City","Aberdeenshire","Angus","Argyll and Bute","City of Edinburgh","Clackmannanshire","Dumfries and Galloway","Dundee City","East Ayrshire","East Dunbartonshire","East Lothian","East Renfrewshire","Eilean Siar (Western Isles)","Falkirk","Fife","Glasgow City","Highland","Inverclyde","Midlothian","Moray","North Ayrshire","North Lanarkshire","Orkney Islands","Perth and Kinross","Renfrewshire","Shetland Islands","South Ayrshire","South Lanarkshire","Stirling","The Scottish Borders","West Dunbartonshire","West Lothian"],"tld":[],"wiki":"http://en.wikipedia.org/wiki/scotland"} +{"name":"Scotland", "flag":"","geoJSON":{},"ISO":{"alpha2":"GB","alpha3":"GBR"},"provinces":["Aberdeen City","Aberdeenshire","Angus","Argyll and Bute","City of Edinburgh","Clackmannanshire","Dumfries and Galloway","Dundee City","East Ayrshire","East Dunbartonshire","East Lothian","East Renfrewshire","Eilean Siar (Western Isles)","Falkirk","Fife","Glasgow City","Highland","Inverclyde","Midlothian","Moray","North Ayrshire","North Lanarkshire","Orkney Islands","Perth and Kinross","Renfrewshire","Shetland Islands","South Ayrshire","South Lanarkshire","Stirling","The Scottish Borders","West Dunbartonshire","West Lothian"],"tld":[],"wiki":"http://en.wikipedia.org/wiki/scotland"} diff --git a/data/wales.json b/data/wales.json index b2e9336..af45fdc 100644 --- a/data/wales.json +++ b/data/wales.json @@ -1 +1 @@ -{"flag":"","geoJSON":{},"ISO":{"alpha2":"GB","alpha3":"GBR"},"provinces":["Blaenau Gwent","Bridgend","Caerphilly","Cardiff","Carmarthenshire","Ceredigion","Conwy","Denbighshire","Flintshire","Gwynedd","Isle of Anglesey","Merthyr Tydfil","Monmouthshire","Neath Port Talbot","Newport","Pembrokeshire","Powys","Rhondda Cynon Taff","Swansea","The Vale of Glamorgan","Torfaen","Wrexham"],"tld":[],"wiki":"http://en.wikipedia.org/wiki/wales"} +{"name":"Wales", "flag":"","geoJSON":{},"ISO":{"alpha2":"GB","alpha3":"GBR"},"provinces":["Blaenau Gwent","Bridgend","Caerphilly","Cardiff","Carmarthenshire","Ceredigion","Conwy","Denbighshire","Flintshire","Gwynedd","Isle of Anglesey","Merthyr Tydfil","Monmouthshire","Neath Port Talbot","Newport","Pembrokeshire","Powys","Rhondda Cynon Taff","Swansea","The Vale of Glamorgan","Torfaen","Wrexham"],"tld":[],"wiki":"http://en.wikipedia.org/wiki/wales"} From e07d6c659761ce1f3f77d3a2c34a20b0266e8253 Mon Sep 17 00:00:00 2001 From: Ben Bruscella Date: Fri, 26 Feb 2016 11:24:00 +1100 Subject: [PATCH 2/3] tests for GB countries by name --- test/countryjs.test.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/countryjs.test.js b/test/countryjs.test.js index 1a33120..626aed5 100644 --- a/test/countryjs.test.js +++ b/test/countryjs.test.js @@ -191,6 +191,24 @@ describe('countryjs', function () { expect(tester).to.be.a('string') done() }) + it('should get info for United Kingdom in GB', function (done) { + var tester = country.info('United Kingdom', 'name') + expect(tester).to.be.a('object') + expect(tester.name).to.equal('United Kingdom') + done() + }) + it('should get info for Scotland in GB', function (done) { + var tester = country.info('Scotland', 'name') + expect(tester).to.be.a('object') + expect(tester.name).to.equal('Scotland') + done() + }) + it('should get info for Wales in GB', function (done) { + var tester = country.info('Wales', 'name') + expect(tester).to.be.a('object') + expect(tester.name).to.equal('Wales') + done() + }) it('should undefined for a mismatched country identifier', function (done) { var tester = country.info('UX') expect(tester).to.be.an('undefined') From 600b61b56534687773edcc86997e90f90fbf5fac Mon Sep 17 00:00:00 2001 From: Ben Bruscella Date: Fri, 14 Oct 2016 12:34:57 +1100 Subject: [PATCH 3/3] fork for yarn test --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8f11281..03717f0 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "countryjs", + "name": "countryjs-progressclaim-fork", "version": "1.5.2", "description": "A utility library for returning country data, ISO info and states/provinces within them.", "main": "index.js", @@ -11,7 +11,7 @@ "Michael Scott Hertzberg [@moimikey] (http://michael.hertzberg.co)", "Loris Guignard [@loris]" ], - "repository": "therebelrobot/countryjs", + "repository": "progressclaim/countryjs", "engines": [ "node" ],