Browse Source

Change deprication message to present tense

pull/476/head
Julian Simioni 9 years ago
parent
commit
abbd314ee8
  1. 10
      sanitiser/_deprecate_quattroshapes.js
  2. 2
      test/ciao/reverse/sources_deprecation_warning.coffee
  3. 2
      test/ciao/search/sources_deprecation_warning.coffee
  4. 20
      test/unit/sanitiser/_deprecate_quattroshapes.js

10
sanitiser/_deprecate_quattroshapes.js

@ -22,11 +22,11 @@ function sanitize( raw, clean, opts ) {
// emit a warning message so users can transition.
messages.warnings.push('You are using Quattroshapes as a data source in this query. ' +
'Quattroshapes will be disabled as a data source for Mapzen Search in the next several ' +
'weeks, and is being replaced by Who\'s on First, an actively maintained data project ' +
'based on Quattroshapes. Your existing queries WILL CONTINUE TO WORK for the foreseeable ' +
'future, but results will be coming from Who\'s on First and `sources=quattroshapes` will ' +
'be deprecated. If you have any questions, please email search@mapzen.com.');
'Quattroshapes has been disabled as a data source for Mapzen Search, and has been' +
'replaced by Who\'s on First, an actively maintained data project based on Quattroshapes' +
'Your existing queries WILL CONTINUE TO WORK for the foreseeable future, but results will ' +
'be coming from Who\'s on First and `sources=quattroshapes` will be interpreted as ' +
'`sources=whosonfirst`. If you have any questions, please email search@mapzen.com.');
// user requested 'quattroshapes', we will give them 'whosonfirst' instead.
sources = _.without(sources, 'quattroshapes', 'qs');

2
test/ciao/reverse/sources_deprecation_warning.coffee

@ -27,7 +27,7 @@ should.not.exist json.geocoding.errors
#? expected warnings
should.exist json.geocoding.warnings
json.geocoding.warnings.should.eql [ 'You are using Quattroshapes as a data source in this query. Quattroshapes will be disabled as a data source for Mapzen Search in the next several weeks, and is being replaced by Who\'s on First, an actively maintained data project based on Quattroshapes. Your existing queries WILL CONTINUE TO WORK for the foreseeable future, but results will be coming from Who\'s on First and `sources=quattroshapes` will be deprecated. If you have any questions, please email search@mapzen.com.' ]
json.geocoding.warnings.should.eql ['You are using Quattroshapes as a data source in this query. Quattroshapes has been disabled as a data source for Mapzen Search, and has beenreplaced by Who\'s on First, an actively maintained data project based on QuattroshapesYour existing queries WILL CONTINUE TO WORK for the foreseeable future, but results will be coming from Who\'s on First and `sources=quattroshapes` will be interpreted as `sources=whosonfirst`. If you have any questions, please email search@mapzen.com.' ]
#? inputs
json.geocoding.query['size'].should.eql 10

2
test/ciao/search/sources_deprecation_warning.coffee

@ -27,7 +27,7 @@ should.not.exist json.geocoding.errors
#? expected warnings
should.exist json.geocoding.warnings
json.geocoding.warnings.should.eql [ 'You are using Quattroshapes as a data source in this query. Quattroshapes will be disabled as a data source for Mapzen Search in the next several weeks, and is being replaced by Who\'s on First, an actively maintained data project based on Quattroshapes. Your existing queries WILL CONTINUE TO WORK for the foreseeable future, but results will be coming from Who\'s on First and `sources=quattroshapes` will be deprecated. If you have any questions, please email search@mapzen.com.' ]
json.geocoding.warnings.should.eql ['You are using Quattroshapes as a data source in this query. Quattroshapes has been disabled as a data source for Mapzen Search, and has beenreplaced by Who\'s on First, an actively maintained data project based on QuattroshapesYour existing queries WILL CONTINUE TO WORK for the foreseeable future, but results will be coming from Who\'s on First and `sources=quattroshapes` will be interpreted as `sources=whosonfirst`. If you have any questions, please email search@mapzen.com.' ]
#? inputs
json.geocoding.query['size'].should.eql 10

20
test/unit/sanitiser/_deprecate_quattroshapes.js

@ -11,11 +11,11 @@ module.exports.tests.warning_message_1 = function(test, common) {
t.deepEquals(messages, {
errors: [],
warnings: ['You are using Quattroshapes as a data source in this query. ' +
'Quattroshapes will be disabled as a data source for Mapzen Search in the next several ' +
'weeks, and is being replaced by Who\'s on First, an actively maintained data project ' +
'based on Quattroshapes. Your existing queries WILL CONTINUE TO WORK for the foreseeable ' +
'future, but results will be coming from Who\'s on First and `sources=quattroshapes` will ' +
'be deprecated. If you have any questions, please email search@mapzen.com.']
'Quattroshapes has been disabled as a data source for Mapzen Search, and has been' +
'replaced by Who\'s on First, an actively maintained data project based on Quattroshapes' +
'Your existing queries WILL CONTINUE TO WORK for the foreseeable future, but results will ' +
'be coming from Who\'s on First and `sources=quattroshapes` will be interpreted as ' +
'`sources=whosonfirst`. If you have any questions, please email search@mapzen.com.']
}, 'warning emitted');
t.end();
@ -31,11 +31,11 @@ module.exports.tests.warning_message_2 = function(test, common) {
t.deepEquals(messages, {
errors: [],
warnings: ['You are using Quattroshapes as a data source in this query. ' +
'Quattroshapes will be disabled as a data source for Mapzen Search in the next several ' +
'weeks, and is being replaced by Who\'s on First, an actively maintained data project ' +
'based on Quattroshapes. Your existing queries WILL CONTINUE TO WORK for the foreseeable ' +
'future, but results will be coming from Who\'s on First and `sources=quattroshapes` will ' +
'be deprecated. If you have any questions, please email search@mapzen.com.']
'Quattroshapes has been disabled as a data source for Mapzen Search, and has been' +
'replaced by Who\'s on First, an actively maintained data project based on Quattroshapes' +
'Your existing queries WILL CONTINUE TO WORK for the foreseeable future, but results will ' +
'be coming from Who\'s on First and `sources=quattroshapes` will be interpreted as ' +
'`sources=whosonfirst`. If you have any questions, please email search@mapzen.com.']
}, 'warning emitted');
t.end();

Loading…
Cancel
Save