urlarchiver 0.0.7 → 0.0.8

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 (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/urlarchiver.rb +6 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 00bc5fc12538f6329fa097e215220e82a3c4da03
4
- data.tar.gz: 079ff49b704f1582b816fbddd399bbb61b6b6c39
3
+ metadata.gz: 6ec4c5a92b081c704d3b786a2dcdc2c337d661de
4
+ data.tar.gz: 311f7399609187fa07e097c408c0518417a462b3
5
5
  SHA512:
6
- metadata.gz: 75bfa6a48d231e3697ad0d1aea263ad5753178955a68c78ce4141ea304de23ad18dbe8f7448ff664f058f6fd11c9d81a1959442ac366f97f63d29e5afc1b15d4
7
- data.tar.gz: c8ccf5c67047cc952a664fbafe34276370d9ce7073b86d06b8bcaf83b74742f9306a5d308c90602d649cd5d91edd9f9f59d3e5fc781b5278e204ec7fe2d21dea
6
+ metadata.gz: 1fab1ba0ea63788b21f1169a9e489f1387370bf6fc761b9615ad02385729c8b4fb6cd80377897d46569dbe6f6c3c4000ce3dd61cf9dd6033cb52822bd05adad3
7
+ data.tar.gz: faaaa6dff8f073f2fd3ed2c34039c3281207a2489cd34b29f1175eb18c686e02126dc4f801c58980f4d13077208d373d9cfa4d271a5aa0545198857f4ac1d072
data/lib/urlarchiver.rb CHANGED
@@ -25,7 +25,7 @@ class URLArchiver
25
25
  file = k.to_file(filepath)
26
26
 
27
27
  # Save output if single url
28
- if @type == "single" || @type == "multifull"
28
+ if @type == "single"
29
29
  @output = Hash.new
30
30
  @output[:pdf_path] = filepath
31
31
  @output[:html_path] = filepath.gsub(".pdf", ".html")
@@ -36,6 +36,10 @@ class URLArchiver
36
36
  out = Hash.new
37
37
  out[:pdf_path] = filepath
38
38
  out[:html_path] = filepath.gsub(".pdf", ".html")
39
+
40
+ if @type == "multifull"
41
+ out[:text] = html.text
42
+ end
39
43
  return out
40
44
  rescue
41
45
  end
@@ -63,6 +67,7 @@ class URLArchiver
63
67
  pitem[key] = value
64
68
  end
65
69
 
70
+ @output.to_a
66
71
  @output.push(pitem)
67
72
  end
68
73
  end
@@ -72,4 +77,3 @@ class URLArchiver
72
77
  return JSON.pretty_generate(@output)
73
78
  end
74
79
  end
75
-
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: urlarchiver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - M. C. McGrath
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-06 00:00:00.000000000 Z
11
+ date: 2014-06-12 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Saves html and pdfs of websites.
14
14
  email: shidash@shidash.com