Commit ef94849b authored by kaiyou's avatar kaiyou

Merge branch 'master' of https://gitlab.com/mbajur/prismo

parents 3628263d 70ff7047
Pipeline #114 passed with stages
in 15 minutes and 16 seconds
......@@ -8,7 +8,7 @@ Federated link aggregation powered by ActivityPub.
# Important notice 🚨🚨🚨
**Prismo is not yet production ready so please don't try to host an intance yet!
**Prismo is not yet production ready so please don't try to host an instance yet!
I will not be able to provide you any support when 1.0.0 is out as the changes
will not be backward-compatible.**
......@@ -27,11 +27,11 @@ These instructions will get you a copy of the project up and running on your loc
### Installing
A step by step series of examples that tell you have to get a development env running.
A step by step series of examples that help you get a development env running.
#### Setup / first run
If that's a first time you're installing the app, start with installing dependencies:
If this is the first time that you are installing the app, start with installing dependencies:
$ bundle install
$ yarn install
......@@ -42,7 +42,7 @@ Setup database
#### Development
If app has been set up already and you want to continue working on it:
If the app has been set up already and you want to continue working on it:
$ bundle exec rails db:migrate
$ foreman start
......@@ -123,7 +123,7 @@ We use [SemVer](http://semver.org/) for versioning. For the versions available,
## License
Prismo
Copyright (C) 2018 mbajur
Copyright (C) 2019 mbajur
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
......
......@@ -26,11 +26,11 @@
data-target="story-form.fetchTitleBtn"
disabled=!f.object.url.present?
)
| Fetch title
= t('.fetch_title')
= f.full_error :url, class: 'form-input-hint'
div.form-input-hint.text-gray
| Optional when providing description.
= t('.url_help')
/ Story title
= f.input :title, input_html: { class: 'input-lg',
......@@ -57,6 +57,6 @@
= render 'shared/markdown_editor', form: f, name: :description
p.form-input-hint.text-gray
| Optional when submitting a URL. Not for summarizing the post.
= t('.description_help')
= f.submit class: 'btn-n btn-n-primary'
......@@ -13,8 +13,8 @@
.box-n
.box-n-body.p-2
p To be able to easily submit a page you're viewing, drag this bookmarklet to your bookmark bar:
p = t('.bookmarklet_description')
.text-center.pt-2.pb-2
a(class="btn-n btn-n-outline-secondary btn-n-sm btn-n-block" href=bookmarklet_presenter.href)
| Add to #{Setting.site_title}
= t('.add_to', site_title: Setting.site_title)
......@@ -2,7 +2,7 @@
.column.col-9
.box-n
.box-n-body.p-4
h1.h3 Edit story
h1.h3 = t('.title')
.divider
= render 'stories/form', story: @story
......
......@@ -2,12 +2,10 @@
.new-story-page-content
.box-n
.box-n-body.p-4
h1.h3 Post a Story
h1.h3 = t('.title')
p
| Submit a link or provide a description to start a discussion.
Check the guidelines to make sure what you're posting is appropriate
for the community.
= t('.submit_text')
.divider
......
......@@ -17,9 +17,9 @@
/ is received
li.comment-new-reply.d-none(data-target="comments-tree.newReplyToastTpl")
.toast.toast-warning.toast-sm
| New reply has been added.
= t('.new_reply')
a.ml-1(href="" data-action="comment#loadNewComment" data-comment-id="")
| Load it
= t('.load_it')
.box-n-body(data-controller="first-comment")
.root-comment-form
......@@ -31,14 +31,14 @@
.empty-icon
i.icon.icon-people
p.empty-title.h5 No comments yet
p.empty-subtitle Click the button to start a conversation.
p.empty-title.h5 = t('.no_comments')
p.empty-subtitle = t('.start_conversation')
.empty-action
button.btn-n.btn-n-primary(
data-action="click->first-comment#showForm"
data-action-path=new_api_ujs_comment_path(story_id: @story.id)
)
| Add first comment
= t('.add_first_comment')
ul.comment-children(data-target="comments-tree.rootComments")
- @comments.each do |comment, children|
......
......@@ -50,3 +50,23 @@ en:
update: Save account
activitypub_domain_block:
create: Block domain
stories:
new:
title: Post a Story
submit_text: Submit a link or provide a description to start a discussion. Check the guidelines to make sure what you're posting is appropriate for the community.
form:
fetch_title: Fetch title
url_help: Optional when providing description.
description_help: Optional when submitting a URL. Not for summarizing the post.
show:
new_reply: New reply has been added.
load_it: Load it
no_comments: No comments yet
start_conversation: Click the button to start a conversation.
add_first_comment: Add first comment
guidelines:
bookmarklet_description: "To be able to easily submit a page you're viewing, drag this bookmarklet to your bookmark bar:"
add_to: Add to %{site_title}
edit:
title: Edit story
......@@ -15,7 +15,7 @@ module Prismo
end
def pre
nil
'rc1'
end
def flags
......
......@@ -45,7 +45,22 @@ describe ActivityPub::ProcessCollection, type: :service do
payload['signature'] = {'type' => 'RsaSignature2017'}
expect_any_instance_of(ActivityPub::LinkedDataSignature).to receive(:verify_account!).and_return(nil)
expect(ActivityPub::Activity).not_to receive(:factory)
expect(ActivityPub::Activity).to_not receive(:factory)
subject
end
end
context 'when account is suspended' do
let(:forwarder) do
create(:account, domain: 'example.com', uri: 'http://example.com/other_account', suspended: true)
end
it { expect(subject.result).to eq nil }
it 'does not process collection' do
expect_any_instance_of(ActivityPub::LinkedDataSignature).to_not receive(:verify_account!)
expect(ActivityPub::Activity).to_not receive(:factory)
subject
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment