Skip to content

Commit

Permalink
Add runner that allows for longer code
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-ross committed Oct 31, 2020
1 parent 1cc396f commit 4c081b9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/runner.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
require 'json'

stdin = ''

while s=(ARGV.shift or (!STDIN.tty? and STDIN.gets) )
stdin += s
end

RUNNER_INPUT = JSON.parse(stdin)
RUNNER_CODE = RUNNER_INPUT.fetch('code', '')
FIELDS = RUNNER_INPUT.fetch('fields', {})

0 comments on commit 4c081b9

Please sign in to comment.