turbot-runner 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MzI3NjZjMDc0NzI4Y2M5ZGRmMGY3YTQ2MzVkNWZhZTZkZDkwMjg5OQ==
5
+ data.tar.gz: !binary |-
6
+ NjBiNDk0Mzc1NzdmODdiYjAxNzg4MWFhN2FlOGY1MzRmYzQ3NzY2NA==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ ZWY4ZDlhNjBmZjNhNDBmMDU0OWQwYWIyOTEyYTc4NzdmMzczMzkwMTVmYTE4
10
+ NjUxMTRlOWNiNzlhZjc5ZGVjZmFhZjk4MzA4NjU3OThmZjU0ODViNzY2OGY3
11
+ ODk2NTg3NzYxYTliNzJkZmIwNzU3NmQxNzdjMzUyM2VkMTU4YWQ=
12
+ data.tar.gz: !binary |-
13
+ YTIyYmIzZTI2NDkzODQxYjVmOTM2OTYwNGQ2ODQ5Y2QyMWZhZjE1MDZlZWJj
14
+ NmFmOWFhYzVkMTVkMmRjNjQyZGY4YzVkOGQ5YmE1MTE0ZDMxMTI1Zjg4MGZk
15
+ YTZhZWYzZGRmOWFjYWFmNTU1ZTNhNjdkYzhkNWQ0YWEzNTUxOTA=
@@ -35,15 +35,23 @@ module TurbotRunner
35
35
  retry
36
36
  end
37
37
 
38
- # Read from output file line by line until either we reach the end of the
39
- # file and the script has exited, or @interrupted becomes true.
38
+ # Read from output file buildling up lines byte by byte byte by byte
39
+ # until either we reach the end of the file and the script has exited, or
40
+ # @interrupted becomes true. We cannot use IO#readline here because if
41
+ # only half a line has been synced to the file by the time we read it,
42
+ # then the incomplete line will be read, causing chaos down the line.
43
+ line = ''
44
+
40
45
  until @interrupted do
41
- begin
42
- line = f.readline
43
- @processor.process(line)
44
- rescue EOFError
46
+ byte = f.read(1)
47
+ if byte.nil?
45
48
  break unless script_thread.alive?
46
49
  sleep 0.1
50
+ elsif byte == "\n"
51
+ @processor.process(line)
52
+ line = ''
53
+ else
54
+ line << byte
47
55
  end
48
56
  end
49
57
 
@@ -1,3 +1,3 @@
1
1
  module TurbotRunner
2
- VERSION = '0.1.5'
2
+ VERSION = '0.1.6'
3
3
  end
@@ -35,6 +35,18 @@
35
35
  "registry_url": {
36
36
  "type": "string"
37
37
  },
38
+ "website": {
39
+ "type": "string",
40
+ "minLength": 5
41
+ },
42
+ "telephone_number": {
43
+ "type": "string",
44
+ "minLength": 4
45
+ },
46
+ "fax_number": {
47
+ "type": "string",
48
+ "minLength": 4
49
+ },
38
50
  "registered_address": {
39
51
  "$ref": "includes/address.json"
40
52
  },
@@ -4,7 +4,7 @@
4
4
  "type": "object",
5
5
  "properties": { "name": { "type": "string" },
6
6
  "code": { "type": "string" },
7
- "code_scheme_id": { "type": "string", "enum": ["eu_nace_2", "uk_sic_2003", "uk_sic_2007", "us_naics_2002", "us_naics_2007", "be_nace_2008"] },
7
+ "code_scheme_id": { "type": "string", "enum": ["eu_nace_2", "uk_sic_2003", "uk_sic_2007", "us_naics_2002", "us_naics_2007", "be_nace_2008", "dk_db_2007"] },
8
8
  "start_date": { "type": "date" },
9
9
  "end_date": { "type": "date" }
10
10
  },
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turbot-runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
5
- prerelease:
4
+ version: 0.1.6
6
5
  platform: ruby
7
6
  authors:
8
7
  - OpenCorporates
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-08-12 00:00:00.000000000 Z
11
+ date: 2014-08-13 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: json-schema
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - '='
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - '='
28
25
  - !ruby/object:Gem::Version
@@ -42,6 +39,28 @@ files:
42
39
  - lib/turbot_runner/runner.rb
43
40
  - lib/turbot_runner/script_runner.rb
44
41
  - lib/turbot_runner/version.rb
42
+ - schema/schemas/company-schema.json
43
+ - schema/schemas/financial-payment-schema.json
44
+ - schema/schemas/includes/address.json
45
+ - schema/schemas/includes/alternative_name.json
46
+ - schema/schemas/includes/company.json
47
+ - schema/schemas/includes/filing.json
48
+ - schema/schemas/includes/financial-payment-data-object.json
49
+ - schema/schemas/includes/industry_code.json
50
+ - schema/schemas/includes/licence-data-object.json
51
+ - schema/schemas/includes/officer.json
52
+ - schema/schemas/includes/previous_name.json
53
+ - schema/schemas/includes/share-parcel-data.json
54
+ - schema/schemas/includes/share-parcel.json
55
+ - schema/schemas/includes/subsidiary-relationship-data.json
56
+ - schema/schemas/includes/total-shares.json
57
+ - schema/schemas/licence-schema.json
58
+ - schema/schemas/primary-data-schema.json
59
+ - schema/schemas/share-parcel-schema.json
60
+ - schema/schemas/simple-financial-payment-schema.json
61
+ - schema/schemas/simple-licence-schema.json
62
+ - schema/schemas/simple-subsidiary-schema.json
63
+ - schema/schemas/subsidiary-relationship-schema.json
45
64
  - spec/bots/bot-that-crashes-in-scraper/manifest.json
46
65
  - spec/bots/bot-that-crashes-in-scraper/scraper.rb
47
66
  - spec/bots/bot-that-crashes-in-transformer/manifest.json
@@ -77,51 +96,29 @@ files:
77
96
  - spec/outputs/full-scraper.out
78
97
  - spec/outputs/full-transformer.out
79
98
  - spec/outputs/truncated-scraper.out
80
- - schema/schemas/company-schema.json
81
- - schema/schemas/financial-payment-schema.json
82
- - schema/schemas/includes/address.json
83
- - schema/schemas/includes/alternative_name.json
84
- - schema/schemas/includes/company.json
85
- - schema/schemas/includes/filing.json
86
- - schema/schemas/includes/financial-payment-data-object.json
87
- - schema/schemas/includes/industry_code.json
88
- - schema/schemas/includes/licence-data-object.json
89
- - schema/schemas/includes/officer.json
90
- - schema/schemas/includes/previous_name.json
91
- - schema/schemas/includes/share-parcel-data.json
92
- - schema/schemas/includes/share-parcel.json
93
- - schema/schemas/includes/subsidiary-relationship-data.json
94
- - schema/schemas/includes/total-shares.json
95
- - schema/schemas/licence-schema.json
96
- - schema/schemas/primary-data-schema.json
97
- - schema/schemas/share-parcel-schema.json
98
- - schema/schemas/simple-financial-payment-schema.json
99
- - schema/schemas/simple-licence-schema.json
100
- - schema/schemas/simple-subsidiary-schema.json
101
- - schema/schemas/subsidiary-relationship-schema.json
102
99
  homepage: http://turbot.opencorporates.com/
103
100
  licenses:
104
101
  - MIT
102
+ metadata: {}
105
103
  post_install_message:
106
104
  rdoc_options: []
107
105
  require_paths:
108
106
  - lib
109
107
  required_ruby_version: !ruby/object:Gem::Requirement
110
- none: false
111
108
  requirements:
112
109
  - - ! '>='
113
110
  - !ruby/object:Gem::Version
114
111
  version: 1.9.2
115
112
  required_rubygems_version: !ruby/object:Gem::Requirement
116
- none: false
117
113
  requirements:
118
114
  - - ! '>='
119
115
  - !ruby/object:Gem::Version
120
116
  version: '0'
121
117
  requirements: []
122
118
  rubyforge_project:
123
- rubygems_version: 1.8.23
119
+ rubygems_version: 2.2.2
124
120
  signing_key:
125
- specification_version: 3
121
+ specification_version: 4
126
122
  summary: Utilities for running bots with Turbot
127
123
  test_files: []
124
+ has_rdoc: