Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Tracking down the commit that broke tabula-0.96 for Windows (issue #203)
#!/usr/bin/env ruby
# Tabula 0.9.6 for Windows fails: Unknown Error (206) - __UNKNOWN_CONSTANT__
# for more discussion see https://github.com/tabulapdf/tabula/issues/203
require 'open3'
revisions = ["3286e6ce0a2ee9eee617b0b1b23c3ada1effcbac",
"41307d4c0085a8b3bad2797549bf6b94a8a765c3",
"45404fa07fb3ddaf2280ec03b7d2f84e20396e88", #fails UNKNOWN_CONSTANT
"ad93f888c56f7ab85b17cc0169f2fe77ca098dc3", #works
"b432d92b5ac6713e6a0b591eb3e04c17c8c57aa8", #works
"11c18548694243fb473d85d598e97a6b859a6565", #works...
"bd38ba4b03a46358b5f1047266071555c07837ce",
"4369afb84cb7a0c08230494c277c6b733b90f6cb",
"83103c596f3bafb571bcd34efb10458742216e6e",
"559da755d2ad1038ea04ad8b22d6081dedc7eb65", #works
"6716f717c1efa2acef2bf12aefa0a12fc391346d",
"2ac3dcad8b4c6ae50171c7073280e9f817782d61",
"1f7406bbaa1954d175cebe1e85431fa1afafe60e",
"8bbc15f75e7af151b8bab6c7bd4cc048d7bdd487",
"51b76d26311cf081413d8622766874ef83fa57b5",
"ebb212bf1e567f84089a12f188cdb4b6d2c84412",
"4b5fecbad83fdafb025d7b54acecce39349e5239",
"99fb38bde4f2655913a0f5a7dc1534f93acd68c8",
"cffbf2d7d13d6f36413ae9d266a856262b1385a6",
"2dd1c8b54e8346c67daadf0bb9ea578a18b38cbe"]
revisions.each do |revision|
puts "starting: #{revision}"
Open3.popen3("git checkout #{revision}") do |stdin, stdout, stderr, wait_thr|
puts "stdout is:" + stdout.read
puts "stderr is:" + stderr.read
end
Open3.popen3("bundle install") do |stdin, stdout, stderr, wait_thr|
puts "stdout is:" + stdout.read
puts "stderr is:" + stderr.read
end
Open3.popen3("bundle exec rake war") do |stdin, stdout, stderr, wait_thr|
puts "stdout is:" + stdout.read
puts "stderr is:" + stderr.read
end
Open3.popen3("bundle exec rake windows") do |stdin, stdout, stderr, wait_thr|
puts "stdout is:" + stdout.read
puts "stderr is:" + stderr.read
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.