This repository has been archived by the owner on Jan 3, 2020. It is now read-only.
Embed Sinatra #85
Merged
Embed Sinatra #85
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lopopolo
force-pushed
the
sinatra
branch
2 times, most recently
from
May 31, 2019 08:42
26080e4
to
8b5f51f
Compare
Once I get a working Regexp matcher, I can implement scan in pure Ruby, using a string pointer. Here is the prototype: |
This was referenced May 31, 2019
Closed
This was referenced Jun 10, 2019
Merged
Merged
This was referenced Jun 11, 2019
Merged
leak tests fail locally for me but seem to pass in CI. Will dig into this later. |
Got an echo server running that outputs a JSON response containing the Rack request. http://localhost:8000/boom succeeds |
lopopolo
added a commit
that referenced
this pull request
Jun 14, 2019
This commit is in support of GH-85. Add the following APIs: - Regexp::escape - Regexp::union - Regexp#=== - Regexp#names - Regexp#named_captures - Regexp#options - MatchData#length - MatchData#named_captures - String#scan - String#-@ Added the constants Regexp::IGNORECASE, Regexp::EXTENDED, and Regexp::MULTILINE. Regexp#to_s and Regexp#inspect were erroneously implemented with the same function. Regexp#to_s now supports roundtripping through Regexp::compile. Imported escape functionality from Rust regex crate. Fix null pointer exception in String#=~ when Regexp does not match. Reimplemented the following String APIs to work with Regexp patterns: - String#split (TODO: does not handle blocks) - String#sub - String#gsub - String#gsub!
This was referenced Jun 14, 2019
defined? is not implemented in mruby and they recommend using const_defined? instead. This commit introduces a mechanism for patching gem sources using String::replace.
Most source files end in .rb, so try to load those first
This shouldn't be a 404. I think it has to do with the StringScanner stubs which are used by Mustermann for route matching.
…fault method arg values
mruby does not support reraising $! in a rescue block.
Add an echo server that creates a Rack app with Sinatra::Base. The app outputs a JSON serialized version of the Rack request. Once support for IO and StringIO (GH-9) is implemented, Hubris will return information about the request body. Once digest is implemented Hubris will return a hash of body contents. Once SecureRandom is implemented, Hubris will return a request UUID.
100 tasks
lopopolo
added a commit
to artichoke/artichoke
that referenced
this pull request
Sep 1, 2019
This API and constant were added in artichoke/ferrocarril#85 to load Sinatra and work around mruby not supporting expressions as default parameters in method argument lists. This patch belongs in nemesis instead of artichoke core.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This branch is an ongoing effort to get the following code to parse and return a Rack app:
This branch is a top-down approach to implementing core and the standard library in contrast to the bottom up approach I've been taking with Regexp.
The supplied main function in the
ditty
crate will returnMrbError
until the code parses and compiles. Address errors as they come up.Some things I've had to do so far:
I anticipate needing to implement more of core and standard library in Rust.