fech 0.3.0 → 0.5.0

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.1)
4
+ fech (0.3.0)
5
5
  fastercsv
6
6
  people
7
7
 
@@ -36,10 +36,8 @@ PLATFORMS
36
36
 
37
37
  DEPENDENCIES
38
38
  bundler
39
- fastercsv
40
39
  fech!
41
40
  mocha
42
- people
43
41
  rcov
44
42
  rdoc
45
43
  rspec (~> 2.6)
data/README.rdoc CHANGED
@@ -4,9 +4,9 @@
4
4
  \ \_\ \ \_____\ \ \_____\ \ \_\ \_\
5
5
  \/_/ \/_____/ \/_____/ \/_/\/_/
6
6
 
7
- Fech makes it easy to parse electronic presidential campaign filings[http://query.nictusa.com/pres/] and independent expenditure filings[http://www.fec.gov/finance/disclosure/ie_reports.shtml] from the Federal Election Commission. It lets you access filing attributes the same way regardless of filing version, and works as a framework for cleaning and filing data.
7
+ Fech makes it easy to parse electronic presidential campaign filings[http://query.nictusa.com/pres/], PAC filings and independent expenditure filings[http://www.fec.gov/finance/disclosure/ie_reports.shtml] from the Federal Election Commission. It lets you access filing attributes the same way regardless of filing version, and works as a framework for cleaning and filing data.
8
8
 
9
- Fech supports several FEC form types, including all F3P (presidential filings), F5 (independent expenditures), F24 (24/48 hour notices of independent expenditures), F56 (contributions to independent expenditure committees) and F57 (expenditures by independent expenditure committees).
9
+ Fech supports several FEC form types, including all F3P (presidential filings), F5 (independent expenditures), F24 (24/48 hour notices of independent expenditures), F56 (contributions to independent expenditure committees) F57 (expenditures by independent expenditure committees) and F3X (filings by unauthorized committees).
10
10
 
11
11
  == News
12
12
 
@@ -164,6 +164,7 @@ The following row types are currently supported from filing version 3 through 8.
164
164
  * F3PS
165
165
  * F3S
166
166
  * F3P31 (Items to be Liquidated)
167
+ * F3X (Report of Receipts and Disbursements for Other Than an Authorized Committee)
167
168
  * F24 (24/48 Hour Notice of Independent Expenditure)
168
169
  * F5 (Report of Independent Expenditures Made and Contributions Received)
169
170
  * F56 (Contributions for Independent Expenditures)
@@ -11,6 +11,7 @@ module FechUtils
11
11
  :f3s => /^f3s/i,
12
12
  :f3p31 => /^f3p31/i,
13
13
  :f3ps => /^f3ps/i,
14
+ :f3x => /^f3x/i,
14
15
  :f5 => /^f5[na]/i,
15
16
  :f56 => /^f56/i,
16
17
  :f57 => /^f57/i,
@@ -9,7 +9,7 @@ module Fech
9
9
  attr_accessor :map
10
10
  FILING_VERSIONS = ["8.0", "7.0", "6.4", "6.3", "6.2", "6.1",
11
11
  "5.3", "5.2", "5.1", "5.0", "3"]
12
- BASE_ROW_TYPES = ["HDR", "F24", "F3P", "F3P31", "F3PS", "F3S", "F5", "F56", "F57",
12
+ BASE_ROW_TYPES = ["HDR", "F24", "F3P", "F3P31", "F3PS", "F3S", "F3X", "F5", "F56", "F57",
13
13
  "SchA", "SchB", "SchC", "SchC1", "SchC2", "SchD", "SchE",
14
14
  "SchF", "TEXT"]
15
15
  ROW_TYPE_MATCHERS = {
@@ -19,6 +19,7 @@ module Fech
19
19
  "F3S" => FechUtils::ROW_TYPES[:f3s],
20
20
  "F3P31" => FechUtils::ROW_TYPES[:f3p31],
21
21
  "F3PS" => FechUtils::ROW_TYPES[:f3ps],
22
+ "F3X" => FechUtils::ROW_TYPES[:f3x],
22
23
  "F5" => FechUtils::ROW_TYPES[:f5],
23
24
  "F56" => FechUtils::ROW_TYPES[:f56],
24
25
  "F57" => FechUtils::ROW_TYPES[:f57],
@@ -35,6 +35,11 @@ module Fech
35
35
  '^8.0|7.0|6.4|6.3|6.2|6.1' => [:form_type, :filer_committee_id_number, :date_general_election, :date_day_after_general_election, :a_total_contributions_no_loans, :b_total_contribution_refunds, :c_net_contributions, :a_total_operating_expenditures, :b_total_offsets_to_operating_expenditures, :c_net_operating_expenditures, :a_i_individuals_itemized, :a_ii_individuals_unitemized, :a_iii_individuals_total, :b_political_party_committees, :c_all_other_political_committees_pacs, :d_the_candidate, :e_total_contributions, :transfers_from_other_auth_committees, :a_loans_made_or_guarn_by_the_candidate, :b_all_other_loans, :c_total_loans, :offsets_to_operating_expenditures, :other_receipts, :total_receipts, :operating_expenditures, :transfers_to_other_auth_committees, :a_loan_repayment_by_candidate, :b_loan_repayments_all_other_loans, :c_total_loan_repayments, :a_refund_individuals_other_than_pol_cmtes, :b_refund_political_party_committees, :c_refund_other_political_committees, :d_total_contributions_refunds, :other_disbursements, :total_disbursements],
36
36
  '^5.3|5.2|5.1|5.0|3' => [:form_type, :filer_committee_id_number, :a_total_contributions_no_loans, :b_total_contribution_refunds, :c_net_contributions, :a_total_operating_expenditures, :b_total_offsets_to_operating_expenditures, :c_net_operating_expenditures, :a_i_individuals_itemized, :a_ii_individuals_unitemized, :a_iii_individuals_total, :b_political_party_committees, :c_all_other_political_committees_pacs, :d_the_candidate, :e_total_contributions, :transfers_from_other_auth_committees, :a_loans_made_or_guarn_by_the_candidate, :b_all_other_loans, :c_total_loans, :offsets_to_operating_expenditures, :other_receipts, :total_receipts, :operating_expenditures, :transfers_to_other_auth_committees, :a_loan_repayment_by_candidate, nil, :c_total_loan_repayments, :a_refund_individuals_other_than_pol_cmtes, nil, nil, :d_total_contributions_refunds, :other_disbursements, :total_disbursements, :date_general_election, :date_day_after_general_election],
37
37
  },
38
+ "^f3x" => {
39
+ '^8.0|7.0|6.4|6.3|6.2|6.1' => [:form_type, :filer_committee_id_number, :committee_name, :change_of_address, :street_1, :street_2, :city, :state, :zip, :report_code, :election_code, :date_of_election, :state_of_election, :coverage_from_date, :coverage_through_date, :qualified_committee, :treasurer_last_name, :treasurer_first_name, :treasurer_middle_name, :treasurer_prefix, :treasurer_suffix, :date_signed, :col_a_cash_on_hand_beginning_period, :col_a_total_receipts, :col_a_subtotal, :col_a_total_disbursements, :col_a_cash_on_hand_close_of_period, :col_a_debts_to, :col_a_debts_by, :col_a_individuals_itemized, :col_a_individuals_unitemized, :col_a_individual_contribution_total, :col_a_political_party_committees, :col_a_other_political_committees_pacs, :col_a_total_contributions, :col_a_transfers_from_aff_other_party_cmttees, :col_a_total_loans, :col_a_total_loan_repayments_received, :col_a_offsets_to_expenditures, :col_a_total_contributions_refunds, :col_a_other_federal_receipts, :col_a_transfers_from_nonfederal_h3, :col_a_levin_funds, :col_a_total_nonfederal_transfers, :col_a_total_receipts, :col_a_total_federal_receipts, :col_a_shared_operating_expenditures_federal, :col_a_shared_operating_expenditures_nonfederal, :col_a_other_federal_operating_expenditures, :col_a_total_operating_expenditures, :col_a_transfers_to_affiliated, :col_a_contributions_to_candidates, :col_a_independent_expenditures, :col_a_coordinated_expenditures_by_party_committees, :col_a_total_loan_repayments_made, :col_a_loans_made, :col_a_refunds_to_individuals, :col_a_refunds_to_party_committees, :col_a_refunds_to_other_committees, :col_a_total_refunds, :col_a_other_disbursements, :col_a_federal_election_activity_federal_share, :col_a_federal_election_activity_levin_share, :col_a_federal_election_activity_all_federal, :col_a_federal_election_activity_total, :col_a_total_disbursements, :col_a_total_federal_disbursements, :col_a_total_contributions, :col_a_total_contributions_refunds, :col_a_net_contributions, :col_a_total_federal_operating_expenditures, :col_a_total_offsets_to_expenditures, :col_a_net_operating_expenditures, :col_b_cash_on_hand_jan_1, :col_b_year, :col_b_total_receipts, :col_b_subtotal, :col_b_total_disbursements, :col_b_cash_on_hand_close_of_period, :col_b_individuals_itemized, :col_b_individuals_unitemized, :col_b_individual_contribution_total, :col_b_political_party_committees, :col_b_other_political_committees_pacs, :col_b_total_contributions, :col_b_transfers_from_aff_other_party_cmttees, :col_b_total_loans, :col_b_total_loan_repayments_received, :col_b_offsets_to_expenditures, :col_b_total_contributions_refunds, :col_b_other_federal_receipts, :col_b_transfers_from_nonfederal_h3, :col_b_levin_funds, :col_b_total_nonfederal_transfers, :col_b_total_receipts, :col_b_total_federal_receipts, :col_b_shared_operating_expenditures_federal, :col_b_shared_operating_expenditures_nonfederal, :col_b_other_federal_operating_expenditures, :col_b_total_operating_expenditures, :col_b_transfers_to_affiliated, :col_b_contributions_to_candidates, :col_b_independent_expenditures, :col_b_coordinated_expenditures_by_party_committees, :col_b_total_loan_repayments_made, :col_b_loans_made, :col_b_refunds_to_individuals, :col_b_refunds_to_party_committees, :col_b_refunds_to_other_committees, :col_b_total_refunds, :col_b_other_disbursements, :col_b_federal_election_activity_federal_share, :col_b_federal_election_activity_levin_share, :col_b_federal_election_activity_all_federal, :col_b_federal_election_activity_total, :col_b_total_disbursements, :col_b_total_federal_disbursements, :col_b_total_contributions, :col_b_total_contributions_refunds, :col_b_net_contributions, :col_b_total_federal_operating_expenditures, :col_b_total_offsets_to_expenditures, :col_b_net_operating_expenditures],
40
+ '^5.3|5.2|5.1|5.0' => [:form_type, :filer_committee_id_number, :committee_name, :street_1, :street_2, :city, :state, :zip, :change_of_address, :qualified_committee, :report_code, :election_code, :date_of_election, :state_of_election, :coverage_from_date, :coverage_through_date, :col_a_cash_on_hand_beginning_period, :col_a_total_receipts, :col_b_cash_on_hand_jan_1, :col_a_total_disbursements, :col_a_cash_on_hand_close_of_period, :col_a_debts_to, :col_a_debts_by, :col_a_individuals_itemized, :col_a_individuals_unitemized, :col_a_individual_contribution_total, :col_a_political_party_committees, :col_a_other_political_committees_pacs, :col_a_total_contributions, :col_a_transfers_from_aff_other_party_cmttees, :col_a_total_loans, :col_a_total_loan_repayments_received, :col_a_offsets_to_expenditures, :col_a_total_contributions_refunds, :col_a_other_federal_receipts, :col_a_transfers_from_nonfederal_h3, :col_a_total_receipts, :col_a_total_federal_receipts, :col_a_shared_operating_expenditures_federal, :col_a_shared_operating_expenditures_nonfederal, :col_a_other_federal_operating_expenditures, :col_a_total_operating_expenditures, :col_a_transfers_to_affiliated, :col_a_contributions_to_candidates, :col_a_independent_expenditures, :col_a_coordinated_expenditures_by_party_committees, :col_a_total_loan_repayments_made, :col_a_loans_made, :col_a_refunds_to_individuals, :col_a_refunds_to_party_committees, :col_a_refunds_to_other_committees, :col_a_total_refunds, :col_a_other_disbursements, :col_a_total_disbursements, :col_a_total_federal_disbursements, :col_a_total_contributions, :col_a_total_contributions_refunds, :col_a_net_contributions, :col_a_total_federal_operating_expenditures, :col_a_total_offsets_to_expenditures, :col_a_net_operating_expenditures, nil, :col_b_year, :col_b_total_receipts, :col_b_subtotal, :col_b_total_disbursements, :col_b_cash_on_hand_close_of_period, :col_b_individuals_itemized, :col_b_individuals_unitemized, :col_b_individual_contribution_total, :col_b_political_party_committees, :col_b_other_political_committees_pacs, :col_b_total_contributions, :col_b_transfers_from_aff_other_party_cmttees, :col_b_total_loans, :col_b_total_loan_repayments_received, :col_b_offsets_to_expenditures, :col_b_total_contributions_refunds, :col_b_other_federal_receipts, :col_b_transfers_from_nonfederal_h3, :col_b_total_receipts, :col_b_total_federal_receipts, :col_b_shared_operating_expenditures_federal, :col_b_shared_operating_expenditures_nonfederal, :col_b_other_federal_operating_expenditures, :col_b_total_operating_expenditures, :col_b_transfers_to_affiliated, :col_b_contributions_to_candidates, :col_b_independent_expenditures, :col_b_coordinated_expenditures_by_party_committees, :col_b_total_loan_repayments_made, :col_b_loans_made, :col_b_refunds_to_individuals, :col_b_refunds_to_party_committees, :col_b_refunds_to_other_committees, :col_b_total_refunds, :col_b_other_disbursements, :col_b_total_disbursements, :col_b_total_federal_disbursements, :col_b_total_contributions, :col_b_total_contributions_refunds, :col_b_net_contributions, :col_b_total_federal_operating_expenditures, :col_b_total_offsets_to_expenditures, :col_b_net_operating_expenditures, :treasurer_name, :date_signed, :col_a_levin_funds, :col_a_total_nonfederal_transfers, :col_a_federal_election_activity_federal_share, :col_a_federal_election_activity_levin_share, :col_a_federal_election_activity_all_federal, :col_a_federal_election_activity_total, :col_b_levin_funds, :col_b_total_nonfederal_transfers, :col_b_federal_election_activity_federal_share, :col_b_federal_election_activity_levin_share, :col_b_federal_election_activity_all_federal, :col_b_federal_election_activity_total],
41
+ '^3' => [:form_type, :filer_committee_id_number, :committee_name, :street_1, :street_2, :col_b_cash_on_hand_jan_1, :state, :zip, :change_of_address, :qualified_committee, :report_code, :election_code, :date_of_election, :state_of_election, :coverage_from_date, :coverage_through_date, :col_a_cash_on_hand_beginning_period, :col_a_total_receipts, :col_a_subtotal, :col_a_total_disbursements, :col_a_cash_on_hand_close_of_period, :col_a_debts_to, :col_a_debts_by, :col_a_individuals_itemized, :col_a_individuals_unitemized, :col_a_individual_contribution_total, :col_a_political_party_committees, :col_a_other_political_committees_pacs, :col_a_total_contributions, :col_a_transfers_from_aff_other_party_cmttees, :col_a_total_loans, :col_a_total_loan_repayments_received, :col_a_offsets_to_expenditures, :col_a_total_contributions_refunds, :col_a_other_federal_receipts, :col_a_transfers_from_nonfederal_h3, :col_a_total_receipts, :col_a_total_federal_receipts, :col_a_shared_operating_expenditures_federal, :col_a_shared_operating_expenditures_nonfederal, :col_a_other_federal_operating_expenditures, :col_a_total_operating_expenditures, :col_a_transfers_to_affiliated, :col_a_contributions_to_candidates, :col_a_independent_expenditures, :col_a_coordinated_expenditures_by_party_committees, :col_a_total_loan_repayments_made, :col_a_loans_made, :col_a_refunds_to_individuals, :col_a_refunds_to_party_committees, :col_a_refunds_to_other_committees, :col_a_total_refunds, :col_a_other_disbursements, :col_a_total_disbursements, :col_a_total_federal_disbursements, :col_a_total_contributions, :col_a_total_contributions_refunds, :col_a_net_contributions, :col_a_total_federal_operating_expenditures, :col_a_total_offsets_to_expenditures, :col_a_net_operating_expenditures, nil, :col_b_year, :col_b_total_receipts, :col_b_subtotal, :col_b_total_disbursements, :col_b_cash_on_hand_close_of_period, :col_b_individuals_itemized, :col_b_individuals_unitemized, :col_b_individual_contribution_total, :col_b_political_party_committees, :col_b_other_political_committees_pacs, :col_b_total_contributions, :col_b_transfers_from_aff_other_party_cmttees, :col_b_total_loans, :col_b_total_loan_repayments_received, :col_b_offsets_to_expenditures, :col_b_total_contributions_refunds, :col_b_other_federal_receipts, :col_b_transfers_from_nonfederal_h3, :col_b_total_receipts, :col_b_total_federal_receipts, :col_b_shared_operating_expenditures_federal, :col_b_shared_operating_expenditures_nonfederal, :col_b_other_federal_operating_expenditures, :col_b_total_operating_expenditures, :col_b_transfers_to_affiliated, :col_b_contributions_to_candidates, :col_b_independent_expenditures, :col_b_coordinated_expenditures_by_party_committees, :col_b_total_loan_repayments_made, :col_b_loans_made, :col_b_refunds_to_individuals, :col_b_refunds_to_party_committees, :col_b_refunds_to_other_committees, :col_b_total_refunds, :col_b_other_disbursements, :col_b_total_disbursements, :col_b_total_federal_disbursements, :col_b_total_contributions, :col_b_total_contributions_refunds, :col_b_net_contributions, :col_b_total_federal_operating_expenditures, :col_b_total_offsets_to_expenditures, :col_b_net_operating_expenditures, :treasurer_name, :date_signed],
42
+ },
38
43
  "^f5[na]" => {
39
44
  '^8.0|7.0|6.4|6.3' => [:form_type, :filer_committee_id_number, :entity_type, :organization_name, :individual_last_name, :individual_first_name, :individual_middle_name, :individual_prefix, :individual_suffix, :change_of_address, :street_1, :street_2, :city, :state, :zip, :qualified_nonprofit, :individual_employer, :individual_occupation, :report_code, :report_type, :coverage_from_date, :coverage_through_date, :total_contribution, :total_independent_expenditure, :person_completing_last_name, :person_completing_first_name, :person_completing_middle_name, :person_completing_prefix, :person_completing_suffix, :date_signed],
40
45
  '^5.3' => [:form_type, :filer_committee_id_number, :committee_name, :street_1, :street_2, :city, :state, :zip, :change_of_address, :qualified_nonprofit, :individual_employer, nil, :report_code, nil, nil, nil, :coverage_from_date, :coverage_through_date, :total_contribution, :total_independent_expenditure, :person_completing_name, :date_signed, nil, nil, nil, :report_type],
@@ -97,8 +102,8 @@ module Fech
97
102
  '^5.2|5.1|5.0|3' => [:form_type, :filer_committee_id_number, :entity_type, :creditor_name, :creditor_street_1, :creditor_street_2, :creditor_city, :creditor_state, :creditor_zip, :purpose_of_debt_or_obligation, :beginning_balance_this_period, :incurred_amount_this_period, :payment_amount_this_period, :balance_at_close_this_period, :fec_committee_id_number, :fec_candidate_id_number, :candidate_name, :candidate_office, :candidate_state, :candidate_district, :conduit_name, :conduit_street_1, :conduit_street_2, :conduit_city, :conduit_state, :conduit_zip, nil, :transaction_id_number],
98
103
  },
99
104
  "^se" => {
100
- '^8.0' => [:form_type, :filer_committee_id_number, :transaction_id_number, :back_reference_tran_id_number, :back_reference_sched_name, :entity_type, :payee_organization_name, :payee_last_name, :payee_first_name, :payee_middle_name, :payee_prefix, :payee_suffix, :payee_street_1, :payee_street_2, :payee_city, :payee_state, :payee_zip, :election_code, :election_other_description, :expenditure_date, :expenditure_amount, :calendar_y_t_d_per_election_office, :expenditure_purpose_descrip, :category_code, :payee_cmtte_fec_id_number, :support_oppose_code, :candidate_id_number, :candidate_last_name, :candidate_first_name, :candinate_middle_name, :candidate_prefix, :candidate_suffix, :candidate_office, :candidate_state, :candidate_district, :completing_last_name, :completing_first_name, :completing_middle_name, :completing_prefix, :completing_suffix, :date_signed, :memo_code, :memo_text_description],
101
- '^7.0|6.4|6.3|6.2|6.1' => [:form_type, :filer_committee_id_number, :transaction_id_number, :back_reference_tran_id_number, :back_reference_sched_name, :entity_type, :payee_organization_name, :payee_last_name, :payee_first_name, :payee_middle_name, :payee_prefix, :payee_suffix, :payee_street_1, :payee_street_2, :payee_city, :payee_state, :payee_zip, :election_code, :election_other_description, :expenditure_date, :expenditure_amount, :calendar_y_t_d_per_election_office, :expenditure_purpose_code, :expenditure_purpose_descrip, :category_code, :payee_cmtte_fec_id_number, :support_oppose_code, :candidate_id_number, :candidate_last_name, :candidate_first_name, :candinate_middle_name, :candidate_prefix, :candidate_suffix, :candidate_office, :candidate_state, :candidate_district, :completing_last_name, :completing_first_name, :completing_middle_name, :completing_prefix, :completing_suffix, :date_signed, :memo_code, :memo_text_description],
105
+ '^8.0' => [:form_type, :filer_committee_id_number, :transaction_id_number, :back_reference_tran_id_number, :back_reference_sched_name, :entity_type, :payee_organization_name, :payee_last_name, :payee_first_name, :payee_middle_name, :payee_prefix, :payee_suffix, :payee_street_1, :payee_street_2, :payee_city, :payee_state, :payee_zip, :election_code, :election_other_description, :expenditure_date, :expenditure_amount, :calendar_y_t_d_per_election_office, :expenditure_purpose_descrip, :category_code, :payee_cmtte_fec_id_number, :support_oppose_code, :candidate_id_number, :candidate_last_name, :candidate_first_name, :candidate_middle_name, :candidate_prefix, :candidate_suffix, :candidate_office, :candidate_state, :candidate_district, :completing_last_name, :completing_first_name, :completing_middle_name, :completing_prefix, :completing_suffix, :date_signed, :memo_code, :memo_text_description],
106
+ '^7.0|6.4|6.3|6.2|6.1' => [:form_type, :filer_committee_id_number, :transaction_id_number, :back_reference_tran_id_number, :back_reference_sched_name, :entity_type, :payee_organization_name, :payee_last_name, :payee_first_name, :payee_middle_name, :payee_prefix, :payee_suffix, :payee_street_1, :payee_street_2, :payee_city, :payee_state, :payee_zip, :election_code, :election_other_description, :expenditure_date, :expenditure_amount, :calendar_y_t_d_per_election_office, :expenditure_purpose_code, :expenditure_purpose_descrip, :category_code, :payee_cmtte_fec_id_number, :support_oppose_code, :candidate_id_number, :candidate_last_name, :candidate_first_name, :candidate_middle_name, :candidate_prefix, :candidate_suffix, :candidate_office, :candidate_state, :candidate_district, :completing_last_name, :completing_first_name, :completing_middle_name, :completing_prefix, :completing_suffix, :date_signed, :memo_code, :memo_text_description],
102
107
  '^5.3' => [:form_type, :filer_committee_id_number, :entity_type, :payee_name, :payee_street_1, :payee_street_2, :payee_city, :payee_state, :payee_zip, :expenditure_purpose_descrip, :expenditure_date, :expenditure_amount, :support_oppose_code, :candidate_id_number, :candidate_name, :candidate_office, :candidate_state, :candidate_district, :payee_cmtte_fec_id_number, nil, nil, nil, nil, nil, :conduit_name, :conduit_street_1, :conduit_street_2, :conduit_city, :conduit_state, :conduit_zip, :ind_name_as_signed, :date_signed, :date_notarized, :date_notary_commission_expires, :ind_name_notary, nil, :transaction_id_number, :memo_code, :memo_text_description, :back_reference_tran_id_number, :back_reference_sched_name, :election_code, :election_other_description, :category_code, :expenditure_purpose_code, :calendar_y_t_d_per_election_office],
103
108
  '^5.2|5.1|5.0' => [:form_type, :filer_committee_id_number, :entity_type, :payee_name, :payee_street_1, :payee_street_2, :payee_city, :payee_state, :payee_zip, :expenditure_purpose_descrip, :expenditure_date, :expenditure_amount, :support_oppose_code, :candidate_id_number, :candidate_name, :candidate_office, :candidate_state, :candidate_district, :payee_cmtte_fec_id_number, nil, nil, nil, nil, nil, :conduit_name, :conduit_street_1, :conduit_street_2, :conduit_city, :conduit_state, :conduit_zip, :ind_name_as_signed, :date_signed, :date_notarized, :date_notary_commission_expires, :ind_name_notary, nil, :transaction_id_number, :memo_code, :memo_text_description, :back_reference_tran_id_number, :back_reference_sched_name, :election_code, :election_other_description, :category_code, :expenditure_purpose_code, :calendar_y_t_d_per_election_office],
104
109
  '^3' => [:form_type, :filer_committee_id_number, :entity_type, :payee_name, :payee_street_1, :payee_street_2, :payee_city, :payee_state, :payee_zip, :expenditure_purpose_descrip, :expenditure_date, :expenditure_amount, :support_oppose_code, :candidate_id_number, :candidate_name, :candidate_office, :candidate_state, :candidate_district, :payee_cmtte_fec_id_number, nil, nil, nil, nil, nil, :conduit_name, :conduit_street_1, :conduit_street_2, :conduit_city, :conduit_state, :conduit_zip, :ind_name_as_signed, :date_signed, :date_notarized, :date_notary_commission_expires, :ind_name_notary, nil, :transaction_id_number, :memo_code, :memo_text_description, :back_reference_tran_id_number, :back_reference_sched_name],
data/lib/fech/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Fech
2
- VERSION = "0.3.0"
2
+ VERSION = "0.5.0"
3
3
  end
data/sources/F3X.csv ADDED
@@ -0,0 +1,125 @@
1
+ canonical,^8.0|7.0|6.4|6.3|6.2|6.1,,^5.3|5.2|5.1|5.0,,^3,
2
+ form_type,1,FORM TYPE,1,FORM TYPE,1,FORM TYPE
3
+ filer_committee_id_number,2,FILER COMMITTEE ID NUMBER,2,FILER FEC CMTE ID,2,FILER FEC CMTE ID
4
+ committee_name,3,COMMITTEE NAME,3,COMMITTEE NAME,3,COMMITTEE NAME
5
+ change_of_address,4,CHANGE OF ADDRESS,9,CHG OF ADDRESS,9,CHG OF ADDRESS
6
+ street_1,5,STREET 1,4,STREET 1,4,STREET 1
7
+ street_2,6,STREET 2,5,STREET 2,5,STREET 2
8
+ city,7,CITY,6,CITY,6,CITY
9
+ state,8,STATE,7,STATE,7,STATE
10
+ zip,9,ZIP,8,ZIP,8,ZIP
11
+ report_code,10,REPORT CODE,11,RPTCODE,11,RPTCODE
12
+ election_code,11,ELECTION CODE {was RPTPGI},12,RPTPGI,12,RPTPGI
13
+ date_of_election,12,DATE OF ELECTION,13,DATE (Of Election),13,DATE (Of Election)
14
+ state_of_election,13,STATE OF ELECTION,14,STATE (Of Election),14,STATE (Of Election)
15
+ coverage_from_date,14,COVERAGE FROM DATE,15,DATE (Coverage From),15,DATE (Coverage From)
16
+ coverage_through_date,15,COVERAGE THROUGH DATE,16,DATE (Coverage To),16,DATE (Coverage To)
17
+ qualified_committee,16,QUALIFIED COMMITTEE,10,QUALIFIED CMTE ,10,QUALIFIED CMTE
18
+ treasurer_name,,,106,NAME/TREASURER (as signed),106,NAME/TREASURER (as signed)
19
+ treasurer_last_name,17,TREASURER LAST NAME,,,,
20
+ treasurer_first_name,18,TREASURER FIRST NAME,,,,
21
+ treasurer_middle_name,19,TREASURER MIDDLE NAME,,,,
22
+ treasurer_prefix,20,TREASURER PREFIX,,,,
23
+ treasurer_suffix,21,TREASURER SUFFIX,,,,
24
+ date_signed,22,DATE SIGNED,107,DATE (Signed),107,DATE (Signed)
25
+ col_a_cash_on_hand_beginning_period,23,6(b) Cash on Hand beginning,17,6(b) Cash on Hand beginning,17,6(b) Cash on Hand beginning
26
+ col_a_total_receipts,24,6(c) Total Receipts,18,6(c) Total Receipts,18,6(c) Total Receipts
27
+ col_a_subtotal,25,6(d) Subtotal,19,6(d) Subtotal,19,6(d) Subtotal
28
+ col_a_total_disbursements,26,7. Total Disbursements,20,7. Total Disbursements,20,7. Total Disbursements
29
+ col_a_cash_on_hand_close_of_period,27,8. Cash on Hand at Close,21,8. Cash on Hand at Close,21,8. Cash on Hand at Close
30
+ col_a_debts_to,28,9. Debts to,22,9. Debts to,22,9. Debts to
31
+ col_a_debts_by,29,10. Debts by,23,10. Debts by,23,10. Debts by
32
+ col_a_individuals_itemized,30,11(a)i Itemized,24,11(a)i Itemized,24,11(a)i Itemized
33
+ col_a_individuals_unitemized,31,11(a)ii Unitemized,25,11(a)ii Unitemized,25,11(a)ii Unitemized
34
+ col_a_individual_contribution_total,32,11(a)iii Total,26,11(a)iii Total,26,11(a)iii Total
35
+ col_a_political_party_committees,33,11(b) Political Party Committees,27,11(b) Political Party Committees,27,11(b) Political Party Committees
36
+ col_a_other_political_committees_pacs,34,11(c) Other Political Committees (PACs),28,11(c) Other Political Committees (PACs),28,11(c) Other Political Committees (PACs)
37
+ col_a_total_contributions,35,11(d) Total Contributions,29,11(d) Total Contributions,29,11(d) Total Contributions
38
+ col_a_transfers_from_aff_other_party_cmttees,36,12. Transfers from Affiliated/Other Party Cmtes,30,12. Transfers from Affiliated/Other Party Cmtes,30,12. Transfers from Affiliated/Other Party Cmtes
39
+ col_a_total_loans,37,13. All Loans Received,31,13. All Loans Received,31,13. All Loans Received
40
+ col_a_total_loan_repayments_received,38,14. Loan Repayments Received,32,14. Loan Repayments Received,32,14. Loan Repayments Received
41
+ col_a_offsets_to_expenditures,39,15. Offsets to Operating Expenditures (refunds),33,15. Offsets to Operating Expenditures (refunds),33,15. Offsets to Operating Expenditures (refunds)
42
+ col_a_total_contributions_refunds,40,16. Refunds of Federal Contributions,34,16. Refunds of Federal Contributions,34,16. Refunds of Federal Contributions
43
+ col_a_other_federal_receipts,41,17. Other Federal Receipts (dividends),35,17. Other Federal Receipts (dividends),35,17. Other Federal Receipts (dividends)
44
+ col_a_transfers_from_nonfederal_h3,42,18(a) Transfers from Nonfederal Account (H3),36,18(a) Transfers from Nonfederal Account (H3),36,18(a) Transfers from Nonfederal Account (H3)
45
+ col_a_levin_funds,43,18(b) Transfers from Non-Federal (Levin - H5),108,18(b) Transfers from Non-Federal (Levin - H5),,
46
+ col_a_total_nonfederal_transfers,44,18(c) Total Non-Federal Transfers (18a+18b),109,18(c) Total Non-Federal Transfers (18a+18b),,
47
+ col_a_total_receipts,45,19. Total Receipts,37,19. Total Receipts,37,19. Total Receipts
48
+ col_a_total_federal_receipts,46,20. Total Federal Receipts,38,20. Total Federal Receipts,38,20. Total Federal Receipts
49
+ col_a_shared_operating_expenditures_federal,47,21(a)i Federal Share,39,21(a)i Federal Share,39,21(a)i Federal Share
50
+ col_a_shared_operating_expenditures_nonfederal,48,21(a)ii Non-Federal Share,40,21(a)ii Non-Federal Share,40,21(a)ii Non-Federal Share
51
+ col_a_other_federal_operating_expenditures,49,21(b) Other Federal Operating Expenditures,41,21(b) Other Federal Operating Expenditures,41,21(b) Other Federal Operating Expenditures
52
+ col_a_total_operating_expenditures,50,21(c) Total Operating Expenditures,42,21(c) Total Operating Expenditures,42,21(c) Total Operating Expenditures
53
+ col_a_transfers_to_affiliated,51,22. Transfers to Affiliated/Other Party Cmtes,43,22. Transfers to Affiliated/Other Party Cmtes,43,22. Transfers to Affiliated/Other Party Cmtes
54
+ col_a_contributions_to_candidates,52,23. Contributions to Federal Candidates/Cmtes,44,23. Contributions to Federal Candidates/Cmtes,44,23. Contributions to Federal Candidates/Cmtes
55
+ col_a_independent_expenditures,53,24. Independent Expenditures,45,24. Independent Expenditures,45,24. Independent Expenditures
56
+ col_a_coordinated_expenditures_by_party_committees,54,25. Coordinated Expend made by Party Cmtes,46,25. Coordinated Expend made by Party Cmtes,46,25. Coordinated Expend made by Party Cmtes
57
+ col_a_total_loan_repayments_made,55,26. Loan Repayments,47,26. Loan Repayments,47,26. Loan Repayments
58
+ col_a_loans_made,56,27. Loans Made,48,27. Loans Made,48,27. Loans Made
59
+ col_a_refunds_to_individuals,57,28(a) Individuals/Persons,49,28(a) Individuals/Persons,49,28(a) Individuals/Persons
60
+ col_a_refunds_to_party_committees,58,28(b) Political Party Committees,50,28(b) Political Party Committees,50,28(b) Political Party Committees
61
+ col_a_refunds_to_other_committees,59,28(c) Other Political Committees,51,28(c) Other Political Committees,51,28(c) Other Political Committees
62
+ col_a_total_refunds,60,28(d) Total Contributions Refunds,52,28(d) Total Contributions Refunds,52,28(d) Total Contributions Refunds
63
+ col_a_other_disbursements,61,29. Other Disbursements,53,29. Other Disbursements,53,29. Other Disbursements
64
+ col_a_federal_election_activity_federal_share,62,30(a)i Shared Federal Activity (H6) Fed Share,110,30(a)i Shared Federal Activity (H6) Fed Share,,
65
+ col_a_federal_election_activity_levin_share,63,30(a)ii Shared Federal Activity (H6) Non-Fed,111,30(a)ii Shared Federal Activity (H6) Non-Fed,,
66
+ col_a_federal_election_activity_all_federal,64,30(b) Non-Allocable 100% Fed Election Activity,112,30(b) Non-Allocable 100% Fed Election Activity,,
67
+ col_a_federal_election_activity_total,65,30(c) Total Federal Election Activity,113,30(c) Total Federal Election Activity,,
68
+ col_a_total_disbursements,66,31. Total Disbursements,54,31. Total Disbursements,54,30. Total Disbursements
69
+ col_a_total_federal_disbursements,67,32. Total Federal Disbursements,55,32. Total Federal Disbursements,55,31. Total Federal Disbursements
70
+ col_a_total_contributions,68,33. Total Contributions,56,33. Total Contributions,56,32. Total Contributions
71
+ col_a_total_contributions_refunds,69,34. Total Contribution Refunds,57,34. Total Contribution Refunds,57,33. Total Contribution Refunds
72
+ col_a_net_contributions,70,35. Net Contributions,58,35. Net Contributions,58,34. Net Contributions
73
+ col_a_total_federal_operating_expenditures,71,36. Total Federal Operating Expenditures,59,36. Total Federal Operating Expenditures,59,35. Total Federal Operating Expenditures
74
+ col_a_total_offsets_to_expenditures,72,37. Offsets to Operating Expenditures,60,37. Offsets to Operating Expenditures,60,36. Offsets to Operating Expenditures
75
+ col_a_net_operating_expenditures,73,38. Net Operating Expenditures,61,38. Net Operating Expenditures,61,37. Net Operating Expenditures
76
+ col_b_cash_on_hand_jan_1,74, 6(a) Cash on Hand Jan 1, 19,62, 6(a) Cash on Hand Jan 1, 19,62, 6(a) Cash on Hand Jan 1, 19
77
+ col_b_year,75,Year for Above,63,Year for Above,63,Year for Above
78
+ col_b_total_receipts,76,6(c) Total Receipts,64,6(c) Total Receipts,64,6(c) Total Receipts
79
+ col_b_subtotal,77,6(d) Subtotal,65,6(d) Subtotal,65,6(d) Subtotal
80
+ col_b_total_disbursements,78,7. Total disbursements,66,7. Total disbursements,66,7. Total disbursements
81
+ col_b_cash_on_hand_close_of_period,79,8. Cash on Hand Close,67,8. Cash on Hand Close,67,8. Cash on Hand Close
82
+ col_b_individuals_itemized,80,11(a)i Itemized,68,11(a)i Itemized,68,11(a)i Itemized
83
+ col_b_individuals_unitemized,81,11(a)ii Unitemized,69,11(a)ii Unitemized,69,11(a)ii Unitemized
84
+ col_b_individual_contribution_total,82,11(a)iii Total,70,11(a)iii Total,70,11(a)iii Total
85
+ col_b_political_party_committees,83,11(b) Political Party committees,71,11(b) Political Party committees,71,11(b) Political Party committees
86
+ col_b_other_political_committees_pacs,84,11(c) Other Political Committees (PACs),72,11(c) Other Political Committees (PACs),72,11(c) Other Political Committees (PACs)
87
+ col_b_total_contributions,85,11(d) Total Contributions,73,11(d) Total Contributions,73,11(d) Total Contributions
88
+ col_b_transfers_from_aff_other_party_cmttees,86,12. Transfers from Affiliated/Other Party Cmtes,74,12. Transfers from Affiliated/Other Party Cmtes,74,12. Transfers from Affiliated/Other Party Cmtes
89
+ col_b_total_loans,87,13. All Loans Received,75,13. All Loans Received,75,13. All Loans Received
90
+ col_b_total_loan_repayments_received,88,14. Loan Repayments Received,76,14. Loan Repayments Received,76,14. Loan Repayments Received
91
+ col_b_offsets_to_expenditures,89,15. Offsets to Operating Expenditures (refunds),77,15. Offsets to Operating Expenditures (refunds),77,15. Offsets to Operating Expenditures (refunds)
92
+ col_b_total_contributions_refunds,90,16. Refunds of Federal Contributions,78,16. Refunds of Federal Contributions,78,16. Refunds of Federal Contributions
93
+ col_b_other_federal_receipts,91,17. Other Federal Receipts (dividends),79,17. Other Federal Receipts (dividends),79,17. Other Federal Receipts (dividends)
94
+ col_b_transfers_from_nonfederal_h3,92,18(a) Transfers from Nonfederal Account (H3),80,18(a) Transfers from Nonfederal Account (H3),80,18(a) Transfers from Nonfederal Account (H3)
95
+ col_b_levin_funds,93,18(b) Transfers from Non-Federal (Levin - H5),114,18(b) Transfers from Non-Federal (Levin - H5),,
96
+ col_b_total_nonfederal_transfers,94,18(c) Total Non-Federal Transfers (18a+18b),115,18(c) Total Non-Federal Transfers (18a+18b),,
97
+ col_b_total_receipts,95,19. Total Receipts,81,19. Total Receipts,81,19. Total Receipts
98
+ col_b_total_federal_receipts,96,20. Total Federal Receipts,82,20. Total Federal Receipts,82,20. Total Federal Receipts
99
+ col_b_shared_operating_expenditures_federal,97,21(a)i Federal Share,83,21(a)i Federal Share,83,21(a)i Federal Share
100
+ col_b_shared_operating_expenditures_nonfederal,98,21(a)ii Non-Federal Share,84,21(a)ii Non-Federal Share,84,21(a)ii Non-Federal Share
101
+ col_b_other_federal_operating_expenditures,99,21(b) Other Federal Operating Expenditures,85,21(b) Other Federal Operating Expenditures,85,21(b) Other Federal Operating Expenditures
102
+ col_b_total_operating_expenditures,100,21(c) Total operating Expenditures,86,21(c) Total operating Expenditures,86,21(c) Total operating Expenditures
103
+ col_b_transfers_to_affiliated,101,22. Transfers to Affiliated/Other Party Cmtes,87,22. Transfers to Affiliated/Other Party Cmtes,87,22. Transfers to Affiliated/Other Party Cmtes
104
+ col_b_contributions_to_candidates,102,23. Contributions to Federal Candidates/Cmtes,88,23. Contributions to Federal Candidates/Cmtes,88,23. Contributions to Federal Candidates/Cmtes
105
+ col_b_independent_expenditures,103,24. Independent Expenditures,89,24. Independent Expenditures,89,24. Independent Expenditures
106
+ col_b_coordinated_expenditures_by_party_committees,104,25. Coordinated Expend made by Party Cmtes,90,25. Coordinated Expend made by Party Cmtes,90,25. Coordinated Expend made by Party Cmtes
107
+ col_b_total_loan_repayments_made,105,26. Loan Repayments Made,91,26. Loan Repayments Made,91,26. Loan Repayments Made
108
+ col_b_loans_made,106,27. Loans Made,92,27. Loans Made,92,27. Loans Made
109
+ col_b_refunds_to_individuals,107,28(a) Individuals/Persons,93,28(a) Individuals/Persons,93,28(a) Individuals/Persons
110
+ col_b_refunds_to_party_committees,108,28(b) Political Party Committees,94,28(b) Political Party Committees,94,28(b) Political Party Committees
111
+ col_b_refunds_to_other_committees,109,28(c) Other Political Committees,95,28(c) Other Political Committees,95,28(c) Other Political Committees
112
+ col_b_total_refunds,110,28(d) Total contributions Refunds,96,28(d) Total contributions Refunds,96,28(d) Total contributions Refunds
113
+ col_b_other_disbursements,111,29. Other Disbursements,97,29. Other Disbursements,97,29. Other Disbursements
114
+ col_b_federal_election_activity_federal_share,112,30(a)i Shared Federal Activity (H6) Fed Share,116,30(a)i Shared Federal Activity (H6) Fed Share,,
115
+ col_b_federal_election_activity_levin_share,113,30(a)ii Shared Federal Activity (H6) Non-Fed,117,30(a)ii Shared Federal Activity (H6) Non-Fed,,
116
+ col_b_federal_election_activity_all_federal,114,30(b) Non-Allocable 100% Fed Election Activity,118,30(b) Non-Allocable 100% Fed Election Activity,,
117
+ col_b_federal_election_activity_total,115,30(c) Total Federal Election Activity,119,30(c) Total Federal Election Activity,,
118
+ col_b_total_disbursements,116,31. Total Disbursements,98,31. Total Disbursements,98,30. Total Disbursements
119
+ col_b_total_federal_disbursements,117,32. Total Federal Disbursements,99,32. Total Federal Disbursements,99,31. Total Federal Disbursements
120
+ col_b_total_contributions,118,33. Total Contributions,100,33. Total Contributions,100,32. Total Contributions
121
+ col_b_total_contributions_refunds,119,34. Total Contribution Refunds,101,34. Total Contribution Refunds,101,33. Total Contribution Refunds
122
+ col_b_net_contributions,120,35. Net contributions,102,35. Net contributions,102,34. Net contributions
123
+ col_b_total_federal_operating_expenditures,121,36. Total Federal Operating Expenditures,103,36. Total Federal Operating Expenditures,103,35. Total Federal Operating Expenditures
124
+ col_b_total_offsets_to_expenditures,122,37. Offsets to Operating Expenditures,104,37. Offsets to Operating Expenditures,104,36. Offsets to Operating Expenditures
125
+ col_b_net_operating_expenditures,123,38. Net Operating Expenditures,105,38. Net Operating Expenditures,105,37. Net Operating Expenditures
data/sources/SchE.csv CHANGED
@@ -31,7 +31,7 @@ candidate_id_number,27,S/O CANDIDATE ID NUMBER,28,S/O CANDIDATE ID NUMBER,14,S/O
31
31
  candidate_name,,,,,15,S/O CAN/NAME,15,S/O CAN/NAME,15,S/O CAN/NAME
32
32
  candidate_last_name,28,S/O CANDIDATE LAST NAME,29,S/O CANDIDATE LAST NAME,,,,,,
33
33
  candidate_first_name,29,S/O CANDIDATE FIRST NAME,30,S/O CANDIDATE FIRST NAME,,,,,,
34
- candinate_middle_name,30,S/O CANDINATE MIDDLE NAME,31,S/O CANDINATE MIDDLE NAME,,,,,,
34
+ candidate_middle_name,30,S/O CANDIDATE MIDDLE NAME,31,S/O CANDIDATE MIDDLE NAME,,,,,,
35
35
  candidate_prefix,31,S/O CANDIDATE PREFIX,32,S/O CANDIDATE PREFIX,,,,,,
36
36
  candidate_suffix,32,S/O CANDIDATE SUFFIX,33,S/O CANDIDATE SUFFIX,,,,,,
37
37
  candidate_office,33,S/O CANDIDATE OFFICE,34,S/O CANDIDATE OFFICE,16,S/O CAN/OFFICE,16,S/O CAN/OFFICE,16,S/O CAN/OFFICE
@@ -0,0 +1,7 @@
1
+ HDRFEC8.0FECfile8.0.1.0(f28)
2
+ F3XNC004485633RD AND LONG PACPO BOX 8446ASHEVILLENC28814M112011100120111031BurnsTroy201111207989.485500.0013489.48300.0013189.480.00600.002500.000.002500.000.003000.005500.000.000.000.000.000.000.000.000.000.005500.005500.000.000.00300.00300.000.000.000.000.000.000.000.000.000.000.000.000.000.000.000.00300.00300.005500.000.005500.00300.000.00300.00479.88201163020.0063499.8850310.4013189.4820000.0018520.0038520.000.0024500.0063020.000.000.000.000.000.000.000.000.000.0063020.0063020.000.000.0042310.4042310.400.002000.000.000.000.000.000.000.000.000.006000.000.000.000.000.0050310.4050310.4063020.000.0063020.0042310.400.0042310.40
3
+ SA11AIC00448563SA11AI.4621INDRatcliffeBrandon301 N Elm St.GreensboroNC27401201110112500.002500.00ContributionPFBMarket Manager
4
+ SA11CC00448563SA11C.4618COMDAWG PAC - DEMOCRATS AGAINST WASTE IN GOVERNMENTPO BOX 83142GAITHERSBURGMD20883201110032000.002000.00ContributionC00455360DAWG PAC - DEMOCRATS AGAINST WASTE IN GOVERNMENT
5
+ SA11CC00448563SA11C.4616COMKENTUCKY FORWARD PACPO BOX 257FRANKFORTKY40602201110031000.001000.00ContributionC00417717KENTUCKY FORWARD PAC
6
+ SB21BC00448563SB21B.4615ORGNGP Software Inc1225 I St NWWashingtonDC2000520111012300.00Database
7
+ SD10C00448563SD10.4540ORGNGP Software Inc1225 I St NWWashingtonDC20005compliance and fundraising database software600.000.000.00600.00
data/spec/filing_spec.rb CHANGED
@@ -9,6 +9,8 @@ describe Fech::Filing do
9
9
  @filing8.stubs(:file_path).returns(File.join(File.dirname(__FILE__), 'data', '748730.fec'))
10
10
  @filing_ie = Fech::Filing.new(752356)
11
11
  @filing_ie.stubs(:file_path).returns(File.join(File.dirname(__FILE__), 'data', '752356.fec'))
12
+ @filing_pac = Fech::Filing.new(753533)
13
+ @filing_pac.stubs(:file_path).returns(File.join(File.dirname(__FILE__), 'data', '753533.fec'))
12
14
  end
13
15
 
14
16
  describe "#filing_version" do
@@ -17,6 +19,7 @@ describe Fech::Filing do
17
19
  @filing.send(:filing_version).should == "7.0"
18
20
  @filing8.send(:filing_version).should == "8.0"
19
21
  @filing_ie.send(:filing_version).should == "8.0"
22
+ @filing_pac.send(:filing_version).should == "8.0"
20
23
  end
21
24
 
22
25
  it "should parse the file only once" do
@@ -46,6 +49,8 @@ describe Fech::Filing do
46
49
  sum[:form_type].should == "F3PN"
47
50
  sum_ie = @filing_ie.summary
48
51
  sum_ie[:form_type].should == "F24N"
52
+ sum_pac = @filing_pac.summary
53
+ sum_pac[:form_type].should == "F3XN"
49
54
  end
50
55
  end
51
56
 
@@ -71,6 +76,9 @@ describe Fech::Filing do
71
76
  @filing.rows_like(/^s/).size.should == 2
72
77
  @filing.rows_like(/^sc/).size.should == 0
73
78
  @filing_ie.rows_like(/^se/).size.should == 3
79
+ @filing_pac.rows_like(/^sa/).size.should == 3
80
+ @filing_pac.rows_like(/^sb/).size.should == 1
81
+ @filing_pac.rows_like(/^sd/).size.should == 1
74
82
  end
75
83
 
76
84
  it "should return an array if no block is given" do
@@ -132,10 +140,13 @@ describe Fech::Filing do
132
140
  map.first.should == :form_type
133
141
  map_ie = @filing_ie.map_for(/se/)
134
142
  map_ie[21].should == :calendar_y_t_d_per_election_office
143
+ map_pac = @filing_pac.map_for(/f3x/)
144
+ map_pac[15].should == :qualified_committee
135
145
  end
136
146
 
137
147
  it "should raise error if no map is found" do
138
148
  lambda { @filing.map_for(/sz/) }.should raise_error
149
+ lambda { @filing_pac.map_for(/sz/) }.should raise_error
139
150
  end
140
151
 
141
152
  end
@@ -174,6 +185,12 @@ describe Fech::Filing do
174
185
  @f24_row = f_ie.readline.split(@filing_ie.delimiter)
175
186
  @se_row = f_ie.readline.split(@filing_ie.delimiter)
176
187
  f_ie.close
188
+
189
+ f_pac = open(@filing_pac.file_path, 'r')
190
+ f_pac.readline
191
+ @f3x_row = f_pac.readline.split(@filing_pac.delimiter)
192
+ @sa11_row = f_pac.readline.split(@filing_pac.delimiter)
193
+ f_pac.close
177
194
  end
178
195
 
179
196
  it "should map the data in row to named values according to row_map" do
@@ -272,4 +289,4 @@ describe Fech::Filing do
272
289
 
273
290
  end
274
291
 
275
- end
292
+ 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: 19
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 3
8
+ - 5
9
9
  - 0
10
- version: 0.3.0
10
+ version: 0.5.0
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-11-13 00:00:00 -05:00
20
+ date: 2011-11-22 00:00:00 -05:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
@@ -182,6 +182,7 @@ files:
182
182
  - sources/F3P31.csv
183
183
  - sources/F3PS.csv
184
184
  - sources/F3S.csv
185
+ - sources/F3X.csv
185
186
  - sources/F5.csv
186
187
  - sources/F56.csv
187
188
  - sources/F57.csv
@@ -210,6 +211,7 @@ files:
210
211
  - spec/data/723604.fec
211
212
  - spec/data/748730.fec
212
213
  - spec/data/752356.fec
214
+ - spec/data/753533.fec
213
215
  - spec/data/97405.fec
214
216
  - spec/default_translations_spec.rb
215
217
  - spec/fech_utils_spec.rb