acts_as_link 0.0.3 → 0.0.4

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.
@@ -9,7 +9,7 @@ class Link
9
9
 
10
10
  def initialize(url)
11
11
  @uri = URI.parse(url)
12
- raise 'Link is not an url' if @uri.class != URI::HTTP
12
+ raise 'Link is not an url' if (@uri.class != URI::HTTP && @uri.class != URI::HTTPS)
13
13
  end
14
14
 
15
15
  def is_broken?
@@ -9,6 +9,11 @@ describe Link do
9
9
  link.instance_variable_get('@uri').should_not be_nil
10
10
  end
11
11
 
12
+ it 'should initialize with uri variable defined when link has https' do
13
+ link = Link.new('https://rubygems.org/gems/acts_as_link')
14
+ link.instance_variable_get('@uri').should_not be_nil
15
+ end
16
+
12
17
  it 'should return an exception when try to initialize with an empty string' do
13
18
  lambda{Link.new('')}.should raise_error(RuntimeError,/Link is not an url/)
14
19
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_link
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Fabr\xC3\xADcio Ferrari de Campos"
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-13 00:00:00 -02:00
18
+ date: 2011-02-15 00:00:00 -02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency