snatch 0.0.9 → 0.0.10

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.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/snatch/clean.rb +4 -5
  3. data/snatch.gemspec +1 -1
  4. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.9
1
+ 0.0.10
data/lib/snatch/clean.rb CHANGED
@@ -19,16 +19,15 @@ class Snatch
19
19
  instance
20
20
  end
21
21
 
22
- # Loop through each link with a stylesheet rel attribute and remove
23
- # dynamic PHP hrefs, replacing with plain CSS paths.
24
- #
25
- # Returns link tags
26
22
  def process
27
23
  @doc.css('link[rel=stylesheet]').each do |stylesheet_node|
28
24
  stylesheet_node['href'] = rewrite_href(stylesheet_node['href'])
29
25
  end
30
26
 
31
- return unless @css_path
27
+ @doc.css('a[href]').each do |anchor|
28
+ anchor['href'].sub!(%r{\.html?$}, '')
29
+ end
30
+
32
31
  File.open(@file_name, 'w') { |f| f.write @doc.to_html }
33
32
  end
34
33
 
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 = "0.0.9"
8
+ s.version = "0.0.10"
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"]
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: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Conroy-Finn