Permalink
Browse files

Replace validates_url_format_of with validates_formatting_of

The validates_url_format_of gem was poorly maintained. I know, because I
help maintain it. :P
  • Loading branch information...
1 parent e55be82 commit 06c8978f75f694bcce10e017b99f9d937f575800 @sferik sferik committed Nov 30, 2011
View
@@ -42,7 +42,7 @@ end
group :development, :test, :staging, :production do
gem 'delayed_job', '~> 3.0.0.pre'
gem 'delayed_job_active_record'
- gem 'validates_url_format_of'
+ gem 'validates_formatting_of', '>= 0.3.0'
end
group :test do
View
@@ -205,8 +205,8 @@ GEM
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.31)
- validates_url_format_of (0.2.0)
- activerecord (~> 3.0.10)
+ validates_formatting_of (0.3.0)
+ rails (>= 3.0.0)
webmock (1.7.8)
addressable (~> 2.2, > 2.2.5)
crack (>= 0.1.7)
@@ -262,7 +262,7 @@ DEPENDENCIES
sinatra
system_timer
timecop
- validates_url_format_of
+ validates_formatting_of (>= 0.3.0)
webmock
will_paginate
xml-simple
View
@@ -5,7 +5,7 @@ class Linkset < ActiveRecord::Base
LINKS = %w(home wiki docs mail code bugs).freeze
LINKS.each do |url|
- validates_url_format_of url, :allow_nil => true, :allow_blank => true
+ validates_formatting_of url.to_sym, :using => :url, :allow_nil => true, :allow_blank => true, :message => "does not appear to be a valid URL"
end
def empty?
View
@@ -4,7 +4,7 @@ class WebHook < ActiveRecord::Base
belongs_to :user
belongs_to :rubygem
- validates_url_format_of :url
+ validates_formatting_of :url, :using => :url, :message => "does not appear to be a valid URL"
validate :unique_hook, :on => :create
def self.global
Binary file not shown.
Binary file not shown.

0 comments on commit 06c8978

Please sign in to comment.