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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a0bec94fbdd0a26ab8850e55099a46cee2a7a7a3
4
- data.tar.gz: a3213bec797d9e3b9f6de806289f2f6e3008a36e
3
+ metadata.gz: 2823a8e9a91f254416c99185884e6838484cc57d
4
+ data.tar.gz: ff38d11953dd5cc5488480473e3fb8e38b452806
5
5
  SHA512:
6
- metadata.gz: 4dafba93323d6f876b9b80dcc103c908df0d8b87ca0bd40d3c7209d2dfb81d852d039f546976fe2cc2e23168a7ab87fc2c2511a6c179b83dbc1f7b39ad8f6589
7
- data.tar.gz: 03f53045bc46845145ddc0642e3d76f3df98ed33d9a0d5ca8c4b76337ccef52d78c2e3ab69058517005ddb5d2a7ca8f9a02129f617be1f7dc759d93799e4f93d
6
+ metadata.gz: 7dffbfdf59ce0be83f1efb3c0617c19a7a24a3cac20ecde0fbba023bd01a329675a6125af9efb36d8a4892afef752871b804d80a1b0d1f64bb0791d685858dac
7
+ data.tar.gz: d035a85584525eb15c591751894ed8a4a946d95f1ea45f94d3679e3e9f4f26f3f690a7b926ad2f0f4038cc4663c275aaaf62f541a13ce3420ad150c94095b998
@@ -1,3 +1,3 @@
1
1
  module Wriggler
2
- VERSION = "1.1.0"
2
+ VERSION = "1.2.0"
3
3
  end
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
- open_files(gather_files)
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
- file_array << file if file.match(/\.xml\Z/) || file.match(/\.html\Z/)
29
- end
30
- puts "==============="
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.1.0
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-08 00:00:00.000000000 Z
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: