Skip to content

Commit

Permalink
Merge branch '__rultor'
Browse files Browse the repository at this point in the history
  • Loading branch information
rultor committed Sep 15, 2021
2 parents 60ac2d5 + 237a37e commit f07f278
Show file tree
Hide file tree
Showing 15 changed files with 74 additions and 52 deletions.
3 changes: 2 additions & 1 deletion .overcommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,5 @@ PrePush:
- 'test'
- 'xcop'
required_executable: 'bundle'
flags: ['exec', 'rake']
flags: ['exec', 'rake']

10 changes: 5 additions & 5 deletions .simplecov
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

if Gem.win_platform? then
if Gem.win_platform?
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
SimpleCov::Formatter::HTMLFormatter
]
SimpleCov.start do
add_filter "/test/"
add_filter "/features/"
add_filter '/test/'
add_filter '/features/'
end
else
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
SimpleCov::Formatter::HTMLFormatter
)
SimpleCov.start do
add_filter "/test/"
add_filter "/features/"
add_filter '/test/'
add_filter '/features/'
minimum_coverage 90
end
end
24 changes: 12 additions & 12 deletions bin/pdd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

STDOUT.sync = true
$stdout.sync = true

require 'shellwords'
require 'English'
Expand Down Expand Up @@ -72,8 +72,8 @@ begin
delimiter: ';'
)
end
rescue Slop::Error => ex
raise StandardError, "#{ex.message}, try --help"
rescue Slop::Error => e
raise StandardError, "#{e.message}, try --help"
end

if opts.help?
Expand All @@ -93,7 +93,7 @@ https://github.com/cqfn/pdd/blob/master/README.md"

Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8
file = opts.file? ? File.new(opts[:file], 'w') : STDOUT
file = opts.file? ? File.new(opts[:file], 'w') : $stdout
output = PDD::Base.new(opts).xml
if opts[:format]
if opts[:format] == 'html'
Expand All @@ -107,21 +107,21 @@ https://github.com/cqfn/pdd/blob/master/README.md"
end
end
file << output
rescue SystemExit => ex
puts ex.message unless ex.success?
PDD.log.info "Exit code is #{ex.status}"
exit(ex.status)
rescue PDD::Error => ex
puts "#{Rainbow('ERROR').red}: #{ex.message}
rescue SystemExit => e
puts e.message unless e.success?
PDD.log.info "Exit code is #{e.status}"
exit(e.status)
rescue PDD::Error => e
puts "#{Rainbow('ERROR').red}: #{e.message}
If you can't understand the cause of this issue or you don't know \
how to fix it, please submit a GitHub issue, we will try to help you: \
https://github.com/cqfn/pdd/issues. This tool is still in its beta \
version and we will appreciate your feedback. Here is where you can find \
more documentation: https://github.com/cqfn/pdd/blob/master/README.md."
PDD.log.info 'Exit code is 1'
exit(1)
rescue StandardError => ex
puts "#{Rainbow('ERROR').red} (#{ex.class.name}): #{ex.message}"
rescue StandardError => e
puts "#{Rainbow('ERROR').red} (#{e.class.name}): #{e.message}"
PDD.log.info 'Exit code is 255'
exit(255)
end
7 changes: 4 additions & 3 deletions features/step_definitions/steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@
begin
PDD::Base.new(@opts).xml
passed = true
rescue PDD::Error => ex
unless ex.message.include?(txt)
raise "PDD failed but exception doesn't contain \"#{txt}\": #{ex.message}"
rescue PDD::Error => e
unless e.message.include?(txt)
raise "PDD failed but exception doesn't contain \"#{txt}\": #{e.message}"
end
end
raise "PDD didn't fail" if passed
Expand All @@ -90,6 +90,7 @@

Then(/^XML file "([^"]+)" matches "([^"]+)"$/) do |file, xpath|
raise "File #{file} doesn't exit" unless File.exist?(file)

xml = Nokogiri::XML.parse(File.read(file))
xml.remove_namespaces!
if xml.xpath(xpath).empty?
Expand Down
13 changes: 9 additions & 4 deletions lib/pdd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,12 @@ class SchemaError < Error
# Get logger.
def self.log
unless defined?(@logger)
@logger = Logger.new(STDOUT)
@logger = Logger.new($stdout)
@logger.formatter = proc { |severity, _, _, msg|
if severity == 'ERROR'
case severity
when 'ERROR'
"#{Rainbow(severity).red}: #{msg}\n"
elsif severity == 'WARN'
when 'WARN'
"#{Rainbow(severity).orange}: #{msg}\n"
else
"#{msg}\n"
Expand Down Expand Up @@ -87,7 +88,7 @@ def initialize(opts)

# Generate XML.
def xml
dir = @opts[:source] ? @opts[:source] : Dir.pwd
dir = @opts[:source] || Dir.pwd
PDD.log.info "Reading #{dir}"
require_relative 'pdd/sources'
sources = Sources.new(dir)
Expand Down Expand Up @@ -152,16 +153,19 @@ def rules(xml)
unless list.select { |r| r.start_with?('max-duplicates:') }.empty?
raise PDD::Error, 'You can\'t modify max-duplicates, it\'s always 1'
end

list.push('max-duplicates:1').map do |r|
name, value = r.split(':')
rule = RULES[name]
raise "Rule '#{name}' doesn't exist" if rule.nil?

rule.new(doc, value).errors.each do |e|
PDD.log.error e
total += 1
end
end
raise PDD::Error, "#{total} errors, see log above" unless total.zero?

xml
end

Expand All @@ -173,6 +177,7 @@ def sanitize(xml)
errors.each { |e| PDD.log.error e }
PDD.log.error(xml) unless errors.empty?
raise SchemaError, errors.join('; ') unless errors.empty?

xml
end
end
Expand Down
1 change: 1 addition & 0 deletions lib/pdd/rake_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module PDD
# Rake task
class RakeTask < Rake::TaskLib
attr_accessor :name

def initialize(*args, &task_block)
# @todo #125:30m Needs to have more parameters to run this task.
# For now, we just have a single parameter - the name.
Expand Down
1 change: 1 addition & 0 deletions lib/pdd/rule/duplicates.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def errors
.group_by { |p| p.xpath('body/text()').to_s }
.map do |_, puzzles|
next nil if puzzles.count <= @max

"there are #{puzzles.count} duplicate(s) of the same puzzle: " +
puzzles.map do |p|
"#{p.xpath('file/text()')}:#{p.xpath('lines/text()')}"
Expand Down
1 change: 1 addition & 0 deletions lib/pdd/rule/roles.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def errors
@xml.xpath('//puzzle').map do |p|
role = p.xpath('role/text()').to_s
next nil if @roles.include?(role)

"puzzle #{p.xpath('file/text()')}:#{p.xpath('lines/text()')}" +
if role.empty?
" doesn't define any role"\
Expand Down
1 change: 1 addition & 0 deletions lib/pdd/rule/text.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def errors
@xml.xpath('//puzzle').map do |p|
words = p.xpath('body/text()').to_s.split.size
next nil if words >= @min

"Puzzle #{p.xpath('file/text()')}:#{p.xpath('lines/text()')}"\
" has a very short description of just #{words} words while"\
" a minimum of #{@min} is required"
Expand Down
50 changes: 27 additions & 23 deletions lib/pdd/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def initialize(file, path)

def match_markers(line)
MARKERS.map do |mkr|
%r{(.*(?:^|\s))#{mkr}\s+#([\w\-\.:/]+)\s+(.+)}.match(line)
%r{(.*(?:^|\s))#{mkr}\s+#([\w\-.:/]+)\s+(.+)}.match(line)
end.compact
end

Expand Down Expand Up @@ -106,7 +106,7 @@ def check_rules(line)
# Fetch puzzle
def puzzle(lines, match, idx)
tail = tail(lines, match[1], idx)
body = (match[3] + ' ' + tail.join(' ')).gsub(/\s+/, ' ').strip
body = "#{match[3]} #{tail.join(' ')}".gsub(/\s+/, ' ').strip
body = body.chomp('*/-->').strip
marker = marker(match[2])
Puzzle.new(
Expand All @@ -121,7 +121,7 @@ def puzzle(lines, match, idx)

# Parse a marker.
def marker(text)
re = %r{([\w\-\.]+)(?::(\d+)(?:(m|h)[a-z]*)?)?(?:/([A-Z]+))?}
re = %r{([\w\-.]+)(?::(\d+)(?:(m|h)[a-z]*)?)?(?:/([A-Z]+))?}
match = re.match(text)
if match.nil?
raise "Invalid puzzle marker \"#{text}\", most probably formatted \
Expand All @@ -148,10 +148,11 @@ def tail(lines, prefix, start)
.map { |t| t[prefix.length, t.length] }
.take_while { |t| t =~ /^[ a-zA-Z0-9]/ }
.each_with_index do |t, i|
next if t.start_with?(' ')
raise Error, "Space expected at #{start + i + 2}:#{prefix.length}; \
next if t.start_with?(' ')

raise Error, "Space expected at #{start + i + 2}:#{prefix.length}; \
make sure all lines in the puzzle body have a single leading space."
end
end
.map { |t| t[1, t.length] }
end

Expand All @@ -167,21 +168,22 @@ def git(pos)
if `#{git} rev-parse --is-inside-work-tree 2>/dev/null`.strip == 'true'
cmd = "#{git} blame -L #{pos},#{pos} --porcelain #{name}"
add_github_login(Hash[
`#{cmd}`.split("\n").map do |line|
if line =~ /^author /
[:author, line.sub(/^author /, '')]
elsif line =~ /^author-mail [^@]+@[^\.]+\..+/
[:email, line.sub(/^author-mail <(.+)>$/, '\1')]
elsif line =~ /^author-time /
[
:time,
Time.at(
line.sub(/^author-time ([0-9]+)$/, '\1').to_i
).utc.iso8601
]
end
end.compact
])
`#{cmd}`.split("\n").map do |line|
case line
when /^author /
[:author, line.sub(/^author /, '')]
when /^author-mail [^@]+@[^.]+\..+/
[:email, line.sub(/^author-mail <(.+)>$/, '\1')]
when /^author-time /
[
:time,
Time.at(
line.sub(/^author-time ([0-9]+)$/, '\1').to_i
).utc.iso8601
]
end
end.compact
])
else
{}
end
Expand All @@ -207,12 +209,14 @@ def find_github_user(info)
email, author = info.values_at(:email, :author)
# if email is not defined, changes have not been committed
return if email.nil?

base_uri = 'https://api.github.com/search/users?per_page=1'
query = base_uri + "&q=#{email}+in:email"
json = get_json query
# find user by name instead since users can make github email private
unless json['total_count'].positive?
return if author.nil?

query = base_uri + "&q=#{author}+in:fullname"
json = get_json query
end
Expand Down Expand Up @@ -240,8 +244,8 @@ def initialize(file, source)
# Fetch all puzzles.
def puzzles
@source.puzzles
rescue Error => ex
raise Error, "#{@file}; #{ex.message}"
rescue Error => e
raise Error, "#{@file}; #{e.message}"
end
end
end
1 change: 1 addition & 0 deletions lib/pdd/sources.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def include(ptn)
# `test_ignores_binary_files` in `test_sources.rb`.
def binary?(file)
return false if Gem.win_platform?

`grep -qI '.' #{Shellwords.escape(file)}`
if $CHILD_STATUS.success?
false
Expand Down
5 changes: 3 additions & 2 deletions pdd.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@

require 'English'

lib = File.expand_path('../lib', __FILE__)
lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require_relative 'lib/pdd/version'

Gem::Specification.new do |s|
s.specification_version = 2 if s.respond_to? :specification_version=
if s.respond_to? :required_rubygems_version=
s.required_rubygems_version = Gem::Requirement.new('>= 0')
s.required_rubygems_version =
Gem::Requirement.new('>= 0')
end
s.rubygems_version = '2.3'
s.required_ruby_version = '~> 2.3'
Expand Down
2 changes: 1 addition & 1 deletion test/test__helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

STDOUT.sync = true
$stdout.sync = true

require 'simplecov'
SimpleCov.start
Expand Down
1 change: 1 addition & 0 deletions test/test_pdd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def test_git_repo
git add -f .
git commit --quiet -am 'first version'
")

matches(
Nokogiri::XML(PDD::Base.new(opts).xml),
[
Expand Down
6 changes: 5 additions & 1 deletion test/test_source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def test_failing_on_incomplete_puzzle
def test_failing_on_broken_unicode
Dir.mktmpdir 'test' do |dir|
file = File.join(dir, 'xx.txt')
File.write(file, ' * \x40todo #44 this is a broken unicode: ' + 0x92.chr)
File.write(file, " * \\x40todo #44 this is a broken unicode: #{0x92.chr}")
assert_raises PDD::Error do
stub_source_find_github_user(file, 'xx', &:puzzles)
end
Expand Down Expand Up @@ -228,6 +228,7 @@ def test_reads_git_author
git add a.txt
git commit --quiet -am 'first version'
")

stub_source_find_github_user(File.join(dir, 'a.txt')) do |source|
list = source.puzzles
assert_equal 1, list.size
Expand Down Expand Up @@ -256,6 +257,7 @@ def test_skips_invalid_git_mail
git add a.txt
git commit --quiet -am 'first version'
")

stub_source_find_github_user(File.join(dir, 'a.txt')) do |source|
list = source.puzzles
assert_equal 1, list.size
Expand Down Expand Up @@ -283,6 +285,7 @@ def test_uses_github_login
git add a.txt
git commit --quiet -am 'first version'
")

stub_source_find_github_user(File.join(dir, 'a.txt')) do |source|
list = source.puzzles
assert_equal 1, list.size
Expand All @@ -305,6 +308,7 @@ def test_skips_uncommitted_changes
git commit --quiet -am 'first version'
echo '\x40todo #1 this is a puzzle uncommitted' > a.txt
")

stub_source_find_github_user(File.join(dir, 'a.txt')) do |source|
list = source.puzzles
assert_equal 1, list.size
Expand Down

2 comments on commit f07f278

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on f07f278 Sep 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't able to retrieve PDD puzzles from the code base and submit them to GitHub. If you think that it's a bug on our side, please submit it to yegor256/0pdd:

set -x && set -e && set -o pipefail && cd /tmp/0pdd20210801-12-f1ew7f/cqfn/pdd && pdd -v -f /tmp/20210915-22236-1wvv7tw [255]: + set -e + set -o pipefail + cd /tmp/0pdd20210801-12-f1ew7f/cqfn/pdd + pdd -v -f /tmp/20210915-22236-1wvv7tw Found 23 lines in /tmp/0pdd20210801-12-f1ew7f/cqfn/pdd/.pdd...

Please, copy and paste this stack trace to GitHub:

Exec::Error
set -x && set -e && set -o pipefail && cd /tmp/0pdd20210801-12-f1ew7f/cqfn/pdd && pdd -v -f /tmp/20210915-22236-1wvv7tw [255]:
+ set -e
+ set -o pipefail
+ cd /tmp/0pdd20210801-12-f1ew7f/cqfn/pdd
+ pdd -v -f /tmp/20210915-22236-1wvv7tw

Found 23 lines in /tmp/0pdd20210801-12-f1ew7f/cqfn/pdd/.pdd
ERROR (StandardError): unknown option `--skip-errors', try --help

/app/objects/exec.rb:60:in `block (2 levels) in run'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/open3.rb:219:in `popen_run'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/open3.rb:101:in `popen3'
/app/objects/exec.rb:54:in `block in run'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/timeout.rb:93:in `block in timeout'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/timeout.rb:33:in `block in catch'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/timeout.rb:33:in `catch'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/timeout.rb:33:in `catch'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/timeout.rb:108:in `timeout'
/app/objects/exec.rb:53:in `run'
/app/objects/git_repo.rb:64:in `block in xml'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/tempfile.rb:295:in `open'
/app/objects/git_repo.rb:62:in `xml'
/app/objects/puzzles.rb:36:in `deploy'
/app/objects/job.rb:38:in `proceed'
/app/objects/job_starred.rb:33:in `proceed'
/app/objects/job_recorded.rb:32:in `proceed'
/app/objects/job_emailed.rb:35:in `proceed'
/app/objects/job_commiterrors.rb:36:in `proceed'
/app/objects/job_detached.rb:48:in `exclusive'
/app/objects/job_detached.rb:36:in `block in proceed'
/app/objects/job_detached.rb:36:in `fork'
/app/objects/job_detached.rb:36:in `proceed'
/app/0pdd.rb:357:in `block in <top (required)>'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1675:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1675:in `block in compile!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1013:in `block (3 levels) in route!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1032:in `route_eval'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1013:in `block (2 levels) in route!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1061:in `block in process_route'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1059:in `catch'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1059:in `process_route'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1011:in `block in route!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1008:in `each'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1008:in `route!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1129:in `block in dispatch!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1101:in `block in invoke'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1101:in `catch'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1101:in `invoke'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1124:in `dispatch!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:939:in `block in call!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1101:in `block in invoke'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1101:in `catch'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1101:in `invoke'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:939:in `call!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:929:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-protection-2.1.0/lib/rack/protection/xss_header.rb:18:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-protection-2.1.0/lib/rack/protection/path_traversal.rb:16:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-protection-2.1.0/lib/rack/protection/json_csrf.rb:26:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-protection-2.1.0/lib/rack/protection/base.rb:50:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-protection-2.1.0/lib/rack/protection/base.rb:50:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-protection-2.1.0/lib/rack/protection/frame_options.rb:31:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/logger.rb:17:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/common_logger.rb:38:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:253:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:246:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/head.rb:12:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/method_override.rb:24:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:216:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1991:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1542:in `block in call'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1769:in `synchronize'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1542:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/handler/webrick.rb:95:in `service'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/webrick/httpserver.rb:140:in `service'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/webrick/httpserver.rb:96:in `run'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/webrick/server.rb:307:in `block in start_thread'

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on f07f278 Sep 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't able to retrieve PDD puzzles from the code base and submit them to GitHub. If you think that it's a bug on our side, please submit it to yegor256/0pdd:

set -x && set -e && set -o pipefail && cd /tmp/0pdd20210801-12-f1ew7f/cqfn/pdd && pdd -v -f /tmp/20210915-22251-3zvqt1 [255]: + set -e + set -o pipefail + cd /tmp/0pdd20210801-12-f1ew7f/cqfn/pdd + pdd -v -f /tmp/20210915-22251-3zvqt1 Found 23 lines in /tmp/0pdd20210801-12-f1ew7f/cqfn/pdd/.pdd...

Please, copy and paste this stack trace to GitHub:

Exec::Error
set -x && set -e && set -o pipefail && cd /tmp/0pdd20210801-12-f1ew7f/cqfn/pdd && pdd -v -f /tmp/20210915-22251-3zvqt1 [255]:
+ set -e
+ set -o pipefail
+ cd /tmp/0pdd20210801-12-f1ew7f/cqfn/pdd
+ pdd -v -f /tmp/20210915-22251-3zvqt1

Found 23 lines in /tmp/0pdd20210801-12-f1ew7f/cqfn/pdd/.pdd
ERROR (StandardError): unknown option `--skip-errors', try --help

/app/objects/exec.rb:60:in `block (2 levels) in run'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/open3.rb:219:in `popen_run'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/open3.rb:101:in `popen3'
/app/objects/exec.rb:54:in `block in run'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/timeout.rb:93:in `block in timeout'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/timeout.rb:33:in `block in catch'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/timeout.rb:33:in `catch'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/timeout.rb:33:in `catch'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/timeout.rb:108:in `timeout'
/app/objects/exec.rb:53:in `run'
/app/objects/git_repo.rb:64:in `block in xml'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/tempfile.rb:295:in `open'
/app/objects/git_repo.rb:62:in `xml'
/app/objects/puzzles.rb:36:in `deploy'
/app/objects/job.rb:38:in `proceed'
/app/objects/job_starred.rb:33:in `proceed'
/app/objects/job_recorded.rb:32:in `proceed'
/app/objects/job_emailed.rb:35:in `proceed'
/app/objects/job_commiterrors.rb:36:in `proceed'
/app/objects/job_detached.rb:48:in `exclusive'
/app/objects/job_detached.rb:36:in `block in proceed'
/app/objects/job_detached.rb:36:in `fork'
/app/objects/job_detached.rb:36:in `proceed'
/app/0pdd.rb:357:in `block in <top (required)>'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1675:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1675:in `block in compile!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1013:in `block (3 levels) in route!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1032:in `route_eval'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1013:in `block (2 levels) in route!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1061:in `block in process_route'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1059:in `catch'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1059:in `process_route'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1011:in `block in route!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1008:in `each'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1008:in `route!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1129:in `block in dispatch!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1101:in `block in invoke'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1101:in `catch'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1101:in `invoke'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1124:in `dispatch!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:939:in `block in call!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1101:in `block in invoke'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1101:in `catch'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1101:in `invoke'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:939:in `call!'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:929:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-protection-2.1.0/lib/rack/protection/xss_header.rb:18:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-protection-2.1.0/lib/rack/protection/path_traversal.rb:16:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-protection-2.1.0/lib/rack/protection/json_csrf.rb:26:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-protection-2.1.0/lib/rack/protection/base.rb:50:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-protection-2.1.0/lib/rack/protection/base.rb:50:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-protection-2.1.0/lib/rack/protection/frame_options.rb:31:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/logger.rb:17:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/common_logger.rb:38:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:253:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:246:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/head.rb:12:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/method_override.rb:24:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:216:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1991:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1542:in `block in call'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1769:in `synchronize'
/app/vendor/bundle/ruby/2.6.0/gems/sinatra-2.1.0/lib/sinatra/base.rb:1542:in `call'
/app/vendor/bundle/ruby/2.6.0/gems/rack-2.2.3/lib/rack/handler/webrick.rb:95:in `service'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/webrick/httpserver.rb:140:in `service'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/webrick/httpserver.rb:96:in `run'
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/webrick/server.rb:307:in `block in start_thread'

Please sign in to comment.