turbot-runner 0.1.1 → 0.1.2
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.
- checksums.yaml +8 -8
- data/lib/turbot_runner/runner.rb +5 -8
- data/lib/turbot_runner/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OGRmMDE3MWQzOWExZWY2NGFiYzQ5MzJjNDM5MjU2ZmZlMGRjNjc4YQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OWM2MWU5ZTNlY2M1MzFlMzg4OWI1MmVmZTFiMjdjYTQ0MWMwNDU2YQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZjBlYzAyM2Y5ZjMwNDQ2ZmY3YzA0ZWMzODIwYTNlYzJiOTkzZjMxYmI3NmVh
|
10
|
+
YWZjN2ZhYTEzMTNlYmM2YmE4Y2ZkMWMyZWEwZWMwMjY5MDEwNzRmYWMwM2Nm
|
11
|
+
NGE1ZWJiYTAzZDU0YTM3NzhlNTY4NDI1YmQxYmI4OGEwMzAyM2Y=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZGE1OTJkOWJkZjNlODVhNTFjMzk0OWZlYjE5OGI2NjNjMmM2OTA1YTEzN2M1
|
14
|
+
NmUxOGM4YzIzODg2MjBjZTRmNzU3ZTZkNDMwZDgyNzQ4NjEzYmQ0YzQwZmJl
|
15
|
+
MGZlODQ2NmQ3YTU0YmE2MDkyZDFlM2I0ZDcyNmQ3NzZmMzZkM2U=
|
data/lib/turbot_runner/runner.rb
CHANGED
@@ -11,11 +11,12 @@ module TurbotRunner
|
|
11
11
|
@record_handler = options[:record_handler]
|
12
12
|
@log_to_file = options[:log_to_file]
|
13
13
|
@timeout = options[:timeout]
|
14
|
+
@output_directory = options[:output_directory] || File.join(@directory, 'output')
|
14
15
|
end
|
15
16
|
|
16
17
|
def run
|
17
|
-
FileUtils.rm_rf(output_directory)
|
18
|
-
FileUtils.mkdir_p(output_directory)
|
18
|
+
FileUtils.rm_rf(@output_directory)
|
19
|
+
FileUtils.mkdir_p(@output_directory)
|
19
20
|
|
20
21
|
return false if not run_scraper
|
21
22
|
|
@@ -106,7 +107,7 @@ module TurbotRunner
|
|
106
107
|
|
107
108
|
def output_file(script, extension='.out')
|
108
109
|
basename = File.basename(script, script_extension)
|
109
|
-
File.join(output_directory, basename) + extension
|
110
|
+
File.join(@output_directory, basename) + extension
|
110
111
|
end
|
111
112
|
|
112
113
|
def script_extension
|
@@ -132,7 +133,7 @@ module TurbotRunner
|
|
132
133
|
end
|
133
134
|
|
134
135
|
def scraper_output_file
|
135
|
-
File.join(output_directory, 'scraper.out')
|
136
|
+
File.join(@output_directory, 'scraper.out')
|
136
137
|
end
|
137
138
|
|
138
139
|
def language
|
@@ -142,9 +143,5 @@ module TurbotRunner
|
|
142
143
|
def scraper_data_type
|
143
144
|
@config[:data_type]
|
144
145
|
end
|
145
|
-
|
146
|
-
def output_directory
|
147
|
-
File.join(@directory, 'output')
|
148
|
-
end
|
149
146
|
end
|
150
147
|
end
|