]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/client_application.rb
Fix some more rubocop style issues
[rails.git] / app / models / client_application.rb
index 84f5b978c180fd31ce246f7e5957df1ddf467724..e1358028d98ae6fe7197b922cc081194528e759c 100644 (file)
@@ -9,9 +9,9 @@ class ClientApplication < ActiveRecord::Base
 
   validates_presence_of :name, :url, :key, :secret
   validates_uniqueness_of :key
-  validates_format_of :url, :with => /\Ahttp(s?):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/i
-  validates_format_of :support_url, :with => /\Ahttp(s?):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/i, :allow_blank => true
-  validates_format_of :callback_url, :with => /\A[a-z][a-z0-9.+-]*:\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/i, :allow_blank => true
+  validates_format_of :url, :with => %r{\Ahttp(s?)://(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(/|/([\w#!:.?+=&%@!\-/]))?}i
+  validates_format_of :support_url, :with => %r{\Ahttp(s?)://(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(/|/([\w#!:.?+=&%@!\-/]))?}i, :allow_blank => true
+  validates_format_of :callback_url, :with => %r{\A[a-z][a-z0-9.+-]*://(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(/|/([\w#!:.?+=&%@!\-/]))?}i, :allow_blank => true
 
   before_validation :generate_keys, :on => :create