catobills 0.3 → 0.4

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.
@@ -37,7 +37,7 @@ module Catobills
37
37
  # collects mentions of federal bodies, removing 'Congress', leadership offices, 'Commission', 'Board' and offices within agencies.
38
38
  def self.populate_federal_bodies(bill_body)
39
39
  results = bill_body.locate('legis-body/*/cato:entity-ref').select{|ref| ref['entity-type'] == 'federal-body'}
40
- array_count(results.flatten.reject{|ref| ref['entity-id'] == "0001"}.reject{|ref| ref['entity-parent-id'] == '0050'}.reject{|ref| ref['entity-parent-id'] == '0010'}.map{|ref| ref.text.gsub(/\s+/, " ").strip}.compact.reject{|x| ['Commission', 'Board', 'Secretary', 'Department', 'Administrator', 'Administration', 'House', 'Senate', 'Director', 'Advisory Committee', 'Task Force', "Secretary's"].include?(x)})
40
+ array_count(results.flatten.reject{|ref| ref['entity-id'] == "0001"}.reject{|ref| ref['entity-parent-id'] == '0050'}.reject{|ref| ref['entity-parent-id'] == '0010'}.map{|ref| ref.text.gsub(/\s+/, " ").strip}.compact.reject{|x| ['Commission', 'Board', 'Secretary', 'Department', 'Administrator', 'Administration', 'House', 'Senate', 'Director', 'Advisory Committee', 'Task Force', "Secretary's", "Under Secretary", "Administrator's"].include?(x)})
41
41
  end
42
42
 
43
43
  def self.array_count(array)
@@ -1,3 +1,3 @@
1
1
  module Catobills
2
- VERSION = "0.3"
2
+ VERSION = "0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: catobills
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.3'
4
+ version: '0.4'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-17 00:00:00.000000000 Z
12
+ date: 2013-11-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -154,18 +154,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
154
154
  - - ! '>='
155
155
  - !ruby/object:Gem::Version
156
156
  version: '0'
157
- segments:
158
- - 0
159
- hash: 2517063096837247936
160
157
  required_rubygems_version: !ruby/object:Gem::Requirement
161
158
  none: false
162
159
  requirements:
163
160
  - - ! '>='
164
161
  - !ruby/object:Gem::Version
165
162
  version: '0'
166
- segments:
167
- - 0
168
- hash: 2517063096837247936
169
163
  requirements: []
170
164
  rubyforge_project:
171
165
  rubygems_version: 1.8.25