fech 0.2.0 → 0.2.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.
- data/Gemfile.lock +3 -1
- data/README.rdoc +1 -1
- data/lib/fech/filing.rb +7 -3
- data/lib/fech/version.rb +1 -1
- metadata +5 -5
data/Gemfile.lock
CHANGED
data/README.rdoc
CHANGED
data/lib/fech/filing.rb
CHANGED
@@ -101,15 +101,19 @@ module Fech
|
|
101
101
|
# in the returned hash
|
102
102
|
def map(row, opts={})
|
103
103
|
data = Fech::Mapped.new(self, row.first)
|
104
|
-
|
104
|
+
full_row_map = map_for(row.first)
|
105
105
|
|
106
106
|
# If specific fields were asked for, return only those
|
107
|
-
|
107
|
+
if opts[:include]
|
108
|
+
row_map = full_row_map.select { |k| opts[:include].include?(k) }
|
109
|
+
else
|
110
|
+
row_map = full_row_map
|
111
|
+
end
|
108
112
|
|
109
113
|
# Inserts the row into data, performing any specified preprocessing
|
110
114
|
# on individual cells along the way
|
111
115
|
row_map.each_with_index do |field, index|
|
112
|
-
value = row[index]
|
116
|
+
value = row[full_row_map.index(field)]
|
113
117
|
translator.get_translations(:row => row.first,
|
114
118
|
:version => filing_version, :action => :convert,
|
115
119
|
:field => field).each do |translation|
|
data/lib/fech/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fech
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Michael Strickland
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2011-
|
20
|
+
date: 2011-11-04 00:00:00 -04:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
@@ -263,7 +263,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
263
263
|
requirements: []
|
264
264
|
|
265
265
|
rubyforge_project: fech
|
266
|
-
rubygems_version: 1.
|
266
|
+
rubygems_version: 1.4.2
|
267
267
|
signing_key:
|
268
268
|
specification_version: 3
|
269
269
|
summary: Ruby library for parsing FEC filings.
|