openc_bot 0.0.11

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.
Files changed (85) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +22 -0
  3. data/.travis.yml +8 -0
  4. data/CHANGELOG.md +2 -0
  5. data/Gemfile +8 -0
  6. data/LICENSE.txt +22 -0
  7. data/README.md +253 -0
  8. data/Rakefile +14 -0
  9. data/bin/openc_bot +13 -0
  10. data/create_bot.sh +30 -0
  11. data/create_company_bot.sh +16 -0
  12. data/create_simple_licence_bot.sh +31 -0
  13. data/db/.gitkeep +0 -0
  14. data/examples/basic/.gitignore +3 -0
  15. data/examples/basic/Gemfile +7 -0
  16. data/examples/basic/config.yml +21 -0
  17. data/examples/basic/lib/basic.rb +88 -0
  18. data/examples/basic_with_proxy/Gemfile +7 -0
  19. data/examples/basic_with_proxy/config.yml +21 -0
  20. data/examples/basic_with_proxy/lib/basic_with_proxy.rb +103 -0
  21. data/examples/bot_with_simple_iterator/Gemfile +6 -0
  22. data/examples/bot_with_simple_iterator/config.yml +21 -0
  23. data/examples/bot_with_simple_iterator/lib/bot_with_simple_iterator.rb +112 -0
  24. data/examples/company_fetchers/basic.rb +49 -0
  25. data/lib/monkey_patches/mechanize.rb +53 -0
  26. data/lib/openc_bot.rb +89 -0
  27. data/lib/openc_bot/bot_data_validator.rb +18 -0
  28. data/lib/openc_bot/company_fetcher_bot.rb +40 -0
  29. data/lib/openc_bot/exceptions.rb +17 -0
  30. data/lib/openc_bot/helpers/_csv.rb +10 -0
  31. data/lib/openc_bot/helpers/alpha_search.rb +73 -0
  32. data/lib/openc_bot/helpers/dates.rb +33 -0
  33. data/lib/openc_bot/helpers/html.rb +8 -0
  34. data/lib/openc_bot/helpers/incremental_search.rb +106 -0
  35. data/lib/openc_bot/helpers/register_methods.rb +205 -0
  36. data/lib/openc_bot/helpers/text.rb +18 -0
  37. data/lib/openc_bot/incrementers.rb +2 -0
  38. data/lib/openc_bot/incrementers/base.rb +214 -0
  39. data/lib/openc_bot/incrementers/common.rb +47 -0
  40. data/lib/openc_bot/tasks.rb +385 -0
  41. data/lib/openc_bot/templates/README.md +35 -0
  42. data/lib/openc_bot/templates/bin/export_data +28 -0
  43. data/lib/openc_bot/templates/bin/fetch_data +23 -0
  44. data/lib/openc_bot/templates/bin/verify_data +1 -0
  45. data/lib/openc_bot/templates/config.yml +21 -0
  46. data/lib/openc_bot/templates/lib/bot.rb +43 -0
  47. data/lib/openc_bot/templates/lib/company_fetcher_bot.rb +95 -0
  48. data/lib/openc_bot/templates/lib/simple_bot.rb +67 -0
  49. data/lib/openc_bot/templates/spec/bot_spec.rb +11 -0
  50. data/lib/openc_bot/templates/spec/simple_bot_spec.rb +11 -0
  51. data/lib/openc_bot/templates/spec/spec_helper.rb +13 -0
  52. data/lib/openc_bot/version.rb +3 -0
  53. data/lib/simple_openc_bot.rb +289 -0
  54. data/openc_bot.gemspec +35 -0
  55. data/schemas/company-schema.json +112 -0
  56. data/schemas/includes/address.json +23 -0
  57. data/schemas/includes/base-statement.json +27 -0
  58. data/schemas/includes/company.json +14 -0
  59. data/schemas/includes/filing.json +20 -0
  60. data/schemas/includes/license-data.json +27 -0
  61. data/schemas/includes/officer.json +14 -0
  62. data/schemas/includes/previous_name.json +11 -0
  63. data/schemas/includes/share-parcel-data.json +67 -0
  64. data/schemas/includes/share-parcel.json +60 -0
  65. data/schemas/includes/subsidiary-relationship-data.json +52 -0
  66. data/schemas/includes/total-shares.json +10 -0
  67. data/schemas/licence-schema.json +21 -0
  68. data/schemas/share-parcel-schema.json +21 -0
  69. data/schemas/subsidiary-relationship-schema.json +19 -0
  70. data/spec/dummy_classes/foo_bot.rb +4 -0
  71. data/spec/lib/bot_data_validator_spec.rb +69 -0
  72. data/spec/lib/company_fetcher_bot_spec.rb +93 -0
  73. data/spec/lib/exceptions_spec.rb +25 -0
  74. data/spec/lib/helpers/alpha_search_spec.rb +173 -0
  75. data/spec/lib/helpers/dates_spec.rb +65 -0
  76. data/spec/lib/helpers/incremental_search_spec.rb +471 -0
  77. data/spec/lib/helpers/register_methods_spec.rb +558 -0
  78. data/spec/lib/helpers/text_spec.rb +50 -0
  79. data/spec/lib/openc_bot/db/.gitkeep +0 -0
  80. data/spec/lib/openc_bot/incrementers/common_spec.rb +83 -0
  81. data/spec/lib/openc_bot_spec.rb +116 -0
  82. data/spec/schemas/company-schema_spec.rb +676 -0
  83. data/spec/simple_openc_bot_spec.rb +302 -0
  84. data/spec/spec_helper.rb +19 -0
  85. metadata +300 -0
@@ -0,0 +1,302 @@
1
+ require 'rspec'
2
+ require 'simple_openc_bot'
3
+
4
+ class InvalidLicenceRecord < SimpleOpencBot::BaseLicenceRecord
5
+ end
6
+
7
+ class LicenceRecord < SimpleOpencBot::BaseLicenceRecord
8
+ JURISDICTION = "uk"
9
+ store_fields :name, :type, :sample_date
10
+ unique_fields :name
11
+ schema :licence
12
+
13
+ URL = "http://foo.com"
14
+
15
+ def jurisdiction_classification
16
+ type
17
+ end
18
+
19
+ def last_updated_at
20
+ sample_date
21
+ end
22
+
23
+ def to_pipeline
24
+ {
25
+ sample_date: "",
26
+ company: {
27
+ name: name,
28
+ jurisdiction: JURISDICTION,
29
+ },
30
+ source_url: URL,
31
+ data: [{
32
+ data_type: :licence,
33
+ properties: {
34
+ category: 'Financial',
35
+ jurisdiction_classification: [jurisdiction_classification],
36
+ jurisdiction_code: 'gb'
37
+ }
38
+ }]
39
+ }
40
+ end
41
+
42
+ end
43
+
44
+ class TestLicenceBot < SimpleOpencBot
45
+ yields LicenceRecord
46
+
47
+ def initialize(data={})
48
+ @data = data
49
+ end
50
+
51
+ def fetch_all_records(opts={})
52
+ @data.each do |datum|
53
+ yield LicenceRecord.new(datum)
54
+ end
55
+ end
56
+ end
57
+
58
+ describe InvalidLicenceRecord do
59
+ describe '#last_updated_at not defined' do
60
+ it "should raise an error mentioning to_pipeline" do
61
+ lambda do
62
+ InvalidLicenceRecord.new
63
+ end.should raise_error(/to_pipeline/)
64
+ end
65
+
66
+ it "should raise an error mentioning last_updated_at" do
67
+ lambda do
68
+ InvalidLicenceRecord.new
69
+ end.should raise_error(/last_updated_at/)
70
+ end
71
+
72
+ it "should raise an error mentioning schema" do
73
+ lambda do
74
+ InvalidLicenceRecord.new
75
+ end.should raise_error(/schema/)
76
+ end
77
+ it "should raise an error mentioning unique_fields" do
78
+ lambda do
79
+ InvalidLicenceRecord.new
80
+ end.should raise_error(/unique_fields/)
81
+ end
82
+ it "should raise an error mentioning store_fields" do
83
+ lambda do
84
+ InvalidLicenceRecord.new
85
+ end.should raise_error(/store_fields/)
86
+ end
87
+
88
+ end
89
+ end
90
+
91
+ describe LicenceRecord do
92
+ before do
93
+ @initial_values_hash = {:name => 'Foo',
94
+ :type => 'Bar'}
95
+
96
+ @record = LicenceRecord.new(
97
+ @initial_values_hash
98
+ )
99
+ end
100
+
101
+ describe 'fields' do
102
+ it 'has _type attribute' do
103
+ @record._type.should == 'LicenceRecord'
104
+ end
105
+
106
+ it 'can get attribute' do
107
+ @record.name.should == 'Foo'
108
+ end
109
+
110
+ it 'can set attribute' do
111
+ @record.type = 'Baz'
112
+ @record.type.should == 'Baz'
113
+ end
114
+ end
115
+
116
+ describe "#to_hash" do
117
+ it "should include all the specified fields as a hash" do
118
+ @record.to_hash.should include(@initial_values_hash)
119
+ end
120
+ end
121
+ end
122
+
123
+ describe SimpleOpencBot do
124
+ before do
125
+ end
126
+
127
+ after do
128
+ table_names = %w(ocdata)
129
+ table_names.each do |table_name|
130
+ # flush table, but don't worry if it doesn't exist
131
+ begin
132
+ conn = TestLicenceBot.new.sqlite_magic_connection
133
+ conn.database.execute("DROP TABLE #{table_name}") if conn
134
+ rescue SQLite3::SQLException => e
135
+ raise unless e.message.match(/no such table/)
136
+ end
137
+ end
138
+ end
139
+
140
+
141
+ describe ".update_data" do
142
+ before do
143
+ @properties = [
144
+ {:name => 'Company 1', :type => 'Bank'},
145
+ {:name => 'Company 2', :type => 'Insurer'}
146
+ ]
147
+ @bot = TestLicenceBot.new(@properties)
148
+ end
149
+
150
+ it "should make sqlite database in same directory as bot" do
151
+ root = File.expand_path(File.join(File.dirname(__FILE__), ".."))
152
+ path = File.join(root, "db", "testlicencebot.db")
153
+ SqliteMagic::Connection.should_receive(:new).with(path)
154
+ end
155
+
156
+ it "should call insert_or_update with correct unique fields" do
157
+ @bot.stub(:check_unique_index)
158
+ @bot.sqlite_magic_connection.stub(:add_columns)
159
+ @bot.should_receive(:insert_or_update).with(
160
+ LicenceRecord._unique_fields, anything).twice()
161
+ @bot.update_data
162
+ end
163
+
164
+ it "should update rather than insert rows the second time" do
165
+ @bot.update_data
166
+ @bot.update_data
167
+ @bot.count_stored_records.should == 2
168
+ end
169
+
170
+ it "should raise an error if the unique index has changed" do
171
+ @bot.update_data
172
+ LicenceRecord.stub(:unique_fields).and_return([:type])
173
+ lambda do
174
+ @bot.update_data
175
+ end.should raise_error
176
+ end
177
+
178
+ it "should call insert_or_update with all records in a hash" do
179
+ @bot.stub(:check_unique_index)
180
+ @bot.sqlite_magic_connection.stub(:add_columns)
181
+ @bot.should_receive(:insert_or_update).with(
182
+ anything,
183
+ hash_including(@properties.first))
184
+ @bot.should_receive(:insert_or_update).with(
185
+ anything,
186
+ hash_including(@properties.last))
187
+ @bot.update_data
188
+ end
189
+ end
190
+
191
+ describe "spotcheck_data" do
192
+ before do
193
+ @properties = [
194
+ {:name => 'Company 1', :type => 'Bank'},
195
+ {:name => 'Company 2', :type => 'Insurer'}
196
+ ]
197
+ @bot = TestLicenceBot.new(@properties)
198
+ @bot.update_data
199
+ end
200
+
201
+ it "should return all records the first time" do
202
+ @bot.spotcheck_data.count.should == 2
203
+ end
204
+
205
+ it "should return records converted to pipeline format" do
206
+ @bot.spotcheck_data.any? {|c| c[:company][:name] == @properties[0][:name]}.should be_true
207
+ end
208
+ end
209
+
210
+ describe "export_data" do
211
+ before do
212
+ @properties = [
213
+ {:name => 'Company 1', :type => 'Bank'},
214
+ {:name => 'Company 2', :type => 'Insurer'}
215
+ ]
216
+ @bot = TestLicenceBot.new(@properties)
217
+ @bot.update_data
218
+ end
219
+
220
+ it "should return all records the first time" do
221
+ [*@bot.export_data].count.should == 2
222
+ end
223
+
224
+ it "should return records converted to pipeline format" do
225
+ [*@bot.export_data][0][:company][:name].should == @properties[0][:name]
226
+ end
227
+
228
+ it "should set the last_exported_date on exported records" do
229
+ [*@bot.export_data]
230
+ @bot.all_stored_records.
231
+ map(&:_last_exported_at).compact.should_not be_nil
232
+ end
233
+
234
+ it "should not export data which has been exported before and for which the sample data has not changed" do
235
+ [*@bot.export_data]
236
+ [*@bot.export_data].count.should == 0
237
+ end
238
+
239
+ it "should export data which has been exported before and for which the last_updated_at has changed" do
240
+ results = [*@bot.export_data]
241
+ sleep 0.5 # give sqlite a chance
242
+ LicenceRecord.any_instance.stub(:last_updated_at).and_return(Time.now.iso8601(2))
243
+ bot = TestLicenceBot.new([
244
+ {:name => 'Company 2', :type => 'Insurer'}])
245
+ bot.update_data
246
+ [*@bot.export_data].count.should == 1
247
+ end
248
+ end
249
+
250
+ describe "stored data" do
251
+ before do
252
+ @properties = [
253
+ {:name => 'Company 1', :type => 'Bank'},
254
+ {:name => 'Company 2', :type => 'Insurer'}
255
+ ]
256
+ @bot = TestLicenceBot.new(@properties)
257
+ @bot.update_data
258
+ end
259
+
260
+ describe "#all_stored_records" do
261
+ it "should return an array of LicenceRecords" do
262
+ @bot.all_stored_records.count.should == 2
263
+ @bot.all_stored_records.map(&:class).uniq.should == [LicenceRecord]
264
+ end
265
+ end
266
+
267
+ describe "#export_data" do
268
+ it "should return an array of hashes" do
269
+ result = @bot.export_data
270
+ result.should be_a Enumerable
271
+ result.count.should == @properties.count
272
+ end
273
+
274
+ it "should not re-export data twice" do
275
+ @bot.export_data.count.should_not == 0
276
+ @bot.export_data.count.should == 0
277
+ end
278
+ end
279
+
280
+ describe "#validate_data" do
281
+ before :each do
282
+ SimpleOpencBot.any_instance.stub(:puts)
283
+ end
284
+
285
+ context "valid data" do
286
+ it "should return empty array" do
287
+ result = @bot.validate_data
288
+ result.should be_empty
289
+ end
290
+ end
291
+
292
+ context "invalid data" do
293
+ it "should return an array of hashes with errors" do
294
+ LicenceRecord.any_instance.stub(:to_pipeline).and_return({})
295
+ result = @bot.validate_data
296
+ result.count.should == 2
297
+ result[0][:errors].should_not be_empty
298
+ end
299
+ end
300
+ end
301
+ end
302
+ end
@@ -0,0 +1,19 @@
1
+ require 'rspec/autorun'
2
+ require 'debugger'
3
+
4
+ RSpec.configure do |config|
5
+ end
6
+
7
+ def remove_test_database
8
+ File.delete(test_database_location) if File.exist?(test_database_location)
9
+ end
10
+
11
+ def test_database_location
12
+ db_dir = File.join(File.dirname(__FILE__),'db')
13
+ Dir.mkdir(db_dir) unless Dir.exist?(db_dir)
14
+ File.join(db_dir,'test_db.db')
15
+ end
16
+
17
+ def test_database_connection
18
+ @test_database_connection ||=SqliteMagic::Connection.new(test_database_location)
19
+ end
metadata ADDED
@@ -0,0 +1,300 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: openc_bot
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.11
5
+ platform: ruby
6
+ authors:
7
+ - Chris Taggart
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-06-10 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: activesupport
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
33
+ version: 3.2.17
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 3.2.17
41
+ - !ruby/object:Gem::Dependency
42
+ name: nokogiri
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: json
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: json-schema
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: httpclient
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: backports
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: scraperwiki
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - '='
116
+ - !ruby/object:Gem::Version
117
+ version: 3.0.2
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - '='
123
+ - !ruby/object:Gem::Version
124
+ version: 3.0.2
125
+ - !ruby/object:Gem::Dependency
126
+ name: perftools.rb
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: debugger
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: rspec
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ description: This gem is to make the writing and running of bots for OpenCorporates
168
+ quick and easy
169
+ email:
170
+ - info@opencorporates.com
171
+ executables:
172
+ - openc_bot
173
+ extensions: []
174
+ extra_rdoc_files: []
175
+ files:
176
+ - ".gitignore"
177
+ - ".travis.yml"
178
+ - CHANGELOG.md
179
+ - Gemfile
180
+ - LICENSE.txt
181
+ - README.md
182
+ - Rakefile
183
+ - bin/openc_bot
184
+ - create_bot.sh
185
+ - create_company_bot.sh
186
+ - create_simple_licence_bot.sh
187
+ - db/.gitkeep
188
+ - doc/README-complex.md
189
+ - doc/SCHEMAS.md
190
+ - examples/basic/.gitignore
191
+ - examples/basic/Gemfile
192
+ - examples/basic/config.yml
193
+ - examples/basic/lib/basic.rb
194
+ - examples/basic_with_proxy/Gemfile
195
+ - examples/basic_with_proxy/config.yml
196
+ - examples/basic_with_proxy/lib/basic_with_proxy.rb
197
+ - examples/bot_with_simple_iterator/Gemfile
198
+ - examples/bot_with_simple_iterator/config.yml
199
+ - examples/bot_with_simple_iterator/lib/bot_with_simple_iterator.rb
200
+ - examples/company_fetchers/basic.rb
201
+ - lib/monkey_patches/mechanize.rb
202
+ - lib/openc_bot.rb
203
+ - lib/openc_bot/bot_data_validator.rb
204
+ - lib/openc_bot/company_fetcher_bot.rb
205
+ - lib/openc_bot/exceptions.rb
206
+ - lib/openc_bot/helpers/_csv.rb
207
+ - lib/openc_bot/helpers/alpha_search.rb
208
+ - lib/openc_bot/helpers/dates.rb
209
+ - lib/openc_bot/helpers/html.rb
210
+ - lib/openc_bot/helpers/incremental_search.rb
211
+ - lib/openc_bot/helpers/register_methods.rb
212
+ - lib/openc_bot/helpers/text.rb
213
+ - lib/openc_bot/incrementers.rb
214
+ - lib/openc_bot/incrementers/base.rb
215
+ - lib/openc_bot/incrementers/common.rb
216
+ - lib/openc_bot/tasks.rb
217
+ - lib/openc_bot/templates/README.md
218
+ - lib/openc_bot/templates/bin/export_data
219
+ - lib/openc_bot/templates/bin/fetch_data
220
+ - lib/openc_bot/templates/bin/verify_data
221
+ - lib/openc_bot/templates/config.yml
222
+ - lib/openc_bot/templates/lib/bot.rb
223
+ - lib/openc_bot/templates/lib/company_fetcher_bot.rb
224
+ - lib/openc_bot/templates/lib/simple_bot.rb
225
+ - lib/openc_bot/templates/spec/bot_spec.rb
226
+ - lib/openc_bot/templates/spec/simple_bot_spec.rb
227
+ - lib/openc_bot/templates/spec/spec_helper.rb
228
+ - lib/openc_bot/version.rb
229
+ - lib/simple_openc_bot.rb
230
+ - openc_bot.gemspec
231
+ - schemas/company-schema.json
232
+ - schemas/includes/address.json
233
+ - schemas/includes/base-statement.json
234
+ - schemas/includes/company.json
235
+ - schemas/includes/filing.json
236
+ - schemas/includes/license-data.json
237
+ - schemas/includes/officer.json
238
+ - schemas/includes/previous_name.json
239
+ - schemas/includes/share-parcel-data.json
240
+ - schemas/includes/share-parcel.json
241
+ - schemas/includes/subsidiary-relationship-data.json
242
+ - schemas/includes/total-shares.json
243
+ - schemas/licence-schema.json
244
+ - schemas/share-parcel-schema.json
245
+ - schemas/subsidiary-relationship-schema.json
246
+ - spec/dummy_classes/foo_bot.rb
247
+ - spec/lib/bot_data_validator_spec.rb
248
+ - spec/lib/company_fetcher_bot_spec.rb
249
+ - spec/lib/exceptions_spec.rb
250
+ - spec/lib/helpers/alpha_search_spec.rb
251
+ - spec/lib/helpers/dates_spec.rb
252
+ - spec/lib/helpers/incremental_search_spec.rb
253
+ - spec/lib/helpers/register_methods_spec.rb
254
+ - spec/lib/helpers/text_spec.rb
255
+ - spec/lib/openc_bot/db/.gitkeep
256
+ - spec/lib/openc_bot/incrementers/common_spec.rb
257
+ - spec/lib/openc_bot_spec.rb
258
+ - spec/schemas/company-schema_spec.rb
259
+ - spec/simple_openc_bot_spec.rb
260
+ - spec/spec_helper.rb
261
+ homepage: ''
262
+ licenses: []
263
+ metadata: {}
264
+ post_install_message:
265
+ rdoc_options: []
266
+ require_paths:
267
+ - lib
268
+ - lib/openc_bot/helpers
269
+ required_ruby_version: !ruby/object:Gem::Requirement
270
+ requirements:
271
+ - - ">="
272
+ - !ruby/object:Gem::Version
273
+ version: '0'
274
+ required_rubygems_version: !ruby/object:Gem::Requirement
275
+ requirements:
276
+ - - ">="
277
+ - !ruby/object:Gem::Version
278
+ version: '0'
279
+ requirements: []
280
+ rubyforge_project:
281
+ rubygems_version: 2.2.2
282
+ signing_key:
283
+ specification_version: 4
284
+ summary: Helper gem for writing external bots for OpenCorporates
285
+ test_files:
286
+ - spec/dummy_classes/foo_bot.rb
287
+ - spec/lib/bot_data_validator_spec.rb
288
+ - spec/lib/company_fetcher_bot_spec.rb
289
+ - spec/lib/exceptions_spec.rb
290
+ - spec/lib/helpers/alpha_search_spec.rb
291
+ - spec/lib/helpers/dates_spec.rb
292
+ - spec/lib/helpers/incremental_search_spec.rb
293
+ - spec/lib/helpers/register_methods_spec.rb
294
+ - spec/lib/helpers/text_spec.rb
295
+ - spec/lib/openc_bot/db/.gitkeep
296
+ - spec/lib/openc_bot/incrementers/common_spec.rb
297
+ - spec/lib/openc_bot_spec.rb
298
+ - spec/schemas/company-schema_spec.rb
299
+ - spec/simple_openc_bot_spec.rb
300
+ - spec/spec_helper.rb