fech-ftp 0.1.0 → 0.1.1
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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/fech-ftp/table.rb +2 -0
- data/lib/fech-ftp/version.rb +1 -1
- 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: 74b4ad9ebf4adbe59ec021a13408871e0180a6fe
|
4
|
+
data.tar.gz: 2d5a44faf28e8e4bc12d0fa351c0b61651fa17f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf7a38d8dd0906992baf77bbe19666b477945a1209895cb8158b07b43fc9db68fba6e386e0a7856e53be830e1f9f0cccea7bbe6b40781def329e135cf11d4392
|
7
|
+
data.tar.gz: 8ed8360b64583bfe81ca70846b60f864e1e4bfe87cf0aaf9208a5cb851d0c6a94ef575b9afdff6a7a278602cb12320baa1ee88a5ea6fa943799707b26b2fe2aa
|
data/README.md
CHANGED
@@ -34,7 +34,7 @@ If you want to have the data transferred into an csv, add the property `format:
|
|
34
34
|
Fech::Candidate.detail(2014, format: :csv)
|
35
35
|
```
|
36
36
|
|
37
|
-
You can specify the location that the FEC zip files opened by fech-ftp are downloaded by adding the property `location`, with an absolute path to
|
37
|
+
You can specify the location that the FEC zip files opened by fech-ftp are downloaded by adding the property `location`, with an absolute path to an _existing_ directory that must include a trailing slash, like so:
|
38
38
|
|
39
39
|
```ruby
|
40
40
|
Fech::Candidate.detail(2014, location: "/tmp/fec/")
|
data/lib/fech-ftp/table.rb
CHANGED
@@ -6,6 +6,7 @@ module Fech
|
|
6
6
|
@file = opts[:file]
|
7
7
|
@format = opts[:format]
|
8
8
|
@location = opts[:location]
|
9
|
+
@passive = opts[:passive]
|
9
10
|
@receiver = opts[:connection] || receiver
|
10
11
|
@parser = parser
|
11
12
|
end
|
@@ -60,6 +61,7 @@ module Fech
|
|
60
61
|
def fetch_file(&blk)
|
61
62
|
zip_file = "#{@file}#{@cycle.to_s[2..3]}.zip"
|
62
63
|
Net::FTP.open("ftp.fec.gov") do |ftp|
|
64
|
+
ftp.passive = true if @passive
|
63
65
|
ftp.login
|
64
66
|
ftp.chdir("./FEC/#{@cycle}")
|
65
67
|
begin
|
data/lib/fech-ftp/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fech-ftp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Derek Willis
|
@@ -200,7 +200,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
200
200
|
version: '0'
|
201
201
|
requirements: []
|
202
202
|
rubyforge_project:
|
203
|
-
rubygems_version: 2.
|
203
|
+
rubygems_version: 2.2.2
|
204
204
|
signing_key:
|
205
205
|
specification_version: 4
|
206
206
|
summary: A Ruby interface for FTP data from the Federal Election Commission.
|
@@ -213,3 +213,4 @@ test_files:
|
|
213
213
|
- test/test_individual.rb
|
214
214
|
- test/webk.txt
|
215
215
|
- test/webl.txt
|
216
|
+
has_rdoc:
|