fech 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fech (0.2.0)
4
+ fech (0.2.1)
5
5
  fastercsv
6
6
  people
7
7
 
@@ -36,8 +36,10 @@ PLATFORMS
36
36
 
37
37
  DEPENDENCIES
38
38
  bundler
39
+ fastercsv
39
40
  fech!
40
41
  mocha
42
+ people
41
43
  rcov
42
44
  rdoc
43
45
  rspec (~> 2.6)
data/README.rdoc CHANGED
@@ -172,7 +172,7 @@ Michael Strickland, michael.strickland@nytimes.com
172
172
 
173
173
  Evan Carmi, evan@ecarmi.org
174
174
 
175
- Aaron Bycoffe, bycoffe@gmail.com
175
+ Aaron Bycoffe, bycoffe@huffingtonpost.com
176
176
 
177
177
  Contributions by Daniel Pritchett, daniel@sharingatwork.com
178
178
 
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
- row_map = map_for(row.first)
104
+ full_row_map = map_for(row.first)
105
105
 
106
106
  # If specific fields were asked for, return only those
107
- row_map = row_map.select { |k,v| opts[:include].include?(k) } if opts[:include]
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
@@ -1,3 +1,3 @@
1
1
  module Fech
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
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: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
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-10-27 00:00:00 -04:00
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.6.2
266
+ rubygems_version: 1.4.2
267
267
  signing_key:
268
268
  specification_version: 3
269
269
  summary: Ruby library for parsing FEC filings.