Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 06c8978f75f694bcce10e017b99f9d937f575800 1 parent e55be82
@sferik sferik authored
View
2  Gemfile
@@ -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
6 Gemfile.lock
@@ -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
2  app/models/linkset.rb
@@ -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
2  app/models/web_hook.rb
@@ -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
View
BIN  vendor/cache/validates_formatting_of-0.3.0.gem
Binary file not shown
View
BIN  vendor/cache/validates_url_format_of-0.2.0.gem
Binary file not shown

0 comments on commit 06c8978

Please sign in to comment.
Something went wrong with that request. Please try again.