cablegator 0.9.9 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,9 +5,9 @@ require 'fileutils'
5
5
  dir_prefix = ARGV[0] || Dir.pwd
6
6
 
7
7
  puts "Downloading cables to #{File.expand_path(dir_prefix)}"
8
- Wikileaks.with_each_cable do |cable_url|
8
+ WikiLeaks.with_each_cable do |cable_url|
9
9
  file_location = File.expand_path(dir_prefix + cable_url)
10
- reference_id = Wikileaks.reference_id(cable_url)
10
+ reference_id = WikiLeaks.reference_id(cable_url)
11
11
 
12
12
  if !File.exist?(file_location)
13
13
  FileUtils.mkdir_p(File.dirname(file_location))
@@ -1,3 +1,3 @@
1
1
  module Cablegator
2
- VERSION = "0.9.9"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -26,15 +26,11 @@ class WikiLeaks
26
26
  def with_each_cable
27
27
  doc = Nokogiri::HTML(self.get(HOME))
28
28
  doc.css(%{a[href^='/date']}).each do |link|
29
- cable_url = link.attributes['href'].value
30
- begin
31
- page_with_cables = Nokogiri::HTML(WikiLeaks.get(cable_url))
32
- page_with_cables.css(%{a[href^='/cable']}).each do |cable|
33
- cable_url = cable.attributes['href'].value
34
- yield cable_url
35
- end
36
- rescue
37
- STDOUT.puts "error GETtin page #{cable_url}"
29
+ cable_url = link.attributes['href'].value
30
+ page_with_cables = Nokogiri::HTML(WikiLeaks.get(cable_url))
31
+ page_with_cables.css(%{a[href^='/cable']}).each do |cable|
32
+ cable_url = cable.attributes['href'].value
33
+ yield cable_url
38
34
  end
39
35
  end
40
36
  end
metadata CHANGED
@@ -3,10 +3,10 @@ name: cablegator
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
+ - 1
6
7
  - 0
7
- - 9
8
- - 9
9
- version: 0.9.9
8
+ - 0
9
+ version: 1.0.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - csquared