snatch 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/snatch/clean.rb +1 -1
- data/lib/snatch.rb +5 -5
- data/snatch.gemspec +2 -2
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.9
|
data/lib/snatch/clean.rb
CHANGED
@@ -7,7 +7,7 @@ class Snatch
|
|
7
7
|
def initialize(file_name, working_directory = nil)
|
8
8
|
@file_name = file_name
|
9
9
|
@working_directory = working_directory || Snatch::PUBLIC_PATH
|
10
|
-
@doc = Nokogiri::
|
10
|
+
@doc = Nokogiri::XML(File.open(@file_name, 'r'))
|
11
11
|
end
|
12
12
|
|
13
13
|
# Convenience method for creating Snatch::Clean with HTML.
|
data/lib/snatch.rb
CHANGED
@@ -36,11 +36,11 @@ class Snatch
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def self.clean
|
39
|
-
new.send(:
|
39
|
+
new.send(:process_lame_cms_files)
|
40
40
|
end
|
41
41
|
|
42
42
|
def clean
|
43
|
-
|
43
|
+
process_lame_cms_files
|
44
44
|
end
|
45
45
|
|
46
46
|
def self.push
|
@@ -65,7 +65,7 @@ class Snatch
|
|
65
65
|
puts "#{bang} #{message[0..50]}..."
|
66
66
|
end
|
67
67
|
|
68
|
-
def
|
68
|
+
def _wget(arguments = nil)
|
69
69
|
log "wget #{arguments}"
|
70
70
|
%x{wget #{arguments}}
|
71
71
|
end
|
@@ -87,10 +87,10 @@ class Snatch
|
|
87
87
|
|
88
88
|
def download_files
|
89
89
|
puts "Downloading #{@url.quote}"
|
90
|
-
|
90
|
+
_wget "-P #{PUBLIC_PATH} -nH -rkq #{@url.quote}"
|
91
91
|
end
|
92
92
|
|
93
|
-
def
|
93
|
+
def process_lame_cms_files
|
94
94
|
Dir.glob("#{PUBLIC_PATH}/**/*.html").each do |file|
|
95
95
|
Clean.process(file, File.dirname(file))
|
96
96
|
end
|
data/snatch.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{snatch}
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.9"
|
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"]
|
12
|
-
s.date = %q{2010-02-
|
12
|
+
s.date = %q{2010-02-10}
|
13
13
|
s.description = %q{Simple site downloaded that wraps wget and converts PHP CSS files in to regular CSS files.}
|
14
14
|
s.email = %q{james@logi.cl}
|
15
15
|
s.extra_rdoc_files = [
|
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.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Conroy-Finn
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-02-
|
12
|
+
date: 2010-02-10 00:00:00 +00:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|