turbot-runner-morph 0.0.13 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 5b2107fc7101e0b01a5094ac0c107ef5ee21f5c1
4
- data.tar.gz: 85d4e524991337c0aa2dd59423cf8ddae327ed24
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ OTE4ZDRmNDVhZjA4Mzg0MzdlNDJiYmU3ZTY5OTEzNDMzZjg3ZTUzYQ==
5
+ data.tar.gz: !binary |-
6
+ YmM3MjhkN2RmMDQ0NzU1OGM3NzQ3MGI3MTM1YWQxZDkyOTc4NzcwMg==
5
7
  SHA512:
6
- metadata.gz: a47c49005ecbb2009313062c937d417975d0e4b19da6a1488f8c42d80bfd12b923dee9bc189ef335b654ccbe887de6357763bac3e2c8ad249b76dd105b6923c0
7
- data.tar.gz: 7daf02c5914d326f4185a7248b2dc774ec65e74fcf1de8520f0a58cfbe94296db2a0ec68b58a02be2acab5071fab0677176f4a73b7724aabb642837728dac5c2
8
+ metadata.gz: !binary |-
9
+ MmEyZDIwNGU4ODg4NDlhOGZkZWMzYmY0M2UzYWY5NTFkNjQzYmNkNDQ1YjEx
10
+ NDA0NDFiYzBiZmQwN2M2ODg0YzMxYjE3OGExOWE0MmViYWE2MzBlNjk5ZDJi
11
+ OWE0YWQxYjllZWVjMWEyYzVmYWM4MTEwNThlZGIyMzc1YmQ3MTA=
12
+ data.tar.gz: !binary |-
13
+ ZWE3Mzc5Y2E5ZTBiY2RiYmEwZjIyNzI5YjNiYTg3YmJkOWI0YjljZGRjOTQy
14
+ Y2VjM2Q2NGMyNzI1NGNiZDAxNWYwZjU4NWIwNmVhNDNmMmY0NGNlZjgxYjlk
15
+ MDdjZWI5MDE5NDE5YWZmNWEyODViNzIyMjk0NzQyNTM1NDI5MTk=
data/.gitignore CHANGED
@@ -1,12 +1,15 @@
1
- /.bundle
1
+ *.gem
2
+ .bundle
3
+ .yardoc
4
+ coverage
5
+ Gemfile.lock
6
+ doc/*
7
+ pkg/*
2
8
  /.rvmrc
3
- /coverage
4
- /pkg
5
- /rdoc
6
9
  /tags
7
10
  /vendor
8
11
  /.rbenv-version
12
+ /spec/bots/*/output
9
13
  *~
10
14
  .#*
11
15
  #*#
12
- /spec/bots/*/output
@@ -1,3 +1,3 @@
1
1
  [submodule "schema"]
2
2
  path = schema
3
- url = git@github.com:openc/openc-schema.git
3
+ url = https://github.com/openc/openc-schema.git
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --color
2
+ --require spec_helper
3
+ --order random
@@ -0,0 +1,11 @@
1
+ sudo: false
2
+ language: ruby
3
+ cache: bundler
4
+ rvm:
5
+ - 1.9.3
6
+ - 2.0.0
7
+ - 2.1.0
8
+ - 2.2.0
9
+ - 2.3.0
10
+ script:
11
+ bundle exec rspec --exclude-pattern "spec/manual_spec.rb"
data/README.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # turbot-runner-morph
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/turbot-runner-morph.svg)](https://badge.fury.io/rb/turbot-runner-morph)
4
+ [![Build Status](https://secure.travis-ci.org/openc/turbot-runner-morph.png)](https://travis-ci.org/openc/turbot-runner-morph)
5
+ [![Dependency Status](https://gemnasium.com/openc/turbot-runner-morph.png)](https://gemnasium.com/openc/turbot-runner-morph)
6
+ [![Coverage Status](https://coveralls.io/repos/openc/turbot-runner-morph/badge.png)](https://coveralls.io/r/openc/turbot-runner-morph)
7
+ [![Code Climate](https://codeclimate.com/github/openc/turbot-runner-morph.png)](https://codeclimate.com/github/openc/turbot-runner-morph)
8
+
3
9
  ## Getting started
4
10
 
5
11
  git submodule update --init
@@ -17,4 +23,9 @@ Bump the version in `lib/turbot_runner/version.rb` according to the [Semantic Ve
17
23
  git commit lib/turbot_runner/version.rb -m 'Release new version'
18
24
  rake release # requires Rubygems credentials
19
25
 
20
- Finally, [rebuild the Docker image](https://github.com/openc/morph-docker-ruby#readme).
26
+ In [morph](https://github.com/sebbacon/morph), run:
27
+
28
+ bundle update turbot-runner-morph
29
+ git commit Gemfile.lock -m 'Bump turbot-runner-morph' && git push
30
+
31
+ Finally, deploy [morph](https://github.com/sebbacon/morph).
@@ -1,3 +1,3 @@
1
1
  # Disable output buffering
2
- STDOUT.sync = true
3
- STDERR.sync = true
2
+ $stdout.sync = true
3
+ $stderr.sync = true
@@ -7,6 +7,7 @@ module TurbotRunner
7
7
  @data_type = script_config[:data_type]
8
8
  @identifying_fields = script_config[:identifying_fields]
9
9
  @record_handler = record_handler
10
+ # @seen_uids = script_config[:duplicates_allowed] ? nil : Set.new
10
11
  end
11
12
 
12
13
  def process(line)
@@ -17,12 +18,14 @@ module TurbotRunner
17
18
  else
18
19
  record = Openc::JsonSchema.convert_dates(schema_path, JSON.parse(line))
19
20
 
21
+ # TODO Document why we aren't passing retrieved_at to the validator.
20
22
  record_to_validate = record.select {|k, v| k != 'retrieved_at'}
21
23
 
22
24
  error_message = Validator.validate(
23
25
  @data_type,
24
26
  record_to_validate,
25
27
  @identifying_fields
28
+ # @seen_uids
26
29
  )
27
30
 
28
31
  if error_message.nil?
@@ -4,9 +4,9 @@ require 'pathname'
4
4
 
5
5
  module TurbotRunner
6
6
  class Runner
7
- RC_OK = 0
8
- RC_SCRAPER_FAILED = 1
9
- RC_TRANSFORMER_FAILED = 2
7
+ RC_OK = 0
8
+ RC_SCRAPER_FAILED = 1
9
+ RC_TRANSFORMER_FAILED = 2
10
10
 
11
11
  attr_reader :base_directory
12
12
 
@@ -17,13 +17,13 @@ module TurbotRunner
17
17
  @record_handler = options[:record_handler]
18
18
  @log_to_file = options[:log_to_file]
19
19
  @timeout = options[:timeout]
20
+ @scraper_provided = options[:scraper_provided]
20
21
  if options[:output_directory]
21
22
  assert_absolute_path(options[:output_directory])
22
23
  @output_directory = options[:output_directory]
23
24
  else
24
25
  @output_directory = File.join(@base_directory, 'output')
25
26
  end
26
- @scraper_provided = options[:scraper_provided]
27
27
  end
28
28
 
29
29
  def run
@@ -38,9 +38,10 @@ module TurbotRunner
38
38
  # Run the transformers even if the scraper fails
39
39
  transformers_succeeded = true
40
40
  transformers.each do |transformer_config|
41
- config = transformer_config.merge(
41
+ config = transformer_config.merge({
42
42
  :base_directory => @base_directory,
43
- )
43
+ # :duplicates_allowed => duplicates_allowed,
44
+ })
44
45
  transformers_succeeded = run_script(config, input_file=scraper_output_file) && transformers_succeeded
45
46
  end
46
47
 
@@ -164,7 +165,8 @@ module TurbotRunner
164
165
  :base_directory => @base_directory,
165
166
  :file => scraper_script,
166
167
  :data_type => scraper_data_type,
167
- :identifying_fields => scraper_identifying_fields
168
+ :identifying_fields => scraper_identifying_fields,
169
+ # :duplicates_allowed => duplicates_allowed,
168
170
  }
169
171
  end
170
172
 
@@ -192,6 +194,10 @@ module TurbotRunner
192
194
  @config[:identifying_fields]
193
195
  end
194
196
 
197
+ # def duplicates_allowed
198
+ # @config[:duplicates_allowed]
199
+ # end
200
+
195
201
  def assert_absolute_path(path)
196
202
  unless Pathname.new(path).absolute?
197
203
  raise "#{path} must be an absolute path"
@@ -6,23 +6,21 @@ module TurbotRunner
6
6
  schema_path = TurbotRunner.schema_path(data_type)
7
7
  error = Openc::JsonSchema.validate(schema_path, record)
8
8
 
9
- message = nil
9
+ if error
10
+ return error[:message]
11
+ end
10
12
 
11
- if error.nil?
12
- flattened_record = TurbotRunner::Utils.flatten(record)
13
+ flattened_record = TurbotRunner::Utils.flatten(record)
13
14
 
14
- identifying_attributes = flattened_record.reject do |k, v|
15
- !identifying_fields.include?(k) || v.nil? || v == ''
16
- end
15
+ identifying_attributes = flattened_record.reject do |k, v|
16
+ !identifying_fields.include?(k) || v.nil? || v == ''
17
+ end
17
18
 
18
- if identifying_attributes.empty?
19
- message = "There were no values provided for any of the identifying fields: #{identifying_fields.join(', ')}"
20
- end
21
- else
22
- message = error[:message]
19
+ if identifying_attributes.empty?
20
+ return "There were no values provided for any of the identifying fields: #{identifying_fields.join(', ')}"
23
21
  end
24
22
 
25
- message
23
+ nil
26
24
  end
27
25
  end
28
26
  end
@@ -1,3 +1,3 @@
1
1
  module TurbotRunner
2
- VERSION = '0.0.13'
2
+ VERSION = '0.0.14'
3
3
  end
@@ -45,7 +45,7 @@
45
45
  "description": "The type of creation",
46
46
  "type": "array",
47
47
  "items": {
48
- "$ref": "includes/classification.json"
48
+ "type": "string"
49
49
  }
50
50
  },
51
51
  "body": {
@@ -99,7 +99,7 @@
99
99
  "description": "The type of registration",
100
100
  "type": "array",
101
101
  "items": {
102
- "$ref": "includes/classification.json"
102
+ "type": "string"
103
103
  }
104
104
  },
105
105
  "body": {
@@ -158,7 +158,7 @@
158
158
  "description": "The type of sale",
159
159
  "type": "array",
160
160
  "items": {
161
- "$ref": "includes/classification.json"
161
+ "type": "string"
162
162
  }
163
163
  },
164
164
  "body": {
@@ -243,7 +243,7 @@
243
243
  "description": "The type of judgment",
244
244
  "type": "array",
245
245
  "items": {
246
- "$ref": "includes/classification.json"
246
+ "type": "string"
247
247
  }
248
248
  },
249
249
  "body": {
@@ -271,7 +271,7 @@
271
271
  "description": "The type of judgment",
272
272
  "type": "array",
273
273
  "items": {
274
- "$ref": "includes/classification.json"
274
+ "type": "string"
275
275
  }
276
276
  },
277
277
  "body": {
@@ -353,7 +353,7 @@
353
353
  "description": "The type of filing",
354
354
  "type": "array",
355
355
  "items": {
356
- "$ref": "includes/classification.json"
356
+ "type": "string"
357
357
  }
358
358
  },
359
359
  "body": {
@@ -142,7 +142,7 @@ describe TurbotRunner::Processor do
142
142
  }
143
143
 
144
144
  expect(TurbotRunner::Validator).to receive(:validate).
145
- with('primary data', expected_record_to_validate, ['number'])
145
+ with('primary data', expected_record_to_validate, ['number']) #, Set.new)
146
146
  @processor.process(record.to_json)
147
147
  end
148
148
  end
@@ -173,7 +173,7 @@ describe TurbotRunner::Runner do
173
173
  context 'with a handler that interrupts the runner' do
174
174
  before do
175
175
  class Handler < TurbotRunner::BaseHandler
176
- def initialize(*)
176
+ def initialize
177
177
  @count = 0
178
178
  super
179
179
  end
@@ -249,13 +249,34 @@ describe TurbotRunner::Runner do
249
249
  end
250
250
  end
251
251
 
252
+ # context 'with a bot that produces duplicate data' do
253
+ # before do
254
+ # @runner = test_runner('bot-that-produces-duplicates')
255
+ # end
256
+
257
+ # it 'raises returns false' do
258
+ # expect(@runner).to fail_in_scraper
259
+ # end
260
+ # end
261
+
262
+ # context 'with a bot that is expected to produce duplicate data' do
263
+ # before do
264
+ # @runner = test_runner('bot-that-is-allowed-to-produce-duplicates')
265
+ # end
266
+
267
+ # it 'raises returns false' do
268
+ # expect(@runner).to succeed
269
+ # end
270
+ # end
271
+
252
272
  context 'when the scraped data is provided' do
253
273
  before do
274
+ @runner = test_runner('bot-with-transformer', :scraper_provided => true)
275
+ @runner.set_up_output_directory
254
276
  FileUtils.cp(
255
277
  File.join('spec', 'outputs', 'full-scraper.out'),
256
278
  File.join(File.dirname(__FILE__), '../bots', 'bot-with-transformer', 'output', 'scraper.out')
257
279
  )
258
- @runner = test_runner('bot-with-transformer', :scraper_provided => true)
259
280
  end
260
281
 
261
282
  it 'does not run scraper' do
@@ -281,8 +302,8 @@ describe TurbotRunner::Runner do
281
302
  class Handler < TurbotRunner::BaseHandler
282
303
  attr_reader :records_seen
283
304
 
284
- def initialize(*)
285
- @records_seen = Hash.new {|h, k| h[k] = 0}
305
+ def initialize
306
+ @records_seen = Hash.new(0)
286
307
  super
287
308
  end
288
309
 
@@ -309,7 +330,7 @@ describe TurbotRunner::Runner do
309
330
  it 'can cope when scraper has failed immediately' do
310
331
  test_runner('bot-that-crashes-immediately').run
311
332
 
312
- runner = test_runner('bot-with-transformer',
333
+ runner = test_runner('bot-that-crashes-immediately',
313
334
  :record_handler => @handler
314
335
  )
315
336
 
@@ -323,63 +344,21 @@ describe TurbotRunner::Runner do
323
344
  end
324
345
 
325
346
  it 'clears existing output' do
347
+ @runner.set_up_output_directory
326
348
  path = File.join(@runner.base_directory, 'output', 'scraper.out')
327
349
  FileUtils.touch(path)
350
+
328
351
  @runner.set_up_output_directory
329
352
  expect(File.exist?(path)).to be(false)
330
353
  end
331
354
 
332
355
  it 'does not clear existing files that are not output files' do
356
+ @runner.set_up_output_directory
333
357
  path = File.join(@runner.base_directory, 'output', 'stdout')
334
358
  FileUtils.touch(path)
359
+
335
360
  @runner.set_up_output_directory
336
361
  expect(File.exist?(path)).to be(true)
337
362
  end
338
363
  end
339
364
  end
340
-
341
-
342
- RSpec::Matchers.define(:have_output) do |script, expected|
343
- match do |runner|
344
- expected_path = File.join('spec', 'outputs', expected)
345
- expected_output = File.readlines(expected_path).map {|line| JSON.parse(line)}
346
- actual_path = File.join(runner.base_directory, 'output', "#{script}.out")
347
- actual_output = File.readlines(actual_path).map {|line| JSON.parse(line)}
348
- expect(expected_output).to eq(actual_output)
349
- end
350
- end
351
-
352
-
353
- RSpec::Matchers.define(:have_error_output_matching) do |script, expected|
354
- match do |runner|
355
- actual_path = File.join(runner.base_directory, 'output', "#{script}.err")
356
- actual_output = File.read(actual_path)
357
- expect(actual_output).to match(expected)
358
- end
359
- end
360
-
361
-
362
- RSpec::Matchers.define(:succeed) do
363
- match do |runner|
364
- expect(runner.run).to eq(TurbotRunner::Runner::RC_OK)
365
- end
366
- end
367
-
368
-
369
- RSpec::Matchers.define(:fail_in_scraper) do
370
- match do |runner|
371
- expect(runner.run).to eq(TurbotRunner::Runner::RC_SCRAPER_FAILED)
372
- end
373
- end
374
-
375
-
376
- RSpec::Matchers.define(:fail_in_transformer) do
377
- match do |runner|
378
- expect(runner.run).to eq(TurbotRunner::Runner::RC_TRANSFORMER_FAILED)
379
- end
380
- end
381
-
382
- def test_runner(name, opts={})
383
- test_bot_location = File.join(File.dirname(__FILE__), '../bots', name)
384
- TurbotRunner::Runner.new(test_bot_location, opts)
385
- end
@@ -58,7 +58,7 @@ describe TurbotRunner::Validator do
58
58
  'four' => {}
59
59
  }
60
60
  identifying_fields = ['one.two.three', 'four.five.six']
61
- error = TurbotRunner::Validator.validate('primary-data', record, identifying_fields)
61
+ error = TurbotRunner::Validator.validate('primary-data', record, identifying_fields) #, Set.new)
62
62
  expect(error).to eq('There were no values provided for any of the identifying fields: one.two.three, four.five.six')
63
63
  end
64
64
 
@@ -69,7 +69,7 @@ describe TurbotRunner::Validator do
69
69
  'one' => {'two' => {'three' => 123}}
70
70
  }
71
71
  identifying_fields = ['one.two.three', 'four.five.six']
72
- error = TurbotRunner::Validator.validate('primary-data', record, identifying_fields)
72
+ error = TurbotRunner::Validator.validate('primary-data', record, identifying_fields) #, Set.new)
73
73
  expect(error).to eq(nil)
74
74
  end
75
75
 
@@ -81,9 +81,47 @@ describe TurbotRunner::Validator do
81
81
  'four' => {'five' => {'six' => 456}}
82
82
  }
83
83
  identifying_fields = ['one.two.three', 'four.five.six']
84
- error = TurbotRunner::Validator.validate('primary-data', record, identifying_fields)
84
+ error = TurbotRunner::Validator.validate('primary-data', record, identifying_fields) #, Set.new)
85
85
  expect(error).to eq(nil)
86
86
  end
87
87
  end
88
+
89
+ # specify 'with duplicate record' do
90
+ # record = {
91
+ # 'sample_date' => '2014-06-01',
92
+ # 'source_url' => 'http://example.com/123',
93
+ # 'number' => 123
94
+ # }
95
+
96
+ # seen_uids = Set.new
97
+ # error = TurbotRunner::Validator.validate('primary-data', record, ['number'], seen_uids)
98
+ # expect(error).to eq(nil)
99
+
100
+ # error = TurbotRunner::Validator.validate('primary-data', record, ['number'], seen_uids)
101
+ # expect(error).to eq('Already seen record with these identifying fields: {"number"=>123}')
102
+ # end
103
+ # end
104
+
105
+ # describe '.identifying_hash' do
106
+ # specify 'returns expected hash' do
107
+ # record = {'aaa' => 'bbb', 'yyy' => 'zzz'}
108
+ # expect(TurbotRunner::Validator.identifying_hash(record, ['aaa'])).to eq({'aaa' => 'bbb'})
109
+
110
+ # record = {'aaa' => {'bbb' => 'ccc'}, 'yyy' => 'zzz'}
111
+ # expect(TurbotRunner::Validator.identifying_hash(record, ['aaa.bbb'])).to eq({'aaa.bbb' => 'ccc'})
112
+ # end
113
+
114
+ # specify 'returns empty hash for records with no values for identifying fields' do
115
+ # record = {'yyy' => 'zzz'}
116
+ # expect(TurbotRunner::Validator.identifying_hash(record, ['aaa'])).to eq({})
117
+ # end
118
+
119
+ # specify 'returns nil for records where value of identifying field is a hash' do
120
+ # record = {'aaa' => {'bbb' => 'ccc'}, 'yyy' => 'zzz'}
121
+ # expect(TurbotRunner::Validator.identifying_hash(record, ['aaa'])).to be(nil)
122
+
123
+ # record = {'aaa' => {'bbb' => {'ccc' => 'ddd'}}, 'yyy' => 'zzz'}
124
+ # expect(TurbotRunner::Validator.identifying_hash(record, ['aaa.bbb'])).to be(nil)
125
+ # end
88
126
  end
89
127
  end
@@ -1,20 +1,17 @@
1
- require 'turbot_runner'
1
+ require 'rubygems'
2
2
 
3
- RSpec::Matchers.define(:fail_validation_with) do |expected_error|
4
- match do |record|
5
- identifying_fields = ['number']
6
- @error = TurbotRunner::Validator.validate('primary-data', record, identifying_fields)
7
- expect(@error).to eq(expected_error)
8
- end
9
-
10
- failure_message do |actual|
11
- "Expected error to be #{expected_error}, but was #{@error}"
12
- end
3
+ require 'simplecov'
4
+ require 'coveralls'
5
+ SimpleCov.formatter = Coveralls::SimpleCov::Formatter
6
+ SimpleCov.start do
7
+ add_filter 'spec'
13
8
  end
14
9
 
15
- RSpec::Matchers.define(:be_valid) do
16
- match do |record|
17
- identifying_fields = ['number']
18
- expect(TurbotRunner::Validator.validate('primary-data', record, identifying_fields)).to eq(nil)
19
- end
10
+ require 'rspec'
11
+
12
+ Dir['./spec/support/**/*.rb'].sort.each { |f| require f}
13
+ require File.dirname(__FILE__) + '/../lib/turbot_runner'
14
+
15
+ RSpec.configure do |c|
16
+ c.include(Helpers)
20
17
  end
@@ -0,0 +1,58 @@
1
+ RSpec::Matchers.define(:fail_validation_with) do |expected_error|
2
+ match do |record|
3
+ identifying_fields = ['number']
4
+ @error = TurbotRunner::Validator.validate('primary-data', record, identifying_fields) #, Set.new)
5
+ expect(@error).to eq(expected_error)
6
+ end
7
+
8
+ failure_message do |actual|
9
+ "Expected error to be #{expected_error}, but was #{@error}"
10
+ end
11
+ end
12
+
13
+ RSpec::Matchers.define(:be_valid) do
14
+ match do |record|
15
+ identifying_fields = ['number']
16
+ expect(TurbotRunner::Validator.validate('primary-data', record, identifying_fields)).to eq(nil) #, Set.new)
17
+ end
18
+ end
19
+
20
+ RSpec::Matchers.define(:have_output) do |script, expected|
21
+ match do |runner|
22
+ expected_path = File.join('spec', 'outputs', expected)
23
+ @expected_output = File.readlines(expected_path).map {|line| JSON.parse(line)}
24
+ actual_path = File.join(runner.base_directory, 'output', "#{script}.out")
25
+ @actual_output = File.readlines(actual_path).map {|line| JSON.parse(line)}
26
+ expect(@expected_output).to eq(@actual_output)
27
+ end
28
+
29
+ failure_message do |actual|
30
+ "Expected output to be #{@expected_output}, but was #{@actual_output}"
31
+ end
32
+ end
33
+
34
+ RSpec::Matchers.define(:have_error_output_matching) do |script, expected|
35
+ match do |runner|
36
+ actual_path = File.join(runner.base_directory, 'output', "#{script}.err")
37
+ actual_output = File.read(actual_path)
38
+ expect(actual_output).to match(expected)
39
+ end
40
+ end
41
+
42
+ RSpec::Matchers.define(:succeed) do
43
+ match do |runner|
44
+ expect(runner.run).to eq(TurbotRunner::Runner::RC_OK)
45
+ end
46
+ end
47
+
48
+ RSpec::Matchers.define(:fail_in_scraper) do
49
+ match do |runner|
50
+ expect(runner.run).to eq(TurbotRunner::Runner::RC_SCRAPER_FAILED)
51
+ end
52
+ end
53
+
54
+ RSpec::Matchers.define(:fail_in_transformer) do
55
+ match do |runner|
56
+ expect(runner.run).to eq(TurbotRunner::Runner::RC_TRANSFORMER_FAILED)
57
+ end
58
+ end
@@ -0,0 +1,6 @@
1
+ module Helpers
2
+ def test_runner(name, opts={})
3
+ test_bot_location = File.join(File.dirname(__FILE__), '../bots', name)
4
+ TurbotRunner::Runner.new(test_bot_location, opts)
5
+ end
6
+ end
@@ -17,10 +17,10 @@ Gem::Specification.new do |gem|
17
17
 
18
18
  gem.required_ruby_version = '>=1.9.2'
19
19
 
20
- # gem.add_dependency "activesupport", '~>4.1.0'
20
+ # gem.add_dependency "activesupport", '~> 4.1.4'
21
21
  gem.add_dependency "openc-json_schema"
22
- gem.add_development_dependency "pry"
22
+
23
+ gem.add_development_dependency "coveralls"
23
24
  gem.add_development_dependency "rake"
24
- gem.add_development_dependency "rspec", ">= 3.0"
25
- gem.add_development_dependency "rspec-mocks", ">= 3.0"
25
+ gem.add_development_dependency "rspec", "~> 3.4.0"
26
26
  end
metadata CHANGED
@@ -1,98 +1,84 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turbot-runner-morph
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenCorporates
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-03 00:00:00.000000000 Z
11
+ date: 2016-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: openc-json_schema
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - ! '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: pry
28
+ name: coveralls
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - ! '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - ! '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - ! '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - ! '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
- version: '3.0'
61
+ version: 3.4.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
- version: '3.0'
69
- - !ruby/object:Gem::Dependency
70
- name: rspec-mocks
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '3.0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '3.0'
68
+ version: 3.4.0
83
69
  description:
84
70
  email: bots@opencorporates.com
85
- executables:
86
- - rspec
71
+ executables: []
87
72
  extensions: []
88
73
  extra_rdoc_files: []
89
74
  files:
90
- - ".gitignore"
91
- - ".gitmodules"
75
+ - .gitignore
76
+ - .gitmodules
77
+ - .rspec
78
+ - .travis.yml
92
79
  - Gemfile
93
80
  - README.md
94
81
  - Rakefile
95
- - bin/rspec
96
82
  - lib/turbot_runner.rb
97
83
  - lib/turbot_runner/base_handler.rb
98
84
  - lib/turbot_runner/exceptions.rb
@@ -191,6 +177,8 @@ files:
191
177
  - spec/outputs/full-transformer.out
192
178
  - spec/outputs/truncated-scraper.out
193
179
  - spec/spec_helper.rb
180
+ - spec/support/custom_matchers.rb
181
+ - spec/support/helpers.rb
194
182
  - turbot-runner-morph.gemspec
195
183
  homepage: http://turbot.opencorporates.com/
196
184
  licenses:
@@ -202,17 +190,17 @@ require_paths:
202
190
  - lib
203
191
  required_ruby_version: !ruby/object:Gem::Requirement
204
192
  requirements:
205
- - - ">="
193
+ - - ! '>='
206
194
  - !ruby/object:Gem::Version
207
195
  version: 1.9.2
208
196
  required_rubygems_version: !ruby/object:Gem::Requirement
209
197
  requirements:
210
- - - ">="
198
+ - - ! '>='
211
199
  - !ruby/object:Gem::Version
212
200
  version: '0'
213
201
  requirements: []
214
202
  rubyforge_project:
215
- rubygems_version: 2.4.5
203
+ rubygems_version: 2.5.2
216
204
  signing_key:
217
205
  specification_version: 4
218
206
  summary: Utilities for running bots with Turbot
@@ -268,4 +256,5 @@ test_files:
268
256
  - spec/outputs/full-transformer.out
269
257
  - spec/outputs/truncated-scraper.out
270
258
  - spec/spec_helper.rb
271
- has_rdoc:
259
+ - spec/support/custom_matchers.rb
260
+ - spec/support/helpers.rb
data/bin/rspec DELETED
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'rspec' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require 'pathname'
10
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require 'rubygems'
14
- require 'bundler/setup'
15
-
16
- load Gem.bin_path('rspec-core', 'rspec')