Permalink
Browse files

Version up. Rails 4 ready.

  • Loading branch information...
1 parent 6b9ac04 commit 051b26cf71aa094f3f85b32afb4a8d979ffbd11d @xuanxu xuanxu committed May 2, 2013
Showing with 76 additions and 75 deletions.
  1. +4 −0 CHANGELOG.rdoc
  2. +60 −65 Gemfile.lock
  3. +8 −8 README.rdoc
  4. +1 −1 lib/rails_autolink.rb
  5. +3 −1 rails_autolink.gemspec
View
@@ -1,3 +1,7 @@
+=== 1.1.0 / 2013-05-02
+
+* Ready for Rails 4.
+
=== 1.0.7 / 2012-04-27
* Added support for non-latin characters in autolinked urls
View
@@ -1,83 +1,78 @@
GEM
- remote: http://rubygems.org/
+ remote: https://rubygems.org/
specs:
- actionmailer (3.2.7)
- actionpack (= 3.2.7)
- mail (~> 2.4.4)
- actionpack (3.2.7)
- activemodel (= 3.2.7)
- activesupport (= 3.2.7)
- builder (~> 3.0.0)
+ actionmailer (4.0.0.rc1)
+ actionpack (= 4.0.0.rc1)
+ mail (~> 2.5.3)
+ actionpack (4.0.0.rc1)
+ activesupport (= 4.0.0.rc1)
+ builder (~> 3.1.0)
erubis (~> 2.7.0)
- journey (~> 1.0.4)
- rack (~> 1.4.0)
- rack-cache (~> 1.2)
- rack-test (~> 0.6.1)
- sprockets (~> 2.1.3)
- activemodel (3.2.7)
- activesupport (= 3.2.7)
- builder (~> 3.0.0)
- activerecord (3.2.7)
- activemodel (= 3.2.7)
- activesupport (= 3.2.7)
- arel (~> 3.0.2)
- tzinfo (~> 0.3.29)
- activeresource (3.2.7)
- activemodel (= 3.2.7)
- activesupport (= 3.2.7)
- activesupport (3.2.7)
- i18n (~> 0.6)
- multi_json (~> 1.0)
- arel (3.0.2)
- builder (3.0.0)
+ rack (~> 1.5.2)
+ rack-test (~> 0.6.2)
+ activemodel (4.0.0.rc1)
+ activesupport (= 4.0.0.rc1)
+ builder (~> 3.1.0)
+ activerecord (4.0.0.rc1)
+ activemodel (= 4.0.0.rc1)
+ activerecord-deprecated_finders (~> 1.0.2)
+ activesupport (= 4.0.0.rc1)
+ arel (~> 4.0.0)
+ activerecord-deprecated_finders (1.0.2)
+ activesupport (4.0.0.rc1)
+ i18n (~> 0.6, >= 0.6.4)
+ minitest (~> 4.2)
+ multi_json (~> 1.3)
+ thread_safe (~> 0.1)
+ tzinfo (~> 0.3.37)
+ arel (4.0.0)
+ atomic (1.1.8)
+ builder (3.1.4)
erubis (2.7.0)
- hike (1.2.1)
- i18n (0.6.0)
- journey (1.0.4)
- json (1.7.4)
- mail (2.4.4)
+ hike (1.2.2)
+ i18n (0.6.4)
+ mail (2.5.3)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
- mime-types (1.19)
- minitest (3.3.0)
- multi_json (1.3.6)
+ mime-types (1.23)
+ minitest (4.7.4)
+ multi_json (1.7.2)
polyglot (0.3.3)
- rack (1.4.1)
- rack-cache (1.2)
- rack (>= 0.4)
- rack-ssl (1.3.2)
- rack
- rack-test (0.6.1)
+ rack (1.5.2)
+ rack-test (0.6.2)
rack (>= 1.0)
- rails (3.2.7)
- actionmailer (= 3.2.7)
- actionpack (= 3.2.7)
- activerecord (= 3.2.7)
- activeresource (= 3.2.7)
- activesupport (= 3.2.7)
- bundler (~> 1.0)
- railties (= 3.2.7)
- railties (3.2.7)
- actionpack (= 3.2.7)
- activesupport (= 3.2.7)
- rack-ssl (~> 1.3.2)
+ rails (4.0.0.rc1)
+ actionmailer (= 4.0.0.rc1)
+ actionpack (= 4.0.0.rc1)
+ activerecord (= 4.0.0.rc1)
+ activesupport (= 4.0.0.rc1)
+ bundler (>= 1.3.0, < 2.0)
+ railties (= 4.0.0.rc1)
+ sprockets-rails (~> 2.0.0.rc4)
+ railties (4.0.0.rc1)
+ actionpack (= 4.0.0.rc1)
+ activesupport (= 4.0.0.rc1)
rake (>= 0.8.7)
- rdoc (~> 3.4)
- thor (>= 0.14.6, < 2.0)
- rake (0.9.2.2)
- rdoc (3.12)
- json (~> 1.4)
- sprockets (2.1.3)
+ thor (>= 0.18.1, < 2.0)
+ rake (10.0.4)
+ sprockets (2.9.3)
hike (~> 1.2)
+ multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
- thor (0.15.4)
- tilt (1.3.3)
- treetop (1.4.10)
+ sprockets-rails (2.0.0.rc4)
+ actionpack (>= 3.0)
+ activesupport (>= 3.0)
+ sprockets (~> 2.8)
+ thor (0.18.1)
+ thread_safe (0.1.0)
+ atomic
+ tilt (1.4.0)
+ treetop (1.4.12)
polyglot
polyglot (>= 0.3.1)
- tzinfo (0.3.33)
+ tzinfo (0.3.37)
PLATFORMS
ruby
View
@@ -10,8 +10,8 @@ bridge the gap for people migrating.
== FEATURES:
-By default auto_link returns sanitized html_safe strings.
-This behaviour can be overriden setting the <tt>:sanitize</tt> option to false
+By default auto_link returns sanitized html_safe strings.
+This behaviour can be overriden setting the <tt>:sanitize</tt> option to false
(thus making it insecure if you don't have the content under control).
== SYNOPSIS:
@@ -21,20 +21,20 @@ This behaviour can be overriden setting the <tt>:sanitize</tt> option to false
auto_link("Go to http://www.rubyonrails.org and say hello to david@loudthinking.com")
# => "Go to <a href=\"http://www.rubyonrails.org\">http://www.rubyonrails.org</a> and
# say hello to <a href=\"mailto:david@loudthinking.com\">david@loudthinking.com</a>"
-
+
auto_link("Visit http://www.loudthinking.com/ or e-mail david@loudthinking.com", :link => :urls)
# => "Visit <a href=\"http://www.loudthinking.com/\">http://www.loudthinking.com/</a>
# or e-mail david@loudthinking.com"
-
+
auto_link("Visit http://www.loudthinking.com/ or e-mail david@loudthinking.com", :link => :email_addresses)
# => "Visit http://www.loudthinking.com/ or e-mail <a href=\"mailto:david@loudthinking.com\">david@loudthinking.com</a>"
-
+
auto_link("Go to http://www.rubyonrails.org <script>Malicious code!</script>")
# => "Go to <a href=\"http://www.rubyonrails.org\">http://www.rubyonrails.org</a> "
-
+
auto_link("Go to http://www.rubyonrails.org <script>alert('Script!')</script>", :sanitize => false)
# => "Go to <a href=\"http://www.rubyonrails.org\">http://www.rubyonrails.org</a> <script>alert('Script!')</script>"
-
+
post_body = "Welcome to my new blog at http://www.myblog.com/. Please e-mail me at me@email.com."
auto_link(post_body, :html => { :target => '_blank' }) do |text|
truncate(text, :length => 15)
@@ -43,7 +43,7 @@ This behaviour can be overriden setting the <tt>:sanitize</tt> option to false
== REQUIREMENTS:
-* rails ~> 3.1
+* rails > 3.1
== INSTALL:
View
@@ -1,5 +1,5 @@
module RailsAutolink
- VERSION = '1.0.9'
+ VERSION = '1.1.0'
class Railtie < ::Rails::Railtie
initializer 'rails_autolink' do |app|
View
@@ -1,8 +1,10 @@
Gem::Specification.new do |s|
s.name = 'rails_autolink'
- s.version = '1.0.10'
+ s.version = '1.1.0'
s.authors = ['Aaron Patterson', 'Juanjo Bazan', 'Akira Matsuda']
s.email = 'aaron@tenderlovemaking.com'
+ s.homepage = 'https://github.com/tenderlove/rails_autolink'
+ s.summary = 'Automatic generation of html links in texts'
s.summary = 'This is an extraction of the `auto_link` method from rails. The `auto_link` method was removed from Rails in version Rails 3.1. This gem is meant to bridge the gap for people migrating.'
s.add_dependency 'rails', '> 3.1'

1 comment on commit 051b26c

Literally just went to check this. Awesome. 👍

Please sign in to comment.