smartlinks 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,9 @@
1
1
  module Smartlinks
2
2
 
3
3
  def self.linkify(text, attrs={})
4
+ # Ensure text is not nil
5
+ return nil unless text
6
+
4
7
  linkificator = Linkificator.new text, attrs
5
8
 
6
9
  # NOTE: Order matters!
@@ -1,3 +1,3 @@
1
1
  module Smartlinks
2
- VERSION = "0.1.0"
3
- end
2
+ VERSION = "0.1.1"
3
+ end
@@ -2,6 +2,11 @@ require 'spec_helper'
2
2
 
3
3
  describe Smartlinks do
4
4
 
5
+ it "returns nil if input text it is nil" do
6
+ text = nil
7
+ Smartlinks.linkify(text).should eql(text)
8
+ end
9
+
5
10
  it "modifies http url" do
6
11
  text, result = data "http"
7
12
  Smartlinks.linkify(text).should eql(result)
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartlinks
3
3
  version: !ruby/object:Gem::Version
4
+ version: 0.1.1
4
5
  prerelease:
5
- version: 0.1.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Vasilij Melnychuck
@@ -10,19 +10,19 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-02-16 00:00:00.000000000 Z
13
+ date: 2013-02-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- prerelease: false
17
- type: :development
18
16
  name: rspec
19
- version_requirements: !ruby/object:Gem::Requirement
17
+ requirement: !ruby/object:Gem::Requirement
20
18
  none: false
21
19
  requirements:
22
20
  - - ! '>='
23
21
  - !ruby/object:Gem::Version
24
22
  version: '0'
25
- requirement: !ruby/object:Gem::Requirement
23
+ type: :development
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
26
  none: false
27
27
  requirements:
28
28
  - - ! '>='