wriggler 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wriggler/version.rb +1 -1
- data/lib/wriggler.rb +4 -16
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2823a8e9a91f254416c99185884e6838484cc57d
|
4
|
+
data.tar.gz: ff38d11953dd5cc5488480473e3fb8e38b452806
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7dffbfdf59ce0be83f1efb3c0617c19a7a24a3cac20ecde0fbba023bd01a329675a6125af9efb36d8a4892afef752871b804d80a1b0d1f64bb0791d685858dac
|
7
|
+
data.tar.gz: d035a85584525eb15c591751894ed8a4a946d95f1ea45f94d3679e3e9f4f26f3f690a7b926ad2f0f4038cc4663c275aaaf62f541a13ce3420ad150c94095b998
|
data/lib/wriggler/version.rb
CHANGED
data/lib/wriggler.rb
CHANGED
@@ -13,30 +13,18 @@ module Wriggler
|
|
13
13
|
@content
|
14
14
|
end
|
15
15
|
|
16
|
-
private
|
17
|
-
|
18
16
|
def self.navigate_directory
|
19
17
|
#Set the cwd to the given dir send to gather all nested files from there
|
20
18
|
Dir.chdir(@directory)
|
21
|
-
|
19
|
+
gather_files
|
22
20
|
end
|
23
21
|
|
24
22
|
def self.gather_files
|
25
23
|
#Gathers all of the HTML or XML files from this and all subdirectories into an array
|
26
|
-
file_array = []
|
27
24
|
Find.find(@directory) do |file|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
puts "Files Found: #{file_array.length}"
|
32
|
-
puts "==============="
|
33
|
-
file_array
|
34
|
-
end
|
35
|
-
|
36
|
-
def self.open_files(file_array)
|
37
|
-
#Opens all the files in the file_array
|
38
|
-
file_array.each do |file|
|
39
|
-
open_next_file(file)
|
25
|
+
if is_XML?(file) || is_HTML?(file)
|
26
|
+
open_next_file(file)
|
27
|
+
end
|
40
28
|
end
|
41
29
|
end
|
42
30
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wriggler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elliott Young
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -135,3 +135,4 @@ specification_version: 4
|
|
135
135
|
summary: A Gem designed to crawl through a local directory of HTML/XML files and pull
|
136
136
|
out content based on pre-specified tag
|
137
137
|
test_files: []
|
138
|
+
has_rdoc:
|