]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/2175'
authorTom Hughes <tom@compton.nu>
Tue, 26 Mar 2019 19:14:04 +0000 (19:14 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 26 Mar 2019 19:14:04 +0000 (19:14 +0000)
1  2 
.travis.yml
INSTALL.md
app/controllers/geocoder_controller.rb
test/controllers/api/changesets_controller_test.rb

diff --cc .travis.yml
Simple merge
diff --cc INSTALL.md
Simple merge
index a877fc0926d575c56c9d6bed892447bd8f324602,d9b56147f46a6a1a2f82e3154fbdf04d278836e3..4a8f7765065ab11c7f6db3caa668f37826f2fc4e
@@@ -15,13 -15,13 +15,13 @@@ class GeocoderController < ApplicationC
      if @params[:lat] && @params[:lon]
        @sources.push "latlon"
        @sources.push "osm_nominatim_reverse"
 -      @sources.push "geonames_reverse" if defined?(GEONAMES_USERNAME)
 +      @sources.push "geonames_reverse" if Settings.key?(:geonames_username)
      elsif @params[:query]
-       if @params[:query] =~ /^\d{5}(-\d{4})?$/
+       if @params[:query].match?(/^\d{5}(-\d{4})?$/)
          @sources.push "osm_nominatim"
-       elsif @params[:query] =~ /^(GIR 0AA|[A-PR-UWYZ]([0-9]{1,2}|([A-HK-Y][0-9]|[A-HK-Y][0-9]([0-9]|[ABEHMNPRV-Y]))|[0-9][A-HJKS-UW])\s*[0-9][ABD-HJLNP-UW-Z]{2})$/i
+       elsif @params[:query].match?(/^(GIR 0AA|[A-PR-UWYZ]([0-9]{1,2}|([A-HK-Y][0-9]|[A-HK-Y][0-9]([0-9]|[ABEHMNPRV-Y]))|[0-9][A-HJKS-UW])\s*[0-9][ABD-HJLNP-UW-Z]{2})$/i)
          @sources.push "osm_nominatim"
-       elsif @params[:query] =~ /^[A-Z]\d[A-Z]\s*\d[A-Z]\d$/i
+       elsif @params[:query].match?(/^[A-Z]\d[A-Z]\s*\d[A-Z]\d$/i)
          @sources.push "ca_postcode"
          @sources.push "osm_nominatim"
        else