snatch 1.0.11 → 1.0.12

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.11
1
+ 1.0.12
@@ -7,7 +7,7 @@ class Snatch
7
7
  # end
8
8
 
9
9
  def append_index_html(a)
10
- unless File.extname(a['href']).include?('.')
10
+ unless File.extname(a['href']).include?('.') || a['href'].match(%r{login$})
11
11
  a['href'] = a['href'].sub(%r{/?$}, '') + '/index.html'
12
12
  end
13
13
  end
data/snatch.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{snatch}
8
- s.version = "1.0.11"
8
+ s.version = "1.0.12"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["James Conroy-Finn"]
@@ -84,6 +84,11 @@ describe Snatch::Clean::HTML do
84
84
  node.should have_href('/folder/index.html')
85
85
  end
86
86
 
87
+ it 'should not append index.html to a login link' do
88
+ node = fix_node(:append_index_html, '<a href="/login"></a>')
89
+ node.should have_href('/login')
90
+ end
91
+
87
92
  it 'with an extension' do
88
93
  node = fix_node(:append_index_html, '<a href="folder/file.txt"></a>"')
89
94
  node.should have_href('folder/file.txt')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snatch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.11
4
+ version: 1.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Conroy-Finn