Feature: pastebin #329
Merged
Feature: pastebin #329
Conversation
t/web-x-request-base.t
Outdated
| @@ -8,4 +8,6 @@ $t->get_ok('/x/request/base')->status_is(200)->content_is('/foo'); | |||
| $t->get_ok('/x/request/base', {'X-Request-Base' => 'http://example.com/sub'})->status_is(200) | |||
| ->content_is('/sub/foo'); | |||
|
|
|||
| like $t->app->core->base_url, qr{^http://example\.com}, 'core base_url'; | |||
marcusramberg
Apr 4, 2017
Member
should check that path is /sub for base_url
should check that path is /sub for base_url
lib/Convos/Core/Connection/Irc.pm
Outdated
| sub { | ||
| my ($backend, $err, $file) = @_; | ||
| return $self->$cb($err) if $err; | ||
| my $url = $self->user->core->base_url->clone->path($file->uri); |
marcusramberg
Apr 4, 2017
Member
Needs to use base_url as base, not basis for created url.
Needs to use base_url as base, not basis for created url.
lib/Convos/Plugin/Paste.pm
Outdated
| } | ||
|
|
||
| package # \ | ||
| Convos::Plugin::Paste::File; |
marcusramberg
Apr 4, 2017
Member
This is ugly 👎
This is ugly
marcusramberg
Apr 4, 2017
Member
I suggest making this a public class.
I suggest making this a public class.
I don't understand why it's not resolved after I pushed the new changes.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR implements a pastebin internally to Convos. It is implemented in the backend, meaning that a given connection class can detect a long message and dispatch it to the "paste-service". This is done automatically, without asking the user.
The nice thing is that it's implemented as a plugin, so if someone wants to make a "gist" backend, then it shouldn't be too hard.
This is how you enter a paste:
This is how it looks to a Convos user: (The paste is embedded using LinkEmbedder.pm)
This is how it looks if you open the link in a browser: (The link is available from the public)
Note also that the paste support syntax highlighting, using https://highlightjs.org/