10 failures
This commit is contained in:
parent
10f3602536
commit
22acb046ed
|
@ -51,6 +51,7 @@ See `kitchen_sink.sh` examples.
|
||||||
- [X] Update Ruby API docs
|
- [X] Update Ruby API docs
|
||||||
- [X] Update blobs spec to clear out blob folder every time it runs.
|
- [X] Update blobs spec to clear out blob folder every time it runs.
|
||||||
- [ ] Oops, `lipmaa` field needs to be a hash, not an integer!
|
- [ ] Oops, `lipmaa` field needs to be a hash, not an integer!
|
||||||
|
- [ ] Change `@`, `%`, `&` to `feed.`, `mesg.`, `blob.`, respectively. Better readability, easier onboarding, URL friendly.
|
||||||
- [ ] Change draft and message templates to render headers in this order: `author`, `prev`, `lipmaa`, `depth`, `kind`.
|
- [ ] Change draft and message templates to render headers in this order: `author`, `prev`, `lipmaa`, `depth`, `kind`.
|
||||||
- [ ] Make location of blob folder configurable?
|
- [ ] Make location of blob folder configurable?
|
||||||
- [ ] Update Dev docs in protocol spec to reflect changes to `lipmaa` header.
|
- [ ] Update Dev docs in protocol spec to reflect changes to `lipmaa` header.
|
||||||
|
|
|
@ -170,9 +170,9 @@ module Pigeon
|
||||||
draft.author = author
|
draft.author = author
|
||||||
draft.depth = depth
|
draft.depth = depth
|
||||||
draft.prev = db.get_message_by_depth(mhash, depth - 1)
|
draft.prev = db.get_message_by_depth(mhash, depth - 1)
|
||||||
lipmaa = Helpers.lipmaa(depth)
|
lpma = Helpers.lipmaa(depth)
|
||||||
if lipmaa && draft.prev
|
if lpma && draft.prev
|
||||||
draft.lipmaa = db.get_message_by_depth(mhash, lipmaa)
|
draft.lipmaa = db.get_message_by_depth(mhash, lpma)
|
||||||
else
|
else
|
||||||
draft.lipmaa = NOTHING
|
draft.lipmaa = NOTHING
|
||||||
end
|
end
|
||||||
|
|
|
@ -76,7 +76,7 @@ module Pigeon
|
||||||
class LexError < StandardError; end
|
class LexError < StandardError; end
|
||||||
|
|
||||||
def flunk!(where)
|
def flunk!(where)
|
||||||
msg = "Syntax error: #{scanner.pos} under #{@last_good} field in #{where}"
|
msg = "Syntax error pos #{scanner.pos} by #{@last_good} field in #{where}"
|
||||||
raise LexError, msg
|
raise LexError, msg
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -161,13 +161,13 @@ RSpec.describe Pigeon::Lexer do
|
||||||
it "catches syntax errors" do
|
it "catches syntax errors" do
|
||||||
e = Pigeon::Lexer::LexError
|
e = Pigeon::Lexer::LexError
|
||||||
err_map = {
|
err_map = {
|
||||||
0 => "Syntax error at 0. Failed to read header field.",
|
0 => "Syntax error pos 0 by START field in HEADER",
|
||||||
1 => "Syntax error at 69. Failed to read header field.",
|
1 => "Syntax error pos 69 by AUTHOR field in HEADER",
|
||||||
2 => "Syntax error at 84. Failed to read header field.",
|
2 => "Syntax error pos 84 by KIND field in HEADER",
|
||||||
3 => "Syntax error at 94. Failed to read header field.",
|
3 => "Syntax error pos 94 by PREV field in HEADER",
|
||||||
4 => "Syntax error at 102. Failed to read header field.",
|
4 => "Syntax error pos 102 by DEPTH field in HEADER",
|
||||||
5 => "Syntax error at 103. Failed to read body field.",
|
5 => "Syntax error pos 103 by HEADER_SEPERATOR field in BODY",
|
||||||
6 => "Syntax error at 113. Failed to read body field.",
|
6 => "Syntax error pos 113 by A_BODY_ENTRY field in BODY",
|
||||||
7 => "Parse error at 114. Double carriage return not found.",
|
7 => "Parse error at 114. Double carriage return not found.",
|
||||||
}
|
}
|
||||||
(0..7).to_a.map do |n|
|
(0..7).to_a.map do |n|
|
||||||
|
|
Loading…
Reference in New Issue