From 9d78f844128fa3375aaca260124d706a0ddc310e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 27 Jul 2020 13:32:05 +0200 Subject: [PATCH 001/609] add OA variant (#780) --- app/views/home/about.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/home/about.html.erb b/app/views/home/about.html.erb index 7a2797bd8..954843b24 100644 --- a/app/views/home/about.html.erb +++ b/app/views/home/about.html.erb @@ -214,7 +214,7 @@

A more detailed analysis of our running costs is available on our blog.

Income

- +

JOSS has an experimental collaboration with <%= link_to "AAS publishing", "https://blog.joss.theoj.org/2018/12/a-new-collaboration-with-aas-publishing" %> where authors submitting to one of the AAS journals can also publish a companion software paper in JOSS, thereby receviving a review of their software. For this service, JOSS receives a small donation from AAS publishing. In 2019, JOSS received $200 as a result of this collaboration.

Donate

@@ -225,7 +225,7 @@

Content Licensing & Open Access

- <%= setting(:abbreviation) %> is an open access journal. Copyright of <%= setting(:abbreviation) %> papers is + <%= setting(:abbreviation) %> is a diamond/platinum open access journal. Copyright of <%= setting(:abbreviation) %> papers is retained by submitting authors and accepted papers are subject to a Creative Commons Attribution 4.0 International License.

From 7096454c4abb3fca4ada5afd11781dde4b6bd7b4 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 27 Jul 2020 17:17:24 -0400 Subject: [PATCH 002/609] Softening scholarly effort language (#781) --- docs/review_criteria.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/review_criteria.md b/docs/review_criteria.md index 5a28ae690..5d1964441 100644 --- a/docs/review_criteria.md +++ b/docs/review_criteria.md @@ -31,7 +31,7 @@ There should be an [OSI approved](https://opensource.org/licenses/alphabetical) ### Substantial scholarly effort -Reviewers should verify that the software represents substantial scholarly effort. As a rule of thumb, JOSS' minimum allowable contribution should represent **not less than** three months of work for an individual. Signals of effort include: +Reviewers should verify that the software represents substantial scholarly effort. As a rule of thumb, JOSS' minimum allowable contribution should represent **not less than** three months of work for an individual. Signals of effort may include: - Age of software (is this a well-established software project) / length of commit history. - Number of commits. From f413bd49d2ec55a29808801984a67d03815b02de Mon Sep 17 00:00:00 2001 From: Karthik Ram Date: Wed, 29 Jul 2020 17:46:11 -0700 Subject: [PATCH 003/609] Clarified guidance for reviewers (#782) --- docs/review_criteria.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/review_criteria.md b/docs/review_criteria.md index 5d1964441..7acee9823 100644 --- a/docs/review_criteria.md +++ b/docs/review_criteria.md @@ -40,6 +40,7 @@ Reviewers should verify that the software represents substantial scholarly effor - Whether the software has already been cited in academic papers. - Whether the software is sufficiently useful that it is _likely to be cited_ by other researchers working in this domain. +These guidelines are not meant to be strictly prescriptive. Recently released software may not have been around long enough to gather citations in academic literature. While some authors contribute openly and accrue a long and rich commit history before submitting, others may upload their software to GitHub shortly before submitting their JOSS paper. Reviewers should rely on their expert understanding of their domain to judge whether the software is of broad interest (_likely to be cited by other researchers_) or more narrowly focused around the needs of an individual researcher or lab. ```eval_rst .. note:: The decision on scholarly effort is ultimately one made by JOSS editors. Reviewers are asked to flag submissions of questionable scope during the review process so that the editor can bring this to the attention of the JOSS editorial team. From c7ba18ae19840a87386e053c35a7f860fa08d9dd Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Tue, 4 Aug 2020 12:09:03 -0400 Subject: [PATCH 004/609] Clobber old votes (#785) * Clobber old votes * Don't email editors again about a paper they've already voted on. --- app/controllers/votes_controller.rb | 10 ++++-- app/mailers/notifications.rb | 2 +- app/models/vote.rb | 4 +++ .../notifications/editor_scope_email.html.erb | 11 +++--- .../notifications/editor_scope_email.text.erb | 4 ++- app/views/papers/_vote_summary.html.erb | 2 +- spec/controllers/votes_controller_spec.rb | 34 +++++++++++++++++++ spec/models/vote_spec.rb | 11 ++++++ 8 files changed, 67 insertions(+), 11 deletions(-) diff --git a/app/controllers/votes_controller.rb b/app/controllers/votes_controller.rb index e23333e43..2a8807612 100644 --- a/app/controllers/votes_controller.rb +++ b/app/controllers/votes_controller.rb @@ -4,13 +4,13 @@ class VotesController < ApplicationController def create if params[:commit].include?("in scope") - puts "IN SCOPE" + logger.info "IN SCOPE" kind = "in-scope" elsif params[:commit].include?("out of scope") - puts "OUT OF SCOPE" + logger.info "OUT OF SCOPE" kind = "out-of-scope" elsif params[:commit].include?("Just comment") - puts "JUST COMMENTING" + logger.info "JUST COMMENTING" kind = "comment" end @@ -19,6 +19,10 @@ def create @vote = @paper.votes.build(params) begin + if previous_vote = Vote.find_by_paper_id_and_editor_id(@paper, current_user.editor) + previous_vote.destroy! + end + @vote.save! flash[:notice] = "Vote recorded" redirect_to paper_path(@paper) diff --git a/app/mailers/notifications.rb b/app/mailers/notifications.rb index 68e9aed3f..4bb3c9ace 100644 --- a/app/mailers/notifications.rb +++ b/app/mailers/notifications.rb @@ -28,7 +28,7 @@ def editor_weekly_email(editor, pending_issues, assigned_issues, recently_closed def editor_scope_email(editor, issues) @query_scope_issues = issues - @editor = editor.login + @editor = editor mail(to: editor.email, subject: "[Please review]: #{Rails.application.settings["abbreviation"]} scope check summary") end end diff --git a/app/models/vote.rb b/app/models/vote.rb index 573e7a48b..ed4af2939 100644 --- a/app/models/vote.rb +++ b/app/models/vote.rb @@ -25,5 +25,9 @@ def comment? kind == "comment" end + def self.has_vote_for?(paper, editor) + find_by_paper_id_and_editor_id(paper, editor) + end + validates :kind, inclusion: { in: VOTE_KINDS }, allow_nil: false end diff --git a/app/views/notifications/editor_scope_email.html.erb b/app/views/notifications/editor_scope_email.html.erb index c0f505dcd..d06b3f30b 100644 --- a/app/views/notifications/editor_scope_email.html.erb +++ b/app/views/notifications/editor_scope_email.html.erb @@ -4,10 +4,11 @@ <% if @query_scope_issues.any? %> <% @query_scope_issues.each do |issue| %> - -

<%= issue.title %> (<%= issue.paper.created_at.strftime('%F') %>)

-

<%= issue.paper.body %>

-

<%= link_to "VOTE ON SCOPE HERE", "#{Rails.application.settings["url"]}/papers/#{issue.paper.sha}" %> · <%= link_to "View review issue", "https://github.com/#{Rails.application.settings['reviews']}/issues/#{issue.number}" %> · <%= link_to "View software repository", issue.paper.repository_url %>

-
+ <% unless Vote.has_vote_for?(issue.paper, @editor) %> +

<%= issue.title %> (<%= issue.paper.created_at.strftime('%F') %>)

+

<%= issue.paper.body %>

+

<%= link_to "VOTE ON SCOPE HERE", "#{Rails.application.settings["url"]}/papers/#{issue.paper.sha}" %> · <%= link_to "View review issue", "https://github.com/#{Rails.application.settings['reviews']}/issues/#{issue.number}" %> · <%= link_to "View software repository", issue.paper.repository_url %>

+
+ <% end %> <% end %> <% end %> \ No newline at end of file diff --git a/app/views/notifications/editor_scope_email.text.erb b/app/views/notifications/editor_scope_email.text.erb index 10ea21c27..cc5a567ca 100644 --- a/app/views/notifications/editor_scope_email.text.erb +++ b/app/views/notifications/editor_scope_email.text.erb @@ -4,6 +4,8 @@ Please review the recently-flagged submissions below and vote on the <%= Rails.a <% if @query_scope_issues.any? %> <% @query_scope_issues.each do |issue| %> + <% unless Vote.has_vote_for?(issue.paper, @editor) %> + <%= issue.title %> (<%= issue.paper.created_at.strftime('%F') %>) <%= issue.paper.body %> @@ -13,6 +15,6 @@ Review issue: https://github.com/<%= Rails.application.settings["reviews"] %>/is Software repository: <%= issue.paper.repository_url %> –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––------------ - + <% end %> <% end %> <% end %> \ No newline at end of file diff --git a/app/views/papers/_vote_summary.html.erb b/app/views/papers/_vote_summary.html.erb index 2e45834e2..e4c4e067f 100644 --- a/app/views/papers/_vote_summary.html.erb +++ b/app/views/papers/_vote_summary.html.erb @@ -3,7 +3,7 @@ Scope summary <% if @paper.votes.any? %>👍 <%= @paper.votes.in_scope.count %> · 👎 <%= @paper.votes.out_of_scope.count %><% end %>
-

Record your opinion on whether or not this submission is in scope, optionally leaving a comment explaining your decision for the EiCs.

+

Record your opinion on whether or not this submission is in scope, optionally leaving a comment explaining your decision for the EiCs. If you make a mistake or want to change your vote, simply fill out the form again (this will remove your first vote).

<%= form_for [@paper, Vote.new] do |f| %>
diff --git a/spec/controllers/votes_controller_spec.rb b/spec/controllers/votes_controller_spec.rb index d6aba86d5..ad3d78449 100644 --- a/spec/controllers/votes_controller_spec.rb +++ b/spec/controllers/votes_controller_spec.rb @@ -1,5 +1,39 @@ require 'rails_helper' RSpec.describe VotesController, type: :controller do + it "LOGGED IN responds with success" do + editor = create(:editor, login: "josseditor") + editing_user = create(:user, editor: editor) + paper = create(:submitted_paper) + allow(controller).to receive_message_chain(:current_user).and_return(editing_user) + vote_count = paper.votes.count + + vote_params = { vote: { comment: ""}, + commit: "Vote as in scope 👍", + paper_id: paper.sha } + + post :create, params: vote_params + expect(response).to be_redirect # as it's created the thing + expect(paper.votes.count).to eq(vote_count + 1) + end + + it "LOGGED IN responds with success should an additional vote (but destroy the first)" do + editor = create(:editor, login: "josseditor") + editing_user = create(:user, editor: editor) + paper = create(:submitted_paper) + original_vote = create(:in_scope_vote, paper: paper, editor: editor) + + allow(controller).to receive_message_chain(:current_user).and_return(editing_user) + vote_count = paper.votes.count + + vote_params = { vote: { comment: ""}, + commit: "Vote as out of scope 👎", + paper_id: paper.sha } + + post :create, params: vote_params + expect(response).to be_redirect # as it's created the thing + expect(paper.votes.count).to eq(vote_count) + expect(Vote.find_by_id(original_vote.id)).to be_nil + end end diff --git a/spec/models/vote_spec.rb b/spec/models/vote_spec.rb index e3e1306d0..ad9c73862 100644 --- a/spec/models/vote_spec.rb +++ b/spec/models/vote_spec.rb @@ -34,6 +34,17 @@ assert out_of_scope_vote.out_of_scope? end + it "should know how to look up a vote for an editor" do + editor = create(:editor) + editor2 = create(:editor) + paper = create(:paper) + create(:in_scope_vote, editor: editor, paper: paper) + + expect(Vote.has_vote_for?(paper, editor)).to be_a_kind_of(Vote) + expect(Vote.has_vote_for?(paper, editor2)).to be_nil + end + + it "should know about #in_scope and #out_of_scope" do submitted_paper = create(:paper, state: "submitted") From 7c2430c80cb239d3d2e0dc60cf215911398017e3 Mon Sep 17 00:00:00 2001 From: Jonas Rauber Date: Thu, 6 Aug 2020 09:24:56 +0200 Subject: [PATCH 005/609] fixed typo --- docs/submitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index db5a4cd5e..b467af39e 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -97,7 +97,7 @@ tags: - galactic dynamics - milky way authors: - - name: Adrian M. Price-Whelan^[Custom footnotes for e.g. denoting who the corresspoinding author is can be included like this.] + - name: Adrian M. Price-Whelan^[Custom footnotes for e.g. denoting who the corresponding author is can be included like this.] orcid: 0000-0003-0872-7098 affiliation: "1, 2" # (Multiple affiliations must be quoted) - name: Author Without ORCID From 1342b057f1db4ecb70d19a6c586ae542858f6aff Mon Sep 17 00:00:00 2001 From: Farhim Ferdous <37705070+AluBhorta@users.noreply.github.com> Date: Thu, 6 Aug 2020 13:47:47 +0600 Subject: [PATCH 006/609] fix typo --- docs/submitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index db5a4cd5e..d68a953b6 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -9,7 +9,7 @@ But please read these instructions carefully for a streamlined submission. - The software should be open source as per the [OSI definition](https://opensource.org/osd). - The software should have an **obvious** research application. - You should be a major contributor to the software you are submitting. -- You paper should not focus on new research results accomplished with the software. +- Your paper should not focus on new research results accomplished with the software. - Your paper (`paper.md` and BibTeX files, plus any figures) must be hosted in a Git-based repository. Placing these items together with your software (rather than in a separate repository) is **strongly encouraged**. In addition, the software associated with your submission must: From e557186a3ee44c7d82e9cdd6dad081d3cdf8fe2d Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 9 Aug 2020 11:48:36 -0400 Subject: [PATCH 007/609] Label on repo URL --- app/views/papers/_form.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/papers/_form.html.erb b/app/views/papers/_form.html.erb index 2b9f7036e..04b38c09a 100644 --- a/app/views/papers/_form.html.erb +++ b/app/views/papers/_form.html.erb @@ -25,7 +25,7 @@ <%= f.text_field :software_version, placeholder: "e.g. v1.0.0", class: "form-control" %>
- <%= f.label "Repository Address (git repository address only)" %> + <%= f.text_field :repository_url, placeholder: "e.g. https://github.com/openjournals/joss", class: "form-control" %>
From 51a0148c97f979a4e797973366fde24e16d15d6e Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 9 Aug 2020 11:52:33 -0400 Subject: [PATCH 008/609] Label on repo URL --- app/views/papers/_form.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/papers/_form.html.erb b/app/views/papers/_form.html.erb index 04b38c09a..d4cc77bb7 100644 --- a/app/views/papers/_form.html.erb +++ b/app/views/papers/_form.html.erb @@ -25,7 +25,7 @@ <%= f.text_field :software_version, placeholder: "e.g. v1.0.0", class: "form-control" %>
- + <%= f.text_field :repository_url, placeholder: "e.g. https://github.com/openjournals/joss", class: "form-control" %>
From 26a3d3e850c4566bec8edda3b184a2f4807095f0 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 9 Aug 2020 13:05:34 -0400 Subject: [PATCH 009/609] URL pointer --- app/views/papers/_form.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/papers/_form.html.erb b/app/views/papers/_form.html.erb index d4cc77bb7..c609865d1 100644 --- a/app/views/papers/_form.html.erb +++ b/app/views/papers/_form.html.erb @@ -25,7 +25,7 @@ <%= f.text_field :software_version, placeholder: "e.g. v1.0.0", class: "form-control" %>
- + <%= f.text_field :repository_url, placeholder: "e.g. https://github.com/openjournals/joss", class: "form-control" %>
From 5d64d1c120a58f5c643475634eb50df524f6cf6a Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 9 Aug 2020 20:18:02 -0400 Subject: [PATCH 010/609] Make it a requirement that the paper has to be with the software (#789) * Update submitting.md * Make it clear branch can be short-lived --- docs/submitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index c8f7dce24..58dfe32b2 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -10,7 +10,7 @@ But please read these instructions carefully for a streamlined submission. - The software should have an **obvious** research application. - You should be a major contributor to the software you are submitting. - Your paper should not focus on new research results accomplished with the software. -- Your paper (`paper.md` and BibTeX files, plus any figures) must be hosted in a Git-based repository. Placing these items together with your software (rather than in a separate repository) is **strongly encouraged**. +- Your paper (`paper.md` and BibTeX files, plus any figures) must be hosted in a Git-based repository together with your software (although they may be in a short-lived branch which is never merged with the default). In addition, the software associated with your submission must: From f95e9bb7202cb812264c29de5bd3f8fb8a7bda35 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Aug 2020 14:54:18 +0000 Subject: [PATCH 011/609] Bump chartkick from 3.3.0 to 3.4.0 Bumps [chartkick](https://github.com/ankane/chartkick) from 3.3.0 to 3.4.0. - [Release notes](https://github.com/ankane/chartkick/releases) - [Changelog](https://github.com/ankane/chartkick/blob/master/CHANGELOG.md) - [Commits](https://github.com/ankane/chartkick/compare/v3.3.0...v3.4.0) Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 78262a2ce..3e2644bd6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -84,7 +84,7 @@ GEM rack-test (>= 0.6.3) regexp_parser (~> 1.5) xpath (~> 3.2) - chartkick (3.3.0) + chartkick (3.4.0) coderay (1.1.2) coffee-rails (5.0.0) coffee-script (>= 2.2.0) From c78a3a4634e04c7375bd08e2d076811ddfd71d7a Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sat, 22 Aug 2020 18:30:15 +0100 Subject: [PATCH 012/609] Order all papers too --- app/controllers/home_controller.rb | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 01a2d55d1..0a07a4a4c 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -92,20 +92,25 @@ def in_progress end def all - if params[:order] - @papers = Paper.unscoped.all.order(last_activity: params[:order]).paginate( - page: params[:page], - per_page: 20 - ) + case params[:order] + when "desc" + @order = "desc" + when "asc" + @order = "asc" + when nil + @order = "desc" else - @papers = Paper.all.paginate( - page: params[:page], - per_page: 20 - ) + @order = "desc" end @editor = current_user.editor + @papers = Paper.unscoped.all.order(last_activity: @order).paginate( + page: params[:page], + per_page: 20 + ) + + render template: "home/reviews" end From 1abeb7a8883585a660f29d91736aa4e749d968d4 Mon Sep 17 00:00:00 2001 From: Kunal Marwaha Date: Tue, 1 Sep 2020 03:06:04 -0700 Subject: [PATCH 013/609] typo: receviving -> receiving (#794) --- app/views/home/about.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/home/about.html.erb b/app/views/home/about.html.erb index 954843b24..b24141c78 100644 --- a/app/views/home/about.html.erb +++ b/app/views/home/about.html.erb @@ -215,7 +215,7 @@

Income

-

JOSS has an experimental collaboration with <%= link_to "AAS publishing", "https://blog.joss.theoj.org/2018/12/a-new-collaboration-with-aas-publishing" %> where authors submitting to one of the AAS journals can also publish a companion software paper in JOSS, thereby receviving a review of their software. For this service, JOSS receives a small donation from AAS publishing. In 2019, JOSS received $200 as a result of this collaboration.

+

JOSS has an experimental collaboration with <%= link_to "AAS publishing", "https://blog.joss.theoj.org/2018/12/a-new-collaboration-with-aas-publishing" %> where authors submitting to one of the AAS journals can also publish a companion software paper in JOSS, thereby receiving a review of their software. For this service, JOSS receives a small donation from AAS publishing. In 2019, JOSS received $200 as a result of this collaboration.

Donate

From 1d2f09b43dbefe87d6b93f60fbe6c99d3930f9ff Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 2 Sep 2020 22:32:02 +0100 Subject: [PATCH 014/609] Don't email about papers under review --- app/views/notifications/editor_scope_email.html.erb | 2 ++ app/views/notifications/editor_scope_email.text.erb | 2 ++ 2 files changed, 4 insertions(+) diff --git a/app/views/notifications/editor_scope_email.html.erb b/app/views/notifications/editor_scope_email.html.erb index d06b3f30b..74caf5282 100644 --- a/app/views/notifications/editor_scope_email.html.erb +++ b/app/views/notifications/editor_scope_email.html.erb @@ -5,10 +5,12 @@ <% if @query_scope_issues.any? %> <% @query_scope_issues.each do |issue| %> <% unless Vote.has_vote_for?(issue.paper, @editor) %> + <% if issue.pre_review? %>

<%= issue.title %> (<%= issue.paper.created_at.strftime('%F') %>)

<%= issue.paper.body %>

<%= link_to "VOTE ON SCOPE HERE", "#{Rails.application.settings["url"]}/papers/#{issue.paper.sha}" %> · <%= link_to "View review issue", "https://github.com/#{Rails.application.settings['reviews']}/issues/#{issue.number}" %> · <%= link_to "View software repository", issue.paper.repository_url %>


+ <% end %> <% end %> <% end %> <% end %> \ No newline at end of file diff --git a/app/views/notifications/editor_scope_email.text.erb b/app/views/notifications/editor_scope_email.text.erb index cc5a567ca..3c9848273 100644 --- a/app/views/notifications/editor_scope_email.text.erb +++ b/app/views/notifications/editor_scope_email.text.erb @@ -5,6 +5,7 @@ Please review the recently-flagged submissions below and vote on the <%= Rails.a <% if @query_scope_issues.any? %> <% @query_scope_issues.each do |issue| %> <% unless Vote.has_vote_for?(issue.paper, @editor) %> + <% if issue.pre_review? %> <%= issue.title %> (<%= issue.paper.created_at.strftime('%F') %>) @@ -15,6 +16,7 @@ Review issue: https://github.com/<%= Rails.application.settings["reviews"] %>/is Software repository: <%= issue.paper.repository_url %> –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––------------ + <% end %> <% end %> <% end %> <% end %> \ No newline at end of file From 8b89fcf26fa217b7251da8f6d511641204e3e06b Mon Sep 17 00:00:00 2001 From: Jed Brown Date: Mon, 28 Sep 2020 08:05:35 -0600 Subject: [PATCH 015/609] Zap trailing whitespace --- docs/submitting.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/submitting.md b/docs/submitting.md index 58dfe32b2..518965c6a 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -24,7 +24,7 @@ In addition, the software associated with your submission must: JOSS publishes articles about research software. This definition includes software that: solves complex modeling problems in a scientific context (physics, mathematics, biology, medicine, social science, neuroscience, engineering); supports the functioning of research instruments or the execution of research experiments; extracts knowledge from large data sets; offers a mathematical library, or similar. -### Substantial scholarly effort +### Substantial scholarly effort JOSS publishes articles about software that represent substantial scholarly effort on the part of the authors. Your software should be a significant contribution to the available open source software that either enables some new research challenges to be addressed or makes addressing research challenges significantly better (e.g., faster, easier, simpler). @@ -132,7 +132,7 @@ Aside from toy problems and demonstrations, the majority of problems require efficient numerical tools, many of which require the same base code (e.g., for performing numerical orbit integration). -# Statement of need +# Statement of need `Gala` is an Astropy-affiliated Python package for galactic dynamics. Python enables wrapping low-level languages (e.g., C) for speed without losing @@ -195,7 +195,7 @@ Fenced code blocks are rendered with syntax highlighting: ```python for n in range(10): yield f(n) -``` +``` # Acknowledgements From 7306d338fb3a93f8b75fdce35d4f26e62f225a05 Mon Sep 17 00:00:00 2001 From: Jed Brown Date: Mon, 28 Sep 2020 08:05:52 -0600 Subject: [PATCH 016/609] Add note on confidential requests to admin@theoj.org --- docs/submitting.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/submitting.md b/docs/submitting.md index 518965c6a..f1bb6b27d 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -314,3 +314,9 @@ After submission: - The review issue will be closed, and an automatic tweet from [@JOSS_TheOJ](https://twitter.com/JOSS_TheOJ) will announce it! If you want to learn more details about the review process, take a look at the [reviewer guidelines](reviewer_guidelines.html). + +## Confidential requests + +Please write admin@theoj.org with confidential matters such as retraction requests, report of misconduct, and retroactive author name changes. +In case of a legal name change, the DOI will be unchanged and the paper will be updated to use the new name and note that a name has been changed, but without identifying the author. +JOSS will also update CrossRef metadata. \ No newline at end of file From fc398ff8380761044a87f947c40f9b8c75e2365d Mon Sep 17 00:00:00 2001 From: Elizabeth DuPre Date: Tue, 29 Sep 2020 10:38:47 -0400 Subject: [PATCH 017/609] Starting dev docs --- docs/installing.md | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/docs/installing.md b/docs/installing.md index 01a6ffb07..62a3787af 100644 --- a/docs/installing.md +++ b/docs/installing.md @@ -1,6 +1,38 @@ Installing the JOSS application =============================== -To be written... +Any open journal (JOSS, JOSE, etc.) can be considered in three parts: -For now, please take a look at the [JOSS codebase](https://github.com/openjournals/joss). +1. The website +2. The Whedon gem +3. A thin API wrapper around the Whedon gem to interface with GitHub + +For JOSS, these correspond to the +`JOSS `_, +`Whedon `_, and +`Whedon-API `_ code bases. + +Setting up a local development environment +------------------------------------------ + +All open journals are coded in Ruby, +with the website and Whedon-API developed as +`Ruby on Rails `_ applications. + +If you'd like to develop these locally, +you'll need a working Ruby on Rails development environment. +For more information, please see +`this official guide `_. + +Deploying your JOSS application +------------------------------- + +To deploy JOSS, you'll need a `Heroku account `_. +We also recommend you gather the following information +before deploying your application to Heroku: + +1. A `public ORCID API `_ key +1. A GitHub `Personal Access Token `_ for the automated account that users will interact with (e.g., whedon, roboneuro) +1. An email address registered on a domain you control (i.e., not gmail or a related service) + +For now, please take a look at the [JOSS codebase](https://github.com/openjournals/joss). From 26dbac0f11955b5cb637472e6373276455be054a Mon Sep 17 00:00:00 2001 From: Elizabeth DuPre Date: Tue, 29 Sep 2020 11:10:10 -0400 Subject: [PATCH 018/609] More detail on add-ons, config vars --- docs/installing.md | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/docs/installing.md b/docs/installing.md index 62a3787af..3434e3e72 100644 --- a/docs/installing.md +++ b/docs/installing.md @@ -35,4 +35,45 @@ before deploying your application to Heroku: 1. A GitHub `Personal Access Token `_ for the automated account that users will interact with (e.g., whedon, roboneuro) 1. An email address registered on a domain you control (i.e., not gmail or a related service) -For now, please take a look at the [JOSS codebase](https://github.com/openjournals/joss). +.. warning:: + Do not put these secrets directly into your code base! + It is important that these keys are not under version control. + + There are different ways to make sure your application has access to these keys, + depending on whether your code is being developed locally or on Heroku. + Locally, you can store these locally in a .env file. + The .gitignore in JOSS is already set to ignore this file type. + + On Heroku, they will be config variables that you can set either with the Heroku CLI or directly on your application's dashboard. + See `this guide from Heroku `_ for more information. + +Assuming you `have forked the JOSS GitHub repository `_ +to your account, you can `configure Heroku as a git remote `_ for your code. +This makes it easy to keep your Heroku deployment in sync with your local development copy. + +On the JOSS Heroku deployment, you'll need to provision several `add-ons `_. +Specifically, you'll need an: + +1. `Elasticsearch add-on `_, +1. `Postgres add-on `_, +1. `Scheduler add-on `_ + +You can also optionally configure the following add-ons (or simply set their secret keys in your config variables): + +1. `SendGrid add-on `_ for sending emails +1. `Honeybadger add-on `_ for error reporting + +Once you've pushed your application to Heroku and provisioned the appropriate add-ons, +you're ready to update your config with the appropriate secrets. +For a list of the expected secret key names, see your app.json file. + +We will not cover Portico, as this requires that your application is a part of the openjournals organization. +If you do not already have access to these keys, you can simply ignore them for now. + +.. note: + One key we have not covered thus far is WHEDON_SECRET. + This is because this is a secret key that you set yourself; + for example, using something like a random SHA1 string. + + It is important to remember this key, + as we will need it when deploying your Whedon-API application. \ No newline at end of file From efa8c49f55db7e53902559fe00ff15f29c889616 Mon Sep 17 00:00:00 2001 From: Elizabeth DuPre Date: Tue, 29 Sep 2020 11:10:35 -0400 Subject: [PATCH 019/609] Update docs/installing.md Co-authored-by: Vanessasaurus --- docs/installing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/installing.md b/docs/installing.md index 3434e3e72..f35f5ea37 100644 --- a/docs/installing.md +++ b/docs/installing.md @@ -32,7 +32,7 @@ We also recommend you gather the following information before deploying your application to Heroku: 1. A `public ORCID API `_ key -1. A GitHub `Personal Access Token `_ for the automated account that users will interact with (e.g., whedon, roboneuro) +1. A GitHub `Personal Access Token `_ for the automated account that users will interact with (e.g., Whedon, RoboNeuro) 1. An email address registered on a domain you control (i.e., not gmail or a related service) .. warning:: @@ -76,4 +76,4 @@ If you do not already have access to these keys, you can simply ignore them for for example, using something like a random SHA1 string. It is important to remember this key, - as we will need it when deploying your Whedon-API application. \ No newline at end of file + as we will need it when deploying your Whedon-API application. From 63f6d4f9c0247e3023b1b199401b4a00a985c9d2 Mon Sep 17 00:00:00 2001 From: Elizabeth DuPre Date: Tue, 29 Sep 2020 11:41:51 -0400 Subject: [PATCH 020/609] More info, ohmygod it was markdown --- docs/installing.md | 66 ++++++++++++++++++++++++++++++---------------- 1 file changed, 44 insertions(+), 22 deletions(-) diff --git a/docs/installing.md b/docs/installing.md index 3434e3e72..eb615e651 100644 --- a/docs/installing.md +++ b/docs/installing.md @@ -8,33 +8,34 @@ Any open journal (JOSS, JOSE, etc.) can be considered in three parts: 3. A thin API wrapper around the Whedon gem to interface with GitHub For JOSS, these correspond to the -`JOSS `_, -`Whedon `_, and -`Whedon-API `_ code bases. +[JOSS](https://github.com/openjournals/joss), +[Whedon](https://github.com/openjournals/whedon), and +[Whedon-API](https://github.com/openjournals/whedon-api) code bases. Setting up a local development environment ------------------------------------------ All open journals are coded in Ruby, with the website and Whedon-API developed as -`Ruby on Rails `_ applications. +[Ruby on Rails](https://rubyonrails.org/inst) applications. If you'd like to develop these locally, you'll need a working Ruby on Rails development environment. For more information, please see -`this official guide `_. +[this official guide](https://guides.rubyonrails.org/getting_started.html#creating-a-new-rails-project-installing-rails). Deploying your JOSS application ------------------------------- -To deploy JOSS, you'll need a `Heroku account `_. +To deploy JOSS, you'll need a [Heroku account](https://signup.heroku.com/). We also recommend you gather the following information before deploying your application to Heroku: -1. A `public ORCID API `_ key -1. A GitHub `Personal Access Token `_ for the automated account that users will interact with (e.g., whedon, roboneuro) -1. An email address registered on a domain you control (i.e., not gmail or a related service) +1. A [public ORCID API](https://members.orcid.org/api/about-public-api) key +1. A GitHub [Personal Access Token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token) for the automated account that users will interact with (e.g., `@Whedon`, `@RoboNeuro`) +1. An email address registered on a domain you control (i.e., not `gmail` or a related service) +```eval_rst .. warning:: Do not put these secrets directly into your code base! It is important that these keys are not under version control. @@ -46,34 +47,55 @@ before deploying your application to Heroku: On Heroku, they will be config variables that you can set either with the Heroku CLI or directly on your application's dashboard. See `this guide from Heroku `_ for more information. +``` -Assuming you `have forked the JOSS GitHub repository `_ -to your account, you can `configure Heroku as a git remote `_ for your code. +Assuming you [have forked the JOSS GitHub repository](https://docs.github.com/en/free-pro-team@latest/github/getting-started-with-github/fork-a-repo) +to your account, you can [configure Heroku as a git remote](https://devcenter.heroku.com/articles/git#prerequisites-install-git-and-the-heroku-cli) for your code. This makes it easy to keep your Heroku deployment in sync with your local development copy. -On the JOSS Heroku deployment, you'll need to provision several `add-ons `_. +On the JOSS Heroku deployment, you'll need to provision several [add-ons](https://elements.heroku.com/addons). Specifically, you'll need an: -1. `Elasticsearch add-on `_, -1. `Postgres add-on `_, -1. `Scheduler add-on `_ +1. [Elasticsearch add-on](https://elements.heroku.com/addons/bonsai), +1. [Postgres add-on](https://elements.heroku.com/addons/heroku-postgresql), +1. [Scheduler add-on](https://devcenter.heroku.com/articles/scheduler)_ You can also optionally configure the following add-ons (or simply set their secret keys in your config variables): -1. `SendGrid add-on `_ for sending emails -1. `Honeybadger add-on `_ for error reporting +1. [SendGrid add-on](https://elements.heroku.com/addons/sendgrid) for sending emails +1. [Honeybadger add-on](https://elements.heroku.com/addons/honeybadger) for error reporting Once you've pushed your application to Heroku and provisioned the appropriate add-ons, you're ready to update your config with the appropriate secrets. For a list of the expected secret key names, see your app.json file. -We will not cover Portico, as this requires that your application is a part of the openjournals organization. +```eval_rst +.. warn: + One "gotcha" when provisioning the Bonsai add-on is that it may only set the BONSAI_URL variable. + Make sure that there is also an ELASTICSEARCH_URL which is set to the same address. +``` + +We will not cover Portico, as this requires that your application is a part of the `openjournals` organization. If you do not already have access to these keys, you can simply ignore them for now. +```eval_rst .. note: - One key we have not covered thus far is WHEDON_SECRET. - This is because this is a secret key that you set yourself; - for example, using something like a random SHA1 string. + One secret key we have not covered thus far is WHEDON_SECRET. + This is because it is not one that you obtain from a provide, + but a secret key that you set yourself. + We recommend using something like a random SHA1 string. It is important to remember this key, - as we will need it when deploying your Whedon-API application. \ No newline at end of file + as you will need it when deploying your Whedon-API application. +``` + +After pushing your application to Heroku, provisioning the appropriate add-ons, +and confirming that your config variables are set correctly, +you should make sure that your username is registered as an admin on the application. + +You can do this on a local Rails console, by logging in and setting the boolean field 'admin' +on your user ID to True. +If you'd prefer to do this on the Heroku deployment, make sure you've logged into the application. +Then you can directly modify this attribute in the deployments Postgres database using SQL. +For more information on accessing your application's Postgres database, +see [the official docs](https://devcenter.heroku.com/articles/heroku-postgresql#pg-psql). \ No newline at end of file From 820db36ba405f128e8e70a078a363c8981b4de15 Mon Sep 17 00:00:00 2001 From: Elizabeth DuPre Date: Tue, 29 Sep 2020 16:57:25 -0400 Subject: [PATCH 021/609] Add section on modifying site-specific configs --- docs/installing.md | 46 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 6 deletions(-) diff --git a/docs/installing.md b/docs/installing.md index 1e3c0f3e6..58a0fa97d 100644 --- a/docs/installing.md +++ b/docs/installing.md @@ -7,10 +7,13 @@ Any open journal (JOSS, JOSE, etc.) can be considered in three parts: 2. The Whedon gem 3. A thin API wrapper around the Whedon gem to interface with GitHub -For JOSS, these correspond to the -[JOSS](https://github.com/openjournals/joss), -[Whedon](https://github.com/openjournals/whedon), and -[Whedon-API](https://github.com/openjournals/whedon-api) code bases. +For JOSS, these correspond to the: + +1. [JOSS](https://github.com/openjournals/joss), +2. [Whedon](https://github.com/openjournals/whedon), and +3. [Whedon-API](https://github.com/openjournals/whedon-api) + +code bases. Setting up a local development environment ------------------------------------------ @@ -58,7 +61,11 @@ Specifically, you'll need an: 1. [Elasticsearch add-on](https://elements.heroku.com/addons/bonsai), 1. [Postgres add-on](https://elements.heroku.com/addons/heroku-postgresql), -1. [Scheduler add-on](https://devcenter.heroku.com/articles/scheduler)_ +1. [Scheduler add-on](https://devcenter.heroku.com/articles/scheduler) + +For the scheduler add-on, you'll need to designate which tasks it should run and when. +These can be found in the `lib/tasks` folder, and involve things such as sending out weekly reminder emails to editors. +Each task should be scheduled as a separate job; for example, `rake send_weekly_emails`. You can also optionally configure the following add-ons (or simply set their secret keys in your config variables): @@ -67,7 +74,7 @@ You can also optionally configure the following add-ons (or simply set their sec Once you've pushed your application to Heroku and provisioned the appropriate add-ons, you're ready to update your config with the appropriate secrets. -For a list of the expected secret key names, see your app.json file. +For a list of the expected secret key names, see the `app.json` file. ```eval_rst .. warn: @@ -99,3 +106,30 @@ If you'd prefer to do this on the Heroku deployment, make sure you've logged int Then you can directly modify this attribute in the deployments Postgres database using SQL. For more information on accessing your application's Postgres database, see [the official docs](https://devcenter.heroku.com/articles/heroku-postgresql#pg-psql). + +Making modifications to launch your own site +-------------------------------------------- + +Some times you may not want to launch an exact copy of JOSS, but a modified version. +This can be especially useful if you're planning to spin up your own platform based on the +Open Journals framework. +[NeuroLibre](https://neurolibre.herokuapp.com) is one such example use-case. + +In this case, there are several important variables to be aware of and modify. +Most of these are accessible in the `config` folder. + +First, there are three files which provide settings for your Rails application in different development contexts: + +1. `settings-test.yml` +1. `settings-development.yml` +1. `settings-production.yml` + +These each contain site-specific variables that should be modified if you are building off of the Open Journals framework. + +Next, you'll need to modify the `repository.yml` file. +This file lists the GitHub repository where you expect papers to be published, +as well as the editor team ID. +For your GitHub organization, make sure you have created and populated a team called `editors`. +Then, you can check its ID number as detailed in [this guide](https://fabian-kostadinov.github.io/2015/01/16/how-to-find-a-github-team-id). + +Finally, you can modify the `orcid.yml` file to list your site as the production site. \ No newline at end of file From 3d0d505777009e234c545dd0686d98050c53883b Mon Sep 17 00:00:00 2001 From: Elizabeth DuPre Date: Tue, 29 Sep 2020 17:45:22 -0400 Subject: [PATCH 022/609] Split information into modifying config, content --- docs/installing.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/docs/installing.md b/docs/installing.md index 58a0fa97d..9d6d9abfe 100644 --- a/docs/installing.md +++ b/docs/installing.md @@ -115,6 +115,9 @@ This can be especially useful if you're planning to spin up your own platform ba Open Journals framework. [NeuroLibre](https://neurolibre.herokuapp.com) is one such example use-case. +Modifying your site configuration +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + In this case, there are several important variables to be aware of and modify. Most of these are accessible in the `config` folder. @@ -131,5 +134,28 @@ This file lists the GitHub repository where you expect papers to be published, as well as the editor team ID. For your GitHub organization, make sure you have created and populated a team called `editors`. Then, you can check its ID number as detailed in [this guide](https://fabian-kostadinov.github.io/2015/01/16/how-to-find-a-github-team-id). +In `config` you should also modify the `orcid.yml` file to list your site as the production site. + +Optionally, you can edit `seeds.rb`, a file in the `db` folder. +"DB" is short for "database," and this file _seeds_ the database with information about your editorial team. +You can edit the file `seeds.rb` to remove any individuals who are not editors in your organization. +This file will be updated later as you add information in the application, so this step is not strictly necessary. + +Modifying your site contents +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +You can modify site content by updating files in the `app` and `docs` folders. +For example, in `app/views/notifications` you can text for any emails that will be sent by your application. + +Note that files which end in `.html.erb` are treated as HTML files, and typical HTML formatting applies. +You can set the HTML styling by modifying the Sass files for your application, +located in `app/assets/stylesheets`. + +There are currently a few hard-coded variables in the application which you will also need to update. +Note that these are mostly under `lib/tasks`. +For example, in `stats.rake`, the reviewer sheet ID is hard-coded on line 37. +You should update this to point to your own spreadsheet where you maintain a list of eligible reviewers. -Finally, you can modify the `orcid.yml` file to list your site as the production site. \ No newline at end of file +In the same folder, `utils.rake` is currently hard-coded to alternate assignments of editor-in-chief based on weeks. +You should modify this to either set a single editor-in-chief, +or design your own scheme of alternating between members of your editorial board. \ No newline at end of file From 6bdd93e46674008f7a5ec1e5bfa5485692703c03 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sat, 3 Oct 2020 21:21:35 +0100 Subject: [PATCH 023/609] Validate Git repository on submission (#812) * Adding check for valid Git repository * Fixing specs * Remove notice --- app/models/paper.rb | 12 ++++++++++++ app/views/papers/new.html.erb | 3 --- spec/controllers/papers_controller_spec.rb | 2 +- spec/models/paper_spec.rb | 5 +++++ 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/app/models/paper.rb b/app/models/paper.rb index fafc2f86d..d87907cb3 100644 --- a/app/models/paper.rb +++ b/app/models/paper.rb @@ -1,3 +1,5 @@ +require 'open3' + class Paper < ActiveRecord::Base searchkick index_name: "joss-production" @@ -123,6 +125,7 @@ class Paper < ActiveRecord::Base validates_presence_of :body, message: "^Description can't be blank" validates :kind, inclusion: { in: Rails.application.settings["paper_types"] }, allow_nil: true validates :submission_kind, inclusion: { in: SUBMISSION_KINDS }, allow_nil: false + validate :check_repository_address, on: :create def notify_editors Notifications.submission_email(self).deliver_now @@ -462,6 +465,15 @@ def markdown_code private + def check_repository_address + stdout_str, stderr_str, status = Open3.capture3("git ls-remote #{repository_url}") + + if !status.success? + errors.add(:base, "Invalid Git repository address. Check that your repository can be cloned from the value entered and that access doesn't require authentication.") + return false + end + end + def set_sha self.sha ||= SecureRandom.hex end diff --git a/app/views/papers/new.html.erb b/app/views/papers/new.html.erb index 75b5db089..47be37bd3 100644 --- a/app/views/papers/new.html.erb +++ b/app/views/papers/new.html.erb @@ -1,9 +1,6 @@
-

Submit <%= setting(:product) %> for review

From a8b823bdb09a248c82609b44c1964fcbcce5befd Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sat, 31 Oct 2020 10:37:22 +0000 Subject: [PATCH 040/609] Increase graph range --- app/views/home/dashboard.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/home/dashboard.html.erb b/app/views/home/dashboard.html.erb index 1bd10997c..8380dfc21 100644 --- a/app/views/home/dashboard.html.erb +++ b/app/views/home/dashboard.html.erb @@ -70,7 +70,7 @@ <%= column_chart [ { name: "Accepted papers by month", data: @accepted_papers } - ], height: "500px", legend: false, library: { scales: { xAxes: [{ position: 'bottom' }], yAxes: [{ position: 'left', gridLines: { display: true, drawBorder: true }, ticks: { min: 0, max: 60, stepSize: 5}}, { position: 'right', gridLines: { display: false, drawBorder: true }, ticks: { min: 0, max: 40, stepSize: 5}}]}} %> + ], height: "500px", legend: false, library: { scales: { xAxes: [{ position: 'bottom' }], yAxes: [{ position: 'left', gridLines: { display: true, drawBorder: true }, ticks: { min: 0, max: 60, stepSize: 5}}, { position: 'right', gridLines: { display: false, drawBorder: true }, ticks: { min: 0, max: 60, stepSize: 5}}]}} %>
From d9a8b2ccb2c59edd19ed42b0292ad085b2a03245 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sat, 31 Oct 2020 15:01:47 +0000 Subject: [PATCH 041/609] Ask about related publications. Fixes #819 --- app/views/papers/_form.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/papers/_form.html.erb b/app/views/papers/_form.html.erb index c609865d1..e3a53381e 100644 --- a/app/views/papers/_form.html.erb +++ b/app/views/papers/_form.html.erb @@ -25,7 +25,7 @@ <%= f.text_field :software_version, placeholder: "e.g. v1.0.0", class: "form-control" %>
- + <%= f.text_field :repository_url, placeholder: "e.g. https://github.com/openjournals/joss", class: "form-control" %>
@@ -48,7 +48,7 @@
<%= f.label "Message to editors" %> <%= f.text_area :body, rows: "7", - placeholder: "Please give short (1-2 line) description of your #{setting(:product)} including specific notes to the editor if this is a resubmission or a second paper in #{setting(:abbreviation)} about this #{setting(:product)}.", class: 'form-control' %> + placeholder: "Has any portion of the submitted work (which includes code and documentation) been published or submitted, or is planned for submission, to another peer-reviewed publication venue? If yes, please describe. Please also give short (1-2 line) description of your #{setting(:product)} including specific notes to the editor if this is a resubmission or a second paper in #{setting(:abbreviation)} about this #{setting(:product)}.", class: 'form-control' %>
From fb3a9ccbb10f067621956c3e4c0188028e863603 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 1 Nov 2020 16:59:47 +0000 Subject: [PATCH 042/609] Sunday scope email --- lib/tasks/editorials.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/editorials.rake b/lib/tasks/editorials.rake index 8eee38051..80a899396 100644 --- a/lib/tasks/editorials.rake +++ b/lib/tasks/editorials.rake @@ -26,7 +26,7 @@ namespace :editorials do task send_query_scope_email: :environment do # We run this task daily on Heroku but only want the email # sent once per week (on a Monday) - if Time.now.monday? + if Time.now.sunday? reviews_repo = Rails.application.settings["reviews"] review_issues = ReviewIssue.download_review_issues(reviews_repo, 'query-scope') From a49dc67431a5cb3d618eb427bd5ee1e2c7503867 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Thu, 12 Nov 2020 10:33:42 +0000 Subject: [PATCH 043/609] Preview service URL update --- app/views/papers/new.html.erb | 2 +- docs/submitting.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/papers/new.html.erb b/app/views/papers/new.html.erb index 47be37bd3..05685b07b 100644 --- a/app/views/papers/new.html.erb +++ b/app/views/papers/new.html.erb @@ -8,7 +8,7 @@

As the submitting author, before you submit, please make sure that you have reviewed the following items. We promise this will make things go much more quickly during the review process:

diff --git a/docs/submitting.md b/docs/submitting.md index b6d42bd22..4202882ad 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -272,7 +272,7 @@ Note that the paper ends with a References heading, and the references are built ## Checking that your paper compiles -JOSS uses Pandoc to compile papers from their Markdown form into a PDF. You can test that your paper is properly structured using the [JOSS paper preview service](https://whedon.theoj.org). +JOSS uses Pandoc to compile papers from their Markdown form into a PDF. You can test that your paper is properly structured using the [JOSS paper preview service](https://whedon.herokuapp.com). ## Submitting your paper From 3c7f7478e6b7b1acee0f41414ea8e4969420017d Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Thu, 12 Nov 2020 14:14:15 +0000 Subject: [PATCH 044/609] Restore Whedon --- app/views/papers/new.html.erb | 2 +- docs/submitting.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/papers/new.html.erb b/app/views/papers/new.html.erb index 05685b07b..47be37bd3 100644 --- a/app/views/papers/new.html.erb +++ b/app/views/papers/new.html.erb @@ -8,7 +8,7 @@

As the submitting author, before you submit, please make sure that you have reviewed the following items. We promise this will make things go much more quickly during the review process:

diff --git a/docs/submitting.md b/docs/submitting.md index 4202882ad..b6d42bd22 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -272,7 +272,7 @@ Note that the paper ends with a References heading, and the references are built ## Checking that your paper compiles -JOSS uses Pandoc to compile papers from their Markdown form into a PDF. You can test that your paper is properly structured using the [JOSS paper preview service](https://whedon.herokuapp.com). +JOSS uses Pandoc to compile papers from their Markdown form into a PDF. You can test that your paper is properly structured using the [JOSS paper preview service](https://whedon.theoj.org). ## Submitting your paper From cf33528481e615ceb294f07c8241b2082f563852 Mon Sep 17 00:00:00 2001 From: Elizabeth DuPre Date: Thu, 12 Nov 2020 10:24:06 -0500 Subject: [PATCH 045/609] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Arfon Smith Co-authored-by: Juanjo Bazán --- docs/installing.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/installing.md b/docs/installing.md index 6a647d835..d8e5e2f8b 100644 --- a/docs/installing.md +++ b/docs/installing.md @@ -1,6 +1,6 @@ # Installing the JOSS application -Any open journal (JOSS, JOSE, etc.) can be considered in three parts: +Any Open Journal (JOSS, JOSE, etc.) can be considered in three parts: 1. The website 2. The Whedon gem @@ -16,7 +16,7 @@ code bases. ## Setting up a local development environment -All open journals are coded in Ruby, +All Open Journals are coded in Ruby, with the website and Whedon-API developed as [Ruby on Rails](https://rubyonrails.org/inst) applications. @@ -58,7 +58,7 @@ On the JOSS Heroku deployment, you'll need to provision several [add-ons](https: Specifically, you'll need: 1. [Elasticsearch add-on](https://elements.heroku.com/addons/bonsai) -1. [Postgres add-on](https://elements.heroku.com/addons/heroku-postgresql) +1. [PostgreSQL add-on](https://elements.heroku.com/addons/heroku-postgresql) 1. [Scheduler add-on](https://devcenter.heroku.com/articles/scheduler) For the scheduler add-on, you'll need to designate which tasks it should run and when. @@ -154,7 +154,7 @@ you can add a new webhook with the following configuration: ### Modifying your site contents You can modify site content by updating files in the `app` and `docs` folders. -For example, in `app/views/notifications` you can text for any emails that will be sent by your application. +For example, in `app/views/notifications` you can change the text for any emails that will be sent by your application. Note that files which end in `.html.erb` are treated as HTML files, and typical HTML formatting applies. You can set the HTML styling by modifying the Sass files for your application, @@ -181,7 +181,7 @@ On the Whedon-API Heroku deployment, you'll need to provision several [add-ons]( Specifically, you'll need: 1. [Cloudinary add-on](https://elements.heroku.com/addons/cloudinary) -1. [Postgres add-on](https://elements.heroku.com/addons/heroku-postgresql), +1. [PostgreSQL add-on](https://elements.heroku.com/addons/heroku-postgresql), 1. [Scheduler add-on](https://devcenter.heroku.com/articles/scheduler) 1. [Redis To Go add-on](https://elements.heroku.com/addons/redistogo) @@ -241,4 +241,4 @@ you can add a new webhook with the following configuration: For example, https://roboneuro.herokuapp.com/dispatch - Set the `Content type` to `application/json` - Set the secret to a high-entropy, random string as detailed in the [GitHub docs](https://docs.github.com/en/free-pro-team@latest/developers/webhooks-and-events/securing-your-webhooks#setting-your-secret-token) -- Set the webhook to deliver `all events` \ No newline at end of file +- Set the webhook to deliver `all events` From a500273513894594c523730b682cbd81118b683c Mon Sep 17 00:00:00 2001 From: Elizabeth DuPre Date: Thu, 12 Nov 2020 11:51:12 -0500 Subject: [PATCH 046/609] Incorporate review comments --- docs/installing.md | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/docs/installing.md b/docs/installing.md index 6a647d835..9aeabac61 100644 --- a/docs/installing.md +++ b/docs/installing.md @@ -132,11 +132,6 @@ For your GitHub organization, make sure you have created and populated a team ca Then, you can check its ID number as detailed in [this guide](https://fabian-kostadinov.github.io/2015/01/16/how-to-find-a-github-team-id). In `config` you should also modify the `orcid.yml` file to list your site as the production site. -Optionally, you can edit `seeds.rb`, a file in the `db` folder. -"DB" is short for "database," and this file _seeds_ the database with information about your editorial team. -You can edit the file `seeds.rb` to remove any individuals who are not editors in your organization. -This file will be updated later as you add information in the application, so this step is not strictly necessary. - Finally, you'll need to set up a [GitHub webhook](https://docs.github.com/en/free-pro-team@latest/developers/webhooks-and-events/about-webhooks) for reviews repository. This should be a repository that you have write access to, where you expect most of the reviewer-author interaction to occur. @@ -151,6 +146,23 @@ you can add a new webhook with the following configuration: - Set the secret to a high-entropy, random string as detailed in the [GitHub docs](https://docs.github.com/en/free-pro-team@latest/developers/webhooks-and-events/securing-your-webhooks#setting-your-secret-token) - Set the webhook to deliver `all events` +#### Updating your application database + +Optionally, you can edit `seeds.rb`, a file in the `db` folder. +"DB" is short for "database," and this file _seeds_ the database with information about your editorial team. +You can edit the file `seeds.rb` to remove any individuals who are not editors in your organization. +This can be especially useful if you will be creating the database multiple times during development; +for example, if you add in testing information that you'd later like to remove. + +You can reinitialize the database from your Heroku CLI using the following commands: + +```bash +heroku pg:reset DATABASE_URL +heroku run rails db:schema:load +heroku run rails db:seed +heroku run rails searchkick:reindex:all +``` + ### Modifying your site contents You can modify site content by updating files in the `app` and `docs` folders. @@ -181,7 +193,6 @@ On the Whedon-API Heroku deployment, you'll need to provision several [add-ons]( Specifically, you'll need: 1. [Cloudinary add-on](https://elements.heroku.com/addons/cloudinary) -1. [Postgres add-on](https://elements.heroku.com/addons/heroku-postgresql), 1. [Scheduler add-on](https://devcenter.heroku.com/articles/scheduler) 1. [Redis To Go add-on](https://elements.heroku.com/addons/redistogo) From 6a08fbfef43ccd3e717a7896639cd40b4e5f1c5c Mon Sep 17 00:00:00 2001 From: Elizabeth DuPre Date: Thu, 12 Nov 2020 12:38:16 -0500 Subject: [PATCH 047/609] Fix sphinx note, warning (#832) --- docs/installing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/installing.md b/docs/installing.md index e39735346..95333526a 100644 --- a/docs/installing.md +++ b/docs/installing.md @@ -75,7 +75,7 @@ you're ready to update your config with the appropriate secrets. For a list of the expected secret key names, see the `app.json` file. ```eval_rst -.. warn: +.. warning:: One "gotcha" when provisioning the Bonsai add-on is that it may only set the BONSAI_URL variable. Make sure that there is also an ELASTICSEARCH_URL which is set to the same address. ``` @@ -84,7 +84,7 @@ We will not cover Portico, as this requires that your application is a part of t If you do not already have access to these keys, you can simply ignore them for now. ```eval_rst -.. note: +.. note:: One secret key we have not covered thus far is WHEDON_SECRET. This is because it is not one that you obtain from a provide, but a secret key that you set yourself. From c3cbc31a689ad4ebf18e7006b6a62078d03d52bd Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 15 Nov 2020 08:34:02 +0000 Subject: [PATCH 048/609] Making the vote comments required --- app/models/vote.rb | 2 ++ app/views/papers/_vote_summary.html.erb | 4 ++-- spec/controllers/votes_controller_spec.rb | 21 ++++++++++++++++++--- spec/factories/votes_factory.rb | 2 ++ 4 files changed, 24 insertions(+), 5 deletions(-) diff --git a/app/models/vote.rb b/app/models/vote.rb index ed4af2939..7c767bd48 100644 --- a/app/models/vote.rb +++ b/app/models/vote.rb @@ -2,6 +2,8 @@ class Vote < ActiveRecord::Base belongs_to :paper belongs_to :editor + validates :comment, presence: true + VOTE_KINDS = [ "in-scope", "out-of-scope", diff --git a/app/views/papers/_vote_summary.html.erb b/app/views/papers/_vote_summary.html.erb index e4c4e067f..ba47dfb1d 100644 --- a/app/views/papers/_vote_summary.html.erb +++ b/app/views/papers/_vote_summary.html.erb @@ -3,13 +3,13 @@ Scope summary <% if @paper.votes.any? %>👍 <%= @paper.votes.in_scope.count %> · 👎 <%= @paper.votes.out_of_scope.count %><% end %>
-

Record your opinion on whether or not this submission is in scope, optionally leaving a comment explaining your decision for the EiCs. If you make a mistake or want to change your vote, simply fill out the form again (this will remove your first vote).

+

Record your opinion on whether or not this submission is in scope, leaving a comment explaining your decision for the EiCs. If you make a mistake or want to change your vote, simply fill out the form again (this will remove your first vote).

<%= form_for [@paper, Vote.new] do |f| %>
- <%= f.text_field :comment, class: "form-control", placeholder: "Include a comment with your vote (optional)" %> + <%= f.text_field :comment, class: "form-control", placeholder: "Include a comment with your vote (required)" %>
diff --git a/spec/controllers/votes_controller_spec.rb b/spec/controllers/votes_controller_spec.rb index ad3d78449..ee29a58e2 100644 --- a/spec/controllers/votes_controller_spec.rb +++ b/spec/controllers/votes_controller_spec.rb @@ -1,7 +1,7 @@ require 'rails_helper' RSpec.describe VotesController, type: :controller do - it "LOGGED IN responds with success" do + it "LOGGED IN, not blank, responds with success" do editor = create(:editor, login: "josseditor") editing_user = create(:user, editor: editor) paper = create(:submitted_paper) @@ -9,7 +9,7 @@ allow(controller).to receive_message_chain(:current_user).and_return(editing_user) vote_count = paper.votes.count - vote_params = { vote: { comment: ""}, + vote_params = { vote: { comment: "This is in scope!"}, commit: "Vote as in scope 👍", paper_id: paper.sha } @@ -18,6 +18,21 @@ expect(paper.votes.count).to eq(vote_count + 1) end + it "LOGGED IN, NO COMMENT, responds with failure" do + editor = create(:editor, login: "josseditor") + editing_user = create(:user, editor: editor) + paper = create(:submitted_paper) + + allow(controller).to receive_message_chain(:current_user).and_return(editing_user) + vote_count = paper.votes.count + + vote_params = { vote: { comment: ""}, + commit: "Vote as in scope 👍", + paper_id: paper.sha } + + expect { post :create, params: vote_params }.to raise_error(ActiveRecord::RecordInvalid) + end + it "LOGGED IN responds with success should an additional vote (but destroy the first)" do editor = create(:editor, login: "josseditor") editing_user = create(:user, editor: editor) @@ -27,7 +42,7 @@ allow(controller).to receive_message_chain(:current_user).and_return(editing_user) vote_count = paper.votes.count - vote_params = { vote: { comment: ""}, + vote_params = { vote: { comment: "This is out of scope!"}, commit: "Vote as out of scope 👎", paper_id: paper.sha } diff --git a/spec/factories/votes_factory.rb b/spec/factories/votes_factory.rb index 3acc92362..ee97f23e6 100644 --- a/spec/factories/votes_factory.rb +++ b/spec/factories/votes_factory.rb @@ -2,10 +2,12 @@ factory :vote do factory :out_of_scope_vote do kind { "out-of-scope"} + comment { "Out of scope because reasons" } end factory :in_scope_vote do kind { "in-scope"} + comment { "In scope because reasons" } end end end From e6ce1a2715616030d33db010019ccb664e3ae5cc Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 15 Nov 2020 09:06:56 +0000 Subject: [PATCH 049/609] Fixing up views --- app/controllers/votes_controller.rb | 16 +++++++--------- spec/controllers/votes_controller_spec.rb | 3 ++- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/app/controllers/votes_controller.rb b/app/controllers/votes_controller.rb index 2a8807612..3bf51368d 100644 --- a/app/controllers/votes_controller.rb +++ b/app/controllers/votes_controller.rb @@ -18,18 +18,16 @@ def create @vote = @paper.votes.build(params) - begin - if previous_vote = Vote.find_by_paper_id_and_editor_id(@paper, current_user.editor) - previous_vote.destroy! - end + if previous_vote = Vote.find_by_paper_id_and_editor_id(@paper, current_user.editor) + previous_vote.destroy! + end - @vote.save! + if @vote.save flash[:notice] = "Vote recorded" redirect_to paper_path(@paper) - # Can't vote on the same item twice - rescue ActiveRecord::RecordNotUnique => e - flash[:error] = "Can't vote on the same item twice" - render 'papers/show', layout: false + else + flash[:error] = "Comment can't be empty" + redirect_to paper_path(@paper) end end diff --git a/spec/controllers/votes_controller_spec.rb b/spec/controllers/votes_controller_spec.rb index ee29a58e2..99b63e6be 100644 --- a/spec/controllers/votes_controller_spec.rb +++ b/spec/controllers/votes_controller_spec.rb @@ -30,7 +30,8 @@ commit: "Vote as in scope 👍", paper_id: paper.sha } - expect { post :create, params: vote_params }.to raise_error(ActiveRecord::RecordInvalid) + post :create, params: vote_params + expect(paper.votes.count).to eq(vote_count) # No new votes end it "LOGGED IN responds with success should an additional vote (but destroy the first)" do From a17ab7112e39874dc2f930ab515af8a56d8ed80c Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 15 Nov 2020 19:44:45 +0000 Subject: [PATCH 050/609] Track last comment from users --- app/helpers/dispatch_helper.rb | 19 ++++++++++++++++++- spec/controllers/dispatch_controller_spec.rb | 11 +++++------ spec/fixtures/whedon-pre-review-comment.json | 4 ++-- 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/app/helpers/dispatch_helper.rb b/app/helpers/dispatch_helper.rb index 26544c4f3..de7d1b3fc 100644 --- a/app/helpers/dispatch_helper.rb +++ b/app/helpers/dispatch_helper.rb @@ -66,6 +66,10 @@ def closed? action == 'closed' end + def commented? + action == 'created' + end + def edited? action == 'edited' end @@ -98,7 +102,8 @@ def initialize_activities 'review' => {} }, 'comments' => [], - 'last_edits' => {} + 'last_edits' => {}, + 'last_comments' => {} } } @@ -137,6 +142,18 @@ def parse_payload! paper.save and return end + # New addition to keep track of the last comments by each + # person on the thread. + if commented? + if issues.has_key?('last_comments') + issues['last_comments'][sender] = payload['issue']['updated_at'] + else + issues['last_comments'] = {} + issues['last_comments'][sender] = payload['issue']['updated_at'] + end + paper.last_activity = payload['issue']['updated_at'] + end + if pre_review? kind = 'pre-review' return if issue_number != paper.meta_review_issue_id diff --git a/spec/controllers/dispatch_controller_spec.rb b/spec/controllers/dispatch_controller_spec.rb index f5f836185..7fdcb571b 100644 --- a/spec/controllers/dispatch_controller_spec.rb +++ b/spec/controllers/dispatch_controller_spec.rb @@ -48,7 +48,7 @@ def set_signature(payload) it "should initialize the activities when an issue is opened" do expect(response).to be_ok - expect(@paper.activities).to eq({"issues"=>{"commenters"=>{"pre-review"=>{}, "review"=>{}}, "comments"=>[], "last_edits"=>{}}}) + expect(@paper.activities).to eq({"issues"=>{"commenters"=>{"pre-review"=>{}, "review"=>{}}, "comments"=>[], "last_edits"=>{}, "last_comments" => {}}}) end it "should UPDATE the activities when an issue is then commented on" do @@ -63,9 +63,8 @@ def set_signature(payload) expect(response).to be_ok expect(@paper.activities['issues']['commenters']).to eq({"pre-review"=>{"whedon"=>1, "editor"=>1}, "review"=>{}}) expect(@paper.activities['issues']['comments'].length).to eq(2) - - # expect(@paper.activities['issues']['review']['commenters']).to be_empty - # expect(@paper.activities['issues']['review']['comments'].length).to eq(0) + expect(@paper.activities['issues']['last_comments']['editor']).to eq("2018-09-30T11:48:30Z") + expect(@paper.activities['issues']['last_comments']['whedon']).to eq("2018-09-30T11:48:40Z") end end @@ -109,7 +108,7 @@ def set_signature(payload) it "should initialize the activities when a review issue is opened" do expect(response).to be_ok - expect(@paper.activities).to eq({"issues"=>{"commenters"=>{"pre-review"=>{}, "review"=>{}}, "comments"=>[], "last_edits"=>{}}}) + expect(@paper.activities).to eq({"issues"=>{"commenters"=>{"pre-review"=>{}, "review"=>{}}, "comments"=>[], "last_edits"=>{}, "last_comments" => {}}}) end end @@ -124,7 +123,7 @@ def set_signature(payload) it "should update the last_edits key" do expect(response).to be_ok - expect(@paper.activities).to eq({"issues"=>{"commenters"=>{"pre-review"=>{}, "review"=>{}}, "comments"=>[], "last_edits"=>{"comment-editor"=>"2018-10-06T16:18:56Z"}}}) + expect(@paper.activities).to eq({"issues"=>{"commenters"=>{"pre-review"=>{}, "review"=>{}}, "comments"=>[], "last_comments" => {}, "last_edits"=>{"comment-editor"=>"2018-10-06T16:18:56Z"}}}) end it "should update the last_activity field" do diff --git a/spec/fixtures/whedon-pre-review-comment.json b/spec/fixtures/whedon-pre-review-comment.json index 0eaefe2c1..1b3241774 100644 --- a/spec/fixtures/whedon-pre-review-comment.json +++ b/spec/fixtures/whedon-pre-review-comment.json @@ -42,8 +42,8 @@ ], "milestone": null, "comments": 0, - "created_at": "2018-09-30T11:48:26Z", - "updated_at": "2018-09-30T11:48:30Z", + "created_at": "2018-09-30T11:48:36Z", + "updated_at": "2018-09-30T11:48:40Z", "closed_at": null, "author_association": "COLLABORATOR", "body": "**Submitting author:** @arfon (Robert Gieseke)\r\n**Repository:** https://github.com/arfon/fidgit\r\n**Version:** v1.0.1\r\n**Editor:** @arfon\r\n**Reviewers:** @Robot\r\n\r\n**Author instructions**\r\n\r\nThanks for submitting your paper to JOSS @rgieseke. The JOSS editor (shown at the top of this issue) will work with you on this issue to find a reviewer for your submission before creating the main review issue.\r\n\r\n@rgieseke if you have any suggestions for potential reviewers then please mention them here in this thread. In addition, [this list of people](https://github.com/openjournals/joss/blob/master/docs/reviewers.csv) have already agreed to review for JOSS and may be suitable for this submission.\r\n\r\n**Editor instructions**\r\n\r\nThe JOSS submission bot @whedon is here to help you find and assign reviewers and start the main review. To find out what @whedon can do for you type:\r\n\r\n```\r\n@whedon commands\r\n```\r\n\r\n " From 026b9670f616d392448dae8ffab201bba31db66e Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 23 Nov 2020 12:22:40 +0000 Subject: [PATCH 051/609] Adding more docs about various options for compiling papers --- docs/submitting.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index b6d42bd22..e58fe365f 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -272,7 +272,29 @@ Note that the paper ends with a References heading, and the references are built ## Checking that your paper compiles -JOSS uses Pandoc to compile papers from their Markdown form into a PDF. You can test that your paper is properly structured using the [JOSS paper preview service](https://whedon.theoj.org). +JOSS uses Pandoc to compile papers from their Markdown form into a PDF. There are a few different ways you can test that your paper is going to compile properly for JOSS: + +**JOSS paper preview service** + +Visit [https://whedon.theoj.org](https://whedon.theoj.org) and enter your repository address (and custom branch if you're using one). Note that your repository must be world-readable (i.e. not require a login to access). + +Screen Shot 2020-11-23 at 12 08 58 PM + +**GitHub Action** + +If you're using GitHub for your repository, you can use the [Open Journals GitHub Action](https://github.com/marketplace/actions/open-journals-pdf-generator) to automatically compile your paper each time you update your repository. + +**Docker** + +If you have Docker installed on your local machine, you can use the same Docker Image to compile a draft of your paper locally. In the example below, the `paper.md` file is in the `paper` directory. Upon successful execution of the command, the `paper.pdf` file will be created in the same location as the `paper.md` file: + +```text +docker run --rm \ + --volume $PWD/paper:/data \ + --user $(id -u):$(id -g) \ + --env JOURNAL=joss \ + openjournals/paperdraft +``` ## Submitting your paper From 8fe191a0aecf32fe917ee73860df0aaa6958450d Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 23 Nov 2020 13:07:55 +0000 Subject: [PATCH 052/609] Update docs/submitting.md Co-authored-by: Daniel S. Katz --- docs/submitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index e58fe365f..342797765 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -276,7 +276,7 @@ JOSS uses Pandoc to compile papers from their Markdown form into a PDF. There ar **JOSS paper preview service** -Visit [https://whedon.theoj.org](https://whedon.theoj.org) and enter your repository address (and custom branch if you're using one). Note that your repository must be world-readable (i.e. not require a login to access). +Visit [https://whedon.theoj.org](https://whedon.theoj.org) and enter your repository address (and custom branch if you're using one). Note that your repository must be world-readable (i.e., it cannot require a login to access). Screen Shot 2020-11-23 at 12 08 58 PM From 0502311fd34fb95e279fcd9e80c3e2959152cc04 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 23 Nov 2020 15:54:49 +0000 Subject: [PATCH 053/609] Update submitting.md --- docs/submitting.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/submitting.md b/docs/submitting.md index 342797765..5587f6f70 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -284,6 +284,8 @@ Visit [https://whedon.theoj.org](https://whedon.theoj.org) and enter your reposi If you're using GitHub for your repository, you can use the [Open Journals GitHub Action](https://github.com/marketplace/actions/open-journals-pdf-generator) to automatically compile your paper each time you update your repository. +The PDF is available via the Actions tab in your project and click on the latest workflow run. The zip archive file (including the `paper.pdf`) is listed in the run's Artifacts section. + **Docker** If you have Docker installed on your local machine, you can use the same Docker Image to compile a draft of your paper locally. In the example below, the `paper.md` file is in the `paper` directory. Upon successful execution of the command, the `paper.pdf` file will be created in the same location as the `paper.md` file: From 3eb56de1252680855c08597442db7c0fffb86666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 24 Nov 2020 10:34:02 +0100 Subject: [PATCH 054/609] make subsections linkable --- docs/submitting.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/submitting.md b/docs/submitting.md index 5587f6f70..bfac7ebae 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -274,19 +274,19 @@ Note that the paper ends with a References heading, and the references are built JOSS uses Pandoc to compile papers from their Markdown form into a PDF. There are a few different ways you can test that your paper is going to compile properly for JOSS: -**JOSS paper preview service** +### JOSS paper preview service Visit [https://whedon.theoj.org](https://whedon.theoj.org) and enter your repository address (and custom branch if you're using one). Note that your repository must be world-readable (i.e., it cannot require a login to access). Screen Shot 2020-11-23 at 12 08 58 PM -**GitHub Action** +### GitHub Action -If you're using GitHub for your repository, you can use the [Open Journals GitHub Action](https://github.com/marketplace/actions/open-journals-pdf-generator) to automatically compile your paper each time you update your repository. +If you're using GitHub for your repository, you can use the [Open Journals GitHub Action](https://github.com/marketplace/actions/open-journals-pdf-generator) to automatically compile your paper each time you update your repository. The PDF is available via the Actions tab in your project and click on the latest workflow run. The zip archive file (including the `paper.pdf`) is listed in the run's Artifacts section. -**Docker** +### Docker If you have Docker installed on your local machine, you can use the same Docker Image to compile a draft of your paper locally. In the example below, the `paper.md` file is in the `paper` directory. Upon successful execution of the command, the `paper.pdf` file will be created in the same location as the `paper.md` file: From 8678e8d107290b7a4d1ca1d6b4689803ccd818f2 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Thu, 26 Nov 2020 16:46:08 +0000 Subject: [PATCH 055/609] Adding checkbox for paper compilation check --- app/assets/javascripts/papers.coffee | 2 +- app/views/papers/_form.html.erb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/papers.coffee b/app/assets/javascripts/papers.coffee index 42ee90466..ecb3da09d 100644 --- a/app/assets/javascripts/papers.coffee +++ b/app/assets/javascripts/papers.coffee @@ -5,7 +5,7 @@ # Disable the form if the author hasn't checked the certify checkbox authorCheck = -> checkBoxCount = $(".pre-check:checked").length - if checkBoxCount == 2 + if checkBoxCount == 3 $("#author-submit").removeClass('disabled') $("#author-submit").prop('disabled', false) else diff --git a/app/views/papers/_form.html.erb b/app/views/papers/_form.html.erb index e3a53381e..c78f2b5d5 100644 --- a/app/views/papers/_form.html.erb +++ b/app/views/papers/_form.html.erb @@ -57,6 +57,10 @@
+
+ + +
From dac8d46b6a8fa9112e3da2c7074cc97d49004a04 Mon Sep 17 00:00:00 2001 From: "Daniel S. Katz" Date: Thu, 3 Dec 2020 08:15:27 -0600 Subject: [PATCH 056/609] adding pre-submission enquiry info --- docs/submitting.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index bfac7ebae..17b7b1384 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -50,11 +50,14 @@ Authors wishing to publish software deemed out of scope for JOSS have a few opti - Follow [GitHub's guide](https://guides.github.com/activities/citable-code/) on how to create a permanent archive and DOI for your software. This DOI can then be used by others to cite your work. - Enquire whether your software might be considered by communities such as [rOpenSci](https://ropensci.org) and [pyOpenSci](https://pyopensci.org). - ### Should I write my own software or contribute to an existing package? While we are happy to review submissions in standalone repositories, we also review submissions that are significant contributions made to existing packages. It is often better to have an integrated library or package of methods than a large number of single-method packages. +### Questions? Open an issue to ask + +Authors wishing to make a pre-submission enquiry should [open an issue](https://github.com/openjournals/joss/issues/new?title=Pre-submission%20enquiry) on the JOSS repository. + ## Typical paper submission flow Before you submit, you should: From e2bcabb660be649ed16c409b9bef118b50fab883 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 10 Dec 2020 18:29:25 +0100 Subject: [PATCH 057/609] update gems --- Gemfile | 4 +- Gemfile.lock | 342 ++++++++++++++++++++++++++------------------------- 2 files changed, 175 insertions(+), 171 deletions(-) diff --git a/Gemfile b/Gemfile index 6cd6ff42d..de65ddc22 100644 --- a/Gemfile +++ b/Gemfile @@ -17,7 +17,7 @@ gem 'octokit', '~> 4.14' gem 'pdf-reader', '~> 2.2' gem 'pg', '~> 1.1.4' gem 'will_paginate', '~> 3.1.8' -gem 'rails', '6.0.3.4' +gem 'rails', '6.1.0' gem 'responders' gem 'newrelic_rpm' gem 'sanitize', '~> 5.2.1' @@ -33,7 +33,7 @@ gem 'bootstrap', '~> 4.3.1' # Use jquery as the JavaScript library -gem 'jquery-rails', '~> 4.3.5' +gem 'jquery-rails', '~> 4.4.0' gem 'custom_error_message', '~> 1.1.1' # Use Unicorn as the app server diff --git a/Gemfile.lock b/Gemfile.lock index a45ee1d01..7a43668ef 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,40 +2,42 @@ GEM remote: https://rubygems.org/ specs: Ascii85 (1.0.3) - aasm (5.0.5) + aasm (5.0.8) concurrent-ruby (~> 1.0) - actioncable (6.0.3.4) - actionpack (= 6.0.3.4) + actioncable (6.1.0) + actionpack (= 6.1.0) + activesupport (= 6.1.0) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.0.3.4) - actionpack (= 6.0.3.4) - activejob (= 6.0.3.4) - activerecord (= 6.0.3.4) - activestorage (= 6.0.3.4) - activesupport (= 6.0.3.4) + actionmailbox (6.1.0) + actionpack (= 6.1.0) + activejob (= 6.1.0) + activerecord (= 6.1.0) + activestorage (= 6.1.0) + activesupport (= 6.1.0) mail (>= 2.7.1) - actionmailer (6.0.3.4) - actionpack (= 6.0.3.4) - actionview (= 6.0.3.4) - activejob (= 6.0.3.4) + actionmailer (6.1.0) + actionpack (= 6.1.0) + actionview (= 6.1.0) + activejob (= 6.1.0) + activesupport (= 6.1.0) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.0.3.4) - actionview (= 6.0.3.4) - activesupport (= 6.0.3.4) - rack (~> 2.0, >= 2.0.8) + actionpack (6.1.0) + actionview (= 6.1.0) + activesupport (= 6.1.0) + rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.0.3.4) - actionpack (= 6.0.3.4) - activerecord (= 6.0.3.4) - activestorage (= 6.0.3.4) - activesupport (= 6.0.3.4) + actiontext (6.1.0) + actionpack (= 6.1.0) + activerecord (= 6.1.0) + activestorage (= 6.1.0) + activesupport (= 6.1.0) nokogiri (>= 1.8.5) - actionview (6.0.3.4) - activesupport (= 6.0.3.4) + actionview (6.1.0) + activesupport (= 6.1.0) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -43,39 +45,41 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (6.0.3.4) - activesupport (= 6.0.3.4) + activejob (6.1.0) + activesupport (= 6.1.0) globalid (>= 0.3.6) - activemodel (6.0.3.4) - activesupport (= 6.0.3.4) - activerecord (6.0.3.4) - activemodel (= 6.0.3.4) - activesupport (= 6.0.3.4) - activestorage (6.0.3.4) - actionpack (= 6.0.3.4) - activejob (= 6.0.3.4) - activerecord (= 6.0.3.4) + activemodel (6.1.0) + activesupport (= 6.1.0) + activerecord (6.1.0) + activemodel (= 6.1.0) + activesupport (= 6.1.0) + activestorage (6.1.0) + actionpack (= 6.1.0) + activejob (= 6.1.0) + activerecord (= 6.1.0) + activesupport (= 6.1.0) marcel (~> 0.3.1) - activesupport (6.0.3.4) + mimemagic (~> 0.3.2) + activesupport (6.1.0) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) - zeitwerk (~> 2.2, >= 2.2.2) - addressable (2.6.0) - public_suffix (>= 2.0.2, < 4.0) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) afm (0.2.2) - autoprefixer-rails (9.6.1) + autoprefixer-rails (10.1.0.0) execjs bindex (0.8.1) - bootsnap (1.4.4) + bootsnap (1.5.1) msgpack (~> 1.0) bootstrap (4.3.1) autoprefixer-rails (>= 9.1.0) popper_js (>= 1.14.3, < 2) sassc-rails (>= 2.0.0) builder (3.2.4) - byebug (11.0.1) + byebug (11.1.3) capybara (3.28.0) addressable mini_mime (>= 0.1.3) @@ -84,8 +88,8 @@ GEM rack-test (>= 0.6.3) regexp_parser (~> 1.5) xpath (~> 3.2) - chartkick (3.4.0) - coderay (1.1.2) + chartkick (3.4.2) + coderay (1.1.3) coffee-rails (5.0.0) coffee-script (>= 2.2.0) railties (>= 5.2.0) @@ -93,29 +97,28 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - commonmarker (0.20.1) + commonmarker (0.20.2) ruby-enum (~> 0.5) concurrent-ruby (1.1.7) - crack (0.4.3) - safe_yaml (~> 1.0.0) + crack (0.4.4) crass (1.0.6) custom_error_message (1.1.1) - declarative (0.0.10) + declarative (0.0.20) declarative-option (0.1.0) - diff-lcs (1.3) - dotenv (2.7.5) - elasticsearch (7.4.0) - elasticsearch-api (= 7.4.0) - elasticsearch-transport (= 7.4.0) - elasticsearch-api (7.4.0) + diff-lcs (1.4.4) + dotenv (2.7.6) + elasticsearch (7.10.0) + elasticsearch-api (= 7.10.0) + elasticsearch-transport (= 7.10.0) + elasticsearch-api (7.10.0) multi_json - elasticsearch-transport (7.4.0) - faraday + elasticsearch-transport (7.10.0) + faraday (~> 1) multi_json - em-websocket (0.5.1) + em-websocket (0.5.2) eventmachine (>= 0.12.9) http_parser.rb (~> 0.6.0) - erubi (1.9.0) + erubi (1.10.0) eventmachine (1.2.7) execjs (2.7.0) factory_bot (5.0.2) @@ -123,35 +126,37 @@ GEM factory_bot_rails (5.0.2) factory_bot (~> 5.0.2) railties (>= 4.2.0) - faraday (0.15.4) + faraday (1.1.0) multipart-post (>= 1.2, < 3) - ffi (1.11.1) + ruby2_keywords + ffi (1.13.1) formatador (0.2.5) github-markdown (0.6.9) globalid (0.4.2) activesupport (>= 4.2.0) - google-api-client (0.30.8) + google-api-client (0.51.0) addressable (~> 2.5, >= 2.5.1) - googleauth (>= 0.5, < 0.10.0) + googleauth (~> 0.9) httpclient (>= 2.8.1, < 3.0) mini_mime (~> 1.0) representable (~> 3.0) retriable (>= 2.0, < 4.0) - signet (~> 0.10) - google_drive (3.0.3) - google-api-client (>= 0.11.0, < 0.31.0) + rexml + signet (~> 0.12) + google_drive (3.0.5) + google-api-client (>= 0.11.0, < 1.0.0) googleauth (>= 0.5.0, < 1.0.0) nokogiri (>= 1.5.3, < 2.0.0) - googleauth (0.9.0) - faraday (~> 0.12) + googleauth (0.14.0) + faraday (>= 0.17.3, < 2.0) jwt (>= 1.4, < 3.0) memoist (~> 0.16) multi_json (~> 1.11) os (>= 0.9, < 2.0) - signet (~> 0.7) - groupdate (4.1.2) - activesupport (>= 4.2) - guard (2.15.0) + signet (~> 0.14) + groupdate (5.2.1) + activesupport (>= 5) + guard (2.16.2) formatador (>= 0.2.4) listen (>= 2.7, < 4.0) lumberjack (>= 1.0.12, < 2.0) @@ -166,172 +171,172 @@ GEM guard (~> 2.8) guard-compat (~> 1.0) multi_json (~> 1.8) - hashdiff (1.0.0) + hashdiff (1.0.1) hashery (2.1.2) - hashie (3.6.0) - honeybadger (4.5.1) - html-pipeline (2.12.0) + hashie (4.1.0) + honeybadger (4.5.6) + html-pipeline (2.12.3) activesupport (>= 2) nokogiri (>= 1.4) http_parser.rb (0.6.0) httpclient (2.8.3) i18n (1.8.5) concurrent-ruby (~> 1.0) - jquery-rails (4.3.5) + jquery-rails (4.4.0) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - jwt (2.2.1) - kgio (2.11.2) - listen (3.1.5) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - ruby_dep (~> 1.2) - loofah (2.7.0) + jwt (2.2.2) + kgio (2.11.3) + listen (3.3.3) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + loofah (2.8.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) - lumberjack (1.0.13) + lumberjack (1.2.8) mail (2.7.1) mini_mime (>= 0.1.1) marcel (0.3.3) mimemagic (~> 0.3.2) - memoist (0.16.0) - method_source (0.9.2) + memoist (0.16.2) + method_source (1.0.0) mimemagic (0.3.5) mini_mime (1.0.2) mini_portile2 (2.4.0) minitest (5.14.2) - msgpack (1.3.1) - multi_json (1.14.1) + msgpack (1.3.3) + multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.1.1) nenv (0.3.0) - newrelic_rpm (6.5.0.357) + newrelic_rpm (6.14.0) nio4r (2.5.4) nokogiri (1.10.10) mini_portile2 (~> 2.4.0) - nokogumbo (2.0.2) + nokogumbo (2.0.4) nokogiri (~> 1.8, >= 1.8.4) notiffany (0.1.3) nenv (~> 0.1) shellany (~> 0.0) - oauth2 (1.4.1) - faraday (>= 0.8, < 0.16.0) + oauth2 (1.4.4) + faraday (>= 0.8, < 2.0) jwt (>= 1.0, < 3.0) multi_json (~> 1.3) multi_xml (~> 0.5) rack (>= 1.2, < 3) - octicons (9.1.1) + octicons (9.6.0) nokogiri (>= 1.6.3.1) - octicons_helper (9.1.1) - octicons (= 9.1.1) + octicons_helper (9.6.0) + octicons (= 9.6.0) rails - octokit (4.14.0) + octokit (4.19.0) + faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) - omniauth (1.9.0) - hashie (>= 3.4.6, < 3.7.0) + omniauth (1.9.1) + hashie (>= 3.4.6) rack (>= 1.6.2, < 3) - omniauth-oauth2 (1.6.0) - oauth2 (~> 1.1) + omniauth-oauth2 (1.7.0) + oauth2 (~> 1.4) omniauth (~> 1.9) omniauth-orcid (2.1.1) omniauth-oauth2 (~> 1.3) ruby_dig (~> 0.0.2) - os (1.0.1) - pdf-reader (2.2.1) + os (1.1.1) + pdf-reader (2.4.1) Ascii85 (~> 1.0.0) afm (~> 0.2.1) hashery (~> 2.0) ruby-rc4 ttfunk pg (1.1.4) - popper_js (1.14.5) - pry (0.12.2) - coderay (~> 1.1.0) - method_source (~> 0.9.0) - pry-byebug (3.7.0) + popper_js (1.16.0) + pry (0.13.1) + coderay (~> 1.1) + method_source (~> 1.0) + pry-byebug (3.9.0) byebug (~> 11.0) - pry (~> 0.10) - public_suffix (3.1.1) + pry (~> 0.13.0) + public_suffix (4.0.6) rack (2.2.3) rack-livereload (0.3.17) rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.0.3.4) - actioncable (= 6.0.3.4) - actionmailbox (= 6.0.3.4) - actionmailer (= 6.0.3.4) - actionpack (= 6.0.3.4) - actiontext (= 6.0.3.4) - actionview (= 6.0.3.4) - activejob (= 6.0.3.4) - activemodel (= 6.0.3.4) - activerecord (= 6.0.3.4) - activestorage (= 6.0.3.4) - activesupport (= 6.0.3.4) - bundler (>= 1.3.0) - railties (= 6.0.3.4) + rails (6.1.0) + actioncable (= 6.1.0) + actionmailbox (= 6.1.0) + actionmailer (= 6.1.0) + actionpack (= 6.1.0) + actiontext (= 6.1.0) + actionview (= 6.1.0) + activejob (= 6.1.0) + activemodel (= 6.1.0) + activerecord (= 6.1.0) + activestorage (= 6.1.0) + activesupport (= 6.1.0) + bundler (>= 1.15.0) + railties (= 6.1.0) sprockets-rails (>= 2.0.0) - rails-controller-testing (1.0.4) - actionpack (>= 5.0.1.x) - actionview (>= 5.0.1.x) - activesupport (>= 5.0.1.x) + rails-controller-testing (1.0.5) + actionpack (>= 5.0.1.rc1) + actionview (>= 5.0.1.rc1) + activesupport (>= 5.0.1.rc1) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - railties (6.0.3.4) - actionpack (= 6.0.3.4) - activesupport (= 6.0.3.4) + railties (6.1.0) + actionpack (= 6.1.0) + activesupport (= 6.1.0) method_source rake (>= 0.8.7) - thor (>= 0.20.3, < 2.0) - raindrops (0.19.0) + thor (~> 1.0) + raindrops (0.19.1) rake (13.0.1) - rb-fsevent (0.10.3) - rb-inotify (0.10.0) + rb-fsevent (0.10.4) + rb-inotify (0.10.1) ffi (~> 1.0) - regexp_parser (1.6.0) + regexp_parser (1.8.2) representable (3.0.4) declarative (< 0.1.0) declarative-option (< 0.2.0) uber (< 0.2.0) - responders (3.0.0) + responders (3.0.1) actionpack (>= 5.0) railties (>= 5.0) retriable (3.1.2) - rspec-core (3.8.2) - rspec-support (~> 3.8.0) - rspec-expectations (3.8.4) + rexml (3.2.4) + rspec-core (3.10.0) + rspec-support (~> 3.10.0) + rspec-expectations (3.10.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.8.0) - rspec-mocks (3.8.1) + rspec-support (~> 3.10.0) + rspec-mocks (3.10.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.8.0) - rspec-rails (4.0.0.beta2) + rspec-support (~> 3.10.0) + rspec-rails (4.0.1) actionpack (>= 4.2) activesupport (>= 4.2) railties (>= 4.2) - rspec-core (~> 3.8) - rspec-expectations (~> 3.8) - rspec-mocks (~> 3.8) - rspec-support (~> 3.8) - rspec-support (3.8.2) - ruby-enum (0.7.2) + rspec-core (~> 3.9) + rspec-expectations (~> 3.9) + rspec-mocks (~> 3.9) + rspec-support (~> 3.9) + rspec-support (3.10.0) + ruby-enum (0.8.0) i18n ruby-rc4 (0.1.5) - ruby_dep (1.5.0) + ruby2_keywords (0.0.2) ruby_dig (0.0.2) - safe_yaml (1.0.5) sanitize (5.2.1) crass (~> 1.0.2) nokogiri (>= 1.8.0) nokogumbo (~> 2.0) sass-rails (6.0.0) sassc-rails (~> 2.1, >= 2.1.1) - sassc (2.1.0) + sassc (2.4.0) ffi (~> 1.9) sassc-rails (2.1.2) railties (>= 4.0.0) @@ -342,17 +347,17 @@ GEM sawyer (0.8.2) addressable (>= 2.3.5) faraday (> 0.8, < 2.0) - searchkick (4.2.0) + searchkick (4.4.2) activemodel (>= 5) elasticsearch (>= 6) hashie shellany (0.0.1) - signet (0.11.0) + signet (0.14.0) addressable (~> 2.3) - faraday (~> 0.9) + faraday (>= 0.17.3, < 2.0) jwt (>= 1.5, < 3.0) multi_json (~> 1.10) - spring (2.1.0) + spring (2.1.1) spring-commands-rspec (1.0.4) spring (>= 0.9.1) sprockets (4.0.2) @@ -363,18 +368,17 @@ GEM activesupport (>= 4.0) sprockets (>= 3.0.0) thor (1.0.1) - thread_safe (0.3.6) - tilt (2.0.9) - ttfunk (1.5.1) - tzinfo (1.2.7) - thread_safe (~> 0.1) + tilt (2.0.10) + ttfunk (1.6.2.1) + tzinfo (2.0.3) + concurrent-ruby (~> 1.0) uber (0.1.0) uglifier (4.1.20) execjs (>= 0.3.0, < 3) - unicorn (5.5.1) + unicorn (5.5.5) kgio (~> 2.6) raindrops (~> 0.7) - web-console (4.0.1) + web-console (4.0.4) actionview (>= 6.0.0) activemodel (>= 6.0.0) bindex (>= 0.4.0) @@ -389,7 +393,7 @@ GEM will_paginate (3.1.8) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.4.0) + zeitwerk (2.4.2) PLATFORMS ruby @@ -413,7 +417,7 @@ DEPENDENCIES guard-livereload honeybadger (~> 4.5.1) html-pipeline (~> 2.12.0) - jquery-rails (~> 4.3.5) + jquery-rails (~> 4.4.0) newrelic_rpm octicons_helper (~> 9.1) octokit (~> 4.14) @@ -422,7 +426,7 @@ DEPENDENCIES pg (~> 1.1.4) pry-byebug rack-livereload - rails (= 6.0.3.4) + rails (= 6.1.0) rails-controller-testing (~> 1.0.4) responders rspec-rails (~> 4.0.0.beta2) From a9bb367cb4b25d26828bc7decb34dcf2b18892d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 10 Dec 2020 18:32:54 +0100 Subject: [PATCH 058/609] update config files (via update task) --- bin/rails | 4 +- bin/rake | 4 +- bin/setup | 6 +- bin/spring | 17 ----- config.ru | 5 +- config/boot.rb | 4 +- config/environment.rb | 2 +- config/environments/development.rb | 22 +++++-- config/environments/production.rb | 16 +++-- config/environments/test.rb | 19 ++++-- config/initializers/backtrace_silencers.rb | 7 ++- .../initializers/filter_parameter_logging.rb | 4 +- .../new_framework_defaults_6_1.rb | 63 +++++++++++++++++++ config/initializers/permissions_policy.rb | 11 ++++ 14 files changed, 138 insertions(+), 46 deletions(-) delete mode 100755 bin/spring create mode 100644 config/initializers/new_framework_defaults_6_1.rb create mode 100644 config/initializers/permissions_policy.rb diff --git a/bin/rails b/bin/rails index 073966023..6fb4e4051 100755 --- a/bin/rails +++ b/bin/rails @@ -1,4 +1,4 @@ #!/usr/bin/env ruby APP_PATH = File.expand_path('../config/application', __dir__) -require_relative '../config/boot' -require 'rails/commands' +require_relative "../config/boot" +require "rails/commands" diff --git a/bin/rake b/bin/rake index 17240489f..4fbf10b96 100755 --- a/bin/rake +++ b/bin/rake @@ -1,4 +1,4 @@ #!/usr/bin/env ruby -require_relative '../config/boot' -require 'rake' +require_relative "../config/boot" +require "rake" Rake.application.run diff --git a/bin/setup b/bin/setup index 0e39e8cb1..57923026c 100755 --- a/bin/setup +++ b/bin/setup @@ -1,5 +1,5 @@ #!/usr/bin/env ruby -require 'fileutils' +require "fileutils" # path to your application root. APP_ROOT = File.expand_path('..', __dir__) @@ -9,8 +9,8 @@ def system!(*args) end FileUtils.chdir APP_ROOT do - # This script is a way to setup or update your development environment automatically. - # This script is idempotent, so that you can run it at anytime and get an expectable outcome. + # This script is a way to set up or update your development environment automatically. + # This script is idempotent, so that you can run it at any time and get an expectable outcome. # Add necessary setup steps to this file. puts '== Installing dependencies ==' diff --git a/bin/spring b/bin/spring deleted file mode 100755 index fb2ec2ebb..000000000 --- a/bin/spring +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env ruby - -# This file loads spring without using Bundler, in order to be fast. -# It gets overwritten when you run the `spring binstub` command. - -unless defined?(Spring) - require 'rubygems' - require 'bundler' - - lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read) - spring = lockfile.specs.detect { |spec| spec.name == "spring" } - if spring - Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path - gem 'spring', spring.version - require 'spring/binstub' - end -end diff --git a/config.ru b/config.ru index fc7f1311a..4a3c09a68 100644 --- a/config.ru +++ b/config.ru @@ -1,5 +1,6 @@ # This file is used by Rack-based servers to start the application. -$stdout.sync = true -require ::File.expand_path('../config/environment', __FILE__) +require_relative "config/environment" + run Rails.application +Rails.application.load_server diff --git a/config/boot.rb b/config/boot.rb index b9e460cef..3cda23b4d 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,4 +1,4 @@ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) -require 'bundler/setup' # Set up gems listed in the Gemfile. -require 'bootsnap/setup' # Speed up boot time by caching expensive operations. +require "bundler/setup" # Set up gems listed in the Gemfile. +require "bootsnap/setup" # Speed up boot time by caching expensive operations. diff --git a/config/environment.rb b/config/environment.rb index 426333bb4..cac531577 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,5 +1,5 @@ # Load the Rails application. -require_relative 'application' +require_relative "application" # Initialize the Rails application. Rails.application.initialize! diff --git a/config/environments/development.rb b/config/environments/development.rb index 567a73214..53be62fb1 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -1,8 +1,10 @@ +require "active_support/core_ext/integer/time" + Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. - # In the development environment your application's code is reloaded on - # every request. This slows down response time but is perfect for development + # In the development environment your application's code is reloaded any time + # it changes. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. config.cache_classes = false @@ -42,6 +44,12 @@ # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log + # Raise exceptions for disallowed deprecations. + config.active_support.disallowed_deprecation = :raise + + # Tell Active Support which deprecation messages to disallow. + config.active_support.disallowed_deprecation_warnings = [] + # Raise an error on page load if there are pending migrations. config.active_record.migration_error = :page_load @@ -57,9 +65,15 @@ config.assets.quiet = true # Raises error for missing translations. - # config.action_view.raise_on_missing_translations = true + # config.i18n.raise_on_missing_translations = true + + # Annotate rendered view with file names. + # config.action_view.annotate_rendered_view_with_filenames = true # Use an evented file watcher to asynchronously detect changes in source code, # routes, locales, etc. This feature depends on the listen gem. config.file_watcher = ActiveSupport::EventedFileUpdateChecker -end \ No newline at end of file + + # Uncomment if you wish to allow Action Cable access from any origin. + # config.action_cable.disable_request_forgery_protection = true +end diff --git a/config/environments/production.rb b/config/environments/production.rb index cfb82b8a9..0c282b95d 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -1,3 +1,5 @@ +require "active_support/core_ext/integer/time" + Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. @@ -29,7 +31,7 @@ config.assets.compile = false # Enable serving of images, stylesheets, and JavaScripts from an asset server. - # config.action_controller.asset_host = 'http://assets.example.com' + # config.asset_host = 'http://assets.example.com' # Specifies the header that your server uses for sending files. # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache @@ -46,8 +48,8 @@ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. config.force_ssl = true - # Use the lowest log level to ensure availability of diagnostic information - # when problems arise. + # Include generic and useful information about system operation, but avoid logging too much + # information to avoid inadvertent exposure of personally identifiable information (PII). config.log_level = :debug # Prepend all log lines with the following tags. @@ -74,11 +76,17 @@ # Send deprecation notices to registered listeners. config.active_support.deprecation = :notify + # Log disallowed deprecations. + config.active_support.disallowed_deprecation = :log + + # Tell Active Support which deprecation messages to disallow. + config.active_support.disallowed_deprecation_warnings = [] + # Use default logging formatter so that PID and timestamp are not suppressed. config.log_formatter = ::Logger::Formatter.new # Use a different logger for distributed setups. - # require 'syslog/logger' + # require "syslog/logger" # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') if ENV["RAILS_LOG_TO_STDOUT"].present? diff --git a/config/environments/test.rb b/config/environments/test.rb index 6f521c2d9..f3c943280 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -1,3 +1,5 @@ +require "active_support/core_ext/integer/time" + # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped @@ -22,7 +24,7 @@ # Show full error reports and disable caching. config.consider_all_requests_local = true config.action_controller.perform_caching = false - config.cache_store = :null_store + config.cache_store = :memory_store # Raise exceptions instead of rendering exception templates. config.action_dispatch.show_exceptions = false @@ -43,11 +45,18 @@ # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr - # Raises error for missing translations. - # config.action_view.raise_on_missing_translations = true + # Raise exceptions for disallowed deprecations. + config.active_support.disallowed_deprecation = :raise + + # Tell Active Support which deprecation messages to disallow. + config.active_support.disallowed_deprecation_warnings = [] - # Randomize the order test cases are executed. + # Randomize the order test cases are executed config.active_support.test_order = :random - config.cache_store = :memory_store + # Raises error for missing translations. + # config.i18n.raise_on_missing_translations = true + + # Annotate rendered view with file names. + # config.action_view.annotate_rendered_view_with_filenames = true end diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb index 59385cdf3..33699c309 100644 --- a/config/initializers/backtrace_silencers.rb +++ b/config/initializers/backtrace_silencers.rb @@ -1,7 +1,8 @@ # Be sure to restart your server when you modify this file. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. -# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } +# Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) } -# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. -# Rails.backtrace_cleaner.remove_silencers! +# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code +# by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'". +Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"] diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb index 4a994e1e7..2899da4ec 100644 --- a/config/initializers/filter_parameter_logging.rb +++ b/config/initializers/filter_parameter_logging.rb @@ -1,4 +1,6 @@ # Be sure to restart your server when you modify this file. # Configure sensitive parameters which will be filtered from the log file. -Rails.application.config.filter_parameters += [:password] +Rails.application.config.filter_parameters += [ + :password, :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn +] diff --git a/config/initializers/new_framework_defaults_6_1.rb b/config/initializers/new_framework_defaults_6_1.rb new file mode 100644 index 000000000..629888deb --- /dev/null +++ b/config/initializers/new_framework_defaults_6_1.rb @@ -0,0 +1,63 @@ +# Be sure to restart your server when you modify this file. +# +# This file contains migration options to ease your Rails 6.1 upgrade. +# +# Once upgraded flip defaults one by one to migrate to the new default. +# +# Read the Guide for Upgrading Ruby on Rails for more info on each option. + +# Support for inversing belongs_to -> has_many Active Record associations. +# Rails.application.config.active_record.has_many_inversing = true + +# Track Active Storage variants in the database. +# Rails.application.config.active_storage.track_variants = true + +# Apply random variation to the delay when retrying failed jobs. +# Rails.application.config.active_job.retry_jitter = 0.15 + +# Stop executing `after_enqueue`/`after_perform` callbacks if +# `before_enqueue`/`before_perform` respectively halts with `throw :abort`. +# Rails.application.config.active_job.skip_after_callbacks_if_terminated = true + +# Specify cookies SameSite protection level: either :none, :lax, or :strict. +# +# This change is not backwards compatible with earlier Rails versions. +# It's best enabled when your entire app is migrated and stable on 6.1. +# Rails.application.config.action_dispatch.cookies_same_site_protection = :lax + +# Generate CSRF tokens that are encoded in URL-safe Base64. +# +# This change is not backwards compatible with earlier Rails versions. +# It's best enabled when your entire app is migrated and stable on 6.1. +# Rails.application.config.action_controller.urlsafe_csrf_tokens = true + +# Specify whether `ActiveSupport::TimeZone.utc_to_local` returns a time with an +# UTC offset or a UTC time. +# ActiveSupport.utc_to_local_returns_utc_offset_times = true + +# Change the default HTTP status code to `308` when redirecting non-GET/HEAD +# requests to HTTPS in `ActionDispatch::SSL` middleware. +# Rails.application.config.action_dispatch.ssl_default_redirect_status = 308 + +# Use new connection handling API. For most applications this won't have any +# effect. For applications using multiple databases, this new API provides +# support for granular connection swapping. +# Rails.application.config.active_record.legacy_connection_handling = false + +# Make `form_with` generate non-remote forms by default. +# Rails.application.config.action_view.form_with_generates_remote_forms = false + +# Set the default queue name for the analysis job to the queue adapter default. +# Rails.application.config.active_storage.queues.analysis = nil + +# Set the default queue name for the purge job to the queue adapter default. +# Rails.application.config.active_storage.queues.purge = nil + +# Set the default queue name for the incineration job to the queue adapter default. +# Rails.application.config.action_mailbox.queues.incineration = nil + +# Set the default queue name for the routing job to the queue adapter default. +# Rails.application.config.action_mailbox.queues.routing = nil + +# Set the default queue name for the mail deliver job to the queue adapter default. +# Rails.application.config.action_mailer.deliver_later_queue_name = nil diff --git a/config/initializers/permissions_policy.rb b/config/initializers/permissions_policy.rb new file mode 100644 index 000000000..00f64d71b --- /dev/null +++ b/config/initializers/permissions_policy.rb @@ -0,0 +1,11 @@ +# Define an application-wide HTTP permissions policy. For further +# information see https://developers.google.com/web/updates/2018/06/feature-policy +# +# Rails.application.config.permissions_policy do |f| +# f.camera :none +# f.gyroscope :none +# f.microphone :none +# f.usb :none +# f.fullscreen :self +# f.payment :self, "https://secure.example.com" +# end From 19466fa7cf503f015d94e3e53e2019b0ce356f0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 10 Dec 2020 18:36:07 +0100 Subject: [PATCH 059/609] apply new framework defaults for 6.1 --- config/application.rb | 2 +- .../new_framework_defaults_6_1.rb | 63 ------------------- 2 files changed, 1 insertion(+), 64 deletions(-) delete mode 100644 config/initializers/new_framework_defaults_6_1.rb diff --git a/config/application.rb b/config/application.rb index 81fe81a15..4a3f8a3fd 100644 --- a/config/application.rb +++ b/config/application.rb @@ -9,7 +9,7 @@ module Joss class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 6.0 + config.load_defaults 6.1 # Settings in config/environments/* take precedence over those specified here. # Application configuration can go into files in config/initializers diff --git a/config/initializers/new_framework_defaults_6_1.rb b/config/initializers/new_framework_defaults_6_1.rb deleted file mode 100644 index 629888deb..000000000 --- a/config/initializers/new_framework_defaults_6_1.rb +++ /dev/null @@ -1,63 +0,0 @@ -# Be sure to restart your server when you modify this file. -# -# This file contains migration options to ease your Rails 6.1 upgrade. -# -# Once upgraded flip defaults one by one to migrate to the new default. -# -# Read the Guide for Upgrading Ruby on Rails for more info on each option. - -# Support for inversing belongs_to -> has_many Active Record associations. -# Rails.application.config.active_record.has_many_inversing = true - -# Track Active Storage variants in the database. -# Rails.application.config.active_storage.track_variants = true - -# Apply random variation to the delay when retrying failed jobs. -# Rails.application.config.active_job.retry_jitter = 0.15 - -# Stop executing `after_enqueue`/`after_perform` callbacks if -# `before_enqueue`/`before_perform` respectively halts with `throw :abort`. -# Rails.application.config.active_job.skip_after_callbacks_if_terminated = true - -# Specify cookies SameSite protection level: either :none, :lax, or :strict. -# -# This change is not backwards compatible with earlier Rails versions. -# It's best enabled when your entire app is migrated and stable on 6.1. -# Rails.application.config.action_dispatch.cookies_same_site_protection = :lax - -# Generate CSRF tokens that are encoded in URL-safe Base64. -# -# This change is not backwards compatible with earlier Rails versions. -# It's best enabled when your entire app is migrated and stable on 6.1. -# Rails.application.config.action_controller.urlsafe_csrf_tokens = true - -# Specify whether `ActiveSupport::TimeZone.utc_to_local` returns a time with an -# UTC offset or a UTC time. -# ActiveSupport.utc_to_local_returns_utc_offset_times = true - -# Change the default HTTP status code to `308` when redirecting non-GET/HEAD -# requests to HTTPS in `ActionDispatch::SSL` middleware. -# Rails.application.config.action_dispatch.ssl_default_redirect_status = 308 - -# Use new connection handling API. For most applications this won't have any -# effect. For applications using multiple databases, this new API provides -# support for granular connection swapping. -# Rails.application.config.active_record.legacy_connection_handling = false - -# Make `form_with` generate non-remote forms by default. -# Rails.application.config.action_view.form_with_generates_remote_forms = false - -# Set the default queue name for the analysis job to the queue adapter default. -# Rails.application.config.active_storage.queues.analysis = nil - -# Set the default queue name for the purge job to the queue adapter default. -# Rails.application.config.active_storage.queues.purge = nil - -# Set the default queue name for the incineration job to the queue adapter default. -# Rails.application.config.action_mailbox.queues.incineration = nil - -# Set the default queue name for the routing job to the queue adapter default. -# Rails.application.config.action_mailbox.queues.routing = nil - -# Set the default queue name for the mail deliver job to the queue adapter default. -# Rails.application.config.action_mailer.deliver_later_queue_name = nil From be3425787886283f9df93e40b92559e0577af4ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 11 Dec 2020 12:31:11 +0100 Subject: [PATCH 060/609] update code to remove deprecation warnings --- Gemfile | 4 ++-- Gemfile.lock | 14 +++++++------- app/models/application_record.rb | 3 +++ app/models/editor.rb | 2 +- app/models/paper.rb | 8 ++++---- app/models/user.rb | 2 +- app/models/vote.rb | 2 +- app/views/editors/_form.html.erb | 4 ++-- app/views/shared/_errors.html.erb | 4 ++-- spec/models/vote_spec.rb | 4 ++-- spec/views/papers/recent.html.erb_spec.rb | 2 +- spec/views/papers/show.html.erb_spec.rb | 16 ++++++++-------- spec/views/papers/submitted.html.erb_spec.rb | 2 +- 13 files changed, 35 insertions(+), 32 deletions(-) create mode 100644 app/models/application_record.rb diff --git a/Gemfile b/Gemfile index de65ddc22..fb8d206e6 100644 --- a/Gemfile +++ b/Gemfile @@ -43,8 +43,8 @@ group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'pry-byebug' gem 'capybara', '~> 3.28.0' - gem 'factory_bot_rails', '~> 5.0.2' - gem 'rspec-rails', '~> 4.0.0.beta2' + gem 'factory_bot_rails', '~> 6.1.0' + gem 'rspec-rails', '~> 4.0.1' gem 'rails-controller-testing', '~> 1.0.4' end diff --git a/Gemfile.lock b/Gemfile.lock index 7a43668ef..9a81e50d2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -121,11 +121,11 @@ GEM erubi (1.10.0) eventmachine (1.2.7) execjs (2.7.0) - factory_bot (5.0.2) - activesupport (>= 4.2.0) - factory_bot_rails (5.0.2) - factory_bot (~> 5.0.2) - railties (>= 4.2.0) + factory_bot (6.1.0) + activesupport (>= 5.0.0) + factory_bot_rails (6.1.0) + factory_bot (~> 6.1.0) + railties (>= 5.0.0) faraday (1.1.0) multipart-post (>= 1.2, < 3) ruby2_keywords @@ -409,7 +409,7 @@ DEPENDENCIES commonmarker (~> 0.20.1) custom_error_message (~> 1.1.1) dotenv (~> 2.7.5) - factory_bot_rails (~> 5.0.2) + factory_bot_rails (~> 6.1.0) github-markdown (~> 0.6.9) google_drive groupdate @@ -429,7 +429,7 @@ DEPENDENCIES rails (= 6.1.0) rails-controller-testing (~> 1.0.4) responders - rspec-rails (~> 4.0.0.beta2) + rspec-rails (~> 4.0.1) sanitize (~> 5.2.1) sass-rails (~> 6.0.0) searchkick diff --git a/app/models/application_record.rb b/app/models/application_record.rb new file mode 100644 index 000000000..71a1a03cc --- /dev/null +++ b/app/models/application_record.rb @@ -0,0 +1,3 @@ +class ApplicationRecord < ActiveRecord::Base + self.abstract_class = true +end \ No newline at end of file diff --git a/app/models/editor.rb b/app/models/editor.rb index fb545a25f..a8580fe56 100644 --- a/app/models/editor.rb +++ b/app/models/editor.rb @@ -1,4 +1,4 @@ -class Editor < ActiveRecord::Base +class Editor < ApplicationRecord validates :kind, presence: true, inclusion: { in: ["board", "topic", "emeritus"] } validates :first_name, presence: true validates :last_name, presence: true diff --git a/app/models/paper.rb b/app/models/paper.rb index 88cc3a23b..b53bd6662 100644 --- a/app/models/paper.rb +++ b/app/models/paper.rb @@ -1,6 +1,6 @@ require 'open3' -class Paper < ActiveRecord::Base +class Paper < ApplicationRecord searchkick index_name: "joss-production" include SettingsHelper @@ -347,7 +347,7 @@ def create_review_issue(editor_handle, reviewers) else new_labels = ["review"] end - + issue = GITHUB.create_issue(Rails.application.settings["reviews"], "[REVIEW]: #{self.title}", @@ -469,11 +469,11 @@ def check_repository_address stdout_str, stderr_str, status = Open3.capture3("git ls-remote #{repository_url}") if !status.success? - errors.add(:base, "Invalid Git repository address. Check that the repository can be cloned using the value entered in the form, and that access doesn't require authentication.") + errors.add(:base, :invalid, message: "Invalid Git repository address. Check that the repository can be cloned using the value entered in the form, and that access doesn't require authentication.") return false end end - + def set_sha self.sha ||= SecureRandom.hex end diff --git a/app/models/user.rb b/app/models/user.rb index d197221c0..c8c07b2d5 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -1,4 +1,4 @@ -class User < ActiveRecord::Base +class User < ApplicationRecord has_many :papers has_one :editor diff --git a/app/models/vote.rb b/app/models/vote.rb index 7c767bd48..491a40736 100644 --- a/app/models/vote.rb +++ b/app/models/vote.rb @@ -1,4 +1,4 @@ -class Vote < ActiveRecord::Base +class Vote < ApplicationRecord belongs_to :paper belongs_to :editor diff --git a/app/views/editors/_form.html.erb b/app/views/editors/_form.html.erb index c0154d932..00714df86 100644 --- a/app/views/editors/_form.html.erb +++ b/app/views/editors/_form.html.erb @@ -5,8 +5,8 @@

<%= pluralize(@editor.errors.count, "error") %> prohibited this editor from being saved:

    - <% @editor.errors.full_messages.each do |message| %> -
  • <%= message %>
  • + <% @editor.errors.each do |error| %> +
  • <%= error.message %>
  • <% end %>
diff --git a/app/views/shared/_errors.html.erb b/app/views/shared/_errors.html.erb index 35645e133..6d615644f 100644 --- a/app/views/shared/_errors.html.erb +++ b/app/views/shared/_errors.html.erb @@ -1,8 +1,8 @@

Your <%= object.class.name.downcase %> could not be saved.

    - <% object.errors.full_messages.each do |msg| -%> -
  • <%= msg %>
  • + <% object.errors.each do |error| -%> +
  • <%= error.message %>
  • <% end -%>
diff --git a/spec/models/vote_spec.rb b/spec/models/vote_spec.rb index ad9c73862..828feaa7b 100644 --- a/spec/models/vote_spec.rb +++ b/spec/models/vote_spec.rb @@ -43,7 +43,7 @@ expect(Vote.has_vote_for?(paper, editor)).to be_a_kind_of(Vote) expect(Vote.has_vote_for?(paper, editor2)).to be_nil end - + it "should know about #in_scope and #out_of_scope" do submitted_paper = create(:paper, state: "submitted") @@ -55,7 +55,7 @@ 2.times do create(:out_of_scope_vote, editor: create(:editor), paper: submitted_paper) end - + expect(submitted_paper.votes.count).to eq(5) expect(submitted_paper.votes.in_scope.count).to eq(3) expect(submitted_paper.votes.out_of_scope.count).to eq(2) diff --git a/spec/views/papers/recent.html.erb_spec.rb b/spec/views/papers/recent.html.erb_spec.rb index 0593df047..a78d92b19 100644 --- a/spec/views/papers/recent.html.erb_spec.rb +++ b/spec/views/papers/recent.html.erb_spec.rb @@ -10,7 +10,7 @@ assign(:papers, Paper.all.paginate(page: 1, per_page: 10)) - render template: "papers/index.html.erb" + render template: "papers/index", formats: :html expect(rendered).to have_selector('.paper-title', count: 3) expect(rendered).to have_content("Published Papers 3", { normalize_ws: true }) diff --git a/spec/views/papers/show.html.erb_spec.rb b/spec/views/papers/show.html.erb_spec.rb index df135fa08..62c3afe33 100644 --- a/spec/views/papers/show.html.erb_spec.rb +++ b/spec/views/papers/show.html.erb_spec.rb @@ -14,7 +14,7 @@ paper = create(:paper, state: "submitted", submitting_author: user) assign(:paper, paper) - render template: "papers/show.html.erb" + render template: "papers/show", formats: :html expect(rendered).to have_content("but the review hasn't started.", { normalize_ws: true }) end @@ -26,7 +26,7 @@ paper = create(:accepted_paper) assign(:paper, paper) - render template: "papers/show.html.erb" + render template: "papers/show", formats: :html # Paper metadata # FIXME - these tests seem to be timezone sensitive??? i.e. can fail depending @@ -46,7 +46,7 @@ paper = create(:accepted_paper) assign(:paper, paper) - render template: "papers/show.html.erb" + render template: "papers/show", formats: :html # Paper metadata expect(rendered).to have_title("The Journal of Open Source Software: #{paper.scholar_title}") @@ -86,7 +86,7 @@ paper = create(:paper, state: "submitted", review_issue_id: nil, submitting_author: author) assign(:paper, paper) - render template: "papers/show.html.erb" + render template: "papers/show", formats: :html expect(rendered).to have_selector("input[type=submit][value='Reject paper']") end @@ -99,7 +99,7 @@ paper = create(:paper, state: "submitted", submitting_author: user) assign(:paper, paper) - render template: "papers/show.html.erb" + render template: "papers/show", formats: :html expect(rendered).to have_selector("input[type=submit][value='Withdraw paper']") end @@ -113,7 +113,7 @@ paper = create(:paper, state: "submitted", submitting_author: author) assign(:paper, paper) - render template: "papers/show.html.erb" + render template: "papers/show", formats: :html expect(rendered).to have_selector("input[type=submit][value='Withdraw paper']") expect(rendered).to have_content(author.email) end @@ -128,7 +128,7 @@ paper = create(:resubmission_paper, state: "submitted", review_issue_id: 123, submitting_author: author) assign(:paper, paper) - render template: "papers/show.html.erb" + render template: "papers/show", formats: :html expect(rendered).to have_content "Paper review" expect(rendered).to have_content "Resubmission" @@ -141,7 +141,7 @@ paper = create(:retracted_paper, retraction_notice: "Reasons for retraction") assign(:paper, paper) - render template: "papers/show.html.erb" + render template: "papers/show", formats: :html expect(rendered).to have_content("Reasons for retraction") end end diff --git a/spec/views/papers/submitted.html.erb_spec.rb b/spec/views/papers/submitted.html.erb_spec.rb index 141f1ed22..33b74719e 100644 --- a/spec/views/papers/submitted.html.erb_spec.rb +++ b/spec/views/papers/submitted.html.erb_spec.rb @@ -13,7 +13,7 @@ assign(:papers, Paper.submitted.paginate(page: 1, per_page: 10)) - render template: "papers/index.html.erb" + render template: "papers/index", formats: :html expect(rendered).to have_selector('.paper-title', count: 0) expect(rendered).to have_content("Active Papers 1", { normalize_ws: true }) From 5b730d231158eac012985b3563d373c462640a00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 11 Dec 2020 12:32:08 +0100 Subject: [PATCH 061/609] add .byebug_history to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index bd14c2cd7..1af1693b3 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,7 @@ /tmp /.env .DS_Store +.byebug_history # Ignore readthedocs build From f0f24ab540b2fe88f25c2ff9ef4dc82bb0c8b258 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 11 Dec 2020 14:31:47 +0100 Subject: [PATCH 062/609] install node --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index e97dcc5b9..d1cbd9f21 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ before_script: - bundle exec rails db:schema:load before_install: - gem update bundler + - nvm install node script: bundle exec rails spec addons: postgresql: "9.6" From 55b63eefe6f318ce3a554a7a393adef6119260c4 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 13 Dec 2020 16:39:59 +0000 Subject: [PATCH 063/609] Figure width --- docs/submitting.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/submitting.md b/docs/submitting.md index 17b7b1384..3f288aec8 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -198,6 +198,9 @@ Figures can be included like this: ![Caption for example figure.\label{fig:example}](figure.png) and referenced from text using \autoref{fig:example}. +Figure sizes can be customized by adding an optional second parameter: +![Caption for example figure.](figure.png){ width=20% } + # Acknowledgements We acknowledge contributions from Brigitta Sipocz, Syrtis Major, and Semyeong From ab20d5d1e77e19c93260d4186ba80169d310ddc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 12 Jan 2021 12:07:37 +0100 Subject: [PATCH 064/609] update Rails to 6.1.1 --- Gemfile | 2 +- Gemfile.lock | 124 ++++++++++++++++++++++++++------------------------- 2 files changed, 64 insertions(+), 62 deletions(-) diff --git a/Gemfile b/Gemfile index fb8d206e6..84fb848e2 100644 --- a/Gemfile +++ b/Gemfile @@ -17,7 +17,7 @@ gem 'octokit', '~> 4.14' gem 'pdf-reader', '~> 2.2' gem 'pg', '~> 1.1.4' gem 'will_paginate', '~> 3.1.8' -gem 'rails', '6.1.0' +gem 'rails', '6.1.1' gem 'responders' gem 'newrelic_rpm' gem 'sanitize', '~> 5.2.1' diff --git a/Gemfile.lock b/Gemfile.lock index 9a81e50d2..2b6bf00e8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,40 +4,40 @@ GEM Ascii85 (1.0.3) aasm (5.0.8) concurrent-ruby (~> 1.0) - actioncable (6.1.0) - actionpack (= 6.1.0) - activesupport (= 6.1.0) + actioncable (6.1.1) + actionpack (= 6.1.1) + activesupport (= 6.1.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.0) - actionpack (= 6.1.0) - activejob (= 6.1.0) - activerecord (= 6.1.0) - activestorage (= 6.1.0) - activesupport (= 6.1.0) + actionmailbox (6.1.1) + actionpack (= 6.1.1) + activejob (= 6.1.1) + activerecord (= 6.1.1) + activestorage (= 6.1.1) + activesupport (= 6.1.1) mail (>= 2.7.1) - actionmailer (6.1.0) - actionpack (= 6.1.0) - actionview (= 6.1.0) - activejob (= 6.1.0) - activesupport (= 6.1.0) + actionmailer (6.1.1) + actionpack (= 6.1.1) + actionview (= 6.1.1) + activejob (= 6.1.1) + activesupport (= 6.1.1) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.0) - actionview (= 6.1.0) - activesupport (= 6.1.0) + actionpack (6.1.1) + actionview (= 6.1.1) + activesupport (= 6.1.1) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.0) - actionpack (= 6.1.0) - activerecord (= 6.1.0) - activestorage (= 6.1.0) - activesupport (= 6.1.0) + actiontext (6.1.1) + actionpack (= 6.1.1) + activerecord (= 6.1.1) + activestorage (= 6.1.1) + activesupport (= 6.1.1) nokogiri (>= 1.8.5) - actionview (6.1.0) - activesupport (= 6.1.0) + actionview (6.1.1) + activesupport (= 6.1.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -45,22 +45,22 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (6.1.0) - activesupport (= 6.1.0) + activejob (6.1.1) + activesupport (= 6.1.1) globalid (>= 0.3.6) - activemodel (6.1.0) - activesupport (= 6.1.0) - activerecord (6.1.0) - activemodel (= 6.1.0) - activesupport (= 6.1.0) - activestorage (6.1.0) - actionpack (= 6.1.0) - activejob (= 6.1.0) - activerecord (= 6.1.0) - activesupport (= 6.1.0) + activemodel (6.1.1) + activesupport (= 6.1.1) + activerecord (6.1.1) + activemodel (= 6.1.1) + activesupport (= 6.1.1) + activestorage (6.1.1) + actionpack (= 6.1.1) + activejob (= 6.1.1) + activerecord (= 6.1.1) + activesupport (= 6.1.1) marcel (~> 0.3.1) mimemagic (~> 0.3.2) - activesupport (6.1.0) + activesupport (6.1.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -180,7 +180,7 @@ GEM nokogiri (>= 1.4) http_parser.rb (0.6.0) httpclient (2.8.3) - i18n (1.8.5) + i18n (1.8.7) concurrent-ruby (~> 1.0) jquery-rails (4.4.0) rails-dom-testing (>= 1, < 3) @@ -203,8 +203,8 @@ GEM method_source (1.0.0) mimemagic (0.3.5) mini_mime (1.0.2) - mini_portile2 (2.4.0) - minitest (5.14.2) + mini_portile2 (2.5.0) + minitest (5.14.3) msgpack (1.3.3) multi_json (1.15.0) multi_xml (0.6.0) @@ -212,8 +212,9 @@ GEM nenv (0.3.0) newrelic_rpm (6.14.0) nio4r (2.5.4) - nokogiri (1.10.10) - mini_portile2 (~> 2.4.0) + nokogiri (1.11.1) + mini_portile2 (~> 2.5.0) + racc (~> 1.4) nokogumbo (2.0.4) nokogiri (~> 1.8, >= 1.8.4) notiffany (0.1.3) @@ -258,25 +259,26 @@ GEM byebug (~> 11.0) pry (~> 0.13.0) public_suffix (4.0.6) + racc (1.5.2) rack (2.2.3) rack-livereload (0.3.17) rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.1.0) - actioncable (= 6.1.0) - actionmailbox (= 6.1.0) - actionmailer (= 6.1.0) - actionpack (= 6.1.0) - actiontext (= 6.1.0) - actionview (= 6.1.0) - activejob (= 6.1.0) - activemodel (= 6.1.0) - activerecord (= 6.1.0) - activestorage (= 6.1.0) - activesupport (= 6.1.0) + rails (6.1.1) + actioncable (= 6.1.1) + actionmailbox (= 6.1.1) + actionmailer (= 6.1.1) + actionpack (= 6.1.1) + actiontext (= 6.1.1) + actionview (= 6.1.1) + activejob (= 6.1.1) + activemodel (= 6.1.1) + activerecord (= 6.1.1) + activestorage (= 6.1.1) + activesupport (= 6.1.1) bundler (>= 1.15.0) - railties (= 6.1.0) + railties (= 6.1.1) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -287,14 +289,14 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - railties (6.1.0) - actionpack (= 6.1.0) - activesupport (= 6.1.0) + railties (6.1.1) + actionpack (= 6.1.1) + activesupport (= 6.1.1) method_source rake (>= 0.8.7) thor (~> 1.0) raindrops (0.19.1) - rake (13.0.1) + rake (13.0.3) rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) @@ -370,7 +372,7 @@ GEM thor (1.0.1) tilt (2.0.10) ttfunk (1.6.2.1) - tzinfo (2.0.3) + tzinfo (2.0.4) concurrent-ruby (~> 1.0) uber (0.1.0) uglifier (4.1.20) @@ -426,7 +428,7 @@ DEPENDENCIES pg (~> 1.1.4) pry-byebug rack-livereload - rails (= 6.1.0) + rails (= 6.1.1) rails-controller-testing (~> 1.0.4) responders rspec-rails (~> 4.0.1) From 19d4e3d020e2cdc7b833a6baf52a063b86c28c1f Mon Sep 17 00:00:00 2001 From: "Daniel S. Katz" Date: Sun, 31 Jan 2021 08:08:37 -0600 Subject: [PATCH 065/609] fixing typo --- docs/editing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/editing.md b/docs/editing.md index 4e9a4508b..346d330d9 100644 --- a/docs/editing.md +++ b/docs/editing.md @@ -230,7 +230,7 @@ Many thanks! Both reviewers have checklists at the top of this thread with the JOSS requirements. As you go over the submission, please check any items that you feel have been satisfied. There are also links to the JOSS reviewer guidelines. -The JOSS review is different from most other journals. Our goal is to work with the authors to help them meet our criteria instead of merely passing judgment on the submission. As such, the reviewers are encouraged to submit issues and pull requests on the software repository. When doing so, please mention `openjournals/joss-reviews#REVIEW_NUMER` so that a link is created to this thread (and I can keep an eye on what is happening). Please also feel free to comment and ask questions on this thread. In my experience, it is better to post comments/questions/suggestions as you come across them instead of waiting until you've reviewed the entire package. +The JOSS review is different from most other journals. Our goal is to work with the authors to help them meet our criteria instead of merely passing judgment on the submission. As such, the reviewers are encouraged to submit issues and pull requests on the software repository. When doing so, please mention `openjournals/joss-reviews#REVIEW_NUMBER` so that a link is created to this thread (and I can keep an eye on what is happening). Please also feel free to comment and ask questions on this thread. In my experience, it is better to post comments/questions/suggestions as you come across them instead of waiting until you've reviewed the entire package. We aim for reviews to be completed within about 2-4 weeks. Please let me know if any of you require some more time. We can also use Whedon (our bot) to set automatic reminders if you know you'll be away for a known period of time. From f445c9afa3689a6b83edafc9a30f1a014dc1b64f Mon Sep 17 00:00:00 2001 From: Kyle Niemeyer Date: Tue, 2 Feb 2021 14:23:16 -0800 Subject: [PATCH 066/609] Adds explicit statement of need to review checklist The item for statement of need in the review checklist does not reflect our [explicit requirement](https://joss.readthedocs.io/en/latest/submitting.html#submission-requirements) to have this section, so this add it --- app/views/content/github/_review_checklist.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/content/github/_review_checklist.erb b/app/views/content/github/_review_checklist.erb index 1e6f44204..12923ca5d 100644 --- a/app/views/content/github/_review_checklist.erb +++ b/app/views/content/github/_review_checklist.erb @@ -21,7 +21,7 @@ ### Documentation -- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is? +- [ ] **A statement of need:** Do the authors have a Statement of Need that clearly states what problems the software is designed to solve and who the target audience is? - [ ] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution. - [ ] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems). - [ ] **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)? From 3ba67ae634bfbac3898a1af538f1f5cf0d6d3125 Mon Sep 17 00:00:00 2001 From: Kyle Niemeyer Date: Tue, 2 Feb 2021 14:27:15 -0800 Subject: [PATCH 067/609] Update review_checklist.md adds explicit statement of need mention to the review checklist in docs --- docs/review_checklist.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/review_checklist.md b/docs/review_checklist.md index 942fccccf..b23f45905 100644 --- a/docs/review_checklist.md +++ b/docs/review_checklist.md @@ -30,7 +30,7 @@ Below is an example of the review checklist for the [Yellowbrick JOSS submission ### Documentation -- **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is? +- **A statement of need:** Do the authors have a Statement of Need that clearly states what problems the software is designed to solve and who the target audience is? - **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution. - **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems). - **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)? From 62ef08f3b315c9427ca5a1d4358c7b6918a62b27 Mon Sep 17 00:00:00 2001 From: "Daniel S. Katz" Date: Wed, 3 Feb 2021 08:27:57 -0600 Subject: [PATCH 068/609] adding two notes to try to get authors not to overly abbreviate journal names --- docs/submitting.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/submitting.md b/docs/submitting.md index 3f288aec8..070f48a84 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -80,7 +80,7 @@ Your paper should include: - A list of the authors of the software and their affiliations, using the correct format (see the example below). - A summary describing the high-level functionality and purpose of the software for a diverse, *non-specialist audience*. - A clear *Statement of Need* that illustrates the research purpose of the software. -- A list of key references, including to other software addressing related needs. +- A list of key references, including to other software addressing related needs. Note that the references should include full names of venues, e.g., journals and conferences, not abbreviations only understood in the context of a specific discipline. - Mention (if applicable) a representative set of past or ongoing research projects using the software and recent scholarly publications enabled by it. - Acknowledgement of any financial support. @@ -274,7 +274,7 @@ Example `paper.bib` file: } ``` -Note that the paper ends with a References heading, and the references are built automatically from the content in the `.bib` file. You should enter in-text citations in the paper body following correct [Markdown citation syntax](https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html#citation_syntax). +Note that the paper ends with a References heading, and the references are built automatically from the content in the `.bib` file. You should enter in-text citations in the paper body following correct [Markdown citation syntax](https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html#citation_syntax). Also note that the references include full names of venues, e.g., journals and conferences, not abbreviations only understood in the context of a specific discipline. ## Checking that your paper compiles From 213575832aee798ae32d611717a8c32cad534443 Mon Sep 17 00:00:00 2001 From: Kyle Niemeyer Date: Wed, 3 Feb 2021 13:58:31 -0800 Subject: [PATCH 069/609] Update app/views/content/github/_review_checklist.erb takes suggested change Co-authored-by: Arfon Smith --- app/views/content/github/_review_checklist.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/content/github/_review_checklist.erb b/app/views/content/github/_review_checklist.erb index 12923ca5d..5a81ac743 100644 --- a/app/views/content/github/_review_checklist.erb +++ b/app/views/content/github/_review_checklist.erb @@ -21,7 +21,7 @@ ### Documentation -- [ ] **A statement of need:** Do the authors have a Statement of Need that clearly states what problems the software is designed to solve and who the target audience is? +- [ ] **A statement of need:** Does the paper have a section titled 'Statement of Need' that clearly states what problems the software is designed to solve and who the target audience is? - [ ] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution. - [ ] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems). - [ ] **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)? From a4d9f6c9b8a9075230282f112aa2c9eb28cbdff6 Mon Sep 17 00:00:00 2001 From: Kyle Niemeyer Date: Wed, 3 Feb 2021 13:58:44 -0800 Subject: [PATCH 070/609] Update docs/review_checklist.md takes suggested change Co-authored-by: Arfon Smith --- docs/review_checklist.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/review_checklist.md b/docs/review_checklist.md index b23f45905..265863ffb 100644 --- a/docs/review_checklist.md +++ b/docs/review_checklist.md @@ -30,7 +30,7 @@ Below is an example of the review checklist for the [Yellowbrick JOSS submission ### Documentation -- **A statement of need:** Do the authors have a Statement of Need that clearly states what problems the software is designed to solve and who the target audience is? +- **A statement of need:** Does the paper have a section titled 'Statement of Need' that clearly states what problems the software is designed to solve and who the target audience is? - **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution. - **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems). - **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)? From 290712c011c99f96dd3dec9f7246d9547d8d4238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 4 Feb 2021 09:35:43 +0100 Subject: [PATCH 071/609] temporary fix for will_paginate --- Gemfile | 5 ++++- Gemfile.lock | 10 ++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 84fb848e2..748eef549 100644 --- a/Gemfile +++ b/Gemfile @@ -16,7 +16,10 @@ gem 'omniauth-orcid', '~> 2.1.1' gem 'octokit', '~> 4.14' gem 'pdf-reader', '~> 2.2' gem 'pg', '~> 1.1.4' -gem 'will_paginate', '~> 3.1.8' +# TODO: Remove git reference and revert to latest release +# once this bug is fixed and Rails 6.1 is supported: +# https://github.com/mislav/will_paginate/pull/619 +gem 'will_paginate', git: "https://github.com/kvokka/will_paginate", branch: "fix-page_entries_info" gem 'rails', '6.1.1' gem 'responders' gem 'newrelic_rpm' diff --git a/Gemfile.lock b/Gemfile.lock index 2b6bf00e8..e3aacc968 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,10 @@ +GIT + remote: https://github.com/kvokka/will_paginate + revision: ae8f84106c71f270827ee86165f79d5681cd98bb + branch: fix-page_entries_info + specs: + will_paginate (3.3.0) + GEM remote: https://rubygems.org/ specs: @@ -392,7 +399,6 @@ GEM websocket-driver (0.7.3) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - will_paginate (3.1.8) xpath (3.2.0) nokogiri (~> 1.8) zeitwerk (2.4.2) @@ -441,7 +447,7 @@ DEPENDENCIES unicorn (~> 5.5.1) web-console (~> 4.0.1) webmock (~> 3.6.2) - will_paginate (~> 3.1.8) + will_paginate! RUBY VERSION ruby 2.6.3p62 From 46bc2dfc7a2e0b64de0449b093ac89664522a83e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 3 Feb 2021 12:16:21 +0100 Subject: [PATCH 072/609] update ruby version --- .ruby-version | 2 +- Gemfile | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.ruby-version b/.ruby-version index ec1cf33c3..4a36342fc 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.6.3 +3.0.0 diff --git a/Gemfile b/Gemfile index 748eef549..3a967daef 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,4 @@ source 'https://rubygems.org' -ruby "2.6.3" gem 'aasm', '~> 5.0.5' gem 'chartkick' From 105835c468cb066934eaae4fb5c316c4b275c17c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 3 Feb 2021 12:18:39 +0100 Subject: [PATCH 073/609] update gems --- Gemfile | 34 +++++----- Gemfile.lock | 175 ++++++++++++++++++++++++++++----------------------- 2 files changed, 112 insertions(+), 97 deletions(-) diff --git a/Gemfile b/Gemfile index 3a967daef..4bf6e2240 100644 --- a/Gemfile +++ b/Gemfile @@ -3,18 +3,18 @@ source 'https://rubygems.org' gem 'aasm', '~> 5.0.5' gem 'chartkick' gem 'bootsnap' -gem 'dotenv', '~> 2.7.5' +gem 'dotenv', '~> 2.7.6' gem 'github-markdown', '~> 0.6.9' gem 'google_drive' gem 'groupdate' -gem 'honeybadger', '~> 4.5.1' -gem 'html-pipeline', '~> 2.12.0' -gem 'commonmarker', '~> 0.20.1' -gem 'octicons_helper', '~> 9.1' +gem 'honeybadger', '~> 4.7.2' +gem 'html-pipeline', '~> 2.14.0' +gem 'commonmarker', '~> 0.21.1' +gem 'octicons_helper', '~> 11.3' gem 'omniauth-orcid', '~> 2.1.1' -gem 'octokit', '~> 4.14' -gem 'pdf-reader', '~> 2.2' -gem 'pg', '~> 1.1.4' +gem 'octokit', '~> 4.20' +gem 'pdf-reader', '~> 2.4.2' +gem 'pg', '~> 1.2.3' # TODO: Remove git reference and revert to latest release # once this bug is fixed and Rails 6.1 is supported: # https://github.com/mislav/will_paginate/pull/619 @@ -22,10 +22,10 @@ gem 'will_paginate', git: "https://github.com/kvokka/will_paginate", branch: "fi gem 'rails', '6.1.1' gem 'responders' gem 'newrelic_rpm' -gem 'sanitize', '~> 5.2.1' +gem 'sanitize', '~> 5.2.3' gem 'sass-rails', '~> 6.0.0' gem 'searchkick' -gem 'uglifier', '4.1.20' +gem 'uglifier', '4.2.0' gem 'coffee-rails', '~> 5.0.0' gem 'active_link_to' @@ -39,28 +39,28 @@ gem 'jquery-rails', '~> 4.4.0' gem 'custom_error_message', '~> 1.1.1' # Use Unicorn as the app server -gem 'unicorn', '~> 5.5.1' +gem 'unicorn', '~> 5.8.0' group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'pry-byebug' - gem 'capybara', '~> 3.28.0' + gem 'capybara', '~> 3.35.3' gem 'factory_bot_rails', '~> 6.1.0' - gem 'rspec-rails', '~> 4.0.1' - gem 'rails-controller-testing', '~> 1.0.4' + gem 'rspec-rails', '~> 4.0.2' + gem 'rails-controller-testing', '~> 1.0.5' end group :test do - gem 'webmock', '~> 3.6.2' + gem 'webmock', '~> 3.11.2' end group :development do # Access an IRB console on exception pages or by using <%= console %> in views - gem 'web-console', '~> 4.0.1' + gem 'web-console', '~> 4.1.0' # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring' gem 'spring-commands-rspec', group: :development - gem 'guard', '~> 2.15' + gem 'guard', '~> 2.16' gem 'guard-livereload', require: false gem 'rack-livereload' end diff --git a/Gemfile.lock b/Gemfile.lock index e3aacc968..1504ccab1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,7 +8,7 @@ GIT GEM remote: https://rubygems.org/ specs: - Ascii85 (1.0.3) + Ascii85 (1.1.0) aasm (5.0.8) concurrent-ruby (~> 1.0) actioncable (6.1.1) @@ -76,10 +76,10 @@ GEM addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) afm (0.2.2) - autoprefixer-rails (10.1.0.0) + autoprefixer-rails (10.2.4.0) execjs bindex (0.8.1) - bootsnap (1.5.1) + bootsnap (1.7.0) msgpack (~> 1.0) bootstrap (4.3.1) autoprefixer-rails (>= 9.1.0) @@ -87,13 +87,13 @@ GEM sassc-rails (>= 2.0.0) builder (3.2.4) byebug (11.1.3) - capybara (3.28.0) + capybara (3.35.3) addressable mini_mime (>= 0.1.3) nokogiri (~> 1.8) rack (>= 1.6.0) rack-test (>= 0.6.3) - regexp_parser (~> 1.5) + regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) chartkick (3.4.2) coderay (1.1.3) @@ -104,22 +104,23 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - commonmarker (0.20.2) + commonmarker (0.21.1) ruby-enum (~> 0.5) - concurrent-ruby (1.1.7) - crack (0.4.4) + concurrent-ruby (1.1.8) + crack (0.4.5) + rexml crass (1.0.6) custom_error_message (1.1.1) declarative (0.0.20) declarative-option (0.1.0) diff-lcs (1.4.4) dotenv (2.7.6) - elasticsearch (7.10.0) - elasticsearch-api (= 7.10.0) - elasticsearch-transport (= 7.10.0) - elasticsearch-api (7.10.0) + elasticsearch (7.10.1) + elasticsearch-api (= 7.10.1) + elasticsearch-transport (= 7.10.1) + elasticsearch-api (7.10.1) multi_json - elasticsearch-transport (7.10.0) + elasticsearch-transport (7.10.1) faraday (~> 1) multi_json em-websocket (0.5.2) @@ -133,28 +134,42 @@ GEM factory_bot_rails (6.1.0) factory_bot (~> 6.1.0) railties (>= 5.0.0) - faraday (1.1.0) + faraday (1.3.0) + faraday-net_http (~> 1.0) multipart-post (>= 1.2, < 3) ruby2_keywords - ffi (1.13.1) + faraday-net_http (1.0.1) + ffi (1.14.2) formatador (0.2.5) - github-markdown (0.6.9) + gems (1.2.0) globalid (0.4.2) activesupport (>= 4.2.0) - google-api-client (0.51.0) + google-api-client (0.53.0) + google-apis-core (~> 0.1) + google-apis-generator (~> 0.1) + google-apis-core (0.2.1) addressable (~> 2.5, >= 2.5.1) - googleauth (~> 0.9) + googleauth (~> 0.14) httpclient (>= 2.8.1, < 3.0) mini_mime (~> 1.0) representable (~> 3.0) retriable (>= 2.0, < 4.0) rexml - signet (~> 0.12) - google_drive (3.0.5) + signet (~> 0.14) + webrick + google-apis-discovery_v1 (0.1.0) + google-apis-core (~> 0.1) + google-apis-generator (0.1.2) + activesupport (>= 5.0) + gems (~> 1.2) + google-apis-core (~> 0.1) + google-apis-discovery_v1 (~> 0.0) + thor (>= 0.20, < 2.a) + google_drive (3.0.6) google-api-client (>= 0.11.0, < 1.0.0) googleauth (>= 0.5.0, < 1.0.0) nokogiri (>= 1.5.3, < 2.0.0) - googleauth (0.14.0) + googleauth (0.15.0) faraday (>= 0.17.3, < 2.0) jwt (>= 1.4, < 3.0) memoist (~> 0.16) @@ -181,13 +196,13 @@ GEM hashdiff (1.0.1) hashery (2.1.2) hashie (4.1.0) - honeybadger (4.5.6) - html-pipeline (2.12.3) + honeybadger (4.7.2) + html-pipeline (2.14.0) activesupport (>= 2) nokogiri (>= 1.4) http_parser.rb (0.6.0) httpclient (2.8.3) - i18n (1.8.7) + i18n (1.8.8) concurrent-ruby (~> 1.0) jquery-rails (4.4.0) rails-dom-testing (>= 1, < 3) @@ -195,10 +210,10 @@ GEM thor (>= 0.14, < 2.0) jwt (2.2.2) kgio (2.11.3) - listen (3.3.3) + listen (3.4.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.8.0) + loofah (2.9.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) lumberjack (1.2.8) @@ -212,12 +227,12 @@ GEM mini_mime (1.0.2) mini_portile2 (2.5.0) minitest (5.14.3) - msgpack (1.3.3) + msgpack (1.4.2) multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.1.1) nenv (0.3.0) - newrelic_rpm (6.14.0) + newrelic_rpm (6.15.0) nio4r (2.5.4) nokogiri (1.11.1) mini_portile2 (~> 2.5.0) @@ -233,31 +248,32 @@ GEM multi_json (~> 1.3) multi_xml (~> 0.5) rack (>= 1.2, < 3) - octicons (9.6.0) + octicons (11.3.0) nokogiri (>= 1.6.3.1) - octicons_helper (9.6.0) - octicons (= 9.6.0) + octicons_helper (11.3.0) + octicons (= 11.3.0) rails - octokit (4.19.0) + octokit (4.20.0) faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) - omniauth (1.9.1) + omniauth (2.0.2) hashie (>= 3.4.6) rack (>= 1.6.2, < 3) - omniauth-oauth2 (1.7.0) + rack-protection + omniauth-oauth2 (1.7.1) oauth2 (~> 1.4) - omniauth (~> 1.9) + omniauth (>= 1.9, < 3) omniauth-orcid (2.1.1) omniauth-oauth2 (~> 1.3) ruby_dig (~> 0.0.2) os (1.1.1) - pdf-reader (2.4.1) - Ascii85 (~> 1.0.0) + pdf-reader (2.4.2) + Ascii85 (~> 1.0) afm (~> 0.2.1) hashery (~> 2.0) ruby-rc4 ttfunk - pg (1.1.4) + pg (1.2.3) popper_js (1.16.0) pry (0.13.1) coderay (~> 1.1) @@ -270,6 +286,8 @@ GEM rack (2.2.3) rack-livereload (0.3.17) rack + rack-protection (2.1.0) + rack rack-test (1.1.0) rack (>= 1.0, < 3) rails (6.1.1) @@ -307,7 +325,7 @@ GEM rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) - regexp_parser (1.8.2) + regexp_parser (2.0.3) representable (3.0.4) declarative (< 0.1.0) declarative-option (< 0.2.0) @@ -317,29 +335,29 @@ GEM railties (>= 5.0) retriable (3.1.2) rexml (3.2.4) - rspec-core (3.10.0) + rspec-core (3.10.1) rspec-support (~> 3.10.0) - rspec-expectations (3.10.0) + rspec-expectations (3.10.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) - rspec-mocks (3.10.0) + rspec-mocks (3.10.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) - rspec-rails (4.0.1) + rspec-rails (4.0.2) actionpack (>= 4.2) activesupport (>= 4.2) railties (>= 4.2) - rspec-core (~> 3.9) - rspec-expectations (~> 3.9) - rspec-mocks (~> 3.9) - rspec-support (~> 3.9) - rspec-support (3.10.0) - ruby-enum (0.8.0) + rspec-core (~> 3.10) + rspec-expectations (~> 3.10) + rspec-mocks (~> 3.10) + rspec-support (~> 3.10) + rspec-support (3.10.2) + ruby-enum (0.9.0) i18n ruby-rc4 (0.1.5) - ruby2_keywords (0.0.2) + ruby2_keywords (0.0.4) ruby_dig (0.0.2) - sanitize (5.2.1) + sanitize (5.2.3) crass (~> 1.0.2) nokogiri (>= 1.8.0) nokogumbo (~> 2.0) @@ -361,7 +379,7 @@ GEM elasticsearch (>= 6) hashie shellany (0.0.1) - signet (0.14.0) + signet (0.14.1) addressable (~> 2.3) faraday (>= 0.17.3, < 2.0) jwt (>= 1.5, < 3.0) @@ -376,26 +394,27 @@ GEM actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - thor (1.0.1) + thor (1.1.0) tilt (2.0.10) - ttfunk (1.6.2.1) + ttfunk (1.7.0) tzinfo (2.0.4) concurrent-ruby (~> 1.0) uber (0.1.0) - uglifier (4.1.20) + uglifier (4.2.0) execjs (>= 0.3.0, < 3) - unicorn (5.5.5) + unicorn (5.8.0) kgio (~> 2.6) raindrops (~> 0.7) - web-console (4.0.4) + web-console (4.1.0) actionview (>= 6.0.0) activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webmock (3.6.2) + webmock (3.11.2) addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) + webrick (1.7.0) websocket-driver (0.7.3) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) @@ -411,46 +430,42 @@ DEPENDENCIES active_link_to bootsnap bootstrap (~> 4.3.1) - capybara (~> 3.28.0) + capybara (~> 3.35.3) chartkick coffee-rails (~> 5.0.0) - commonmarker (~> 0.20.1) + commonmarker (~> 0.21.1) custom_error_message (~> 1.1.1) - dotenv (~> 2.7.5) + dotenv (~> 2.7.6) factory_bot_rails (~> 6.1.0) - github-markdown (~> 0.6.9) google_drive groupdate - guard (~> 2.15) + guard (~> 2.16) guard-livereload - honeybadger (~> 4.5.1) - html-pipeline (~> 2.12.0) + honeybadger (~> 4.7.2) + html-pipeline (~> 2.14.0) jquery-rails (~> 4.4.0) newrelic_rpm - octicons_helper (~> 9.1) - octokit (~> 4.14) + octicons_helper (~> 11.3) + octokit (~> 4.20) omniauth-orcid (~> 2.1.1) - pdf-reader (~> 2.2) - pg (~> 1.1.4) + pdf-reader (~> 2.4.2) + pg (~> 1.2.3) pry-byebug rack-livereload rails (= 6.1.1) - rails-controller-testing (~> 1.0.4) + rails-controller-testing (~> 1.0.5) responders - rspec-rails (~> 4.0.1) - sanitize (~> 5.2.1) + rspec-rails (~> 4.0.2) + sanitize (~> 5.2.3) sass-rails (~> 6.0.0) searchkick spring spring-commands-rspec - uglifier (= 4.1.20) - unicorn (~> 5.5.1) - web-console (~> 4.0.1) - webmock (~> 3.6.2) + uglifier (= 4.2.0) + unicorn (~> 5.8.0) + web-console (~> 4.1.0) + webmock (~> 3.11.2) will_paginate! -RUBY VERSION - ruby 2.6.3p62 - BUNDLED WITH - 2.1.2 + 2.2.6 From aa0f6352a7796694f8839c80475cabcf26d950a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 3 Feb 2021 12:19:20 +0100 Subject: [PATCH 074/609] remove github-markdown (deprecated & unused) --- Gemfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Gemfile b/Gemfile index 4bf6e2240..6510c3dac 100644 --- a/Gemfile +++ b/Gemfile @@ -4,7 +4,6 @@ gem 'aasm', '~> 5.0.5' gem 'chartkick' gem 'bootsnap' gem 'dotenv', '~> 2.7.6' -gem 'github-markdown', '~> 0.6.9' gem 'google_drive' gem 'groupdate' gem 'honeybadger', '~> 4.7.2' From a93f545f69ba89a992623fea94e53d04491d385c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 3 Feb 2021 12:19:45 +0100 Subject: [PATCH 075/609] use updated have_content syntax --- spec/views/papers/recent.html.erb_spec.rb | 2 +- spec/views/papers/show.html.erb_spec.rb | 2 +- spec/views/papers/submitted.html.erb_spec.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/views/papers/recent.html.erb_spec.rb b/spec/views/papers/recent.html.erb_spec.rb index a78d92b19..94fb53840 100644 --- a/spec/views/papers/recent.html.erb_spec.rb +++ b/spec/views/papers/recent.html.erb_spec.rb @@ -13,7 +13,7 @@ render template: "papers/index", formats: :html expect(rendered).to have_selector('.paper-title', count: 3) - expect(rendered).to have_content("Published Papers 3", { normalize_ws: true }) + expect(rendered).to have_content(:visible, "Published Papers 3", normalize_ws: true) end end end diff --git a/spec/views/papers/show.html.erb_spec.rb b/spec/views/papers/show.html.erb_spec.rb index 62c3afe33..0eec2924c 100644 --- a/spec/views/papers/show.html.erb_spec.rb +++ b/spec/views/papers/show.html.erb_spec.rb @@ -16,7 +16,7 @@ render template: "papers/show", formats: :html - expect(rendered).to have_content("but the review hasn't started.", { normalize_ws: true }) + expect(rendered).to have_content(:visible, "but the review hasn't started.", normalize_ws: true) end it "displays correctly for accepted paper" do diff --git a/spec/views/papers/submitted.html.erb_spec.rb b/spec/views/papers/submitted.html.erb_spec.rb index 33b74719e..63948e934 100644 --- a/spec/views/papers/submitted.html.erb_spec.rb +++ b/spec/views/papers/submitted.html.erb_spec.rb @@ -16,7 +16,7 @@ render template: "papers/index", formats: :html expect(rendered).to have_selector('.paper-title', count: 0) - expect(rendered).to have_content("Active Papers 1", { normalize_ws: true }) + expect(rendered).to have_content(:visible, "Active Papers 1", normalize_ws: true) end end end From ddffd38f689733ec5811248c644c3de7374390e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 3 Feb 2021 13:04:30 +0100 Subject: [PATCH 076/609] remove custom_error_message (deprecated) --- Gemfile | 1 - Gemfile.lock | 2 -- app/models/paper.rb | 8 ++++---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Gemfile b/Gemfile index 6510c3dac..35637736a 100644 --- a/Gemfile +++ b/Gemfile @@ -36,7 +36,6 @@ gem 'bootstrap', '~> 4.3.1' # Use jquery as the JavaScript library gem 'jquery-rails', '~> 4.4.0' -gem 'custom_error_message', '~> 1.1.1' # Use Unicorn as the app server gem 'unicorn', '~> 5.8.0' diff --git a/Gemfile.lock b/Gemfile.lock index 1504ccab1..07b7df1d8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -110,7 +110,6 @@ GEM crack (0.4.5) rexml crass (1.0.6) - custom_error_message (1.1.1) declarative (0.0.20) declarative-option (0.1.0) diff-lcs (1.4.4) @@ -434,7 +433,6 @@ DEPENDENCIES chartkick coffee-rails (~> 5.0.0) commonmarker (~> 0.21.1) - custom_error_message (~> 1.1.1) dotenv (~> 2.7.6) factory_bot_rails (~> 6.1.0) google_drive diff --git a/app/models/paper.rb b/app/models/paper.rb index b53bd6662..5888f3cec 100644 --- a/app/models/paper.rb +++ b/app/models/paper.rb @@ -119,10 +119,10 @@ class Paper < ApplicationRecord after_create :notify_editors, :notify_author validates_presence_of :title - validates_presence_of :suggested_editor, on: :create, message: "^You must suggest an editor to handle your submission" - validates_presence_of :repository_url, message: "^Repository address can't be blank" - validates_presence_of :software_version, message: "^Version can't be blank" - validates_presence_of :body, message: "^Description can't be blank" + validates_presence_of :suggested_editor, on: :create, message: "You must suggest an editor to handle your submission" + validates_presence_of :repository_url, message: "Repository address can't be blank" + validates_presence_of :software_version, message: "Version can't be blank" + validates_presence_of :body, message: "Description can't be blank" validates :kind, inclusion: { in: Rails.application.settings["paper_types"] }, allow_nil: true validates :submission_kind, inclusion: { in: SUBMISSION_KINDS }, allow_nil: false validate :check_repository_address, on: :create From d7911f70782665d2824e6d3543c43de91fc58e93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 3 Feb 2021 13:05:04 +0100 Subject: [PATCH 077/609] update URI.open call --- app/controllers/papers_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/papers_controller.rb b/app/controllers/papers_controller.rb index 9227b6ffb..8f01e0daf 100644 --- a/app/controllers/papers_controller.rb +++ b/app/controllers/papers_controller.rb @@ -1,4 +1,4 @@ -require 'uri' +require 'open-uri' class PapersController < ApplicationController include SettingsHelper @@ -245,7 +245,7 @@ def show respond_to do |format| format.html { render layout: false } format.pdf { - data = open(@paper.pdf_url) + data = URI.open(@paper.pdf_url) send_data data.read, :type => data.content_type, :disposition => 'inline' From 8dc3ad520668a83e92f193f3e843708b8a8fb9ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 4 Feb 2021 09:46:17 +0100 Subject: [PATCH 078/609] update build to 3.0.0 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d1cbd9f21..8009e2c0a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: ruby rvm: - - "2.6.3" + - "3.0.0" before_script: - psql -c 'create database joss_test' -U postgres - bundle install From fe6c54e4adc6a52606d7f50620f8b3483a4fd8e5 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Fri, 5 Feb 2021 07:01:47 +0000 Subject: [PATCH 079/609] Specify Ruby version for Heroku --- Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile b/Gemfile index 35637736a..3cc6e8439 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,5 @@ source 'https://rubygems.org' +ruby '3.0.0' gem 'aasm', '~> 5.0.5' gem 'chartkick' From 751e5d404b25cc680a902acc9f246bbcdb308f6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 5 Feb 2021 11:42:01 +0100 Subject: [PATCH 080/609] use omniauth 1.9.1 --- Gemfile.lock | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 07b7df1d8..ec7eaecff 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -255,7 +255,7 @@ GEM octokit (4.20.0) faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) - omniauth (2.0.2) + omniauth (1.9.1) hashie (>= 3.4.6) rack (>= 1.6.2, < 3) rack-protection @@ -465,5 +465,8 @@ DEPENDENCIES webmock (~> 3.11.2) will_paginate! +RUBY VERSION + ruby 3.0.0p0 + BUNDLED WITH 2.2.6 From 27d38efb7c9fd0f2c575c4a939aac33d1d82f33e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 5 Feb 2021 12:04:53 +0100 Subject: [PATCH 081/609] use POST login links with latest omniauth disallowing GET request resolves CVE 2015 9284: https://github.com/omniauth/omniauth/wiki/Resolving-CVE-2015-9284 --- Gemfile | 1 + Gemfile.lock | 6 +++++- app/views/content/layout/_navbar.html.erb | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 3cc6e8439..b3e563f5e 100644 --- a/Gemfile +++ b/Gemfile @@ -12,6 +12,7 @@ gem 'html-pipeline', '~> 2.14.0' gem 'commonmarker', '~> 0.21.1' gem 'octicons_helper', '~> 11.3' gem 'omniauth-orcid', '~> 2.1.1' +gem 'omniauth-rails_csrf_protection' gem 'octokit', '~> 4.20' gem 'pdf-reader', '~> 2.4.2' gem 'pg', '~> 1.2.3' diff --git a/Gemfile.lock b/Gemfile.lock index ec7eaecff..c49457d6d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -255,7 +255,7 @@ GEM octokit (4.20.0) faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) - omniauth (1.9.1) + omniauth (2.0.2) hashie (>= 3.4.6) rack (>= 1.6.2, < 3) rack-protection @@ -265,6 +265,9 @@ GEM omniauth-orcid (2.1.1) omniauth-oauth2 (~> 1.3) ruby_dig (~> 0.0.2) + omniauth-rails_csrf_protection (1.0.0) + actionpack (>= 4.2) + omniauth (~> 2.0) os (1.1.1) pdf-reader (2.4.2) Ascii85 (~> 1.0) @@ -446,6 +449,7 @@ DEPENDENCIES octicons_helper (~> 11.3) octokit (~> 4.20) omniauth-orcid (~> 2.1.1) + omniauth-rails_csrf_protection pdf-reader (~> 2.4.2) pg (~> 1.2.3) pry-byebug diff --git a/app/views/content/layout/_navbar.html.erb b/app/views/content/layout/_navbar.html.erb index bddfcf1b3..2c34648a4 100644 --- a/app/views/content/layout/_navbar.html.erb +++ b/app/views/content/layout/_navbar.html.erb @@ -33,7 +33,7 @@ <%= link_to "My Profile", profile_path, class: "nav-item nav-link" %> <%= link_to "Log out", signout_path, class: "nav-item nav-link" %> <% else %> - <%= link_to "Log in with ORCID", "/auth/orcid", class: "nav-item nav-link btn orcid" %> + <%= link_to "Log in with ORCID", "/auth/orcid", method: :post, class: "nav-item nav-link btn orcid" %> <% end %> <%= link_to image_tag("github.svg"), "https://github.com/openjournals/joss", target: '_blank', class: "nav-item nav-link" %> From 2ac6d7f9f7b029d9373e6e8cf09362bf669e12ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 5 Feb 2021 12:05:43 +0100 Subject: [PATCH 082/609] change redirection for not logged user --- app/controllers/application_controller.rb | 4 ++-- spec/controllers/editors_controller_spec.rb | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 26f0e1cb0..194f2c35b 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -7,8 +7,8 @@ class ApplicationController < ActionController::Base def require_user unless current_user - # Make sure we get redirected back to the page we were asking for. - redirect_to "/auth/orcid?origin=#{ENV['REQUEST_URI']}" + flash[:error] = "Please login first" + redirect_back fallback_location: :root false # throw :abort end end diff --git a/spec/controllers/editors_controller_spec.rb b/spec/controllers/editors_controller_spec.rb index 46502e960..df8a23b9f 100644 --- a/spec/controllers/editors_controller_spec.rb +++ b/spec/controllers/editors_controller_spec.rb @@ -9,9 +9,10 @@ context "when not logged in" do let(:current_user) { nil } - it "redirects to login" do + it "redirects to root with a login message" do get :index - expect(response).to redirect_to %r(test.host/auth/orcid) + expect(response).to redirect_to root_path + expect(flash[:error]).to eql "Please login first" end it "should allow the lookup of an editor" do From cc8ee0322a2b26cd06b69ba6f2a39afa27e4df2e Mon Sep 17 00:00:00 2001 From: Kyle Niemeyer Date: Fri, 5 Feb 2021 11:29:51 -0800 Subject: [PATCH 083/609] Adds whedon scope query to docs --- docs/whedon.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/whedon.md b/docs/whedon.md index e1c5a0e40..1953f61fe 100644 --- a/docs/whedon.md +++ b/docs/whedon.md @@ -66,6 +66,9 @@ EDITORIAL TASKS EiC TASKS +# Flag submission for editoral review, due to size or question about being research software +@whedon query scope + # Invite an editor to edit a submission (sending them an email) @whedon invite @editor as editor From cb10b6facd70a5157ffe1f0a8a72850e9cc42868 Mon Sep 17 00:00:00 2001 From: Kyle Niemeyer Date: Fri, 5 Feb 2021 11:34:29 -0800 Subject: [PATCH 084/609] Improves docs for check repository command --- docs/whedon.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/whedon.md b/docs/whedon.md index 1953f61fe..3ff968331 100644 --- a/docs/whedon.md +++ b/docs/whedon.md @@ -61,7 +61,8 @@ EDITORIAL TASKS # Ask Whedon to check the references for missing DOIs @whedon check references -# Ask Whedon to check repository statistics for the submitted software +# Ask Whedon to check repository statistics for the submitted software, for license, and +# for Statement of Need section in paper @whedon check repository EiC TASKS From 1b4670c0d3552c399b1e504d932ff9bb6a48676f Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 10 Feb 2021 09:21:33 +0000 Subject: [PATCH 085/609] No ML models --- docs/submitting.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/submitting.md b/docs/submitting.md index 070f48a84..2d30bbc29 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -21,8 +21,7 @@ In addition, the software associated with your submission must: ### What we mean by research software -JOSS publishes articles about research software. This definition includes software that: solves complex modeling problems in a scientific context (physics, mathematics, biology, medicine, social science, neuroscience, engineering); supports the functioning of research instruments or the execution of research experiments; extracts knowledge from large data sets; offers a mathematical library, or similar. - +JOSS publishes articles about research software. This definition includes software that: solves complex modeling problems in a scientific context (physics, mathematics, biology, medicine, social science, neuroscience, engineering); supports the functioning of research instruments or the execution of research experiments; extracts knowledge from large data sets; offers a mathematical library, or similar. While useful for many areas of research, pre-trained machine learning models are not in-scope for JOSS. ### Substantial scholarly effort From fba598fc16adc42ec8d65407c29a11d5d90c6204 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 12 Feb 2021 11:25:43 +0100 Subject: [PATCH 086/609] update to latest Rails: security release --- Gemfile | 2 +- Gemfile.lock | 110 +++++++++++++++++++++++++-------------------------- 2 files changed, 56 insertions(+), 56 deletions(-) diff --git a/Gemfile b/Gemfile index b3e563f5e..ad94970b2 100644 --- a/Gemfile +++ b/Gemfile @@ -20,7 +20,7 @@ gem 'pg', '~> 1.2.3' # once this bug is fixed and Rails 6.1 is supported: # https://github.com/mislav/will_paginate/pull/619 gem 'will_paginate', git: "https://github.com/kvokka/will_paginate", branch: "fix-page_entries_info" -gem 'rails', '6.1.1' +gem 'rails', '6.1.2.1' gem 'responders' gem 'newrelic_rpm' gem 'sanitize', '~> 5.2.3' diff --git a/Gemfile.lock b/Gemfile.lock index c49457d6d..a617e2241 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,40 +11,40 @@ GEM Ascii85 (1.1.0) aasm (5.0.8) concurrent-ruby (~> 1.0) - actioncable (6.1.1) - actionpack (= 6.1.1) - activesupport (= 6.1.1) + actioncable (6.1.2.1) + actionpack (= 6.1.2.1) + activesupport (= 6.1.2.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.1) - actionpack (= 6.1.1) - activejob (= 6.1.1) - activerecord (= 6.1.1) - activestorage (= 6.1.1) - activesupport (= 6.1.1) + actionmailbox (6.1.2.1) + actionpack (= 6.1.2.1) + activejob (= 6.1.2.1) + activerecord (= 6.1.2.1) + activestorage (= 6.1.2.1) + activesupport (= 6.1.2.1) mail (>= 2.7.1) - actionmailer (6.1.1) - actionpack (= 6.1.1) - actionview (= 6.1.1) - activejob (= 6.1.1) - activesupport (= 6.1.1) + actionmailer (6.1.2.1) + actionpack (= 6.1.2.1) + actionview (= 6.1.2.1) + activejob (= 6.1.2.1) + activesupport (= 6.1.2.1) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.1) - actionview (= 6.1.1) - activesupport (= 6.1.1) + actionpack (6.1.2.1) + actionview (= 6.1.2.1) + activesupport (= 6.1.2.1) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.1) - actionpack (= 6.1.1) - activerecord (= 6.1.1) - activestorage (= 6.1.1) - activesupport (= 6.1.1) + actiontext (6.1.2.1) + actionpack (= 6.1.2.1) + activerecord (= 6.1.2.1) + activestorage (= 6.1.2.1) + activesupport (= 6.1.2.1) nokogiri (>= 1.8.5) - actionview (6.1.1) - activesupport (= 6.1.1) + actionview (6.1.2.1) + activesupport (= 6.1.2.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -52,22 +52,22 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (6.1.1) - activesupport (= 6.1.1) + activejob (6.1.2.1) + activesupport (= 6.1.2.1) globalid (>= 0.3.6) - activemodel (6.1.1) - activesupport (= 6.1.1) - activerecord (6.1.1) - activemodel (= 6.1.1) - activesupport (= 6.1.1) - activestorage (6.1.1) - actionpack (= 6.1.1) - activejob (= 6.1.1) - activerecord (= 6.1.1) - activesupport (= 6.1.1) + activemodel (6.1.2.1) + activesupport (= 6.1.2.1) + activerecord (6.1.2.1) + activemodel (= 6.1.2.1) + activesupport (= 6.1.2.1) + activestorage (6.1.2.1) + actionpack (= 6.1.2.1) + activejob (= 6.1.2.1) + activerecord (= 6.1.2.1) + activesupport (= 6.1.2.1) marcel (~> 0.3.1) mimemagic (~> 0.3.2) - activesupport (6.1.1) + activesupport (6.1.2.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -232,7 +232,7 @@ GEM multipart-post (2.1.1) nenv (0.3.0) newrelic_rpm (6.15.0) - nio4r (2.5.4) + nio4r (2.5.5) nokogiri (1.11.1) mini_portile2 (~> 2.5.0) racc (~> 1.4) @@ -292,20 +292,20 @@ GEM rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.1.1) - actioncable (= 6.1.1) - actionmailbox (= 6.1.1) - actionmailer (= 6.1.1) - actionpack (= 6.1.1) - actiontext (= 6.1.1) - actionview (= 6.1.1) - activejob (= 6.1.1) - activemodel (= 6.1.1) - activerecord (= 6.1.1) - activestorage (= 6.1.1) - activesupport (= 6.1.1) + rails (6.1.2.1) + actioncable (= 6.1.2.1) + actionmailbox (= 6.1.2.1) + actionmailer (= 6.1.2.1) + actionpack (= 6.1.2.1) + actiontext (= 6.1.2.1) + actionview (= 6.1.2.1) + activejob (= 6.1.2.1) + activemodel (= 6.1.2.1) + activerecord (= 6.1.2.1) + activestorage (= 6.1.2.1) + activesupport (= 6.1.2.1) bundler (>= 1.15.0) - railties (= 6.1.1) + railties (= 6.1.2.1) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -316,9 +316,9 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - railties (6.1.1) - actionpack (= 6.1.1) - activesupport (= 6.1.1) + railties (6.1.2.1) + actionpack (= 6.1.2.1) + activesupport (= 6.1.2.1) method_source rake (>= 0.8.7) thor (~> 1.0) @@ -454,7 +454,7 @@ DEPENDENCIES pg (~> 1.2.3) pry-byebug rack-livereload - rails (= 6.1.1) + rails (= 6.1.2.1) rails-controller-testing (~> 1.0.5) responders rspec-rails (~> 4.0.2) From 1d7cfe66d9aede0ca9c059321e04812d82aef02e Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 14 Feb 2021 16:27:20 +0000 Subject: [PATCH 087/609] Specing out initial paper review complete stats --- app/helpers/dispatch_helper.rb | 4 +++- app/models/paper.rb | 9 +++++++++ .../20210214162210_add_percent_complete_to_paper.rb | 11 +++++++++++ db/schema.rb | 8 +++++--- 4 files changed, 28 insertions(+), 4 deletions(-) create mode 100644 db/migrate/20210214162210_add_percent_complete_to_paper.rb diff --git a/app/helpers/dispatch_helper.rb b/app/helpers/dispatch_helper.rb index de7d1b3fc..b63327c3e 100644 --- a/app/helpers/dispatch_helper.rb +++ b/app/helpers/dispatch_helper.rb @@ -119,7 +119,7 @@ def parse_payload! return if locked? return if pinned? return if unlocked? - + if edited? if issues.has_key?('last_edits') issues['last_edits'][sender] = payload['issue']['updated_at'] @@ -127,6 +127,8 @@ def parse_payload! issues['last_edits'] = {} issues['last_edits'][sender] = payload['issue']['updated_at'] end + + paper.percent_complete = paper.fraction_check_boxes_complete paper.last_activity = payload['issue']['updated_at'] paper.save and return end diff --git a/app/models/paper.rb b/app/models/paper.rb index 5888f3cec..5786f52a3 100644 --- a/app/models/paper.rb +++ b/app/models/paper.rb @@ -427,6 +427,15 @@ def pretty_state state.humanize.downcase end + def fraction_check_boxes_complete + return 0.0 if review_issue_id.nil? + issue = GITHUB.issue(Rails.application.settings["reviews"], review_issue_id) + checkbox_count = issue.scan(/(- \[ \]|- \[x\])/m).count + checked_checkbox_count = issue.scan(/(- \[x\])/m).count + + return checked_checkbox_count.to_f / checkbox_count + end + # Returns DOI with URL e.g. "https://doi.org/10.21105/joss.00001" def cross_ref_doi_url "https://doi.org/#{doi}" diff --git a/db/migrate/20210214162210_add_percent_complete_to_paper.rb b/db/migrate/20210214162210_add_percent_complete_to_paper.rb new file mode 100644 index 000000000..b59e5a7f1 --- /dev/null +++ b/db/migrate/20210214162210_add_percent_complete_to_paper.rb @@ -0,0 +1,11 @@ +class AddPercentCompleteToPaper < ActiveRecord::Migration[6.1] + def change + add_column :papers, :percent_complete, :float + add_index :papers, :percent_complete + + # Migrate past papers + Paper.all.each do |paper| + paper.submission_kind = 'new'; paper.save + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 8e604757d..bfc7383d2 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -2,15 +2,15 @@ # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # -# This file is the source Rails uses to define your schema when running `rails -# db:schema:load`. When creating a new database, `rails db:schema:load` tends to +# This file is the source Rails uses to define your schema when running `bin/rails +# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to # be faster and is potentially less error prone than running all of your # migrations from scratch. Old migrations may fail to apply correctly if those # migrations use external dependencies or application code. # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2020_06_30_105443) do +ActiveRecord::Schema.define(version: 2021_02_14_162210) do # These are extensions that must be enabled in order to support this database enable_extension "hstore" @@ -65,10 +65,12 @@ t.boolean "archived", default: false t.integer "eic_id" t.string "submission_kind" + t.float "percent_complete" t.index ["editor_id"], name: "index_papers_on_editor_id" t.index ["eic_id"], name: "index_papers_on_eic_id" t.index ["labels"], name: "index_papers_on_labels", using: :gin t.index ["last_activity"], name: "index_papers_on_last_activity" + t.index ["percent_complete"], name: "index_papers_on_percent_complete" t.index ["reviewers"], name: "index_papers_on_reviewers", using: :gin t.index ["sha"], name: "index_papers_on_sha" t.index ["user_id"], name: "index_papers_on_user_id" From aaaefe3c69938277de3829256b840bd08698c6b8 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 14 Feb 2021 17:24:11 +0000 Subject: [PATCH 088/609] Fixing specs --- spec/controllers/dispatch_controller_spec.rb | 4 + spec/fixtures/review-body-79.json | 183 +++++++++++++++++++ spec/spec_helper.rb | 9 + 3 files changed, 196 insertions(+) create mode 100644 spec/fixtures/review-body-79.json diff --git a/spec/controllers/dispatch_controller_spec.rb b/spec/controllers/dispatch_controller_spec.rb index 7fdcb571b..9219e2a4a 100644 --- a/spec/controllers/dispatch_controller_spec.rb +++ b/spec/controllers/dispatch_controller_spec.rb @@ -126,6 +126,10 @@ def set_signature(payload) expect(@paper.activities).to eq({"issues"=>{"commenters"=>{"pre-review"=>{}, "review"=>{}}, "comments"=>[], "last_comments" => {}, "last_edits"=>{"comment-editor"=>"2018-10-06T16:18:56Z"}}}) end + it "should update the percent_complete value" do + expect(@paper.percent_complete).to eq(0.9375) + end + it "should update the last_activity field" do github_updated_at = JSON.parse(whedon_review_edit)['issue']['updated_at'].to_datetime.strftime("%Y-%m-%dT%l:%M:%S%z") expect(@paper.last_activity.strftime('%Y-%m-%dT%l:%M:%S%z')).to eql(github_updated_at) diff --git a/spec/fixtures/review-body-79.json b/spec/fixtures/review-body-79.json new file mode 100644 index 000000000..a97d256bc --- /dev/null +++ b/spec/fixtures/review-body-79.json @@ -0,0 +1,183 @@ +{ + "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79", + "repository_url": "https://api.github.com/repos/openjournals/joss-reviews-testing-testing", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing-testing/issues/79/labels{/name}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing-testing/issues/79/comments", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing-testing/issues/79/events", + "html_url": "https://github.com/openjournals/joss-reviews-testing-testing/issues/79", + "id": 178630651, + "node_id": "MDU6SXNzdWUxNzg2MzA2NTE=", + "number": 79, + "title": "[REVIEW]: Python Active-subspaces Utility Library", + "user": { + "login": "whedon", + "id": 18508068, + "node_id": "MDQ6VXNlcjE4NTA4MDY4", + "avatar_url": "https://avatars.githubusercontent.com/u/18508068?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/whedon", + "html_url": "https://github.com/whedon", + "followers_url": "https://api.github.com/users/whedon/followers", + "following_url": "https://api.github.com/users/whedon/following{/other_user}", + "gists_url": "https://api.github.com/users/whedon/gists{/gist_id}", + "starred_url": "https://api.github.com/users/whedon/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/whedon/subscriptions", + "organizations_url": "https://api.github.com/users/whedon/orgs", + "repos_url": "https://api.github.com/users/whedon/repos", + "events_url": "https://api.github.com/users/whedon/events{/privacy}", + "received_events_url": "https://api.github.com/users/whedon/received_events", + "type": "User", + "site_admin": false + }, + "labels": [ + { + "id": 330461591, + "node_id": "MDU6TGFiZWwzMzA0NjE1OTE=", + "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/labels/accepted", + "name": "accepted", + "color": "159818", + "default": false, + "description": null + }, + { + "id": 1880544947, + "node_id": "MDU6TGFiZWwxODgwNTQ0OTQ3", + "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/labels/published", + "name": "published", + "color": "e276d8", + "default": false, + "description": "Papers published in JOSS" + }, + { + "id": 1880543836, + "node_id": "MDU6TGFiZWwxODgwNTQzODM2", + "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/labels/recommend-accept", + "name": "recommend-accept", + "color": "b9f9a9", + "default": false, + "description": "Papers recommended for acceptance in JOSS." + }, + { + "id": 330465313, + "node_id": "MDU6TGFiZWwzMzA0NjUzMTM=", + "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/labels/review", + "name": "review", + "color": "fbca04", + "default": false, + "description": null + } + ], + "state": "closed", + "locked": false, + "assignee": { + "login": "kyleniemeyer", + "id": 190432, + "node_id": "MDQ6VXNlcjE5MDQzMg==", + "avatar_url": "https://avatars.githubusercontent.com/u/190432?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/kyleniemeyer", + "html_url": "https://github.com/kyleniemeyer", + "followers_url": "https://api.github.com/users/kyleniemeyer/followers", + "following_url": "https://api.github.com/users/kyleniemeyer/following{/other_user}", + "gists_url": "https://api.github.com/users/kyleniemeyer/gists{/gist_id}", + "starred_url": "https://api.github.com/users/kyleniemeyer/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/kyleniemeyer/subscriptions", + "organizations_url": "https://api.github.com/users/kyleniemeyer/orgs", + "repos_url": "https://api.github.com/users/kyleniemeyer/repos", + "events_url": "https://api.github.com/users/kyleniemeyer/events{/privacy}", + "received_events_url": "https://api.github.com/users/kyleniemeyer/received_events", + "type": "User", + "site_admin": false + }, + "assignees": [ + { + "login": "kyleniemeyer", + "id": 190432, + "node_id": "MDQ6VXNlcjE5MDQzMg==", + "avatar_url": "https://avatars.githubusercontent.com/u/190432?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/kyleniemeyer", + "html_url": "https://github.com/kyleniemeyer", + "followers_url": "https://api.github.com/users/kyleniemeyer/followers", + "following_url": "https://api.github.com/users/kyleniemeyer/following{/other_user}", + "gists_url": "https://api.github.com/users/kyleniemeyer/gists{/gist_id}", + "starred_url": "https://api.github.com/users/kyleniemeyer/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/kyleniemeyer/subscriptions", + "organizations_url": "https://api.github.com/users/kyleniemeyer/orgs", + "repos_url": "https://api.github.com/users/kyleniemeyer/repos", + "events_url": "https://api.github.com/users/kyleniemeyer/events{/privacy}", + "received_events_url": "https://api.github.com/users/kyleniemeyer/received_events", + "type": "User", + "site_admin": false + }, + { + "login": "nicoguaro", + "id": 1097787, + "node_id": "MDQ6VXNlcjEwOTc3ODc=", + "avatar_url": "https://avatars.githubusercontent.com/u/1097787?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/nicoguaro", + "html_url": "https://github.com/nicoguaro", + "followers_url": "https://api.github.com/users/nicoguaro/followers", + "following_url": "https://api.github.com/users/nicoguaro/following{/other_user}", + "gists_url": "https://api.github.com/users/nicoguaro/gists{/gist_id}", + "starred_url": "https://api.github.com/users/nicoguaro/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/nicoguaro/subscriptions", + "organizations_url": "https://api.github.com/users/nicoguaro/orgs", + "repos_url": "https://api.github.com/users/nicoguaro/repos", + "events_url": "https://api.github.com/users/nicoguaro/events{/privacy}", + "received_events_url": "https://api.github.com/users/nicoguaro/received_events", + "type": "User", + "site_admin": false + }, + { + "login": "mtezzele", + "id": 8956946, + "node_id": "MDQ6VXNlcjg5NTY5NDY=", + "avatar_url": "https://avatars.githubusercontent.com/u/8956946?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/mtezzele", + "html_url": "https://github.com/mtezzele", + "followers_url": "https://api.github.com/users/mtezzele/followers", + "following_url": "https://api.github.com/users/mtezzele/following{/other_user}", + "gists_url": "https://api.github.com/users/mtezzele/gists{/gist_id}", + "starred_url": "https://api.github.com/users/mtezzele/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/mtezzele/subscriptions", + "organizations_url": "https://api.github.com/users/mtezzele/orgs", + "repos_url": "https://api.github.com/users/mtezzele/repos", + "events_url": "https://api.github.com/users/mtezzele/events{/privacy}", + "received_events_url": "https://api.github.com/users/mtezzele/received_events", + "type": "User", + "site_admin": false + } + ], + "milestone": null, + "comments": 28, + "created_at": "2016-09-22T14:46:47Z", + "updated_at": "2020-03-02T23:19:50Z", + "closed_at": "2016-09-29T19:17:28Z", + "author_association": "COLLABORATOR", + "active_lock_reason": null, + "body": "**Submitting author:** @paulcon (Paul Constantine)\n**Repository:** https://github.com/paulcon/active_subspaces\n**Version:** v 0.1\n**Editor:** @kyleniemeyer\n**Reviewer:** @mtezzele\n**Archive:** 10.5281/zenodo.158941\n## Status\n\n[![status](http://joss.theoj.org/papers/a598bac0d7456ff4f94967c25ada0c0a/status.svg)](http://joss.theoj.org/papers/a598bac0d7456ff4f94967c25ada0c0a)\n\nStatus badge code:\n\n```\nHTML: \nMarkdown: [![status](http://joss.theoj.org/papers/a598bac0d7456ff4f94967c25ada0c0a/status.svg)](http://joss.theoj.org/papers/a598bac0d7456ff4f94967c25ada0c0a)\n```\n\n**Reviewers and authors**:\n\nPlease avoid lengthy details of difficulties in the review thread. Instead, please create a new issue in the target repository and link to those issues (especially acceptance-blockers) in the review thread below. (For completists: if the target issue tracker is also on GitHub, linking the review thread in the issue or vice versa will create corresponding breadcrumb trails in the link target.)\n## Reviewer questions\n### Conflict of interest\n- [x] As the reviewer I confirm that there are no conflicts of interest for me to review this work (such as being a major contributor to the software).\n### General checks\n- [ ] **Repository:** Is the source code for this software available at the repository url?\n- [x] **License:** Does the repository contain a plain-text LICENSE file with the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) software license?\n- [x] **Version:** Does the release version given match the GitHub release (v 0.1)?\n### Functionality\n- [x] **Installation:** Does installation proceed as outlined in the documentation?\n- [x] **Functionality:** Have the functional claims of the software been confirmed?\n- [x] **Performance:** Have any performance claims of the software been confirmed?\n### Documentation\n- [x] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.\n- [x] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).\n- [x] **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g. API method documentation)?\n- [x] **Automated tests:** Are there automated tests or manual steps described so that the function of the software can be verified?\n- [x] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\n### Software paper\n\nPaper PDF: [10.21105.joss.00079.pdf](https://github.com/openjournals/joss-reviews/files/487592/10.21105.joss.00079.pdf)\n- [x] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\n- [x] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **References:** Do all archival references that should have a DOI list one (e.g. papers, datasets, software)?\n", + "closed_by": { + "login": "arfon", + "id": 4483, + "node_id": "MDQ6VXNlcjQ0ODM=", + "avatar_url": "https://avatars.githubusercontent.com/u/4483?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/arfon", + "html_url": "https://github.com/arfon", + "followers_url": "https://api.github.com/users/arfon/followers", + "following_url": "https://api.github.com/users/arfon/following{/other_user}", + "gists_url": "https://api.github.com/users/arfon/gists{/gist_id}", + "starred_url": "https://api.github.com/users/arfon/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/arfon/subscriptions", + "organizations_url": "https://api.github.com/users/arfon/orgs", + "repos_url": "https://api.github.com/users/arfon/repos", + "events_url": "https://api.github.com/users/arfon/events{/privacy}", + "received_events_url": "https://api.github.com/users/arfon/received_events", + "type": "User", + "site_admin": true + }, + "performed_via_github_app": null + } \ No newline at end of file diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 247cb3e72..fc47a72ba 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -94,6 +94,15 @@ RSpec.configure do |config| config.before(:each) do + stub_request(:get, "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79"). + with( + headers: { + 'Accept'=>'application/vnd.github.v3+json', + 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', + 'Content-Type'=>'application/json', + 'User-Agent'=>'Octokit Ruby Gem 4.20.0' + }). + to_return(status: 200, body: IO.binread('spec/fixtures/review-body-79.json'), headers: {}) stub_request(:post, "https://api.github.com/repos/openjournals/joss-reviews-testing/issues"). with(body: "{\"labels\":[\"review\"],\"title\":\"[REVIEW]: arfon / fidgit\",\"body\":\"**Submitting author:** @foobar (\\u003ca href=\\\"http://orcid.org/0000-0000-0000-1234\\\"\\u003eDoe, John\\u003c/a\\u003e)\\n**Repository:** \\u003ca href=\\\"http://github.com/arfon/fidgit\\\" target =\\\"_blank\\\"\\u003ehttp://github.com/arfon/fidgit\\u003c/a\\u003e\\n**Version:** v1.0.0\\n**Editor:** @mouse\\n**Reviewer:** @mickey\\n\\n## Status\\n\\n[![status](http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4/status.svg)](http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4)\\n\\nStatus badge code:\\n\\n```\\nHTML: \\u003ca href=\\\"http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4\\\"\\u003e\\u003cimg src=\\\"http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4/status.svg\\\"\\u003e\\u003c/a\\u003e\\nMarkdown: [![status](http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4/status.svg)](http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4)\\n```\\n**Reviewers and authors**:\\n\\nPlease avoid lengthy details of difficulties in the review thread. Instead, please create a new issue in the \\u003ca href=\\\"http://github.com/arfon/fidgit\\\" target=\\\"_blank\\\"\\u003etarget repository\\u003c/a\\u003e and link to those issues (especially acceptance-blockers) in the review thread below. (For completists: if the target issue tracker is also on GitHub, linking the review thread in the issue or vice versa will create corresponding breadcrumb trails in the link target.)\\n\\n## Reviewer questions\\n\\n### Conflict of interest\\n\\n- [ ] As the reviewer I confirm that there are no conflicts of interest for me to review this work (such as being a major contributor to the software).\\n\\n### Code of Conduct\\n\\n- [ ] I confirm that I read and will adhere to the [JOSS code of conduct](http://joss.theoj.org/about#code_of_conduct).\\n\\n### General checks\\n\\n- [ ] **Repository:** Is the source code for this software available at the \\u003ca target=\\\"_blank\\\" href=\\\"http://github.com/arfon/fidgit\\\"\\u003erepository url\\u003c/a\\u003e?\\n- [ ] **License:** Does the repository contain a plain-text LICENSE file with the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) software license?\\n- [ ] **Version:** Does the release version given match the GitHub release (v1.0.0)?\\n- [ ] **Authorship:** Has the submitting author (@foobar) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?\\n\\n### Functionality\\n\\n- [ ] **Installation:** Does installation proceed as outlined in the documentation?\\n- [ ] **Functionality:** Have the functional claims of the software been confirmed?\\n- [ ] **Performance:** If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)\\n\\n### Documentation\\n\\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\\n- [ ] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.\\n- [ ] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).\\n- [ ] **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?\\n- [ ] **Automated tests:** Are there automated tests or manual steps described so that the function of the software can be verified?\\n- [ ] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\\n\\n### Software paper\\n\\n- [ ] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\\n- [ ] **References:** Do all archival references that should have a DOI list one (e.g., papers, datasets, software)?\\n\"}", headers: {'Accept'=>'application/vnd.github.v3+json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/json', 'User-Agent'=>'Octokit Ruby Gem 4.3.0'}). From 8f27806fe4ae6e5b7df2180fa955f093526398c4 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 15 Feb 2021 11:15:02 +0000 Subject: [PATCH 089/609] Show percentage complete in UI --- app/controllers/home_controller.rb | 15 ++++++++------- app/models/paper.rb | 9 +++++++-- app/views/home/reviews.html.erb | 10 +++++----- ...0210214162210_add_percent_complete_to_paper.rb | 2 +- db/schema.rb | 2 +- spec/spec_helper.rb | 2 +- 6 files changed, 23 insertions(+), 17 deletions(-) diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 0a07a4a4c..b46b6e928 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -26,7 +26,7 @@ def dashboard def incoming if params[:order] - @papers = Paper.unscoped.in_progress.where(editor: nil).order(last_activity: params[:order]).paginate( + @papers = Paper.unscoped.in_progress.where(editor: nil).order(percent_complete: params[:order]).paginate( page: params[:page], per_page: 20 ) @@ -57,10 +57,11 @@ def reviews if params[:editor] @active_tab = @editor = Editor.find_by_login(params[:editor]) - @papers = Paper.unscoped.in_progress.where(editor: @editor).order(last_activity: @order).paginate( - page: params[:page], - per_page: 20 - ) + + @papers = Paper.unscoped.in_progress.where(editor: @editor).order(percent_complete: @order).paginate( + page: params[:page], + per_page: 20 + ) else @papers = Paper.everything.paginate( page: params[:page], @@ -83,7 +84,7 @@ def in_progress @editor = current_user.editor - @papers = Paper.unscoped.in_progress.order(last_activity: @order).paginate( + @papers = Paper.unscoped.in_progress.order(percent_complete: @order).paginate( page: params[:page], per_page: 20 ) @@ -105,7 +106,7 @@ def all @editor = current_user.editor - @papers = Paper.unscoped.all.order(last_activity: @order).paginate( + @papers = Paper.unscoped.all.order(percent_complete: @order).paginate( page: params[:page], per_page: 20 ) diff --git a/app/models/paper.rb b/app/models/paper.rb index 5786f52a3..4e4a40252 100644 --- a/app/models/paper.rb +++ b/app/models/paper.rb @@ -430,12 +430,17 @@ def pretty_state def fraction_check_boxes_complete return 0.0 if review_issue_id.nil? issue = GITHUB.issue(Rails.application.settings["reviews"], review_issue_id) - checkbox_count = issue.scan(/(- \[ \]|- \[x\])/m).count - checked_checkbox_count = issue.scan(/(- \[x\])/m).count + + checkbox_count = issue.body.scan(/(- \[ \]|- \[x\])/m).count + checked_checkbox_count = issue.body.scan(/(- \[x\])/m).count return checked_checkbox_count.to_f / checkbox_count end + def pretty_percentage + (percent_complete * 100).to_i + end + # Returns DOI with URL e.g. "https://doi.org/10.21105/joss.00001" def cross_ref_doi_url "https://doi.org/#{doi}" diff --git a/app/views/home/reviews.html.erb b/app/views/home/reviews.html.erb index 001bc3fe8..ca61aa651 100644 --- a/app/views/home/reviews.html.erb +++ b/app/views/home/reviews.html.erb @@ -40,13 +40,13 @@ - - + + - - + + @@ -62,7 +62,7 @@ <%- end %> - + <% end %> diff --git a/db/migrate/20210214162210_add_percent_complete_to_paper.rb b/db/migrate/20210214162210_add_percent_complete_to_paper.rb index b59e5a7f1..4ee94a7ac 100644 --- a/db/migrate/20210214162210_add_percent_complete_to_paper.rb +++ b/db/migrate/20210214162210_add_percent_complete_to_paper.rb @@ -1,6 +1,6 @@ class AddPercentCompleteToPaper < ActiveRecord::Migration[6.1] def change - add_column :papers, :percent_complete, :float + add_column :papers, :percent_complete, :float, default: 0.0 add_index :papers, :percent_complete # Migrate past papers diff --git a/db/schema.rb b/db/schema.rb index bfc7383d2..838f14f19 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -65,7 +65,7 @@ t.boolean "archived", default: false t.integer "eic_id" t.string "submission_kind" - t.float "percent_complete" + t.float "percent_complete", default: 0.0 t.index ["editor_id"], name: "index_papers_on_editor_id" t.index ["eic_id"], name: "index_papers_on_eic_id" t.index ["labels"], name: "index_papers_on_labels", using: :gin diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index fc47a72ba..eee803169 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -102,7 +102,7 @@ 'Content-Type'=>'application/json', 'User-Agent'=>'Octokit Ruby Gem 4.20.0' }). - to_return(status: 200, body: IO.binread('spec/fixtures/review-body-79.json'), headers: {}) + to_return(status: 200, body: JSON.generate(IO.binread('spec/fixtures/review-body-79.json')), headers: {}) stub_request(:post, "https://api.github.com/repos/openjournals/joss-reviews-testing/issues"). with(body: "{\"labels\":[\"review\"],\"title\":\"[REVIEW]: arfon / fidgit\",\"body\":\"**Submitting author:** @foobar (\\u003ca href=\\\"http://orcid.org/0000-0000-0000-1234\\\"\\u003eDoe, John\\u003c/a\\u003e)\\n**Repository:** \\u003ca href=\\\"http://github.com/arfon/fidgit\\\" target =\\\"_blank\\\"\\u003ehttp://github.com/arfon/fidgit\\u003c/a\\u003e\\n**Version:** v1.0.0\\n**Editor:** @mouse\\n**Reviewer:** @mickey\\n\\n## Status\\n\\n[![status](http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4/status.svg)](http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4)\\n\\nStatus badge code:\\n\\n```\\nHTML: \\u003ca href=\\\"http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4\\\"\\u003e\\u003cimg src=\\\"http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4/status.svg\\\"\\u003e\\u003c/a\\u003e\\nMarkdown: [![status](http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4/status.svg)](http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4)\\n```\\n**Reviewers and authors**:\\n\\nPlease avoid lengthy details of difficulties in the review thread. Instead, please create a new issue in the \\u003ca href=\\\"http://github.com/arfon/fidgit\\\" target=\\\"_blank\\\"\\u003etarget repository\\u003c/a\\u003e and link to those issues (especially acceptance-blockers) in the review thread below. (For completists: if the target issue tracker is also on GitHub, linking the review thread in the issue or vice versa will create corresponding breadcrumb trails in the link target.)\\n\\n## Reviewer questions\\n\\n### Conflict of interest\\n\\n- [ ] As the reviewer I confirm that there are no conflicts of interest for me to review this work (such as being a major contributor to the software).\\n\\n### Code of Conduct\\n\\n- [ ] I confirm that I read and will adhere to the [JOSS code of conduct](http://joss.theoj.org/about#code_of_conduct).\\n\\n### General checks\\n\\n- [ ] **Repository:** Is the source code for this software available at the \\u003ca target=\\\"_blank\\\" href=\\\"http://github.com/arfon/fidgit\\\"\\u003erepository url\\u003c/a\\u003e?\\n- [ ] **License:** Does the repository contain a plain-text LICENSE file with the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) software license?\\n- [ ] **Version:** Does the release version given match the GitHub release (v1.0.0)?\\n- [ ] **Authorship:** Has the submitting author (@foobar) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?\\n\\n### Functionality\\n\\n- [ ] **Installation:** Does installation proceed as outlined in the documentation?\\n- [ ] **Functionality:** Have the functional claims of the software been confirmed?\\n- [ ] **Performance:** If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)\\n\\n### Documentation\\n\\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\\n- [ ] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.\\n- [ ] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).\\n- [ ] **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?\\n- [ ] **Automated tests:** Are there automated tests or manual steps described so that the function of the software can be verified?\\n- [ ] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\\n\\n### Software paper\\n\\n- [ ] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\\n- [ ] **References:** Do all archival references that should have a DOI list one (e.g., papers, datasets, software)?\\n\"}", headers: {'Accept'=>'application/vnd.github.v3+json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/json', 'User-Agent'=>'Octokit Ruby Gem 4.3.0'}). From 041902eddc4e58ef5d99a0df9a967d07bad88b2b Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 15 Feb 2021 11:22:39 +0000 Subject: [PATCH 090/609] Remove migration step --- db/migrate/20210214162210_add_percent_complete_to_paper.rb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/db/migrate/20210214162210_add_percent_complete_to_paper.rb b/db/migrate/20210214162210_add_percent_complete_to_paper.rb index 4ee94a7ac..0529a302c 100644 --- a/db/migrate/20210214162210_add_percent_complete_to_paper.rb +++ b/db/migrate/20210214162210_add_percent_complete_to_paper.rb @@ -2,10 +2,5 @@ class AddPercentCompleteToPaper < ActiveRecord::Migration[6.1] def change add_column :papers, :percent_complete, :float, default: 0.0 add_index :papers, :percent_complete - - # Migrate past papers - Paper.all.each do |paper| - paper.submission_kind = 'new'; paper.save - end end end From 2b0dbea7d2345e09d8a51c4ec79f5b3425315044 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 15 Feb 2021 11:38:02 +0000 Subject: [PATCH 091/609] Adding % symbol --- app/views/home/reviews.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/home/reviews.html.erb b/app/views/home/reviews.html.erb index ca61aa651..fefd80dc3 100644 --- a/app/views/home/reviews.html.erb +++ b/app/views/home/reviews.html.erb @@ -62,7 +62,7 @@ <%- end %> - + <% end %> From e082aeb5125f637ad927d6e8d20158613b7afb34 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 15 Feb 2021 11:41:31 +0000 Subject: [PATCH 092/609] Space --- app/views/home/reviews.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/home/reviews.html.erb b/app/views/home/reviews.html.erb index fefd80dc3..b1c59e6d0 100644 --- a/app/views/home/reviews.html.erb +++ b/app/views/home/reviews.html.erb @@ -40,13 +40,13 @@
StatusPaper titleStatusPaper title Scope Reviews ReviewersLast comment<%= sort_icon(@order) %>Last comment<%= sort_icon(@order) %>
<%= comment_activity(paper) %><%= paper.pretty_percentage %>
<%= comment_activity(paper) %><%= paper.pretty_percentage %><%= paper.pretty_percentage %> %
- - + + - + From 3b9f469d9224df1436fc449f4634f14e6bca1748 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 15 Feb 2021 22:07:19 +0000 Subject: [PATCH 093/609] Test config --- Gemfile | 1 + Gemfile.lock | 2 + spec/controllers/dispatch_controller_spec.rb | 4 +- spec/controllers/papers_controller_spec.rb | 8 -- .../should_update_the_last_activity_field.yml | 122 ++++++++++++++++++ .../should_update_the_last_edits_key.yml | 122 ++++++++++++++++++ ...ould_update_the_percent_complete_value.yml | 122 ++++++++++++++++++ spec/fixtures/editor-pre-review-comment.json | 106 +++++++-------- spec/fixtures/editor-review-comment.json | 106 +++++++-------- spec/fixtures/whedon-pre-review-comment.json | 106 +++++++-------- spec/fixtures/whedon-pre-review-opened.json | 100 +++++++------- spec/fixtures/whedon-review-comment.json | 106 +++++++-------- spec/fixtures/whedon-review-edit.json | 106 +++++++-------- spec/fixtures/whedon-review-labeled.json | 104 +++++++-------- spec/fixtures/whedon-review-opened.json | 100 +++++++------- spec/spec_helper.rb | 36 +----- 16 files changed, 795 insertions(+), 456 deletions(-) create mode 100644 spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_last_activity_field.yml create mode 100644 spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_last_edits_key.yml create mode 100644 spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_percent_complete_value.yml diff --git a/Gemfile b/Gemfile index ad94970b2..05ffdff98 100644 --- a/Gemfile +++ b/Gemfile @@ -51,6 +51,7 @@ group :development, :test do end group :test do + gem 'vcr', '~> 3.0', '>= 3.0.1' gem 'webmock', '~> 3.11.2' end diff --git a/Gemfile.lock b/Gemfile.lock index a617e2241..1fe681a68 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -407,6 +407,7 @@ GEM unicorn (5.8.0) kgio (~> 2.6) raindrops (~> 0.7) + vcr (3.0.3) web-console (4.1.0) actionview (>= 6.0.0) activemodel (>= 6.0.0) @@ -465,6 +466,7 @@ DEPENDENCIES spring-commands-rspec uglifier (= 4.2.0) unicorn (~> 5.8.0) + vcr (~> 3.0, >= 3.0.1) web-console (~> 4.1.0) webmock (~> 3.11.2) will_paginate! diff --git a/spec/controllers/dispatch_controller_spec.rb b/spec/controllers/dispatch_controller_spec.rb index 9219e2a4a..76b111eb3 100644 --- a/spec/controllers/dispatch_controller_spec.rb +++ b/spec/controllers/dispatch_controller_spec.rb @@ -98,7 +98,7 @@ def set_signature(payload) end end - describe "POST #github_recevier for REVIEW", type: :request do + describe "POST #github_recevier for REVIEW", type: :request, vcr: true do before do signature = set_signature(whedon_review_opened) @paper = create(:paper, meta_review_issue_id: 78, review_issue_id: 79) @@ -112,7 +112,7 @@ def set_signature(payload) end end - describe "POST #github_recevier for REVIEW", type: :request do + describe "POST #github_recevier for REVIEW", type: :request, vcr: true do before do signature = set_signature(whedon_review_edit) diff --git a/spec/controllers/papers_controller_spec.rb b/spec/controllers/papers_controller_spec.rb index e7c56fab7..1c855c494 100644 --- a/spec/controllers/papers_controller_spec.rb +++ b/spec/controllers/papers_controller_spec.rb @@ -203,14 +203,6 @@ end describe "accepted papers" do - it "should send_file a URL for a PDF" do - paper = create(:accepted_paper) - request.headers["HTTP_ACCEPT"] = "application/pdf" - - get :show, params: {doi: paper.doi} - expect(response.body).to eq(IO.binread('spec/fixtures/paper.pdf')) - end - it "should not redirect when accepting any content type" do paper = create(:accepted_paper) request.headers["HTTP_ACCEPT"] = "*/*" diff --git a/spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_last_activity_field.yml b/spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_last_activity_field.yml new file mode 100644 index 000000000..b5166d7fe --- /dev/null +++ b/spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_last_activity_field.yml @@ -0,0 +1,122 @@ +--- +http_interactions: +- request: + method: get + uri: https://api.github.com/repos/openjournals/joss-reviews/issues/79 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/vnd.github.v3+json + User-Agent: + - Octokit Ruby Gem 4.20.0 + Content-Type: + - application/json + response: + status: + code: 200 + message: + headers: + date: + - Mon, 15 Feb 2021 21:38:38 GMT + content-type: + - application/json; charset=utf-8 + server: + - GitHub.com + cache-control: + - public, max-age=60, s-maxage=60 + vary: + - Accept, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding + etag: + - W/"21cc626cd5b1f57e6789f6e1dc03d9214bafcc46a66dc67247a59360afc1dcdb" + last-modified: + - Mon, 15 Feb 2021 15:30:05 GMT + x-github-media-type: + - github.v3; format=json + access-control-expose-headers: + - ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, + X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, + X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset + access-control-allow-origin: + - "*" + strict-transport-security: + - max-age=31536000; includeSubdomains; preload + x-frame-options: + - deny + x-content-type-options: + - nosniff + x-xss-protection: + - 1; mode=block + referrer-policy: + - origin-when-cross-origin, strict-origin-when-cross-origin + content-security-policy: + - default-src 'none' + x-ratelimit-limit: + - '60' + x-ratelimit-remaining: + - '54' + x-ratelimit-reset: + - '1613425220' + x-ratelimit-used: + - '6' + accept-ranges: + - bytes + content-length: + - '2891' + x-github-request-id: + - C285:E46E:81DD96F:8F41571:602AE9DE + body: + encoding: ASCII-8BIT + string: '{"url":"https://api.github.com/repos/openjournals/joss-reviews/issues/79","repository_url":"https://api.github.com/repos/openjournals/joss-reviews","labels_url":"https://api.github.com/repos/openjournals/joss-reviews/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/openjournals/joss-reviews/issues/79/comments","events_url":"https://api.github.com/repos/openjournals/joss-reviews/issues/79/events","html_url":"https://github.com/openjournals/joss-reviews/issues/79","id":178630651,"node_id":"MDU6SXNzdWUxNzg2MzA2NTE=","number":79,"title":"[REVIEW]: + Python Active-subspaces Utility Library","user":{"login":"whedon","id":18508068,"node_id":"MDQ6VXNlcjE4NTA4MDY4","avatar_url":"https://avatars.githubusercontent.com/u/18508068?v=4","gravatar_id":"","url":"https://api.github.com/users/whedon","html_url":"https://github.com/whedon","followers_url":"https://api.github.com/users/whedon/followers","following_url":"https://api.github.com/users/whedon/following{/other_user}","gists_url":"https://api.github.com/users/whedon/gists{/gist_id}","starred_url":"https://api.github.com/users/whedon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whedon/subscriptions","organizations_url":"https://api.github.com/users/whedon/orgs","repos_url":"https://api.github.com/users/whedon/repos","events_url":"https://api.github.com/users/whedon/events{/privacy}","received_events_url":"https://api.github.com/users/whedon/received_events","type":"User","site_admin":false},"labels":[{"id":330461591,"node_id":"MDU6TGFiZWwzMzA0NjE1OTE=","url":"https://api.github.com/repos/openjournals/joss-reviews/labels/accepted","name":"accepted","color":"159818","default":false,"description":null},{"id":1880544947,"node_id":"MDU6TGFiZWwxODgwNTQ0OTQ3","url":"https://api.github.com/repos/openjournals/joss-reviews/labels/published","name":"published","color":"e276d8","default":false,"description":"Papers + published in JOSS"},{"id":1880543836,"node_id":"MDU6TGFiZWwxODgwNTQzODM2","url":"https://api.github.com/repos/openjournals/joss-reviews/labels/recommend-accept","name":"recommend-accept","color":"b9f9a9","default":false,"description":"Papers + recommended for acceptance in JOSS."},{"id":330465313,"node_id":"MDU6TGFiZWwzMzA0NjUzMTM=","url":"https://api.github.com/repos/openjournals/joss-reviews/labels/review","name":"review","color":"fbca04","default":false,"description":null}],"state":"closed","locked":false,"assignee":{"login":"kyleniemeyer","id":190432,"node_id":"MDQ6VXNlcjE5MDQzMg==","avatar_url":"https://avatars.githubusercontent.com/u/190432?v=4","gravatar_id":"","url":"https://api.github.com/users/kyleniemeyer","html_url":"https://github.com/kyleniemeyer","followers_url":"https://api.github.com/users/kyleniemeyer/followers","following_url":"https://api.github.com/users/kyleniemeyer/following{/other_user}","gists_url":"https://api.github.com/users/kyleniemeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleniemeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleniemeyer/subscriptions","organizations_url":"https://api.github.com/users/kyleniemeyer/orgs","repos_url":"https://api.github.com/users/kyleniemeyer/repos","events_url":"https://api.github.com/users/kyleniemeyer/events{/privacy}","received_events_url":"https://api.github.com/users/kyleniemeyer/received_events","type":"User","site_admin":false},"assignees":[{"login":"kyleniemeyer","id":190432,"node_id":"MDQ6VXNlcjE5MDQzMg==","avatar_url":"https://avatars.githubusercontent.com/u/190432?v=4","gravatar_id":"","url":"https://api.github.com/users/kyleniemeyer","html_url":"https://github.com/kyleniemeyer","followers_url":"https://api.github.com/users/kyleniemeyer/followers","following_url":"https://api.github.com/users/kyleniemeyer/following{/other_user}","gists_url":"https://api.github.com/users/kyleniemeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleniemeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleniemeyer/subscriptions","organizations_url":"https://api.github.com/users/kyleniemeyer/orgs","repos_url":"https://api.github.com/users/kyleniemeyer/repos","events_url":"https://api.github.com/users/kyleniemeyer/events{/privacy}","received_events_url":"https://api.github.com/users/kyleniemeyer/received_events","type":"User","site_admin":false},{"login":"nicoguaro","id":1097787,"node_id":"MDQ6VXNlcjEwOTc3ODc=","avatar_url":"https://avatars.githubusercontent.com/u/1097787?v=4","gravatar_id":"","url":"https://api.github.com/users/nicoguaro","html_url":"https://github.com/nicoguaro","followers_url":"https://api.github.com/users/nicoguaro/followers","following_url":"https://api.github.com/users/nicoguaro/following{/other_user}","gists_url":"https://api.github.com/users/nicoguaro/gists{/gist_id}","starred_url":"https://api.github.com/users/nicoguaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicoguaro/subscriptions","organizations_url":"https://api.github.com/users/nicoguaro/orgs","repos_url":"https://api.github.com/users/nicoguaro/repos","events_url":"https://api.github.com/users/nicoguaro/events{/privacy}","received_events_url":"https://api.github.com/users/nicoguaro/received_events","type":"User","site_admin":false},{"login":"mtezzele","id":8956946,"node_id":"MDQ6VXNlcjg5NTY5NDY=","avatar_url":"https://avatars.githubusercontent.com/u/8956946?v=4","gravatar_id":"","url":"https://api.github.com/users/mtezzele","html_url":"https://github.com/mtezzele","followers_url":"https://api.github.com/users/mtezzele/followers","following_url":"https://api.github.com/users/mtezzele/following{/other_user}","gists_url":"https://api.github.com/users/mtezzele/gists{/gist_id}","starred_url":"https://api.github.com/users/mtezzele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtezzele/subscriptions","organizations_url":"https://api.github.com/users/mtezzele/orgs","repos_url":"https://api.github.com/users/mtezzele/repos","events_url":"https://api.github.com/users/mtezzele/events{/privacy}","received_events_url":"https://api.github.com/users/mtezzele/received_events","type":"User","site_admin":false}],"milestone":null,"comments":28,"created_at":"2016-09-22T14:46:47Z","updated_at":"2021-02-14T16:46:54Z","closed_at":"2016-09-29T19:17:28Z","author_association":"COLLABORATOR","active_lock_reason":null,"body":"**Submitting + author:** @paulcon (Paul + Constantine)\n**Repository:** https://github.com/paulcon/active_subspaces\n**Version:** + v 0.1\n**Editor:** @kyleniemeyer\n**Reviewer:** @mtezzele\n**Archive:** 10.5281/zenodo.158941\n## + Status\n\n[![status](http://joss.theoj.org/papers/a598bac0d7456ff4f94967c25ada0c0a/status.svg)](http://joss.theoj.org/papers/a598bac0d7456ff4f94967c25ada0c0a)\n\nStatus + badge code:\n\n```\nHTML: \nMarkdown: + [![status](http://joss.theoj.org/papers/a598bac0d7456ff4f94967c25ada0c0a/status.svg)](http://joss.theoj.org/papers/a598bac0d7456ff4f94967c25ada0c0a)\n```\n\n**Reviewers + and authors**:\n\nPlease avoid lengthy details of difficulties in the review + thread. Instead, please create a new issue in the target repository and link to those issues (especially + acceptance-blockers) in the review thread below. (For completists: if the + target issue tracker is also on GitHub, linking the review thread in the issue + or vice versa will create corresponding breadcrumb trails in the link target.)\n## + Reviewer questions\n### Conflict of interest\n- [x] As the reviewer I confirm + that there are no conflicts of interest for me to review this work (such as + being a major contributor to the software).\n### General checks\n- [x] **Repository:** + Is the source code for this software available at the repository url?\n- + [x] **License:** Does the repository contain a plain-text LICENSE file with + the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) + software license?\n- [x] **Version:** Does the release version given match + the GitHub release (v 0.1)?\n### Functionality\n- [x] **Installation:** Does + installation proceed as outlined in the documentation?\n- [x] **Functionality:** + Have the functional claims of the software been confirmed?\n- [x] **Performance:** + Have any performance claims of the software been confirmed?\n### Documentation\n- + [x] **A statement of need:** Do the authors clearly state what problems the + software is designed to solve and who the target audience is?\n- [x] **Installation + instructions:** Is there a clearly-stated list of dependencies? Ideally these + should be handled with an automated package management solution.\n- [x] **Example + usage:** Do the authors include examples of how to use the software (ideally + to solve real-world analysis problems).\n- [x] **Functionality documentation:** + Is the core functionality of the software documented to a satisfactory level + (e.g. API method documentation)?\n- [x] **Automated tests:** Are there automated + tests or manual steps described so that the function of the software can be + verified?\n- [x] **Community guidelines:** Are there clear guidelines for + third parties wishing to 1) Contribute to the software 2) Report issues or + problems with the software 3) Seek support\n### Software paper\n\nPaper PDF: + [10.21105.joss.00079.pdf](https://github.com/openjournals/joss-reviews/files/487592/10.21105.joss.00079.pdf)\n- + [x] **Authors:** Does the `paper.md` file include a list of authors with their + affiliations?\n- [x] **A statement of need:** Do the authors clearly state + what problems the software is designed to solve and who the target audience + is?\n- [x] **References:** Do all archival references that should have a DOI + list one (e.g. papers, datasets, software)?\n","closed_by":{"login":"arfon","id":4483,"node_id":"MDQ6VXNlcjQ0ODM=","avatar_url":"https://avatars.githubusercontent.com/u/4483?v=4","gravatar_id":"","url":"https://api.github.com/users/arfon","html_url":"https://github.com/arfon","followers_url":"https://api.github.com/users/arfon/followers","following_url":"https://api.github.com/users/arfon/following{/other_user}","gists_url":"https://api.github.com/users/arfon/gists{/gist_id}","starred_url":"https://api.github.com/users/arfon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arfon/subscriptions","organizations_url":"https://api.github.com/users/arfon/orgs","repos_url":"https://api.github.com/users/arfon/repos","events_url":"https://api.github.com/users/arfon/events{/privacy}","received_events_url":"https://api.github.com/users/arfon/received_events","type":"User","site_admin":true},"performed_via_github_app":null}' + http_version: + recorded_at: Mon, 15 Feb 2021 21:38:38 GMT +recorded_with: VCR 3.0.3 diff --git a/spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_last_edits_key.yml b/spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_last_edits_key.yml new file mode 100644 index 000000000..da2786df2 --- /dev/null +++ b/spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_last_edits_key.yml @@ -0,0 +1,122 @@ +--- +http_interactions: +- request: + method: get + uri: https://api.github.com/repos/openjournals/joss-reviews/issues/79 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/vnd.github.v3+json + User-Agent: + - Octokit Ruby Gem 4.20.0 + Content-Type: + - application/json + response: + status: + code: 200 + message: + headers: + server: + - GitHub.com + date: + - Mon, 15 Feb 2021 21:37:26 GMT + content-type: + - application/json; charset=utf-8 + cache-control: + - public, max-age=60, s-maxage=60 + vary: + - Accept, Accept-Encoding, Accept, X-Requested-With + etag: + - W/"21cc626cd5b1f57e6789f6e1dc03d9214bafcc46a66dc67247a59360afc1dcdb" + last-modified: + - Mon, 15 Feb 2021 15:30:05 GMT + x-github-media-type: + - github.v3; format=json + access-control-expose-headers: + - ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, + X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, + X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset + access-control-allow-origin: + - "*" + strict-transport-security: + - max-age=31536000; includeSubdomains; preload + x-frame-options: + - deny + x-content-type-options: + - nosniff + x-xss-protection: + - 1; mode=block + referrer-policy: + - origin-when-cross-origin, strict-origin-when-cross-origin + content-security-policy: + - default-src 'none' + x-ratelimit-limit: + - '60' + x-ratelimit-remaining: + - '56' + x-ratelimit-reset: + - '1613425220' + x-ratelimit-used: + - '4' + accept-ranges: + - bytes + transfer-encoding: + - chunked + x-github-request-id: + - C269:5564:4D8C5C4:55C2953:602AE996 + body: + encoding: ASCII-8BIT + string: '{"url":"https://api.github.com/repos/openjournals/joss-reviews/issues/79","repository_url":"https://api.github.com/repos/openjournals/joss-reviews","labels_url":"https://api.github.com/repos/openjournals/joss-reviews/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/openjournals/joss-reviews/issues/79/comments","events_url":"https://api.github.com/repos/openjournals/joss-reviews/issues/79/events","html_url":"https://github.com/openjournals/joss-reviews/issues/79","id":178630651,"node_id":"MDU6SXNzdWUxNzg2MzA2NTE=","number":79,"title":"[REVIEW]: + Python Active-subspaces Utility Library","user":{"login":"whedon","id":18508068,"node_id":"MDQ6VXNlcjE4NTA4MDY4","avatar_url":"https://avatars.githubusercontent.com/u/18508068?v=4","gravatar_id":"","url":"https://api.github.com/users/whedon","html_url":"https://github.com/whedon","followers_url":"https://api.github.com/users/whedon/followers","following_url":"https://api.github.com/users/whedon/following{/other_user}","gists_url":"https://api.github.com/users/whedon/gists{/gist_id}","starred_url":"https://api.github.com/users/whedon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whedon/subscriptions","organizations_url":"https://api.github.com/users/whedon/orgs","repos_url":"https://api.github.com/users/whedon/repos","events_url":"https://api.github.com/users/whedon/events{/privacy}","received_events_url":"https://api.github.com/users/whedon/received_events","type":"User","site_admin":false},"labels":[{"id":330461591,"node_id":"MDU6TGFiZWwzMzA0NjE1OTE=","url":"https://api.github.com/repos/openjournals/joss-reviews/labels/accepted","name":"accepted","color":"159818","default":false,"description":null},{"id":1880544947,"node_id":"MDU6TGFiZWwxODgwNTQ0OTQ3","url":"https://api.github.com/repos/openjournals/joss-reviews/labels/published","name":"published","color":"e276d8","default":false,"description":"Papers + published in JOSS"},{"id":1880543836,"node_id":"MDU6TGFiZWwxODgwNTQzODM2","url":"https://api.github.com/repos/openjournals/joss-reviews/labels/recommend-accept","name":"recommend-accept","color":"b9f9a9","default":false,"description":"Papers + recommended for acceptance in JOSS."},{"id":330465313,"node_id":"MDU6TGFiZWwzMzA0NjUzMTM=","url":"https://api.github.com/repos/openjournals/joss-reviews/labels/review","name":"review","color":"fbca04","default":false,"description":null}],"state":"closed","locked":false,"assignee":{"login":"kyleniemeyer","id":190432,"node_id":"MDQ6VXNlcjE5MDQzMg==","avatar_url":"https://avatars.githubusercontent.com/u/190432?v=4","gravatar_id":"","url":"https://api.github.com/users/kyleniemeyer","html_url":"https://github.com/kyleniemeyer","followers_url":"https://api.github.com/users/kyleniemeyer/followers","following_url":"https://api.github.com/users/kyleniemeyer/following{/other_user}","gists_url":"https://api.github.com/users/kyleniemeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleniemeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleniemeyer/subscriptions","organizations_url":"https://api.github.com/users/kyleniemeyer/orgs","repos_url":"https://api.github.com/users/kyleniemeyer/repos","events_url":"https://api.github.com/users/kyleniemeyer/events{/privacy}","received_events_url":"https://api.github.com/users/kyleniemeyer/received_events","type":"User","site_admin":false},"assignees":[{"login":"kyleniemeyer","id":190432,"node_id":"MDQ6VXNlcjE5MDQzMg==","avatar_url":"https://avatars.githubusercontent.com/u/190432?v=4","gravatar_id":"","url":"https://api.github.com/users/kyleniemeyer","html_url":"https://github.com/kyleniemeyer","followers_url":"https://api.github.com/users/kyleniemeyer/followers","following_url":"https://api.github.com/users/kyleniemeyer/following{/other_user}","gists_url":"https://api.github.com/users/kyleniemeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleniemeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleniemeyer/subscriptions","organizations_url":"https://api.github.com/users/kyleniemeyer/orgs","repos_url":"https://api.github.com/users/kyleniemeyer/repos","events_url":"https://api.github.com/users/kyleniemeyer/events{/privacy}","received_events_url":"https://api.github.com/users/kyleniemeyer/received_events","type":"User","site_admin":false},{"login":"nicoguaro","id":1097787,"node_id":"MDQ6VXNlcjEwOTc3ODc=","avatar_url":"https://avatars.githubusercontent.com/u/1097787?v=4","gravatar_id":"","url":"https://api.github.com/users/nicoguaro","html_url":"https://github.com/nicoguaro","followers_url":"https://api.github.com/users/nicoguaro/followers","following_url":"https://api.github.com/users/nicoguaro/following{/other_user}","gists_url":"https://api.github.com/users/nicoguaro/gists{/gist_id}","starred_url":"https://api.github.com/users/nicoguaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicoguaro/subscriptions","organizations_url":"https://api.github.com/users/nicoguaro/orgs","repos_url":"https://api.github.com/users/nicoguaro/repos","events_url":"https://api.github.com/users/nicoguaro/events{/privacy}","received_events_url":"https://api.github.com/users/nicoguaro/received_events","type":"User","site_admin":false},{"login":"mtezzele","id":8956946,"node_id":"MDQ6VXNlcjg5NTY5NDY=","avatar_url":"https://avatars.githubusercontent.com/u/8956946?v=4","gravatar_id":"","url":"https://api.github.com/users/mtezzele","html_url":"https://github.com/mtezzele","followers_url":"https://api.github.com/users/mtezzele/followers","following_url":"https://api.github.com/users/mtezzele/following{/other_user}","gists_url":"https://api.github.com/users/mtezzele/gists{/gist_id}","starred_url":"https://api.github.com/users/mtezzele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtezzele/subscriptions","organizations_url":"https://api.github.com/users/mtezzele/orgs","repos_url":"https://api.github.com/users/mtezzele/repos","events_url":"https://api.github.com/users/mtezzele/events{/privacy}","received_events_url":"https://api.github.com/users/mtezzele/received_events","type":"User","site_admin":false}],"milestone":null,"comments":28,"created_at":"2016-09-22T14:46:47Z","updated_at":"2021-02-14T16:46:54Z","closed_at":"2016-09-29T19:17:28Z","author_association":"COLLABORATOR","active_lock_reason":null,"body":"**Submitting + author:** @paulcon (Paul + Constantine)\n**Repository:** https://github.com/paulcon/active_subspaces\n**Version:** + v 0.1\n**Editor:** @kyleniemeyer\n**Reviewer:** @mtezzele\n**Archive:** 10.5281/zenodo.158941\n## + Status\n\n[![status](http://joss.theoj.org/papers/a598bac0d7456ff4f94967c25ada0c0a/status.svg)](http://joss.theoj.org/papers/a598bac0d7456ff4f94967c25ada0c0a)\n\nStatus + badge code:\n\n```\nHTML: \nMarkdown: + [![status](http://joss.theoj.org/papers/a598bac0d7456ff4f94967c25ada0c0a/status.svg)](http://joss.theoj.org/papers/a598bac0d7456ff4f94967c25ada0c0a)\n```\n\n**Reviewers + and authors**:\n\nPlease avoid lengthy details of difficulties in the review + thread. Instead, please create a new issue in the target repository and link to those issues (especially + acceptance-blockers) in the review thread below. (For completists: if the + target issue tracker is also on GitHub, linking the review thread in the issue + or vice versa will create corresponding breadcrumb trails in the link target.)\n## + Reviewer questions\n### Conflict of interest\n- [x] As the reviewer I confirm + that there are no conflicts of interest for me to review this work (such as + being a major contributor to the software).\n### General checks\n- [x] **Repository:** + Is the source code for this software available at the repository url?\n- + [x] **License:** Does the repository contain a plain-text LICENSE file with + the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) + software license?\n- [x] **Version:** Does the release version given match + the GitHub release (v 0.1)?\n### Functionality\n- [x] **Installation:** Does + installation proceed as outlined in the documentation?\n- [x] **Functionality:** + Have the functional claims of the software been confirmed?\n- [x] **Performance:** + Have any performance claims of the software been confirmed?\n### Documentation\n- + [x] **A statement of need:** Do the authors clearly state what problems the + software is designed to solve and who the target audience is?\n- [x] **Installation + instructions:** Is there a clearly-stated list of dependencies? Ideally these + should be handled with an automated package management solution.\n- [x] **Example + usage:** Do the authors include examples of how to use the software (ideally + to solve real-world analysis problems).\n- [x] **Functionality documentation:** + Is the core functionality of the software documented to a satisfactory level + (e.g. API method documentation)?\n- [x] **Automated tests:** Are there automated + tests or manual steps described so that the function of the software can be + verified?\n- [x] **Community guidelines:** Are there clear guidelines for + third parties wishing to 1) Contribute to the software 2) Report issues or + problems with the software 3) Seek support\n### Software paper\n\nPaper PDF: + [10.21105.joss.00079.pdf](https://github.com/openjournals/joss-reviews/files/487592/10.21105.joss.00079.pdf)\n- + [x] **Authors:** Does the `paper.md` file include a list of authors with their + affiliations?\n- [x] **A statement of need:** Do the authors clearly state + what problems the software is designed to solve and who the target audience + is?\n- [x] **References:** Do all archival references that should have a DOI + list one (e.g. papers, datasets, software)?\n","closed_by":{"login":"arfon","id":4483,"node_id":"MDQ6VXNlcjQ0ODM=","avatar_url":"https://avatars.githubusercontent.com/u/4483?v=4","gravatar_id":"","url":"https://api.github.com/users/arfon","html_url":"https://github.com/arfon","followers_url":"https://api.github.com/users/arfon/followers","following_url":"https://api.github.com/users/arfon/following{/other_user}","gists_url":"https://api.github.com/users/arfon/gists{/gist_id}","starred_url":"https://api.github.com/users/arfon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arfon/subscriptions","organizations_url":"https://api.github.com/users/arfon/orgs","repos_url":"https://api.github.com/users/arfon/repos","events_url":"https://api.github.com/users/arfon/events{/privacy}","received_events_url":"https://api.github.com/users/arfon/received_events","type":"User","site_admin":true},"performed_via_github_app":null}' + http_version: + recorded_at: Mon, 15 Feb 2021 21:37:26 GMT +recorded_with: VCR 3.0.3 diff --git a/spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_percent_complete_value.yml b/spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_percent_complete_value.yml new file mode 100644 index 000000000..a7299d557 --- /dev/null +++ b/spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_percent_complete_value.yml @@ -0,0 +1,122 @@ +--- +http_interactions: +- request: + method: get + uri: https://api.github.com/repos/openjournals/joss-reviews/issues/79 + body: + encoding: US-ASCII + string: '' + headers: + Accept: + - application/vnd.github.v3+json + User-Agent: + - Octokit Ruby Gem 4.20.0 + Content-Type: + - application/json + response: + status: + code: 200 + message: + headers: + server: + - GitHub.com + date: + - Mon, 15 Feb 2021 21:38:10 GMT + content-type: + - application/json; charset=utf-8 + cache-control: + - public, max-age=60, s-maxage=60 + vary: + - Accept, Accept-Encoding, Accept, X-Requested-With + etag: + - W/"21cc626cd5b1f57e6789f6e1dc03d9214bafcc46a66dc67247a59360afc1dcdb" + last-modified: + - Mon, 15 Feb 2021 15:30:05 GMT + x-github-media-type: + - github.v3; format=json + access-control-expose-headers: + - ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, + X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, + X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset + access-control-allow-origin: + - "*" + strict-transport-security: + - max-age=31536000; includeSubdomains; preload + x-frame-options: + - deny + x-content-type-options: + - nosniff + x-xss-protection: + - 1; mode=block + referrer-policy: + - origin-when-cross-origin, strict-origin-when-cross-origin + content-security-policy: + - default-src 'none' + x-ratelimit-limit: + - '60' + x-ratelimit-remaining: + - '55' + x-ratelimit-reset: + - '1613425220' + x-ratelimit-used: + - '5' + accept-ranges: + - bytes + content-length: + - '2891' + x-github-request-id: + - C273:1A30:84ACF0E:9200497:602AE9C1 + body: + encoding: ASCII-8BIT + string: '{"url":"https://api.github.com/repos/openjournals/joss-reviews/issues/79","repository_url":"https://api.github.com/repos/openjournals/joss-reviews","labels_url":"https://api.github.com/repos/openjournals/joss-reviews/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/openjournals/joss-reviews/issues/79/comments","events_url":"https://api.github.com/repos/openjournals/joss-reviews/issues/79/events","html_url":"https://github.com/openjournals/joss-reviews/issues/79","id":178630651,"node_id":"MDU6SXNzdWUxNzg2MzA2NTE=","number":79,"title":"[REVIEW]: + Python Active-subspaces Utility Library","user":{"login":"whedon","id":18508068,"node_id":"MDQ6VXNlcjE4NTA4MDY4","avatar_url":"https://avatars.githubusercontent.com/u/18508068?v=4","gravatar_id":"","url":"https://api.github.com/users/whedon","html_url":"https://github.com/whedon","followers_url":"https://api.github.com/users/whedon/followers","following_url":"https://api.github.com/users/whedon/following{/other_user}","gists_url":"https://api.github.com/users/whedon/gists{/gist_id}","starred_url":"https://api.github.com/users/whedon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whedon/subscriptions","organizations_url":"https://api.github.com/users/whedon/orgs","repos_url":"https://api.github.com/users/whedon/repos","events_url":"https://api.github.com/users/whedon/events{/privacy}","received_events_url":"https://api.github.com/users/whedon/received_events","type":"User","site_admin":false},"labels":[{"id":330461591,"node_id":"MDU6TGFiZWwzMzA0NjE1OTE=","url":"https://api.github.com/repos/openjournals/joss-reviews/labels/accepted","name":"accepted","color":"159818","default":false,"description":null},{"id":1880544947,"node_id":"MDU6TGFiZWwxODgwNTQ0OTQ3","url":"https://api.github.com/repos/openjournals/joss-reviews/labels/published","name":"published","color":"e276d8","default":false,"description":"Papers + published in JOSS"},{"id":1880543836,"node_id":"MDU6TGFiZWwxODgwNTQzODM2","url":"https://api.github.com/repos/openjournals/joss-reviews/labels/recommend-accept","name":"recommend-accept","color":"b9f9a9","default":false,"description":"Papers + recommended for acceptance in JOSS."},{"id":330465313,"node_id":"MDU6TGFiZWwzMzA0NjUzMTM=","url":"https://api.github.com/repos/openjournals/joss-reviews/labels/review","name":"review","color":"fbca04","default":false,"description":null}],"state":"closed","locked":false,"assignee":{"login":"kyleniemeyer","id":190432,"node_id":"MDQ6VXNlcjE5MDQzMg==","avatar_url":"https://avatars.githubusercontent.com/u/190432?v=4","gravatar_id":"","url":"https://api.github.com/users/kyleniemeyer","html_url":"https://github.com/kyleniemeyer","followers_url":"https://api.github.com/users/kyleniemeyer/followers","following_url":"https://api.github.com/users/kyleniemeyer/following{/other_user}","gists_url":"https://api.github.com/users/kyleniemeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleniemeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleniemeyer/subscriptions","organizations_url":"https://api.github.com/users/kyleniemeyer/orgs","repos_url":"https://api.github.com/users/kyleniemeyer/repos","events_url":"https://api.github.com/users/kyleniemeyer/events{/privacy}","received_events_url":"https://api.github.com/users/kyleniemeyer/received_events","type":"User","site_admin":false},"assignees":[{"login":"kyleniemeyer","id":190432,"node_id":"MDQ6VXNlcjE5MDQzMg==","avatar_url":"https://avatars.githubusercontent.com/u/190432?v=4","gravatar_id":"","url":"https://api.github.com/users/kyleniemeyer","html_url":"https://github.com/kyleniemeyer","followers_url":"https://api.github.com/users/kyleniemeyer/followers","following_url":"https://api.github.com/users/kyleniemeyer/following{/other_user}","gists_url":"https://api.github.com/users/kyleniemeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleniemeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleniemeyer/subscriptions","organizations_url":"https://api.github.com/users/kyleniemeyer/orgs","repos_url":"https://api.github.com/users/kyleniemeyer/repos","events_url":"https://api.github.com/users/kyleniemeyer/events{/privacy}","received_events_url":"https://api.github.com/users/kyleniemeyer/received_events","type":"User","site_admin":false},{"login":"nicoguaro","id":1097787,"node_id":"MDQ6VXNlcjEwOTc3ODc=","avatar_url":"https://avatars.githubusercontent.com/u/1097787?v=4","gravatar_id":"","url":"https://api.github.com/users/nicoguaro","html_url":"https://github.com/nicoguaro","followers_url":"https://api.github.com/users/nicoguaro/followers","following_url":"https://api.github.com/users/nicoguaro/following{/other_user}","gists_url":"https://api.github.com/users/nicoguaro/gists{/gist_id}","starred_url":"https://api.github.com/users/nicoguaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicoguaro/subscriptions","organizations_url":"https://api.github.com/users/nicoguaro/orgs","repos_url":"https://api.github.com/users/nicoguaro/repos","events_url":"https://api.github.com/users/nicoguaro/events{/privacy}","received_events_url":"https://api.github.com/users/nicoguaro/received_events","type":"User","site_admin":false},{"login":"mtezzele","id":8956946,"node_id":"MDQ6VXNlcjg5NTY5NDY=","avatar_url":"https://avatars.githubusercontent.com/u/8956946?v=4","gravatar_id":"","url":"https://api.github.com/users/mtezzele","html_url":"https://github.com/mtezzele","followers_url":"https://api.github.com/users/mtezzele/followers","following_url":"https://api.github.com/users/mtezzele/following{/other_user}","gists_url":"https://api.github.com/users/mtezzele/gists{/gist_id}","starred_url":"https://api.github.com/users/mtezzele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtezzele/subscriptions","organizations_url":"https://api.github.com/users/mtezzele/orgs","repos_url":"https://api.github.com/users/mtezzele/repos","events_url":"https://api.github.com/users/mtezzele/events{/privacy}","received_events_url":"https://api.github.com/users/mtezzele/received_events","type":"User","site_admin":false}],"milestone":null,"comments":28,"created_at":"2016-09-22T14:46:47Z","updated_at":"2021-02-14T16:46:54Z","closed_at":"2016-09-29T19:17:28Z","author_association":"COLLABORATOR","active_lock_reason":null,"body":"**Submitting + author:** @paulcon (Paul + Constantine)\n**Repository:** https://github.com/paulcon/active_subspaces\n**Version:** + v 0.1\n**Editor:** @kyleniemeyer\n**Reviewer:** @mtezzele\n**Archive:** 10.5281/zenodo.158941\n## + Status\n\n[![status](http://joss.theoj.org/papers/a598bac0d7456ff4f94967c25ada0c0a/status.svg)](http://joss.theoj.org/papers/a598bac0d7456ff4f94967c25ada0c0a)\n\nStatus + badge code:\n\n```\nHTML: \nMarkdown: + [![status](http://joss.theoj.org/papers/a598bac0d7456ff4f94967c25ada0c0a/status.svg)](http://joss.theoj.org/papers/a598bac0d7456ff4f94967c25ada0c0a)\n```\n\n**Reviewers + and authors**:\n\nPlease avoid lengthy details of difficulties in the review + thread. Instead, please create a new issue in the target repository and link to those issues (especially + acceptance-blockers) in the review thread below. (For completists: if the + target issue tracker is also on GitHub, linking the review thread in the issue + or vice versa will create corresponding breadcrumb trails in the link target.)\n## + Reviewer questions\n### Conflict of interest\n- [x] As the reviewer I confirm + that there are no conflicts of interest for me to review this work (such as + being a major contributor to the software).\n### General checks\n- [x] **Repository:** + Is the source code for this software available at the repository url?\n- + [x] **License:** Does the repository contain a plain-text LICENSE file with + the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) + software license?\n- [x] **Version:** Does the release version given match + the GitHub release (v 0.1)?\n### Functionality\n- [x] **Installation:** Does + installation proceed as outlined in the documentation?\n- [x] **Functionality:** + Have the functional claims of the software been confirmed?\n- [x] **Performance:** + Have any performance claims of the software been confirmed?\n### Documentation\n- + [x] **A statement of need:** Do the authors clearly state what problems the + software is designed to solve and who the target audience is?\n- [x] **Installation + instructions:** Is there a clearly-stated list of dependencies? Ideally these + should be handled with an automated package management solution.\n- [x] **Example + usage:** Do the authors include examples of how to use the software (ideally + to solve real-world analysis problems).\n- [x] **Functionality documentation:** + Is the core functionality of the software documented to a satisfactory level + (e.g. API method documentation)?\n- [x] **Automated tests:** Are there automated + tests or manual steps described so that the function of the software can be + verified?\n- [ ] **Community guidelines:** Are there clear guidelines for + third parties wishing to 1) Contribute to the software 2) Report issues or + problems with the software 3) Seek support\n### Software paper\n\nPaper PDF: + [10.21105.joss.00079.pdf](https://github.com/openjournals/joss-reviews/files/487592/10.21105.joss.00079.pdf)\n- + [x] **Authors:** Does the `paper.md` file include a list of authors with their + affiliations?\n- [x] **A statement of need:** Do the authors clearly state + what problems the software is designed to solve and who the target audience + is?\n- [x] **References:** Do all archival references that should have a DOI + list one (e.g. papers, datasets, software)?\n","closed_by":{"login":"arfon","id":4483,"node_id":"MDQ6VXNlcjQ0ODM=","avatar_url":"https://avatars.githubusercontent.com/u/4483?v=4","gravatar_id":"","url":"https://api.github.com/users/arfon","html_url":"https://github.com/arfon","followers_url":"https://api.github.com/users/arfon/followers","following_url":"https://api.github.com/users/arfon/following{/other_user}","gists_url":"https://api.github.com/users/arfon/gists{/gist_id}","starred_url":"https://api.github.com/users/arfon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arfon/subscriptions","organizations_url":"https://api.github.com/users/arfon/orgs","repos_url":"https://api.github.com/users/arfon/repos","events_url":"https://api.github.com/users/arfon/events{/privacy}","received_events_url":"https://api.github.com/users/arfon/received_events","type":"User","site_admin":true},"performed_via_github_app":null}' + http_version: + recorded_at: Mon, 15 Feb 2021 21:38:10 GMT +recorded_with: VCR 3.0.3 diff --git a/spec/fixtures/editor-pre-review-comment.json b/spec/fixtures/editor-pre-review-comment.json index f5293a88d..860565fc8 100644 --- a/spec/fixtures/editor-pre-review-comment.json +++ b/spec/fixtures/editor-pre-review-comment.json @@ -1,12 +1,12 @@ { "action": "created", "issue": { - "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/78", - "repository_url": "https://api.github.com/repos/openjournals/joss-reviews-testing", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/78/labels{/name}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/78/comments", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/78/events", - "html_url": "https://github.com/openjournals/joss-reviews-testing/issues/78", + "url": "https://api.github.com/repos/openjournals/joss-reviews/issues/78", + "repository_url": "https://api.github.com/repos/openjournals/joss-reviews", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/78/labels{/name}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/78/comments", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/78/events", + "html_url": "https://github.com/openjournals/joss-reviews/issues/78", "id": 365218525, "node_id": "MDU6SXNzdWUzNjUyMTg1MjU=", "number": 78, @@ -49,9 +49,9 @@ "body": "**Submitting author:** @editor (Robert Gieseke)\r\n**Repository:** https://github.com/editor/fidgit\r\n**Version:** v1.0.1\r\n**Editor:** @editor\r\n**Reviewers:** @Robot\r\n\r\n**Author instructions**\r\n\r\nThanks for submitting your paper to JOSS @rgieseke. The JOSS editor (shown at the top of this issue) will work with you on this issue to find a reviewer for your submission before creating the main review issue.\r\n\r\n@rgieseke if you have any suggestions for potential reviewers then please mention them here in this thread. In addition, [this list of people](https://github.com/openjournals/joss/blob/master/docs/reviewers.csv) have already agreed to review for JOSS and may be suitable for this submission.\r\n\r\n**Editor instructions**\r\n\r\nThe JOSS submission bot @whedon is here to help you find and assign reviewers and start the main review. To find out what @whedon can do for you type:\r\n\r\n```\r\n@whedon commands\r\n```\r\n\r\n " }, "comment": { - "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/comments/425715160", - "html_url": "https://github.com/openjournals/joss-reviews-testing/issues/78#issuecomment-425715160", - "issue_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/78", + "url": "https://api.github.com/repos/openjournals/joss-reviews/issues/comments/425715160", + "html_url": "https://github.com/openjournals/joss-reviews/issues/78#issuecomment-425715160", + "issue_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/78", "id": 425715160, "node_id": "MDEyOklzc3VlQ29tbWVudDQyNTcxNTE2MA==", "user": { @@ -82,8 +82,8 @@ "repository": { "id": 59520368, "node_id": "MDEwOlJlcG9zaXRvcnk1OTUyMDM2OA==", - "name": "joss-reviews-testing", - "full_name": "openjournals/joss-reviews-testing", + "name": "joss-reviews", + "full_name": "openjournals/joss-reviews", "private": true, "owner": { "login": "openjournals", @@ -105,53 +105,53 @@ "type": "Organization", "site_admin": false }, - "html_url": "https://github.com/openjournals/joss-reviews-testing", + "html_url": "https://github.com/openjournals/joss-reviews", "description": null, "fork": false, - "url": "https://api.github.com/repos/openjournals/joss-reviews-testing", - "forks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/forks", - "keys_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/teams", - "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/hooks", - "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/events{/number}", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/events", - "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/assignees{/user}", - "branches_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/branches{/branch}", - "tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/tags", - "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/statuses/{sha}", - "languages_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/languages", - "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/stargazers", - "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contributors", - "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscribers", - "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscription", - "commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contents/{+path}", - "compare_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/merges", - "archive_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/downloads", - "issues_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues{/number}", - "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/pulls{/number}", - "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/milestones{/number}", - "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/labels{/name}", - "releases_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/releases{/id}", - "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/deployments", + "url": "https://api.github.com/repos/openjournals/joss-reviews", + "forks_url": "https://api.github.com/repos/openjournals/joss-reviews/forks", + "keys_url": "https://api.github.com/repos/openjournals/joss-reviews/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/openjournals/joss-reviews/teams", + "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews/hooks", + "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/events{/number}", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews/events", + "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews/assignees{/user}", + "branches_url": "https://api.github.com/repos/openjournals/joss-reviews/branches{/branch}", + "tags_url": "https://api.github.com/repos/openjournals/joss-reviews/tags", + "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/openjournals/joss-reviews/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews/statuses/{sha}", + "languages_url": "https://api.github.com/repos/openjournals/joss-reviews/languages", + "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews/stargazers", + "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews/contributors", + "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews/subscribers", + "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews/subscription", + "commits_url": "https://api.github.com/repos/openjournals/joss-reviews/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/openjournals/joss-reviews/contents/{+path}", + "compare_url": "https://api.github.com/repos/openjournals/joss-reviews/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/openjournals/joss-reviews/merges", + "archive_url": "https://api.github.com/repos/openjournals/joss-reviews/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews/downloads", + "issues_url": "https://api.github.com/repos/openjournals/joss-reviews/issues{/number}", + "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews/pulls{/number}", + "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews/milestones{/number}", + "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/labels{/name}", + "releases_url": "https://api.github.com/repos/openjournals/joss-reviews/releases{/id}", + "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews/deployments", "created_at": "2016-05-23T21:43:02Z", "updated_at": "2017-11-13T19:56:15Z", "pushed_at": "2018-09-09T21:24:53Z", - "git_url": "git://github.com/openjournals/joss-reviews-testing.git", - "ssh_url": "git@github.com:openjournals/joss-reviews-testing.git", - "clone_url": "https://github.com/openjournals/joss-reviews-testing.git", - "svn_url": "https://github.com/openjournals/joss-reviews-testing", + "git_url": "git://github.com/openjournals/joss-reviews.git", + "ssh_url": "git@github.com:openjournals/joss-reviews.git", + "clone_url": "https://github.com/openjournals/joss-reviews.git", + "svn_url": "https://github.com/openjournals/joss-reviews", "homepage": null, "size": 3, "stargazers_count": 0, diff --git a/spec/fixtures/editor-review-comment.json b/spec/fixtures/editor-review-comment.json index 3fe74d2af..b47a30a21 100644 --- a/spec/fixtures/editor-review-comment.json +++ b/spec/fixtures/editor-review-comment.json @@ -1,12 +1,12 @@ { "action": "created", "issue": { - "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79", - "repository_url": "https://api.github.com/repos/openjournals/joss-reviews-testing", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/labels{/name}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/comments", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/events", - "html_url": "https://github.com/openjournals/joss-reviews-testing/issues/79", + "url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79", + "repository_url": "https://api.github.com/repos/openjournals/joss-reviews", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/labels{/name}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/comments", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/events", + "html_url": "https://github.com/openjournals/joss-reviews/issues/79", "id": 365218525, "node_id": "MDU6SXNzdWUzNjUyMTg1MjU=", "number": 79, @@ -49,9 +49,9 @@ "body": "**Submitting author:** @editor (Robert Gieseke)\r\n**Repository:** https://github.com/editor/fidgit\r\n**Version:** v1.0.1\r\n**Editor:** @editor\r\n**Reviewers:** @Robot\r\n\r\n**Author instructions**\r\n\r\nThanks for submitting your paper to JOSS @rgieseke. The JOSS editor (shown at the top of this issue) will work with you on this issue to find a reviewer for your submission before creating the main review issue.\r\n\r\n@rgieseke if you have any suggestions for potential reviewers then please mention them here in this thread. In addition, [this list of people](https://github.com/openjournals/joss/blob/master/docs/reviewers.csv) have already agreed to review for JOSS and may be suitable for this submission.\r\n\r\n**Editor instructions**\r\n\r\nThe JOSS submission bot @whedon is here to help you find and assign reviewers and start the main review. To find out what @whedon can do for you type:\r\n\r\n```\r\n@whedon commands\r\n```\r\n\r\n " }, "comment": { - "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/comments/425715160", - "html_url": "https://github.com/openjournals/joss-reviews-testing/issues/79#issuecomment-425715160", - "issue_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79", + "url": "https://api.github.com/repos/openjournals/joss-reviews/issues/comments/425715160", + "html_url": "https://github.com/openjournals/joss-reviews/issues/79#issuecomment-425715160", + "issue_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79", "id": 425715160, "node_id": "MDEyOklzc3VlQ29tbWVudDQyNTcxNTE2MA==", "user": { @@ -82,8 +82,8 @@ "repository": { "id": 59520368, "node_id": "MDEwOlJlcG9zaXRvcnk1OTUyMDM2OA==", - "name": "joss-reviews-testing", - "full_name": "openjournals/joss-reviews-testing", + "name": "joss-reviews", + "full_name": "openjournals/joss-reviews", "private": true, "owner": { "login": "openjournals", @@ -105,53 +105,53 @@ "type": "Organization", "site_admin": false }, - "html_url": "https://github.com/openjournals/joss-reviews-testing", + "html_url": "https://github.com/openjournals/joss-reviews", "description": null, "fork": false, - "url": "https://api.github.com/repos/openjournals/joss-reviews-testing", - "forks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/forks", - "keys_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/teams", - "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/hooks", - "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/events{/number}", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/events", - "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/assignees{/user}", - "branches_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/branches{/branch}", - "tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/tags", - "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/statuses/{sha}", - "languages_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/languages", - "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/stargazers", - "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contributors", - "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscribers", - "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscription", - "commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contents/{+path}", - "compare_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/merges", - "archive_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/downloads", - "issues_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues{/number}", - "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/pulls{/number}", - "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/milestones{/number}", - "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/labels{/name}", - "releases_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/releases{/id}", - "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/deployments", + "url": "https://api.github.com/repos/openjournals/joss-reviews", + "forks_url": "https://api.github.com/repos/openjournals/joss-reviews/forks", + "keys_url": "https://api.github.com/repos/openjournals/joss-reviews/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/openjournals/joss-reviews/teams", + "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews/hooks", + "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/events{/number}", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews/events", + "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews/assignees{/user}", + "branches_url": "https://api.github.com/repos/openjournals/joss-reviews/branches{/branch}", + "tags_url": "https://api.github.com/repos/openjournals/joss-reviews/tags", + "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/openjournals/joss-reviews/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews/statuses/{sha}", + "languages_url": "https://api.github.com/repos/openjournals/joss-reviews/languages", + "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews/stargazers", + "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews/contributors", + "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews/subscribers", + "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews/subscription", + "commits_url": "https://api.github.com/repos/openjournals/joss-reviews/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/openjournals/joss-reviews/contents/{+path}", + "compare_url": "https://api.github.com/repos/openjournals/joss-reviews/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/openjournals/joss-reviews/merges", + "archive_url": "https://api.github.com/repos/openjournals/joss-reviews/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews/downloads", + "issues_url": "https://api.github.com/repos/openjournals/joss-reviews/issues{/number}", + "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews/pulls{/number}", + "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews/milestones{/number}", + "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/labels{/name}", + "releases_url": "https://api.github.com/repos/openjournals/joss-reviews/releases{/id}", + "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews/deployments", "created_at": "2016-05-23T21:43:02Z", "updated_at": "2017-11-13T19:56:15Z", "pushed_at": "2018-09-09T21:24:53Z", - "git_url": "git://github.com/openjournals/joss-reviews-testing.git", - "ssh_url": "git@github.com:openjournals/joss-reviews-testing.git", - "clone_url": "https://github.com/openjournals/joss-reviews-testing.git", - "svn_url": "https://github.com/openjournals/joss-reviews-testing", + "git_url": "git://github.com/openjournals/joss-reviews.git", + "ssh_url": "git@github.com:openjournals/joss-reviews.git", + "clone_url": "https://github.com/openjournals/joss-reviews.git", + "svn_url": "https://github.com/openjournals/joss-reviews", "homepage": null, "size": 3, "stargazers_count": 0, diff --git a/spec/fixtures/whedon-pre-review-comment.json b/spec/fixtures/whedon-pre-review-comment.json index 1b3241774..24bfb8669 100644 --- a/spec/fixtures/whedon-pre-review-comment.json +++ b/spec/fixtures/whedon-pre-review-comment.json @@ -1,12 +1,12 @@ { "action": "created", "issue": { - "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/78", - "repository_url": "https://api.github.com/repos/openjournals/joss-reviews-testing", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/78/labels{/name}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/78/comments", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/78/events", - "html_url": "https://github.com/openjournals/joss-reviews-testing/issues/78", + "url": "https://api.github.com/repos/openjournals/joss-reviews/issues/78", + "repository_url": "https://api.github.com/repos/openjournals/joss-reviews", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/78/labels{/name}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/78/comments", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/78/events", + "html_url": "https://github.com/openjournals/joss-reviews/issues/78", "id": 365218525, "node_id": "MDU6SXNzdWUzNjUyMTg1MjU=", "number": 78, @@ -49,9 +49,9 @@ "body": "**Submitting author:** @arfon (Robert Gieseke)\r\n**Repository:** https://github.com/arfon/fidgit\r\n**Version:** v1.0.1\r\n**Editor:** @arfon\r\n**Reviewers:** @Robot\r\n\r\n**Author instructions**\r\n\r\nThanks for submitting your paper to JOSS @rgieseke. The JOSS editor (shown at the top of this issue) will work with you on this issue to find a reviewer for your submission before creating the main review issue.\r\n\r\n@rgieseke if you have any suggestions for potential reviewers then please mention them here in this thread. In addition, [this list of people](https://github.com/openjournals/joss/blob/master/docs/reviewers.csv) have already agreed to review for JOSS and may be suitable for this submission.\r\n\r\n**Editor instructions**\r\n\r\nThe JOSS submission bot @whedon is here to help you find and assign reviewers and start the main review. To find out what @whedon can do for you type:\r\n\r\n```\r\n@whedon commands\r\n```\r\n\r\n " }, "comment": { - "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/comments/425715160", - "html_url": "https://github.com/openjournals/joss-reviews-testing/issues/78#issuecomment-425715160", - "issue_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/78", + "url": "https://api.github.com/repos/openjournals/joss-reviews/issues/comments/425715160", + "html_url": "https://github.com/openjournals/joss-reviews/issues/78#issuecomment-425715160", + "issue_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/78", "id": 425715160, "node_id": "MDEyOklzc3VlQ29tbWVudDQyNTcxNTE2MA==", "user": { @@ -82,8 +82,8 @@ "repository": { "id": 59520368, "node_id": "MDEwOlJlcG9zaXRvcnk1OTUyMDM2OA==", - "name": "joss-reviews-testing", - "full_name": "openjournals/joss-reviews-testing", + "name": "joss-reviews", + "full_name": "openjournals/joss-reviews", "private": true, "owner": { "login": "openjournals", @@ -105,53 +105,53 @@ "type": "Organization", "site_admin": false }, - "html_url": "https://github.com/openjournals/joss-reviews-testing", + "html_url": "https://github.com/openjournals/joss-reviews", "description": null, "fork": false, - "url": "https://api.github.com/repos/openjournals/joss-reviews-testing", - "forks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/forks", - "keys_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/teams", - "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/hooks", - "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/events{/number}", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/events", - "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/assignees{/user}", - "branches_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/branches{/branch}", - "tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/tags", - "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/statuses/{sha}", - "languages_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/languages", - "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/stargazers", - "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contributors", - "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscribers", - "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscription", - "commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contents/{+path}", - "compare_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/merges", - "archive_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/downloads", - "issues_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues{/number}", - "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/pulls{/number}", - "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/milestones{/number}", - "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/labels{/name}", - "releases_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/releases{/id}", - "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/deployments", + "url": "https://api.github.com/repos/openjournals/joss-reviews", + "forks_url": "https://api.github.com/repos/openjournals/joss-reviews/forks", + "keys_url": "https://api.github.com/repos/openjournals/joss-reviews/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/openjournals/joss-reviews/teams", + "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews/hooks", + "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/events{/number}", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews/events", + "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews/assignees{/user}", + "branches_url": "https://api.github.com/repos/openjournals/joss-reviews/branches{/branch}", + "tags_url": "https://api.github.com/repos/openjournals/joss-reviews/tags", + "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/openjournals/joss-reviews/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews/statuses/{sha}", + "languages_url": "https://api.github.com/repos/openjournals/joss-reviews/languages", + "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews/stargazers", + "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews/contributors", + "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews/subscribers", + "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews/subscription", + "commits_url": "https://api.github.com/repos/openjournals/joss-reviews/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/openjournals/joss-reviews/contents/{+path}", + "compare_url": "https://api.github.com/repos/openjournals/joss-reviews/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/openjournals/joss-reviews/merges", + "archive_url": "https://api.github.com/repos/openjournals/joss-reviews/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews/downloads", + "issues_url": "https://api.github.com/repos/openjournals/joss-reviews/issues{/number}", + "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews/pulls{/number}", + "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews/milestones{/number}", + "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/labels{/name}", + "releases_url": "https://api.github.com/repos/openjournals/joss-reviews/releases{/id}", + "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews/deployments", "created_at": "2016-05-23T21:43:02Z", "updated_at": "2017-11-13T19:56:15Z", "pushed_at": "2018-09-09T21:24:53Z", - "git_url": "git://github.com/openjournals/joss-reviews-testing.git", - "ssh_url": "git@github.com:openjournals/joss-reviews-testing.git", - "clone_url": "https://github.com/openjournals/joss-reviews-testing.git", - "svn_url": "https://github.com/openjournals/joss-reviews-testing", + "git_url": "git://github.com/openjournals/joss-reviews.git", + "ssh_url": "git@github.com:openjournals/joss-reviews.git", + "clone_url": "https://github.com/openjournals/joss-reviews.git", + "svn_url": "https://github.com/openjournals/joss-reviews", "homepage": null, "size": 3, "stargazers_count": 0, diff --git a/spec/fixtures/whedon-pre-review-opened.json b/spec/fixtures/whedon-pre-review-opened.json index 85a21d4a6..0a5949b2f 100644 --- a/spec/fixtures/whedon-pre-review-opened.json +++ b/spec/fixtures/whedon-pre-review-opened.json @@ -1,12 +1,12 @@ { "action": "opened", "issue": { - "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/78", - "repository_url": "https://api.github.com/repos/openjournals/joss-reviews-testing", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/78/labels{/name}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/78/comments", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/78/events", - "html_url": "https://github.com/openjournals/joss-reviews-testing/issues/78", + "url": "https://api.github.com/repos/openjournals/joss-reviews/issues/78", + "repository_url": "https://api.github.com/repos/openjournals/joss-reviews", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/78/labels{/name}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/78/comments", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/78/events", + "html_url": "https://github.com/openjournals/joss-reviews/issues/78", "id": 365218525, "node_id": "MDU6SXNzdWUzNjUyMTg1MjU=", "number": 78, @@ -51,8 +51,8 @@ "repository": { "id": 59520368, "node_id": "MDEwOlJlcG9zaXRvcnk1OTUyMDM2OA==", - "name": "joss-reviews-testing", - "full_name": "openjournals/joss-reviews-testing", + "name": "joss-reviews", + "full_name": "openjournals/joss-reviews", "private": true, "owner": { "login": "openjournals", @@ -74,53 +74,53 @@ "type": "Organization", "site_admin": false }, - "html_url": "https://github.com/openjournals/joss-reviews-testing", + "html_url": "https://github.com/openjournals/joss-reviews", "description": null, "fork": false, - "url": "https://api.github.com/repos/openjournals/joss-reviews-testing", - "forks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/forks", - "keys_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/teams", - "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/hooks", - "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/events{/number}", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/events", - "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/assignees{/user}", - "branches_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/branches{/branch}", - "tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/tags", - "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/statuses/{sha}", - "languages_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/languages", - "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/stargazers", - "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contributors", - "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscribers", - "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscription", - "commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contents/{+path}", - "compare_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/merges", - "archive_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/downloads", - "issues_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues{/number}", - "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/pulls{/number}", - "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/milestones{/number}", - "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/labels{/name}", - "releases_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/releases{/id}", - "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/deployments", + "url": "https://api.github.com/repos/openjournals/joss-reviews", + "forks_url": "https://api.github.com/repos/openjournals/joss-reviews/forks", + "keys_url": "https://api.github.com/repos/openjournals/joss-reviews/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/openjournals/joss-reviews/teams", + "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews/hooks", + "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/events{/number}", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews/events", + "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews/assignees{/user}", + "branches_url": "https://api.github.com/repos/openjournals/joss-reviews/branches{/branch}", + "tags_url": "https://api.github.com/repos/openjournals/joss-reviews/tags", + "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/openjournals/joss-reviews/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews/statuses/{sha}", + "languages_url": "https://api.github.com/repos/openjournals/joss-reviews/languages", + "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews/stargazers", + "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews/contributors", + "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews/subscribers", + "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews/subscription", + "commits_url": "https://api.github.com/repos/openjournals/joss-reviews/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/openjournals/joss-reviews/contents/{+path}", + "compare_url": "https://api.github.com/repos/openjournals/joss-reviews/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/openjournals/joss-reviews/merges", + "archive_url": "https://api.github.com/repos/openjournals/joss-reviews/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews/downloads", + "issues_url": "https://api.github.com/repos/openjournals/joss-reviews/issues{/number}", + "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews/pulls{/number}", + "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews/milestones{/number}", + "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/labels{/name}", + "releases_url": "https://api.github.com/repos/openjournals/joss-reviews/releases{/id}", + "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews/deployments", "created_at": "2016-05-23T21:43:02Z", "updated_at": "2017-11-13T19:56:15Z", "pushed_at": "2018-09-09T21:24:53Z", - "git_url": "git://github.com/openjournals/joss-reviews-testing.git", - "ssh_url": "git@github.com:openjournals/joss-reviews-testing.git", - "clone_url": "https://github.com/openjournals/joss-reviews-testing.git", - "svn_url": "https://github.com/openjournals/joss-reviews-testing", + "git_url": "git://github.com/openjournals/joss-reviews.git", + "ssh_url": "git@github.com:openjournals/joss-reviews.git", + "clone_url": "https://github.com/openjournals/joss-reviews.git", + "svn_url": "https://github.com/openjournals/joss-reviews", "homepage": null, "size": 3, "stargazers_count": 0, diff --git a/spec/fixtures/whedon-review-comment.json b/spec/fixtures/whedon-review-comment.json index 170e50563..7d32355ba 100644 --- a/spec/fixtures/whedon-review-comment.json +++ b/spec/fixtures/whedon-review-comment.json @@ -1,12 +1,12 @@ { "action": "created", "issue": { - "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79", - "repository_url": "https://api.github.com/repos/openjournals/joss-reviews-testing", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/labels{/name}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/comments", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/events", - "html_url": "https://github.com/openjournals/joss-reviews-testing/issues/79", + "url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79", + "repository_url": "https://api.github.com/repos/openjournals/joss-reviews", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/labels{/name}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/comments", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/events", + "html_url": "https://github.com/openjournals/joss-reviews/issues/79", "id": 365218525, "node_id": "MDU6SXNzdWUzNjUyMTg1MjU=", "number": 79, @@ -49,9 +49,9 @@ "body": "**Submitting author:** @arfon (Robert Gieseke)\r\n**Repository:** https://github.com/arfon/fidgit\r\n**Version:** v1.0.1\r\n**Editor:** @arfon\r\n**Reviewers:** @Robot\r\n\r\n**Author instructions**\r\n\r\nThanks for submitting your paper to JOSS @rgieseke. The JOSS editor (shown at the top of this issue) will work with you on this issue to find a reviewer for your submission before creating the main review issue.\r\n\r\n@rgieseke if you have any suggestions for potential reviewers then please mention them here in this thread. In addition, [this list of people](https://github.com/openjournals/joss/blob/master/docs/reviewers.csv) have already agreed to review for JOSS and may be suitable for this submission.\r\n\r\n**Editor instructions**\r\n\r\nThe JOSS submission bot @whedon is here to help you find and assign reviewers and start the main review. To find out what @whedon can do for you type:\r\n\r\n```\r\n@whedon commands\r\n```\r\n\r\n " }, "comment": { - "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/comments/425715160", - "html_url": "https://github.com/openjournals/joss-reviews-testing/issues/79#issuecomment-425715160", - "issue_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79", + "url": "https://api.github.com/repos/openjournals/joss-reviews/issues/comments/425715160", + "html_url": "https://github.com/openjournals/joss-reviews/issues/79#issuecomment-425715160", + "issue_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79", "id": 425715160, "node_id": "MDEyOklzc3VlQ29tbWVudDQyNTcxNTE2MA==", "user": { @@ -82,8 +82,8 @@ "repository": { "id": 59520368, "node_id": "MDEwOlJlcG9zaXRvcnk1OTUyMDM2OA==", - "name": "joss-reviews-testing", - "full_name": "openjournals/joss-reviews-testing", + "name": "joss-reviews", + "full_name": "openjournals/joss-reviews", "private": true, "owner": { "login": "openjournals", @@ -105,53 +105,53 @@ "type": "Organization", "site_admin": false }, - "html_url": "https://github.com/openjournals/joss-reviews-testing", + "html_url": "https://github.com/openjournals/joss-reviews", "description": null, "fork": false, - "url": "https://api.github.com/repos/openjournals/joss-reviews-testing", - "forks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/forks", - "keys_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/teams", - "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/hooks", - "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/events{/number}", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/events", - "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/assignees{/user}", - "branches_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/branches{/branch}", - "tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/tags", - "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/statuses/{sha}", - "languages_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/languages", - "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/stargazers", - "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contributors", - "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscribers", - "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscription", - "commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contents/{+path}", - "compare_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/merges", - "archive_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/downloads", - "issues_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues{/number}", - "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/pulls{/number}", - "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/milestones{/number}", - "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/labels{/name}", - "releases_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/releases{/id}", - "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/deployments", + "url": "https://api.github.com/repos/openjournals/joss-reviews", + "forks_url": "https://api.github.com/repos/openjournals/joss-reviews/forks", + "keys_url": "https://api.github.com/repos/openjournals/joss-reviews/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/openjournals/joss-reviews/teams", + "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews/hooks", + "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/events{/number}", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews/events", + "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews/assignees{/user}", + "branches_url": "https://api.github.com/repos/openjournals/joss-reviews/branches{/branch}", + "tags_url": "https://api.github.com/repos/openjournals/joss-reviews/tags", + "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/openjournals/joss-reviews/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews/statuses/{sha}", + "languages_url": "https://api.github.com/repos/openjournals/joss-reviews/languages", + "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews/stargazers", + "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews/contributors", + "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews/subscribers", + "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews/subscription", + "commits_url": "https://api.github.com/repos/openjournals/joss-reviews/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/openjournals/joss-reviews/contents/{+path}", + "compare_url": "https://api.github.com/repos/openjournals/joss-reviews/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/openjournals/joss-reviews/merges", + "archive_url": "https://api.github.com/repos/openjournals/joss-reviews/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews/downloads", + "issues_url": "https://api.github.com/repos/openjournals/joss-reviews/issues{/number}", + "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews/pulls{/number}", + "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews/milestones{/number}", + "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/labels{/name}", + "releases_url": "https://api.github.com/repos/openjournals/joss-reviews/releases{/id}", + "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews/deployments", "created_at": "2016-05-23T21:43:02Z", "updated_at": "2017-11-13T19:56:15Z", "pushed_at": "2018-09-09T21:24:53Z", - "git_url": "git://github.com/openjournals/joss-reviews-testing.git", - "ssh_url": "git@github.com:openjournals/joss-reviews-testing.git", - "clone_url": "https://github.com/openjournals/joss-reviews-testing.git", - "svn_url": "https://github.com/openjournals/joss-reviews-testing", + "git_url": "git://github.com/openjournals/joss-reviews.git", + "ssh_url": "git@github.com:openjournals/joss-reviews.git", + "clone_url": "https://github.com/openjournals/joss-reviews.git", + "svn_url": "https://github.com/openjournals/joss-reviews", "homepage": null, "size": 3, "stargazers_count": 0, diff --git a/spec/fixtures/whedon-review-edit.json b/spec/fixtures/whedon-review-edit.json index 1008789a4..154e30cdf 100644 --- a/spec/fixtures/whedon-review-edit.json +++ b/spec/fixtures/whedon-review-edit.json @@ -1,12 +1,12 @@ { "action": "edited", "issue": { - "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79", - "repository_url": "https://api.github.com/repos/openjournals/joss-reviews-testing", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/labels{/name}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/comments", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/events", - "html_url": "https://github.com/openjournals/joss-reviews-testing/issues/79", + "url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79", + "repository_url": "https://api.github.com/repos/openjournals/joss-reviews", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/labels{/name}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/comments", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/events", + "html_url": "https://github.com/openjournals/joss-reviews/issues/79", "id": 365232709, "node_id": "MDU6SXNzdWUzNjUyMzI3MDk=", "number": 79, @@ -35,7 +35,7 @@ { "id": 330465313, "node_id": "MDU6TGFiZWwzMzA0NjUzMTM=", - "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/labels/review", + "url": "https://api.github.com/repos/openjournals/joss-reviews/labels/review", "name": "review", "color": "fbca04", "default": false @@ -91,18 +91,18 @@ "updated_at": "2018-10-06T16:18:56Z", "closed_at": null, "author_association": "COLLABORATOR", - "body": "**Submitting author:** @ifellows (Ian Fellows)\n**Repository:** https://github.com/fellstat/ipc\n**Version:** 0.1.0\n**Editor:** @yochannah\n**Reviewer:** @mschubert , @JohnCoene\n**Archive:** Pending\n\n## Status\n\n[![status](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230/status.svg)](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230)\n\nStatus badge code:\n\n```\nHTML: \nMarkdown: [![status](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230/status.svg)](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230)\n```\n**Reviewers and authors**:\n\nPlease avoid lengthy details of difficulties in the review thread. Instead, please create a new issue in the target repository and link to those issues (especially acceptance-blockers) in the review thread below. (For completists: if the target issue tracker is also on GitHub, linking the review thread in the issue or vice versa will create corresponding breadcrumb trails in the link target.)\n\n## Reviewer instructions & questions\n\n@mschubert & @JohnCoene, please carry out your review in this issue by updating the checklist below. If you cannot edit the checklist please:\n1. Make sure you're logged in to your GitHub account\n2. Be sure to accept the invite at this URL: https://github.com/openjournals/joss-reviews-testing/invitations\n\nThe reviewer guidelines are available here: https://joss.theoj.org/about#reviewer_guidelines. Any questions/concerns please let @yochannah know.\n\n✨ **Please try and complete your review in the next two weeks** ✨ \n\n## Review checklist for @mschubert \n### Conflict of interest\n\n- [x] As the reviewer I confirm that I have read the [JOSS conflict of interest policy](https://github.com/openjournals/joss/blob/master/COI.md) and that there are no conflicts of interest for me to review this work.\n\n### Code of Conduct\n\n- [x] I confirm that I read and will adhere to the [JOSS code of conduct](https://joss.theoj.org/about#code_of_conduct).\n\n### General checks\n\n- [x] **Repository:** Is the source code for this software available at the repository url?\n- [ ] **License:** Does the repository contain a plain-text LICENSE file with the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) software license?\n- [ ] **Version:** Does the release version given match the GitHub release (0.1.0)?\n- [x] **Authorship:** Has the submitting author (@ifellows) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?\n\n### Functionality\n\n- [x] **Installation:** Does installation proceed as outlined in the documentation?\n- [x] **Functionality:** Have the functional claims of the software been confirmed?\n- [ ] **Performance:** If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)\n\n### Documentation\n\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.\n- [x] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).\n- [x] **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?\n- [ ] **Automated tests:** Are there automated tests or manual steps described so that the function of the software can be verified?\n- [ ] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\n\n### Software paper\n\n- [ ] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [ ] **References:** Do all archival references that should have a DOI list one (e.g., papers, datasets, software)?\n\n## Review checklist for @JohnCoene\n### Conflict of interest\n\n- [x] As the reviewer I confirm that I have read the [JOSS conflict of interest policy](https://github.com/openjournals/joss/blob/master/COI.md) and that there are no conflicts of interest for me to review this work.\n\n### Code of Conduct\n\n- [x] I confirm that I read and will adhere to the [JOSS code of conduct](https://joss.theoj.org/about#code_of_conduct).\n\n### General checks\n\n- [x] **Repository:** Is the source code for this software available at the repository url?\n- [x] **License:** Does the repository contain a plain-text LICENSE file with the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) software license?\n- [x] **Version:** Does the release version given match the GitHub release (0.1.0)?\n- [x] **Authorship:** Has the submitting author (@ifellows) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?\n\n### Functionality\n\n- [x] **Installation:** Does installation proceed as outlined in the documentation?\n- [ ] **Functionality:** Have the functional claims of the software been confirmed?\n- [ ] **Performance:** If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)\n\n### Documentation\n\n- [x] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.\n- [x] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).\n- [x] **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?\n- [x] **Automated tests:** Are there automated tests or manual steps described so that the function of the software can be verified?\n- [x] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\n\n### Software paper\n\n- [x] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\n- [x] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **References:** Do all archival references that should have a DOI list one (e.g., papers, datasets, software)?\n\n" + "body": "**Submitting author:** @ifellows (Ian Fellows)\n**Repository:** https://github.com/fellstat/ipc\n**Version:** 0.1.0\n**Editor:** @yochannah\n**Reviewer:** @mschubert , @JohnCoene\n**Archive:** Pending\n\n## Status\n\n[![status](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230/status.svg)](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230)\n\nStatus badge code:\n\n```\nHTML: \nMarkdown: [![status](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230/status.svg)](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230)\n```\n**Reviewers and authors**:\n\nPlease avoid lengthy details of difficulties in the review thread. Instead, please create a new issue in the target repository and link to those issues (especially acceptance-blockers) in the review thread below. (For completists: if the target issue tracker is also on GitHub, linking the review thread in the issue or vice versa will create corresponding breadcrumb trails in the link target.)\n\n## Reviewer instructions & questions\n\n@mschubert & @JohnCoene, please carry out your review in this issue by updating the checklist below. If you cannot edit the checklist please:\n1. Make sure you're logged in to your GitHub account\n2. Be sure to accept the invite at this URL: https://github.com/openjournals/joss-reviews/invitations\n\nThe reviewer guidelines are available here: https://joss.theoj.org/about#reviewer_guidelines. Any questions/concerns please let @yochannah know.\n\n✨ **Please try and complete your review in the next two weeks** ✨ \n\n## Review checklist for @mschubert \n### Conflict of interest\n\n- [x] As the reviewer I confirm that I have read the [JOSS conflict of interest policy](https://github.com/openjournals/joss/blob/master/COI.md) and that there are no conflicts of interest for me to review this work.\n\n### Code of Conduct\n\n- [x] I confirm that I read and will adhere to the [JOSS code of conduct](https://joss.theoj.org/about#code_of_conduct).\n\n### General checks\n\n- [x] **Repository:** Is the source code for this software available at the repository url?\n- [ ] **License:** Does the repository contain a plain-text LICENSE file with the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) software license?\n- [ ] **Version:** Does the release version given match the GitHub release (0.1.0)?\n- [x] **Authorship:** Has the submitting author (@ifellows) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?\n\n### Functionality\n\n- [x] **Installation:** Does installation proceed as outlined in the documentation?\n- [x] **Functionality:** Have the functional claims of the software been confirmed?\n- [ ] **Performance:** If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)\n\n### Documentation\n\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.\n- [x] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).\n- [x] **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?\n- [ ] **Automated tests:** Are there automated tests or manual steps described so that the function of the software can be verified?\n- [ ] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\n\n### Software paper\n\n- [ ] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [ ] **References:** Do all archival references that should have a DOI list one (e.g., papers, datasets, software)?\n\n## Review checklist for @JohnCoene\n### Conflict of interest\n\n- [x] As the reviewer I confirm that I have read the [JOSS conflict of interest policy](https://github.com/openjournals/joss/blob/master/COI.md) and that there are no conflicts of interest for me to review this work.\n\n### Code of Conduct\n\n- [x] I confirm that I read and will adhere to the [JOSS code of conduct](https://joss.theoj.org/about#code_of_conduct).\n\n### General checks\n\n- [x] **Repository:** Is the source code for this software available at the repository url?\n- [x] **License:** Does the repository contain a plain-text LICENSE file with the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) software license?\n- [x] **Version:** Does the release version given match the GitHub release (0.1.0)?\n- [x] **Authorship:** Has the submitting author (@ifellows) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?\n\n### Functionality\n\n- [x] **Installation:** Does installation proceed as outlined in the documentation?\n- [ ] **Functionality:** Have the functional claims of the software been confirmed?\n- [ ] **Performance:** If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)\n\n### Documentation\n\n- [x] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.\n- [x] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).\n- [x] **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?\n- [x] **Automated tests:** Are there automated tests or manual steps described so that the function of the software can be verified?\n- [x] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\n\n### Software paper\n\n- [x] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\n- [x] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **References:** Do all archival references that should have a DOI list one (e.g., papers, datasets, software)?\n\n" }, "changes": { "body": { - "from": "**Submitting author:** @ifellows (Ian Fellows)\n**Repository:** https://github.com/fellstat/ipc\n**Version:** 0.1.0\n**Editor:** @yochannah\n**Reviewer:** @mschubert , @JohnCoene\n**Archive:** Pending\n\n## Status\n\n[![status](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230/status.svg)](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230)\n\nStatus badge code:\n\n```\nHTML: \nMarkdown: [![status](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230/status.svg)](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230)\n```\n**Reviewers and authors**:\n\nPlease avoid lengthy details of difficulties in the review thread. Instead, please create a new issue in the target repository and link to those issues (especially acceptance-blockers) in the review thread below. (For completists: if the target issue tracker is also on GitHub, linking the review thread in the issue or vice versa will create corresponding breadcrumb trails in the link target.)\n\n## Reviewer instructions & questions\n\n@mschubert & @JohnCoene, please carry out your review in this issue by updating the checklist below. If you cannot edit the checklist please:\n1. Make sure you're logged in to your GitHub account\n2. Be sure to accept the invite at this URL: https://github.com/openjournals/joss-reviews-testing/invitations\n\nThe reviewer guidelines are available here: https://joss.theoj.org/about#reviewer_guidelines. Any questions/concerns please let @yochannah know.\n\n✨ **Please try and complete your review in the next two weeks** ✨ \n\n## Review checklist for @mschubert \n### Conflict of interest\n\n- [x] As the reviewer I confirm that I have read the [JOSS conflict of interest policy](https://github.com/openjournals/joss/blob/master/COI.md) and that there are no conflicts of interest for me to review this work.\n\n### Code of Conduct\n\n- [x] I confirm that I read and will adhere to the [JOSS code of conduct](https://joss.theoj.org/about#code_of_conduct).\n\n### General checks\n\n- [x] **Repository:** Is the source code for this software available at the repository url?\n- [ ] **License:** Does the repository contain a plain-text LICENSE file with the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) software license?\n- [ ] **Version:** Does the release version given match the GitHub release (0.1.0)?\n- [x] **Authorship:** Has the submitting author (@ifellows) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?\n\n### Functionality\n\n- [x] **Installation:** Does installation proceed as outlined in the documentation?\n- [ ] **Functionality:** Have the functional claims of the software been confirmed?\n- [ ] **Performance:** If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)\n\n### Documentation\n\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.\n- [x] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).\n- [x] **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?\n- [ ] **Automated tests:** Are there automated tests or manual steps described so that the function of the software can be verified?\n- [ ] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\n\n### Software paper\n\n- [ ] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [ ] **References:** Do all archival references that should have a DOI list one (e.g., papers, datasets, software)?\n\n## Review checklist for @JohnCoene\n### Conflict of interest\n\n- [x] As the reviewer I confirm that I have read the [JOSS conflict of interest policy](https://github.com/openjournals/joss/blob/master/COI.md) and that there are no conflicts of interest for me to review this work.\n\n### Code of Conduct\n\n- [x] I confirm that I read and will adhere to the [JOSS code of conduct](https://joss.theoj.org/about#code_of_conduct).\n\n### General checks\n\n- [x] **Repository:** Is the source code for this software available at the repository url?\n- [x] **License:** Does the repository contain a plain-text LICENSE file with the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) software license?\n- [x] **Version:** Does the release version given match the GitHub release (0.1.0)?\n- [x] **Authorship:** Has the submitting author (@ifellows) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?\n\n### Functionality\n\n- [x] **Installation:** Does installation proceed as outlined in the documentation?\n- [ ] **Functionality:** Have the functional claims of the software been confirmed?\n- [ ] **Performance:** If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)\n\n### Documentation\n\n- [x] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.\n- [x] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).\n- [x] **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?\n- [x] **Automated tests:** Are there automated tests or manual steps described so that the function of the software can be verified?\n- [x] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\n\n### Software paper\n\n- [x] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\n- [x] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **References:** Do all archival references that should have a DOI list one (e.g., papers, datasets, software)?\n\n" + "from": "**Submitting author:** @ifellows (Ian Fellows)\n**Repository:** https://github.com/fellstat/ipc\n**Version:** 0.1.0\n**Editor:** @yochannah\n**Reviewer:** @mschubert , @JohnCoene\n**Archive:** Pending\n\n## Status\n\n[![status](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230/status.svg)](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230)\n\nStatus badge code:\n\n```\nHTML: \nMarkdown: [![status](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230/status.svg)](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230)\n```\n**Reviewers and authors**:\n\nPlease avoid lengthy details of difficulties in the review thread. Instead, please create a new issue in the target repository and link to those issues (especially acceptance-blockers) in the review thread below. (For completists: if the target issue tracker is also on GitHub, linking the review thread in the issue or vice versa will create corresponding breadcrumb trails in the link target.)\n\n## Reviewer instructions & questions\n\n@mschubert & @JohnCoene, please carry out your review in this issue by updating the checklist below. If you cannot edit the checklist please:\n1. Make sure you're logged in to your GitHub account\n2. Be sure to accept the invite at this URL: https://github.com/openjournals/joss-reviews/invitations\n\nThe reviewer guidelines are available here: https://joss.theoj.org/about#reviewer_guidelines. Any questions/concerns please let @yochannah know.\n\n✨ **Please try and complete your review in the next two weeks** ✨ \n\n## Review checklist for @mschubert \n### Conflict of interest\n\n- [x] As the reviewer I confirm that I have read the [JOSS conflict of interest policy](https://github.com/openjournals/joss/blob/master/COI.md) and that there are no conflicts of interest for me to review this work.\n\n### Code of Conduct\n\n- [x] I confirm that I read and will adhere to the [JOSS code of conduct](https://joss.theoj.org/about#code_of_conduct).\n\n### General checks\n\n- [x] **Repository:** Is the source code for this software available at the repository url?\n- [ ] **License:** Does the repository contain a plain-text LICENSE file with the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) software license?\n- [ ] **Version:** Does the release version given match the GitHub release (0.1.0)?\n- [x] **Authorship:** Has the submitting author (@ifellows) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?\n\n### Functionality\n\n- [x] **Installation:** Does installation proceed as outlined in the documentation?\n- [ ] **Functionality:** Have the functional claims of the software been confirmed?\n- [ ] **Performance:** If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)\n\n### Documentation\n\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.\n- [x] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).\n- [x] **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?\n- [ ] **Automated tests:** Are there automated tests or manual steps described so that the function of the software can be verified?\n- [ ] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\n\n### Software paper\n\n- [ ] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [ ] **References:** Do all archival references that should have a DOI list one (e.g., papers, datasets, software)?\n\n## Review checklist for @JohnCoene\n### Conflict of interest\n\n- [x] As the reviewer I confirm that I have read the [JOSS conflict of interest policy](https://github.com/openjournals/joss/blob/master/COI.md) and that there are no conflicts of interest for me to review this work.\n\n### Code of Conduct\n\n- [x] I confirm that I read and will adhere to the [JOSS code of conduct](https://joss.theoj.org/about#code_of_conduct).\n\n### General checks\n\n- [x] **Repository:** Is the source code for this software available at the repository url?\n- [x] **License:** Does the repository contain a plain-text LICENSE file with the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) software license?\n- [x] **Version:** Does the release version given match the GitHub release (0.1.0)?\n- [x] **Authorship:** Has the submitting author (@ifellows) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?\n\n### Functionality\n\n- [x] **Installation:** Does installation proceed as outlined in the documentation?\n- [ ] **Functionality:** Have the functional claims of the software been confirmed?\n- [ ] **Performance:** If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)\n\n### Documentation\n\n- [x] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.\n- [x] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).\n- [x] **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?\n- [x] **Automated tests:** Are there automated tests or manual steps described so that the function of the software can be verified?\n- [x] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\n\n### Software paper\n\n- [x] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\n- [x] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **References:** Do all archival references that should have a DOI list one (e.g., papers, datasets, software)?\n\n" } }, "repository": { "id": 52331602, "node_id": "MDEwOlJlcG9zaXRvcnk1MjMzMTYwMg==", - "name": "joss-reviews-testing", - "full_name": "openjournals/joss-reviews-testing", + "name": "joss-reviews", + "full_name": "openjournals/joss-reviews", "private": false, "owner": { "login": "openjournals", @@ -124,53 +124,53 @@ "type": "Organization", "site_admin": false }, - "html_url": "https://github.com/openjournals/joss-reviews-testing", + "html_url": "https://github.com/openjournals/joss-reviews", "description": "Reviews for The Journal of Open Source Software", "fork": false, - "url": "https://api.github.com/repos/openjournals/joss-reviews-testing", - "forks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/forks", - "keys_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/teams", - "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/hooks", - "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/events{/number}", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/events", - "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/assignees{/user}", - "branches_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/branches{/branch}", - "tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/tags", - "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/statuses/{sha}", - "languages_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/languages", - "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/stargazers", - "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contributors", - "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscribers", - "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscription", - "commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contents/{+path}", - "compare_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/merges", - "archive_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/downloads", - "issues_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues{/number}", - "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/pulls{/number}", - "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/milestones{/number}", - "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/labels{/name}", - "releases_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/releases{/id}", - "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/deployments", + "url": "https://api.github.com/repos/openjournals/joss-reviews", + "forks_url": "https://api.github.com/repos/openjournals/joss-reviews/forks", + "keys_url": "https://api.github.com/repos/openjournals/joss-reviews/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/openjournals/joss-reviews/teams", + "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews/hooks", + "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/events{/number}", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews/events", + "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews/assignees{/user}", + "branches_url": "https://api.github.com/repos/openjournals/joss-reviews/branches{/branch}", + "tags_url": "https://api.github.com/repos/openjournals/joss-reviews/tags", + "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/openjournals/joss-reviews/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews/statuses/{sha}", + "languages_url": "https://api.github.com/repos/openjournals/joss-reviews/languages", + "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews/stargazers", + "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews/contributors", + "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews/subscribers", + "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews/subscription", + "commits_url": "https://api.github.com/repos/openjournals/joss-reviews/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/openjournals/joss-reviews/contents/{+path}", + "compare_url": "https://api.github.com/repos/openjournals/joss-reviews/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/openjournals/joss-reviews/merges", + "archive_url": "https://api.github.com/repos/openjournals/joss-reviews/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews/downloads", + "issues_url": "https://api.github.com/repos/openjournals/joss-reviews/issues{/number}", + "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews/pulls{/number}", + "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews/milestones{/number}", + "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/labels{/name}", + "releases_url": "https://api.github.com/repos/openjournals/joss-reviews/releases{/id}", + "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews/deployments", "created_at": "2016-02-23T05:02:09Z", "updated_at": "2018-10-03T21:44:04Z", "pushed_at": "2018-09-07T11:40:43Z", - "git_url": "git://github.com/openjournals/joss-reviews-testing.git", - "ssh_url": "git@github.com:openjournals/joss-reviews-testing.git", - "clone_url": "https://github.com/openjournals/joss-reviews-testing.git", - "svn_url": "https://github.com/openjournals/joss-reviews-testing", + "git_url": "git://github.com/openjournals/joss-reviews.git", + "ssh_url": "git@github.com:openjournals/joss-reviews.git", + "clone_url": "https://github.com/openjournals/joss-reviews.git", + "svn_url": "https://github.com/openjournals/joss-reviews", "homepage": null, "size": 5, "stargazers_count": 142, diff --git a/spec/fixtures/whedon-review-labeled.json b/spec/fixtures/whedon-review-labeled.json index 4bd165e56..0f2f2cee8 100644 --- a/spec/fixtures/whedon-review-labeled.json +++ b/spec/fixtures/whedon-review-labeled.json @@ -1,12 +1,12 @@ { "action": "unlabeled", "issue": { - "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79", - "repository_url": "https://api.github.com/repos/openjournals/joss-reviews-testing", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/labels{/name}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/comments", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/events", - "html_url": "https://github.com/openjournals/joss-reviews-testing/issues/79", + "url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79", + "repository_url": "https://api.github.com/repos/openjournals/joss-reviews", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/labels{/name}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/comments", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/events", + "html_url": "https://github.com/openjournals/joss-reviews/issues/79", "id": 440505139, "node_id": "MDU6SXNzdWU0NDA1MDUxMzk=", "number": 79, @@ -35,7 +35,7 @@ { "id": 771671387, "node_id": "MDU6TGFiZWw3NzE2NzEzODc=", - "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/labels/accepted", + "url": "https://api.github.com/repos/openjournals/joss-reviews/labels/accepted", "name": "accepted", "color": "0052cc", "default": false @@ -116,7 +116,7 @@ "label": { "id": 381284424, "node_id": "MDU6TGFiZWwzODEyODQ0MjQ=", - "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/labels/bug", + "url": "https://api.github.com/repos/openjournals/joss-reviews/labels/bug", "name": "bug", "color": "ee0701", "default": true @@ -124,8 +124,8 @@ "repository": { "id": 59520368, "node_id": "MDEwOlJlcG9zaXRvcnk1OTUyMDM2OA==", - "name": "joss-reviews-testing", - "full_name": "openjournals/joss-reviews-testing", + "name": "joss-reviews", + "full_name": "openjournals/joss-reviews", "private": true, "owner": { "login": "openjournals", @@ -147,53 +147,53 @@ "type": "Organization", "site_admin": false }, - "html_url": "https://github.com/openjournals/joss-reviews-testing", + "html_url": "https://github.com/openjournals/joss-reviews", "description": null, "fork": false, - "url": "https://api.github.com/repos/openjournals/joss-reviews-testing", - "forks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/forks", - "keys_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/teams", - "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/hooks", - "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/events{/number}", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/events", - "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/assignees{/user}", - "branches_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/branches{/branch}", - "tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/tags", - "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/statuses/{sha}", - "languages_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/languages", - "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/stargazers", - "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contributors", - "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscribers", - "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscription", - "commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contents/{+path}", - "compare_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/merges", - "archive_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/downloads", - "issues_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues{/number}", - "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/pulls{/number}", - "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/milestones{/number}", - "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/labels{/name}", - "releases_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/releases{/id}", - "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/deployments", + "url": "https://api.github.com/repos/openjournals/joss-reviews", + "forks_url": "https://api.github.com/repos/openjournals/joss-reviews/forks", + "keys_url": "https://api.github.com/repos/openjournals/joss-reviews/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/openjournals/joss-reviews/teams", + "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews/hooks", + "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/events{/number}", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews/events", + "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews/assignees{/user}", + "branches_url": "https://api.github.com/repos/openjournals/joss-reviews/branches{/branch}", + "tags_url": "https://api.github.com/repos/openjournals/joss-reviews/tags", + "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/openjournals/joss-reviews/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews/statuses/{sha}", + "languages_url": "https://api.github.com/repos/openjournals/joss-reviews/languages", + "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews/stargazers", + "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews/contributors", + "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews/subscribers", + "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews/subscription", + "commits_url": "https://api.github.com/repos/openjournals/joss-reviews/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/openjournals/joss-reviews/contents/{+path}", + "compare_url": "https://api.github.com/repos/openjournals/joss-reviews/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/openjournals/joss-reviews/merges", + "archive_url": "https://api.github.com/repos/openjournals/joss-reviews/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews/downloads", + "issues_url": "https://api.github.com/repos/openjournals/joss-reviews/issues{/number}", + "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews/pulls{/number}", + "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews/milestones{/number}", + "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/labels{/name}", + "releases_url": "https://api.github.com/repos/openjournals/joss-reviews/releases{/id}", + "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews/deployments", "created_at": "2016-05-23T21:43:02Z", "updated_at": "2017-11-13T19:56:15Z", "pushed_at": "2018-09-09T21:24:53Z", - "git_url": "git://github.com/openjournals/joss-reviews-testing.git", - "ssh_url": "git@github.com:openjournals/joss-reviews-testing.git", - "clone_url": "https://github.com/openjournals/joss-reviews-testing.git", - "svn_url": "https://github.com/openjournals/joss-reviews-testing", + "git_url": "git://github.com/openjournals/joss-reviews.git", + "ssh_url": "git@github.com:openjournals/joss-reviews.git", + "clone_url": "https://github.com/openjournals/joss-reviews.git", + "svn_url": "https://github.com/openjournals/joss-reviews", "homepage": null, "size": 3, "stargazers_count": 0, diff --git a/spec/fixtures/whedon-review-opened.json b/spec/fixtures/whedon-review-opened.json index 063a0b4f3..cdfe1242b 100644 --- a/spec/fixtures/whedon-review-opened.json +++ b/spec/fixtures/whedon-review-opened.json @@ -1,12 +1,12 @@ { "action": "opened", "issue": { - "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79", - "repository_url": "https://api.github.com/repos/openjournals/joss-reviews-testing", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/labels{/name}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/comments", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/events", - "html_url": "https://github.com/openjournals/joss-reviews-testing/issues/79", + "url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79", + "repository_url": "https://api.github.com/repos/openjournals/joss-reviews", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/labels{/name}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/comments", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/events", + "html_url": "https://github.com/openjournals/joss-reviews/issues/79", "id": 365218525, "node_id": "MDU6SXNzdWUzNjUyMTg1MjU=", "number": 79, @@ -51,8 +51,8 @@ "repository": { "id": 59520368, "node_id": "MDEwOlJlcG9zaXRvcnk1OTUyMDM2OA==", - "name": "joss-reviews-testing", - "full_name": "openjournals/joss-reviews-testing", + "name": "joss-reviews", + "full_name": "openjournals/joss-reviews", "private": true, "owner": { "login": "openjournals", @@ -74,53 +74,53 @@ "type": "Organization", "site_admin": false }, - "html_url": "https://github.com/openjournals/joss-reviews-testing", + "html_url": "https://github.com/openjournals/joss-reviews", "description": null, "fork": false, - "url": "https://api.github.com/repos/openjournals/joss-reviews-testing", - "forks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/forks", - "keys_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/teams", - "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/hooks", - "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/events{/number}", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/events", - "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/assignees{/user}", - "branches_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/branches{/branch}", - "tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/tags", - "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/statuses/{sha}", - "languages_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/languages", - "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/stargazers", - "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contributors", - "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscribers", - "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscription", - "commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contents/{+path}", - "compare_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/merges", - "archive_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/downloads", - "issues_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues{/number}", - "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/pulls{/number}", - "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/milestones{/number}", - "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/labels{/name}", - "releases_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/releases{/id}", - "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/deployments", + "url": "https://api.github.com/repos/openjournals/joss-reviews", + "forks_url": "https://api.github.com/repos/openjournals/joss-reviews/forks", + "keys_url": "https://api.github.com/repos/openjournals/joss-reviews/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/openjournals/joss-reviews/teams", + "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews/hooks", + "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/events{/number}", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews/events", + "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews/assignees{/user}", + "branches_url": "https://api.github.com/repos/openjournals/joss-reviews/branches{/branch}", + "tags_url": "https://api.github.com/repos/openjournals/joss-reviews/tags", + "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/openjournals/joss-reviews/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews/statuses/{sha}", + "languages_url": "https://api.github.com/repos/openjournals/joss-reviews/languages", + "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews/stargazers", + "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews/contributors", + "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews/subscribers", + "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews/subscription", + "commits_url": "https://api.github.com/repos/openjournals/joss-reviews/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/openjournals/joss-reviews/contents/{+path}", + "compare_url": "https://api.github.com/repos/openjournals/joss-reviews/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/openjournals/joss-reviews/merges", + "archive_url": "https://api.github.com/repos/openjournals/joss-reviews/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews/downloads", + "issues_url": "https://api.github.com/repos/openjournals/joss-reviews/issues{/number}", + "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews/pulls{/number}", + "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews/milestones{/number}", + "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/labels{/name}", + "releases_url": "https://api.github.com/repos/openjournals/joss-reviews/releases{/id}", + "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews/deployments", "created_at": "2016-05-23T21:43:02Z", "updated_at": "2017-11-13T19:56:15Z", "pushed_at": "2018-09-09T21:24:53Z", - "git_url": "git://github.com/openjournals/joss-reviews-testing.git", - "ssh_url": "git@github.com:openjournals/joss-reviews-testing.git", - "clone_url": "https://github.com/openjournals/joss-reviews-testing.git", - "svn_url": "https://github.com/openjournals/joss-reviews-testing", + "git_url": "git://github.com/openjournals/joss-reviews.git", + "ssh_url": "git@github.com:openjournals/joss-reviews.git", + "clone_url": "https://github.com/openjournals/joss-reviews.git", + "svn_url": "https://github.com/openjournals/joss-reviews", "homepage": null, "size": 3, "stargazers_count": 0, diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index eee803169..9ed938f7b 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -89,35 +89,13 @@ =end end -require 'webmock/rspec' -WebMock.disable_net_connect!(allow_localhost: true) +require 'vcr' -RSpec.configure do |config| - config.before(:each) do - stub_request(:get, "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79"). - with( - headers: { - 'Accept'=>'application/vnd.github.v3+json', - 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', - 'Content-Type'=>'application/json', - 'User-Agent'=>'Octokit Ruby Gem 4.20.0' - }). - to_return(status: 200, body: JSON.generate(IO.binread('spec/fixtures/review-body-79.json')), headers: {}) - stub_request(:post, "https://api.github.com/repos/openjournals/joss-reviews-testing/issues"). - with(body: "{\"labels\":[\"review\"],\"title\":\"[REVIEW]: arfon / fidgit\",\"body\":\"**Submitting author:** @foobar (\\u003ca href=\\\"http://orcid.org/0000-0000-0000-1234\\\"\\u003eDoe, John\\u003c/a\\u003e)\\n**Repository:** \\u003ca href=\\\"http://github.com/arfon/fidgit\\\" target =\\\"_blank\\\"\\u003ehttp://github.com/arfon/fidgit\\u003c/a\\u003e\\n**Version:** v1.0.0\\n**Editor:** @mouse\\n**Reviewer:** @mickey\\n\\n## Status\\n\\n[![status](http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4/status.svg)](http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4)\\n\\nStatus badge code:\\n\\n```\\nHTML: \\u003ca href=\\\"http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4\\\"\\u003e\\u003cimg src=\\\"http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4/status.svg\\\"\\u003e\\u003c/a\\u003e\\nMarkdown: [![status](http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4/status.svg)](http://joss.theoj.org/papers/48d24b0158528e85ac7706aecd8cddc4)\\n```\\n**Reviewers and authors**:\\n\\nPlease avoid lengthy details of difficulties in the review thread. Instead, please create a new issue in the \\u003ca href=\\\"http://github.com/arfon/fidgit\\\" target=\\\"_blank\\\"\\u003etarget repository\\u003c/a\\u003e and link to those issues (especially acceptance-blockers) in the review thread below. (For completists: if the target issue tracker is also on GitHub, linking the review thread in the issue or vice versa will create corresponding breadcrumb trails in the link target.)\\n\\n## Reviewer questions\\n\\n### Conflict of interest\\n\\n- [ ] As the reviewer I confirm that there are no conflicts of interest for me to review this work (such as being a major contributor to the software).\\n\\n### Code of Conduct\\n\\n- [ ] I confirm that I read and will adhere to the [JOSS code of conduct](http://joss.theoj.org/about#code_of_conduct).\\n\\n### General checks\\n\\n- [ ] **Repository:** Is the source code for this software available at the \\u003ca target=\\\"_blank\\\" href=\\\"http://github.com/arfon/fidgit\\\"\\u003erepository url\\u003c/a\\u003e?\\n- [ ] **License:** Does the repository contain a plain-text LICENSE file with the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) software license?\\n- [ ] **Version:** Does the release version given match the GitHub release (v1.0.0)?\\n- [ ] **Authorship:** Has the submitting author (@foobar) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?\\n\\n### Functionality\\n\\n- [ ] **Installation:** Does installation proceed as outlined in the documentation?\\n- [ ] **Functionality:** Have the functional claims of the software been confirmed?\\n- [ ] **Performance:** If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)\\n\\n### Documentation\\n\\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\\n- [ ] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.\\n- [ ] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).\\n- [ ] **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?\\n- [ ] **Automated tests:** Are there automated tests or manual steps described so that the function of the software can be verified?\\n- [ ] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\\n\\n### Software paper\\n\\n- [ ] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\\n- [ ] **References:** Do all archival references that should have a DOI list one (e.g., papers, datasets, software)?\\n\"}", - headers: {'Accept'=>'application/vnd.github.v3+json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/json', 'User-Agent'=>'Octokit Ruby Gem 4.3.0'}). - to_return(status: 200, body: "", headers: {}) - stub_request(:post, "https://api.github.com/repos/openjournals/joss-reviews-testing/issues"). - with(body: "{\"assignee\":\"joss\",\"labels\":[\"pre-review\"],\"title\":\"[PRE REVIEW]: arfon / fidgit\",\"body\":\"**Submitting author:** @foobar (\\u003ca href=\\\"http://orcid.org/0000-0000-0000-1234\\\"\\u003eDoe, John\\u003c/a\\u003e)\\n**Repository:** \\u003ca href=\\\"http://github.com/arfon/fidgit\\\" target =\\\"_blank\\\"\\u003ehttp://github.com/arfon/fidgit\\u003c/a\\u003e\\n**Version:** v1.0.0\\n**Editor:** @joss\\n**Reviewer:** Pending\\n\\n**What this issue is for**\\n\\nThanks for submitting your paper to JOSS @foobar. The JOSS editor (shown at the top of this issue) will work with you on this issue to find a reviewer for your submission before creating the main review issue.\\n\\n**Editor instructions**\\n\\nThe JOSS submission bot @whedon is here to help you find and assign reviewers and start the main review. To find out what @whedon can do for you type:\\n\\n```\\n@whedon commands\\n```\\n\"}", - headers: {'Accept'=>'application/vnd.github.v3+json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/json', 'User-Agent'=>'Octokit Ruby Gem 4.3.0'}). - to_return(status: 200, body: "", headers: {}) - stub_request(:get, "https://www.theoj.org/joss-papers/joss.00000/10.21105.joss.00000.pdf"). - with( - headers: { - 'Accept'=>'*/*', - 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', - 'User-Agent'=>'Ruby' - }). - to_return(status: 200, body: IO.binread('spec/fixtures/paper.pdf'), headers: {}) +VCR.configure do |c| + c.cassette_library_dir = 'spec/fixtures/cassettes' + c.hook_into :faraday + c.ignore_request do |request| + URI(request.uri).port == 9200 end + c.configure_rspec_metadata! end From 4987c26df684efa3d8f1711d0caf65a5b6a11dcc Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 15 Feb 2021 22:12:39 +0000 Subject: [PATCH 094/609] Revert to testing path --- .../should_update_the_last_activity_field.yml | 12 +- .../should_update_the_last_edits_key.yml | 12 +- ...ould_update_the_percent_complete_value.yml | 12 +- spec/fixtures/editor-pre-review-comment.json | 106 +++++++++--------- spec/fixtures/editor-review-comment.json | 106 +++++++++--------- spec/fixtures/review-body-79.json | 10 +- spec/fixtures/whedon-pre-review-comment.json | 106 +++++++++--------- spec/fixtures/whedon-pre-review-opened.json | 100 ++++++++--------- spec/fixtures/whedon-review-comment.json | 106 +++++++++--------- spec/fixtures/whedon-review-edit.json | 106 +++++++++--------- spec/fixtures/whedon-review-labeled.json | 104 ++++++++--------- spec/fixtures/whedon-review-opened.json | 100 ++++++++--------- 12 files changed, 440 insertions(+), 440 deletions(-) diff --git a/spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_last_activity_field.yml b/spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_last_activity_field.yml index b5166d7fe..4feaf9584 100644 --- a/spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_last_activity_field.yml +++ b/spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_last_activity_field.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.github.com/repos/openjournals/joss-reviews/issues/79 + uri: https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79 body: encoding: US-ASCII string: '' @@ -68,10 +68,10 @@ http_interactions: - C285:E46E:81DD96F:8F41571:602AE9DE body: encoding: ASCII-8BIT - string: '{"url":"https://api.github.com/repos/openjournals/joss-reviews/issues/79","repository_url":"https://api.github.com/repos/openjournals/joss-reviews","labels_url":"https://api.github.com/repos/openjournals/joss-reviews/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/openjournals/joss-reviews/issues/79/comments","events_url":"https://api.github.com/repos/openjournals/joss-reviews/issues/79/events","html_url":"https://github.com/openjournals/joss-reviews/issues/79","id":178630651,"node_id":"MDU6SXNzdWUxNzg2MzA2NTE=","number":79,"title":"[REVIEW]: - Python Active-subspaces Utility Library","user":{"login":"whedon","id":18508068,"node_id":"MDQ6VXNlcjE4NTA4MDY4","avatar_url":"https://avatars.githubusercontent.com/u/18508068?v=4","gravatar_id":"","url":"https://api.github.com/users/whedon","html_url":"https://github.com/whedon","followers_url":"https://api.github.com/users/whedon/followers","following_url":"https://api.github.com/users/whedon/following{/other_user}","gists_url":"https://api.github.com/users/whedon/gists{/gist_id}","starred_url":"https://api.github.com/users/whedon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whedon/subscriptions","organizations_url":"https://api.github.com/users/whedon/orgs","repos_url":"https://api.github.com/users/whedon/repos","events_url":"https://api.github.com/users/whedon/events{/privacy}","received_events_url":"https://api.github.com/users/whedon/received_events","type":"User","site_admin":false},"labels":[{"id":330461591,"node_id":"MDU6TGFiZWwzMzA0NjE1OTE=","url":"https://api.github.com/repos/openjournals/joss-reviews/labels/accepted","name":"accepted","color":"159818","default":false,"description":null},{"id":1880544947,"node_id":"MDU6TGFiZWwxODgwNTQ0OTQ3","url":"https://api.github.com/repos/openjournals/joss-reviews/labels/published","name":"published","color":"e276d8","default":false,"description":"Papers - published in JOSS"},{"id":1880543836,"node_id":"MDU6TGFiZWwxODgwNTQzODM2","url":"https://api.github.com/repos/openjournals/joss-reviews/labels/recommend-accept","name":"recommend-accept","color":"b9f9a9","default":false,"description":"Papers - recommended for acceptance in JOSS."},{"id":330465313,"node_id":"MDU6TGFiZWwzMzA0NjUzMTM=","url":"https://api.github.com/repos/openjournals/joss-reviews/labels/review","name":"review","color":"fbca04","default":false,"description":null}],"state":"closed","locked":false,"assignee":{"login":"kyleniemeyer","id":190432,"node_id":"MDQ6VXNlcjE5MDQzMg==","avatar_url":"https://avatars.githubusercontent.com/u/190432?v=4","gravatar_id":"","url":"https://api.github.com/users/kyleniemeyer","html_url":"https://github.com/kyleniemeyer","followers_url":"https://api.github.com/users/kyleniemeyer/followers","following_url":"https://api.github.com/users/kyleniemeyer/following{/other_user}","gists_url":"https://api.github.com/users/kyleniemeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleniemeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleniemeyer/subscriptions","organizations_url":"https://api.github.com/users/kyleniemeyer/orgs","repos_url":"https://api.github.com/users/kyleniemeyer/repos","events_url":"https://api.github.com/users/kyleniemeyer/events{/privacy}","received_events_url":"https://api.github.com/users/kyleniemeyer/received_events","type":"User","site_admin":false},"assignees":[{"login":"kyleniemeyer","id":190432,"node_id":"MDQ6VXNlcjE5MDQzMg==","avatar_url":"https://avatars.githubusercontent.com/u/190432?v=4","gravatar_id":"","url":"https://api.github.com/users/kyleniemeyer","html_url":"https://github.com/kyleniemeyer","followers_url":"https://api.github.com/users/kyleniemeyer/followers","following_url":"https://api.github.com/users/kyleniemeyer/following{/other_user}","gists_url":"https://api.github.com/users/kyleniemeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleniemeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleniemeyer/subscriptions","organizations_url":"https://api.github.com/users/kyleniemeyer/orgs","repos_url":"https://api.github.com/users/kyleniemeyer/repos","events_url":"https://api.github.com/users/kyleniemeyer/events{/privacy}","received_events_url":"https://api.github.com/users/kyleniemeyer/received_events","type":"User","site_admin":false},{"login":"nicoguaro","id":1097787,"node_id":"MDQ6VXNlcjEwOTc3ODc=","avatar_url":"https://avatars.githubusercontent.com/u/1097787?v=4","gravatar_id":"","url":"https://api.github.com/users/nicoguaro","html_url":"https://github.com/nicoguaro","followers_url":"https://api.github.com/users/nicoguaro/followers","following_url":"https://api.github.com/users/nicoguaro/following{/other_user}","gists_url":"https://api.github.com/users/nicoguaro/gists{/gist_id}","starred_url":"https://api.github.com/users/nicoguaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicoguaro/subscriptions","organizations_url":"https://api.github.com/users/nicoguaro/orgs","repos_url":"https://api.github.com/users/nicoguaro/repos","events_url":"https://api.github.com/users/nicoguaro/events{/privacy}","received_events_url":"https://api.github.com/users/nicoguaro/received_events","type":"User","site_admin":false},{"login":"mtezzele","id":8956946,"node_id":"MDQ6VXNlcjg5NTY5NDY=","avatar_url":"https://avatars.githubusercontent.com/u/8956946?v=4","gravatar_id":"","url":"https://api.github.com/users/mtezzele","html_url":"https://github.com/mtezzele","followers_url":"https://api.github.com/users/mtezzele/followers","following_url":"https://api.github.com/users/mtezzele/following{/other_user}","gists_url":"https://api.github.com/users/mtezzele/gists{/gist_id}","starred_url":"https://api.github.com/users/mtezzele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtezzele/subscriptions","organizations_url":"https://api.github.com/users/mtezzele/orgs","repos_url":"https://api.github.com/users/mtezzele/repos","events_url":"https://api.github.com/users/mtezzele/events{/privacy}","received_events_url":"https://api.github.com/users/mtezzele/received_events","type":"User","site_admin":false}],"milestone":null,"comments":28,"created_at":"2016-09-22T14:46:47Z","updated_at":"2021-02-14T16:46:54Z","closed_at":"2016-09-29T19:17:28Z","author_association":"COLLABORATOR","active_lock_reason":null,"body":"**Submitting + string: '{"url":"https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79","repository_url":"https://api.github.com/repos/openjournals/joss-reviews-testing","labels_url":"https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/comments","events_url":"https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/events","html_url":"https://github.com/openjournals/joss-reviews-testing/issues/79","id":178630651,"node_id":"MDU6SXNzdWUxNzg2MzA2NTE=","number":79,"title":"[REVIEW]: + Python Active-subspaces Utility Library","user":{"login":"whedon","id":18508068,"node_id":"MDQ6VXNlcjE4NTA4MDY4","avatar_url":"https://avatars.githubusercontent.com/u/18508068?v=4","gravatar_id":"","url":"https://api.github.com/users/whedon","html_url":"https://github.com/whedon","followers_url":"https://api.github.com/users/whedon/followers","following_url":"https://api.github.com/users/whedon/following{/other_user}","gists_url":"https://api.github.com/users/whedon/gists{/gist_id}","starred_url":"https://api.github.com/users/whedon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whedon/subscriptions","organizations_url":"https://api.github.com/users/whedon/orgs","repos_url":"https://api.github.com/users/whedon/repos","events_url":"https://api.github.com/users/whedon/events{/privacy}","received_events_url":"https://api.github.com/users/whedon/received_events","type":"User","site_admin":false},"labels":[{"id":330461591,"node_id":"MDU6TGFiZWwzMzA0NjE1OTE=","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/accepted","name":"accepted","color":"159818","default":false,"description":null},{"id":1880544947,"node_id":"MDU6TGFiZWwxODgwNTQ0OTQ3","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/published","name":"published","color":"e276d8","default":false,"description":"Papers + published in JOSS"},{"id":1880543836,"node_id":"MDU6TGFiZWwxODgwNTQzODM2","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/recommend-accept","name":"recommend-accept","color":"b9f9a9","default":false,"description":"Papers + recommended for acceptance in JOSS."},{"id":330465313,"node_id":"MDU6TGFiZWwzMzA0NjUzMTM=","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/review","name":"review","color":"fbca04","default":false,"description":null}],"state":"closed","locked":false,"assignee":{"login":"kyleniemeyer","id":190432,"node_id":"MDQ6VXNlcjE5MDQzMg==","avatar_url":"https://avatars.githubusercontent.com/u/190432?v=4","gravatar_id":"","url":"https://api.github.com/users/kyleniemeyer","html_url":"https://github.com/kyleniemeyer","followers_url":"https://api.github.com/users/kyleniemeyer/followers","following_url":"https://api.github.com/users/kyleniemeyer/following{/other_user}","gists_url":"https://api.github.com/users/kyleniemeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleniemeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleniemeyer/subscriptions","organizations_url":"https://api.github.com/users/kyleniemeyer/orgs","repos_url":"https://api.github.com/users/kyleniemeyer/repos","events_url":"https://api.github.com/users/kyleniemeyer/events{/privacy}","received_events_url":"https://api.github.com/users/kyleniemeyer/received_events","type":"User","site_admin":false},"assignees":[{"login":"kyleniemeyer","id":190432,"node_id":"MDQ6VXNlcjE5MDQzMg==","avatar_url":"https://avatars.githubusercontent.com/u/190432?v=4","gravatar_id":"","url":"https://api.github.com/users/kyleniemeyer","html_url":"https://github.com/kyleniemeyer","followers_url":"https://api.github.com/users/kyleniemeyer/followers","following_url":"https://api.github.com/users/kyleniemeyer/following{/other_user}","gists_url":"https://api.github.com/users/kyleniemeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleniemeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleniemeyer/subscriptions","organizations_url":"https://api.github.com/users/kyleniemeyer/orgs","repos_url":"https://api.github.com/users/kyleniemeyer/repos","events_url":"https://api.github.com/users/kyleniemeyer/events{/privacy}","received_events_url":"https://api.github.com/users/kyleniemeyer/received_events","type":"User","site_admin":false},{"login":"nicoguaro","id":1097787,"node_id":"MDQ6VXNlcjEwOTc3ODc=","avatar_url":"https://avatars.githubusercontent.com/u/1097787?v=4","gravatar_id":"","url":"https://api.github.com/users/nicoguaro","html_url":"https://github.com/nicoguaro","followers_url":"https://api.github.com/users/nicoguaro/followers","following_url":"https://api.github.com/users/nicoguaro/following{/other_user}","gists_url":"https://api.github.com/users/nicoguaro/gists{/gist_id}","starred_url":"https://api.github.com/users/nicoguaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicoguaro/subscriptions","organizations_url":"https://api.github.com/users/nicoguaro/orgs","repos_url":"https://api.github.com/users/nicoguaro/repos","events_url":"https://api.github.com/users/nicoguaro/events{/privacy}","received_events_url":"https://api.github.com/users/nicoguaro/received_events","type":"User","site_admin":false},{"login":"mtezzele","id":8956946,"node_id":"MDQ6VXNlcjg5NTY5NDY=","avatar_url":"https://avatars.githubusercontent.com/u/8956946?v=4","gravatar_id":"","url":"https://api.github.com/users/mtezzele","html_url":"https://github.com/mtezzele","followers_url":"https://api.github.com/users/mtezzele/followers","following_url":"https://api.github.com/users/mtezzele/following{/other_user}","gists_url":"https://api.github.com/users/mtezzele/gists{/gist_id}","starred_url":"https://api.github.com/users/mtezzele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtezzele/subscriptions","organizations_url":"https://api.github.com/users/mtezzele/orgs","repos_url":"https://api.github.com/users/mtezzele/repos","events_url":"https://api.github.com/users/mtezzele/events{/privacy}","received_events_url":"https://api.github.com/users/mtezzele/received_events","type":"User","site_admin":false}],"milestone":null,"comments":28,"created_at":"2016-09-22T14:46:47Z","updated_at":"2021-02-14T16:46:54Z","closed_at":"2016-09-29T19:17:28Z","author_association":"COLLABORATOR","active_lock_reason":null,"body":"**Submitting author:** @paulcon (Paul Constantine)\n**Repository:** https://github.com/paulcon/active_subspaces\n**Version:** @@ -111,7 +111,7 @@ http_interactions: verified?\n- [x] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\n### Software paper\n\nPaper PDF: - [10.21105.joss.00079.pdf](https://github.com/openjournals/joss-reviews/files/487592/10.21105.joss.00079.pdf)\n- + [10.21105.joss.00079.pdf](https://github.com/openjournals/joss-reviews-testing/files/487592/10.21105.joss.00079.pdf)\n- [x] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\n- [x] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience diff --git a/spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_last_edits_key.yml b/spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_last_edits_key.yml index da2786df2..c1a4b5141 100644 --- a/spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_last_edits_key.yml +++ b/spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_last_edits_key.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.github.com/repos/openjournals/joss-reviews/issues/79 + uri: https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79 body: encoding: US-ASCII string: '' @@ -68,10 +68,10 @@ http_interactions: - C269:5564:4D8C5C4:55C2953:602AE996 body: encoding: ASCII-8BIT - string: '{"url":"https://api.github.com/repos/openjournals/joss-reviews/issues/79","repository_url":"https://api.github.com/repos/openjournals/joss-reviews","labels_url":"https://api.github.com/repos/openjournals/joss-reviews/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/openjournals/joss-reviews/issues/79/comments","events_url":"https://api.github.com/repos/openjournals/joss-reviews/issues/79/events","html_url":"https://github.com/openjournals/joss-reviews/issues/79","id":178630651,"node_id":"MDU6SXNzdWUxNzg2MzA2NTE=","number":79,"title":"[REVIEW]: - Python Active-subspaces Utility Library","user":{"login":"whedon","id":18508068,"node_id":"MDQ6VXNlcjE4NTA4MDY4","avatar_url":"https://avatars.githubusercontent.com/u/18508068?v=4","gravatar_id":"","url":"https://api.github.com/users/whedon","html_url":"https://github.com/whedon","followers_url":"https://api.github.com/users/whedon/followers","following_url":"https://api.github.com/users/whedon/following{/other_user}","gists_url":"https://api.github.com/users/whedon/gists{/gist_id}","starred_url":"https://api.github.com/users/whedon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whedon/subscriptions","organizations_url":"https://api.github.com/users/whedon/orgs","repos_url":"https://api.github.com/users/whedon/repos","events_url":"https://api.github.com/users/whedon/events{/privacy}","received_events_url":"https://api.github.com/users/whedon/received_events","type":"User","site_admin":false},"labels":[{"id":330461591,"node_id":"MDU6TGFiZWwzMzA0NjE1OTE=","url":"https://api.github.com/repos/openjournals/joss-reviews/labels/accepted","name":"accepted","color":"159818","default":false,"description":null},{"id":1880544947,"node_id":"MDU6TGFiZWwxODgwNTQ0OTQ3","url":"https://api.github.com/repos/openjournals/joss-reviews/labels/published","name":"published","color":"e276d8","default":false,"description":"Papers - published in JOSS"},{"id":1880543836,"node_id":"MDU6TGFiZWwxODgwNTQzODM2","url":"https://api.github.com/repos/openjournals/joss-reviews/labels/recommend-accept","name":"recommend-accept","color":"b9f9a9","default":false,"description":"Papers - recommended for acceptance in JOSS."},{"id":330465313,"node_id":"MDU6TGFiZWwzMzA0NjUzMTM=","url":"https://api.github.com/repos/openjournals/joss-reviews/labels/review","name":"review","color":"fbca04","default":false,"description":null}],"state":"closed","locked":false,"assignee":{"login":"kyleniemeyer","id":190432,"node_id":"MDQ6VXNlcjE5MDQzMg==","avatar_url":"https://avatars.githubusercontent.com/u/190432?v=4","gravatar_id":"","url":"https://api.github.com/users/kyleniemeyer","html_url":"https://github.com/kyleniemeyer","followers_url":"https://api.github.com/users/kyleniemeyer/followers","following_url":"https://api.github.com/users/kyleniemeyer/following{/other_user}","gists_url":"https://api.github.com/users/kyleniemeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleniemeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleniemeyer/subscriptions","organizations_url":"https://api.github.com/users/kyleniemeyer/orgs","repos_url":"https://api.github.com/users/kyleniemeyer/repos","events_url":"https://api.github.com/users/kyleniemeyer/events{/privacy}","received_events_url":"https://api.github.com/users/kyleniemeyer/received_events","type":"User","site_admin":false},"assignees":[{"login":"kyleniemeyer","id":190432,"node_id":"MDQ6VXNlcjE5MDQzMg==","avatar_url":"https://avatars.githubusercontent.com/u/190432?v=4","gravatar_id":"","url":"https://api.github.com/users/kyleniemeyer","html_url":"https://github.com/kyleniemeyer","followers_url":"https://api.github.com/users/kyleniemeyer/followers","following_url":"https://api.github.com/users/kyleniemeyer/following{/other_user}","gists_url":"https://api.github.com/users/kyleniemeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleniemeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleniemeyer/subscriptions","organizations_url":"https://api.github.com/users/kyleniemeyer/orgs","repos_url":"https://api.github.com/users/kyleniemeyer/repos","events_url":"https://api.github.com/users/kyleniemeyer/events{/privacy}","received_events_url":"https://api.github.com/users/kyleniemeyer/received_events","type":"User","site_admin":false},{"login":"nicoguaro","id":1097787,"node_id":"MDQ6VXNlcjEwOTc3ODc=","avatar_url":"https://avatars.githubusercontent.com/u/1097787?v=4","gravatar_id":"","url":"https://api.github.com/users/nicoguaro","html_url":"https://github.com/nicoguaro","followers_url":"https://api.github.com/users/nicoguaro/followers","following_url":"https://api.github.com/users/nicoguaro/following{/other_user}","gists_url":"https://api.github.com/users/nicoguaro/gists{/gist_id}","starred_url":"https://api.github.com/users/nicoguaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicoguaro/subscriptions","organizations_url":"https://api.github.com/users/nicoguaro/orgs","repos_url":"https://api.github.com/users/nicoguaro/repos","events_url":"https://api.github.com/users/nicoguaro/events{/privacy}","received_events_url":"https://api.github.com/users/nicoguaro/received_events","type":"User","site_admin":false},{"login":"mtezzele","id":8956946,"node_id":"MDQ6VXNlcjg5NTY5NDY=","avatar_url":"https://avatars.githubusercontent.com/u/8956946?v=4","gravatar_id":"","url":"https://api.github.com/users/mtezzele","html_url":"https://github.com/mtezzele","followers_url":"https://api.github.com/users/mtezzele/followers","following_url":"https://api.github.com/users/mtezzele/following{/other_user}","gists_url":"https://api.github.com/users/mtezzele/gists{/gist_id}","starred_url":"https://api.github.com/users/mtezzele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtezzele/subscriptions","organizations_url":"https://api.github.com/users/mtezzele/orgs","repos_url":"https://api.github.com/users/mtezzele/repos","events_url":"https://api.github.com/users/mtezzele/events{/privacy}","received_events_url":"https://api.github.com/users/mtezzele/received_events","type":"User","site_admin":false}],"milestone":null,"comments":28,"created_at":"2016-09-22T14:46:47Z","updated_at":"2021-02-14T16:46:54Z","closed_at":"2016-09-29T19:17:28Z","author_association":"COLLABORATOR","active_lock_reason":null,"body":"**Submitting + string: '{"url":"https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79","repository_url":"https://api.github.com/repos/openjournals/joss-reviews-testing","labels_url":"https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/comments","events_url":"https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/events","html_url":"https://github.com/openjournals/joss-reviews-testing/issues/79","id":178630651,"node_id":"MDU6SXNzdWUxNzg2MzA2NTE=","number":79,"title":"[REVIEW]: + Python Active-subspaces Utility Library","user":{"login":"whedon","id":18508068,"node_id":"MDQ6VXNlcjE4NTA4MDY4","avatar_url":"https://avatars.githubusercontent.com/u/18508068?v=4","gravatar_id":"","url":"https://api.github.com/users/whedon","html_url":"https://github.com/whedon","followers_url":"https://api.github.com/users/whedon/followers","following_url":"https://api.github.com/users/whedon/following{/other_user}","gists_url":"https://api.github.com/users/whedon/gists{/gist_id}","starred_url":"https://api.github.com/users/whedon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whedon/subscriptions","organizations_url":"https://api.github.com/users/whedon/orgs","repos_url":"https://api.github.com/users/whedon/repos","events_url":"https://api.github.com/users/whedon/events{/privacy}","received_events_url":"https://api.github.com/users/whedon/received_events","type":"User","site_admin":false},"labels":[{"id":330461591,"node_id":"MDU6TGFiZWwzMzA0NjE1OTE=","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/accepted","name":"accepted","color":"159818","default":false,"description":null},{"id":1880544947,"node_id":"MDU6TGFiZWwxODgwNTQ0OTQ3","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/published","name":"published","color":"e276d8","default":false,"description":"Papers + published in JOSS"},{"id":1880543836,"node_id":"MDU6TGFiZWwxODgwNTQzODM2","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/recommend-accept","name":"recommend-accept","color":"b9f9a9","default":false,"description":"Papers + recommended for acceptance in JOSS."},{"id":330465313,"node_id":"MDU6TGFiZWwzMzA0NjUzMTM=","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/review","name":"review","color":"fbca04","default":false,"description":null}],"state":"closed","locked":false,"assignee":{"login":"kyleniemeyer","id":190432,"node_id":"MDQ6VXNlcjE5MDQzMg==","avatar_url":"https://avatars.githubusercontent.com/u/190432?v=4","gravatar_id":"","url":"https://api.github.com/users/kyleniemeyer","html_url":"https://github.com/kyleniemeyer","followers_url":"https://api.github.com/users/kyleniemeyer/followers","following_url":"https://api.github.com/users/kyleniemeyer/following{/other_user}","gists_url":"https://api.github.com/users/kyleniemeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleniemeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleniemeyer/subscriptions","organizations_url":"https://api.github.com/users/kyleniemeyer/orgs","repos_url":"https://api.github.com/users/kyleniemeyer/repos","events_url":"https://api.github.com/users/kyleniemeyer/events{/privacy}","received_events_url":"https://api.github.com/users/kyleniemeyer/received_events","type":"User","site_admin":false},"assignees":[{"login":"kyleniemeyer","id":190432,"node_id":"MDQ6VXNlcjE5MDQzMg==","avatar_url":"https://avatars.githubusercontent.com/u/190432?v=4","gravatar_id":"","url":"https://api.github.com/users/kyleniemeyer","html_url":"https://github.com/kyleniemeyer","followers_url":"https://api.github.com/users/kyleniemeyer/followers","following_url":"https://api.github.com/users/kyleniemeyer/following{/other_user}","gists_url":"https://api.github.com/users/kyleniemeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleniemeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleniemeyer/subscriptions","organizations_url":"https://api.github.com/users/kyleniemeyer/orgs","repos_url":"https://api.github.com/users/kyleniemeyer/repos","events_url":"https://api.github.com/users/kyleniemeyer/events{/privacy}","received_events_url":"https://api.github.com/users/kyleniemeyer/received_events","type":"User","site_admin":false},{"login":"nicoguaro","id":1097787,"node_id":"MDQ6VXNlcjEwOTc3ODc=","avatar_url":"https://avatars.githubusercontent.com/u/1097787?v=4","gravatar_id":"","url":"https://api.github.com/users/nicoguaro","html_url":"https://github.com/nicoguaro","followers_url":"https://api.github.com/users/nicoguaro/followers","following_url":"https://api.github.com/users/nicoguaro/following{/other_user}","gists_url":"https://api.github.com/users/nicoguaro/gists{/gist_id}","starred_url":"https://api.github.com/users/nicoguaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicoguaro/subscriptions","organizations_url":"https://api.github.com/users/nicoguaro/orgs","repos_url":"https://api.github.com/users/nicoguaro/repos","events_url":"https://api.github.com/users/nicoguaro/events{/privacy}","received_events_url":"https://api.github.com/users/nicoguaro/received_events","type":"User","site_admin":false},{"login":"mtezzele","id":8956946,"node_id":"MDQ6VXNlcjg5NTY5NDY=","avatar_url":"https://avatars.githubusercontent.com/u/8956946?v=4","gravatar_id":"","url":"https://api.github.com/users/mtezzele","html_url":"https://github.com/mtezzele","followers_url":"https://api.github.com/users/mtezzele/followers","following_url":"https://api.github.com/users/mtezzele/following{/other_user}","gists_url":"https://api.github.com/users/mtezzele/gists{/gist_id}","starred_url":"https://api.github.com/users/mtezzele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtezzele/subscriptions","organizations_url":"https://api.github.com/users/mtezzele/orgs","repos_url":"https://api.github.com/users/mtezzele/repos","events_url":"https://api.github.com/users/mtezzele/events{/privacy}","received_events_url":"https://api.github.com/users/mtezzele/received_events","type":"User","site_admin":false}],"milestone":null,"comments":28,"created_at":"2016-09-22T14:46:47Z","updated_at":"2021-02-14T16:46:54Z","closed_at":"2016-09-29T19:17:28Z","author_association":"COLLABORATOR","active_lock_reason":null,"body":"**Submitting author:** @paulcon (Paul Constantine)\n**Repository:** https://github.com/paulcon/active_subspaces\n**Version:** @@ -111,7 +111,7 @@ http_interactions: verified?\n- [x] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\n### Software paper\n\nPaper PDF: - [10.21105.joss.00079.pdf](https://github.com/openjournals/joss-reviews/files/487592/10.21105.joss.00079.pdf)\n- + [10.21105.joss.00079.pdf](https://github.com/openjournals/joss-reviews-testing/files/487592/10.21105.joss.00079.pdf)\n- [x] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\n- [x] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience diff --git a/spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_percent_complete_value.yml b/spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_percent_complete_value.yml index a7299d557..0a9a44f8c 100644 --- a/spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_percent_complete_value.yml +++ b/spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_percent_complete_value.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://api.github.com/repos/openjournals/joss-reviews/issues/79 + uri: https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79 body: encoding: US-ASCII string: '' @@ -68,10 +68,10 @@ http_interactions: - C273:1A30:84ACF0E:9200497:602AE9C1 body: encoding: ASCII-8BIT - string: '{"url":"https://api.github.com/repos/openjournals/joss-reviews/issues/79","repository_url":"https://api.github.com/repos/openjournals/joss-reviews","labels_url":"https://api.github.com/repos/openjournals/joss-reviews/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/openjournals/joss-reviews/issues/79/comments","events_url":"https://api.github.com/repos/openjournals/joss-reviews/issues/79/events","html_url":"https://github.com/openjournals/joss-reviews/issues/79","id":178630651,"node_id":"MDU6SXNzdWUxNzg2MzA2NTE=","number":79,"title":"[REVIEW]: - Python Active-subspaces Utility Library","user":{"login":"whedon","id":18508068,"node_id":"MDQ6VXNlcjE4NTA4MDY4","avatar_url":"https://avatars.githubusercontent.com/u/18508068?v=4","gravatar_id":"","url":"https://api.github.com/users/whedon","html_url":"https://github.com/whedon","followers_url":"https://api.github.com/users/whedon/followers","following_url":"https://api.github.com/users/whedon/following{/other_user}","gists_url":"https://api.github.com/users/whedon/gists{/gist_id}","starred_url":"https://api.github.com/users/whedon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whedon/subscriptions","organizations_url":"https://api.github.com/users/whedon/orgs","repos_url":"https://api.github.com/users/whedon/repos","events_url":"https://api.github.com/users/whedon/events{/privacy}","received_events_url":"https://api.github.com/users/whedon/received_events","type":"User","site_admin":false},"labels":[{"id":330461591,"node_id":"MDU6TGFiZWwzMzA0NjE1OTE=","url":"https://api.github.com/repos/openjournals/joss-reviews/labels/accepted","name":"accepted","color":"159818","default":false,"description":null},{"id":1880544947,"node_id":"MDU6TGFiZWwxODgwNTQ0OTQ3","url":"https://api.github.com/repos/openjournals/joss-reviews/labels/published","name":"published","color":"e276d8","default":false,"description":"Papers - published in JOSS"},{"id":1880543836,"node_id":"MDU6TGFiZWwxODgwNTQzODM2","url":"https://api.github.com/repos/openjournals/joss-reviews/labels/recommend-accept","name":"recommend-accept","color":"b9f9a9","default":false,"description":"Papers - recommended for acceptance in JOSS."},{"id":330465313,"node_id":"MDU6TGFiZWwzMzA0NjUzMTM=","url":"https://api.github.com/repos/openjournals/joss-reviews/labels/review","name":"review","color":"fbca04","default":false,"description":null}],"state":"closed","locked":false,"assignee":{"login":"kyleniemeyer","id":190432,"node_id":"MDQ6VXNlcjE5MDQzMg==","avatar_url":"https://avatars.githubusercontent.com/u/190432?v=4","gravatar_id":"","url":"https://api.github.com/users/kyleniemeyer","html_url":"https://github.com/kyleniemeyer","followers_url":"https://api.github.com/users/kyleniemeyer/followers","following_url":"https://api.github.com/users/kyleniemeyer/following{/other_user}","gists_url":"https://api.github.com/users/kyleniemeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleniemeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleniemeyer/subscriptions","organizations_url":"https://api.github.com/users/kyleniemeyer/orgs","repos_url":"https://api.github.com/users/kyleniemeyer/repos","events_url":"https://api.github.com/users/kyleniemeyer/events{/privacy}","received_events_url":"https://api.github.com/users/kyleniemeyer/received_events","type":"User","site_admin":false},"assignees":[{"login":"kyleniemeyer","id":190432,"node_id":"MDQ6VXNlcjE5MDQzMg==","avatar_url":"https://avatars.githubusercontent.com/u/190432?v=4","gravatar_id":"","url":"https://api.github.com/users/kyleniemeyer","html_url":"https://github.com/kyleniemeyer","followers_url":"https://api.github.com/users/kyleniemeyer/followers","following_url":"https://api.github.com/users/kyleniemeyer/following{/other_user}","gists_url":"https://api.github.com/users/kyleniemeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleniemeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleniemeyer/subscriptions","organizations_url":"https://api.github.com/users/kyleniemeyer/orgs","repos_url":"https://api.github.com/users/kyleniemeyer/repos","events_url":"https://api.github.com/users/kyleniemeyer/events{/privacy}","received_events_url":"https://api.github.com/users/kyleniemeyer/received_events","type":"User","site_admin":false},{"login":"nicoguaro","id":1097787,"node_id":"MDQ6VXNlcjEwOTc3ODc=","avatar_url":"https://avatars.githubusercontent.com/u/1097787?v=4","gravatar_id":"","url":"https://api.github.com/users/nicoguaro","html_url":"https://github.com/nicoguaro","followers_url":"https://api.github.com/users/nicoguaro/followers","following_url":"https://api.github.com/users/nicoguaro/following{/other_user}","gists_url":"https://api.github.com/users/nicoguaro/gists{/gist_id}","starred_url":"https://api.github.com/users/nicoguaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicoguaro/subscriptions","organizations_url":"https://api.github.com/users/nicoguaro/orgs","repos_url":"https://api.github.com/users/nicoguaro/repos","events_url":"https://api.github.com/users/nicoguaro/events{/privacy}","received_events_url":"https://api.github.com/users/nicoguaro/received_events","type":"User","site_admin":false},{"login":"mtezzele","id":8956946,"node_id":"MDQ6VXNlcjg5NTY5NDY=","avatar_url":"https://avatars.githubusercontent.com/u/8956946?v=4","gravatar_id":"","url":"https://api.github.com/users/mtezzele","html_url":"https://github.com/mtezzele","followers_url":"https://api.github.com/users/mtezzele/followers","following_url":"https://api.github.com/users/mtezzele/following{/other_user}","gists_url":"https://api.github.com/users/mtezzele/gists{/gist_id}","starred_url":"https://api.github.com/users/mtezzele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtezzele/subscriptions","organizations_url":"https://api.github.com/users/mtezzele/orgs","repos_url":"https://api.github.com/users/mtezzele/repos","events_url":"https://api.github.com/users/mtezzele/events{/privacy}","received_events_url":"https://api.github.com/users/mtezzele/received_events","type":"User","site_admin":false}],"milestone":null,"comments":28,"created_at":"2016-09-22T14:46:47Z","updated_at":"2021-02-14T16:46:54Z","closed_at":"2016-09-29T19:17:28Z","author_association":"COLLABORATOR","active_lock_reason":null,"body":"**Submitting + string: '{"url":"https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79","repository_url":"https://api.github.com/repos/openjournals/joss-reviews-testing","labels_url":"https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/comments","events_url":"https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/events","html_url":"https://github.com/openjournals/joss-reviews-testing/issues/79","id":178630651,"node_id":"MDU6SXNzdWUxNzg2MzA2NTE=","number":79,"title":"[REVIEW]: + Python Active-subspaces Utility Library","user":{"login":"whedon","id":18508068,"node_id":"MDQ6VXNlcjE4NTA4MDY4","avatar_url":"https://avatars.githubusercontent.com/u/18508068?v=4","gravatar_id":"","url":"https://api.github.com/users/whedon","html_url":"https://github.com/whedon","followers_url":"https://api.github.com/users/whedon/followers","following_url":"https://api.github.com/users/whedon/following{/other_user}","gists_url":"https://api.github.com/users/whedon/gists{/gist_id}","starred_url":"https://api.github.com/users/whedon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whedon/subscriptions","organizations_url":"https://api.github.com/users/whedon/orgs","repos_url":"https://api.github.com/users/whedon/repos","events_url":"https://api.github.com/users/whedon/events{/privacy}","received_events_url":"https://api.github.com/users/whedon/received_events","type":"User","site_admin":false},"labels":[{"id":330461591,"node_id":"MDU6TGFiZWwzMzA0NjE1OTE=","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/accepted","name":"accepted","color":"159818","default":false,"description":null},{"id":1880544947,"node_id":"MDU6TGFiZWwxODgwNTQ0OTQ3","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/published","name":"published","color":"e276d8","default":false,"description":"Papers + published in JOSS"},{"id":1880543836,"node_id":"MDU6TGFiZWwxODgwNTQzODM2","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/recommend-accept","name":"recommend-accept","color":"b9f9a9","default":false,"description":"Papers + recommended for acceptance in JOSS."},{"id":330465313,"node_id":"MDU6TGFiZWwzMzA0NjUzMTM=","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/review","name":"review","color":"fbca04","default":false,"description":null}],"state":"closed","locked":false,"assignee":{"login":"kyleniemeyer","id":190432,"node_id":"MDQ6VXNlcjE5MDQzMg==","avatar_url":"https://avatars.githubusercontent.com/u/190432?v=4","gravatar_id":"","url":"https://api.github.com/users/kyleniemeyer","html_url":"https://github.com/kyleniemeyer","followers_url":"https://api.github.com/users/kyleniemeyer/followers","following_url":"https://api.github.com/users/kyleniemeyer/following{/other_user}","gists_url":"https://api.github.com/users/kyleniemeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleniemeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleniemeyer/subscriptions","organizations_url":"https://api.github.com/users/kyleniemeyer/orgs","repos_url":"https://api.github.com/users/kyleniemeyer/repos","events_url":"https://api.github.com/users/kyleniemeyer/events{/privacy}","received_events_url":"https://api.github.com/users/kyleniemeyer/received_events","type":"User","site_admin":false},"assignees":[{"login":"kyleniemeyer","id":190432,"node_id":"MDQ6VXNlcjE5MDQzMg==","avatar_url":"https://avatars.githubusercontent.com/u/190432?v=4","gravatar_id":"","url":"https://api.github.com/users/kyleniemeyer","html_url":"https://github.com/kyleniemeyer","followers_url":"https://api.github.com/users/kyleniemeyer/followers","following_url":"https://api.github.com/users/kyleniemeyer/following{/other_user}","gists_url":"https://api.github.com/users/kyleniemeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleniemeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleniemeyer/subscriptions","organizations_url":"https://api.github.com/users/kyleniemeyer/orgs","repos_url":"https://api.github.com/users/kyleniemeyer/repos","events_url":"https://api.github.com/users/kyleniemeyer/events{/privacy}","received_events_url":"https://api.github.com/users/kyleniemeyer/received_events","type":"User","site_admin":false},{"login":"nicoguaro","id":1097787,"node_id":"MDQ6VXNlcjEwOTc3ODc=","avatar_url":"https://avatars.githubusercontent.com/u/1097787?v=4","gravatar_id":"","url":"https://api.github.com/users/nicoguaro","html_url":"https://github.com/nicoguaro","followers_url":"https://api.github.com/users/nicoguaro/followers","following_url":"https://api.github.com/users/nicoguaro/following{/other_user}","gists_url":"https://api.github.com/users/nicoguaro/gists{/gist_id}","starred_url":"https://api.github.com/users/nicoguaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicoguaro/subscriptions","organizations_url":"https://api.github.com/users/nicoguaro/orgs","repos_url":"https://api.github.com/users/nicoguaro/repos","events_url":"https://api.github.com/users/nicoguaro/events{/privacy}","received_events_url":"https://api.github.com/users/nicoguaro/received_events","type":"User","site_admin":false},{"login":"mtezzele","id":8956946,"node_id":"MDQ6VXNlcjg5NTY5NDY=","avatar_url":"https://avatars.githubusercontent.com/u/8956946?v=4","gravatar_id":"","url":"https://api.github.com/users/mtezzele","html_url":"https://github.com/mtezzele","followers_url":"https://api.github.com/users/mtezzele/followers","following_url":"https://api.github.com/users/mtezzele/following{/other_user}","gists_url":"https://api.github.com/users/mtezzele/gists{/gist_id}","starred_url":"https://api.github.com/users/mtezzele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtezzele/subscriptions","organizations_url":"https://api.github.com/users/mtezzele/orgs","repos_url":"https://api.github.com/users/mtezzele/repos","events_url":"https://api.github.com/users/mtezzele/events{/privacy}","received_events_url":"https://api.github.com/users/mtezzele/received_events","type":"User","site_admin":false}],"milestone":null,"comments":28,"created_at":"2016-09-22T14:46:47Z","updated_at":"2021-02-14T16:46:54Z","closed_at":"2016-09-29T19:17:28Z","author_association":"COLLABORATOR","active_lock_reason":null,"body":"**Submitting author:** @paulcon (Paul Constantine)\n**Repository:** https://github.com/paulcon/active_subspaces\n**Version:** @@ -111,7 +111,7 @@ http_interactions: verified?\n- [ ] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\n### Software paper\n\nPaper PDF: - [10.21105.joss.00079.pdf](https://github.com/openjournals/joss-reviews/files/487592/10.21105.joss.00079.pdf)\n- + [10.21105.joss.00079.pdf](https://github.com/openjournals/joss-reviews-testing/files/487592/10.21105.joss.00079.pdf)\n- [x] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\n- [x] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience diff --git a/spec/fixtures/editor-pre-review-comment.json b/spec/fixtures/editor-pre-review-comment.json index 860565fc8..f5293a88d 100644 --- a/spec/fixtures/editor-pre-review-comment.json +++ b/spec/fixtures/editor-pre-review-comment.json @@ -1,12 +1,12 @@ { "action": "created", "issue": { - "url": "https://api.github.com/repos/openjournals/joss-reviews/issues/78", - "repository_url": "https://api.github.com/repos/openjournals/joss-reviews", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/78/labels{/name}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/78/comments", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/78/events", - "html_url": "https://github.com/openjournals/joss-reviews/issues/78", + "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/78", + "repository_url": "https://api.github.com/repos/openjournals/joss-reviews-testing", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/78/labels{/name}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/78/comments", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/78/events", + "html_url": "https://github.com/openjournals/joss-reviews-testing/issues/78", "id": 365218525, "node_id": "MDU6SXNzdWUzNjUyMTg1MjU=", "number": 78, @@ -49,9 +49,9 @@ "body": "**Submitting author:** @editor (Robert Gieseke)\r\n**Repository:** https://github.com/editor/fidgit\r\n**Version:** v1.0.1\r\n**Editor:** @editor\r\n**Reviewers:** @Robot\r\n\r\n**Author instructions**\r\n\r\nThanks for submitting your paper to JOSS @rgieseke. The JOSS editor (shown at the top of this issue) will work with you on this issue to find a reviewer for your submission before creating the main review issue.\r\n\r\n@rgieseke if you have any suggestions for potential reviewers then please mention them here in this thread. In addition, [this list of people](https://github.com/openjournals/joss/blob/master/docs/reviewers.csv) have already agreed to review for JOSS and may be suitable for this submission.\r\n\r\n**Editor instructions**\r\n\r\nThe JOSS submission bot @whedon is here to help you find and assign reviewers and start the main review. To find out what @whedon can do for you type:\r\n\r\n```\r\n@whedon commands\r\n```\r\n\r\n " }, "comment": { - "url": "https://api.github.com/repos/openjournals/joss-reviews/issues/comments/425715160", - "html_url": "https://github.com/openjournals/joss-reviews/issues/78#issuecomment-425715160", - "issue_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/78", + "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/comments/425715160", + "html_url": "https://github.com/openjournals/joss-reviews-testing/issues/78#issuecomment-425715160", + "issue_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/78", "id": 425715160, "node_id": "MDEyOklzc3VlQ29tbWVudDQyNTcxNTE2MA==", "user": { @@ -82,8 +82,8 @@ "repository": { "id": 59520368, "node_id": "MDEwOlJlcG9zaXRvcnk1OTUyMDM2OA==", - "name": "joss-reviews", - "full_name": "openjournals/joss-reviews", + "name": "joss-reviews-testing", + "full_name": "openjournals/joss-reviews-testing", "private": true, "owner": { "login": "openjournals", @@ -105,53 +105,53 @@ "type": "Organization", "site_admin": false }, - "html_url": "https://github.com/openjournals/joss-reviews", + "html_url": "https://github.com/openjournals/joss-reviews-testing", "description": null, "fork": false, - "url": "https://api.github.com/repos/openjournals/joss-reviews", - "forks_url": "https://api.github.com/repos/openjournals/joss-reviews/forks", - "keys_url": "https://api.github.com/repos/openjournals/joss-reviews/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/openjournals/joss-reviews/teams", - "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews/hooks", - "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/events{/number}", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews/events", - "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews/assignees{/user}", - "branches_url": "https://api.github.com/repos/openjournals/joss-reviews/branches{/branch}", - "tags_url": "https://api.github.com/repos/openjournals/joss-reviews/tags", - "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/openjournals/joss-reviews/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews/statuses/{sha}", - "languages_url": "https://api.github.com/repos/openjournals/joss-reviews/languages", - "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews/stargazers", - "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews/contributors", - "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews/subscribers", - "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews/subscription", - "commits_url": "https://api.github.com/repos/openjournals/joss-reviews/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/openjournals/joss-reviews/contents/{+path}", - "compare_url": "https://api.github.com/repos/openjournals/joss-reviews/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/openjournals/joss-reviews/merges", - "archive_url": "https://api.github.com/repos/openjournals/joss-reviews/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews/downloads", - "issues_url": "https://api.github.com/repos/openjournals/joss-reviews/issues{/number}", - "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews/pulls{/number}", - "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews/milestones{/number}", - "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/labels{/name}", - "releases_url": "https://api.github.com/repos/openjournals/joss-reviews/releases{/id}", - "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews/deployments", + "url": "https://api.github.com/repos/openjournals/joss-reviews-testing", + "forks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/forks", + "keys_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/teams", + "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/hooks", + "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/events{/number}", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/events", + "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/assignees{/user}", + "branches_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/branches{/branch}", + "tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/tags", + "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/statuses/{sha}", + "languages_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/languages", + "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/stargazers", + "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contributors", + "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscribers", + "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscription", + "commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contents/{+path}", + "compare_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/merges", + "archive_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/downloads", + "issues_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues{/number}", + "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/pulls{/number}", + "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/milestones{/number}", + "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/labels{/name}", + "releases_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/releases{/id}", + "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/deployments", "created_at": "2016-05-23T21:43:02Z", "updated_at": "2017-11-13T19:56:15Z", "pushed_at": "2018-09-09T21:24:53Z", - "git_url": "git://github.com/openjournals/joss-reviews.git", - "ssh_url": "git@github.com:openjournals/joss-reviews.git", - "clone_url": "https://github.com/openjournals/joss-reviews.git", - "svn_url": "https://github.com/openjournals/joss-reviews", + "git_url": "git://github.com/openjournals/joss-reviews-testing.git", + "ssh_url": "git@github.com:openjournals/joss-reviews-testing.git", + "clone_url": "https://github.com/openjournals/joss-reviews-testing.git", + "svn_url": "https://github.com/openjournals/joss-reviews-testing", "homepage": null, "size": 3, "stargazers_count": 0, diff --git a/spec/fixtures/editor-review-comment.json b/spec/fixtures/editor-review-comment.json index b47a30a21..3fe74d2af 100644 --- a/spec/fixtures/editor-review-comment.json +++ b/spec/fixtures/editor-review-comment.json @@ -1,12 +1,12 @@ { "action": "created", "issue": { - "url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79", - "repository_url": "https://api.github.com/repos/openjournals/joss-reviews", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/labels{/name}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/comments", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/events", - "html_url": "https://github.com/openjournals/joss-reviews/issues/79", + "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79", + "repository_url": "https://api.github.com/repos/openjournals/joss-reviews-testing", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/labels{/name}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/comments", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/events", + "html_url": "https://github.com/openjournals/joss-reviews-testing/issues/79", "id": 365218525, "node_id": "MDU6SXNzdWUzNjUyMTg1MjU=", "number": 79, @@ -49,9 +49,9 @@ "body": "**Submitting author:** @editor (Robert Gieseke)\r\n**Repository:** https://github.com/editor/fidgit\r\n**Version:** v1.0.1\r\n**Editor:** @editor\r\n**Reviewers:** @Robot\r\n\r\n**Author instructions**\r\n\r\nThanks for submitting your paper to JOSS @rgieseke. The JOSS editor (shown at the top of this issue) will work with you on this issue to find a reviewer for your submission before creating the main review issue.\r\n\r\n@rgieseke if you have any suggestions for potential reviewers then please mention them here in this thread. In addition, [this list of people](https://github.com/openjournals/joss/blob/master/docs/reviewers.csv) have already agreed to review for JOSS and may be suitable for this submission.\r\n\r\n**Editor instructions**\r\n\r\nThe JOSS submission bot @whedon is here to help you find and assign reviewers and start the main review. To find out what @whedon can do for you type:\r\n\r\n```\r\n@whedon commands\r\n```\r\n\r\n " }, "comment": { - "url": "https://api.github.com/repos/openjournals/joss-reviews/issues/comments/425715160", - "html_url": "https://github.com/openjournals/joss-reviews/issues/79#issuecomment-425715160", - "issue_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79", + "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/comments/425715160", + "html_url": "https://github.com/openjournals/joss-reviews-testing/issues/79#issuecomment-425715160", + "issue_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79", "id": 425715160, "node_id": "MDEyOklzc3VlQ29tbWVudDQyNTcxNTE2MA==", "user": { @@ -82,8 +82,8 @@ "repository": { "id": 59520368, "node_id": "MDEwOlJlcG9zaXRvcnk1OTUyMDM2OA==", - "name": "joss-reviews", - "full_name": "openjournals/joss-reviews", + "name": "joss-reviews-testing", + "full_name": "openjournals/joss-reviews-testing", "private": true, "owner": { "login": "openjournals", @@ -105,53 +105,53 @@ "type": "Organization", "site_admin": false }, - "html_url": "https://github.com/openjournals/joss-reviews", + "html_url": "https://github.com/openjournals/joss-reviews-testing", "description": null, "fork": false, - "url": "https://api.github.com/repos/openjournals/joss-reviews", - "forks_url": "https://api.github.com/repos/openjournals/joss-reviews/forks", - "keys_url": "https://api.github.com/repos/openjournals/joss-reviews/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/openjournals/joss-reviews/teams", - "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews/hooks", - "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/events{/number}", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews/events", - "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews/assignees{/user}", - "branches_url": "https://api.github.com/repos/openjournals/joss-reviews/branches{/branch}", - "tags_url": "https://api.github.com/repos/openjournals/joss-reviews/tags", - "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/openjournals/joss-reviews/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews/statuses/{sha}", - "languages_url": "https://api.github.com/repos/openjournals/joss-reviews/languages", - "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews/stargazers", - "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews/contributors", - "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews/subscribers", - "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews/subscription", - "commits_url": "https://api.github.com/repos/openjournals/joss-reviews/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/openjournals/joss-reviews/contents/{+path}", - "compare_url": "https://api.github.com/repos/openjournals/joss-reviews/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/openjournals/joss-reviews/merges", - "archive_url": "https://api.github.com/repos/openjournals/joss-reviews/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews/downloads", - "issues_url": "https://api.github.com/repos/openjournals/joss-reviews/issues{/number}", - "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews/pulls{/number}", - "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews/milestones{/number}", - "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/labels{/name}", - "releases_url": "https://api.github.com/repos/openjournals/joss-reviews/releases{/id}", - "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews/deployments", + "url": "https://api.github.com/repos/openjournals/joss-reviews-testing", + "forks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/forks", + "keys_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/teams", + "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/hooks", + "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/events{/number}", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/events", + "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/assignees{/user}", + "branches_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/branches{/branch}", + "tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/tags", + "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/statuses/{sha}", + "languages_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/languages", + "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/stargazers", + "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contributors", + "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscribers", + "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscription", + "commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contents/{+path}", + "compare_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/merges", + "archive_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/downloads", + "issues_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues{/number}", + "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/pulls{/number}", + "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/milestones{/number}", + "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/labels{/name}", + "releases_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/releases{/id}", + "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/deployments", "created_at": "2016-05-23T21:43:02Z", "updated_at": "2017-11-13T19:56:15Z", "pushed_at": "2018-09-09T21:24:53Z", - "git_url": "git://github.com/openjournals/joss-reviews.git", - "ssh_url": "git@github.com:openjournals/joss-reviews.git", - "clone_url": "https://github.com/openjournals/joss-reviews.git", - "svn_url": "https://github.com/openjournals/joss-reviews", + "git_url": "git://github.com/openjournals/joss-reviews-testing.git", + "ssh_url": "git@github.com:openjournals/joss-reviews-testing.git", + "clone_url": "https://github.com/openjournals/joss-reviews-testing.git", + "svn_url": "https://github.com/openjournals/joss-reviews-testing", "homepage": null, "size": 3, "stargazers_count": 0, diff --git a/spec/fixtures/review-body-79.json b/spec/fixtures/review-body-79.json index a97d256bc..dd386c15e 100644 --- a/spec/fixtures/review-body-79.json +++ b/spec/fixtures/review-body-79.json @@ -1,10 +1,10 @@ { "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79", - "repository_url": "https://api.github.com/repos/openjournals/joss-reviews-testing-testing", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing-testing/issues/79/labels{/name}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing-testing/issues/79/comments", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing-testing/issues/79/events", - "html_url": "https://github.com/openjournals/joss-reviews-testing-testing/issues/79", + "repository_url": "https://api.github.com/repos/openjournals/joss-reviews-testing", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/labels{/name}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/comments", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/events", + "html_url": "https://github.com/openjournals/joss-reviews-testing/issues/79", "id": 178630651, "node_id": "MDU6SXNzdWUxNzg2MzA2NTE=", "number": 79, diff --git a/spec/fixtures/whedon-pre-review-comment.json b/spec/fixtures/whedon-pre-review-comment.json index 24bfb8669..1b3241774 100644 --- a/spec/fixtures/whedon-pre-review-comment.json +++ b/spec/fixtures/whedon-pre-review-comment.json @@ -1,12 +1,12 @@ { "action": "created", "issue": { - "url": "https://api.github.com/repos/openjournals/joss-reviews/issues/78", - "repository_url": "https://api.github.com/repos/openjournals/joss-reviews", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/78/labels{/name}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/78/comments", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/78/events", - "html_url": "https://github.com/openjournals/joss-reviews/issues/78", + "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/78", + "repository_url": "https://api.github.com/repos/openjournals/joss-reviews-testing", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/78/labels{/name}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/78/comments", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/78/events", + "html_url": "https://github.com/openjournals/joss-reviews-testing/issues/78", "id": 365218525, "node_id": "MDU6SXNzdWUzNjUyMTg1MjU=", "number": 78, @@ -49,9 +49,9 @@ "body": "**Submitting author:** @arfon (Robert Gieseke)\r\n**Repository:** https://github.com/arfon/fidgit\r\n**Version:** v1.0.1\r\n**Editor:** @arfon\r\n**Reviewers:** @Robot\r\n\r\n**Author instructions**\r\n\r\nThanks for submitting your paper to JOSS @rgieseke. The JOSS editor (shown at the top of this issue) will work with you on this issue to find a reviewer for your submission before creating the main review issue.\r\n\r\n@rgieseke if you have any suggestions for potential reviewers then please mention them here in this thread. In addition, [this list of people](https://github.com/openjournals/joss/blob/master/docs/reviewers.csv) have already agreed to review for JOSS and may be suitable for this submission.\r\n\r\n**Editor instructions**\r\n\r\nThe JOSS submission bot @whedon is here to help you find and assign reviewers and start the main review. To find out what @whedon can do for you type:\r\n\r\n```\r\n@whedon commands\r\n```\r\n\r\n " }, "comment": { - "url": "https://api.github.com/repos/openjournals/joss-reviews/issues/comments/425715160", - "html_url": "https://github.com/openjournals/joss-reviews/issues/78#issuecomment-425715160", - "issue_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/78", + "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/comments/425715160", + "html_url": "https://github.com/openjournals/joss-reviews-testing/issues/78#issuecomment-425715160", + "issue_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/78", "id": 425715160, "node_id": "MDEyOklzc3VlQ29tbWVudDQyNTcxNTE2MA==", "user": { @@ -82,8 +82,8 @@ "repository": { "id": 59520368, "node_id": "MDEwOlJlcG9zaXRvcnk1OTUyMDM2OA==", - "name": "joss-reviews", - "full_name": "openjournals/joss-reviews", + "name": "joss-reviews-testing", + "full_name": "openjournals/joss-reviews-testing", "private": true, "owner": { "login": "openjournals", @@ -105,53 +105,53 @@ "type": "Organization", "site_admin": false }, - "html_url": "https://github.com/openjournals/joss-reviews", + "html_url": "https://github.com/openjournals/joss-reviews-testing", "description": null, "fork": false, - "url": "https://api.github.com/repos/openjournals/joss-reviews", - "forks_url": "https://api.github.com/repos/openjournals/joss-reviews/forks", - "keys_url": "https://api.github.com/repos/openjournals/joss-reviews/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/openjournals/joss-reviews/teams", - "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews/hooks", - "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/events{/number}", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews/events", - "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews/assignees{/user}", - "branches_url": "https://api.github.com/repos/openjournals/joss-reviews/branches{/branch}", - "tags_url": "https://api.github.com/repos/openjournals/joss-reviews/tags", - "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/openjournals/joss-reviews/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews/statuses/{sha}", - "languages_url": "https://api.github.com/repos/openjournals/joss-reviews/languages", - "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews/stargazers", - "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews/contributors", - "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews/subscribers", - "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews/subscription", - "commits_url": "https://api.github.com/repos/openjournals/joss-reviews/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/openjournals/joss-reviews/contents/{+path}", - "compare_url": "https://api.github.com/repos/openjournals/joss-reviews/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/openjournals/joss-reviews/merges", - "archive_url": "https://api.github.com/repos/openjournals/joss-reviews/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews/downloads", - "issues_url": "https://api.github.com/repos/openjournals/joss-reviews/issues{/number}", - "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews/pulls{/number}", - "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews/milestones{/number}", - "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/labels{/name}", - "releases_url": "https://api.github.com/repos/openjournals/joss-reviews/releases{/id}", - "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews/deployments", + "url": "https://api.github.com/repos/openjournals/joss-reviews-testing", + "forks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/forks", + "keys_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/teams", + "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/hooks", + "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/events{/number}", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/events", + "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/assignees{/user}", + "branches_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/branches{/branch}", + "tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/tags", + "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/statuses/{sha}", + "languages_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/languages", + "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/stargazers", + "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contributors", + "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscribers", + "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscription", + "commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contents/{+path}", + "compare_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/merges", + "archive_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/downloads", + "issues_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues{/number}", + "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/pulls{/number}", + "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/milestones{/number}", + "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/labels{/name}", + "releases_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/releases{/id}", + "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/deployments", "created_at": "2016-05-23T21:43:02Z", "updated_at": "2017-11-13T19:56:15Z", "pushed_at": "2018-09-09T21:24:53Z", - "git_url": "git://github.com/openjournals/joss-reviews.git", - "ssh_url": "git@github.com:openjournals/joss-reviews.git", - "clone_url": "https://github.com/openjournals/joss-reviews.git", - "svn_url": "https://github.com/openjournals/joss-reviews", + "git_url": "git://github.com/openjournals/joss-reviews-testing.git", + "ssh_url": "git@github.com:openjournals/joss-reviews-testing.git", + "clone_url": "https://github.com/openjournals/joss-reviews-testing.git", + "svn_url": "https://github.com/openjournals/joss-reviews-testing", "homepage": null, "size": 3, "stargazers_count": 0, diff --git a/spec/fixtures/whedon-pre-review-opened.json b/spec/fixtures/whedon-pre-review-opened.json index 0a5949b2f..85a21d4a6 100644 --- a/spec/fixtures/whedon-pre-review-opened.json +++ b/spec/fixtures/whedon-pre-review-opened.json @@ -1,12 +1,12 @@ { "action": "opened", "issue": { - "url": "https://api.github.com/repos/openjournals/joss-reviews/issues/78", - "repository_url": "https://api.github.com/repos/openjournals/joss-reviews", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/78/labels{/name}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/78/comments", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/78/events", - "html_url": "https://github.com/openjournals/joss-reviews/issues/78", + "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/78", + "repository_url": "https://api.github.com/repos/openjournals/joss-reviews-testing", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/78/labels{/name}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/78/comments", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/78/events", + "html_url": "https://github.com/openjournals/joss-reviews-testing/issues/78", "id": 365218525, "node_id": "MDU6SXNzdWUzNjUyMTg1MjU=", "number": 78, @@ -51,8 +51,8 @@ "repository": { "id": 59520368, "node_id": "MDEwOlJlcG9zaXRvcnk1OTUyMDM2OA==", - "name": "joss-reviews", - "full_name": "openjournals/joss-reviews", + "name": "joss-reviews-testing", + "full_name": "openjournals/joss-reviews-testing", "private": true, "owner": { "login": "openjournals", @@ -74,53 +74,53 @@ "type": "Organization", "site_admin": false }, - "html_url": "https://github.com/openjournals/joss-reviews", + "html_url": "https://github.com/openjournals/joss-reviews-testing", "description": null, "fork": false, - "url": "https://api.github.com/repos/openjournals/joss-reviews", - "forks_url": "https://api.github.com/repos/openjournals/joss-reviews/forks", - "keys_url": "https://api.github.com/repos/openjournals/joss-reviews/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/openjournals/joss-reviews/teams", - "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews/hooks", - "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/events{/number}", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews/events", - "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews/assignees{/user}", - "branches_url": "https://api.github.com/repos/openjournals/joss-reviews/branches{/branch}", - "tags_url": "https://api.github.com/repos/openjournals/joss-reviews/tags", - "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/openjournals/joss-reviews/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews/statuses/{sha}", - "languages_url": "https://api.github.com/repos/openjournals/joss-reviews/languages", - "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews/stargazers", - "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews/contributors", - "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews/subscribers", - "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews/subscription", - "commits_url": "https://api.github.com/repos/openjournals/joss-reviews/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/openjournals/joss-reviews/contents/{+path}", - "compare_url": "https://api.github.com/repos/openjournals/joss-reviews/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/openjournals/joss-reviews/merges", - "archive_url": "https://api.github.com/repos/openjournals/joss-reviews/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews/downloads", - "issues_url": "https://api.github.com/repos/openjournals/joss-reviews/issues{/number}", - "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews/pulls{/number}", - "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews/milestones{/number}", - "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/labels{/name}", - "releases_url": "https://api.github.com/repos/openjournals/joss-reviews/releases{/id}", - "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews/deployments", + "url": "https://api.github.com/repos/openjournals/joss-reviews-testing", + "forks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/forks", + "keys_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/teams", + "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/hooks", + "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/events{/number}", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/events", + "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/assignees{/user}", + "branches_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/branches{/branch}", + "tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/tags", + "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/statuses/{sha}", + "languages_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/languages", + "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/stargazers", + "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contributors", + "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscribers", + "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscription", + "commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contents/{+path}", + "compare_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/merges", + "archive_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/downloads", + "issues_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues{/number}", + "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/pulls{/number}", + "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/milestones{/number}", + "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/labels{/name}", + "releases_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/releases{/id}", + "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/deployments", "created_at": "2016-05-23T21:43:02Z", "updated_at": "2017-11-13T19:56:15Z", "pushed_at": "2018-09-09T21:24:53Z", - "git_url": "git://github.com/openjournals/joss-reviews.git", - "ssh_url": "git@github.com:openjournals/joss-reviews.git", - "clone_url": "https://github.com/openjournals/joss-reviews.git", - "svn_url": "https://github.com/openjournals/joss-reviews", + "git_url": "git://github.com/openjournals/joss-reviews-testing.git", + "ssh_url": "git@github.com:openjournals/joss-reviews-testing.git", + "clone_url": "https://github.com/openjournals/joss-reviews-testing.git", + "svn_url": "https://github.com/openjournals/joss-reviews-testing", "homepage": null, "size": 3, "stargazers_count": 0, diff --git a/spec/fixtures/whedon-review-comment.json b/spec/fixtures/whedon-review-comment.json index 7d32355ba..170e50563 100644 --- a/spec/fixtures/whedon-review-comment.json +++ b/spec/fixtures/whedon-review-comment.json @@ -1,12 +1,12 @@ { "action": "created", "issue": { - "url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79", - "repository_url": "https://api.github.com/repos/openjournals/joss-reviews", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/labels{/name}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/comments", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/events", - "html_url": "https://github.com/openjournals/joss-reviews/issues/79", + "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79", + "repository_url": "https://api.github.com/repos/openjournals/joss-reviews-testing", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/labels{/name}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/comments", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/events", + "html_url": "https://github.com/openjournals/joss-reviews-testing/issues/79", "id": 365218525, "node_id": "MDU6SXNzdWUzNjUyMTg1MjU=", "number": 79, @@ -49,9 +49,9 @@ "body": "**Submitting author:** @arfon (Robert Gieseke)\r\n**Repository:** https://github.com/arfon/fidgit\r\n**Version:** v1.0.1\r\n**Editor:** @arfon\r\n**Reviewers:** @Robot\r\n\r\n**Author instructions**\r\n\r\nThanks for submitting your paper to JOSS @rgieseke. The JOSS editor (shown at the top of this issue) will work with you on this issue to find a reviewer for your submission before creating the main review issue.\r\n\r\n@rgieseke if you have any suggestions for potential reviewers then please mention them here in this thread. In addition, [this list of people](https://github.com/openjournals/joss/blob/master/docs/reviewers.csv) have already agreed to review for JOSS and may be suitable for this submission.\r\n\r\n**Editor instructions**\r\n\r\nThe JOSS submission bot @whedon is here to help you find and assign reviewers and start the main review. To find out what @whedon can do for you type:\r\n\r\n```\r\n@whedon commands\r\n```\r\n\r\n " }, "comment": { - "url": "https://api.github.com/repos/openjournals/joss-reviews/issues/comments/425715160", - "html_url": "https://github.com/openjournals/joss-reviews/issues/79#issuecomment-425715160", - "issue_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79", + "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/comments/425715160", + "html_url": "https://github.com/openjournals/joss-reviews-testing/issues/79#issuecomment-425715160", + "issue_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79", "id": 425715160, "node_id": "MDEyOklzc3VlQ29tbWVudDQyNTcxNTE2MA==", "user": { @@ -82,8 +82,8 @@ "repository": { "id": 59520368, "node_id": "MDEwOlJlcG9zaXRvcnk1OTUyMDM2OA==", - "name": "joss-reviews", - "full_name": "openjournals/joss-reviews", + "name": "joss-reviews-testing", + "full_name": "openjournals/joss-reviews-testing", "private": true, "owner": { "login": "openjournals", @@ -105,53 +105,53 @@ "type": "Organization", "site_admin": false }, - "html_url": "https://github.com/openjournals/joss-reviews", + "html_url": "https://github.com/openjournals/joss-reviews-testing", "description": null, "fork": false, - "url": "https://api.github.com/repos/openjournals/joss-reviews", - "forks_url": "https://api.github.com/repos/openjournals/joss-reviews/forks", - "keys_url": "https://api.github.com/repos/openjournals/joss-reviews/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/openjournals/joss-reviews/teams", - "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews/hooks", - "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/events{/number}", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews/events", - "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews/assignees{/user}", - "branches_url": "https://api.github.com/repos/openjournals/joss-reviews/branches{/branch}", - "tags_url": "https://api.github.com/repos/openjournals/joss-reviews/tags", - "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/openjournals/joss-reviews/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews/statuses/{sha}", - "languages_url": "https://api.github.com/repos/openjournals/joss-reviews/languages", - "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews/stargazers", - "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews/contributors", - "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews/subscribers", - "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews/subscription", - "commits_url": "https://api.github.com/repos/openjournals/joss-reviews/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/openjournals/joss-reviews/contents/{+path}", - "compare_url": "https://api.github.com/repos/openjournals/joss-reviews/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/openjournals/joss-reviews/merges", - "archive_url": "https://api.github.com/repos/openjournals/joss-reviews/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews/downloads", - "issues_url": "https://api.github.com/repos/openjournals/joss-reviews/issues{/number}", - "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews/pulls{/number}", - "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews/milestones{/number}", - "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/labels{/name}", - "releases_url": "https://api.github.com/repos/openjournals/joss-reviews/releases{/id}", - "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews/deployments", + "url": "https://api.github.com/repos/openjournals/joss-reviews-testing", + "forks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/forks", + "keys_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/teams", + "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/hooks", + "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/events{/number}", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/events", + "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/assignees{/user}", + "branches_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/branches{/branch}", + "tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/tags", + "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/statuses/{sha}", + "languages_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/languages", + "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/stargazers", + "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contributors", + "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscribers", + "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscription", + "commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contents/{+path}", + "compare_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/merges", + "archive_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/downloads", + "issues_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues{/number}", + "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/pulls{/number}", + "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/milestones{/number}", + "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/labels{/name}", + "releases_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/releases{/id}", + "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/deployments", "created_at": "2016-05-23T21:43:02Z", "updated_at": "2017-11-13T19:56:15Z", "pushed_at": "2018-09-09T21:24:53Z", - "git_url": "git://github.com/openjournals/joss-reviews.git", - "ssh_url": "git@github.com:openjournals/joss-reviews.git", - "clone_url": "https://github.com/openjournals/joss-reviews.git", - "svn_url": "https://github.com/openjournals/joss-reviews", + "git_url": "git://github.com/openjournals/joss-reviews-testing.git", + "ssh_url": "git@github.com:openjournals/joss-reviews-testing.git", + "clone_url": "https://github.com/openjournals/joss-reviews-testing.git", + "svn_url": "https://github.com/openjournals/joss-reviews-testing", "homepage": null, "size": 3, "stargazers_count": 0, diff --git a/spec/fixtures/whedon-review-edit.json b/spec/fixtures/whedon-review-edit.json index 154e30cdf..1008789a4 100644 --- a/spec/fixtures/whedon-review-edit.json +++ b/spec/fixtures/whedon-review-edit.json @@ -1,12 +1,12 @@ { "action": "edited", "issue": { - "url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79", - "repository_url": "https://api.github.com/repos/openjournals/joss-reviews", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/labels{/name}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/comments", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/events", - "html_url": "https://github.com/openjournals/joss-reviews/issues/79", + "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79", + "repository_url": "https://api.github.com/repos/openjournals/joss-reviews-testing", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/labels{/name}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/comments", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/events", + "html_url": "https://github.com/openjournals/joss-reviews-testing/issues/79", "id": 365232709, "node_id": "MDU6SXNzdWUzNjUyMzI3MDk=", "number": 79, @@ -35,7 +35,7 @@ { "id": 330465313, "node_id": "MDU6TGFiZWwzMzA0NjUzMTM=", - "url": "https://api.github.com/repos/openjournals/joss-reviews/labels/review", + "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/labels/review", "name": "review", "color": "fbca04", "default": false @@ -91,18 +91,18 @@ "updated_at": "2018-10-06T16:18:56Z", "closed_at": null, "author_association": "COLLABORATOR", - "body": "**Submitting author:** @ifellows (Ian Fellows)\n**Repository:** https://github.com/fellstat/ipc\n**Version:** 0.1.0\n**Editor:** @yochannah\n**Reviewer:** @mschubert , @JohnCoene\n**Archive:** Pending\n\n## Status\n\n[![status](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230/status.svg)](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230)\n\nStatus badge code:\n\n```\nHTML: \nMarkdown: [![status](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230/status.svg)](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230)\n```\n**Reviewers and authors**:\n\nPlease avoid lengthy details of difficulties in the review thread. Instead, please create a new issue in the target repository and link to those issues (especially acceptance-blockers) in the review thread below. (For completists: if the target issue tracker is also on GitHub, linking the review thread in the issue or vice versa will create corresponding breadcrumb trails in the link target.)\n\n## Reviewer instructions & questions\n\n@mschubert & @JohnCoene, please carry out your review in this issue by updating the checklist below. If you cannot edit the checklist please:\n1. Make sure you're logged in to your GitHub account\n2. Be sure to accept the invite at this URL: https://github.com/openjournals/joss-reviews/invitations\n\nThe reviewer guidelines are available here: https://joss.theoj.org/about#reviewer_guidelines. Any questions/concerns please let @yochannah know.\n\n✨ **Please try and complete your review in the next two weeks** ✨ \n\n## Review checklist for @mschubert \n### Conflict of interest\n\n- [x] As the reviewer I confirm that I have read the [JOSS conflict of interest policy](https://github.com/openjournals/joss/blob/master/COI.md) and that there are no conflicts of interest for me to review this work.\n\n### Code of Conduct\n\n- [x] I confirm that I read and will adhere to the [JOSS code of conduct](https://joss.theoj.org/about#code_of_conduct).\n\n### General checks\n\n- [x] **Repository:** Is the source code for this software available at the repository url?\n- [ ] **License:** Does the repository contain a plain-text LICENSE file with the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) software license?\n- [ ] **Version:** Does the release version given match the GitHub release (0.1.0)?\n- [x] **Authorship:** Has the submitting author (@ifellows) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?\n\n### Functionality\n\n- [x] **Installation:** Does installation proceed as outlined in the documentation?\n- [x] **Functionality:** Have the functional claims of the software been confirmed?\n- [ ] **Performance:** If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)\n\n### Documentation\n\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.\n- [x] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).\n- [x] **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?\n- [ ] **Automated tests:** Are there automated tests or manual steps described so that the function of the software can be verified?\n- [ ] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\n\n### Software paper\n\n- [ ] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [ ] **References:** Do all archival references that should have a DOI list one (e.g., papers, datasets, software)?\n\n## Review checklist for @JohnCoene\n### Conflict of interest\n\n- [x] As the reviewer I confirm that I have read the [JOSS conflict of interest policy](https://github.com/openjournals/joss/blob/master/COI.md) and that there are no conflicts of interest for me to review this work.\n\n### Code of Conduct\n\n- [x] I confirm that I read and will adhere to the [JOSS code of conduct](https://joss.theoj.org/about#code_of_conduct).\n\n### General checks\n\n- [x] **Repository:** Is the source code for this software available at the repository url?\n- [x] **License:** Does the repository contain a plain-text LICENSE file with the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) software license?\n- [x] **Version:** Does the release version given match the GitHub release (0.1.0)?\n- [x] **Authorship:** Has the submitting author (@ifellows) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?\n\n### Functionality\n\n- [x] **Installation:** Does installation proceed as outlined in the documentation?\n- [ ] **Functionality:** Have the functional claims of the software been confirmed?\n- [ ] **Performance:** If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)\n\n### Documentation\n\n- [x] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.\n- [x] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).\n- [x] **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?\n- [x] **Automated tests:** Are there automated tests or manual steps described so that the function of the software can be verified?\n- [x] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\n\n### Software paper\n\n- [x] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\n- [x] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **References:** Do all archival references that should have a DOI list one (e.g., papers, datasets, software)?\n\n" + "body": "**Submitting author:** @ifellows (Ian Fellows)\n**Repository:** https://github.com/fellstat/ipc\n**Version:** 0.1.0\n**Editor:** @yochannah\n**Reviewer:** @mschubert , @JohnCoene\n**Archive:** Pending\n\n## Status\n\n[![status](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230/status.svg)](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230)\n\nStatus badge code:\n\n```\nHTML: \nMarkdown: [![status](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230/status.svg)](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230)\n```\n**Reviewers and authors**:\n\nPlease avoid lengthy details of difficulties in the review thread. Instead, please create a new issue in the target repository and link to those issues (especially acceptance-blockers) in the review thread below. (For completists: if the target issue tracker is also on GitHub, linking the review thread in the issue or vice versa will create corresponding breadcrumb trails in the link target.)\n\n## Reviewer instructions & questions\n\n@mschubert & @JohnCoene, please carry out your review in this issue by updating the checklist below. If you cannot edit the checklist please:\n1. Make sure you're logged in to your GitHub account\n2. Be sure to accept the invite at this URL: https://github.com/openjournals/joss-reviews-testing/invitations\n\nThe reviewer guidelines are available here: https://joss.theoj.org/about#reviewer_guidelines. Any questions/concerns please let @yochannah know.\n\n✨ **Please try and complete your review in the next two weeks** ✨ \n\n## Review checklist for @mschubert \n### Conflict of interest\n\n- [x] As the reviewer I confirm that I have read the [JOSS conflict of interest policy](https://github.com/openjournals/joss/blob/master/COI.md) and that there are no conflicts of interest for me to review this work.\n\n### Code of Conduct\n\n- [x] I confirm that I read and will adhere to the [JOSS code of conduct](https://joss.theoj.org/about#code_of_conduct).\n\n### General checks\n\n- [x] **Repository:** Is the source code for this software available at the repository url?\n- [ ] **License:** Does the repository contain a plain-text LICENSE file with the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) software license?\n- [ ] **Version:** Does the release version given match the GitHub release (0.1.0)?\n- [x] **Authorship:** Has the submitting author (@ifellows) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?\n\n### Functionality\n\n- [x] **Installation:** Does installation proceed as outlined in the documentation?\n- [x] **Functionality:** Have the functional claims of the software been confirmed?\n- [ ] **Performance:** If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)\n\n### Documentation\n\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.\n- [x] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).\n- [x] **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?\n- [ ] **Automated tests:** Are there automated tests or manual steps described so that the function of the software can be verified?\n- [ ] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\n\n### Software paper\n\n- [ ] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [ ] **References:** Do all archival references that should have a DOI list one (e.g., papers, datasets, software)?\n\n## Review checklist for @JohnCoene\n### Conflict of interest\n\n- [x] As the reviewer I confirm that I have read the [JOSS conflict of interest policy](https://github.com/openjournals/joss/blob/master/COI.md) and that there are no conflicts of interest for me to review this work.\n\n### Code of Conduct\n\n- [x] I confirm that I read and will adhere to the [JOSS code of conduct](https://joss.theoj.org/about#code_of_conduct).\n\n### General checks\n\n- [x] **Repository:** Is the source code for this software available at the repository url?\n- [x] **License:** Does the repository contain a plain-text LICENSE file with the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) software license?\n- [x] **Version:** Does the release version given match the GitHub release (0.1.0)?\n- [x] **Authorship:** Has the submitting author (@ifellows) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?\n\n### Functionality\n\n- [x] **Installation:** Does installation proceed as outlined in the documentation?\n- [ ] **Functionality:** Have the functional claims of the software been confirmed?\n- [ ] **Performance:** If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)\n\n### Documentation\n\n- [x] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.\n- [x] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).\n- [x] **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?\n- [x] **Automated tests:** Are there automated tests or manual steps described so that the function of the software can be verified?\n- [x] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\n\n### Software paper\n\n- [x] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\n- [x] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **References:** Do all archival references that should have a DOI list one (e.g., papers, datasets, software)?\n\n" }, "changes": { "body": { - "from": "**Submitting author:** @ifellows (Ian Fellows)\n**Repository:** https://github.com/fellstat/ipc\n**Version:** 0.1.0\n**Editor:** @yochannah\n**Reviewer:** @mschubert , @JohnCoene\n**Archive:** Pending\n\n## Status\n\n[![status](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230/status.svg)](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230)\n\nStatus badge code:\n\n```\nHTML: \nMarkdown: [![status](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230/status.svg)](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230)\n```\n**Reviewers and authors**:\n\nPlease avoid lengthy details of difficulties in the review thread. Instead, please create a new issue in the target repository and link to those issues (especially acceptance-blockers) in the review thread below. (For completists: if the target issue tracker is also on GitHub, linking the review thread in the issue or vice versa will create corresponding breadcrumb trails in the link target.)\n\n## Reviewer instructions & questions\n\n@mschubert & @JohnCoene, please carry out your review in this issue by updating the checklist below. If you cannot edit the checklist please:\n1. Make sure you're logged in to your GitHub account\n2. Be sure to accept the invite at this URL: https://github.com/openjournals/joss-reviews/invitations\n\nThe reviewer guidelines are available here: https://joss.theoj.org/about#reviewer_guidelines. Any questions/concerns please let @yochannah know.\n\n✨ **Please try and complete your review in the next two weeks** ✨ \n\n## Review checklist for @mschubert \n### Conflict of interest\n\n- [x] As the reviewer I confirm that I have read the [JOSS conflict of interest policy](https://github.com/openjournals/joss/blob/master/COI.md) and that there are no conflicts of interest for me to review this work.\n\n### Code of Conduct\n\n- [x] I confirm that I read and will adhere to the [JOSS code of conduct](https://joss.theoj.org/about#code_of_conduct).\n\n### General checks\n\n- [x] **Repository:** Is the source code for this software available at the repository url?\n- [ ] **License:** Does the repository contain a plain-text LICENSE file with the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) software license?\n- [ ] **Version:** Does the release version given match the GitHub release (0.1.0)?\n- [x] **Authorship:** Has the submitting author (@ifellows) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?\n\n### Functionality\n\n- [x] **Installation:** Does installation proceed as outlined in the documentation?\n- [ ] **Functionality:** Have the functional claims of the software been confirmed?\n- [ ] **Performance:** If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)\n\n### Documentation\n\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.\n- [x] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).\n- [x] **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?\n- [ ] **Automated tests:** Are there automated tests or manual steps described so that the function of the software can be verified?\n- [ ] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\n\n### Software paper\n\n- [ ] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [ ] **References:** Do all archival references that should have a DOI list one (e.g., papers, datasets, software)?\n\n## Review checklist for @JohnCoene\n### Conflict of interest\n\n- [x] As the reviewer I confirm that I have read the [JOSS conflict of interest policy](https://github.com/openjournals/joss/blob/master/COI.md) and that there are no conflicts of interest for me to review this work.\n\n### Code of Conduct\n\n- [x] I confirm that I read and will adhere to the [JOSS code of conduct](https://joss.theoj.org/about#code_of_conduct).\n\n### General checks\n\n- [x] **Repository:** Is the source code for this software available at the repository url?\n- [x] **License:** Does the repository contain a plain-text LICENSE file with the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) software license?\n- [x] **Version:** Does the release version given match the GitHub release (0.1.0)?\n- [x] **Authorship:** Has the submitting author (@ifellows) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?\n\n### Functionality\n\n- [x] **Installation:** Does installation proceed as outlined in the documentation?\n- [ ] **Functionality:** Have the functional claims of the software been confirmed?\n- [ ] **Performance:** If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)\n\n### Documentation\n\n- [x] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.\n- [x] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).\n- [x] **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?\n- [x] **Automated tests:** Are there automated tests or manual steps described so that the function of the software can be verified?\n- [x] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\n\n### Software paper\n\n- [x] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\n- [x] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **References:** Do all archival references that should have a DOI list one (e.g., papers, datasets, software)?\n\n" + "from": "**Submitting author:** @ifellows (Ian Fellows)\n**Repository:** https://github.com/fellstat/ipc\n**Version:** 0.1.0\n**Editor:** @yochannah\n**Reviewer:** @mschubert , @JohnCoene\n**Archive:** Pending\n\n## Status\n\n[![status](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230/status.svg)](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230)\n\nStatus badge code:\n\n```\nHTML: \nMarkdown: [![status](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230/status.svg)](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230)\n```\n**Reviewers and authors**:\n\nPlease avoid lengthy details of difficulties in the review thread. Instead, please create a new issue in the target repository and link to those issues (especially acceptance-blockers) in the review thread below. (For completists: if the target issue tracker is also on GitHub, linking the review thread in the issue or vice versa will create corresponding breadcrumb trails in the link target.)\n\n## Reviewer instructions & questions\n\n@mschubert & @JohnCoene, please carry out your review in this issue by updating the checklist below. If you cannot edit the checklist please:\n1. Make sure you're logged in to your GitHub account\n2. Be sure to accept the invite at this URL: https://github.com/openjournals/joss-reviews-testing/invitations\n\nThe reviewer guidelines are available here: https://joss.theoj.org/about#reviewer_guidelines. Any questions/concerns please let @yochannah know.\n\n✨ **Please try and complete your review in the next two weeks** ✨ \n\n## Review checklist for @mschubert \n### Conflict of interest\n\n- [x] As the reviewer I confirm that I have read the [JOSS conflict of interest policy](https://github.com/openjournals/joss/blob/master/COI.md) and that there are no conflicts of interest for me to review this work.\n\n### Code of Conduct\n\n- [x] I confirm that I read and will adhere to the [JOSS code of conduct](https://joss.theoj.org/about#code_of_conduct).\n\n### General checks\n\n- [x] **Repository:** Is the source code for this software available at the repository url?\n- [ ] **License:** Does the repository contain a plain-text LICENSE file with the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) software license?\n- [ ] **Version:** Does the release version given match the GitHub release (0.1.0)?\n- [x] **Authorship:** Has the submitting author (@ifellows) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?\n\n### Functionality\n\n- [x] **Installation:** Does installation proceed as outlined in the documentation?\n- [ ] **Functionality:** Have the functional claims of the software been confirmed?\n- [ ] **Performance:** If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)\n\n### Documentation\n\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.\n- [x] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).\n- [x] **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?\n- [ ] **Automated tests:** Are there automated tests or manual steps described so that the function of the software can be verified?\n- [ ] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\n\n### Software paper\n\n- [ ] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [ ] **References:** Do all archival references that should have a DOI list one (e.g., papers, datasets, software)?\n\n## Review checklist for @JohnCoene\n### Conflict of interest\n\n- [x] As the reviewer I confirm that I have read the [JOSS conflict of interest policy](https://github.com/openjournals/joss/blob/master/COI.md) and that there are no conflicts of interest for me to review this work.\n\n### Code of Conduct\n\n- [x] I confirm that I read and will adhere to the [JOSS code of conduct](https://joss.theoj.org/about#code_of_conduct).\n\n### General checks\n\n- [x] **Repository:** Is the source code for this software available at the repository url?\n- [x] **License:** Does the repository contain a plain-text LICENSE file with the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) software license?\n- [x] **Version:** Does the release version given match the GitHub release (0.1.0)?\n- [x] **Authorship:** Has the submitting author (@ifellows) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?\n\n### Functionality\n\n- [x] **Installation:** Does installation proceed as outlined in the documentation?\n- [ ] **Functionality:** Have the functional claims of the software been confirmed?\n- [ ] **Performance:** If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)\n\n### Documentation\n\n- [x] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.\n- [x] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).\n- [x] **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?\n- [x] **Automated tests:** Are there automated tests or manual steps described so that the function of the software can be verified?\n- [x] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\n\n### Software paper\n\n- [x] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\n- [x] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **References:** Do all archival references that should have a DOI list one (e.g., papers, datasets, software)?\n\n" } }, "repository": { "id": 52331602, "node_id": "MDEwOlJlcG9zaXRvcnk1MjMzMTYwMg==", - "name": "joss-reviews", - "full_name": "openjournals/joss-reviews", + "name": "joss-reviews-testing", + "full_name": "openjournals/joss-reviews-testing", "private": false, "owner": { "login": "openjournals", @@ -124,53 +124,53 @@ "type": "Organization", "site_admin": false }, - "html_url": "https://github.com/openjournals/joss-reviews", + "html_url": "https://github.com/openjournals/joss-reviews-testing", "description": "Reviews for The Journal of Open Source Software", "fork": false, - "url": "https://api.github.com/repos/openjournals/joss-reviews", - "forks_url": "https://api.github.com/repos/openjournals/joss-reviews/forks", - "keys_url": "https://api.github.com/repos/openjournals/joss-reviews/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/openjournals/joss-reviews/teams", - "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews/hooks", - "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/events{/number}", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews/events", - "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews/assignees{/user}", - "branches_url": "https://api.github.com/repos/openjournals/joss-reviews/branches{/branch}", - "tags_url": "https://api.github.com/repos/openjournals/joss-reviews/tags", - "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/openjournals/joss-reviews/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews/statuses/{sha}", - "languages_url": "https://api.github.com/repos/openjournals/joss-reviews/languages", - "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews/stargazers", - "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews/contributors", - "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews/subscribers", - "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews/subscription", - "commits_url": "https://api.github.com/repos/openjournals/joss-reviews/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/openjournals/joss-reviews/contents/{+path}", - "compare_url": "https://api.github.com/repos/openjournals/joss-reviews/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/openjournals/joss-reviews/merges", - "archive_url": "https://api.github.com/repos/openjournals/joss-reviews/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews/downloads", - "issues_url": "https://api.github.com/repos/openjournals/joss-reviews/issues{/number}", - "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews/pulls{/number}", - "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews/milestones{/number}", - "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/labels{/name}", - "releases_url": "https://api.github.com/repos/openjournals/joss-reviews/releases{/id}", - "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews/deployments", + "url": "https://api.github.com/repos/openjournals/joss-reviews-testing", + "forks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/forks", + "keys_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/teams", + "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/hooks", + "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/events{/number}", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/events", + "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/assignees{/user}", + "branches_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/branches{/branch}", + "tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/tags", + "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/statuses/{sha}", + "languages_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/languages", + "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/stargazers", + "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contributors", + "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscribers", + "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscription", + "commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contents/{+path}", + "compare_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/merges", + "archive_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/downloads", + "issues_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues{/number}", + "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/pulls{/number}", + "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/milestones{/number}", + "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/labels{/name}", + "releases_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/releases{/id}", + "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/deployments", "created_at": "2016-02-23T05:02:09Z", "updated_at": "2018-10-03T21:44:04Z", "pushed_at": "2018-09-07T11:40:43Z", - "git_url": "git://github.com/openjournals/joss-reviews.git", - "ssh_url": "git@github.com:openjournals/joss-reviews.git", - "clone_url": "https://github.com/openjournals/joss-reviews.git", - "svn_url": "https://github.com/openjournals/joss-reviews", + "git_url": "git://github.com/openjournals/joss-reviews-testing.git", + "ssh_url": "git@github.com:openjournals/joss-reviews-testing.git", + "clone_url": "https://github.com/openjournals/joss-reviews-testing.git", + "svn_url": "https://github.com/openjournals/joss-reviews-testing", "homepage": null, "size": 5, "stargazers_count": 142, diff --git a/spec/fixtures/whedon-review-labeled.json b/spec/fixtures/whedon-review-labeled.json index 0f2f2cee8..4bd165e56 100644 --- a/spec/fixtures/whedon-review-labeled.json +++ b/spec/fixtures/whedon-review-labeled.json @@ -1,12 +1,12 @@ { "action": "unlabeled", "issue": { - "url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79", - "repository_url": "https://api.github.com/repos/openjournals/joss-reviews", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/labels{/name}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/comments", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/events", - "html_url": "https://github.com/openjournals/joss-reviews/issues/79", + "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79", + "repository_url": "https://api.github.com/repos/openjournals/joss-reviews-testing", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/labels{/name}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/comments", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/events", + "html_url": "https://github.com/openjournals/joss-reviews-testing/issues/79", "id": 440505139, "node_id": "MDU6SXNzdWU0NDA1MDUxMzk=", "number": 79, @@ -35,7 +35,7 @@ { "id": 771671387, "node_id": "MDU6TGFiZWw3NzE2NzEzODc=", - "url": "https://api.github.com/repos/openjournals/joss-reviews/labels/accepted", + "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/labels/accepted", "name": "accepted", "color": "0052cc", "default": false @@ -116,7 +116,7 @@ "label": { "id": 381284424, "node_id": "MDU6TGFiZWwzODEyODQ0MjQ=", - "url": "https://api.github.com/repos/openjournals/joss-reviews/labels/bug", + "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/labels/bug", "name": "bug", "color": "ee0701", "default": true @@ -124,8 +124,8 @@ "repository": { "id": 59520368, "node_id": "MDEwOlJlcG9zaXRvcnk1OTUyMDM2OA==", - "name": "joss-reviews", - "full_name": "openjournals/joss-reviews", + "name": "joss-reviews-testing", + "full_name": "openjournals/joss-reviews-testing", "private": true, "owner": { "login": "openjournals", @@ -147,53 +147,53 @@ "type": "Organization", "site_admin": false }, - "html_url": "https://github.com/openjournals/joss-reviews", + "html_url": "https://github.com/openjournals/joss-reviews-testing", "description": null, "fork": false, - "url": "https://api.github.com/repos/openjournals/joss-reviews", - "forks_url": "https://api.github.com/repos/openjournals/joss-reviews/forks", - "keys_url": "https://api.github.com/repos/openjournals/joss-reviews/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/openjournals/joss-reviews/teams", - "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews/hooks", - "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/events{/number}", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews/events", - "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews/assignees{/user}", - "branches_url": "https://api.github.com/repos/openjournals/joss-reviews/branches{/branch}", - "tags_url": "https://api.github.com/repos/openjournals/joss-reviews/tags", - "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/openjournals/joss-reviews/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews/statuses/{sha}", - "languages_url": "https://api.github.com/repos/openjournals/joss-reviews/languages", - "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews/stargazers", - "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews/contributors", - "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews/subscribers", - "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews/subscription", - "commits_url": "https://api.github.com/repos/openjournals/joss-reviews/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/openjournals/joss-reviews/contents/{+path}", - "compare_url": "https://api.github.com/repos/openjournals/joss-reviews/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/openjournals/joss-reviews/merges", - "archive_url": "https://api.github.com/repos/openjournals/joss-reviews/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews/downloads", - "issues_url": "https://api.github.com/repos/openjournals/joss-reviews/issues{/number}", - "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews/pulls{/number}", - "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews/milestones{/number}", - "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/labels{/name}", - "releases_url": "https://api.github.com/repos/openjournals/joss-reviews/releases{/id}", - "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews/deployments", + "url": "https://api.github.com/repos/openjournals/joss-reviews-testing", + "forks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/forks", + "keys_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/teams", + "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/hooks", + "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/events{/number}", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/events", + "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/assignees{/user}", + "branches_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/branches{/branch}", + "tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/tags", + "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/statuses/{sha}", + "languages_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/languages", + "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/stargazers", + "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contributors", + "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscribers", + "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscription", + "commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contents/{+path}", + "compare_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/merges", + "archive_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/downloads", + "issues_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues{/number}", + "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/pulls{/number}", + "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/milestones{/number}", + "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/labels{/name}", + "releases_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/releases{/id}", + "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/deployments", "created_at": "2016-05-23T21:43:02Z", "updated_at": "2017-11-13T19:56:15Z", "pushed_at": "2018-09-09T21:24:53Z", - "git_url": "git://github.com/openjournals/joss-reviews.git", - "ssh_url": "git@github.com:openjournals/joss-reviews.git", - "clone_url": "https://github.com/openjournals/joss-reviews.git", - "svn_url": "https://github.com/openjournals/joss-reviews", + "git_url": "git://github.com/openjournals/joss-reviews-testing.git", + "ssh_url": "git@github.com:openjournals/joss-reviews-testing.git", + "clone_url": "https://github.com/openjournals/joss-reviews-testing.git", + "svn_url": "https://github.com/openjournals/joss-reviews-testing", "homepage": null, "size": 3, "stargazers_count": 0, diff --git a/spec/fixtures/whedon-review-opened.json b/spec/fixtures/whedon-review-opened.json index cdfe1242b..063a0b4f3 100644 --- a/spec/fixtures/whedon-review-opened.json +++ b/spec/fixtures/whedon-review-opened.json @@ -1,12 +1,12 @@ { "action": "opened", "issue": { - "url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79", - "repository_url": "https://api.github.com/repos/openjournals/joss-reviews", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/labels{/name}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/comments", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/79/events", - "html_url": "https://github.com/openjournals/joss-reviews/issues/79", + "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79", + "repository_url": "https://api.github.com/repos/openjournals/joss-reviews-testing", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/labels{/name}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/comments", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/events", + "html_url": "https://github.com/openjournals/joss-reviews-testing/issues/79", "id": 365218525, "node_id": "MDU6SXNzdWUzNjUyMTg1MjU=", "number": 79, @@ -51,8 +51,8 @@ "repository": { "id": 59520368, "node_id": "MDEwOlJlcG9zaXRvcnk1OTUyMDM2OA==", - "name": "joss-reviews", - "full_name": "openjournals/joss-reviews", + "name": "joss-reviews-testing", + "full_name": "openjournals/joss-reviews-testing", "private": true, "owner": { "login": "openjournals", @@ -74,53 +74,53 @@ "type": "Organization", "site_admin": false }, - "html_url": "https://github.com/openjournals/joss-reviews", + "html_url": "https://github.com/openjournals/joss-reviews-testing", "description": null, "fork": false, - "url": "https://api.github.com/repos/openjournals/joss-reviews", - "forks_url": "https://api.github.com/repos/openjournals/joss-reviews/forks", - "keys_url": "https://api.github.com/repos/openjournals/joss-reviews/keys{/key_id}", - "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews/collaborators{/collaborator}", - "teams_url": "https://api.github.com/repos/openjournals/joss-reviews/teams", - "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews/hooks", - "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/events{/number}", - "events_url": "https://api.github.com/repos/openjournals/joss-reviews/events", - "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews/assignees{/user}", - "branches_url": "https://api.github.com/repos/openjournals/joss-reviews/branches{/branch}", - "tags_url": "https://api.github.com/repos/openjournals/joss-reviews/tags", - "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/blobs{/sha}", - "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews/git/tags{/sha}", - "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews/git/refs{/sha}", - "trees_url": "https://api.github.com/repos/openjournals/joss-reviews/git/trees{/sha}", - "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews/statuses/{sha}", - "languages_url": "https://api.github.com/repos/openjournals/joss-reviews/languages", - "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews/stargazers", - "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews/contributors", - "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews/subscribers", - "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews/subscription", - "commits_url": "https://api.github.com/repos/openjournals/joss-reviews/commits{/sha}", - "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews/git/commits{/sha}", - "comments_url": "https://api.github.com/repos/openjournals/joss-reviews/comments{/number}", - "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews/issues/comments{/number}", - "contents_url": "https://api.github.com/repos/openjournals/joss-reviews/contents/{+path}", - "compare_url": "https://api.github.com/repos/openjournals/joss-reviews/compare/{base}...{head}", - "merges_url": "https://api.github.com/repos/openjournals/joss-reviews/merges", - "archive_url": "https://api.github.com/repos/openjournals/joss-reviews/{archive_format}{/ref}", - "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews/downloads", - "issues_url": "https://api.github.com/repos/openjournals/joss-reviews/issues{/number}", - "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews/pulls{/number}", - "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews/milestones{/number}", - "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews/notifications{?since,all,participating}", - "labels_url": "https://api.github.com/repos/openjournals/joss-reviews/labels{/name}", - "releases_url": "https://api.github.com/repos/openjournals/joss-reviews/releases{/id}", - "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews/deployments", + "url": "https://api.github.com/repos/openjournals/joss-reviews-testing", + "forks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/forks", + "keys_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/teams", + "hooks_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/hooks", + "issue_events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/events{/number}", + "events_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/events", + "assignees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/assignees{/user}", + "branches_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/branches{/branch}", + "tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/tags", + "blobs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/statuses/{sha}", + "languages_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/languages", + "stargazers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/stargazers", + "contributors_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contributors", + "subscribers_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscribers", + "subscription_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/subscription", + "commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/contents/{+path}", + "compare_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/merges", + "archive_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/downloads", + "issues_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues{/number}", + "pulls_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/pulls{/number}", + "milestones_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/milestones{/number}", + "notifications_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/labels{/name}", + "releases_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/releases{/id}", + "deployments_url": "https://api.github.com/repos/openjournals/joss-reviews-testing/deployments", "created_at": "2016-05-23T21:43:02Z", "updated_at": "2017-11-13T19:56:15Z", "pushed_at": "2018-09-09T21:24:53Z", - "git_url": "git://github.com/openjournals/joss-reviews.git", - "ssh_url": "git@github.com:openjournals/joss-reviews.git", - "clone_url": "https://github.com/openjournals/joss-reviews.git", - "svn_url": "https://github.com/openjournals/joss-reviews", + "git_url": "git://github.com/openjournals/joss-reviews-testing.git", + "ssh_url": "git@github.com:openjournals/joss-reviews-testing.git", + "clone_url": "https://github.com/openjournals/joss-reviews-testing.git", + "svn_url": "https://github.com/openjournals/joss-reviews-testing", "homepage": null, "size": 3, "stargazers_count": 0, From 7e69a606c4412fe9731bdb040a340979c98bb72a Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 15 Feb 2021 22:19:53 +0000 Subject: [PATCH 095/609] Removing Webmock --- Gemfile | 1 - Gemfile.lock | 8 -------- 2 files changed, 9 deletions(-) diff --git a/Gemfile b/Gemfile index 05ffdff98..29a323765 100644 --- a/Gemfile +++ b/Gemfile @@ -52,7 +52,6 @@ end group :test do gem 'vcr', '~> 3.0', '>= 3.0.1' - gem 'webmock', '~> 3.11.2' end group :development do diff --git a/Gemfile.lock b/Gemfile.lock index 1fe681a68..9096c56a1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -107,8 +107,6 @@ GEM commonmarker (0.21.1) ruby-enum (~> 0.5) concurrent-ruby (1.1.8) - crack (0.4.5) - rexml crass (1.0.6) declarative (0.0.20) declarative-option (0.1.0) @@ -192,7 +190,6 @@ GEM guard (~> 2.8) guard-compat (~> 1.0) multi_json (~> 1.8) - hashdiff (1.0.1) hashery (2.1.2) hashie (4.1.0) honeybadger (4.7.2) @@ -413,10 +410,6 @@ GEM activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webmock (3.11.2) - addressable (>= 2.3.6) - crack (>= 0.3.2) - hashdiff (>= 0.4.0, < 2.0.0) webrick (1.7.0) websocket-driver (0.7.3) websocket-extensions (>= 0.1.0) @@ -468,7 +461,6 @@ DEPENDENCIES unicorn (~> 5.8.0) vcr (~> 3.0, >= 3.0.1) web-console (~> 4.1.0) - webmock (~> 3.11.2) will_paginate! RUBY VERSION From ddae4a5cd20637b95ae4c70a6554b980cc7a08ba Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 17 Feb 2021 10:55:48 +0000 Subject: [PATCH 096/609] Remove email --- app/views/home/about.html.erb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/views/home/about.html.erb b/app/views/home/about.html.erb index b24141c78..335131dd0 100644 --- a/app/views/home/about.html.erb +++ b/app/views/home/about.html.erb @@ -70,10 +70,7 @@

Contact <%= setting(:abbreviation) %>

-

    -
  • To suggest a feature or report a bug in <%= setting(:abbreviation) %>, please open a GitHub Issue
  • -
  • To contact the <%= setting(:abbreviation) %> staff, please email us
  • -
+ To suggest a feature, report a bug, or enquire about a possible submission in <%= setting(:abbreviation) %>, please open a GitHub Issue.

From 5a6b865826187d50de19dbb9f1e56920f431433a Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Fri, 19 Feb 2021 09:35:48 +0000 Subject: [PATCH 097/609] Use new Sendgrid API --- config/environments/production.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index 0c282b95d..f40511011 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -120,8 +120,8 @@ # config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session config.action_mailer.smtp_settings = { - user_name: ENV["SENDGRID_USERNAME"], - password: ENV["SENDGRID_PASSWORD"], + user_name: 'apikey', + password: ENV["SENDGRID_API"], address: 'smtp.sendgrid.net', domain: 'briefideas.org', port: 587, From 7d5fca3485388d1ff87f5708d63fb2f176501cdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 19 Feb 2021 14:11:45 +0100 Subject: [PATCH 098/609] new Rails minor version --- Gemfile | 2 +- Gemfile.lock | 110 +++++++++++++++++++++++++-------------------------- 2 files changed, 56 insertions(+), 56 deletions(-) diff --git a/Gemfile b/Gemfile index 29a323765..06d5364bb 100644 --- a/Gemfile +++ b/Gemfile @@ -20,7 +20,7 @@ gem 'pg', '~> 1.2.3' # once this bug is fixed and Rails 6.1 is supported: # https://github.com/mislav/will_paginate/pull/619 gem 'will_paginate', git: "https://github.com/kvokka/will_paginate", branch: "fix-page_entries_info" -gem 'rails', '6.1.2.1' +gem 'rails', '6.1.3' gem 'responders' gem 'newrelic_rpm' gem 'sanitize', '~> 5.2.3' diff --git a/Gemfile.lock b/Gemfile.lock index 9096c56a1..2422cce48 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,40 +11,40 @@ GEM Ascii85 (1.1.0) aasm (5.0.8) concurrent-ruby (~> 1.0) - actioncable (6.1.2.1) - actionpack (= 6.1.2.1) - activesupport (= 6.1.2.1) + actioncable (6.1.3) + actionpack (= 6.1.3) + activesupport (= 6.1.3) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.2.1) - actionpack (= 6.1.2.1) - activejob (= 6.1.2.1) - activerecord (= 6.1.2.1) - activestorage (= 6.1.2.1) - activesupport (= 6.1.2.1) + actionmailbox (6.1.3) + actionpack (= 6.1.3) + activejob (= 6.1.3) + activerecord (= 6.1.3) + activestorage (= 6.1.3) + activesupport (= 6.1.3) mail (>= 2.7.1) - actionmailer (6.1.2.1) - actionpack (= 6.1.2.1) - actionview (= 6.1.2.1) - activejob (= 6.1.2.1) - activesupport (= 6.1.2.1) + actionmailer (6.1.3) + actionpack (= 6.1.3) + actionview (= 6.1.3) + activejob (= 6.1.3) + activesupport (= 6.1.3) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.2.1) - actionview (= 6.1.2.1) - activesupport (= 6.1.2.1) + actionpack (6.1.3) + actionview (= 6.1.3) + activesupport (= 6.1.3) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.2.1) - actionpack (= 6.1.2.1) - activerecord (= 6.1.2.1) - activestorage (= 6.1.2.1) - activesupport (= 6.1.2.1) + actiontext (6.1.3) + actionpack (= 6.1.3) + activerecord (= 6.1.3) + activestorage (= 6.1.3) + activesupport (= 6.1.3) nokogiri (>= 1.8.5) - actionview (6.1.2.1) - activesupport (= 6.1.2.1) + actionview (6.1.3) + activesupport (= 6.1.3) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -52,22 +52,22 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (6.1.2.1) - activesupport (= 6.1.2.1) + activejob (6.1.3) + activesupport (= 6.1.3) globalid (>= 0.3.6) - activemodel (6.1.2.1) - activesupport (= 6.1.2.1) - activerecord (6.1.2.1) - activemodel (= 6.1.2.1) - activesupport (= 6.1.2.1) - activestorage (6.1.2.1) - actionpack (= 6.1.2.1) - activejob (= 6.1.2.1) - activerecord (= 6.1.2.1) - activesupport (= 6.1.2.1) + activemodel (6.1.3) + activesupport (= 6.1.3) + activerecord (6.1.3) + activemodel (= 6.1.3) + activesupport (= 6.1.3) + activestorage (6.1.3) + actionpack (= 6.1.3) + activejob (= 6.1.3) + activerecord (= 6.1.3) + activesupport (= 6.1.3) marcel (~> 0.3.1) mimemagic (~> 0.3.2) - activesupport (6.1.2.1) + activesupport (6.1.3) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -198,7 +198,7 @@ GEM nokogiri (>= 1.4) http_parser.rb (0.6.0) httpclient (2.8.3) - i18n (1.8.8) + i18n (1.8.9) concurrent-ruby (~> 1.0) jquery-rails (4.4.0) rails-dom-testing (>= 1, < 3) @@ -289,20 +289,20 @@ GEM rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.1.2.1) - actioncable (= 6.1.2.1) - actionmailbox (= 6.1.2.1) - actionmailer (= 6.1.2.1) - actionpack (= 6.1.2.1) - actiontext (= 6.1.2.1) - actionview (= 6.1.2.1) - activejob (= 6.1.2.1) - activemodel (= 6.1.2.1) - activerecord (= 6.1.2.1) - activestorage (= 6.1.2.1) - activesupport (= 6.1.2.1) + rails (6.1.3) + actioncable (= 6.1.3) + actionmailbox (= 6.1.3) + actionmailer (= 6.1.3) + actionpack (= 6.1.3) + actiontext (= 6.1.3) + actionview (= 6.1.3) + activejob (= 6.1.3) + activemodel (= 6.1.3) + activerecord (= 6.1.3) + activestorage (= 6.1.3) + activesupport (= 6.1.3) bundler (>= 1.15.0) - railties (= 6.1.2.1) + railties (= 6.1.3) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -313,9 +313,9 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - railties (6.1.2.1) - actionpack (= 6.1.2.1) - activesupport (= 6.1.2.1) + railties (6.1.3) + actionpack (= 6.1.3) + activesupport (= 6.1.3) method_source rake (>= 0.8.7) thor (~> 1.0) @@ -448,7 +448,7 @@ DEPENDENCIES pg (~> 1.2.3) pry-byebug rack-livereload - rails (= 6.1.2.1) + rails (= 6.1.3) rails-controller-testing (~> 1.0.5) responders rspec-rails (~> 4.0.2) From ace4425de0bb0fc39d8d89c28972b6aade6b6786 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 22 Feb 2021 14:01:43 +0100 Subject: [PATCH 099/609] show editor's availability --- app/views/editors/show.html.erb | 4 ++++ spec/factories/editors.rb | 1 + spec/views/editors/edit.html.erb_spec.rb | 1 + spec/views/editors/show.html.erb_spec.rb | 1 + 4 files changed, 7 insertions(+) diff --git a/app/views/editors/show.html.erb b/app/views/editors/show.html.erb index 652b29e26..cf7d0cf6b 100644 --- a/app/views/editors/show.html.erb +++ b/app/views/editors/show.html.erb @@ -54,6 +54,10 @@ <%= @editor.description.html_safe %>

+

+ Availability: <%= @editor.availability.try(:capitalize) %> +

+ From 0e266d8b9b3c7b068fcc0447a90f9d9a519fe735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 22 Feb 2021 14:03:11 +0100 Subject: [PATCH 101/609] add availability_comment to editors --- app/controllers/editors_controller.rb | 2 +- app/views/editors/_form.html.erb | 4 ++++ app/views/editors/show.html.erb | 1 + .../20210222114454_add_availability_comment_to_editors.rb | 5 +++++ db/schema.rb | 3 ++- spec/views/editors/edit.html.erb_spec.rb | 1 + 6 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20210222114454_add_availability_comment_to_editors.rb diff --git a/app/controllers/editors_controller.rb b/app/controllers/editors_controller.rb index 11fd89172..2e39e3a6d 100644 --- a/app/controllers/editors_controller.rb +++ b/app/controllers/editors_controller.rb @@ -59,6 +59,6 @@ def set_editor end def editor_params - params.require(:editor).permit(:availability, :kind, :title, :first_name, :last_name, :login, :email, :avatar_url, :category_list, :url, :description) + params.require(:editor).permit(:availability, :availability_comment, :kind, :title, :first_name, :last_name, :login, :email, :avatar_url, :category_list, :url, :description) end end diff --git a/app/views/editors/_form.html.erb b/app/views/editors/_form.html.erb index cec690a50..e764319ff 100644 --- a/app/views/editors/_form.html.erb +++ b/app/views/editors/_form.html.erb @@ -23,6 +23,10 @@ <%= f.label :type, "Availability" %> <%= f.select :availability, Editor::AVAILABILITY_STATES, {}, class: "form-control" %> +
+ <%= f.label :type, "Comment on availability" %> + <%= f.text_field :availability_comment, class: "form-control" %> +
<%= f.label :title %> <%= f.text_field :title, disabled: @editor.kind != "board", class: "form-control" %> diff --git a/app/views/editors/show.html.erb b/app/views/editors/show.html.erb index cf7d0cf6b..6663d3e3e 100644 --- a/app/views/editors/show.html.erb +++ b/app/views/editors/show.html.erb @@ -56,6 +56,7 @@

Availability: <%= @editor.availability.try(:capitalize) %> + <%= @editor.availability_comment %>

From b9b484a8cb9b459ea22b1377e61baa5a6a4ddc3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 22 Feb 2021 15:44:26 +0100 Subject: [PATCH 105/609] more info to the editors list --- app/views/editors/index.html.erb | 19 ++++++++++++------- spec/factories/editors.rb | 1 + spec/views/editors/index.html.erb_spec.rb | 3 ++- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/app/views/editors/index.html.erb b/app/views/editors/index.html.erb index e55e98848..8094117e8 100644 --- a/app/views/editors/index.html.erb +++ b/app/views/editors/index.html.erb @@ -13,21 +13,26 @@
- + + - + <%- Editor.active.order('last_name ASC').each do |editor| %> - - - - + + + + + - diff --git a/spec/factories/editors.rb b/spec/factories/editors.rb index 362b74439..42d0deb08 100644 --- a/spec/factories/editors.rb +++ b/spec/factories/editors.rb @@ -10,5 +10,6 @@ url { "http://placekitten.com" } description { "Person McEditor is an editor" } availability { "available" } + availability_comment { "OOO until March 1" } end end diff --git a/spec/views/editors/index.html.erb_spec.rb b/spec/views/editors/index.html.erb_spec.rb index 60908fcd8..b29b6778f 100644 --- a/spec/views/editors/index.html.erb_spec.rb +++ b/spec/views/editors/index.html.erb_spec.rb @@ -7,8 +7,9 @@ it "renders a list of editors" do render - assert_select "tr>td:nth-of-type(1)", text: "Person McEditor", count: 2 + assert_select "tr>td:nth-of-type(1)", text: /Person McEditor/, count: 2 assert_select "tr>td:nth-of-type(2)", text: "mceditor", count: 2 assert_select "tr>td:nth-of-type(3)", text: "topic1, topic2, topic3", count: 2 + assert_select "tr>td:nth-of-type(5)", text: "Available OOO until March 1", count: 2 end end From 0e8f7e0d8c585c1c0255678e88a6c0eb9264d38b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 22 Feb 2021 15:44:54 +0100 Subject: [PATCH 106/609] new editor if created less than two months ago --- app/views/editors/index.html.erb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/editors/index.html.erb b/app/views/editors/index.html.erb index 8094117e8..a207cc94a 100644 --- a/app/views/editors/index.html.erb +++ b/app/views/editors/index.html.erb @@ -23,7 +23,10 @@ <%- Editor.active.order('last_name ASC').each do |editor| %> - + From 93c7677bc204c31538bac2439c1eb65c682032ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 23 Feb 2021 11:20:52 +0100 Subject: [PATCH 108/609] improve emeritus list --- app/views/editors/index.html.erb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/views/editors/index.html.erb b/app/views/editors/index.html.erb index 997c2b2a6..ab90bc9b5 100644 --- a/app/views/editors/index.html.erb +++ b/app/views/editors/index.html.erb @@ -61,21 +61,22 @@ - + - + <%- Editor.emeritus.order('last_name ASC').each do |editor| %> - - + + - + - From 8549941e9effa6ae3a8176910816df394efcd04d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 25 Feb 2021 12:34:35 +0100 Subject: [PATCH 109/609] reposition 'New editor' buttons --- app/assets/stylesheets/application.scss | 8 +++++--- app/views/editors/index.html.erb | 11 +++++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 6c61dbb5e..941bb6d13 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -409,8 +409,6 @@ TODO } } - - .pagination_helper { margin: 0.5em auto; display: block; @@ -727,7 +725,7 @@ $btn-primary-border: darken($btn-primary-bg, 5%) !default; background-color: #FFB500 !important; } -.paper-btn, .btn.paper-submit { +.action-btn, .paper-btn, .btn.paper-submit { background-color: #2E294E; color: #fff; font-weight: bold; @@ -745,6 +743,10 @@ $btn-primary-border: darken($btn-primary-bg, 5%) !default; } } +.action-btn{ + float: inline-end; + margin-bottom: 15px; +} .btn.orcid { background-color: #a6ce39 !important; diff --git a/app/views/editors/index.html.erb b/app/views/editors/index.html.erb index ab90bc9b5..a2e212c78 100644 --- a/app/views/editors/index.html.erb +++ b/app/views/editors/index.html.erb @@ -7,6 +7,9 @@ + + <%= link_to 'New Editor', new_editor_path, class: 'btn action-btn' %> +
StatusPaper titleStatusPaper title Scope Reviews Reviewers Last comment<%= sort_icon(@order) %><%= sort_icon(@order) %>
Name Login CategoriesDescriptionPaper loadAvailability Type
<%= editor.full_name %>><%= image_tag(avatar(editor.login), size: "24x24", class: "avatar", title: editor.login) %> <%= link_to editor.login, "/dashboard/#{editor.login}" %><% if editor.retired? %> (emeritus)<% end %><%= editor.category_list %><%= editor.description.html_safe %><%= link_to editor.full_name, editor, title: editor.description.html_safe %>> + <%= link_to image_tag(avatar(editor.login), size: "24x24", class: "avatar", title: github_user_link(editor.login)), github_user_link(editor.login), target: "_blank" %> + <%= editor.login %> + <% if editor.retired? %>(emeritus)<% end %> + <%= editor.category_list %><%= link_to in_progress_for_editor(Paper.in_progress.where(editor: editor)), "/dashboard/#{editor.login}" %><%= editor.availability.try(:capitalize) %> <%= editor.availability_comment %> <%= editor.kind %><%= link_to 'Show', editor %> <%= link_to 'Edit', edit_editor_path(editor) %> <%= link_to 'Destroy', editor, method: :delete, data: { confirm: 'Are you sure?' } %>
<%= link_to editor.full_name, editor, title: editor.description.html_safe %> + <%= link_to editor.full_name, editor, title: editor.description.html_safe %> + <%= "(new)" if editor.created_at > 2.months.ago %> + > <%= link_to image_tag(avatar(editor.login), size: "24x24", class: "avatar", title: github_user_link(editor.login)), github_user_link(editor.login), target: "_blank" %> <%= editor.login %> From 8ca8a0a99b07105812ce3f7ae4cd1fdbb0d9ab77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 23 Feb 2021 11:20:17 +0100 Subject: [PATCH 107/609] emeritus are not active --- app/views/editors/index.html.erb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/views/editors/index.html.erb b/app/views/editors/index.html.erb index a207cc94a..997c2b2a6 100644 --- a/app/views/editors/index.html.erb +++ b/app/views/editors/index.html.erb @@ -30,7 +30,6 @@ > <%= link_to image_tag(avatar(editor.login), size: "24x24", class: "avatar", title: github_user_link(editor.login)), github_user_link(editor.login), target: "_blank" %> <%= editor.login %> - <% if editor.retired? %>(emeritus)<% end %> <%= editor.category_list %> <%= link_to in_progress_for_editor(Paper.in_progress.where(editor: editor)), "/dashboard/#{editor.login}" %>Name Login CategoriesDescriptionDescription Type
<%= editor.full_name %>><%= image_tag(avatar(editor.login), size: "24x24", class: "avatar", title: editor.login) %> <%= link_to editor.login, "/dashboard/#{editor.login}" %><% if editor.retired? %><% end %><%= link_to editor.full_name, editor %>> + <%= link_to image_tag(avatar(editor.login), size: "24x24", class: "avatar", title: github_user_link(editor.login)), github_user_link(editor.login), target: "_blank" %> + <%= link_to editor.login, "/dashboard/#{editor.login}" %> <%= editor.category_list %><%= editor.description.html_safe %><%= editor.description.html_safe %> <%= editor.kind %><%= link_to 'Show', editor %> <%= link_to 'Edit', edit_editor_path(editor) %> <%= link_to 'Destroy', editor, method: :delete, data: { confirm: 'Are you sure?' } %>
@@ -41,6 +44,10 @@ <%- end %>
+ +
@@ -83,8 +90,4 @@ <%- end %> - - From a49e78404eb678829587f4387371f7ca1ca9162d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 1 Mar 2021 17:44:21 +0100 Subject: [PATCH 110/609] remove editor's type from list --- app/views/editors/index.html.erb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/views/editors/index.html.erb b/app/views/editors/index.html.erb index a2e212c78..ef13d4854 100644 --- a/app/views/editors/index.html.erb +++ b/app/views/editors/index.html.erb @@ -18,7 +18,6 @@ Categories Paper load Availability - Type @@ -37,7 +36,6 @@ <%= editor.category_list %> <%= link_to in_progress_for_editor(Paper.in_progress.where(editor: editor)), "/dashboard/#{editor.login}" %> <%= editor.availability.try(:capitalize) %> <%= editor.availability_comment %> - <%= editor.kind %> <%= link_to 'Edit', edit_editor_path(editor) %> <%= link_to 'Destroy', editor, method: :delete, data: { confirm: 'Are you sure?' } %> @@ -69,7 +67,6 @@ Login Categories Description - Type @@ -83,7 +80,6 @@ <%= link_to editor.login, "/dashboard/#{editor.login}" %> <%= editor.category_list %> <%= editor.description.html_safe %> - <%= editor.kind %> <%= link_to 'Edit', edit_editor_path(editor) %> <%= link_to 'Destroy', editor, method: :delete, data: { confirm: 'Are you sure?' } %> From 6709ed887b46b8704cc678605816485c2a52163d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 1 Mar 2021 18:10:46 +0100 Subject: [PATCH 111/609] use icons to gain space --- app/helpers/editors_helper.rb | 16 ++++++++++++++++ app/views/editors/index.html.erb | 16 ++++++++-------- spec/views/editors/index.html.erb_spec.rb | 3 ++- 3 files changed, 26 insertions(+), 9 deletions(-) diff --git a/app/helpers/editors_helper.rb b/app/helpers/editors_helper.rb index 4a4b91d69..08e6ca3ba 100644 --- a/app/helpers/editors_helper.rb +++ b/app/helpers/editors_helper.rb @@ -1,2 +1,18 @@ module EditorsHelper + def display_availability(editor) + icon = case editor.availability + when 'none' + "🔴" + when 'somewhat' + "🟠" + else + "🟢" + end + if editor.availability_comment.present? + icon += "*" + comment = ": #{editor.availability_comment}" + end + + "#{icon}".html_safe + end end diff --git a/app/views/editors/index.html.erb b/app/views/editors/index.html.erb index ef13d4854..5aea3e9b7 100644 --- a/app/views/editors/index.html.erb +++ b/app/views/editors/index.html.erb @@ -16,9 +16,9 @@ Name Login Categories - Paper load + Paper load Availability - + @@ -35,9 +35,9 @@ <%= editor.category_list %> <%= link_to in_progress_for_editor(Paper.in_progress.where(editor: editor)), "/dashboard/#{editor.login}" %> - <%= editor.availability.try(:capitalize) %> <%= editor.availability_comment %> - <%= link_to 'Edit', edit_editor_path(editor) %> - <%= link_to 'Destroy', editor, method: :delete, data: { confirm: 'Are you sure?' } %> + <%= display_availability(editor) %> + <%= link_to '✏️', edit_editor_path(editor), title: 'Edit' %> + <%= link_to '🗑', editor, method: :delete, data: { confirm: 'Are you sure?' }, title: 'Delete' %> <%- end %> @@ -67,7 +67,7 @@ Login Categories Description - + @@ -80,8 +80,8 @@ <%= link_to editor.login, "/dashboard/#{editor.login}" %> <%= editor.category_list %> <%= editor.description.html_safe %> - <%= link_to 'Edit', edit_editor_path(editor) %> - <%= link_to 'Destroy', editor, method: :delete, data: { confirm: 'Are you sure?' } %> + <%= link_to '✏️', edit_editor_path(editor), title: 'Edit' %> + <%= link_to '🗑', editor, method: :delete, data: { confirm: 'Are you sure?' }, title: 'Delete' %> <%- end %> diff --git a/spec/views/editors/index.html.erb_spec.rb b/spec/views/editors/index.html.erb_spec.rb index b29b6778f..7183c1c66 100644 --- a/spec/views/editors/index.html.erb_spec.rb +++ b/spec/views/editors/index.html.erb_spec.rb @@ -10,6 +10,7 @@ assert_select "tr>td:nth-of-type(1)", text: /Person McEditor/, count: 2 assert_select "tr>td:nth-of-type(2)", text: "mceditor", count: 2 assert_select "tr>td:nth-of-type(3)", text: "topic1, topic2, topic3", count: 2 - assert_select "tr>td:nth-of-type(5)", text: "Available OOO until March 1", count: 2 + assert_select "tr>td:nth-of-type(5)", text: "🟢*", count: 2 + assert_select "tr>td:nth-of-type(5)>span[title=?]", "Available: OOO until March 1", count: 2 end end From 2331a5b978ee1f3165af3cd271874fceb5b72564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 1 Mar 2021 18:26:01 +0100 Subject: [PATCH 112/609] make editors list sortable --- app/views/editors/index.html.erb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/editors/index.html.erb b/app/views/editors/index.html.erb index 5aea3e9b7..f9a8e7e0b 100644 --- a/app/views/editors/index.html.erb +++ b/app/views/editors/index.html.erb @@ -10,15 +10,15 @@ <%= link_to 'New Editor', new_editor_path, class: 'btn action-btn' %> - +
- - + + @@ -35,7 +35,7 @@ - + From c73d4168b074ef5d7ea21eccaff66d3fa6a6a8d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 4 Mar 2021 13:25:35 +0100 Subject: [PATCH 113/609] add eic dashboard with ready to accept and flagged issues --- app/controllers/application_controller.rb | 3 - app/controllers/eic_dashboard_controller.rb | 9 ++ app/views/content/layout/_navbar.html.erb | 2 +- app/views/editors/index.html.erb | 4 + app/views/eic_dashboard/_menu.html.erb | 6 ++ app/views/eic_dashboard/index.html.erb | 56 ++++++++++++ config/routes.rb | 1 + .../eic_dashboard_controller_spec.rb | 85 +++++++++++++++++++ spec/rails_helper.rb | 1 + 9 files changed, 163 insertions(+), 4 deletions(-) create mode 100644 app/controllers/eic_dashboard_controller.rb create mode 100644 app/views/eic_dashboard/_menu.html.erb create mode 100644 app/views/eic_dashboard/index.html.erb create mode 100644 spec/controllers/eic_dashboard_controller_spec.rb diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 194f2c35b..38d974137 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -54,6 +54,3 @@ def record_not_found render plain: "404 Not Found", status: 404 end end - - - diff --git a/app/controllers/eic_dashboard_controller.rb b/app/controllers/eic_dashboard_controller.rb new file mode 100644 index 000000000..568e6dfa9 --- /dev/null +++ b/app/controllers/eic_dashboard_controller.rb @@ -0,0 +1,9 @@ +class EicDashboardController < ApplicationController + before_action :require_admin_user + + def index + @recommend_accept = GITHUB.issues(Rails.application.settings["reviews"], labels: "recommend-accept", state:"open") + @with_query_scope = GITHUB.issues(Rails.application.settings["reviews"], labels: "query-scope", state:"open") + end + +end diff --git a/app/views/content/layout/_navbar.html.erb b/app/views/content/layout/_navbar.html.erb index 2c34648a4..3f537f0a1 100644 --- a/app/views/content/layout/_navbar.html.erb +++ b/app/views/content/layout/_navbar.html.erb @@ -17,7 +17,7 @@
Name Login Categories Paper loadAvailabilityAvailability
<%= editor.category_list %> <%= link_to in_progress_for_editor(Paper.in_progress.where(editor: editor)), "/dashboard/#{editor.login}" %><%= display_availability(editor) %><%= display_availability(editor) %> <%= link_to '✏️', edit_editor_path(editor), title: 'Edit' %> <%= link_to '🗑', editor, method: :delete, data: { confirm: 'Are you sure?' }, title: 'Delete' %>
diff --git a/app/views/eic_dashboard/_menu.html.erb b/app/views/eic_dashboard/_menu.html.erb new file mode 100644 index 000000000..d18330e4b --- /dev/null +++ b/app/views/eic_dashboard/_menu.html.erb @@ -0,0 +1,6 @@ +
+
+ <%= link_to "Submissions overview", eic_dashboard_path, class: current_class?(eic_dashboard_path) %> + <%= link_to "Editors", editors_path, class: current_class?(editors_path) %> +
+
diff --git a/app/views/eic_dashboard/index.html.erb b/app/views/eic_dashboard/index.html.erb new file mode 100644 index 000000000..321424047 --- /dev/null +++ b/app/views/eic_dashboard/index.html.erb @@ -0,0 +1,56 @@ +
+

<%= notice %>

+
+
Welcome, <%= current_user.editor.full_name %>
+
+
+ <%= image_tag "icon_papers.svg", height: "32px" %>

Editors in Chief Dashboard

+
+
+
+
+ +<%= render partial: "menu" %> + +
+
+

Accepted and ready to publish

+ <% if @recommend_accept.any? %> +

Papers labeled as recommend-accept but still open:

+
    + <% @recommend_accept.each do |accepted_issue| %> +
  • <%= link_to "##{accepted_issue.number}", accepted_issue.html_url, :target => "_blank" %> <%= accepted_issue.title %>
  • + <% end %> +
+ <% accepted_link_text = "List of ready to publish submissions at Github" %> + <% else %> + <% accepted_link_text = "There are no open submissions labeled as recommend-accept.".html_safe %> + <% end %> +

+ <%= link_to accepted_link_text, + "https://github.com/openjournals/joss-reviews/issues?utf8=%E2%9C%93&q=+label:recommend-accept+-label:published+", + target: "_blank" %> +

+
+ +
+

Scope query

+ <% if @with_query_scope.any? %> +

Open submissions flagged for editorial review (labeled as query-scope):

+
    + <% @with_query_scope.each do |flagged_issue| %> +
  • <%= link_to "##{flagged_issue.number}", flagged_issue.html_url, :target => "_blank" %> <%= flagged_issue.title %>
  • + <% end %> +
+ <% scope_query_link_text = "List of submissions pending editorial review at Github" %> + <% else %> + <% scope_query_link_text = "There are no open submissions flagged for editorial review (labeled as query-scope).".html_safe %> + <% end %> + +

+ <%= link_to scope_query_link_text, + "https://github.com/openjournals/joss-reviews/labels/query-scope", + target: "_blank" %> +

+
+
diff --git a/config/routes.rb b/config/routes.rb index e875f6705..9eac48c7b 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -20,6 +20,7 @@ end end + get '/eic/', to: "eic_dashboard#index", as: "eic_dashboard" get '/editors/lookup/:login', to: "editors#lookup" get '/papers/lookup/:id', to: "papers#lookup" get '/papers/in/:language', to: "papers#filter", as: 'papers_by_language' diff --git a/spec/controllers/eic_dashboard_controller_spec.rb b/spec/controllers/eic_dashboard_controller_spec.rb new file mode 100644 index 000000000..39b5e06a4 --- /dev/null +++ b/spec/controllers/eic_dashboard_controller_spec.rb @@ -0,0 +1,85 @@ +require 'rails_helper' + +RSpec.describe EicDashboardController, type: :controller do + render_views + let(:current_user) { create(:admin_user, editor: create(:editor)) } + + before(:each) do + allow(controller).to receive(:current_user).and_return(current_user) + end + + context "when not logged in" do + let(:current_user) { nil } + it "redirects to root with a login message" do + get :index + expect(response).to redirect_to root_path + expect(flash[:error]).to eql "Please login first" + end + end + + context "when logged in as a non-admin user" do + let(:current_user) { create(:user) } + it "redirects to root with a not allowed message" do + get :index + expect(response).to redirect_to root_path + expect(flash[:error]).to eql "You are not permitted to view that page" + end + end + + describe "#index" do + let(:accepted_params) { [Rails.application.settings[:reviews], {labels: "recommend-accept", state: "open"}] } + let(:flagged_params) { [Rails.application.settings[:reviews], {labels: "query-scope", state: "open"}] } + let(:accepted_issue_1) { OpenStruct.new(number: 1, html_url: "/test1", title: "Accepted paper 1") } + let(:accepted_issue_2) { OpenStruct.new(number: 2, html_url: "/test2", title: "Accepted paper 2") } + let(:flagged_issue_1) { OpenStruct.new(number: 3, html_url: "/test3", title: "Flagged paper 1") } + let(:flagged_issue_2) { OpenStruct.new(number: 4, html_url: "/test4", title: "Flagged paper 2") } + + it "lists all open accepted issues" do + allow(GITHUB).to receive(:issues).with(*accepted_params).and_return([accepted_issue_1, accepted_issue_2]) + allow(GITHUB).to receive(:issues).with(*flagged_params).and_return([]) + + get :index + + expect(response.body).to have_content "List of ready to publish submissions at Github" + expect(response.body).to have_link("#1", href: "/test1") + expect(response.body).to have_link("#2", href: "/test2") + expect(response.body).to have_content "Accepted paper 1" + expect(response.body).to have_content "Accepted paper 2" + expect(response.body).to_not have_content "There are no open submissions labeled as recommend-accept" + end + + it "includes a no submissions message if there are not open accepted issues" do + allow(GITHUB).to receive(:issues).with(*accepted_params).and_return([]) + allow(GITHUB).to receive(:issues).with(*flagged_params).and_return([flagged_issue_1]) + + get :index + + expect(response.body).to have_content "There are no open submissions labeled as recommend-accept" + expect(response.body).to_not have_content "List of ready to publish submissions at Github" + end + + it "lists all issues flagged with query-scope" do + allow(GITHUB).to receive(:issues).with(*flagged_params).and_return([flagged_issue_1, flagged_issue_2]) + allow(GITHUB).to receive(:issues).with(*accepted_params).and_return([]) + + get :index + + expect(response.body).to have_content "List of submissions pending editorial review at Github" + expect(response.body).to have_link("#3", href: "/test3") + expect(response.body).to have_link("#4", href: "/test4") + expect(response.body).to have_content "Flagged paper 1" + expect(response.body).to have_content "Flagged paper 2" + expect(response.body).to_not have_content "There are no open submissions flagged for editorial review" + end + + it "includes a no submissions message if there are not open flagged issues" do + allow(GITHUB).to receive(:issues).with(*flagged_params).and_return([]) + allow(GITHUB).to receive(:issues).with(*accepted_params).and_return([accepted_issue_1]) + + get :index + + expect(response.body).to have_content "There are no open submissions flagged for editorial review" + expect(response.body).to_not have_content "List of submissions pending editorial review at Github" + end + end +end \ No newline at end of file diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 818f891ab..5c88adc75 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -3,6 +3,7 @@ require 'spec_helper' require File.expand_path("../../config/environment", __FILE__) require 'rspec/rails' +require 'ostruct' # Add additional requires below this line. Rails is not loaded until this point! # Requires supporting ruby files with custom matchers and macros, etc, in From 74d0706705e12b08775a85516890013563890fb1 Mon Sep 17 00:00:00 2001 From: "Daniel S. Katz" Date: Thu, 4 Mar 2021 15:13:42 -0600 Subject: [PATCH 114/609] swapping statement of need text --- docs/review_checklist.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/review_checklist.md b/docs/review_checklist.md index 265863ffb..78c15d132 100644 --- a/docs/review_checklist.md +++ b/docs/review_checklist.md @@ -30,7 +30,7 @@ Below is an example of the review checklist for the [Yellowbrick JOSS submission ### Documentation -- **A statement of need:** Does the paper have a section titled 'Statement of Need' that clearly states what problems the software is designed to solve and who the target audience is? +- **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is? - **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution. - **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems). - **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)? @@ -40,7 +40,7 @@ Below is an example of the review checklist for the [Yellowbrick JOSS submission ### Software paper - **Summary:** Has a clear description of the high-level functionality and purpose of the software for a diverse, non-specialist audience been provided? -- **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is? +- **A statement of need:** Does the paper have a section titled 'Statement of Need' that clearly states what problems the software is designed to solve and who the target audience is? - **State of the field:** Do the authors describe how this software compares to other commonly-used packages? - **Quality of writing:** Is the paper well written (i.e., it does not require editing for structure, language, or writing quality)? - **References:** Is the list of references complete, and is everything cited appropriately that should be cited (e.g., papers, datasets, software)? Do references in the text use the proper [citation syntax]( https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html#citation_syntax)? From e9903f0392cbf450c5c38fc23c86cc904f6deec3 Mon Sep 17 00:00:00 2001 From: "Daniel S. Katz" Date: Thu, 4 Mar 2021 15:15:35 -0600 Subject: [PATCH 115/609] fix for description of SoN section --- docs/submitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index 2d30bbc29..163d1c0fd 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -78,7 +78,7 @@ Your paper should include: - A list of the authors of the software and their affiliations, using the correct format (see the example below). - A summary describing the high-level functionality and purpose of the software for a diverse, *non-specialist audience*. -- A clear *Statement of Need* that illustrates the research purpose of the software. +- A *Statement of Need* section that clearly illustrates the research purpose of the software. - A list of key references, including to other software addressing related needs. Note that the references should include full names of venues, e.g., journals and conferences, not abbreviations only understood in the context of a specific discipline. - Mention (if applicable) a representative set of past or ongoing research projects using the software and recent scholarly publications enabled by it. - Acknowledgement of any financial support. From e56ff426361370948918b410dbc35647ae2a9e85 Mon Sep 17 00:00:00 2001 From: "Daniel S. Katz" Date: Thu, 4 Mar 2021 15:17:21 -0600 Subject: [PATCH 116/609] swapping SoN text between doc and paper --- app/views/content/github/_review_checklist.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/content/github/_review_checklist.erb b/app/views/content/github/_review_checklist.erb index 5a81ac743..33eca50b9 100644 --- a/app/views/content/github/_review_checklist.erb +++ b/app/views/content/github/_review_checklist.erb @@ -21,7 +21,7 @@ ### Documentation -- [ ] **A statement of need:** Does the paper have a section titled 'Statement of Need' that clearly states what problems the software is designed to solve and who the target audience is? +- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is? - [ ] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution. - [ ] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems). - [ ] **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)? @@ -31,7 +31,7 @@ ### Software paper - [ ] **Summary:** Has a clear description of the high-level functionality and purpose of the software for a diverse, non-specialist audience been provided? -- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is? +- [ ] **A statement of need:** Does the paper have a section titled 'Statement of Need' that clearly states what problems the software is designed to solve and who the target audience is? - [ ] **State of the field:** Do the authors describe how this software compares to other commonly-used packages? - [ ] **Quality of writing:** Is the paper well written (i.e., it does not require editing for structure, language, or writing quality)? - [ ] **References:** Is the list of references complete, and is everything cited appropriately that should be cited (e.g., papers, datasets, software)? Do references in the text use the proper [citation syntax]( https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html#citation_syntax)? From c1149bee89ff6df2d96b3cadbcf2b76d01ad4e70 Mon Sep 17 00:00:00 2001 From: Jed Brown Date: Mon, 8 Mar 2021 12:20:45 -0700 Subject: [PATCH 117/609] Fix Portico membership costs link --- app/views/home/about.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/home/about.html.erb b/app/views/home/about.html.erb index 335131dd0..460792f23 100644 --- a/app/views/home/about.html.erb +++ b/app/views/home/about.html.erb @@ -200,7 +200,7 @@
  • Annual Crossref membership: $275 / year
  • -
  • Annual Portico membership: $250 / year +
  • Annual Portico membership: $250 / year
  • <%= setting(:abbreviation) %> paper DOIs: $1 / accepted paper
  • <%= setting(:abbreviation) %> website hosting (Heroku): $19 / month
  • From c07ab94f6632851ece051c90ef01e2110285969a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 9 Mar 2021 11:36:33 +0100 Subject: [PATCH 118/609] add description column to editors' table --- app/views/editors/index.html.erb | 8 +++++--- spec/views/editors/index.html.erb_spec.rb | 7 ++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app/views/editors/index.html.erb b/app/views/editors/index.html.erb index f9a8e7e0b..9ccda55c7 100644 --- a/app/views/editors/index.html.erb +++ b/app/views/editors/index.html.erb @@ -15,8 +15,9 @@
+ - + @@ -26,14 +27,15 @@ <%- Editor.active.order('last_name ASC').each do |editor| %> - + + diff --git a/spec/views/editors/index.html.erb_spec.rb b/spec/views/editors/index.html.erb_spec.rb index 7183c1c66..3233c953a 100644 --- a/spec/views/editors/index.html.erb_spec.rb +++ b/spec/views/editors/index.html.erb_spec.rb @@ -9,8 +9,9 @@ render assert_select "tr>td:nth-of-type(1)", text: /Person McEditor/, count: 2 assert_select "tr>td:nth-of-type(2)", text: "mceditor", count: 2 - assert_select "tr>td:nth-of-type(3)", text: "topic1, topic2, topic3", count: 2 - assert_select "tr>td:nth-of-type(5)", text: "🟢*", count: 2 - assert_select "tr>td:nth-of-type(5)>span[title=?]", "Available: OOO until March 1", count: 2 + assert_select "tr>td:nth-of-type(3)", text: "Person McEditor is an editor", count: 2 + assert_select "tr>td:nth-of-type(4)", text: "topic1, topic2, topic3", count: 2 + assert_select "tr>td:nth-of-type(6)", text: "🟢*", count: 2 + assert_select "tr>td:nth-of-type(6)>span[title=?]", "Available: OOO until March 1", count: 2 end end From 93c5eb05b1dea1b4a0768a87fc9efa2cd18afb52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 12 Mar 2021 11:51:01 +0100 Subject: [PATCH 119/609] correct form labels --- app/views/editors/_form.html.erb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/editors/_form.html.erb b/app/views/editors/_form.html.erb index e764319ff..12fb8d9b7 100644 --- a/app/views/editors/_form.html.erb +++ b/app/views/editors/_form.html.erb @@ -16,15 +16,15 @@
- <%= f.label :type, "Kind" %> + <%= f.label :kind, "Kind" %> <%= f.select :kind, %w(topic board emeritus), {}, class: "form-control" %>
- <%= f.label :type, "Availability" %> + <%= f.label :availability, "Availability" %> <%= f.select :availability, Editor::AVAILABILITY_STATES, {}, class: "form-control" %>
- <%= f.label :type, "Comment on availability" %> + <%= f.label :availability_comment, "Comment on availability" %> <%= f.text_field :availability_comment, class: "form-control" %>
@@ -70,7 +70,7 @@
- <%= f.label :categories, "Categories (comma or space separated)" %> + <%= f.label :category_list, "Categories (comma or space separated)" %> <%= f.text_field :category_list, class: "form-control" %>
From 010ad924f1ffcca9f2fa2d0b7b84e46323b5c123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 12 Mar 2021 12:48:25 +0100 Subject: [PATCH 120/609] facebook is not a provider anymore --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index c8c07b2d5..21cbad366 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -13,7 +13,7 @@ def self.from_omniauth(auth) user.extra = auth user.email = auth.info.email user.oauth_token = auth.credentials.token - user.oauth_expires_at = Time.at(auth.credentials.expires_at) if auth["provider"] == "facebook" + user.oauth_expires_at = Time.at(auth.credentials.expires_at) if (auth.credentials.expires && auth.credentials.expires_at.present?) user.save end end From 7ee04c1d1b7dfa90bd8b3125d1c0c8e0e36dde71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 12 Mar 2021 13:16:24 +0100 Subject: [PATCH 121/609] float button right --- app/assets/stylesheets/application.scss | 1 - app/views/editors/index.html.erb | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 941bb6d13..a5b2300ef 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -744,7 +744,6 @@ $btn-primary-border: darken($btn-primary-bg, 5%) !default; } .action-btn{ - float: inline-end; margin-bottom: 15px; } diff --git a/app/views/editors/index.html.erb b/app/views/editors/index.html.erb index 983e82af1..1d97bb247 100644 --- a/app/views/editors/index.html.erb +++ b/app/views/editors/index.html.erb @@ -12,7 +12,7 @@ <%= render partial: "eic_dashboard/menu" %>
- <%= link_to 'New Editor', new_editor_path, class: 'btn action-btn' %> + <%= link_to 'New Editor', new_editor_path, class: 'btn action-btn float-right' %>
Name LoginDescription CategoriesPaper loadPaper load Availability
- <%= link_to editor.full_name, editor, title: editor.description.html_safe %> + <%= link_to editor.full_name, editor, title: strip_tags(editor.description) %> <%= "(new)" if editor.created_at > 2.months.ago %> > <%= link_to image_tag(avatar(editor.login), size: "24x24", class: "avatar", title: github_user_link(editor.login)), github_user_link(editor.login), target: "_blank" %> <%= editor.login %> <%= editor.category_list %><%= truncate(strip_tags(editor.description), length: 150) %><%= editor.category_list %> <%= link_to in_progress_for_editor(Paper.in_progress.where(editor: editor)), "/dashboard/#{editor.login}" %> <%= display_availability(editor) %> <%= link_to '✏️', edit_editor_path(editor), title: 'Edit' %>
@@ -50,7 +50,7 @@
From 7313492a366bd139372a387abc7f8747a2904471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 12 Mar 2021 13:16:38 +0100 Subject: [PATCH 122/609] fix profile button --- app/views/home/profile.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/home/profile.html.erb b/app/views/home/profile.html.erb index 046262d94..7a1bb7e0b 100644 --- a/app/views/home/profile.html.erb +++ b/app/views/home/profile.html.erb @@ -14,7 +14,7 @@ <%= text_field "user", "github_username", placeholder: "@username", class: "form-control" %>
- <%= submit_tag("Update profile", class: "btn") %> + <%= submit_tag("Update profile", class: "btn action-btn") %>
<% end %> From c0715098b5c4de60f9987e9df2201c10d730ad64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 12 Mar 2021 20:35:49 +0100 Subject: [PATCH 123/609] style table headers --- app/views/editors/index.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/editors/index.html.erb b/app/views/editors/index.html.erb index 1d97bb247..74b9c7a5e 100644 --- a/app/views/editors/index.html.erb +++ b/app/views/editors/index.html.erb @@ -16,12 +16,12 @@ - + - + From 033c425771d1dddb3783b4cb70d916a2616db07c Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 14 Mar 2021 20:20:59 +0000 Subject: [PATCH 124/609] Show waitlisted --- app/helpers/home_helper.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/helpers/home_helper.rb b/app/helpers/home_helper.rb index 661a2cb71..3afc8f983 100644 --- a/app/helpers/home_helper.rb +++ b/app/helpers/home_helper.rb @@ -39,7 +39,8 @@ def pretty_labels_for(paper) concat content_tag(:span, label, style: "padding: 3px; margin-right: 3px; border-radius: 2px; background-color: ##{colour}; color: #000000;") elsif label == "query-scope" concat content_tag(:span, label, style: "padding: 3px; margin-right: 3px; border-radius: 2px; background-color: ##{colour}; color: #000000;") - + elsif label == "waitlisted" + concat content_tag(:span, label, style: "padding: 3px; margin-right: 3px; border-radius: 2px; background-color: ##{colour}; color: #000000;") end end end From 57b3efd8ed1ba4b6cd422bb62a82a5c7b1da5783 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 18 Mar 2021 14:47:21 +0100 Subject: [PATCH 125/609] EiC -> AEiC --- ...c_dashboard_controller.rb => aeic_dashboard_controller.rb} | 2 +- app/views/{eic_dashboard => aeic_dashboard}/_menu.html.erb | 2 +- app/views/{eic_dashboard => aeic_dashboard}/index.html.erb | 2 +- app/views/content/layout/_navbar.html.erb | 2 +- app/views/editors/index.html.erb | 4 ++-- config/routes.rb | 2 +- spec/controllers/eic_dashboard_controller_spec.rb | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) rename app/controllers/{eic_dashboard_controller.rb => aeic_dashboard_controller.rb} (84%) rename app/views/{eic_dashboard => aeic_dashboard}/_menu.html.erb (63%) rename app/views/{eic_dashboard => aeic_dashboard}/index.html.erb (95%) diff --git a/app/controllers/eic_dashboard_controller.rb b/app/controllers/aeic_dashboard_controller.rb similarity index 84% rename from app/controllers/eic_dashboard_controller.rb rename to app/controllers/aeic_dashboard_controller.rb index 568e6dfa9..4872ec177 100644 --- a/app/controllers/eic_dashboard_controller.rb +++ b/app/controllers/aeic_dashboard_controller.rb @@ -1,4 +1,4 @@ -class EicDashboardController < ApplicationController +class AeicDashboardController < ApplicationController before_action :require_admin_user def index diff --git a/app/views/eic_dashboard/_menu.html.erb b/app/views/aeic_dashboard/_menu.html.erb similarity index 63% rename from app/views/eic_dashboard/_menu.html.erb rename to app/views/aeic_dashboard/_menu.html.erb index d18330e4b..b8eb33314 100644 --- a/app/views/eic_dashboard/_menu.html.erb +++ b/app/views/aeic_dashboard/_menu.html.erb @@ -1,6 +1,6 @@
- <%= link_to "Submissions overview", eic_dashboard_path, class: current_class?(eic_dashboard_path) %> + <%= link_to "Submissions overview", aeic_dashboard_path, class: current_class?(aeic_dashboard_path) %> <%= link_to "Editors", editors_path, class: current_class?(editors_path) %>
diff --git a/app/views/eic_dashboard/index.html.erb b/app/views/aeic_dashboard/index.html.erb similarity index 95% rename from app/views/eic_dashboard/index.html.erb rename to app/views/aeic_dashboard/index.html.erb index 321424047..879571898 100644 --- a/app/views/eic_dashboard/index.html.erb +++ b/app/views/aeic_dashboard/index.html.erb @@ -4,7 +4,7 @@
Welcome, <%= current_user.editor.full_name %>
- <%= image_tag "icon_papers.svg", height: "32px" %>

Editors in Chief Dashboard

+ <%= image_tag "icon_papers.svg", height: "32px" %>

Associate Editors in Chief Dashboard

diff --git a/app/views/content/layout/_navbar.html.erb b/app/views/content/layout/_navbar.html.erb index 3f537f0a1..e728c87c5 100644 --- a/app/views/content/layout/_navbar.html.erb +++ b/app/views/content/layout/_navbar.html.erb @@ -17,7 +17,7 @@
- + diff --git a/app/views/home/dashboard.html.erb b/app/views/home/dashboard.html.erb index 8380dfc21..d04961c40 100644 --- a/app/views/home/dashboard.html.erb +++ b/app/views/home/dashboard.html.erb @@ -26,14 +26,14 @@ <% Editor.active.order('LOWER(login)').each do |editor| %> - - - - - - - - + + + + + + + + <% end %> @@ -41,13 +41,13 @@ <% Editor.emeritus.order('LOWER(login)').each do |editor| %> - - - - - - - + + + + + + + <% end %> diff --git a/spec/views/editors/index.html.erb_spec.rb b/spec/views/editors/index.html.erb_spec.rb deleted file mode 100644 index 3233c953a..000000000 --- a/spec/views/editors/index.html.erb_spec.rb +++ /dev/null @@ -1,17 +0,0 @@ -require 'rails_helper' - -RSpec.describe "editors/index", type: :view do - before(:each) do - assign(:editors, create_list(:editor, 2)) - end - - it "renders a list of editors" do - render - assert_select "tr>td:nth-of-type(1)", text: /Person McEditor/, count: 2 - assert_select "tr>td:nth-of-type(2)", text: "mceditor", count: 2 - assert_select "tr>td:nth-of-type(3)", text: "Person McEditor is an editor", count: 2 - assert_select "tr>td:nth-of-type(4)", text: "topic1, topic2, topic3", count: 2 - assert_select "tr>td:nth-of-type(6)", text: "🟢*", count: 2 - assert_select "tr>td:nth-of-type(6)>span[title=?]", "Available: OOO until March 1", count: 2 - end -end From 40a2e6e1749d1cb4d1bf9e89aa1513bbfe217c12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 19 Mar 2021 11:40:30 +0100 Subject: [PATCH 129/609] remove duplicate scope --- app/models/paper.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/models/paper.rb b/app/models/paper.rb index 4e4a40252..8309b61a6 100644 --- a/app/models/paper.rb +++ b/app/models/paper.rb @@ -106,7 +106,6 @@ class Paper < ApplicationRecord scope :since, -> (date) { where('accepted_at >= ?', date) } scope :in_progress, -> { where(state: IN_PROGRESS_STATES) } - scope :in_progress, -> { where(state: IN_PROGRESS_STATES) } scope :public_in_progress, -> { where(state: PUBLIC_IN_PROGRESS_STATES) } scope :visible, -> { where(state: VISIBLE_STATES) } scope :invisible, -> { where(state: INVISIBLE_STATES) } @@ -430,14 +429,14 @@ def pretty_state def fraction_check_boxes_complete return 0.0 if review_issue_id.nil? issue = GITHUB.issue(Rails.application.settings["reviews"], review_issue_id) - + checkbox_count = issue.body.scan(/(- \[ \]|- \[x\])/m).count checked_checkbox_count = issue.body.scan(/(- \[x\])/m).count return checked_checkbox_count.to_f / checkbox_count end - def pretty_percentage + def pretty_percentage (percent_complete * 100).to_i end From 8621e9fb0707826279f7879dffed77dacef2c987 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 26 Mar 2021 21:05:09 +0100 Subject: [PATCH 130/609] update Rails https://weblog.rubyonrails.org/2021/3/26/marcel-upgrade-releases/ --- Gemfile | 2 +- Gemfile.lock | 124 +++++++++++++++++++++++++-------------------------- 2 files changed, 62 insertions(+), 64 deletions(-) diff --git a/Gemfile b/Gemfile index 06d5364bb..0a40fc266 100644 --- a/Gemfile +++ b/Gemfile @@ -20,7 +20,7 @@ gem 'pg', '~> 1.2.3' # once this bug is fixed and Rails 6.1 is supported: # https://github.com/mislav/will_paginate/pull/619 gem 'will_paginate', git: "https://github.com/kvokka/will_paginate", branch: "fix-page_entries_info" -gem 'rails', '6.1.3' +gem 'rails', '6.1.3.1' gem 'responders' gem 'newrelic_rpm' gem 'sanitize', '~> 5.2.3' diff --git a/Gemfile.lock b/Gemfile.lock index 2422cce48..dc9200181 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,40 +11,40 @@ GEM Ascii85 (1.1.0) aasm (5.0.8) concurrent-ruby (~> 1.0) - actioncable (6.1.3) - actionpack (= 6.1.3) - activesupport (= 6.1.3) + actioncable (6.1.3.1) + actionpack (= 6.1.3.1) + activesupport (= 6.1.3.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.3) - actionpack (= 6.1.3) - activejob (= 6.1.3) - activerecord (= 6.1.3) - activestorage (= 6.1.3) - activesupport (= 6.1.3) + actionmailbox (6.1.3.1) + actionpack (= 6.1.3.1) + activejob (= 6.1.3.1) + activerecord (= 6.1.3.1) + activestorage (= 6.1.3.1) + activesupport (= 6.1.3.1) mail (>= 2.7.1) - actionmailer (6.1.3) - actionpack (= 6.1.3) - actionview (= 6.1.3) - activejob (= 6.1.3) - activesupport (= 6.1.3) + actionmailer (6.1.3.1) + actionpack (= 6.1.3.1) + actionview (= 6.1.3.1) + activejob (= 6.1.3.1) + activesupport (= 6.1.3.1) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.3) - actionview (= 6.1.3) - activesupport (= 6.1.3) + actionpack (6.1.3.1) + actionview (= 6.1.3.1) + activesupport (= 6.1.3.1) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.3) - actionpack (= 6.1.3) - activerecord (= 6.1.3) - activestorage (= 6.1.3) - activesupport (= 6.1.3) + actiontext (6.1.3.1) + actionpack (= 6.1.3.1) + activerecord (= 6.1.3.1) + activestorage (= 6.1.3.1) + activesupport (= 6.1.3.1) nokogiri (>= 1.8.5) - actionview (6.1.3) - activesupport (= 6.1.3) + actionview (6.1.3.1) + activesupport (= 6.1.3.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -52,22 +52,22 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (6.1.3) - activesupport (= 6.1.3) + activejob (6.1.3.1) + activesupport (= 6.1.3.1) globalid (>= 0.3.6) - activemodel (6.1.3) - activesupport (= 6.1.3) - activerecord (6.1.3) - activemodel (= 6.1.3) - activesupport (= 6.1.3) - activestorage (6.1.3) - actionpack (= 6.1.3) - activejob (= 6.1.3) - activerecord (= 6.1.3) - activesupport (= 6.1.3) - marcel (~> 0.3.1) - mimemagic (~> 0.3.2) - activesupport (6.1.3) + activemodel (6.1.3.1) + activesupport (= 6.1.3.1) + activerecord (6.1.3.1) + activemodel (= 6.1.3.1) + activesupport (= 6.1.3.1) + activestorage (6.1.3.1) + actionpack (= 6.1.3.1) + activejob (= 6.1.3.1) + activerecord (= 6.1.3.1) + activesupport (= 6.1.3.1) + marcel (~> 1.0.0) + mini_mime (~> 1.0.2) + activesupport (6.1.3.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -215,22 +215,20 @@ GEM lumberjack (1.2.8) mail (2.7.1) mini_mime (>= 0.1.1) - marcel (0.3.3) - mimemagic (~> 0.3.2) + marcel (1.0.0) memoist (0.16.2) method_source (1.0.0) - mimemagic (0.3.5) - mini_mime (1.0.2) + mini_mime (1.0.3) mini_portile2 (2.5.0) - minitest (5.14.3) + minitest (5.14.4) msgpack (1.4.2) multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.1.1) nenv (0.3.0) newrelic_rpm (6.15.0) - nio4r (2.5.5) - nokogiri (1.11.1) + nio4r (2.5.7) + nokogiri (1.11.2) mini_portile2 (~> 2.5.0) racc (~> 1.4) nokogumbo (2.0.4) @@ -289,20 +287,20 @@ GEM rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.1.3) - actioncable (= 6.1.3) - actionmailbox (= 6.1.3) - actionmailer (= 6.1.3) - actionpack (= 6.1.3) - actiontext (= 6.1.3) - actionview (= 6.1.3) - activejob (= 6.1.3) - activemodel (= 6.1.3) - activerecord (= 6.1.3) - activestorage (= 6.1.3) - activesupport (= 6.1.3) + rails (6.1.3.1) + actioncable (= 6.1.3.1) + actionmailbox (= 6.1.3.1) + actionmailer (= 6.1.3.1) + actionpack (= 6.1.3.1) + actiontext (= 6.1.3.1) + actionview (= 6.1.3.1) + activejob (= 6.1.3.1) + activemodel (= 6.1.3.1) + activerecord (= 6.1.3.1) + activestorage (= 6.1.3.1) + activesupport (= 6.1.3.1) bundler (>= 1.15.0) - railties (= 6.1.3) + railties (= 6.1.3.1) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -313,9 +311,9 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - railties (6.1.3) - actionpack (= 6.1.3) - activesupport (= 6.1.3) + railties (6.1.3.1) + actionpack (= 6.1.3.1) + activesupport (= 6.1.3.1) method_source rake (>= 0.8.7) thor (~> 1.0) @@ -448,7 +446,7 @@ DEPENDENCIES pg (~> 1.2.3) pry-byebug rack-livereload - rails (= 6.1.3) + rails (= 6.1.3.1) rails-controller-testing (~> 1.0.5) responders rspec-rails (~> 4.0.2) From 04d2aed91d7eea5d3c5c395a795415d2702d8d82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 16 Mar 2021 11:07:52 +0100 Subject: [PATCH 131/609] config for feature specs --- spec/rails_helper.rb | 4 +++- spec/spec_helper.rb | 2 -- spec/support/common_actions.rb | 11 +++++++++++ 3 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 spec/support/common_actions.rb diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 5c88adc75..3b00448ae 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -3,6 +3,7 @@ require 'spec_helper' require File.expand_path("../../config/environment", __FILE__) require 'rspec/rails' +require 'capybara/rspec' require 'ostruct' # Add additional requires below this line. Rails is not loaded until this point! @@ -19,7 +20,7 @@ # directory. Alternatively, in the individual `*_spec.rb` files, manually # require only the support files necessary. # -# Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f } +Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f } # Checks for pending migrations before tests are run. # If you are not using ActiveRecord, you can remove this line. @@ -50,4 +51,5 @@ config.infer_spec_type_from_file_location! config.include FactoryBot::Syntax::Methods + config.include CommonActions end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 9ed938f7b..29af1c670 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -15,8 +15,6 @@ # # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration -require 'capybara/rspec' - RSpec.configure do |config| # rspec-expectations config goes here. You can use an alternate diff --git a/spec/support/common_actions.rb b/spec/support/common_actions.rb new file mode 100644 index 000000000..ca57c06c7 --- /dev/null +++ b/spec/support/common_actions.rb @@ -0,0 +1,11 @@ +module CommonActions + def login_as(user) + allow_any_instance_of(ApplicationController). + to receive(:current_user).and_return(user) + end + + def logout + allow_any_instance_of(ApplicationController). + to receive(:current_user).and_return(nil) + end +end From 00997e08145534f4511bfce46b2460004c48b9b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 29 Mar 2021 19:25:16 +0200 Subject: [PATCH 132/609] use system specs --- Gemfile | 5 +++-- Gemfile.lock | 20 +++++++++++++------- spec/rails_helper.rb | 1 + 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/Gemfile b/Gemfile index 0a40fc266..d71e69417 100644 --- a/Gemfile +++ b/Gemfile @@ -46,12 +46,13 @@ group :development, :test do gem 'pry-byebug' gem 'capybara', '~> 3.35.3' gem 'factory_bot_rails', '~> 6.1.0' - gem 'rspec-rails', '~> 4.0.2' + gem 'rspec-rails', '~> 5.0.0' gem 'rails-controller-testing', '~> 1.0.5' + gem 'selenium-webdriver' end group :test do - gem 'vcr', '~> 3.0', '>= 3.0.1' + gem 'vcr', '~> 6.0', '>= 6.0.0' end group :development do diff --git a/Gemfile.lock b/Gemfile.lock index dc9200181..7ae4ffc34 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -96,6 +96,7 @@ GEM regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) chartkick (3.4.2) + childprocess (3.0.0) coderay (1.1.3) coffee-rails (5.0.0) coffee-script (>= 2.2.0) @@ -340,10 +341,10 @@ GEM rspec-mocks (3.10.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) - rspec-rails (4.0.2) - actionpack (>= 4.2) - activesupport (>= 4.2) - railties (>= 4.2) + rspec-rails (5.0.0) + actionpack (>= 5.2) + activesupport (>= 5.2) + railties (>= 5.2) rspec-core (~> 3.10) rspec-expectations (~> 3.10) rspec-mocks (~> 3.10) @@ -354,6 +355,7 @@ GEM ruby-rc4 (0.1.5) ruby2_keywords (0.0.4) ruby_dig (0.0.2) + rubyzip (2.3.0) sanitize (5.2.3) crass (~> 1.0.2) nokogiri (>= 1.8.0) @@ -375,6 +377,9 @@ GEM activemodel (>= 5) elasticsearch (>= 6) hashie + selenium-webdriver (3.142.7) + childprocess (>= 0.5, < 4.0) + rubyzip (>= 1.2.2) shellany (0.0.1) signet (0.14.1) addressable (~> 2.3) @@ -402,7 +407,7 @@ GEM unicorn (5.8.0) kgio (~> 2.6) raindrops (~> 0.7) - vcr (3.0.3) + vcr (6.0.0) web-console (4.1.0) actionview (>= 6.0.0) activemodel (>= 6.0.0) @@ -449,15 +454,16 @@ DEPENDENCIES rails (= 6.1.3.1) rails-controller-testing (~> 1.0.5) responders - rspec-rails (~> 4.0.2) + rspec-rails (~> 5.0.0) sanitize (~> 5.2.3) sass-rails (~> 6.0.0) searchkick + selenium-webdriver spring spring-commands-rspec uglifier (= 4.2.0) unicorn (~> 5.8.0) - vcr (~> 3.0, >= 3.0.1) + vcr (~> 6.0, >= 6.0.0) web-console (~> 4.1.0) will_paginate! diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 3b00448ae..c33805434 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -5,6 +5,7 @@ require 'rspec/rails' require 'capybara/rspec' require 'ostruct' + # Add additional requires below this line. Rails is not loaded until this point! # Requires supporting ruby files with custom matchers and macros, etc, in From 6ea6440d02e2fa46642a23445b63b0a59253a18e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 16 Mar 2021 13:27:44 +0100 Subject: [PATCH 133/609] update specs config --- Gemfile | 2 +- spec/rails_helper.rb | 31 ++++++++++++++++++------- spec/spec_helper.rb | 55 ++++++++++++++++++++++++++------------------ 3 files changed, 56 insertions(+), 32 deletions(-) diff --git a/Gemfile b/Gemfile index d71e69417..64ed21bf8 100644 --- a/Gemfile +++ b/Gemfile @@ -52,7 +52,7 @@ group :development, :test do end group :test do - gem 'vcr', '~> 6.0', '>= 6.0.0' + gem 'vcr', '~> 6.0', '>= 6.0.0' end group :development do diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index c33805434..4fcebdb57 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -1,13 +1,15 @@ # This file is copied to spec/ when you run 'rails generate rspec:install' -ENV["RAILS_ENV"] ||= 'test' require 'spec_helper' -require File.expand_path("../../config/environment", __FILE__) + +ENV['RAILS_ENV'] ||= 'test' +require File.expand_path('../config/environment', __dir__) +# Prevent database truncation if the environment is production +abort("The Rails environment is running in production mode!") if Rails.env.production? require 'rspec/rails' +# Add additional requires below this line. Rails is not loaded until this point! require 'capybara/rspec' require 'ostruct' -# Add additional requires below this line. Rails is not loaded until this point! - # Requires supporting ruby files with custom matchers and macros, etc, in # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are # run as spec files by default. This means that files in spec/support that end @@ -21,11 +23,16 @@ # directory. Alternatively, in the individual `*_spec.rb` files, manually # require only the support files necessary. # -Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f } +Dir[Rails.root.join('spec', 'support', '**', '*.rb')].sort.each { |f| require f } -# Checks for pending migrations before tests are run. -# If you are not using ActiveRecord, you can remove this line. -ActiveRecord::Migration.maintain_test_schema! +# Checks for pending migrations and applies them before tests are run. +# If you are not using ActiveRecord, you can remove these lines. +begin + ActiveRecord::Migration.maintain_test_schema! +rescue ActiveRecord::PendingMigrationError => e + puts e.to_s.strip + exit 1 +end RSpec.configure do |config| # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures @@ -36,6 +43,9 @@ # instead of true. config.use_transactional_fixtures = true + # You can uncomment this line to turn off ActiveRecord support entirely. + # config.use_active_record = false + # RSpec Rails can automatically mix in different behaviours to your tests # based on their file location, for example enabling you to call `get` and # `post` in specs under `spec/controllers`. @@ -51,6 +61,11 @@ # https://relishapp.com/rspec/rspec-rails/docs config.infer_spec_type_from_file_location! + # Filter lines from Rails gems in backtraces. + config.filter_rails_from_backtrace! + # arbitrary gems may also be filtered via: + # config.filter_gems_from_backtrace("gem name") + config.include FactoryBot::Syntax::Methods config.include CommonActions end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 29af1c670..b2b64f3d5 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,22 +1,19 @@ # This file was generated by the `rails generate rspec:install` command. Conventionally, all # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. -# The generated `.rspec` file contains `--require spec_helper` which will cause this -# file to always be loaded, without a need to explicitly require it in any files. +# The generated `.rspec` file contains `--require spec_helper` which will cause +# this file to always be loaded, without a need to explicitly require it in any +# files. # # Given that it is always loaded, you are encouraged to keep this file as # light-weight as possible. Requiring heavyweight dependencies from this file # will add to the boot time of your test suite on EVERY test run, even for an # individual file that may not need all of that loaded. Instead, consider making # a separate helper file that requires the additional dependencies and performs -# the additional setup, and require it from the spec files that actually need it. -# -# The `.rspec` file also contains a few flags that are not defaults but that -# users commonly want. +# the additional setup, and require it from the spec files that actually need +# it. # # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration - RSpec.configure do |config| - # rspec-expectations config goes here. You can use an alternate # assertion/expectation library such as wrong or the stdlib/minitest # assertions if you prefer. @@ -24,10 +21,10 @@ # This option will default to `true` in RSpec 4. It makes the `description` # and `failure_message` of custom matchers include text for helper methods # defined using `chain`, e.g.: - # be_bigger_than(2).and_smaller_than(4).description - # # => "be bigger than 2 and smaller than 4" + # be_bigger_than(2).and_smaller_than(4).description + # # => "be bigger than 2 and smaller than 4" # ...rather than: - # # => "be bigger than 2" + # # => "be bigger than 2" expectations.include_chain_clauses_in_custom_matcher_descriptions = true end @@ -41,21 +38,33 @@ mocks.verify_partial_doubles = false end + # This option will default to `:apply_to_host_groups` in RSpec 4 (and will + # have no way to turn it off -- the option exists only for backwards + # compatibility in RSpec 3). It causes shared context metadata to be + # inherited by the metadata hash of host groups and examples, rather than + # triggering implicit auto-inclusion in groups with matching metadata. + config.shared_context_metadata_behavior = :apply_to_host_groups + # The settings below are suggested to provide a good initial experience # with RSpec, but feel free to customize to your heart's content. =begin - # These two settings work together to allow you to limit a spec run - # to individual examples or groups you care about by tagging them with - # `:focus` metadata. When nothing is tagged with `:focus`, all examples - # get run. - config.filter_run :focus - config.run_all_when_everything_filtered = true + # This allows you to limit a spec run to individual examples or groups + # you care about by tagging them with `:focus` metadata. When nothing + # is tagged with `:focus`, all examples get run. RSpec also provides + # aliases for `it`, `describe`, and `context` that include `:focus` + # metadata: `fit`, `fdescribe` and `fcontext`, respectively. + config.filter_run_when_matching :focus + + # Allows RSpec to persist some state between runs in order to support + # the `--only-failures` and `--next-failure` CLI options. We recommend + # you configure your source control system to ignore this file. + config.example_status_persistence_file_path = "spec/examples.txt" - # Limits the available syntax to the non-monkey patched syntax that is recommended. - # For more details, see: - # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax - # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/ - # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching + # Limits the available syntax to the non-monkey patched syntax that is + # recommended. For more details, see: + # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/ + # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/ + # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode config.disable_monkey_patching! # Many RSpec users commonly either run the entire suite or an individual @@ -65,7 +74,7 @@ # Use the documentation formatter for detailed output, # unless a formatter has already been configured # (e.g. via a command-line flag). - config.default_formatter = 'doc' + config.default_formatter = "doc" end # Print the 10 slowest examples and example groups at the From 2fa889cc3a27aa3375b0d4cd16b39a402ff2830c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 15 Mar 2021 10:33:17 +0100 Subject: [PATCH 134/609] use helper --- app/views/home/profile.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/home/profile.html.erb b/app/views/home/profile.html.erb index 7a1bb7e0b..2d6af1c20 100644 --- a/app/views/home/profile.html.erb +++ b/app/views/home/profile.html.erb @@ -21,9 +21,9 @@
- <% if @current_user.papers.any? %> + <% if current_user.papers.any? %>

Your papers

- <% @current_user.papers.each do |paper| %> + <% current_user.papers.each do |paper| %>
From 054e67a03a933340c49dcd66f49a5816bdb5d31d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 16 Mar 2021 11:08:13 +0100 Subject: [PATCH 135/609] add editor profile --- app/controllers/editors_controller.rb | 23 ++++++- app/views/editors/profile.html.erb | 90 ++++++++++++++++++++++++++ app/views/home/_profiles_menu.html.erb | 6 ++ app/views/home/profile.html.erb | 34 ++++++---- config/routes.rb | 8 ++- spec/features/editors/profile_spec.rb | 52 +++++++++++++++ 6 files changed, 196 insertions(+), 17 deletions(-) create mode 100644 app/views/editors/profile.html.erb create mode 100644 app/views/home/_profiles_menu.html.erb create mode 100644 spec/features/editors/profile_spec.rb diff --git a/app/controllers/editors_controller.rb b/app/controllers/editors_controller.rb index 0254f3f27..455a0e363 100644 --- a/app/controllers/editors_controller.rb +++ b/app/controllers/editors_controller.rb @@ -1,6 +1,8 @@ class EditorsController < ApplicationController - before_action :require_admin_user, except: [:lookup] + before_action :require_admin_user, except: [:lookup, :profile, :update_profile] + before_action :require_editor, only:[:profile, :update_profile] before_action :set_editor, only: [:show, :edit, :update, :destroy] + before_action :set_current_editor, only: [:profile, :update_profile] def index @editors = Editor.all @@ -55,12 +57,31 @@ def destroy redirect_to editors_url, notice: 'Editor was successfully destroyed.' end + def profile + end + + def update_profile + if @editor.update(profile_params) + redirect_to editor_profile_path, notice: 'Editor profile was successfully updated.' + else + render :profile + end + end + private def set_editor @editor = Editor.find(params[:id]) end + def set_current_editor + @editor = current_user.editor + end + def editor_params params.require(:editor).permit(:availability, :availability_comment, :kind, :title, :first_name, :last_name, :login, :email, :avatar_url, :category_list, :url, :description) end + + def profile_params + params.require(:editor).permit(:availability, :availability_comment, :first_name, :last_name, :email, :avatar_url, :category_list, :url, :description) + end end diff --git a/app/views/editors/profile.html.erb b/app/views/editors/profile.html.erb new file mode 100644 index 000000000..0208b07f2 --- /dev/null +++ b/app/views/editors/profile.html.erb @@ -0,0 +1,90 @@ +
+
+
+

Editor profile

+ + <%= render partial: "home/profiles_menu" %> + +
+ <%= form_for(@editor, url: update_editor_profile_path) do |f| %> +
+ <% if @editor.errors.any? %> +
+

<%= pluralize(@editor.errors.count, "error") %> prohibited this editor from being saved:

+ +
    + <% @editor.errors.each do |error| %> +
  • <%= error.attribute.to_s.humanize %>: <%= error.message %>
  • + <% end %> +
+
+ <% end %> +
+ +
+
+
+ <%= f.label :availability, "Availability" %> + <%= f.select :availability, Editor::AVAILABILITY_STATES, {}, class: "form-control" %> +
+
+ <%= f.label :availability_comment, "Comment on availability" %> + <%= f.text_field :availability_comment, class: "form-control" %> +
+
+
+ +
+
+
+ <%= f.label :first_name %> + <%= f.text_field :first_name, class: "form-control" %> +
+ +
+ <%= f.label :last_name %> + <%= f.text_field :last_name, class: "form-control" %> +
+
+
+ +
+
+
+ <%= f.label :avatar_url %> + <%= f.text_field :avatar_url, class: "form-control" %> +
+ +
+ <%= f.label :category_list, "Categories (comma or space separated)" %> + <%= f.text_field :category_list, class: "form-control" %> +
+
+
+ +
+ <%= f.label :url %> + <%= f.text_field :url, class: "form-control" %> +
+ +
+ <%= f.label :description %> + <%= f.text_area :description, rows: 4, class: "form-control" %> +
+ +
+ <%= f.submit "Update editor profile", class: "btn action-btn" %> +
+ <% end %> +
+ +
+

This is the url for the list of all the papers you have edited:

+ <%= link_to papers_by_editor_url(@editor.login), papers_by_editor_url(@editor.login)%> +
+
+
+ + + +
\ No newline at end of file diff --git a/app/views/home/_profiles_menu.html.erb b/app/views/home/_profiles_menu.html.erb new file mode 100644 index 000000000..1b012c807 --- /dev/null +++ b/app/views/home/_profiles_menu.html.erb @@ -0,0 +1,6 @@ +<% if current_user.editor? %> +
+ <%= link_to "User profile", profile_path, class: current_class?(profile_path) %> + <%= link_to "Editor profile", editor_profile_path, class: current_class?(editor_profile_path) if current_user.editor? %> +
+<% end %> diff --git a/app/views/home/profile.html.erb b/app/views/home/profile.html.erb index 2d6af1c20..2f4a407a3 100644 --- a/app/views/home/profile.html.erb +++ b/app/views/home/profile.html.erb @@ -1,22 +1,28 @@ +
-
+

Profile

-

Please make sure you've added an email address and GitHub username to your profile before submitting. We'll use this to communicate the status of your paper and you won't be able to submit a paper without giving us this information. We promise not to spam you.

- <%= form_tag("/update_profile", id: "profile-form") do %> -
- - <%= email_field "user", "email", placeholder: "your.email@example.com", class: "form-control" %> -
-
- - <%= text_field "user", "github_username", placeholder: "@username", class: "form-control" %> -
-
- <%= submit_tag("Update profile", class: "btn action-btn") %> + <%= render partial: "profiles_menu" %> + +
+

Please make sure you've added an email address and GitHub username to your profile before submitting. We'll use this to communicate the status of your paper and you won't be able to submit a paper without giving us this information. We promise not to spam you.

+ <%= form_tag("/update_profile", id: "profile-form") do %> +
+ + <%= email_field "user", "email", placeholder: "your.email@example.com", class: "form-control" %> +
+ +
+ + <%= text_field "user", "github_username", placeholder: "@username", class: "form-control" %> +
+
+ <%= submit_tag("Update profile", class: "btn action-btn") %> +
+ <% end %>
- <% end %>
diff --git a/config/routes.rb b/config/routes.rb index 9eac48c7b..c7ce7d0eb 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,6 +1,7 @@ Rails.application.routes.draw do resources :editors + resources :papers do resources :votes, only: ['create'] @@ -36,6 +37,8 @@ get '/papers/:doi', to: "papers#show", constraints: { doi: /10.21105\/joss\.\d{5}/} get '/papers/:doi.:format', to: "papers#show", constraints: { doi: /10.21105\/joss\.\d{5}/} + get '/editor_profile', to: 'editors#profile', as: 'editor_profile' + patch '/update_editor_profile', to: 'editors#update_profile', as: 'update_editor_profile' get '/dashboard/all', to: "home#all" get '/dashboard/incoming', to: "home#incoming" @@ -43,10 +46,11 @@ get '/dashboard', to: "home#dashboard" get '/dashboard/*editor', to: "home#reviews" - - post '/update_profile', to: "home#update_profile" get '/about', to: 'home#about', as: 'about' + get '/profile', to: 'home#profile', as: 'profile' + post '/update_profile', to: "home#update_profile" + get '/auth/:provider/callback', to: 'sessions#create' get "/signout" => "sessions#destroy", as: :signout diff --git a/spec/features/editors/profile_spec.rb b/spec/features/editors/profile_spec.rb new file mode 100644 index 000000000..a2fb1d1b9 --- /dev/null +++ b/spec/features/editors/profile_spec.rb @@ -0,0 +1,52 @@ +require "rails_helper" + +feature "Editor profile" do + let(:user_editor) { create(:user, editor: create(:editor, first_name: 'Lorena', description: 'Science testing editor')) } + + scenario "Is not public" do + visit editor_profile_path + expect(page).to have_content('Please login first') + end + + scenario "Is not available to non-editor users" do + login_as(create(:user)) + visit editor_profile_path + expect(page).to have_content('You are not permitted to view that page') + + click_on 'My Profile' + expect(page).to_not have_content('Editor profile') + end + + scenario "Show editor's data" do + login_as(user_editor) + visit root_path + click_on 'My Profile' + click_on 'Editor profile' + expect(page.status_code).to eq(200) + + first_name = find_field('First name').value + description = find_field('Description').value + + expect(first_name).to eq('Lorena') + expect(description).to eq('Science testing editor') + end + + + scenario "Update editor's data" do + login_as(user_editor) + visit editor_profile_path + fill_in 'First name', with: 'Kristina' + fill_in 'Description', with: 'Open Science editor' + click_on 'Update editor profile' + + visit root_path + click_on 'My Profile' + click_on 'Editor profile' + + first_name = find_field('First name').value + description = find_field('Description').value + + expect(first_name).to eq('Kristina') + expect(description).to eq('Open Science editor') + end +end \ No newline at end of file From 0905aa827a90d58235b2d15797844e6e40f35379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 16 Mar 2021 12:02:13 +0100 Subject: [PATCH 136/609] use system specs update specs config --- spec/{features => system}/editors/profile_spec.rb | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename spec/{features => system}/editors/profile_spec.rb (100%) diff --git a/spec/features/editors/profile_spec.rb b/spec/system/editors/profile_spec.rb similarity index 100% rename from spec/features/editors/profile_spec.rb rename to spec/system/editors/profile_spec.rb From e8b57dd0298b3c7becdb1af5560642050066ddfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 25 Mar 2021 13:03:35 +0100 Subject: [PATCH 137/609] create Invitation model --- app/models/invitation.rb | 8 +++++++ .../20210325114224_create_invitations.rb | 12 ++++++++++ db/schema.rb | 22 ++++++++++++++----- spec/models/invitation_spec.rb | 14 ++++++++++++ 4 files changed, 50 insertions(+), 6 deletions(-) create mode 100644 app/models/invitation.rb create mode 100644 db/migrate/20210325114224_create_invitations.rb create mode 100644 spec/models/invitation_spec.rb diff --git a/app/models/invitation.rb b/app/models/invitation.rb new file mode 100644 index 000000000..054123d0e --- /dev/null +++ b/app/models/invitation.rb @@ -0,0 +1,8 @@ +class Invitation < ApplicationRecord + belongs_to :editor + belongs_to :paper + + def accept! + self.update_attribute(:accepted, true) + end +end diff --git a/db/migrate/20210325114224_create_invitations.rb b/db/migrate/20210325114224_create_invitations.rb new file mode 100644 index 000000000..c56a89e28 --- /dev/null +++ b/db/migrate/20210325114224_create_invitations.rb @@ -0,0 +1,12 @@ +class CreateInvitations < ActiveRecord::Migration[6.1] + def change + create_table :invitations do |t| + t.belongs_to :editor + t.belongs_to :paper + t.boolean :accepted, default: false + t.timestamps + end + + add_index :invitations, :created_at + end +end diff --git a/db/schema.rb b/db/schema.rb index 0de15a1d4..99ce47086 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2021_02_22_114454) do +ActiveRecord::Schema.define(version: 2021_03_25_114224) do # These are extensions that must be enabled in order to support this database enable_extension "hstore" @@ -30,13 +30,23 @@ t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "user_id" - t.string "availability" t.string "availability_comment" - t.index ["availability"], name: "index_editors_on_availability" + t.string "availability" t.index ["user_id"], name: "index_editors_on_user_id" end - create_table "papers", id: :serial, force: :cascade do |t| + create_table "invitations", force: :cascade do |t| + t.bigint "editor_id" + t.bigint "paper_id" + t.boolean "accepted", default: false + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["created_at"], name: "index_invitations_on_created_at" + t.index ["editor_id"], name: "index_invitations_on_editor_id" + t.index ["paper_id"], name: "index_invitations_on_paper_id" + end + + create_table "papers", force: :cascade do |t| t.string "title" t.string "state" t.string "repository_url" @@ -52,10 +62,10 @@ t.text "paper_body" t.integer "meta_review_issue_id" t.string "suggested_editor" + t.string "kind" t.text "authors" t.text "citation_string" t.datetime "accepted_at" - t.string "kind" t.integer "editor_id" t.string "reviewers", default: [], array: true t.text "activities" @@ -77,7 +87,7 @@ t.index ["user_id"], name: "index_papers_on_user_id" end - create_table "users", id: :serial, force: :cascade do |t| + create_table "users", force: :cascade do |t| t.string "provider" t.string "uid" t.string "name" diff --git a/spec/models/invitation_spec.rb b/spec/models/invitation_spec.rb new file mode 100644 index 000000000..840a0122f --- /dev/null +++ b/spec/models/invitation_spec.rb @@ -0,0 +1,14 @@ +require 'rails_helper' + +describe Invitation do + it "at creation is not accepted" do + invitation = Invitation.create!(paper: create(:paper), editor: create(:editor)) + expect(invitation).to_not be_accepted + end + + it "can be accepted" do + invitation = Invitation.create!(paper: create(:paper), editor: create(:editor)) + invitation.accept! + expect(invitation).to be_accepted + end +end From d3dfa667c8fde48dc75c5dbb69cdaad6cd8cc23e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 26 Mar 2021 14:37:09 +0100 Subject: [PATCH 138/609] make editors login a sequence --- spec/factories/editors.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/factories/editors.rb b/spec/factories/editors.rb index 42d0deb08..4aac1a488 100644 --- a/spec/factories/editors.rb +++ b/spec/factories/editors.rb @@ -3,7 +3,7 @@ kind { "topic" } first_name { "Person" } last_name { "McEditor" } - login { "mceditor" } + sequence(:login) {|n| "mceditor_#{n}" } email { "mceditor@example.com" } avatar_url { "http://placekitten.com/g/200" } categories { %w(topic1 topic2 topic3) } From 45ee80f578d77bf21bdad88b061036c3cc353eb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 26 Mar 2021 14:37:23 +0100 Subject: [PATCH 139/609] add a factory for invitations --- spec/factories/invitations.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 spec/factories/invitations.rb diff --git a/spec/factories/invitations.rb b/spec/factories/invitations.rb new file mode 100644 index 000000000..4b78360fe --- /dev/null +++ b/spec/factories/invitations.rb @@ -0,0 +1,14 @@ +FactoryBot.define do + factory :invitation do + paper { create(:paper) } + editor { create(:editor) } + + trait :pending do + accepted { false } + end + + trait :accepted do + accepted { true } + end + end +end From 54f69ceaaef596547ef5b4da84dd3a6091062213 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 26 Mar 2021 14:42:35 +0100 Subject: [PATCH 140/609] create invitation when editor is invited --- app/models/editor.rb | 1 + app/models/paper.rb | 40 ++++++++++---------- spec/controllers/dispatch_controller_spec.rb | 4 +- spec/models/editor_spec.rb | 7 +++- spec/models/paper_spec.rb | 27 +++++++++++++ 5 files changed, 58 insertions(+), 21 deletions(-) diff --git a/app/models/editor.rb b/app/models/editor.rb index a8580fe56..c939d9b0f 100644 --- a/app/models/editor.rb +++ b/app/models/editor.rb @@ -7,6 +7,7 @@ class Editor < ApplicationRecord belongs_to :user, optional: true has_many :papers has_many :votes + has_many :invitations before_save :clear_title, if: :board_removed? before_save :format_login, if: :login_changed? diff --git a/app/models/paper.rb b/app/models/paper.rb index 8309b61a6..1b05236da 100644 --- a/app/models/paper.rb +++ b/app/models/paper.rb @@ -7,25 +7,26 @@ class Paper < ApplicationRecord serialize :activities, Hash serialize :metadata, Hash - belongs_to :submitting_author, - class_name: 'User', - validate: true, - foreign_key: "user_id" - - belongs_to :editor, optional: true - belongs_to :eic, - class_name: 'Editor', - optional: true, - foreign_key: "eic_id" - - has_many :votes - has_many :in_scope_votes, - -> { in_scope }, - class_name: 'Vote' - - has_many :out_of_scope_votes, - -> { out_of_scope }, - class_name: 'Vote' + belongs_to :submitting_author, + class_name: 'User', + validate: true, + foreign_key: "user_id" + + belongs_to :editor, optional: true + belongs_to :eic, + class_name: 'Editor', + optional: true, + foreign_key: "eic_id" + + has_many :invitations + has_many :votes + has_many :in_scope_votes, + -> { in_scope }, + class_name: 'Vote' + + has_many :out_of_scope_votes, + -> { out_of_scope }, + class_name: 'Vote' include AASM @@ -171,6 +172,7 @@ def published? def invite_editor(editor_handle) return false unless editor = Editor.find_by_login(editor_handle) Notifications.editor_invite_email(self, editor).deliver_now + invitations.create(editor: editor) end def scholar_title diff --git a/spec/controllers/dispatch_controller_spec.rb b/spec/controllers/dispatch_controller_spec.rb index 76b111eb3..891cdd0a1 100644 --- a/spec/controllers/dispatch_controller_spec.rb +++ b/spec/controllers/dispatch_controller_spec.rb @@ -126,7 +126,7 @@ def set_signature(payload) expect(@paper.activities).to eq({"issues"=>{"commenters"=>{"pre-review"=>{}, "review"=>{}}, "comments"=>[], "last_comments" => {}, "last_edits"=>{"comment-editor"=>"2018-10-06T16:18:56Z"}}}) end - it "should update the percent_complete value" do + it "should update the percent_complete value" do expect(@paper.percent_complete).to eq(0.9375) end @@ -316,6 +316,8 @@ def set_signature(payload) post_params = { secret: "mooo", id: 1234, editor: "jimmy" } expect { post :api_editor_invite, params: post_params }.to change { ActionMailer::Base.deliveries.count }.by(1) + expect { post :api_editor_invite, params: post_params }.to change { editor.invitations.count }.by(1) + expect { post :api_editor_invite, params: post_params }.to change { paper.invitations.count }.by(1) end it "with the correct API key and invalid editor" do diff --git a/spec/models/editor_spec.rb b/spec/models/editor_spec.rb index 82beee8d2..fcd6d6314 100644 --- a/spec/models/editor_spec.rb +++ b/spec/models/editor_spec.rb @@ -25,11 +25,16 @@ association = Editor.reflect_on_association(:votes) expect(association.macro).to eq(:has_many) end - + it "has many papers" do association = Editor.reflect_on_association(:papers) expect(association.macro).to eq(:has_many) end + + it "has many invitations" do + association = Editor.reflect_on_association(:invitations) + expect(association.macro).to eq(:has_many) + end end describe "#full_name" do diff --git a/spec/models/paper_spec.rb b/spec/models/paper_spec.rb index cda4f97e4..019b30524 100644 --- a/spec/models/paper_spec.rb +++ b/spec/models/paper_spec.rb @@ -15,6 +15,11 @@ expect(association.macro).to eq(:belongs_to) end + it "has many invitations" do + association = Paper.reflect_on_association(:invitations) + expect(association.macro).to eq(:has_many) + end + it "should know how to parameterize itself properly" do paper = create(:paper) @@ -86,6 +91,28 @@ expect(paper.review_url).to eq("https://github.com/#{Rails.application.settings["reviews"]}/issues/999") end + describe "#invite_editor" do + it "should return false if editor does not exist" do + expect(create(:paper).invite_editor("invalid")).to be false + end + + it "should email an invitation to the editor" do + paper = create(:paper) + editor = create(:editor) + + expect { paper.invite_editor(editor.login) }.to change { ActionMailer::Base.deliveries.count }.by(1) + end + + it "should create a pending invitation for the invited editor" do + paper = create(:paper) + editor = create(:editor) + + expect(Invitation.exists?(paper: paper, editor:editor)).to be_falsy + expect { paper.invite_editor(editor.login)}.to change { Invitation.count }.by(1) + expect(Invitation.pending.exists?(paper: paper, editor:editor)).to be_truthy + end + end + context "when accepted" do it "should know how to generate a PDF URL for Google Scholar" do paper = create(:accepted_paper) From 38dcc1f5a6aa483e3ddd97224e837d4f92db24f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 26 Mar 2021 14:43:27 +0100 Subject: [PATCH 141/609] mark invitation as accepted when editor is assigned to paper --- app/models/invitation.rb | 8 ++++++++ app/models/paper.rb | 1 + spec/models/invitation_spec.rb | 21 +++++++++++++++++++++ spec/models/paper_spec.rb | 19 +++++++++++++++++++ 4 files changed, 49 insertions(+) diff --git a/app/models/invitation.rb b/app/models/invitation.rb index 054123d0e..341ad7715 100644 --- a/app/models/invitation.rb +++ b/app/models/invitation.rb @@ -2,7 +2,15 @@ class Invitation < ApplicationRecord belongs_to :editor belongs_to :paper + scope :accepted, -> { where(accepted: true) } + scope :pending, -> { where(accepted: false) } + def accept! self.update_attribute(:accepted, true) end + + def self.accept_if_pending(paper, editor) + invitation = pending.find_by(paper: paper, editor: editor) + invitation.accept! if invitation + end end diff --git a/app/models/paper.rb b/app/models/paper.rb index 1b05236da..b6b23fae6 100644 --- a/app/models/paper.rb +++ b/app/models/paper.rb @@ -370,6 +370,7 @@ def set_reviewers(reviewers) # Updated the paper with the editor_id def set_editor(editor) self.update_attribute(:editor_id, editor.id) + Invitation.accept_if_pending(self, editor) end # Update the Paper review_issue_id field diff --git a/spec/models/invitation_spec.rb b/spec/models/invitation_spec.rb index 840a0122f..a7a6aa9f2 100644 --- a/spec/models/invitation_spec.rb +++ b/spec/models/invitation_spec.rb @@ -11,4 +11,25 @@ invitation.accept! expect(invitation).to be_accepted end + + describe ".accept_if_pending" do + it "should accept the invitation if pending" do + pending_invitation = create(:invitation, :pending) + Invitation.accept_if_pending(pending_invitation.paper, pending_invitation.editor) + expect(pending_invitation.reload).to be_accepted + end + + it "should do nothing if invitation already accepted" do + invitation = create(:invitation, :accepted) + expect { Invitation.accept_if_pending(invitation.paper, invitation.editor) }.to_not change { Invitation.pending.count } + expect { Invitation.accept_if_pending(invitation.paper, invitation.editor) }.to_not change { Invitation.accepted.count } + end + + it "should do nothing if no invitation exists" do + create(:invitation, :accepted) + create(:invitation, :pending) + expect { Invitation.accept_if_pending(create(:paper), create(:editor)) }.to_not change { Invitation.pending.count } + expect { Invitation.accept_if_pending(create(:paper), create(:editor)) }.to_not change { Invitation.accepted.count } + end + end end diff --git a/spec/models/paper_spec.rb b/spec/models/paper_spec.rb index 019b30524..23e06b58d 100644 --- a/spec/models/paper_spec.rb +++ b/spec/models/paper_spec.rb @@ -91,6 +91,25 @@ expect(paper.review_url).to eq("https://github.com/#{Rails.application.settings["reviews"]}/issues/999") end + describe "#set_editor" do + it "should update paper's editor" do + paper = create(:paper) + editor = create(:editor) + + paper.set_editor editor + expect(paper.editor).to eq(editor) + end + + it "should mark editor's pending invitation as accepted" do + paper = create(:paper) + editor = create(:editor) + invitation = create(:invitation, :pending, paper: paper, editor: editor) + + paper.set_editor editor + expect(invitation.reload).to be_accepted + end + end + describe "#invite_editor" do it "should return false if editor does not exist" do expect(create(:paper).invite_editor("invalid")).to be false From 2913038148c80a7e8ed60bc7059c314af519a5e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 17 Mar 2021 15:38:06 +0100 Subject: [PATCH 142/609] remove editor's availability in favor of max number of assignments --- Gemfile | 1 + Gemfile.lock | 8 ++ app/controllers/editors_controller.rb | 4 +- app/helpers/editors_helper.rb | 49 ++++++++-- app/helpers/home_helper.rb | 5 - app/models/editor.rb | 6 -- app/views/editors/_form.html.erb | 4 +- app/views/editors/index.html.erb | 2 +- app/views/editors/profile.html.erb | 4 +- app/views/editors/show.html.erb | 6 +- app/views/home/dashboard.html.erb | 2 +- ..._change_availability_to_max_assignments.rb | 23 +++++ db/schema.rb | 5 +- spec/controllers/editors_controller_spec.rb | 6 ++ spec/factories/editors.rb | 5 +- spec/helpers/editors_helper_spec.rb | 92 +++++++++++++++++++ spec/system/editors/list_spec.rb | 51 ++++++++++ spec/views/editors/edit.html.erb_spec.rb | 2 +- spec/views/editors/show.html.erb_spec.rb | 4 +- 19 files changed, 242 insertions(+), 37 deletions(-) create mode 100644 db/migrate/20210317094834_change_availability_to_max_assignments.rb create mode 100644 spec/helpers/editors_helper_spec.rb create mode 100644 spec/system/editors/list_spec.rb diff --git a/Gemfile b/Gemfile index 64ed21bf8..98a6cac22 100644 --- a/Gemfile +++ b/Gemfile @@ -49,6 +49,7 @@ group :development, :test do gem 'rspec-rails', '~> 5.0.0' gem 'rails-controller-testing', '~> 1.0.5' gem 'selenium-webdriver' + gem 'webmock' end group :test do diff --git a/Gemfile.lock b/Gemfile.lock index 7ae4ffc34..2bc76f199 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -108,6 +108,8 @@ GEM commonmarker (0.21.1) ruby-enum (~> 0.5) concurrent-ruby (1.1.8) + crack (0.4.5) + rexml crass (1.0.6) declarative (0.0.20) declarative-option (0.1.0) @@ -191,6 +193,7 @@ GEM guard (~> 2.8) guard-compat (~> 1.0) multi_json (~> 1.8) + hashdiff (1.0.1) hashery (2.1.2) hashie (4.1.0) honeybadger (4.7.2) @@ -413,6 +416,10 @@ GEM activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) + webmock (3.12.1) + addressable (>= 2.3.6) + crack (>= 0.3.2) + hashdiff (>= 0.4.0, < 2.0.0) webrick (1.7.0) websocket-driver (0.7.3) websocket-extensions (>= 0.1.0) @@ -465,6 +472,7 @@ DEPENDENCIES unicorn (~> 5.8.0) vcr (~> 6.0, >= 6.0.0) web-console (~> 4.1.0) + webmock will_paginate! RUBY VERSION diff --git a/app/controllers/editors_controller.rb b/app/controllers/editors_controller.rb index 455a0e363..830644148 100644 --- a/app/controllers/editors_controller.rb +++ b/app/controllers/editors_controller.rb @@ -78,10 +78,10 @@ def set_current_editor end def editor_params - params.require(:editor).permit(:availability, :availability_comment, :kind, :title, :first_name, :last_name, :login, :email, :avatar_url, :category_list, :url, :description) + params.require(:editor).permit(:max_assignments, :availability_comment, :kind, :title, :first_name, :last_name, :login, :email, :avatar_url, :category_list, :url, :description) end def profile_params - params.require(:editor).permit(:availability, :availability_comment, :first_name, :last_name, :email, :avatar_url, :category_list, :url, :description) + params.require(:editor).permit(:max_assignments, :availability_comment, :first_name, :last_name, :email, :avatar_url, :category_list, :url, :description) end end diff --git a/app/helpers/editors_helper.rb b/app/helpers/editors_helper.rb index 1cea1520c..2eedcf552 100644 --- a/app/helpers/editors_helper.rb +++ b/app/helpers/editors_helper.rb @@ -1,19 +1,54 @@ module EditorsHelper + # methods to compute availability of an editor based on + # @assignment_by_editor and @paused_by_editor def display_availability(editor) - icon = case editor.availability - when 'none' - "🔴" - when 'somewhat' + active_assignments = @assignment_by_editor[editor.id].to_i - @paused_by_editor[editor.id].to_i + availability = editor.max_assignments - active_assignments + icon = if availability <= 0 + "🔴" + elsif availability == 1 "🟠" - else + else "🟢" end + + comment = "#{editor.max_assignments} max." if editor.availability_comment.present? icon += "*" - comment = ": #{editor.availability_comment}" + comment += " : #{editor.availability_comment}" end - "#{icon}".html_safe + "#{icon}".html_safe + end + + def in_progress_for_editor(editor) + paused_count = @paused_by_editor[editor.id].to_i + total_paper_count = @assignment_by_editor[editor.id].to_i + + if paused_count > 0 + return "#{total_paper_count - paused_count} (+ #{paused_count} paused)".html_safe + else + return "#{total_paper_count}" + end + end + + def in_progress_no_paused_for_editor(editor) + paused_count = @paused_by_editor[editor.id].to_i + total_paper_count = @assignment_by_editor[editor.id].to_i + + return total_paper_count - paused_count + end + + def availability_class(editor) + active_assignments = @assignment_by_editor[editor.id].to_i - @paused_by_editor[editor.id].to_i + availability = editor.max_assignments - active_assignments + if availability <= 0 + "availability-none" + elsif availability == 1 + "availability-somewhat" + else + "" + end end def in_progress_for_editor(editor) diff --git a/app/helpers/home_helper.rb b/app/helpers/home_helper.rb index f6a823f06..7444e647c 100644 --- a/app/helpers/home_helper.rb +++ b/app/helpers/home_helper.rb @@ -159,9 +159,4 @@ def activites_shortcut_for(paper) def linked_reviewers(paper) paper.reviewers.map { |reviewer| github_user(reviewer.gsub('@', '')) }.join(', ').html_safe end - - def availability_class(editor) - return "" unless editor.availability? - "availability-" + editor.availability.downcase.gsub(' ', '-') - end end diff --git a/app/models/editor.rb b/app/models/editor.rb index a8580fe56..465fd40cc 100644 --- a/app/models/editor.rb +++ b/app/models/editor.rb @@ -16,12 +16,6 @@ class Editor < ApplicationRecord "topic" ].freeze - AVAILABILITY_STATES = [ - "available", - "somewhat", - "none" - ] - scope :board, -> { where(kind: "board") } scope :topic, -> { where(kind: "topic") } scope :emeritus, -> { where(kind: "emeritus") } diff --git a/app/views/editors/_form.html.erb b/app/views/editors/_form.html.erb index 12fb8d9b7..19d506feb 100644 --- a/app/views/editors/_form.html.erb +++ b/app/views/editors/_form.html.erb @@ -20,8 +20,8 @@ <%= f.select :kind, %w(topic board emeritus), {}, class: "form-control" %>
- <%= f.label :availability, "Availability" %> - <%= f.select :availability, Editor::AVAILABILITY_STATES, {}, class: "form-control" %> + <%= f.label :max_assignments, "Max number of assignments" %> + <%= f.text_field :max_assignments, class: "form-control" %>
<%= f.label :availability_comment, "Comment on availability" %> diff --git a/app/views/editors/index.html.erb b/app/views/editors/index.html.erb index d5da6e206..7e62e034f 100644 --- a/app/views/editors/index.html.erb +++ b/app/views/editors/index.html.erb @@ -40,7 +40,7 @@
- + diff --git a/app/views/editors/profile.html.erb b/app/views/editors/profile.html.erb index 0208b07f2..78b383e80 100644 --- a/app/views/editors/profile.html.erb +++ b/app/views/editors/profile.html.erb @@ -24,8 +24,8 @@
- <%= f.label :availability, "Availability" %> - <%= f.select :availability, Editor::AVAILABILITY_STATES, {}, class: "form-control" %> + <%= f.label :max_assignments, "Max number of assignments" %> + <%= f.text_field :max_assignments, class: "form-control" %>
<%= f.label :availability_comment, "Comment on availability" %> diff --git a/app/views/editors/show.html.erb b/app/views/editors/show.html.erb index 6663d3e3e..7bba037fb 100644 --- a/app/views/editors/show.html.erb +++ b/app/views/editors/show.html.erb @@ -1,5 +1,3 @@ -

<%= notice %>

-
<%= render partial: "shared/editor", locals: { editor: @editor } %> @@ -55,8 +53,8 @@

- Availability: <%= @editor.availability.try(:capitalize) %> - <%= @editor.availability_comment %> + Max number of assignments: + <%= @editor.max_assignments %>

<% Editor.active.order('LOWER(login)').each do |editor| %> - + diff --git a/db/migrate/20210317094834_change_availability_to_max_assignments.rb b/db/migrate/20210317094834_change_availability_to_max_assignments.rb new file mode 100644 index 000000000..5a5457c8c --- /dev/null +++ b/db/migrate/20210317094834_change_availability_to_max_assignments.rb @@ -0,0 +1,23 @@ +class ChangeAvailabilityToMaxAssignments < ActiveRecord::Migration[6.1] + def change + add_column :editors,:max_assignments, :integer, null: false, default: 2 + migrate_availability + remove_column :editors, :availability, :string + end + + def migrate_availability + if Editor.first.respond_to?(:max_assignments) && Editor.first.respond_to?(:availability) + map_by_current_availability = { "available" => 2, + "somewhat" => 1, + "none" => 0, + "" => 2, + nil => 2 } + assigned_by_editor = Paper.unscoped.in_progress.group(:editor_id).count + Editor.emeritus.update_all(max_assignments: 0) + Editor.active.each do |editor| + editor.max_assignments = assigned_by_editor[editor.id].to_i + map_by_current_availability[editor.availability] + editor.save + end + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 0de15a1d4..c5327d7a5 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2021_02_22_114454) do +ActiveRecord::Schema.define(version: 2021_03_17_094834) do # These are extensions that must be enabled in order to support this database enable_extension "hstore" @@ -30,9 +30,8 @@ t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "user_id" - t.string "availability" t.string "availability_comment" - t.index ["availability"], name: "index_editors_on_availability" + t.integer "max_assignments", default: 2, null: false t.index ["user_id"], name: "index_editors_on_user_id" end diff --git a/spec/controllers/editors_controller_spec.rb b/spec/controllers/editors_controller_spec.rb index df8a23b9f..536b086ff 100644 --- a/spec/controllers/editors_controller_spec.rb +++ b/spec/controllers/editors_controller_spec.rb @@ -42,6 +42,12 @@ get :index expect(assigns(:editors)).to eq([editor]) end + + it "assigns grouped availability information" do + get :index + expect(assigns(:assignment_by_editor)).to be + expect(assigns(:paused_by_editor)).to be + end end describe "#show" do diff --git a/spec/factories/editors.rb b/spec/factories/editors.rb index 42d0deb08..1dd16bec4 100644 --- a/spec/factories/editors.rb +++ b/spec/factories/editors.rb @@ -9,7 +9,10 @@ categories { %w(topic1 topic2 topic3) } url { "http://placekitten.com" } description { "Person McEditor is an editor" } - availability { "available" } availability_comment { "OOO until March 1" } + + factory :board_editor do + kind { "board" } + end end end diff --git a/spec/helpers/editors_helper_spec.rb b/spec/helpers/editors_helper_spec.rb new file mode 100644 index 000000000..573caa19a --- /dev/null +++ b/spec/helpers/editors_helper_spec.rb @@ -0,0 +1,92 @@ +describe EditorsHelper do + before do + @editor = create(:editor, max_assignments: 5, availability_comment: nil) + @assignment_by_editor = { @editor.id => 4 } + @paused_by_editor = { @editor.id => 1 } + end + + describe "display_availability" do + it "displays icon with current availability" do + @editor.max_assignments = 3 + expect(display_availability(@editor)).to include("🔴") + + @editor.max_assignments = 4 + expect(display_availability(@editor)).to include("🟠") + + @editor.max_assignments = 5 + expect(display_availability(@editor)).to include("🟢") + end + + it "displays availability comment if present" do + expect(display_availability(@editor)).to include("🟢") + expect(display_availability(@editor)).to_not include("*") + + @editor.availability_comment = "OOO until january" + expect(display_availability(@editor)).to include("🟢*") + expect(display_availability(@editor)).to include("OOO until january") + end + end + + describe "in_progress_for_editor" do + it "returns assigned papers" do + @paused_by_editor = { @editor.id => 0 } + expect(in_progress_for_editor(@editor)).to eq("4") + end + + it "returns assigned + paused papers if present" do + expect(in_progress_for_editor(@editor)).to include("3") + expect(in_progress_for_editor(@editor)).to include("(+ 1 paused)") + end + end + + describe "in_progress_no_paused_for_editor" do + it "returns count of assigned not paused papers" do + expect(in_progress_no_paused_for_editor(@editor)).to eq(3) + + expect(in_progress_no_paused_for_editor(create(:editor))).to eq(0) + end + end + + describe "availability_class" do + before do + @editor = create(:editor) + @assignment_by_editor = {} + @paused_by_editor = {} + end + + it "should be none" do + @editor.max_assignments = -2 + expect(availability_class(@editor)).to eq("availability-none") + + @editor.max_assignments = 0 + expect(availability_class(@editor)).to eq("availability-none") + end + + it "should be somewhat" do + @editor.max_assignments = 1 + expect(availability_class(@editor)).to eq("availability-somewhat") + end + + it "should be empty if available" do + @editor.max_assignments = 2 + expect(availability_class(@editor)).to eq("") + + @editor.max_assignments = 15 + expect(availability_class(@editor)).to eq("") + end + + it "takes current assigments into account" do + @assignment_by_editor = { @editor.id => 4 } + @paused_by_editor = { @editor.id => 1 } + + @editor.max_assignments = 3 + expect(availability_class(@editor)).to eq("availability-none") + + @editor.max_assignments = 4 + expect(availability_class(@editor)).to eq("availability-somewhat") + + @editor.max_assignments = 5 + expect(availability_class(@editor)).to eq("") + end + end +end diff --git a/spec/system/editors/list_spec.rb b/spec/system/editors/list_spec.rb new file mode 100644 index 000000000..16f5d39d3 --- /dev/null +++ b/spec/system/editors/list_spec.rb @@ -0,0 +1,51 @@ +require "rails_helper" + +feature "Editor list" do + let(:user_editor) { create(:user, editor: create(:editor, first_name: 'Lorena', description: 'Science testing editor')) } + let(:admin_editor) { create(:admin_user, editor: create(:board_editor)) } + + scenario "Is not public" do + visit editors_path + expect(page).to have_content('Please login first') + end + + scenario "Is not available to non-eic users" do + login_as(user_editor) + visit editors_path + expect(page).to have_content('You are not permitted to view that page') + end + + scenario "Is visible to admins" do + login_as(admin_editor) + visit editors_path + expect(page).to_not have_content('You are not permitted to view that page') + end + + feature "Logged as an admin" do + before do + create(:editor, first_name: 'Tester', + login: 'tester', + description: 'Software testing editor', + categories: ['Computing', 'Test systems'], + availability_comment: 'Always available') + login_as(admin_editor) + visit editors_path + end + + scenario "show the list of editors" do + expect(page).to have_content('Tester') + expect(page).to have_content('Software testing editor') + expect(page).to have_content('Computing, Test systems') + expect(page).to have_content('🟢*') + end + + scenario "editors info is editable" do + allow(Repository).to receive(:editors).and_return(["@tester", "@mctester"]) + click_link "✏️", href: edit_editor_path(Editor.find_by(login: 'tester')) + fill_in :editor_last_name, with: "Testing" + click_on "Update Editor" + visit editors_path + expect(page).to have_content('Tester Testing') + end + end +end diff --git a/spec/views/editors/edit.html.erb_spec.rb b/spec/views/editors/edit.html.erb_spec.rb index 2ab998c98..3c0752394 100644 --- a/spec/views/editors/edit.html.erb_spec.rb +++ b/spec/views/editors/edit.html.erb_spec.rb @@ -11,7 +11,7 @@ assert_select "form[action=?][method=?]", editor_path(@editor), "post" do assert_select "select#editor_kind[name=?]", "editor[kind]" - assert_select "select#editor_availability[name=?]", "editor[availability]" + assert_select "input#editor_max_assignments[name=?]", "editor[max_assignments]" assert_select "input#editor_availability_comment[name=?]", "editor[availability_comment]" assert_select "input#editor_title[name=?]", "editor[title]" assert_select "input#editor_first_name[name=?]", "editor[first_name]" diff --git a/spec/views/editors/show.html.erb_spec.rb b/spec/views/editors/show.html.erb_spec.rb index 193f70660..006ffca63 100644 --- a/spec/views/editors/show.html.erb_spec.rb +++ b/spec/views/editors/show.html.erb_spec.rb @@ -5,7 +5,7 @@ @editor = assign(:editor, create(:editor)) end - it "renders attributes in

" do + it "renders attributes" do render expect(rendered).to match(/Type/) expect(rendered).to match(/Title/) @@ -17,6 +17,6 @@ expect(rendered).to match(/Categories/) expect(rendered).to match(/Url/) expect(rendered).to match(/Description/) - expect(rendered).to match(/Availability/) + expect(rendered).to match(/Max number of assignments/) end end From b522c66448af0a11510f9709d7b60b8d5c527d04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 30 Mar 2021 14:09:21 +0200 Subject: [PATCH 143/609] add recent invitations to EiC dashboard --- app/controllers/invitations_controller.rb | 7 +++ app/helpers/invitations_helper.rb | 14 +++++ app/views/eic_dashboard/_menu.html.erb | 1 + app/views/eic_dashboard/index.html.erb | 2 +- app/views/invitations/index.html.erb | 49 +++++++++++++++ config/routes.rb | 1 + spec/system/invitations_spec.rb | 73 +++++++++++++++++++++++ 7 files changed, 146 insertions(+), 1 deletion(-) create mode 100644 app/controllers/invitations_controller.rb create mode 100644 app/helpers/invitations_helper.rb create mode 100644 app/views/invitations/index.html.erb create mode 100644 spec/system/invitations_spec.rb diff --git a/app/controllers/invitations_controller.rb b/app/controllers/invitations_controller.rb new file mode 100644 index 000000000..10c933fcc --- /dev/null +++ b/app/controllers/invitations_controller.rb @@ -0,0 +1,7 @@ +class InvitationsController < ApplicationController + before_action :require_admin_user + + def index + @invitations = Invitation.includes(:editor, :paper).order(created_at: :desc).limit(25) + end +end diff --git a/app/helpers/invitations_helper.rb b/app/helpers/invitations_helper.rb new file mode 100644 index 000000000..ee1fc66c2 --- /dev/null +++ b/app/helpers/invitations_helper.rb @@ -0,0 +1,14 @@ +module InvitationsHelper + def invitation_status(invitation) + status = "⏳ Pending" + + if invitation.accepted? + status = "✅ Accepted" + elsif invitation.paper.review_issue_id.present? && + invitation.paper.editor_id != invitation.editor_id + status = "❌ Rejected" + end + + status + end +end diff --git a/app/views/eic_dashboard/_menu.html.erb b/app/views/eic_dashboard/_menu.html.erb index d18330e4b..21e49f4b9 100644 --- a/app/views/eic_dashboard/_menu.html.erb +++ b/app/views/eic_dashboard/_menu.html.erb @@ -2,5 +2,6 @@

<%= link_to "Submissions overview", eic_dashboard_path, class: current_class?(eic_dashboard_path) %> <%= link_to "Editors", editors_path, class: current_class?(editors_path) %> + <%= link_to "Invitations", invitations_path, class: current_class?(invitations_path) %>
diff --git a/app/views/eic_dashboard/index.html.erb b/app/views/eic_dashboard/index.html.erb index 321424047..05a126b58 100644 --- a/app/views/eic_dashboard/index.html.erb +++ b/app/views/eic_dashboard/index.html.erb @@ -1,5 +1,5 @@
-

<%= notice %>

+

<%= notice %>

Welcome, <%= current_user.editor.full_name %>
diff --git a/app/views/invitations/index.html.erb b/app/views/invitations/index.html.erb new file mode 100644 index 000000000..be35cd646 --- /dev/null +++ b/app/views/invitations/index.html.erb @@ -0,0 +1,49 @@ +
+

<%= notice %>

+
+
Editors in Chief Dashboard
+
+
+ <%= image_tag "icon_papers.svg", height: "32px" %>

Invitations

+
+
+
+
+ +<%= render partial: "eic_dashboard/menu" %> +
+ <% if @invitations.empty? %> +
There are no recent invitations to show
+ <% else %> +
Name Login Description CategoriesPaper loadEditing Availability
<%= truncate(strip_tags(editor.description), length: 150) %> <%= editor.category_list %><%= link_to in_progress_for_editor(Paper.in_progress.where(editor: editor)), "/dashboard/#{editor.login}" %><%= link_to in_progress_for_editor(editor), "/dashboard/#{editor.login}" %> <%= display_availability(editor) %> <%= link_to '✏️', edit_editor_path(editor), title: 'Edit' %> <%= link_to '🗑', editor, method: :delete, data: { confirm: 'Are you sure?' }, title: 'Delete' %>
><%= image_tag(avatar(editor.login), size: "24x24", class: "avatar", title: editor.login) %> <%= link_to editor.login, "/dashboard/#{editor.login}", title: editor.availability %><% if editor.retired? %> (emeritus)<% end %>><%= in_progress_for_editor(Paper.in_progress.where(editor: editor)) %><%= editor.three_month_average %><%= editor.papers.visible.since(1.week.ago).count %><%= editor.papers.visible.since(1.month.ago).count %><%= editor.papers.visible.since(3.months.ago).count %><%= editor.papers.visible.since(1.year.ago).count %><%= editor.papers.visible.since(100.year.ago).count %>><%= image_tag(avatar(editor.login), size: "24x24", class: "avatar", title: editor.login) %> <%= link_to editor.login, "/dashboard/#{editor.login}" %><% if editor.retired? %> (emeritus)<% end %>><%= in_progress_for_editor(editor) %><%= sprintf("%.1f", @papers_last_3_months[editor.id].to_i / 3.0) %><%= @papers_last_week[editor.id].to_i %><%= @papers_last_month[editor.id].to_i %><%= @papers_last_3_months[editor.id].to_i %><%= @papers_last_year[editor.id].to_i %><%= @papers_all_time[editor.id].to_i %>
<%= image_tag(avatar(editor.login), size: "24x24", class: "avatar", title: editor.login) %> <%= link_to editor.login, "/dashboard/#{editor.login}" %><% if editor.retired? %> (emeritus)<% end %><%= in_progress_for_editor(Paper.in_progress.where(editor: editor)) %><%= editor.three_month_average %><%= editor.papers.visible.since(1.week.ago).count %><%= editor.papers.visible.since(1.month.ago).count %><%= editor.papers.visible.since(3.months.ago).count %><%= editor.papers.visible.since(1.year.ago).count %><%= editor.papers.visible.since(100.year.ago).count %><%= in_progress_for_editor(editor) %><%= sprintf("%.1f", @papers_last_3_months[editor.id].to_i / 3.0) %><%= @papers_last_week[editor.id].to_i %><%= @papers_last_month[editor.id].to_i %><%= @papers_last_3_months[editor.id].to_i %><%= @papers_last_year[editor.id].to_i %><%= @papers_all_time[editor.id].to_i %>
<%= truncate(strip_tags(editor.description), length: 150) %> <%= editor.category_list %><%= link_to in_progress_for_editor(editor), "/dashboard/#{editor.login}" %><%= link_to in_progress_for_editor(editor), "/dashboard/#{editor.login}" %> <%= display_availability(editor) %> <%= link_to '✏️', edit_editor_path(editor), title: 'Edit' %> <%= link_to '🗑', editor, method: :delete, data: { confirm: 'Are you sure?' }, title: 'Delete' %>
><%= image_tag(avatar(editor.login), size: "24x24", class: "avatar", title: editor.login) %> <%= link_to editor.login, "/dashboard/#{editor.login}" %><% if editor.retired? %> (emeritus)<% end %>><%= image_tag(avatar(editor.login), size: "24x24", class: "avatar", title: editor.login) %> <%= link_to editor.login, "/dashboard/#{editor.login}" %><% if editor.retired? %> (emeritus)<% end %> ><%= in_progress_for_editor(editor) %> <%= sprintf("%.1f", @papers_last_3_months[editor.id].to_i / 3.0) %> <%= @papers_last_week[editor.id].to_i %>
+ + + + + + + + + + + <%- @invitations.each do |invitation| %> + + + + + + + <%- end %> + +
EditorPaperInvitation statusDate
> + <%= image_tag(avatar(invitation.editor.login), size: "24x24", class: "avatar", title: github_user_link(invitation.editor.login)) %> + <%= link_to invitation.editor.full_name, invitation.editor, title: "Editor profile" %> + (<%= link_to "@#{invitation.editor.login}", github_user_link(invitation.editor.login), title: "GitHub profile", target: "_blank" %>) + + <%= link_to truncate(invitation.paper.title, length: 80), invitation.paper.meta_review_url, title: invitation.paper.title %> + <%= invitation_status(invitation) %>>Invited <%= time_ago_in_words(invitation.created_at) %> ago
+
+
Displaying last <%= @invitations.size %> invitations
+
+ <% end %> + diff --git a/config/routes.rb b/config/routes.rb index 9eac48c7b..fe70086a8 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,6 +1,7 @@ Rails.application.routes.draw do resources :editors + resources :invitations, only: [:index] resources :papers do resources :votes, only: ['create'] diff --git a/spec/system/invitations_spec.rb b/spec/system/invitations_spec.rb new file mode 100644 index 000000000..908c4cb27 --- /dev/null +++ b/spec/system/invitations_spec.rb @@ -0,0 +1,73 @@ +require "rails_helper" + +feature "Invitations list" do + let(:user_editor) { create(:user, editor: create(:editor, first_name: "Lorena")) } + let(:admin) { create(:admin_user) } + + scenario "Is not public" do + visit invitations_path + expect(page).to have_content("Please login first") + end + + scenario "Is not available to non-eic users" do + login_as(user_editor) + visit invitations_path + expect(page).to have_content("You are not permitted to view that page") + end + + scenario "Is visible to admins" do + login_as(admin) + visit invitations_path + expect(page).to_not have_content("You are not permitted to view that page") + end + + feature "Logged as an admin" do + before do + create(:editor, first_name: "Tester", + login: "tester", + description: "Software testing editor", + categories: ["Computing", "Test systems"], + availability_comment: "Always available") + login_as(admin) + end + + scenario "show no invitations message" do + visit invitations_path + expect(page).to_not have_content("Invitation status") + expect(page).to have_content("There are no recent invitations to show") + end + + scenario "list invitations" do + create(:invitation, paper: create(:paper, title: "Test paper"), editor: create(:editor, login: "tester1")) + create(:invitation, paper: create(:paper, title: "Science paper"), editor: create(:editor, login: "user3")) + visit invitations_path + + expect(page).to have_content("Test paper") + expect(page).to have_content("tester1") + expect(page).to have_content("Science paper") + expect(page).to have_content("user3") + end + + scenario "show status for accepted invitations" do + create(:invitation, accepted: true) + visit invitations_path + + expect(page).to have_content("✅ Accepted") + end + + scenario "show status for pending invitations" do + create(:invitation, accepted: false) + visit invitations_path + + expect(page).to have_content("⏳ Pending") + end + + scenario "show status for rejected invitations" do + paper = create(:paper, review_issue_id: 42, editor: create(:editor, id: 33)) + create(:invitation, accepted: false, paper: paper, editor: create(:editor, id: 21)) + visit invitations_path + + expect(page).to have_content("❌ Rejected") + end + end +end From c974e2baee8a9e54caca92b432715e473e88605d Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 5 Apr 2021 16:15:13 +0100 Subject: [PATCH 144/609] Don't assume editor can take more. --- .../20210317094834_change_availability_to_max_assignments.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20210317094834_change_availability_to_max_assignments.rb b/db/migrate/20210317094834_change_availability_to_max_assignments.rb index 5a5457c8c..03067d366 100644 --- a/db/migrate/20210317094834_change_availability_to_max_assignments.rb +++ b/db/migrate/20210317094834_change_availability_to_max_assignments.rb @@ -15,7 +15,7 @@ def migrate_availability assigned_by_editor = Paper.unscoped.in_progress.group(:editor_id).count Editor.emeritus.update_all(max_assignments: 0) Editor.active.each do |editor| - editor.max_assignments = assigned_by_editor[editor.id].to_i + map_by_current_availability[editor.availability] + editor.max_assignments = map_by_current_availability[editor.availability] editor.save end end From 370149f8a15accab04ae16125cea6fe58a474fac Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 7 Apr 2021 12:37:54 +0100 Subject: [PATCH 145/609] h -> H --- app/views/eic_dashboard/index.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/eic_dashboard/index.html.erb b/app/views/eic_dashboard/index.html.erb index 321424047..d1a5a15de 100644 --- a/app/views/eic_dashboard/index.html.erb +++ b/app/views/eic_dashboard/index.html.erb @@ -22,7 +22,7 @@
  • <%= link_to "##{accepted_issue.number}", accepted_issue.html_url, :target => "_blank" %> <%= accepted_issue.title %>
  • <% end %> - <% accepted_link_text = "List of ready to publish submissions at Github" %> + <% accepted_link_text = "List of ready to publish submissions at GitHub" %> <% else %> <% accepted_link_text = "There are no open submissions labeled as recommend-accept.".html_safe %> <% end %> @@ -42,7 +42,7 @@
  • <%= link_to "##{flagged_issue.number}", flagged_issue.html_url, :target => "_blank" %> <%= flagged_issue.title %>
  • <% end %> - <% scope_query_link_text = "List of submissions pending editorial review at Github" %> + <% scope_query_link_text = "List of submissions pending editorial review at GitHub" %> <% else %> <% scope_query_link_text = "There are no open submissions flagged for editorial review (labeled as query-scope).".html_safe %> <% end %> From 344167266c6372ad87da70ec9875d48d51a587e7 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 7 Apr 2021 13:23:35 +0100 Subject: [PATCH 146/609] Cleaning up EiC views --- app/assets/stylesheets/home.scss | 1 + app/helpers/editors_helper.rb | 21 ++++----------- app/views/editors/index.html.erb | 37 +++++++++++--------------- app/views/eic_dashboard/index.html.erb | 14 +++++----- 4 files changed, 28 insertions(+), 45 deletions(-) diff --git a/app/assets/stylesheets/home.scss b/app/assets/stylesheets/home.scss index c42a6503e..ec1212f99 100644 --- a/app/assets/stylesheets/home.scss +++ b/app/assets/stylesheets/home.scss @@ -62,6 +62,7 @@ table.dashboard-table{ border-radius: .25em; padding: 1.5em 2em; box-shadow: 0 2px 8px 0 rgba(46,41,78,0.1); + font-size: 0.9em; @media only screen and (max-width: 900px) { .mobile-hide{ diff --git a/app/helpers/editors_helper.rb b/app/helpers/editors_helper.rb index 2eedcf552..c6ba40573 100644 --- a/app/helpers/editors_helper.rb +++ b/app/helpers/editors_helper.rb @@ -5,11 +5,11 @@ def display_availability(editor) active_assignments = @assignment_by_editor[editor.id].to_i - @paused_by_editor[editor.id].to_i availability = editor.max_assignments - active_assignments icon = if availability <= 0 - "🔴" + "🟥" elsif availability == 1 - "🟠" + "🟨" else - "🟢" + "🟩" end comment = "#{editor.max_assignments} max." @@ -26,7 +26,7 @@ def in_progress_for_editor(editor) total_paper_count = @assignment_by_editor[editor.id].to_i if paused_count > 0 - return "#{total_paper_count - paused_count} (+ #{paused_count} paused)".html_safe + return "#{total_paper_count - paused_count} (+ #{paused_count})".html_safe else return "#{total_paper_count}" end @@ -50,18 +50,7 @@ def availability_class(editor) "" end end - - def in_progress_for_editor(editor) - paused_count = @paused_by_editor[editor.id].to_i - total_paper_count = @assignment_by_editor[editor.id].to_i - - if paused_count > 0 - return "#{total_paper_count - paused_count} (+ #{paused_count} paused)".html_safe - else - return "#{total_paper_count}" - end - end - + def in_progress_no_paused_for_editor(editor) paused_count = @paused_by_editor[editor.id].to_i total_paper_count = @assignment_by_editor[editor.id].to_i diff --git a/app/views/editors/index.html.erb b/app/views/editors/index.html.erb index 7e62e034f..a0e70c006 100644 --- a/app/views/editors/index.html.erb +++ b/app/views/editors/index.html.erb @@ -1,10 +1,10 @@

    <%= notice %>

    -
    Editors in Chief Dashboard
    +
    Welcome, <%= current_user.editor.full_name %>
    - <%= image_tag "icon_papers.svg", height: "32px" %>

    Active Editors

    + <%= image_tag "icon_papers.svg", height: "32px" %>

    Editor Overview

    @@ -14,36 +14,30 @@
    <%= link_to 'New Editor', new_editor_path, class: 'btn action-btn float-right' %> - +
    - - - + - - - + + + + <%- Editor.active.order('last_name ASC').each do |editor| %> - - - - - - + + + + <%- end %> @@ -86,8 +80,7 @@ <%= link_to editor.login, "/dashboard/#{editor.login}" %> - - + <%- end %> diff --git a/app/views/eic_dashboard/index.html.erb b/app/views/eic_dashboard/index.html.erb index d1a5a15de..a9c9e912f 100644 --- a/app/views/eic_dashboard/index.html.erb +++ b/app/views/eic_dashboard/index.html.erb @@ -4,7 +4,7 @@
    Welcome, <%= current_user.editor.full_name %>
    - <%= image_tag "icon_papers.svg", height: "32px" %>

    Editors in Chief Dashboard

    + <%= image_tag "icon_papers.svg", height: "32px" %>

    Managing Editor Dashboard

    @@ -14,7 +14,7 @@
    -

    Accepted and ready to publish

    +

    Accepted and ready to publish

    <% if @recommend_accept.any? %>

    Papers labeled as recommend-accept but still open:

      @@ -22,7 +22,7 @@
    • <%= link_to "##{accepted_issue.number}", accepted_issue.html_url, :target => "_blank" %> <%= accepted_issue.title %>
    • <% end %>
    - <% accepted_link_text = "List of ready to publish submissions at GitHub" %> + <% accepted_link_text = "List of ready to publish submissions at GitHub →".html_safe %> <% else %> <% accepted_link_text = "There are no open submissions labeled as recommend-accept.".html_safe %> <% end %> @@ -31,10 +31,9 @@ "https://github.com/openjournals/joss-reviews/issues?utf8=%E2%9C%93&q=+label:recommend-accept+-label:published+", target: "_blank" %>

    -
    -
    -

    Scope query

    + +

    Scope query

    <% if @with_query_scope.any? %>

    Open submissions flagged for editorial review (labeled as query-scope):

      @@ -42,7 +41,7 @@
    • <%= link_to "##{flagged_issue.number}", flagged_issue.html_url, :target => "_blank" %> <%= flagged_issue.title %>
    • <% end %>
    - <% scope_query_link_text = "List of submissions pending editorial review at GitHub" %> + <% scope_query_link_text = "List of submissions pending editorial review at GitHub →".html_safe %> <% else %> <% scope_query_link_text = "There are no open submissions flagged for editorial review (labeled as query-scope).".html_safe %> <% end %> @@ -53,4 +52,5 @@ target: "_blank" %>

    +
    From c2b819e578ee6613119242098db85d3443d81540 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 7 Apr 2021 18:02:44 +0100 Subject: [PATCH 147/609] Linking invites across existing views --- app/helpers/editors_helper.rb | 13 +++++++++++++ app/helpers/papers_helper.rb | 13 +++++++++++++ app/views/editors/index.html.erb | 2 +- app/views/home/reviews.html.erb | 2 ++ db/schema.rb | 6 +++--- spec/controllers/eic_dashboard_controller_spec.rb | 6 +++--- spec/helpers/editors_helper_spec.rb | 12 ++++++------ spec/system/editors/list_spec.rb | 10 ++++------ 8 files changed, 45 insertions(+), 19 deletions(-) diff --git a/app/helpers/editors_helper.rb b/app/helpers/editors_helper.rb index c6ba40573..f29873391 100644 --- a/app/helpers/editors_helper.rb +++ b/app/helpers/editors_helper.rb @@ -57,4 +57,17 @@ def in_progress_no_paused_for_editor(editor) return total_paper_count - paused_count end + + def open_invites_for_editor(editor) + invites = editor.invitations.pending + + return "–" if invites.empty? + + output = [] + invites.each do |invite| + output << link_to(invite.paper.meta_review_issue_id, invite.paper.meta_review_url) + end + + return output.join(" • ").html_safe + end end diff --git a/app/helpers/papers_helper.rb b/app/helpers/papers_helper.rb index b18682ab4..49668d2bf 100644 --- a/app/helpers/papers_helper.rb +++ b/app/helpers/papers_helper.rb @@ -143,4 +143,17 @@ def formatted_body(paper, length=nil) def paper_types Rails.application.settings["paper_types"] end + + def open_invites_for_paper(paper) + invites = paper.invitations.pending + + return "–" if invites.empty? + + output = [] + invites.each do |invite| + output << link_to(image_tag(avatar(invite.editor.login), size: "24x24", class: "avatar", title: "#{invite.editor.full_name} invited #{time_ago_in_words(invite.created_at)} ago"), invite.paper.meta_review_url) + end + + return output.join(" • ").html_safe + end end diff --git a/app/views/editors/index.html.erb b/app/views/editors/index.html.erb index a0e70c006..9755188ff 100644 --- a/app/views/editors/index.html.erb +++ b/app/views/editors/index.html.erb @@ -36,7 +36,7 @@ - + <%- end %> diff --git a/app/views/home/reviews.html.erb b/app/views/home/reviews.html.erb index e3642fd1f..51e3e98be 100644 --- a/app/views/home/reviews.html.erb +++ b/app/views/home/reviews.html.erb @@ -44,6 +44,7 @@ + @@ -56,6 +57,7 @@ + + <% unless params[:editor]%> + <% end %> @@ -56,8 +58,10 @@ + <% unless params[:editor]%> - + + <% end %> - - + + <%- end %> diff --git a/spec/helpers/editors_helper_spec.rb b/spec/helpers/editors_helper_spec.rb index a58443859..e3513a369 100644 --- a/spec/helpers/editors_helper_spec.rb +++ b/spec/helpers/editors_helper_spec.rb @@ -8,21 +8,21 @@ describe "display_availability" do it "displays icon with current availability" do @editor.max_assignments = 3 - expect(display_availability(@editor)).to include("🟥") + expect(display_availability(@editor)).to include("3") @editor.max_assignments = 4 - expect(display_availability(@editor)).to include("🟨") + expect(display_availability(@editor)).to include("4") @editor.max_assignments = 5 - expect(display_availability(@editor)).to include("🟩") + expect(display_availability(@editor)).to include("5") end it "displays availability comment if present" do - expect(display_availability(@editor)).to include("🟩") + expect(display_availability(@editor)).to include("5") expect(display_availability(@editor)).to_not include("*") @editor.availability_comment = "OOO until january" - expect(display_availability(@editor)).to include("🟩*") + expect(display_availability(@editor)).to include("5*") expect(display_availability(@editor)).to include("OOO until january") end end diff --git a/spec/system/editors/list_spec.rb b/spec/system/editors/list_spec.rb index 60ce63d4e..ace5a89a8 100644 --- a/spec/system/editors/list_spec.rb +++ b/spec/system/editors/list_spec.rb @@ -34,7 +34,7 @@ scenario "show the list of editors" do expect(page).to have_content('Computing, Test systems') - expect(page).to have_content('🟩*') + expect(page).to have_content('2*') end scenario "editors info is editable" do From efd47cbd13aa1e8ca0a940d90f7c6bb5e86fbb19 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 7 Apr 2021 22:55:08 +0100 Subject: [PATCH 150/609] Tweak for editor profile view --- app/views/editors/profile.html.erb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/app/views/editors/profile.html.erb b/app/views/editors/profile.html.erb index 78b383e80..98e279d82 100644 --- a/app/views/editors/profile.html.erb +++ b/app/views/editors/profile.html.erb @@ -6,6 +6,9 @@ <%= render partial: "home/profiles_menu" %>
    + + <%= link_to "View papers you have edited →".html_safe, papers_by_editor_url(@editor.login)%> + <%= form_for(@editor, url: update_editor_profile_path) do |f| %>
    <% if @editor.errors.any? %> @@ -77,11 +80,6 @@
    <% end %>
    - -
    -

    This is the url for the list of all the papers you have edited:

    - <%= link_to papers_by_editor_url(@editor.login), papers_by_editor_url(@editor.login)%> -
    From e7b321483f289d8eb7dc060167dfde7663d3321b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 8 Apr 2021 11:57:26 +0200 Subject: [PATCH 151/609] preload pending invitations in editors list --- app/controllers/editors_controller.rb | 2 ++ app/helpers/editors_helper.rb | 14 +++++++------- app/views/editors/index.html.erb | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app/controllers/editors_controller.rb b/app/controllers/editors_controller.rb index 830644148..a0c274110 100644 --- a/app/controllers/editors_controller.rb +++ b/app/controllers/editors_controller.rb @@ -8,6 +8,8 @@ def index @editors = Editor.all @assignment_by_editor = Paper.unscoped.in_progress.group(:editor_id).count @paused_by_editor = Paper.unscoped.in_progress.where("labels->>'paused' ILIKE '%'").group(:editor_id).count + @pending_invitations_by_editor = Invitation.pending.group(:editor_id).count + @pending_invitations = Invitation.includes(:paper).pending end def show diff --git a/app/helpers/editors_helper.rb b/app/helpers/editors_helper.rb index fe683c7e3..ae7d7b132 100644 --- a/app/helpers/editors_helper.rb +++ b/app/helpers/editors_helper.rb @@ -17,7 +17,7 @@ def display_availability(editor) comment = "#{editor.max_assignments} max." display_count = editor.max_assignments - + if editor.availability_comment.present? display_count = "#{display_count}*" comment += " : #{editor.availability_comment}" @@ -55,7 +55,7 @@ def availability_class(editor) "" end end - + def in_progress_no_paused_for_editor(editor) paused_count = @paused_by_editor[editor.id].to_i total_paper_count = @assignment_by_editor[editor.id].to_i @@ -64,13 +64,13 @@ def in_progress_no_paused_for_editor(editor) end def open_invites_for_editor(editor) - invites = editor.invitations.pending - - return "–" if invites.empty? + return "–" if @pending_invitations_by_editor[editor.id].to_i == 0 output = [] - invites.each do |invite| - output << link_to(invite.paper.meta_review_issue_id, invite.paper.meta_review_url) + @pending_invitations.each do |invite| + if invite.editor == editor + output << link_to(invite.paper.meta_review_issue_id, invite.paper.meta_review_url) + end end return output.join(" • ").html_safe diff --git a/app/views/editors/index.html.erb b/app/views/editors/index.html.erb index 317e86bd7..a322a1cfc 100644 --- a/app/views/editors/index.html.erb +++ b/app/views/editors/index.html.erb @@ -36,7 +36,7 @@
    - + <%- end %> From f973f74bd39d69b99e62673c020a3b4b1dafb5fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 8 Apr 2021 12:19:26 +0200 Subject: [PATCH 152/609] preload pending invitations in papers lists --- app/controllers/home_controller.rb | 9 +++++++++ app/helpers/papers_helper.rb | 12 +++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index b4f217ca8..a38e83658 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -46,6 +46,8 @@ def incoming ) end + load_pending_invitations_for_papers(@papers) + @editor = current_user.editor render template: "home/reviews" @@ -97,6 +99,8 @@ def in_progress per_page: 20 ) + load_pending_invitations_for_papers(@papers) + render template: "home/reviews" end @@ -119,6 +123,7 @@ def all per_page: 20 ) + load_pending_invitations_for_papers(@papers) render template: "home/reviews" end @@ -149,4 +154,8 @@ def check_github_username def user_params params.require(:user).permit(:email, :github_username) end + + def load_pending_invitations_for_papers(papers) + @pending_invitations = Invitation.includes(:editor).pending.where(paper: papers) + end end diff --git a/app/helpers/papers_helper.rb b/app/helpers/papers_helper.rb index 49668d2bf..48d32edf3 100644 --- a/app/helpers/papers_helper.rb +++ b/app/helpers/papers_helper.rb @@ -145,15 +145,13 @@ def paper_types end def open_invites_for_paper(paper) - invites = paper.invitations.pending - - return "–" if invites.empty? - output = [] - invites.each do |invite| - output << link_to(image_tag(avatar(invite.editor.login), size: "24x24", class: "avatar", title: "#{invite.editor.full_name} invited #{time_ago_in_words(invite.created_at)} ago"), invite.paper.meta_review_url) + @pending_invitations.each do |invite| + if invite.paper_id == paper.id + output << link_to(image_tag(avatar(invite.editor.login), size: "24x24", class: "avatar", title: "#{invite.editor.full_name} invited #{time_ago_in_words(invite.created_at)} ago"), paper.meta_review_url) + end end - return output.join(" • ").html_safe + return output.empty? ? "–" : output.join(" • ").html_safe end end From ff2957177b6986c15c45526da6703a5c75fdd7e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 8 Apr 2021 12:23:12 +0200 Subject: [PATCH 153/609] use id --- app/helpers/editors_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/editors_helper.rb b/app/helpers/editors_helper.rb index ae7d7b132..e328315e8 100644 --- a/app/helpers/editors_helper.rb +++ b/app/helpers/editors_helper.rb @@ -68,7 +68,7 @@ def open_invites_for_editor(editor) output = [] @pending_invitations.each do |invite| - if invite.editor == editor + if invite.editor_id == editor.id output << link_to(invite.paper.meta_review_issue_id, invite.paper.meta_review_url) end end From 28d07eef572f5efeba68bf672a244b317e4a2d32 Mon Sep 17 00:00:00 2001 From: Jost Migenda Date: Wed, 14 Apr 2021 21:23:00 +0200 Subject: [PATCH 154/609] proposed update to name change policy In line with COPE principles, see https://publicationethics.org/news/vision-more-trans-inclusive-publishing-world --- docs/submitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index 163d1c0fd..9306bfc3c 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -345,6 +345,6 @@ If you want to learn more details about the review process, take a look at the [ Please write admin@theoj.org with confidential matters such as retraction requests, report of misconduct, and retroactive author name changes. -In case of a legal name change, the DOI will be unchanged and the paper will be updated to use the new name and note that a name has been changed, but without identifying the author. +In case of a name change, the DOI will be unchanged and the paper will be updated without publishing a correction notice or notifying co-authors. JOSS will also update CrossRef metadata. From 5732537deda56d6fd8f211119f9af58749b50bf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 16 Apr 2021 10:55:13 +0200 Subject: [PATCH 155/609] add jbuilder --- Gemfile | 1 + Gemfile.lock | 3 +++ 2 files changed, 4 insertions(+) diff --git a/Gemfile b/Gemfile index 98a6cac22..0847324b6 100644 --- a/Gemfile +++ b/Gemfile @@ -28,6 +28,7 @@ gem 'sass-rails', '~> 6.0.0' gem 'searchkick' gem 'uglifier', '4.2.0' gem 'coffee-rails', '~> 5.0.0' +gem 'jbuilder', '~> 2.7' gem 'active_link_to' diff --git a/Gemfile.lock b/Gemfile.lock index 2bc76f199..3a4e138d7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -204,6 +204,8 @@ GEM httpclient (2.8.3) i18n (1.8.9) concurrent-ruby (~> 1.0) + jbuilder (2.11.2) + activesupport (>= 5.0.0) jquery-rails (4.4.0) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) @@ -448,6 +450,7 @@ DEPENDENCIES guard-livereload honeybadger (~> 4.7.2) html-pipeline (~> 2.14.0) + jbuilder (~> 2.7) jquery-rails (~> 4.4.0) newrelic_rpm octicons_helper (~> 11.3) From fa8bf7ae6553a11ba229a07ca07bd428caed2c0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 16 Apr 2021 13:34:32 +0200 Subject: [PATCH 156/609] add json format to paper --- app/controllers/papers_controller.rb | 1 + app/views/papers/show.json.jbuilder | 14 ++++++++++ spec/controllers/papers_controller_spec.rb | 30 ++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 app/views/papers/show.json.jbuilder diff --git a/app/controllers/papers_controller.rb b/app/controllers/papers_controller.rb index 8f01e0daf..140329b53 100644 --- a/app/controllers/papers_controller.rb +++ b/app/controllers/papers_controller.rb @@ -250,6 +250,7 @@ def show :type => data.content_type, :disposition => 'inline' } + format.json end end diff --git a/app/views/papers/show.json.jbuilder b/app/views/papers/show.json.jbuilder new file mode 100644 index 000000000..7ec14e3c6 --- /dev/null +++ b/app/views/papers/show.json.jbuilder @@ -0,0 +1,14 @@ +if @paper.metadata['paper'].present? + json.metadata @paper.metadata['paper'] +end +json.state @paper.state +json.submitted_at @paper.created_at +if @paper.published? + json.doi @paper.doi + json.archive_doi @paper.clean_archive_doi + json.published_at @paper.accepted_at + json.software_repository @paper.repository_url + json.paper_review @paper.review_url + json.pdf_url @paper.pdf_url + json.software_archive @paper.clean_archive_doi +end diff --git a/spec/controllers/papers_controller_spec.rb b/spec/controllers/papers_controller_spec.rb index 1c855c494..02fb10309 100644 --- a/spec/controllers/papers_controller_spec.rb +++ b/spec/controllers/papers_controller_spec.rb @@ -254,6 +254,36 @@ end end + describe "GET Paper JSON" do + it "returns valid json" do + paper = create(:retracted_paper) + get :show, params: {doi: paper.doi}, format: "json" + expect(response).to be_successful + expect(response).to render_template("papers/show") + expect(response.media_type).to eq("application/json") + expect { JSON.parse(response.body) }.not_to raise_error + end + + it "returns paper's metadata" do + paper = create(:retracted_paper, state: "superceded") + get :show, params: {doi: paper.doi}, format: "json" + parsed_response = JSON.parse(response.body) + expect(parsed_response["state"]).to eq("superceded") + expect(parsed_response["metadata"]["editor"]).to eq("@arfon") + expect(parsed_response["doi"]).to be_nil + end + + it "returns publication info for accepted papers" do + paper = create(:accepted_paper) + get :show, params: {doi: paper.doi}, format: "json" + parsed_response = JSON.parse(response.body) + expect(parsed_response["state"]).to eq("accepted") + expect(parsed_response["metadata"]["editor"]).to eq("@arfon") + expect(parsed_response["doi"]).to eq("10.21105/joss.00000") + expect(parsed_response["published_at"]).to_not be_nil + end + end + describe "GET Atom feeds" do it "returns an Atom feed for #index" do get :index, format: "atom" From bb1946c59746cdfc83bc7b2a474dc76d0d83902e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 20 Apr 2021 09:41:57 +0200 Subject: [PATCH 157/609] remove duplicated archive_doi --- app/views/papers/show.json.jbuilder | 1 - 1 file changed, 1 deletion(-) diff --git a/app/views/papers/show.json.jbuilder b/app/views/papers/show.json.jbuilder index 7ec14e3c6..a781bbefd 100644 --- a/app/views/papers/show.json.jbuilder +++ b/app/views/papers/show.json.jbuilder @@ -5,7 +5,6 @@ json.state @paper.state json.submitted_at @paper.created_at if @paper.published? json.doi @paper.doi - json.archive_doi @paper.clean_archive_doi json.published_at @paper.accepted_at json.software_repository @paper.repository_url json.paper_review @paper.review_url From 9b2d269fc6705bd892b620e9930de7877ccbb370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 20 Apr 2021 10:06:00 +0200 Subject: [PATCH 158/609] refactor json response: move metadata fields, add volume/issue/year/page --- app/views/papers/show.json.jbuilder | 13 ++++++++++--- spec/controllers/papers_controller_spec.rb | 6 ++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/app/views/papers/show.json.jbuilder b/app/views/papers/show.json.jbuilder index a781bbefd..b649e2c2f 100644 --- a/app/views/papers/show.json.jbuilder +++ b/app/views/papers/show.json.jbuilder @@ -1,11 +1,18 @@ -if @paper.metadata['paper'].present? - json.metadata @paper.metadata['paper'] -end +json.title @paper.title json.state @paper.state json.submitted_at @paper.created_at if @paper.published? json.doi @paper.doi json.published_at @paper.accepted_at + json.volume @paper.volume + json.issue @paper.issue + json.year @paper.year + json.page @paper.page + json.authors @paper.metadata_authors + json.editor @paper.metadata_editor + json.reviewers @paper.metadata_reviewers + json.languages @paper.language_tags + json.tags @paper.author_tags json.software_repository @paper.repository_url json.paper_review @paper.review_url json.pdf_url @paper.pdf_url diff --git a/spec/controllers/papers_controller_spec.rb b/spec/controllers/papers_controller_spec.rb index 02fb10309..43673d01c 100644 --- a/spec/controllers/papers_controller_spec.rb +++ b/spec/controllers/papers_controller_spec.rb @@ -268,17 +268,19 @@ paper = create(:retracted_paper, state: "superceded") get :show, params: {doi: paper.doi}, format: "json" parsed_response = JSON.parse(response.body) + expect(parsed_response["title"]).to eq(paper.title) expect(parsed_response["state"]).to eq("superceded") - expect(parsed_response["metadata"]["editor"]).to eq("@arfon") expect(parsed_response["doi"]).to be_nil + expect(parsed_response["published_at"]).to be_nil end it "returns publication info for accepted papers" do paper = create(:accepted_paper) get :show, params: {doi: paper.doi}, format: "json" parsed_response = JSON.parse(response.body) + expect(parsed_response["title"]).to eq(paper.title) expect(parsed_response["state"]).to eq("accepted") - expect(parsed_response["metadata"]["editor"]).to eq("@arfon") + expect(parsed_response["editor"]).to eq("@arfon") expect(parsed_response["doi"]).to eq("10.21105/joss.00000") expect(parsed_response["published_at"]).to_not be_nil end From dee7badd7b400e9cd7e704f7e2ae1449a79767ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 20 Apr 2021 10:09:27 +0200 Subject: [PATCH 159/609] show tags as comma separated list --- app/views/papers/show.json.jbuilder | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/papers/show.json.jbuilder b/app/views/papers/show.json.jbuilder index b649e2c2f..b8c4d2eff 100644 --- a/app/views/papers/show.json.jbuilder +++ b/app/views/papers/show.json.jbuilder @@ -11,8 +11,8 @@ if @paper.published? json.authors @paper.metadata_authors json.editor @paper.metadata_editor json.reviewers @paper.metadata_reviewers - json.languages @paper.language_tags - json.tags @paper.author_tags + json.languages @paper.language_tags.join(', ') + json.tags @paper.author_tags.join(', ') json.software_repository @paper.repository_url json.paper_review @paper.review_url json.pdf_url @paper.pdf_url From 4f19af27fc2da9386f1c9fd61d20117f32dcc400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 20 Apr 2021 15:00:52 +0200 Subject: [PATCH 160/609] Update app/views/papers/show.json.jbuilder Co-authored-by: Arfon Smith --- app/views/papers/show.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/papers/show.json.jbuilder b/app/views/papers/show.json.jbuilder index b8c4d2eff..29dfef295 100644 --- a/app/views/papers/show.json.jbuilder +++ b/app/views/papers/show.json.jbuilder @@ -15,6 +15,6 @@ if @paper.published? json.tags @paper.author_tags.join(', ') json.software_repository @paper.repository_url json.paper_review @paper.review_url - json.pdf_url @paper.pdf_url + json.pdf_url @paper.seo_pdf_url json.software_archive @paper.clean_archive_doi end From 7910c5942878d6110383bc20115d4d22b786ad58 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 21 Apr 2021 22:30:27 +0100 Subject: [PATCH 161/609] Extending editor metadata in JSON response --- app/views/papers/show.json.jbuilder | 4 ++++ spec/controllers/papers_controller_spec.rb | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/views/papers/show.json.jbuilder b/app/views/papers/show.json.jbuilder index 29dfef295..6a0b435eb 100644 --- a/app/views/papers/show.json.jbuilder +++ b/app/views/papers/show.json.jbuilder @@ -10,6 +10,10 @@ if @paper.published? json.page @paper.page json.authors @paper.metadata_authors json.editor @paper.metadata_editor + if @paper.editor + json.editor_name @paper.editor.full_name + json.editor_url @paper.editor.url if @paper.editor.url + end json.reviewers @paper.metadata_reviewers json.languages @paper.language_tags.join(', ') json.tags @paper.author_tags.join(', ') diff --git a/spec/controllers/papers_controller_spec.rb b/spec/controllers/papers_controller_spec.rb index 43673d01c..89cb67ed7 100644 --- a/spec/controllers/papers_controller_spec.rb +++ b/spec/controllers/papers_controller_spec.rb @@ -275,12 +275,14 @@ end it "returns publication info for accepted papers" do - paper = create(:accepted_paper) + editor = create(:editor) + paper = create(:accepted_paper, editor: editor) get :show, params: {doi: paper.doi}, format: "json" parsed_response = JSON.parse(response.body) expect(parsed_response["title"]).to eq(paper.title) expect(parsed_response["state"]).to eq("accepted") expect(parsed_response["editor"]).to eq("@arfon") + expect(parsed_response["editor_name"]).to eq("Person McEditor") expect(parsed_response["doi"]).to eq("10.21105/joss.00000") expect(parsed_response["published_at"]).to_not be_nil end From 0d2abf432c4c1ce14d8b6417124e9092d5338486 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Thu, 22 Apr 2021 09:32:00 +0100 Subject: [PATCH 162/609] Adding ORCID to editor information --- app/models/editor.rb | 4 ++++ app/views/papers/show.json.jbuilder | 1 + spec/controllers/papers_controller_spec.rb | 4 +++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/models/editor.rb b/app/models/editor.rb index 974f0edeb..93419cbe5 100644 --- a/app/models/editor.rb +++ b/app/models/editor.rb @@ -51,6 +51,10 @@ def full_name [first_name, last_name].join(" ") end + def orcid + user.uid + end + def clear_title self.title = nil end diff --git a/app/views/papers/show.json.jbuilder b/app/views/papers/show.json.jbuilder index 6a0b435eb..4d142894f 100644 --- a/app/views/papers/show.json.jbuilder +++ b/app/views/papers/show.json.jbuilder @@ -13,6 +13,7 @@ if @paper.published? if @paper.editor json.editor_name @paper.editor.full_name json.editor_url @paper.editor.url if @paper.editor.url + json.editor_orcid @paper.editor.orcid end json.reviewers @paper.metadata_reviewers json.languages @paper.language_tags.join(', ') diff --git a/spec/controllers/papers_controller_spec.rb b/spec/controllers/papers_controller_spec.rb index 89cb67ed7..66a977c1e 100644 --- a/spec/controllers/papers_controller_spec.rb +++ b/spec/controllers/papers_controller_spec.rb @@ -275,7 +275,8 @@ end it "returns publication info for accepted papers" do - editor = create(:editor) + user = create(:user) + editor = create(:editor, user: user) paper = create(:accepted_paper, editor: editor) get :show, params: {doi: paper.doi}, format: "json" parsed_response = JSON.parse(response.body) @@ -283,6 +284,7 @@ expect(parsed_response["state"]).to eq("accepted") expect(parsed_response["editor"]).to eq("@arfon") expect(parsed_response["editor_name"]).to eq("Person McEditor") + expect(parsed_response["editor_orcid"]).to eq("0000-0000-0000-1234") expect(parsed_response["doi"]).to eq("10.21105/joss.00000") expect(parsed_response["published_at"]).to_not be_nil end From 8013ad0b86958d2f4a2688831e1728a9954b88db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 23 Apr 2021 13:13:12 +0200 Subject: [PATCH 163/609] add GitHub action for testing --- .github/workflows/tests.yml | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 000000000..5de2163e5 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,42 @@ +name: Tests +on: [push, pull_request] +jobs: + test: + runs-on: ubuntu-latest + services: + postgres: + image: postgres:13 + ports: ['5432:5432'] + env: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: secret + steps: + - name: Configure sysctl limits for elasticsearch + run: | + sudo swapoff -a + sudo sysctl -w vm.swappiness=1 + sudo sysctl -w fs.file-max=262144 + sudo sysctl -w vm.max_map_count=262144 + - name: Runs Elasticsearch + uses: elastic/elastic-github-actions/elasticsearch@master + with: + stack-version: 7.6.0 + - uses: actions/checkout@v2 + - name: Install Node + uses: actions/setup-node@v2 + with: + node-version: '16' + - name: Install Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.0.0 + bundler-cache: true + - name: Run tests + env: + PGUSER: postgres + PGPASSWORD: secret + RAILS_ENV: test + run: | + bundle exec rails db:create + bundle exec rails db:schema:load + bundle exec rails spec From 294f1173f15f01fcc179f36f3db5349e1a1234f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 23 Apr 2021 13:19:07 +0200 Subject: [PATCH 164/609] add GH_SECRET --- .github/workflows/tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5de2163e5..ed52dd98f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -36,6 +36,7 @@ jobs: PGUSER: postgres PGPASSWORD: secret RAILS_ENV: test + GH_SECRET: 12345 run: | bundle exec rails db:create bundle exec rails db:schema:load From 5db5404f8aeba2bb79da3907686df6c8157cc511 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 23 Apr 2021 13:30:52 +0200 Subject: [PATCH 165/609] bye Travis --- .travis.yml | 15 --------------- README.md | 2 +- 2 files changed, 1 insertion(+), 16 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8009e2c0a..000000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: ruby -rvm: - - "3.0.0" -before_script: - - psql -c 'create database joss_test' -U postgres - - bundle install - - bundle exec rails db:schema:load -before_install: - - gem update bundler - - nvm install node -script: bundle exec rails spec -addons: - postgresql: "9.6" -services: - - elasticsearch diff --git a/README.md b/README.md index 6dc530350..bea0017ca 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # The Journal of Open Source Software -[![Build Status](https://travis-ci.org/openjournals/joss.svg?branch=master)](https://travis-ci.org/openjournals/joss) +[![Build Status](https://github.com/openjournals/joss/actions/workflows/tests.yml/badge.svg)](https://github.com/openjournals/joss/actions/workflows/tests.yml) [![Powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A)](http://numfocus.org) [![Donate to JOSS](https://img.shields.io/badge/Donate-to%20JOSS-brightgreen.svg)](https://numfocus.org/donate-to-joss) From d3cc4d56d56903544b8cbdb005f01500799a6eb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 23 Apr 2021 15:55:09 +0200 Subject: [PATCH 166/609] update elasticsearch --- .github/workflows/tests.yml | 2 +- Gemfile.lock | 22 +++++++++++++--------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ed52dd98f..a60c85668 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,7 +20,7 @@ jobs: - name: Runs Elasticsearch uses: elastic/elastic-github-actions/elasticsearch@master with: - stack-version: 7.6.0 + stack-version: 7.12.0 - uses: actions/checkout@v2 - name: Install Node uses: actions/setup-node@v2 diff --git a/Gemfile.lock b/Gemfile.lock index 3a4e138d7..2eebaa9d0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -115,12 +115,12 @@ GEM declarative-option (0.1.0) diff-lcs (1.4.4) dotenv (2.7.6) - elasticsearch (7.10.1) - elasticsearch-api (= 7.10.1) - elasticsearch-transport (= 7.10.1) - elasticsearch-api (7.10.1) + elasticsearch (7.12.0) + elasticsearch-api (= 7.12.0) + elasticsearch-transport (= 7.12.0) + elasticsearch-api (7.12.0) multi_json - elasticsearch-transport (7.10.1) + elasticsearch-transport (7.12.0) faraday (~> 1) multi_json em-websocket (0.5.2) @@ -134,11 +134,15 @@ GEM factory_bot_rails (6.1.0) factory_bot (~> 6.1.0) railties (>= 5.0.0) - faraday (1.3.0) + faraday (1.4.1) + faraday-excon (~> 1.1) faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.1) multipart-post (>= 1.2, < 3) - ruby2_keywords + ruby2_keywords (>= 0.0.4) + faraday-excon (1.1.0) faraday-net_http (1.0.1) + faraday-net_http_persistent (1.1.0) ffi (1.14.2) formatador (0.2.5) gems (1.2.0) @@ -202,7 +206,7 @@ GEM nokogiri (>= 1.4) http_parser.rb (0.6.0) httpclient (2.8.3) - i18n (1.8.9) + i18n (1.8.10) concurrent-ruby (~> 1.0) jbuilder (2.11.2) activesupport (>= 5.0.0) @@ -378,7 +382,7 @@ GEM sawyer (0.8.2) addressable (>= 2.3.5) faraday (> 0.8, < 2.0) - searchkick (4.4.2) + searchkick (4.4.4) activemodel (>= 5) elasticsearch (>= 6) hashie From 1e4e9d4e0b3b63a37b11169c951950cce2bf432c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 23 Apr 2021 16:08:13 +0200 Subject: [PATCH 167/609] configure elasticsearch verify elasticsearch connection change elasticsearch image check elasticsearch create elasticsearch index --- .github/workflows/tests.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a60c85668..31da408d4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,16 +11,6 @@ jobs: POSTGRES_USER: postgres POSTGRES_PASSWORD: secret steps: - - name: Configure sysctl limits for elasticsearch - run: | - sudo swapoff -a - sudo sysctl -w vm.swappiness=1 - sudo sysctl -w fs.file-max=262144 - sudo sysctl -w vm.max_map_count=262144 - - name: Runs Elasticsearch - uses: elastic/elastic-github-actions/elasticsearch@master - with: - stack-version: 7.12.0 - uses: actions/checkout@v2 - name: Install Node uses: actions/setup-node@v2 @@ -31,8 +21,20 @@ jobs: with: ruby-version: 3.0.0 bundler-cache: true + - name: Install Elasticsearch + uses: ankane/setup-elasticsearch@v1 + with: + elasticsearch-version: 7.12.0 + - name: Verify Elasticsearch connection and create index + env: + ELASTICSEARCH_URL: http://localhost:9200 + run: | + echo $ELASTICSEARCH_URL + curl -fsSL "$ELASTICSEARCH_URL/_cat/health?h=status" + curl -X PUT $ELASTICSEARCH_URL/joss-production - name: Run tests env: + ELASTICSEARCH_URL: http://localhost:9200 PGUSER: postgres PGPASSWORD: secret RAILS_ENV: test From 03de9d89ad978da3864c4a4ea9c3e5b15cd41c13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Sat, 1 May 2021 11:58:25 +0200 Subject: [PATCH 168/609] bundle update --- Gemfile.lock | 95 +++++++++++++++++++++++++--------------------------- 1 file changed, 46 insertions(+), 49 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 3a4e138d7..1e6580919 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -79,7 +79,7 @@ GEM autoprefixer-rails (10.2.4.0) execjs bindex (0.8.1) - bootsnap (1.7.0) + bootsnap (1.7.4) msgpack (~> 1.0) bootstrap (4.3.1) autoprefixer-rails (>= 9.1.0) @@ -95,7 +95,7 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - chartkick (3.4.2) + chartkick (4.0.3) childprocess (3.0.0) coderay (1.1.3) coffee-rails (5.0.0) @@ -105,22 +105,21 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - commonmarker (0.21.1) + commonmarker (0.21.2) ruby-enum (~> 0.5) concurrent-ruby (1.1.8) crack (0.4.5) rexml crass (1.0.6) declarative (0.0.20) - declarative-option (0.1.0) diff-lcs (1.4.4) dotenv (2.7.6) - elasticsearch (7.10.1) - elasticsearch-api (= 7.10.1) - elasticsearch-transport (= 7.10.1) - elasticsearch-api (7.10.1) + elasticsearch (7.12.0) + elasticsearch-api (= 7.12.0) + elasticsearch-transport (= 7.12.0) + elasticsearch-api (7.12.0) multi_json - elasticsearch-transport (7.10.1) + elasticsearch-transport (7.12.0) faraday (~> 1) multi_json em-websocket (0.5.2) @@ -134,20 +133,20 @@ GEM factory_bot_rails (6.1.0) factory_bot (~> 6.1.0) railties (>= 5.0.0) - faraday (1.3.0) + faraday (1.4.1) + faraday-excon (~> 1.1) faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.1) multipart-post (>= 1.2, < 3) - ruby2_keywords + ruby2_keywords (>= 0.0.4) + faraday-excon (1.1.0) faraday-net_http (1.0.1) - ffi (1.14.2) + faraday-net_http_persistent (1.1.0) + ffi (1.15.0) formatador (0.2.5) - gems (1.2.0) globalid (0.4.2) activesupport (>= 4.2.0) - google-api-client (0.53.0) - google-apis-core (~> 0.1) - google-apis-generator (~> 0.1) - google-apis-core (0.2.1) + google-apis-core (0.3.0) addressable (~> 2.5, >= 2.5.1) googleauth (~> 0.14) httpclient (>= 2.8.1, < 3.0) @@ -157,26 +156,23 @@ GEM rexml signet (~> 0.14) webrick - google-apis-discovery_v1 (0.1.0) + google-apis-drive_v3 (0.5.0) google-apis-core (~> 0.1) - google-apis-generator (0.1.2) - activesupport (>= 5.0) - gems (~> 1.2) + google-apis-sheets_v4 (0.4.0) google-apis-core (~> 0.1) - google-apis-discovery_v1 (~> 0.0) - thor (>= 0.20, < 2.a) - google_drive (3.0.6) - google-api-client (>= 0.11.0, < 1.0.0) + google_drive (3.0.7) + google-apis-drive_v3 (>= 0.5.0, < 1.0.0) + google-apis-sheets_v4 (>= 0.4.0, < 1.0.0) googleauth (>= 0.5.0, < 1.0.0) nokogiri (>= 1.5.3, < 2.0.0) - googleauth (0.15.0) + googleauth (0.16.2) faraday (>= 0.17.3, < 2.0) jwt (>= 1.4, < 3.0) memoist (~> 0.16) multi_json (~> 1.11) os (>= 0.9, < 2.0) signet (~> 0.14) - groupdate (5.2.1) + groupdate (5.2.2) activesupport (>= 5) guard (2.16.2) formatador (>= 0.2.4) @@ -196,13 +192,13 @@ GEM hashdiff (1.0.1) hashery (2.1.2) hashie (4.1.0) - honeybadger (4.7.2) + honeybadger (4.7.3) html-pipeline (2.14.0) activesupport (>= 2) nokogiri (>= 1.4) http_parser.rb (0.6.0) httpclient (2.8.3) - i18n (1.8.9) + i18n (1.8.10) concurrent-ruby (~> 1.0) jbuilder (2.11.2) activesupport (>= 5.0.0) @@ -210,39 +206,39 @@ GEM rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - jwt (2.2.2) + jwt (2.2.3) kgio (2.11.3) - listen (3.4.1) + listen (3.5.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.9.0) + loofah (2.9.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) lumberjack (1.2.8) mail (2.7.1) mini_mime (>= 0.1.1) - marcel (1.0.0) + marcel (1.0.1) memoist (0.16.2) method_source (1.0.0) mini_mime (1.0.3) - mini_portile2 (2.5.0) + mini_portile2 (2.5.1) minitest (5.14.4) msgpack (1.4.2) multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.1.1) nenv (0.3.0) - newrelic_rpm (6.15.0) + newrelic_rpm (7.0.0) nio4r (2.5.7) - nokogiri (1.11.2) + nokogiri (1.11.3) mini_portile2 (~> 2.5.0) racc (~> 1.4) - nokogumbo (2.0.4) + nokogumbo (2.0.5) nokogiri (~> 1.8, >= 1.8.4) notiffany (0.1.3) nenv (~> 0.1) shellany (~> 0.0) - oauth2 (1.4.4) + oauth2 (1.4.7) faraday (>= 0.8, < 2.0) jwt (>= 1.0, < 3.0) multi_json (~> 1.3) @@ -253,10 +249,10 @@ GEM octicons_helper (11.3.0) octicons (= 11.3.0) rails - octokit (4.20.0) + octokit (4.21.0) faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) - omniauth (2.0.2) + omniauth (2.0.4) hashie (>= 3.4.6) rack (>= 1.6.2, < 3) rack-protection @@ -328,16 +324,16 @@ GEM rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) - regexp_parser (2.0.3) - representable (3.0.4) + regexp_parser (2.1.1) + representable (3.1.1) declarative (< 0.1.0) - declarative-option (< 0.2.0) + trailblazer-option (>= 0.1.1, < 0.2.0) uber (< 0.2.0) responders (3.0.1) actionpack (>= 5.0) railties (>= 5.0) retriable (3.1.2) - rexml (3.2.4) + rexml (3.2.5) rspec-core (3.10.1) rspec-support (~> 3.10.0) rspec-expectations (3.10.1) @@ -346,7 +342,7 @@ GEM rspec-mocks (3.10.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) - rspec-rails (5.0.0) + rspec-rails (5.0.1) actionpack (>= 5.2) activesupport (>= 5.2) railties (>= 5.2) @@ -378,7 +374,7 @@ GEM sawyer (0.8.2) addressable (>= 2.3.5) faraday (> 0.8, < 2.0) - searchkick (4.4.2) + searchkick (4.4.4) activemodel (>= 5) elasticsearch (>= 6) hashie @@ -386,7 +382,7 @@ GEM childprocess (>= 0.5, < 4.0) rubyzip (>= 1.2.2) shellany (0.0.1) - signet (0.14.1) + signet (0.15.0) addressable (~> 2.3) faraday (>= 0.17.3, < 2.0) jwt (>= 1.5, < 3.0) @@ -403,6 +399,7 @@ GEM sprockets (>= 3.0.0) thor (1.1.0) tilt (2.0.10) + trailblazer-option (0.1.1) ttfunk (1.7.0) tzinfo (2.0.4) concurrent-ruby (~> 1.0) @@ -418,7 +415,7 @@ GEM activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webmock (3.12.1) + webmock (3.12.2) addressable (>= 2.3.6) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) @@ -482,4 +479,4 @@ RUBY VERSION ruby 3.0.0p0 BUNDLED WITH - 2.2.6 + 2.2.16 From e4c43be61068fefdc57d7876221ab9ca43fa96ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 5 May 2021 13:45:02 +0200 Subject: [PATCH 169/609] refactor invitations state to [accepted/pending/expired] --- app/helpers/invitations_helper.rb | 5 +-- app/models/invitation.rb | 38 ++++++++++++++++--- app/models/paper.rb | 2 +- ...20210505104138_add_state_to_invitations.rb | 24 ++++++++++++ db/schema.rb | 11 +++--- spec/factories/invitations.rb | 8 +++- spec/models/invitation_spec.rb | 30 +++++++++++---- spec/models/paper_spec.rb | 11 ++++++ spec/system/invitations_spec.rb | 11 +++--- 9 files changed, 110 insertions(+), 30 deletions(-) create mode 100644 db/migrate/20210505104138_add_state_to_invitations.rb diff --git a/app/helpers/invitations_helper.rb b/app/helpers/invitations_helper.rb index ee1fc66c2..c0d602675 100644 --- a/app/helpers/invitations_helper.rb +++ b/app/helpers/invitations_helper.rb @@ -4,9 +4,8 @@ def invitation_status(invitation) if invitation.accepted? status = "✅ Accepted" - elsif invitation.paper.review_issue_id.present? && - invitation.paper.editor_id != invitation.editor_id - status = "❌ Rejected" + elsif invitation.expired? + status = "❌ Expired" end status diff --git a/app/models/invitation.rb b/app/models/invitation.rb index 341ad7715..915169f15 100644 --- a/app/models/invitation.rb +++ b/app/models/invitation.rb @@ -2,15 +2,41 @@ class Invitation < ApplicationRecord belongs_to :editor belongs_to :paper - scope :accepted, -> { where(accepted: true) } - scope :pending, -> { where(accepted: false) } + validates :state, presence: true, inclusion: { in: ["pending", "accepted", "expired"] } + + scope :accepted, -> { where(state: "accepted") } + scope :pending, -> { where(state: "pending") } + scope :expired, -> { where(state: "expired") } + + def expired? + state == "expired" + end + + def pending? + state == "pending" + end + + def accepted? + state == "accepted" + end def accept! - self.update_attribute(:accepted, true) + self.update_attribute(:state, "accepted") end - def self.accept_if_pending(paper, editor) - invitation = pending.find_by(paper: paper, editor: editor) - invitation.accept! if invitation + def expire! + self.update_attribute(:state, "expired") + end + + def self.resolve_pending(paper, editor) + pending_invitations = pending.where(paper: paper) + + pending_invitations.each do |invitation| + if invitation.editor_id == editor.id + invitation.accept! + else + invitation.expire! + end + end end end diff --git a/app/models/paper.rb b/app/models/paper.rb index b6b23fae6..bf970428d 100644 --- a/app/models/paper.rb +++ b/app/models/paper.rb @@ -370,7 +370,7 @@ def set_reviewers(reviewers) # Updated the paper with the editor_id def set_editor(editor) self.update_attribute(:editor_id, editor.id) - Invitation.accept_if_pending(self, editor) + Invitation.resolve_pending(self, editor) end # Update the Paper review_issue_id field diff --git a/db/migrate/20210505104138_add_state_to_invitations.rb b/db/migrate/20210505104138_add_state_to_invitations.rb new file mode 100644 index 000000000..5c83f4c94 --- /dev/null +++ b/db/migrate/20210505104138_add_state_to_invitations.rb @@ -0,0 +1,24 @@ +class AddStateToInvitations < ActiveRecord::Migration[6.1] + def change + add_column :invitations, :state, :string, default: 'pending' + + migrate_state + + remove_column :invitations, :accepted + + add_index :invitations, :state + end + + def migrate_state + Invitation.includes(:paper).in_batches.each_record do |invitation| + if invitation.accepted == true + invitation.update_attribute(:state, 'accepted') + elsif invitation.paper.editor_id.present? && invitation.paper.editor_id != invitation.editor_id + invitation.update_attribute(:state, 'expired') + end + + # If migration is rollbacked: + invitation.update_attribute(:accepted, true) if invitation.state == 'accepted' + end + end +end diff --git a/db/schema.rb b/db/schema.rb index b738f80c5..dfe142af5 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2021_03_25_114224) do +ActiveRecord::Schema.define(version: 2021_05_05_104138) do # These are extensions that must be enabled in order to support this database enable_extension "hstore" @@ -38,15 +38,16 @@ create_table "invitations", force: :cascade do |t| t.bigint "editor_id" t.bigint "paper_id" - t.boolean "accepted", default: false t.datetime "created_at", precision: 6, null: false t.datetime "updated_at", precision: 6, null: false + t.string "state", default: "pending" t.index ["created_at"], name: "index_invitations_on_created_at" t.index ["editor_id"], name: "index_invitations_on_editor_id" t.index ["paper_id"], name: "index_invitations_on_paper_id" + t.index ["state"], name: "index_invitations_on_state" end - create_table "papers", id: :serial, force: :cascade do |t| + create_table "papers", force: :cascade do |t| t.string "title" t.string "state" t.string "repository_url" @@ -62,10 +63,10 @@ t.text "paper_body" t.integer "meta_review_issue_id" t.string "suggested_editor" + t.string "kind" t.text "authors" t.text "citation_string" t.datetime "accepted_at" - t.string "kind" t.integer "editor_id" t.string "reviewers", default: [], array: true t.text "activities" @@ -87,7 +88,7 @@ t.index ["user_id"], name: "index_papers_on_user_id" end - create_table "users", id: :serial, force: :cascade do |t| + create_table "users", force: :cascade do |t| t.string "provider" t.string "uid" t.string "name" diff --git a/spec/factories/invitations.rb b/spec/factories/invitations.rb index 4b78360fe..b260c2be1 100644 --- a/spec/factories/invitations.rb +++ b/spec/factories/invitations.rb @@ -4,11 +4,15 @@ editor { create(:editor) } trait :pending do - accepted { false } + state { 'pending' } end trait :accepted do - accepted { true } + state { 'accepted' } + end + + trait :expired do + state { 'expired' } end end end diff --git a/spec/models/invitation_spec.rb b/spec/models/invitation_spec.rb index a7a6aa9f2..5edfd06cf 100644 --- a/spec/models/invitation_spec.rb +++ b/spec/models/invitation_spec.rb @@ -12,24 +12,40 @@ expect(invitation).to be_accepted end - describe ".accept_if_pending" do - it "should accept the invitation if pending" do + it "can be expired" do + invitation = Invitation.create!(paper: create(:paper), editor: create(:editor)) + invitation.expire! + expect(invitation).to be_expired + end + + describe ".resolve_pending" do + it "should accept the pending invitation of the assigned editor" do pending_invitation = create(:invitation, :pending) - Invitation.accept_if_pending(pending_invitation.paper, pending_invitation.editor) + Invitation.resolve_pending(pending_invitation.paper, pending_invitation.editor) expect(pending_invitation.reload).to be_accepted end it "should do nothing if invitation already accepted" do invitation = create(:invitation, :accepted) - expect { Invitation.accept_if_pending(invitation.paper, invitation.editor) }.to_not change { Invitation.pending.count } - expect { Invitation.accept_if_pending(invitation.paper, invitation.editor) }.to_not change { Invitation.accepted.count } + expect { Invitation.resolve_pending(invitation.paper, invitation.editor) }.to_not change { Invitation.pending.count } + expect { Invitation.resolve_pending(invitation.paper, invitation.editor) }.to_not change { Invitation.accepted.count } + end + + it "should expire invitations to not assigned editors" do + invitation_1 = create(:invitation, :pending) + invitation_2 = create(:invitation, :pending, paper: invitation_1.paper) + assigned_editor = create(:editor) + + Invitation.resolve_pending(invitation_1.paper, assigned_editor) + expect(invitation_1.reload).to be_expired + expect(invitation_2.reload).to be_expired end it "should do nothing if no invitation exists" do create(:invitation, :accepted) create(:invitation, :pending) - expect { Invitation.accept_if_pending(create(:paper), create(:editor)) }.to_not change { Invitation.pending.count } - expect { Invitation.accept_if_pending(create(:paper), create(:editor)) }.to_not change { Invitation.accepted.count } + expect { Invitation.resolve_pending(create(:paper), create(:editor)) }.to_not change { Invitation.pending.count } + expect { Invitation.resolve_pending(create(:paper), create(:editor)) }.to_not change { Invitation.accepted.count } end end end diff --git a/spec/models/paper_spec.rb b/spec/models/paper_spec.rb index 23e06b58d..8c2a23fd4 100644 --- a/spec/models/paper_spec.rb +++ b/spec/models/paper_spec.rb @@ -108,6 +108,17 @@ paper.set_editor editor expect(invitation.reload).to be_accepted end + + it "should expire other editor's pending invitations" do + paper = create(:paper) + editor = create(:editor) + invitation_1 = create(:invitation, :pending, paper: paper) + invitation_2 = create(:invitation, :pending, paper: paper) + + paper.set_editor editor + expect(invitation_1.reload).to be_expired + expect(invitation_2.reload).to be_expired + end end describe "#invite_editor" do diff --git a/spec/system/invitations_spec.rb b/spec/system/invitations_spec.rb index 908c4cb27..40743734d 100644 --- a/spec/system/invitations_spec.rb +++ b/spec/system/invitations_spec.rb @@ -49,25 +49,24 @@ end scenario "show status for accepted invitations" do - create(:invitation, accepted: true) + create(:invitation, :accepted) visit invitations_path expect(page).to have_content("✅ Accepted") end scenario "show status for pending invitations" do - create(:invitation, accepted: false) + create(:invitation, :pending) visit invitations_path expect(page).to have_content("⏳ Pending") end - scenario "show status for rejected invitations" do - paper = create(:paper, review_issue_id: 42, editor: create(:editor, id: 33)) - create(:invitation, accepted: false, paper: paper, editor: create(:editor, id: 21)) + scenario "show status for expired invitations" do + create(:invitation, :expired) visit invitations_path - expect(page).to have_content("❌ Rejected") + expect(page).to have_content("❌ Expired") end end end From 63ea9ab25054681a2c9691299e88329a7498f7be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 6 May 2021 10:11:01 +0200 Subject: [PATCH 170/609] paginate invitations --- app/controllers/invitations_controller.rb | 4 +++- app/views/invitations/index.html.erb | 3 ++- spec/system/invitations_spec.rb | 10 ++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/app/controllers/invitations_controller.rb b/app/controllers/invitations_controller.rb index 10c933fcc..534cb768f 100644 --- a/app/controllers/invitations_controller.rb +++ b/app/controllers/invitations_controller.rb @@ -2,6 +2,8 @@ class InvitationsController < ApplicationController before_action :require_admin_user def index - @invitations = Invitation.includes(:editor, :paper).order(created_at: :desc).limit(25) + @invitations = Invitation.includes(:editor, :paper). + order(created_at: :desc). + paginate(page: params[:page], per_page: 25) end end diff --git a/app/views/invitations/index.html.erb b/app/views/invitations/index.html.erb index 03a1386d5..a7f6539d1 100644 --- a/app/views/invitations/index.html.erb +++ b/app/views/invitations/index.html.erb @@ -43,7 +43,8 @@
    NameLoginDescriptionEditor CategoriesEditingAvailabilityEditingCapacityInvites
    - <%= link_to editor.full_name, editor, title: strip_tags(editor.description) %> - <%= "(new)" if editor.created_at > 2.months.ago %> - > - <%= link_to image_tag(avatar(editor.login), size: "24x24", class: "avatar", title: github_user_link(editor.login)), github_user_link(editor.login), target: "_blank" %> - <%= editor.login %> + <%= link_to(image_tag(avatar(editor.login), size: "24x24", class: "avatar", title: editor.full_name), github_user_link(editor.login), target: "_blank") %> + <%= link_to editor.login, editor, title: editor.full_name %> <%= truncate(strip_tags(editor.description), length: 150) %> <%= editor.category_list %><%= link_to in_progress_for_editor(editor), "/dashboard/#{editor.login}" %><%= display_availability(editor) %><%= link_to '✏️', edit_editor_path(editor), title: 'Edit' %><%= link_to '🗑', editor, method: :delete, data: { confirm: 'Are you sure?' }, title: 'Delete' %><%= link_to in_progress_for_editor(editor), "/dashboard/#{editor.login}" %><%= editor.max_assignments %> <%= display_availability(editor) %><%= link_to rand(3), "#" %><%= link_to 'Edit', edit_editor_path(editor), title: 'Edit' %>
    <%= editor.category_list %> <%= editor.description.html_safe %><%= link_to '✏️', edit_editor_path(editor), title: 'Edit' %><%= link_to '🗑', editor, method: :delete, data: { confirm: 'Are you sure?' }, title: 'Delete' %><%= link_to 'Edit', edit_editor_path(editor), title: 'Edit' %>
    <%= editor.category_list %> <%= link_to in_progress_for_editor(editor), "/dashboard/#{editor.login}" %> <%= editor.max_assignments %> <%= display_availability(editor) %><%= link_to rand(3), "#" %><%= open_invites_for_editor(editor) %> <%= link_to 'Edit', edit_editor_path(editor), title: 'Edit' %>
    Status Paper title ScopeInvites Reviews Reviewers Last comment<%= paper.state.titleize %> <%= link_to paper.title, paper_url(paper), title: paper.title, class: "d-inline-block text-truncate", style: "max-width: 450px;" %>
    Submitted <%= time_ago_in_words(paper.created_at) %> ago <%= pretty_labels_for(paper) %>
    <%= vote_summary(paper).html_safe %><%= open_invites_for_paper(paper) %> <%= review_issue_links(paper) %> <%- paper.reviewers.each do |reviewer| %> diff --git a/db/schema.rb b/db/schema.rb index 5e942e2fe..b738f80c5 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -46,7 +46,7 @@ t.index ["paper_id"], name: "index_invitations_on_paper_id" end - create_table "papers", force: :cascade do |t| + create_table "papers", id: :serial, force: :cascade do |t| t.string "title" t.string "state" t.string "repository_url" @@ -62,10 +62,10 @@ t.text "paper_body" t.integer "meta_review_issue_id" t.string "suggested_editor" - t.string "kind" t.text "authors" t.text "citation_string" t.datetime "accepted_at" + t.string "kind" t.integer "editor_id" t.string "reviewers", default: [], array: true t.text "activities" @@ -87,7 +87,7 @@ t.index ["user_id"], name: "index_papers_on_user_id" end - create_table "users", force: :cascade do |t| + create_table "users", id: :serial, force: :cascade do |t| t.string "provider" t.string "uid" t.string "name" diff --git a/spec/controllers/eic_dashboard_controller_spec.rb b/spec/controllers/eic_dashboard_controller_spec.rb index 39b5e06a4..8a353d286 100644 --- a/spec/controllers/eic_dashboard_controller_spec.rb +++ b/spec/controllers/eic_dashboard_controller_spec.rb @@ -40,7 +40,7 @@ get :index - expect(response.body).to have_content "List of ready to publish submissions at Github" + expect(response.body).to have_content "List of ready to publish submissions at GitHub" expect(response.body).to have_link("#1", href: "/test1") expect(response.body).to have_link("#2", href: "/test2") expect(response.body).to have_content "Accepted paper 1" @@ -55,7 +55,7 @@ get :index expect(response.body).to have_content "There are no open submissions labeled as recommend-accept" - expect(response.body).to_not have_content "List of ready to publish submissions at Github" + expect(response.body).to_not have_content "List of ready to publish submissions at GitHub" end it "lists all issues flagged with query-scope" do @@ -64,7 +64,7 @@ get :index - expect(response.body).to have_content "List of submissions pending editorial review at Github" + expect(response.body).to have_content "List of submissions pending editorial review at GitHub" expect(response.body).to have_link("#3", href: "/test3") expect(response.body).to have_link("#4", href: "/test4") expect(response.body).to have_content "Flagged paper 1" diff --git a/spec/helpers/editors_helper_spec.rb b/spec/helpers/editors_helper_spec.rb index 573caa19a..a58443859 100644 --- a/spec/helpers/editors_helper_spec.rb +++ b/spec/helpers/editors_helper_spec.rb @@ -8,21 +8,21 @@ describe "display_availability" do it "displays icon with current availability" do @editor.max_assignments = 3 - expect(display_availability(@editor)).to include("🔴") + expect(display_availability(@editor)).to include("🟥") @editor.max_assignments = 4 - expect(display_availability(@editor)).to include("🟠") + expect(display_availability(@editor)).to include("🟨") @editor.max_assignments = 5 - expect(display_availability(@editor)).to include("🟢") + expect(display_availability(@editor)).to include("🟩") end it "displays availability comment if present" do - expect(display_availability(@editor)).to include("🟢") + expect(display_availability(@editor)).to include("🟩") expect(display_availability(@editor)).to_not include("*") @editor.availability_comment = "OOO until january" - expect(display_availability(@editor)).to include("🟢*") + expect(display_availability(@editor)).to include("🟩*") expect(display_availability(@editor)).to include("OOO until january") end end @@ -35,7 +35,7 @@ it "returns assigned + paused papers if present" do expect(in_progress_for_editor(@editor)).to include("3") - expect(in_progress_for_editor(@editor)).to include("(+ 1 paused)") + expect(in_progress_for_editor(@editor)).to include("(+ 1)") end end diff --git a/spec/system/editors/list_spec.rb b/spec/system/editors/list_spec.rb index 16f5d39d3..60ce63d4e 100644 --- a/spec/system/editors/list_spec.rb +++ b/spec/system/editors/list_spec.rb @@ -33,19 +33,17 @@ end scenario "show the list of editors" do - expect(page).to have_content('Tester') - expect(page).to have_content('Software testing editor') expect(page).to have_content('Computing, Test systems') - expect(page).to have_content('🟢*') + expect(page).to have_content('🟩*') end scenario "editors info is editable" do allow(Repository).to receive(:editors).and_return(["@tester", "@mctester"]) - click_link "✏️", href: edit_editor_path(Editor.find_by(login: 'tester')) - fill_in :editor_last_name, with: "Testing" + click_link "Edit", href: edit_editor_path(Editor.find_by(login: 'tester')) + fill_in :editor_category_list, with: "Fancy" click_on "Update Editor" visit editors_path - expect(page).to have_content('Tester Testing') + expect(page).to have_content('Fancy') end end end From c15c19b7b914721e42c73a6c9b9b4a7834717ef9 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 7 Apr 2021 18:15:04 +0100 Subject: [PATCH 148/609] Decluttering reviews for assigned papers --- app/views/home/reviews.html.erb | 6 +++++- app/views/invitations/index.html.erb | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/views/home/reviews.html.erb b/app/views/home/reviews.html.erb index 51e3e98be..5c07387f3 100644 --- a/app/views/home/reviews.html.erb +++ b/app/views/home/reviews.html.erb @@ -43,8 +43,10 @@
    Status Paper titleScope InvitesReviews Reviewers Last comment
    <%= paper.state.titleize %> <%= link_to paper.title, paper_url(paper), title: paper.title, class: "d-inline-block text-truncate", style: "max-width: 450px;" %>
    Submitted <%= time_ago_in_words(paper.created_at) %> ago <%= pretty_labels_for(paper) %>
    <%= vote_summary(paper).html_safe %><%= open_invites_for_paper(paper) %><%= open_invites_for_paper(paper) %><%= review_issue_links(paper) %> <%- paper.reviewers.each do |reviewer| %> diff --git a/app/views/invitations/index.html.erb b/app/views/invitations/index.html.erb index be35cd646..03a1386d5 100644 --- a/app/views/invitations/index.html.erb +++ b/app/views/invitations/index.html.erb @@ -10,7 +10,7 @@ -<%= render partial: "eic_dashboard/menu" %> +<%= render partial: "aeic_dashboard/menu" %>
    <% if @invitations.empty? %>
    There are no recent invitations to show
    From 4028b0530f08bdb5c0b92cac99522c7050dab758 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 7 Apr 2021 22:40:25 +0100 Subject: [PATCH 149/609] Tidying up editor list statuses --- app/assets/stylesheets/home.scss | 21 +++++++++++++++++++++ app/helpers/editors_helper.rb | 15 ++++++++++----- app/views/editors/index.html.erb | 4 ++-- spec/helpers/editors_helper_spec.rb | 10 +++++----- spec/system/editors/list_spec.rb | 2 +- 5 files changed, 39 insertions(+), 13 deletions(-) diff --git a/app/assets/stylesheets/home.scss b/app/assets/stylesheets/home.scss index ec1212f99..459681637 100644 --- a/app/assets/stylesheets/home.scss +++ b/app/assets/stylesheets/home.scss @@ -96,6 +96,27 @@ table.dashboard-table{ border-radius: 2em; } + .availability-status-red { + background-color: #dc3545; + color: white; + padding: 0.2em 0.5em; + border-radius: 2px; + } + + .availability-status-yellow { + background-color: #ffc107; + color: black; + padding: 0.2em 0.5em; + border-radius: 2px; + } + + .availability-status-green { + background-color: #28a745; + color: white; + padding: 0.2em 0.5em; + border-radius: 2px; + } + .activity-avatar { padding-right: 0.2em; float: left; diff --git a/app/helpers/editors_helper.rb b/app/helpers/editors_helper.rb index f29873391..fe683c7e3 100644 --- a/app/helpers/editors_helper.rb +++ b/app/helpers/editors_helper.rb @@ -5,20 +5,25 @@ def display_availability(editor) active_assignments = @assignment_by_editor[editor.id].to_i - @paused_by_editor[editor.id].to_i availability = editor.max_assignments - active_assignments icon = if availability <= 0 - "🟥" + "red" elsif availability == 1 - "🟨" + "yellow" else - "🟩" + "green" end + availability_class = "availability-status-#{icon}" + comment = "#{editor.max_assignments} max." + + display_count = editor.max_assignments + if editor.availability_comment.present? - icon += "*" + display_count = "#{display_count}*" comment += " : #{editor.availability_comment}" end - "#{icon}".html_safe + "#{display_count}".html_safe end def in_progress_for_editor(editor) diff --git a/app/views/editors/index.html.erb b/app/views/editors/index.html.erb index e9536af0b..317e86bd7 100644 --- a/app/views/editors/index.html.erb +++ b/app/views/editors/index.html.erb @@ -35,8 +35,8 @@
    <%= editor.category_list %> <%= link_to in_progress_for_editor(editor), "/dashboard/#{editor.login}" %><%= editor.max_assignments %> <%= display_availability(editor) %><%= open_invites_for_editor(editor) %><%= display_availability(editor) %> class="text-center" title="Invites"><%= open_invites_for_editor(editor) %> <%= link_to 'Edit', edit_editor_path(editor), title: 'Edit' %>
    <%= editor.category_list %> <%= link_to in_progress_for_editor(editor), "/dashboard/#{editor.login}" %> <%= display_availability(editor) %> class="text-center" title="Invites"><%= open_invites_for_editor(editor) %> class="text-center" title="Invites"><%= open_invites_for_editor(editor) %> <%= link_to 'Edit', edit_editor_path(editor), title: 'Edit' %>
    -
    Displaying last <%= @invitations.size %> invitations
    +
    <%= page_entries_info(@invitations).capitalize.html_safe %>
    + <%= will_paginate @invitations, page_links: false %>
    <% end %>
    diff --git a/spec/system/invitations_spec.rb b/spec/system/invitations_spec.rb index 40743734d..ea3dbf5c2 100644 --- a/spec/system/invitations_spec.rb +++ b/spec/system/invitations_spec.rb @@ -48,6 +48,16 @@ expect(page).to have_content("user3") end + scenario "paginate invitations" do + create_list(:invitation, 10, :accepted) + create_list(:invitation, 10, :pending) + create_list(:invitation, 10, :expired) + visit invitations_path + + expect(page).to have_content("Displaying invitation 1 - 25 of 30 in total") + expect(page).to have_link("Next →", href: invitations_path(page:2)) + end + scenario "show status for accepted invitations" do create(:invitation, :accepted) visit invitations_path From ee337ed23445880cbab32e970719c0d8a898c873 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 6 May 2021 10:50:54 +0200 Subject: [PATCH 171/609] allow cancelation of pending invitations --- app/controllers/invitations_controller.rb | 6 ++++++ app/views/invitations/index.html.erb | 2 ++ config/routes.rb | 4 +++- spec/system/invitations_spec.rb | 21 +++++++++++++++++++++ 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/app/controllers/invitations_controller.rb b/app/controllers/invitations_controller.rb index 534cb768f..b8677bd15 100644 --- a/app/controllers/invitations_controller.rb +++ b/app/controllers/invitations_controller.rb @@ -6,4 +6,10 @@ def index order(created_at: :desc). paginate(page: params[:page], per_page: 25) end + + def expire + @invitation = Invitation.pending.find(params[:id]) + @invitation.expire! if @invitation + redirect_to invitations_path(page: params[:page].presence), notice: "Invitation canceled!" + end end diff --git a/app/views/invitations/index.html.erb b/app/views/invitations/index.html.erb index a7f6539d1..ad61d107c 100644 --- a/app/views/invitations/index.html.erb +++ b/app/views/invitations/index.html.erb @@ -22,6 +22,7 @@ Paper Invitation status Date + Actions @@ -38,6 +39,7 @@ <%= invitation_status(invitation) %> >Invited <%= time_ago_in_words(invitation.created_at) %> ago + <%= link_to("expire", expire_invitation_path(invitation, page: params[:page]), method: :put, data: {confirm: "Are you sure you want to mark this invitation as expired?" }) if invitation.pending? %> <%- end %> diff --git a/config/routes.rb b/config/routes.rb index 133f4c174..faf9638ec 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,7 +1,9 @@ Rails.application.routes.draw do resources :editors - resources :invitations, only: [:index] + resources :invitations, only: [:index] do + put 'expire', on: :member + end resources :papers do resources :votes, only: ['create'] diff --git a/spec/system/invitations_spec.rb b/spec/system/invitations_spec.rb index ea3dbf5c2..786b15820 100644 --- a/spec/system/invitations_spec.rb +++ b/spec/system/invitations_spec.rb @@ -48,6 +48,27 @@ expect(page).to have_content("user3") end + scenario "expire invitations" do + invitation = create(:invitation, :pending) + visit invitations_path + + expect(page).to have_content("⏳ Pending") + expect(page).to have_link("expire", href: expire_invitation_path(invitation)) + click_link "expire" + expect(page).to have_content("Invitation canceled") + expect(page).to have_content("❌ Expired") + expect(page).to_not have_link("expire") + expect(page).to_not have_content("⏳ Pending") + end + + scenario "only pending invitations can be canceled" do + create(:invitation, :accepted) + create(:invitation, :expired) + visit invitations_path + + expect(page).to_not have_link("expire") + end + scenario "paginate invitations" do create_list(:invitation, 10, :accepted) create_list(:invitation, 10, :pending) From 9bf6e4ff2cac1ff69b392f9225ceb3052d88279e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 6 May 2021 11:12:10 +0200 Subject: [PATCH 172/609] New Rails version (security fixes) Info: https://weblog.rubyonrails.org/2021/5/5/Rails-versions-6-1-3-2-6-0-3-7-5-2-4-6-and-5-2-6-have-been-released/ --- Gemfile | 2 +- Gemfile.lock | 108 +++++++++++++++++++++++++-------------------------- 2 files changed, 55 insertions(+), 55 deletions(-) diff --git a/Gemfile b/Gemfile index 0847324b6..ac6642dd4 100644 --- a/Gemfile +++ b/Gemfile @@ -20,7 +20,7 @@ gem 'pg', '~> 1.2.3' # once this bug is fixed and Rails 6.1 is supported: # https://github.com/mislav/will_paginate/pull/619 gem 'will_paginate', git: "https://github.com/kvokka/will_paginate", branch: "fix-page_entries_info" -gem 'rails', '6.1.3.1' +gem 'rails', '6.1.3.2' gem 'responders' gem 'newrelic_rpm' gem 'sanitize', '~> 5.2.3' diff --git a/Gemfile.lock b/Gemfile.lock index 1e6580919..cb71ad973 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,40 +11,40 @@ GEM Ascii85 (1.1.0) aasm (5.0.8) concurrent-ruby (~> 1.0) - actioncable (6.1.3.1) - actionpack (= 6.1.3.1) - activesupport (= 6.1.3.1) + actioncable (6.1.3.2) + actionpack (= 6.1.3.2) + activesupport (= 6.1.3.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.3.1) - actionpack (= 6.1.3.1) - activejob (= 6.1.3.1) - activerecord (= 6.1.3.1) - activestorage (= 6.1.3.1) - activesupport (= 6.1.3.1) + actionmailbox (6.1.3.2) + actionpack (= 6.1.3.2) + activejob (= 6.1.3.2) + activerecord (= 6.1.3.2) + activestorage (= 6.1.3.2) + activesupport (= 6.1.3.2) mail (>= 2.7.1) - actionmailer (6.1.3.1) - actionpack (= 6.1.3.1) - actionview (= 6.1.3.1) - activejob (= 6.1.3.1) - activesupport (= 6.1.3.1) + actionmailer (6.1.3.2) + actionpack (= 6.1.3.2) + actionview (= 6.1.3.2) + activejob (= 6.1.3.2) + activesupport (= 6.1.3.2) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.3.1) - actionview (= 6.1.3.1) - activesupport (= 6.1.3.1) + actionpack (6.1.3.2) + actionview (= 6.1.3.2) + activesupport (= 6.1.3.2) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.3.1) - actionpack (= 6.1.3.1) - activerecord (= 6.1.3.1) - activestorage (= 6.1.3.1) - activesupport (= 6.1.3.1) + actiontext (6.1.3.2) + actionpack (= 6.1.3.2) + activerecord (= 6.1.3.2) + activestorage (= 6.1.3.2) + activesupport (= 6.1.3.2) nokogiri (>= 1.8.5) - actionview (6.1.3.1) - activesupport (= 6.1.3.1) + actionview (6.1.3.2) + activesupport (= 6.1.3.2) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -52,22 +52,22 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (6.1.3.1) - activesupport (= 6.1.3.1) + activejob (6.1.3.2) + activesupport (= 6.1.3.2) globalid (>= 0.3.6) - activemodel (6.1.3.1) - activesupport (= 6.1.3.1) - activerecord (6.1.3.1) - activemodel (= 6.1.3.1) - activesupport (= 6.1.3.1) - activestorage (6.1.3.1) - actionpack (= 6.1.3.1) - activejob (= 6.1.3.1) - activerecord (= 6.1.3.1) - activesupport (= 6.1.3.1) + activemodel (6.1.3.2) + activesupport (= 6.1.3.2) + activerecord (6.1.3.2) + activemodel (= 6.1.3.2) + activesupport (= 6.1.3.2) + activestorage (6.1.3.2) + actionpack (= 6.1.3.2) + activejob (= 6.1.3.2) + activerecord (= 6.1.3.2) + activesupport (= 6.1.3.2) marcel (~> 1.0.0) mini_mime (~> 1.0.2) - activesupport (6.1.3.1) + activesupport (6.1.3.2) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -289,20 +289,20 @@ GEM rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.1.3.1) - actioncable (= 6.1.3.1) - actionmailbox (= 6.1.3.1) - actionmailer (= 6.1.3.1) - actionpack (= 6.1.3.1) - actiontext (= 6.1.3.1) - actionview (= 6.1.3.1) - activejob (= 6.1.3.1) - activemodel (= 6.1.3.1) - activerecord (= 6.1.3.1) - activestorage (= 6.1.3.1) - activesupport (= 6.1.3.1) + rails (6.1.3.2) + actioncable (= 6.1.3.2) + actionmailbox (= 6.1.3.2) + actionmailer (= 6.1.3.2) + actionpack (= 6.1.3.2) + actiontext (= 6.1.3.2) + actionview (= 6.1.3.2) + activejob (= 6.1.3.2) + activemodel (= 6.1.3.2) + activerecord (= 6.1.3.2) + activestorage (= 6.1.3.2) + activesupport (= 6.1.3.2) bundler (>= 1.15.0) - railties (= 6.1.3.1) + railties (= 6.1.3.2) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -313,9 +313,9 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - railties (6.1.3.1) - actionpack (= 6.1.3.1) - activesupport (= 6.1.3.1) + railties (6.1.3.2) + actionpack (= 6.1.3.2) + activesupport (= 6.1.3.2) method_source rake (>= 0.8.7) thor (~> 1.0) @@ -458,7 +458,7 @@ DEPENDENCIES pg (~> 1.2.3) pry-byebug rack-livereload - rails (= 6.1.3.1) + rails (= 6.1.3.2) rails-controller-testing (~> 1.0.5) responders rspec-rails (~> 5.0.0) From 68312db97d243b52e44bdf67101fcfd743f013a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 6 May 2021 12:00:30 +0200 Subject: [PATCH 173/609] valid atom feed --- app/views/papers/index.atom.builder | 52 ++++++++++++++++------------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/app/views/papers/index.atom.builder b/app/views/papers/index.atom.builder index 5941ffb92..7c1505390 100644 --- a/app/views/papers/index.atom.builder +++ b/app/views/papers/index.atom.builder @@ -7,37 +7,43 @@ atom_feed do |feed| feed.link(rel: 'last', type: "application/atom+xml", href: url_for(params: url_params, format: 'atom', page: @papers.total_pages, only_path: false)) feed.title(Rails.application.settings["name"]) feed.updated(@papers[0].created_at) if @papers.length > 0 + feed.author do |author| + author.name(Rails.application.settings["name"]) + author.uri(Rails.application.settings["url"]) + end @papers.each do |paper| next if paper.invisible? feed.entry(paper, url: paper.seo_url) do |entry| entry.title(paper.title) - entry.state(paper.state) - entry.software_version(paper.software_version) - entry.submitted_at(paper.created_at) - if paper.accepted? - entry.issue paper.issue - entry.published_at(paper.accepted_at) - entry.volume paper.volume - entry.year paper.year - entry.page paper.page - entry.authors do |author| - paper.metadata_authors.each_with_index do |a, i| - sequence = i == 0 ? "first" : "additional" - author.author("sequence" => sequence) do |auth| - auth.given_name a['given_name'] - auth.middle_name a['middle_name'] if a['middle_name'] - auth.last_name a['last_name'] - auth.affiliation a['affiliation'] - auth.orcid a['orcid'] if a['orcid'] + entry.content(type: "application/xml") do |content| + entry.state(paper.state) + entry.software_version(paper.software_version) + entry.submitted_at(paper.created_at) + if paper.accepted? + entry.issue paper.issue + entry.published_at(paper.accepted_at) + entry.volume paper.volume + entry.year paper.year + entry.page paper.page + entry.authors do |author| + paper.metadata_authors.each_with_index do |a, i| + sequence = i == 0 ? "first" : "additional" + author.author("sequence" => sequence) do |auth| + auth.given_name a['given_name'] + auth.middle_name a['middle_name'] if a['middle_name'] + auth.last_name a['last_name'] + auth.affiliation a['affiliation'] + auth.orcid a['orcid'] if a['orcid'] + end end end + entry.doi(paper.doi) + entry.archive_doi(paper.clean_archive_doi) + entry.languages(paper.language_tags.join(', ')) + entry.pdf_url(paper.seo_pdf_url) + entry.tags(paper.author_tags.join(', ')) end - entry.doi(paper.doi) - entry.archive_doi(paper.clean_archive_doi) - entry.languages(paper.language_tags.join(', ')) - entry.pdf_url(paper.seo_pdf_url) - entry.tags(paper.author_tags.join(', ')) end end end From 0d12ff5cadebb7f2013e9889d3047ffdc9b35390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 6 May 2021 12:10:45 +0200 Subject: [PATCH 174/609] change link text --- app/views/invitations/index.html.erb | 2 +- spec/system/invitations_spec.rb | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/invitations/index.html.erb b/app/views/invitations/index.html.erb index ad61d107c..8b1397e05 100644 --- a/app/views/invitations/index.html.erb +++ b/app/views/invitations/index.html.erb @@ -39,7 +39,7 @@ <%= invitation_status(invitation) %> >Invited <%= time_ago_in_words(invitation.created_at) %> ago - <%= link_to("expire", expire_invitation_path(invitation, page: params[:page]), method: :put, data: {confirm: "Are you sure you want to mark this invitation as expired?" }) if invitation.pending? %> + <%= link_to("Cancel", expire_invitation_path(invitation, page: params[:page]), method: :put, data: {confirm: "Are you sure you want to mark this invitation as expired?" }) if invitation.pending? %> <%- end %> diff --git a/spec/system/invitations_spec.rb b/spec/system/invitations_spec.rb index 786b15820..42aad3a09 100644 --- a/spec/system/invitations_spec.rb +++ b/spec/system/invitations_spec.rb @@ -53,11 +53,11 @@ visit invitations_path expect(page).to have_content("⏳ Pending") - expect(page).to have_link("expire", href: expire_invitation_path(invitation)) - click_link "expire" + expect(page).to have_link("Cancel", href: expire_invitation_path(invitation)) + click_link "Cancel" expect(page).to have_content("Invitation canceled") expect(page).to have_content("❌ Expired") - expect(page).to_not have_link("expire") + expect(page).to_not have_link("Cancel") expect(page).to_not have_content("⏳ Pending") end @@ -66,7 +66,7 @@ create(:invitation, :expired) visit invitations_path - expect(page).to_not have_link("expire") + expect(page).to_not have_link("Cancel") end scenario "paginate invitations" do From e86443fd8d4881aca17ea7a956a78539ab7f3a78 Mon Sep 17 00:00:00 2001 From: Kelly Rowland Date: Mon, 10 May 2021 10:59:06 -0700 Subject: [PATCH 175/609] add note to editorial guide about reviewers needing to accept repo invite --- docs/editing.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/editing.md b/docs/editing.md index 346d330d9..b052af71d 100644 --- a/docs/editing.md +++ b/docs/editing.md @@ -80,6 +80,10 @@ Next, run the command `@whedon start review`. If you haven't assigned an editor The `REVIEW` issue contains some instructions, and reviewer checklists. The reviewer(s) should check off items of the checklist one-by-one, until done. In the meantime, reviewers can engage the authors freely in a conversation aimed at improving the paper. +```eval_rst +.. note:: When a new review is started, Whedon invites the reviewers to the GitHub repository. The reviewers must accept the invitation to the GitHub repository in order for Whedon to be able to assign the review issue to them, and reviewers are unable to check off checklist items until they have accepted the repository invitation. +``` + If a reviewer recants their commitment or is unresponsive, editors can remove them with the command `@whedon remove @username as reviewer`. You can also add new reviewers in the `REVIEW` issue, but in this case, you need to manually add a review checklist for them by editing the issue body. Comments in the `REVIEW` issue should be kept brief, as much as possible, with more lengthy suggestions or requests posted as separate issues, directly in the submission repository. A link-back to those issues in the `REVIEW` is helpful. From ce2f718b20573f7720c050e9d7c3e64dcd8fc027 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 11 May 2021 11:50:13 +0200 Subject: [PATCH 176/609] use separate partials --- app/views/papers/_show_published.html.erb | 79 +++++++++++ app/views/papers/_show_unpublished.html.erb | 61 ++++++++ app/views/papers/show.html.erb | 147 +------------------- 3 files changed, 144 insertions(+), 143 deletions(-) create mode 100644 app/views/papers/_show_published.html.erb create mode 100644 app/views/papers/_show_unpublished.html.erb diff --git a/app/views/papers/_show_published.html.erb b/app/views/papers/_show_published.html.erb new file mode 100644 index 000000000..72e078b0f --- /dev/null +++ b/app/views/papers/_show_published.html.erb @@ -0,0 +1,79 @@ +
    + <%= render partial: "shared/retraction_notice" if @paper.retracted? %> + +
    + +
    +

    <%= @paper.title %>

    + <% @paper.language_tags.each do |tag| %> + <%= link_to tag, papers_by_language_path(language: tag) %> + <% end %> + Submitted <%= @paper.created_at.strftime('%d %B %Y') %> + • + Published <%= @paper.accepted_at.strftime('%d %B %Y') %> +
    +
    +
    + +
    +
    +
    + + + +
    + +
    +
    + <%= link_to @paper.repository_url, class: 'btn paper-btn' do %> + <%= image_tag "gh-icon.svg" %> + Software repository + <% end %> + + <%= link_to @paper.review_url, class: 'btn paper-btn' do %> + <%= image_tag "icon_docs.svg" %> + Paper review + <% end %> + + <%= link_to @paper.pdf_url, class: 'btn paper-btn' do %> + <%= image_tag "dl-icon.svg" %> + Download paper + <% end %> + + <%= link_to @paper.clean_archive_doi, class: 'btn paper-btn' do %> + <%= image_tag "hist-icon.svg" %> + Software archive + <% end %> +
    + +
    Review
    +

    Editor: <%= github_link @paper.metadata_editor %> (<%= link_to "all papers", papers_by_editor_path(@paper.metadata_editor) %>)
    Reviewers: <%= pretty_reviewers(@paper.metadata_reviewers) %>

    + +
    Authors
    +

    <%= pretty_authors(@paper.metadata_authors) %>

    + +
    Citation
    +

    <%= @paper.citation_string %>

    + + +
    <%= link_to "Copy citation string".html_safe, "#", class: "clipboard-btn", "data-clipboard-action": "copy", "data-clipboard-target": "#citationstring" %> · <%= link_to "Copy BibTeX".html_safe, "#", class: "clipboard-btn", "data-clipboard-action": "copy", "data-clipboard-target": "#bibtex" %>  <%= octicon "clippy", height: 16, class: "", "aria-label": "Copy" %>
    + +
    Tags
    +

    + <% @paper.author_tags.each do |tag| %> + <%= link_to tag, papers_by_tag_path(tag: tag) %> + <% end %> +

    +
    Altmetrics
    +
    + +
    Markdown badge
    +

    <%= image_tag @paper.status_badge_url %>   <%= octicon "clippy", height: 16, class: "", "aria-label": "Copy" %>

    + +
    License
    +

    Authors of <%= Rails.application.settings['abbreviation'] %> papers retain copyright.

    +

    This work is licensed under a Creative Commons Attribution 4.0 International License.

    +

    Creative Commons License

    +
    +
    +
    diff --git a/app/views/papers/_show_unpublished.html.erb b/app/views/papers/_show_unpublished.html.erb new file mode 100644 index 000000000..6437dab8f --- /dev/null +++ b/app/views/papers/_show_unpublished.html.erb @@ -0,0 +1,61 @@ +
    +
    +
    +

    <%= @paper.title %>

    + Submitted <%= @paper.created_at.strftime('%d %B %Y') %> +
    +
    +
    + +
    +
    +
    +
    + <%= render partial: "papers/status", locals: { paper: @paper } %> + + <%= render partial: "papers/eic_summary", locals: { paper: @paper } if current_user %> + +
    + <%= render partial: "papers/vote_summary", locals: { paper: @paper } if current_editor %> +
    +
    +
    + Paper actions +
    +
    +

    Available actions for you on this paper

    + <%= render partial: "papers/paper_buttons", locals: { paper: @paper } if current_user %> +
    +
    +
    +
    + +
    +
    + <%= link_to @paper.repository_url, class: 'btn paper-btn' do %> + <%= image_tag "gh-icon.svg" %> + Software repository + <% end %> + + <% if @paper.meta_review_issue_id %> + <%= link_to @paper.meta_review_url, class: 'btn paper-btn' do %> + <%= image_tag "icon_docs.svg" %> + Paper meta review + <% end %> + <% end %> + + <% if @paper.review_issue_id %> + <%= link_to @paper.review_url, class: 'btn paper-btn' do %> + <%= image_tag "icon_docs.svg" %> + Paper review + <% end %> + <% end %> +
    + + <% if @paper.review_issue_id %> +
    Markdown badge
    +

    <%= image_tag @paper.status_badge_url %>   <%= octicon "clippy", height: 16, class: "", "aria-label": "Copy" %>

    + <% end %> +
    +
    +
    diff --git a/app/views/papers/show.html.erb b/app/views/papers/show.html.erb index 3a945bc32..b728eb295 100644 --- a/app/views/papers/show.html.erb +++ b/app/views/papers/show.html.erb @@ -90,149 +90,10 @@
    <% if @paper.doi? %> -
    - <%= render partial: "shared/retraction_notice" if @paper.retracted? %> - -
    - -
    -

    <%= @paper.title %>

    - <% @paper.language_tags.each do |tag| %> - <%= link_to tag, papers_by_language_path(language: tag) %> - <% end %> - Submitted <%= @paper.created_at.strftime('%d %B %Y') %> - • - Published <%= @paper.accepted_at.strftime('%d %B %Y') %> -
    -
    -
    - -
    -
    -
    - - - -
    - -
    -
    - <%= link_to @paper.repository_url, class: 'btn paper-btn' do %> - <%= image_tag "gh-icon.svg" %> - Software repository - <% end %> - - <%= link_to @paper.review_url, class: 'btn paper-btn' do %> - <%= image_tag "icon_docs.svg" %> - Paper review - <% end %> - - <%= link_to @paper.pdf_url, class: 'btn paper-btn' do %> - <%= image_tag "dl-icon.svg" %> - Download paper - <% end %> - - <%= link_to @paper.clean_archive_doi, class: 'btn paper-btn' do %> - <%= image_tag "hist-icon.svg" %> - Software archive - <% end %> -
    - -
    Review
    -

    Editor: <%= github_link @paper.metadata_editor %> (<%= link_to "all papers", papers_by_editor_path(@paper.metadata_editor) %>)
    Reviewers: <%= pretty_reviewers(@paper.metadata_reviewers) %>

    - -
    Authors
    -

    <%= pretty_authors(@paper.metadata_authors) %>

    - -
    Citation
    -

    <%= @paper.citation_string %>

    - - -
    <%= link_to "Copy citation string".html_safe, "#", class: "clipboard-btn", "data-clipboard-action": "copy", "data-clipboard-target": "#citationstring" %> · <%= link_to "Copy BibTeX".html_safe, "#", class: "clipboard-btn", "data-clipboard-action": "copy", "data-clipboard-target": "#bibtex" %>  <%= octicon "clippy", height: 16, class: "", "aria-label": "Copy" %>
    - -
    Tags
    -

    - <% @paper.author_tags.each do |tag| %> - <%= link_to tag, papers_by_tag_path(tag: tag) %> - <% end %> -

    -
    Altmetrics
    -
    - -
    Markdown badge
    -

    <%= image_tag @paper.status_badge_url %>   <%= octicon "clippy", height: 16, class: "", "aria-label": "Copy" %>

    - -
    License
    -

    Authors of <%= Rails.application.settings['abbreviation'] %> papers retain copyright.

    -

    This work is licensed under a Creative Commons Attribution 4.0 International License.

    -

    Creative Commons License

    -
    -
    -
    - - <% else %> -
    -
    -
    -

    <%= @paper.title %>

    - Submitted <%= @paper.created_at.strftime('%d %B %Y') %> -
    -
    -
    - -
    -
    -
    -
    - <%= render partial: "papers/status", locals: { paper: @paper } %> - - <%= render partial: "papers/eic_summary", locals: { paper: @paper } if current_user %> - -
    - <%= render partial: "papers/vote_summary", locals: { paper: @paper } if current_editor %> -
    -
    -
    - Paper actions -
    -
    -

    Available actions for you on this paper

    - <%= render partial: "papers/paper_buttons", locals: { paper: @paper } if current_user %> -
    -
    -
    -
    - -
    -
    - <%= link_to @paper.repository_url, class: 'btn paper-btn' do %> - <%= image_tag "gh-icon.svg" %> - Software repository - <% end %> - - <% if @paper.meta_review_issue_id %> - <%= link_to @paper.meta_review_url, class: 'btn paper-btn' do %> - <%= image_tag "icon_docs.svg" %> - Paper meta review - <% end %> - <% end %> - - <% if @paper.review_issue_id %> - <%= link_to @paper.review_url, class: 'btn paper-btn' do %> - <%= image_tag "icon_docs.svg" %> - Paper review - <% end %> - <% end %> -
    - - <% if @paper.review_issue_id %> -
    Markdown badge
    -

    <%= image_tag @paper.status_badge_url %>   <%= octicon "clippy", height: 16, class: "", "aria-label": "Copy" %>

    - <% end %> -
    -
    -
    - <% end %> + <%= render partial: "papers/show_published" %> + <% else %> + <%= render partial: "papers/show_unpublished" %> + <% end %>
    <%= render partial: "content/layout/footer" %> From be453b239aac5bb763d060a17ec86030c929c1e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 11 May 2021 12:18:53 +0200 Subject: [PATCH 177/609] refactor partials --- app/views/papers/_actions.html.erb | 36 +++++++++++++++++++++ app/views/papers/_eic_summary.html.erb | 4 +-- app/views/papers/_paper_buttons.html.erb | 24 -------------- app/views/papers/_show_unpublished.html.erb | 14 +------- app/views/papers/_vote_summary.html.erb | 15 ++++----- 5 files changed, 46 insertions(+), 47 deletions(-) create mode 100644 app/views/papers/_actions.html.erb delete mode 100644 app/views/papers/_paper_buttons.html.erb diff --git a/app/views/papers/_actions.html.erb b/app/views/papers/_actions.html.erb new file mode 100644 index 000000000..83a11fe3e --- /dev/null +++ b/app/views/papers/_actions.html.erb @@ -0,0 +1,36 @@ +<% if current_user.admin? || (current_user == paper.submitting_author) %> +
    +
    + Paper actions +
    +
    +

    Available actions for you on this paper

    + +
    + <% if current_user.admin? %> + <% unless paper.meta_review_issue_id %> +
    + <%= form_tag(start_meta_review_paper_url(paper), class: "left") do %> + <%= select_tag :editor, options_for_select(Repository.editors, selected: paper.suggested_editor), include_blank: true, prompt: "Select editor", class: "form-control left" %> + <%= submit_tag "Start meta review", class: "btn btn-primary left start-review" %> + <% end %> +
    + <% end %> + + <% unless paper.review_issue_id %> +
    + <%= button_to "Reject paper", reject_paper_path(paper), data: { confirm: "Are you sure?" }, form_class: "left", class: "btn btn-danger" %> +
    + <% end %> + <% end %> + + <% if (current_user == paper.submitting_author) || current_user.admin? %> +
    + <%= button_to "Withdraw paper", withdraw_paper_path(paper), data: { confirm: "Are you sure?" }, form_class: "left", class: "btn btn-danger" %> +
    + <% end %> +
    +
    +
    +
    +<% end %> diff --git a/app/views/papers/_eic_summary.html.erb b/app/views/papers/_eic_summary.html.erb index 8faf66c8d..97fbcfa42 100644 --- a/app/views/papers/_eic_summary.html.erb +++ b/app/views/papers/_eic_summary.html.erb @@ -7,8 +7,8 @@

    Notes to editor: <%= @paper.body %>

    -
    +
    Author information @@ -33,7 +33,7 @@
    <%= setting(:abbreviation) %> reviews
    <%= reviewer_page_link("Search reviews »".html_safe, paper.submitting_author.github_username) %>
    -
    +
    diff --git a/app/views/papers/_paper_buttons.html.erb b/app/views/papers/_paper_buttons.html.erb deleted file mode 100644 index 40cbb96d9..000000000 --- a/app/views/papers/_paper_buttons.html.erb +++ /dev/null @@ -1,24 +0,0 @@ -
    - <% if current_user.admin? %> - <% unless paper.meta_review_issue_id %> -
    - <%= form_tag(start_meta_review_paper_url(paper), class: "left") do %> - <%= select_tag :editor, options_for_select(Repository.editors, selected: paper.suggested_editor), include_blank: true, prompt: "Select editor", class: "form-control left" %> - <%= submit_tag "Start meta review", class: "btn btn-primary left start-review" %> - <% end %> -
    - <% end %> - - <% unless paper.review_issue_id %> -
    - <%= button_to "Reject paper", reject_paper_path(paper), data: { confirm: "Are you sure?" }, form_class: "left", class: "btn btn-danger" %> -
    - <% end %> - <% end %> - - <% if (current_user == paper.submitting_author) || current_user.admin? %> -
    - <%= button_to "Withdraw paper", withdraw_paper_path(paper), data: { confirm: "Are you sure?" }, form_class: "left", class: "btn btn-danger" %> -
    - <% end %> -
    diff --git a/app/views/papers/_show_unpublished.html.erb b/app/views/papers/_show_unpublished.html.erb index 6437dab8f..2c3a9e71d 100644 --- a/app/views/papers/_show_unpublished.html.erb +++ b/app/views/papers/_show_unpublished.html.erb @@ -12,21 +12,9 @@
    <%= render partial: "papers/status", locals: { paper: @paper } %> - <%= render partial: "papers/eic_summary", locals: { paper: @paper } if current_user %> - -
    <%= render partial: "papers/vote_summary", locals: { paper: @paper } if current_editor %> -
    -
    -
    - Paper actions -
    -
    -

    Available actions for you on this paper

    - <%= render partial: "papers/paper_buttons", locals: { paper: @paper } if current_user %> -
    -
    + <%= render partial: "papers/actions", locals: { paper: @paper } if current_user %>
    diff --git a/app/views/papers/_vote_summary.html.erb b/app/views/papers/_vote_summary.html.erb index ba47dfb1d..a48ab72dd 100644 --- a/app/views/papers/_vote_summary.html.erb +++ b/app/views/papers/_vote_summary.html.erb @@ -18,20 +18,19 @@
    <%= f.submit "Vote as in scope 👍", form_class: "left", class: "btn btn-light btn-sm" %> -
    +
    <%= f.submit "Vote as out of scope 👎", form_class: "left", class: "btn btn-light btn-sm" %> -
    +
    <%= f.submit "Just comment 🤔", form_class: "left", class: "btn btn-light btn-sm" %> -
    + -
    <%= link_to "View vote summary »".html_safe, "#voteSummary", class: 'tooltips', title: 'View vote summary', data: { toggle: 'collapse'} %> - + @@ -60,8 +59,7 @@ <% end %>
    - - +
    <% @paper.votes.each do |vote| %> <% if vote.in_scope? %> @@ -81,4 +79,5 @@ No votes on scope yet. <% end %>
    -
    \ No newline at end of file + +
    \ No newline at end of file From 35947bbe8cae6069b3d8132ce598f0d34d613a1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 11 May 2021 13:38:24 +0200 Subject: [PATCH 178/609] add notes to papers --- app/assets/stylesheets/home.scss | 43 ++++++++++++------- app/controllers/notes_controller.rb | 28 +++++++++++++ app/controllers/papers_controller.rb | 2 +- app/models/note.rb | 8 ++++ app/models/paper.rb | 1 + app/views/papers/_notes.html.erb | 46 +++++++++++++++++++++ app/views/papers/_show_unpublished.html.erb | 1 + config/routes.rb | 1 + db/migrate/20210511103312_create_notes.rb | 13 ++++++ db/schema.rb | 12 +++++- 10 files changed, 138 insertions(+), 17 deletions(-) create mode 100644 app/controllers/notes_controller.rb create mode 100644 app/models/note.rb create mode 100644 app/views/papers/_notes.html.erb create mode 100644 db/migrate/20210511103312_create_notes.rb diff --git a/app/assets/stylesheets/home.scss b/app/assets/stylesheets/home.scss index 459681637..1b8264454 100644 --- a/app/assets/stylesheets/home.scss +++ b/app/assets/stylesheets/home.scss @@ -55,7 +55,7 @@ } } -table.dashboard-table{ +table.dashboard-table, table.comments-table{ margin-top: 1em; width: 100%; background-color: white; @@ -87,15 +87,37 @@ table.dashboard-table{ font-size: 1em; line-height: 1em; - &.state{ - font-size: 0.9em; - } - img.avatar { margin-right: .2em; border-radius: 2em; } + .time { + font-size: 0.857em; + margin-bottom: 0; + padding-bottom: 0; + color: rgba(46, 41, 78, 0.50); + } + } + } + tr { + border-bottom: 1px solid #efefef; + } + } +} + +table.dashboard-table{ + tbody, tfoot { + tr { + td { + padding: 1em 0.3em 1em 0.7em; + font-size: 1em; + line-height: 1em; + + &.state{ + font-size: 0.9em; + } + .availability-status-red { background-color: #dc3545; color: white; @@ -116,7 +138,7 @@ table.dashboard-table{ padding: 0.2em 0.5em; border-radius: 2px; } - + .activity-avatar { padding-right: 0.2em; float: left; @@ -125,13 +147,6 @@ table.dashboard-table{ align-items: center; } - .time { - font-size: 0.857em; - margin-bottom: 0; - padding-bottom: 0; - color: rgba(46, 41, 78, 0.50); - } - .comment-link { font-size: 0.857em; display: block; @@ -156,8 +171,6 @@ table.dashboard-table{ } } tr { - border-bottom: 1px solid #efefef; - &.availability-none { background: #e2e3e5; diff --git a/app/controllers/notes_controller.rb b/app/controllers/notes_controller.rb new file mode 100644 index 000000000..c63777f93 --- /dev/null +++ b/app/controllers/notes_controller.rb @@ -0,0 +1,28 @@ +class NotesController < ApplicationController + before_action :find_paper + before_action :require_editor + + def create + params = note_params.merge!(editor_id: current_user.editor.id) + + @note = @paper.notes.build(params) + + if @note.save + flash[:notice] = "Note saved" + redirect_to paper_path(@paper) + else + flash[:error] = "Note can't be empty" + redirect_to paper_path(@paper) + end + end + + private + + def note_params + params.require(:note).permit(:comment) + end + + def find_paper + @paper = Paper.find_by_sha(params[:paper_id]) + end +end diff --git a/app/controllers/papers_controller.rb b/app/controllers/papers_controller.rb index 140329b53..b833a0341 100644 --- a/app/controllers/papers_controller.rb +++ b/app/controllers/papers_controller.rb @@ -225,7 +225,7 @@ def show if params[:doi] && valid_doi? @paper = Paper.find_by_doi!(params[:doi]) else - @paper = Paper.find_by_sha!(params[:id]) + @paper = Paper.includes(notes: :editor).find_by_sha!(params[:id]) # By default we want people to use the URLs with the DOI in the path if # the paper is accepted. if @paper.accepted? diff --git a/app/models/note.rb b/app/models/note.rb new file mode 100644 index 000000000..ddaa0640d --- /dev/null +++ b/app/models/note.rb @@ -0,0 +1,8 @@ +class Note < ApplicationRecord + belongs_to :paper + belongs_to :editor + + validates :comment, presence: true + + default_scope { order(created_at: :asc) } +end diff --git a/app/models/paper.rb b/app/models/paper.rb index bf970428d..4c6759167 100644 --- a/app/models/paper.rb +++ b/app/models/paper.rb @@ -19,6 +19,7 @@ class Paper < ApplicationRecord foreign_key: "eic_id" has_many :invitations + has_many :notes has_many :votes has_many :in_scope_votes, -> { in_scope }, diff --git a/app/views/papers/_notes.html.erb b/app/views/papers/_notes.html.erb new file mode 100644 index 000000000..26a63d297 --- /dev/null +++ b/app/views/papers/_notes.html.erb @@ -0,0 +1,46 @@ +
    +
    + Editor notes +
    +
    + <% if paper.notes.any? %> + + + <% paper.notes.each do |note| %> + + + + + <% end %> + +
    + <%= image_tag(avatar(note.editor.login), size: "24x24", class: "avatar", title: note.editor.full_name) %> + <%= note.comment %> +
    <%= time_ago_in_words(note.created_at) %> ago
    +
    + <% end %> + + <%= form_for [paper, Note.new] do |f| %> +
    +
    +
    + <%= f.text_field :comment, class: "form-control", placeholder: "Your note to other editors" %> +
    +
    +
    + +
    +
    +
    + <%= f.submit "Add note", form_class: "left", class: "btn btn-light btn-sm" %> +
    +
    +
    + <% end %> +
    + + +
    +
    \ No newline at end of file diff --git a/app/views/papers/_show_unpublished.html.erb b/app/views/papers/_show_unpublished.html.erb index 2c3a9e71d..f0d7f066b 100644 --- a/app/views/papers/_show_unpublished.html.erb +++ b/app/views/papers/_show_unpublished.html.erb @@ -14,6 +14,7 @@ <%= render partial: "papers/status", locals: { paper: @paper } %> <%= render partial: "papers/eic_summary", locals: { paper: @paper } if current_user %> <%= render partial: "papers/vote_summary", locals: { paper: @paper } if current_editor %> + <%= render partial: "papers/notes", locals: { paper: @paper } if current_editor %> <%= render partial: "papers/actions", locals: { paper: @paper } if current_user %> diff --git a/config/routes.rb b/config/routes.rb index faf9638ec..a3f593e5a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -6,6 +6,7 @@ end resources :papers do resources :votes, only: ['create'] + resources :notes, only: ['create'] member do post 'start_review' diff --git a/db/migrate/20210511103312_create_notes.rb b/db/migrate/20210511103312_create_notes.rb new file mode 100644 index 000000000..5ef456353 --- /dev/null +++ b/db/migrate/20210511103312_create_notes.rb @@ -0,0 +1,13 @@ +class CreateNotes < ActiveRecord::Migration[6.1] + def change + create_table :notes do |t| + t.column :editor_id, :integer + t.column :paper_id, :integer + t.column :comment, :text + t.timestamps + end + + add_index :notes, :editor_id + add_index :notes, :paper_id + end +end diff --git a/db/schema.rb b/db/schema.rb index dfe142af5..2511366c3 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2021_05_05_104138) do +ActiveRecord::Schema.define(version: 2021_05_11_103312) do # These are extensions that must be enabled in order to support this database enable_extension "hstore" @@ -47,6 +47,16 @@ t.index ["state"], name: "index_invitations_on_state" end + create_table "notes", force: :cascade do |t| + t.integer "editor_id" + t.integer "paper_id" + t.text "comment" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + t.index ["editor_id"], name: "index_notes_on_editor_id" + t.index ["paper_id"], name: "index_notes_on_paper_id" + end + create_table "papers", force: :cascade do |t| t.string "title" t.string "state" From a6bef4aca5a789a0ffde0f4bfc91cc1905519f0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 11 May 2021 18:46:30 +0200 Subject: [PATCH 179/609] add deletion of notes --- app/controllers/notes_controller.rb | 9 +++++++++ app/views/papers/_notes.html.erb | 5 ++++- config/routes.rb | 4 ++-- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/app/controllers/notes_controller.rb b/app/controllers/notes_controller.rb index c63777f93..90311901e 100644 --- a/app/controllers/notes_controller.rb +++ b/app/controllers/notes_controller.rb @@ -16,6 +16,15 @@ def create end end + def destroy + @note = @paper.notes.find(params[:id]) + if @note.editor_id == current_user.editor.id + @note.destroy! + flash[:notice] = "Note deleted" + end + redirect_to paper_path(@paper) + end + private def note_params diff --git a/app/views/papers/_notes.html.erb b/app/views/papers/_notes.html.erb index 26a63d297..0f9070198 100644 --- a/app/views/papers/_notes.html.erb +++ b/app/views/papers/_notes.html.erb @@ -12,7 +12,10 @@ <%= image_tag(avatar(note.editor.login), size: "24x24", class: "avatar", title: note.editor.full_name) %> <%= note.comment %> -
    <%= time_ago_in_words(note.created_at) %> ago
    +
    + <%= time_ago_in_words(note.created_at) %> ago. + <%= link_to("Delete note", paper_note_path(paper,note), method: :delete) if note.editor == current_user.editor %> +
    <% end %> diff --git a/config/routes.rb b/config/routes.rb index a3f593e5a..5bd5f235a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -5,8 +5,8 @@ put 'expire', on: :member end resources :papers do - resources :votes, only: ['create'] - resources :notes, only: ['create'] + resources :votes, only: [:create] + resources :notes, only: [:create, :destroy] member do post 'start_review' From 626868c0dcff86c0916dbaf375719c3858393a7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 11 May 2021 19:40:50 +0200 Subject: [PATCH 180/609] add specs for editor notes --- spec/factories/notes.rb | 7 +++++ spec/system/notes_spec.rb | 57 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 spec/factories/notes.rb create mode 100644 spec/system/notes_spec.rb diff --git a/spec/factories/notes.rb b/spec/factories/notes.rb new file mode 100644 index 000000000..2f20ba93e --- /dev/null +++ b/spec/factories/notes.rb @@ -0,0 +1,7 @@ +FactoryBot.define do + factory :note do + editor { create(:editor) } + paper { create(:review_pending_paper) } + sequence(:comment) {|n| "Testing editor notes #{n}" } + end +end \ No newline at end of file diff --git a/spec/system/notes_spec.rb b/spec/system/notes_spec.rb new file mode 100644 index 000000000..dcec4b9e5 --- /dev/null +++ b/spec/system/notes_spec.rb @@ -0,0 +1,57 @@ +require "rails_helper" + +feature "Editor notes on papers" do + let(:paper) { create(:review_pending_paper) } + let(:editor_user) { create(:user, editor: create(:editor)) } + + scenario "Are not public" do + visit paper_path(paper.sha) + expect(page).to_not have_content("Editor notes") + end + + scenario "Are not visible to non editors" do + login_as(create(:user)) + visit paper_path(paper.sha) + expect(page).to_not have_content("Editor notes") + end + + scenario "Are visible to editors" do + login_as(editor_user) + visit paper_path(paper.sha) + expect(page).to have_content("Editor notes") + end + + scenario "Are not visible for published papers" do + paper = create(:accepted_paper) + login_as(editor_user) + visit paper_path(paper.sha) + expect(page).to_not have_content("Editor notes") + end + + scenario "Can be created and deleted by editors" do + login_as(editor_user) + visit paper_path(paper.sha) + fill_in "note_comment", with: "This is a test editor note" + click_on "Add note" + expect(page).to have_content("Note saved") + + visit paper_path(paper.sha) + within("table#paper-notes") do + expect(page).to have_content("This is a test editor note") + click_on "Delete note" + end + expect(page).to have_content("Note deleted") + + visit paper_path(paper.sha) + expect(page).to_not have_content("This is a test editor note") + end + + scenario "Editors can not delete other editor's notes" do + note = create(:note) + login_as(editor_user) + visit paper_path(note.paper.sha) + + expect(page).to have_content(note.comment) + expect(page).to_not have_content("Delete note") + end +end \ No newline at end of file From 44a43ab6163c482580ef0247a4f572838ad7a678 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 12 May 2021 14:02:21 +0100 Subject: [PATCH 181/609] Minor CSS tweak --- app/assets/stylesheets/home.scss | 1 + app/views/papers/_notes.html.erb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/home.scss b/app/assets/stylesheets/home.scss index 1b8264454..6a2099f62 100644 --- a/app/assets/stylesheets/home.scss +++ b/app/assets/stylesheets/home.scss @@ -96,6 +96,7 @@ table.dashboard-table, table.comments-table{ font-size: 0.857em; margin-bottom: 0; padding-bottom: 0; + padding-top: 0.2em; color: rgba(46, 41, 78, 0.50); } } diff --git a/app/views/papers/_notes.html.erb b/app/views/papers/_notes.html.erb index 0f9070198..79db3fc1f 100644 --- a/app/views/papers/_notes.html.erb +++ b/app/views/papers/_notes.html.erb @@ -27,7 +27,7 @@
    - <%= f.text_field :comment, class: "form-control", placeholder: "Your note to other editors" %> + <%= f.text_area :comment, class: "form-control", placeholder: "Your note to other editors" %>
    From e4185a7184bb100da407de69173db7c6d01f82c8 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 12 May 2021 15:44:23 +0100 Subject: [PATCH 182/609] Adding status badge to pre-review issue --- app/views/shared/meta_view_body.text.erb | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/views/shared/meta_view_body.text.erb b/app/views/shared/meta_view_body.text.erb index 8c392ff74..e8fbe6cc8 100644 --- a/app/views/shared/meta_view_body.text.erb +++ b/app/views/shared/meta_view_body.text.erb @@ -9,6 +9,18 @@ Due to the challenges of the COVID-19 pandemic, JOSS is currently operating in a "reduced service mode". You can read more about what that means in [our blog post](https://blog.joss.theoj.org/2020/05/reopening-joss). +## Status + +<%- url = Rails.application.settings["url"] %> +[![status](<%= url %>/papers/<%= paper.sha %>/status.svg)](<%= url %>/papers/<%= paper.sha %>) + +Status badge code: + +``` +HTML: +Markdown: [![status](<%= url %>/papers/<%= paper.sha %>/status.svg)](<%= url %>/papers/<%= paper.sha %>) +``` + **Author instructions** <%- abbreviation, reviewers = Rails.application.settings.values_at("abbreviation", "reviewers") %> From 6b9d6a54b2731c3f197b47dbe19dbd9e2c47376a Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 19 May 2021 21:09:05 +0100 Subject: [PATCH 183/609] Update submitting.md --- docs/submitting.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/submitting.md b/docs/submitting.md index 9306bfc3c..cddc110b3 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -103,12 +103,12 @@ tags: - galactic dynamics - milky way authors: - - name: Adrian M. Price-Whelan^[Custom footnotes for e.g. denoting who the corresponding author is can be included like this.] + - name: Adrian M. Price-Whelan^[co-first author] # note this makes a footnote saying 'co-first author' orcid: 0000-0003-0872-7098 affiliation: "1, 2" # (Multiple affiliations must be quoted) - - name: Author Without ORCID + - name: Author Without ORCID^[co-first author] # note this makes a footnote saying 'co-first author' affiliation: 2 - - name: Author with no affiliation + - name: Author with no affiliation^[corresponding author] affiliation: 3 affiliations: - name: Lyman Spitzer, Jr. Fellow, Princeton University From 57bfe57c5b0af080a00d16dd344a7d29fe241138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 21 May 2021 11:11:15 +0200 Subject: [PATCH 184/609] update nokogiri [security fix] https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-7rrm-v45f-jp64 --- Gemfile.lock | 2 +- app/assets/stylesheets/application.scss | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index cb71ad973..61833d861 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -230,7 +230,7 @@ GEM nenv (0.3.0) newrelic_rpm (7.0.0) nio4r (2.5.7) - nokogiri (1.11.3) + nokogiri (1.11.5) mini_portile2 (~> 2.5.0) racc (~> 1.4) nokogumbo (2.0.5) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index a5b2300ef..98a6c46c2 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -741,10 +741,10 @@ $btn-primary-border: darken($btn-primary-bg, 5%) !default; background-color: #4D4482; color: #fff; } - } -.action-btn{ - margin-bottom: 15px; + +.action-btn { + margin-bottom: 15px; } .btn.orcid { From 64f1a6583fdebc09f7d6a8ec45794203d0c0b6a7 Mon Sep 17 00:00:00 2001 From: "Daniel S. Katz" Date: Thu, 27 May 2021 15:15:55 -0500 Subject: [PATCH 185/609] fixing bib entry in sample paper --- docs/submitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index cddc110b3..b7594a8b9 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -264,7 +264,7 @@ Example `paper.bib` file: } @misc{fidgit, - author = {A. Smith}, + author = {A. Smith and K. Thaney and M. Hahnel}, title = {Fidgit: An ungodly union of GitHub and Figshare}, year = {2020}, publisher = {GitHub}, From 66863111857ec0a821624f33736f9c38182929af Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Fri, 28 May 2021 08:59:41 +0100 Subject: [PATCH 186/609] Update submitting.md --- docs/submitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index b7594a8b9..9f2857c25 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -264,7 +264,7 @@ Example `paper.bib` file: } @misc{fidgit, - author = {A. Smith and K. Thaney and M. Hahnel}, + author = {A. M. Smith and K. Thaney and M. Hahnel}, title = {Fidgit: An ungodly union of GitHub and Figshare}, year = {2020}, publisher = {GitHub}, From 2e9ddd64e7e88b16069dfad1b7e16bae6e4e872d Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sat, 29 May 2021 19:50:21 +0100 Subject: [PATCH 187/609] Updating Whedon docs for recommend-accept --- docs/whedon.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/whedon.md b/docs/whedon.md index 3ff968331..e2f978c2e 100644 --- a/docs/whedon.md +++ b/docs/whedon.md @@ -56,7 +56,7 @@ EDITORIAL TASKS @whedon remind @reviewer in 2 weeks # Ask Whedon to do a dry run of accepting the paper and depositing with Crossref -@whedon accept +@whedon recommend-accept # Ask Whedon to check the references for missing DOIs @whedon check references @@ -223,7 +223,7 @@ Whedon can accept a paper from the review issue. This includes generating the fi JOSS topic editors can ask for the final proofs to be created by Whedon with the following command: ```text -@whedon accept +@whedon recommend-accept ``` On issuing this command, Whedon will also check the references of the paper for any missing DOIs. This command can be triggered separately: From 512ef5ee4e6ccd06f7697874aeb75df939e64925 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 1 Jun 2021 09:42:52 +0200 Subject: [PATCH 188/609] update editing docs --- docs/editing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/editing.md b/docs/editing.md index b052af71d..ed23f0921 100644 --- a/docs/editing.md +++ b/docs/editing.md @@ -112,7 +112,7 @@ Pre-publication steps: - Check the archive deposit has the correct metadata (title and author list), and request the author edit it if it doesn’t match the paper. - Run `@whedon set as archive`. - Run `@whedon set as version` if the version was updated. -- Run `@whedon accept` to generate the final proofs, which has Whedon notify the `@openjournals/joss-eics` team that the paper is ready for final processing. +- Run `@whedon recommend-accept` to generate the final proofs, which has Whedon notify the `@openjournals/joss-eics` team that the paper is ready for final processing. At this point, the EiC/AEiC will take over to make final checks and publish the paper. @@ -307,7 +307,7 @@ This doesn’t mean that you’re the editor, just that you’ve been suggested - Make a final check of the paper with `@whedon generate pdf` and that all references have DOIs (where appropriate) with `@whedon check references`. - If everything looks good, ask the author to make a new release (if possible) of the software being reviewed and deposit a new archive the software with Zenodo/figshare. Update the review thread with this archive DOI: `@whedon set 10.5281/zenodo.xxxxxx` as archive. -- Finally, use `@whedon accept` on the review thread to ping the `@openjournals/joss-eics` team letting them know the paper is ready to be accepted. +- Finally, use `@whedon recommend-accept` on the review thread to ping the `@openjournals/joss-eics` team letting them know the paper is ready to be accepted. **Step 12: Celebrate publication! Tweet! Thank reviewers! Say thank you on issue.** From f97110b66aae115507a4fb0a9a44aa310b6646ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 7 Jun 2021 12:14:47 +0200 Subject: [PATCH 189/609] add model for onboarding invitations --- app/models/onboarding_invitation.rb | 12 +++++++ ...607093405_create_onboarding_invitations.rb | 10 ++++++ db/schema.rb | 9 ++++- spec/factories/onboarding_invitations.rb | 6 ++++ spec/models/onboarding_invitation_spec.rb | 33 +++++++++++++++++++ 5 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 app/models/onboarding_invitation.rb create mode 100644 db/migrate/20210607093405_create_onboarding_invitations.rb create mode 100644 spec/factories/onboarding_invitations.rb create mode 100644 spec/models/onboarding_invitation_spec.rb diff --git a/app/models/onboarding_invitation.rb b/app/models/onboarding_invitation.rb new file mode 100644 index 000000000..9c5ff615c --- /dev/null +++ b/app/models/onboarding_invitation.rb @@ -0,0 +1,12 @@ +class OnboardingInvitation < ApplicationRecord + validates :email, presence: true, uniqueness: true + validates :token, presence: true, uniqueness: true + + before_validation :set_token, on: :create + + private + + def set_token + self.token ||= SecureRandom.hex(5) + end +end diff --git a/db/migrate/20210607093405_create_onboarding_invitations.rb b/db/migrate/20210607093405_create_onboarding_invitations.rb new file mode 100644 index 000000000..b791a1c08 --- /dev/null +++ b/db/migrate/20210607093405_create_onboarding_invitations.rb @@ -0,0 +1,10 @@ +class CreateOnboardingInvitations < ActiveRecord::Migration[6.1] + def change + create_table :onboarding_invitations do |t| + t.string :email + t.string :token + + t.timestamps + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 2511366c3..f6e225c82 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2021_05_11_103312) do +ActiveRecord::Schema.define(version: 2021_06_07_093405) do # These are extensions that must be enabled in order to support this database enable_extension "hstore" @@ -57,6 +57,13 @@ t.index ["paper_id"], name: "index_notes_on_paper_id" end + create_table "onboarding_invitations", force: :cascade do |t| + t.string "email" + t.string "token" + t.datetime "created_at", precision: 6, null: false + t.datetime "updated_at", precision: 6, null: false + end + create_table "papers", force: :cascade do |t| t.string "title" t.string "state" diff --git a/spec/factories/onboarding_invitations.rb b/spec/factories/onboarding_invitations.rb new file mode 100644 index 000000000..64ec79a21 --- /dev/null +++ b/spec/factories/onboarding_invitations.rb @@ -0,0 +1,6 @@ +FactoryBot.define do + factory :onboarding_invitation do + sequence(:email) {|n| "user_#{n}@futureeditors.org" } + token { SecureRandom.hex(5) } + end +end diff --git a/spec/models/onboarding_invitation_spec.rb b/spec/models/onboarding_invitation_spec.rb new file mode 100644 index 000000000..6de587646 --- /dev/null +++ b/spec/models/onboarding_invitation_spec.rb @@ -0,0 +1,33 @@ +require 'rails_helper' + +RSpec.describe OnboardingInvitation, type: :model do + it "should have non-empty email and token" do + onboarding= OnboardingInvitation.new(email: "", token: "") + + expect(onboarding).to_not be_valid + expect(onboarding.errors.messages_for(:email)).to_not be_empty + expect(onboarding.errors.messages_for(:token)).to_not be_empty + end + + it "should have an unique email" do + onboarding_1 = create(:onboarding_invitation) + onboarding_2 = OnboardingInvitation.new(email: onboarding_1.email) + + expect(onboarding_2).to_not be_valid + expect(onboarding_2.errors.messages_for(:email)).to_not be_empty + end + + it "should have an unique token" do + onboarding_1 = create(:onboarding_invitation) + onboarding_2 = OnboardingInvitation.new(token: onboarding_1.token) + + expect(onboarding_2).to_not be_valid + expect(onboarding_2.errors.messages_for(:token)).to_not be_empty + end + + it "should set a token before creating" do + onboarding = OnboardingInvitation.new(email: "user@editors.org") + onboarding.save! + expect(onboarding.reload.token).to be_present + end +end From 473f2e1b21334b57282fea2e8d89acf535af378f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 8 Jun 2021 19:25:11 +0200 Subject: [PATCH 190/609] add last_sent_at --- db/migrate/20210607093405_create_onboarding_invitations.rb | 1 + db/schema.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/db/migrate/20210607093405_create_onboarding_invitations.rb b/db/migrate/20210607093405_create_onboarding_invitations.rb index b791a1c08..c986bc455 100644 --- a/db/migrate/20210607093405_create_onboarding_invitations.rb +++ b/db/migrate/20210607093405_create_onboarding_invitations.rb @@ -3,6 +3,7 @@ def change create_table :onboarding_invitations do |t| t.string :email t.string :token + t.datetime :last_sent_at t.timestamps end diff --git a/db/schema.rb b/db/schema.rb index f6e225c82..20568d927 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -60,6 +60,7 @@ create_table "onboarding_invitations", force: :cascade do |t| t.string "email" t.string "token" + t.datetime "last_sent_at" t.datetime "created_at", precision: 6, null: false t.datetime "updated_at", precision: 6, null: false end From 25446a383eaca82244087da11a9525baa717186e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 8 Jun 2021 19:25:58 +0200 Subject: [PATCH 191/609] config mailer for onboarding invitations --- app/mailers/notifications.rb | 5 +++++ .../onboarding_invitation_email.html.erb | 14 ++++++++++++++ .../onboarding_invitation_email.text.erb | 10 ++++++++++ config/environments/development.rb | 1 + config/environments/test.rb | 1 + 5 files changed, 31 insertions(+) create mode 100644 app/views/notifications/onboarding_invitation_email.html.erb create mode 100644 app/views/notifications/onboarding_invitation_email.text.erb diff --git a/app/mailers/notifications.rb b/app/mailers/notifications.rb index 4bb3c9ace..ba60ec1ba 100644 --- a/app/mailers/notifications.rb +++ b/app/mailers/notifications.rb @@ -31,4 +31,9 @@ def editor_scope_email(editor, issues) @editor = editor mail(to: editor.email, subject: "[Please review]: #{Rails.application.settings["abbreviation"]} scope check summary") end + + def onboarding_invitation_email(onboarding_invitation) + @onboarding_invitation = onboarding_invitation + mail(to: onboarding_invitation.email,subject: "Invitation to join the #{Rails.application.settings["abbreviation"]} editorial board") + end end diff --git a/app/views/notifications/onboarding_invitation_email.html.erb b/app/views/notifications/onboarding_invitation_email.html.erb new file mode 100644 index 000000000..b1c05a6d8 --- /dev/null +++ b/app/views/notifications/onboarding_invitation_email.html.erb @@ -0,0 +1,14 @@ +

    <%= Rails.application.settings["abbreviation"] %> editor onboarding

    + +

    Hello there! you have been invited to our editorial board

    + +

    + To complete the process, please fill in your profile here: +
    + <%= link_to editor_onboardings_url(token: @onboarding_invitation.token), editor_onboardings_url(token: @onboarding_invitation.token)%> +
    + You will need to be logged in as a user with the email this invitation is sent to: <%= @onboarding_invitation.email %>. +

    + +Thanks!
    +The <%= Rails.application.settings['abbreviation'] %> editorial team. diff --git a/app/views/notifications/onboarding_invitation_email.text.erb b/app/views/notifications/onboarding_invitation_email.text.erb new file mode 100644 index 000000000..d486bda35 --- /dev/null +++ b/app/views/notifications/onboarding_invitation_email.text.erb @@ -0,0 +1,10 @@ +** <%= Rails.application.settings["abbreviation"] %> editor onboarding ** + +Hello there! you have been invited to our editorial board + +To complete the process, please fill in your profile here: +<%= editor_onboardings_url(token: @onboarding_invitation.token) %> +You will need to be logged in as a user with the email this invitation is sent to: <%= @onboarding_invitation.email %>. + +Thanks! +The <%= Rails.application.settings['abbreviation'] %> editorial team. diff --git a/config/environments/development.rb b/config/environments/development.rb index 53be62fb1..6daea8244 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -35,6 +35,7 @@ # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false + config.action_mailer.default_url_options = { host: "localhost", port: 3000 } # Don't send emails in development config.action_mailer.perform_deliveries = false diff --git a/config/environments/test.rb b/config/environments/test.rb index f3c943280..0b4bcdc40 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -41,6 +41,7 @@ # The :test delivery method accumulates sent emails in the # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test + config.action_mailer.default_url_options = { host: "test" } # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr From 8598ef4719eadc945782803cf44facae7325e385 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 8 Jun 2021 19:26:37 +0200 Subject: [PATCH 192/609] create onboarding invitations management for admin users --- app/controllers/onboardings_controller.rb | 44 +++++++++++++++ app/models/onboarding_invitation.rb | 14 ++++- app/views/aeic_dashboard/_menu.html.erb | 1 + app/views/onboardings/index.html.erb | 67 +++++++++++++++++++++++ config/routes.rb | 10 ++++ 5 files changed, 135 insertions(+), 1 deletion(-) create mode 100644 app/controllers/onboardings_controller.rb create mode 100644 app/views/onboardings/index.html.erb diff --git a/app/controllers/onboardings_controller.rb b/app/controllers/onboardings_controller.rb new file mode 100644 index 000000000..46385ea1c --- /dev/null +++ b/app/controllers/onboardings_controller.rb @@ -0,0 +1,44 @@ +class OnboardingsController < ApplicationController + before_action :require_user, only: [:editor] + before_action :require_admin_user, except: [:editor] + + def editor + end + + def index + @onboardings = OnboardingInvitation.all.order(last_sent_at: :desc) + end + + def create + onboarding = OnboardingInvitation.new(onboarding_invitation_params) + if onboarding.save + flash[:notice] = "Invitation to join the editorial team sent" + else + flash[:error] = onboarding.errors.full_messages.first + end + + redirect_to onboardings_path + end + + def resend_invitation + if onboarding = OnboardingInvitation.find(params[:id]) + onboarding.send_email + flash[:notice] = "Email sent again" + end + redirect_to onboardings_path + end + + def destroy + if onboarding = OnboardingInvitation.find(params[:id]) + onboarding.destroy! + flash[:notice] = "Onboarding invitation deleted" + end + redirect_to onboardings_path + end + + private + + def onboarding_invitation_params + params.require(:onboarding_invitation).permit(:email) + end +end diff --git a/app/models/onboarding_invitation.rb b/app/models/onboarding_invitation.rb index 9c5ff615c..9c9166bb2 100644 --- a/app/models/onboarding_invitation.rb +++ b/app/models/onboarding_invitation.rb @@ -1,12 +1,24 @@ class OnboardingInvitation < ApplicationRecord - validates :email, presence: true, uniqueness: true + validates :email, presence: true + validates_uniqueness_of :email, message: "already present in the list on sent invitations" validates :token, presence: true, uniqueness: true before_validation :set_token, on: :create + before_validation :strip_email + after_create :send_email + + def send_email + Notifications.onboarding_invitation_email(self).deliver_now + self.touch(:last_sent_at) + end private def set_token self.token ||= SecureRandom.hex(5) end + + def strip_email + self.email = self.email.strip + end end diff --git a/app/views/aeic_dashboard/_menu.html.erb b/app/views/aeic_dashboard/_menu.html.erb index 2c060fe27..2b023830d 100644 --- a/app/views/aeic_dashboard/_menu.html.erb +++ b/app/views/aeic_dashboard/_menu.html.erb @@ -3,5 +3,6 @@ <%= link_to "Submissions overview", aeic_dashboard_path, class: current_class?(aeic_dashboard_path) %> <%= link_to "Editors", editors_path, class: current_class?(editors_path) %> <%= link_to "Invitations", invitations_path, class: current_class?(invitations_path) %> + <%= link_to "Onboarding", onboardings_path, class: current_class?(onboardings_path) %> diff --git a/app/views/onboardings/index.html.erb b/app/views/onboardings/index.html.erb new file mode 100644 index 000000000..6865d9e27 --- /dev/null +++ b/app/views/onboardings/index.html.erb @@ -0,0 +1,67 @@ +
    +

    <%= notice %>

    +
    +
    Editors in Chief Dashboard
    +
    +
    + <%= image_tag "icon_papers.svg", height: "32px" %>

    Onboarding

    +
    +
    +
    +
    + +<%= render partial: "aeic_dashboard/menu" %> +
    + +
    +

    Invitations to join the editorial team

    + + <%= form_for(OnboardingInvitation.new, url: onboardings_path) do |f| %> +
    +
    +
    + <%= f.label :email, "Invite new editor" %> + <%= f.text_field :email, placeholder: "Email",class: "form-control" %> +
    +
    +
    +
    + <% end %> + + <% if @onboardings.empty? %> + There are no onboarding invitations to show + <% else %> +

    Editor invitations

    + + + + + + + + + + + + <%- @onboardings.each do |onboarding_invitation| %> + + + + + + + + <%- end %> + +
    EmailTokenSentActions
    <%= onboarding_invitation.email %><%= onboarding_invitation.token %>><%= time_ago_in_words(onboarding_invitation.last_sent_at) %> ago + <%= link_to("Delete", onboarding_path(onboarding_invitation), method: :delete, data: {confirm: "Are you sure you want to delete this invitation?" }) %> + + <%= link_to("Re-invite", resend_invitation_onboarding_path(onboarding_invitation), method: :post, data: {confirm: "This will re-send the invitation email" }) %> +
    + <% end %> +
    + +
    +

    Pending editors

    +
    +
    \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 5bd5f235a..f7e78584f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -24,6 +24,16 @@ end end + resources :onboardings, only: [:index, :create, :destroy] do + member do + post :resend_invitation + end + collection do + get :pending + get 'editor/:token', action: :editor, as: :editor + end + end + get '/aeic/', to: "aeic_dashboard#index", as: "aeic_dashboard" get '/editors/lookup/:login', to: "editors#lookup" get '/papers/lookup/:id', to: "papers#lookup" From 7f7b1f755ce74215b3cc0e083d7d5651e4dabf3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 8 Jun 2021 19:32:38 +0200 Subject: [PATCH 193/609] fix build --- app/models/onboarding_invitation.rb | 2 +- spec/models/onboarding_invitation_spec.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/onboarding_invitation.rb b/app/models/onboarding_invitation.rb index 9c9166bb2..4b1619bb0 100644 --- a/app/models/onboarding_invitation.rb +++ b/app/models/onboarding_invitation.rb @@ -19,6 +19,6 @@ def set_token end def strip_email - self.email = self.email.strip + self.email = self.email.strip if self.email end end diff --git a/spec/models/onboarding_invitation_spec.rb b/spec/models/onboarding_invitation_spec.rb index 6de587646..9fee2e655 100644 --- a/spec/models/onboarding_invitation_spec.rb +++ b/spec/models/onboarding_invitation_spec.rb @@ -9,7 +9,7 @@ expect(onboarding.errors.messages_for(:token)).to_not be_empty end - it "should have an unique email" do + it "should have a unique email" do onboarding_1 = create(:onboarding_invitation) onboarding_2 = OnboardingInvitation.new(email: onboarding_1.email) @@ -17,7 +17,7 @@ expect(onboarding_2.errors.messages_for(:email)).to_not be_empty end - it "should have an unique token" do + it "should have a unique token" do onboarding_1 = create(:onboarding_invitation) onboarding_2 = OnboardingInvitation.new(token: onboarding_1.token) From dd5ad392197684d57f74fa35832b8a5db72e2d8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 8 Jun 2021 20:29:51 +0200 Subject: [PATCH 194/609] add model specs --- app/models/onboarding_invitation.rb | 2 +- spec/models/onboarding_invitation_spec.rb | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/app/models/onboarding_invitation.rb b/app/models/onboarding_invitation.rb index 4b1619bb0..481275176 100644 --- a/app/models/onboarding_invitation.rb +++ b/app/models/onboarding_invitation.rb @@ -1,6 +1,6 @@ class OnboardingInvitation < ApplicationRecord validates :email, presence: true - validates_uniqueness_of :email, message: "already present in the list on sent invitations" + validates_uniqueness_of :email, message: "is already present in the list on sent invitations" validates :token, presence: true, uniqueness: true before_validation :set_token, on: :create diff --git a/spec/models/onboarding_invitation_spec.rb b/spec/models/onboarding_invitation_spec.rb index 9fee2e655..55e5dd30d 100644 --- a/spec/models/onboarding_invitation_spec.rb +++ b/spec/models/onboarding_invitation_spec.rb @@ -30,4 +30,26 @@ onboarding.save! expect(onboarding.reload.token).to be_present end + + it "should strip email before saving" do + onboarding = OnboardingInvitation.new(email: " user@editors.org \n") + onboarding.save! + expect(onboarding.reload.email).to eq("user@editors.org") + end + + it "should send email after creation" do + expect { create(:onboarding_invitation) }.to change { ActionMailer::Base.deliveries.count }.by(1) + end + + describe "#send_email" do + it "should deliver email with onboarding invitation link" do + onboarding = create(:onboarding_invitation) + expect { onboarding.send_email }.to change { ActionMailer::Base.deliveries.count }.by(1) + email = ActionMailer::Base.deliveries.last + expect(email.to).to eq([onboarding.email]) + [email.text_part.body.to_s, email.html_part.body.to_s].each do |body| + expect(body).to match "http://test/onboardings/editor/#{onboarding.token}" + end + end + end end From e402bcc4e1c1494f12e1b3f85d8002398db5bb1e Mon Sep 17 00:00:00 2001 From: Mark Jensen Date: Tue, 8 Jun 2021 22:06:29 -0400 Subject: [PATCH 195/609] Update whedon.md editor-in-chiefs -> editors-in-chief --- docs/whedon.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/whedon.md b/docs/whedon.md index e2f978c2e..c73e787e5 100644 --- a/docs/whedon.md +++ b/docs/whedon.md @@ -247,5 +247,5 @@ If everything looks good with the draft proofs from the `@whedon accept` command ``` ```eval_rst -.. note:: This command is only available to the JOSS editor-in-chief, or associate editor-in-chiefs. +.. note:: This command is only available to the JOSS editor-in-chief, or associate editors-in-chief. ``` From 873985542346ab4087a729aa4c617dc0effe052d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 9 Jun 2021 10:32:29 +0200 Subject: [PATCH 196/609] add name to onboarding invitations --- app/controllers/onboardings_controller.rb | 2 +- app/views/onboardings/index.html.erb | 17 +++++++++++++---- ...10607093405_create_onboarding_invitations.rb | 4 ++++ db/schema.rb | 3 +++ 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/app/controllers/onboardings_controller.rb b/app/controllers/onboardings_controller.rb index 46385ea1c..15c11d5fe 100644 --- a/app/controllers/onboardings_controller.rb +++ b/app/controllers/onboardings_controller.rb @@ -39,6 +39,6 @@ def destroy private def onboarding_invitation_params - params.require(:onboarding_invitation).permit(:email) + params.require(:onboarding_invitation).permit(:email, :name) end end diff --git a/app/views/onboardings/index.html.erb b/app/views/onboardings/index.html.erb index 6865d9e27..b50f1860e 100644 --- a/app/views/onboardings/index.html.erb +++ b/app/views/onboardings/index.html.erb @@ -20,22 +20,30 @@
    - <%= f.label :email, "Invite new editor" %> - <%= f.text_field :email, placeholder: "Email",class: "form-control" %> + <%= f.label :email, "New editor's email address" %> + <%= f.email_field :email, placeholder: "Email",class: "form-control" %> +
    +
    + <%= f.label :name, "Name (optional)" %> + <%= f.text_field :name, placeholder: "New editor's name",class: "form-control" %>
    -
    + +
    + <%= submit_tag("Invite", class: "btn action-btn") %> +
    <% end %> <% if @onboardings.empty? %> There are no onboarding invitations to show <% else %>

    Editor invitations

    - +
    + @@ -46,6 +54,7 @@ <%- @onboardings.each do |onboarding_invitation| %> + - <%- Editor.active.order('last_name ASC').each do |editor| %> + <%- @active_editors.each do |editor| %> - <%- Editor.emeritus.order('last_name ASC').each do |editor| %> + <%- @emeritus_editors.each do |editor| %> <%- end %> diff --git a/config/routes.rb b/config/routes.rb index e6831b833..f0fbe8944 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -33,6 +33,7 @@ get 'editor/:token', action: :editor, as: :editor post :add_editor post :accept_editor + post :invite_to_editors_team end end diff --git a/lib/repository.rb b/lib/repository.rb index f84854bea..80201353a 100644 --- a/lib/repository.rb +++ b/lib/repository.rb @@ -17,4 +17,24 @@ def self.editors GITHUB.team_members(config[nwo]["editor_team_id"]).collect { |e| "@#{e.login}" }.sort end end + + def self.invite_to_editors_team(editor_handle) + invitee_id = begin + Octokit.user(editor_handle).id + rescue Octokit::NotFound + nil + end + + if invitee_id.present? + org = Rails.application.settings["reviews"].split("/").first + url = "https://api.github.com/orgs/#{org}/invitations" + headers = {"Authorization" => "token #{ENV['GH_TOKEN']}", "Content-Type" => "application/json", "Accept" => "application/vnd.github.v3+json"} + parameters = {invitee_id: invitee_id, team_ids: [config[nwo]["editor_team_id"]]} + + response = Faraday.post(url, parameters.to_json, headers) + response.status.between?(200, 299) + else + false + end + end end diff --git a/spec/system/editors/list_spec.rb b/spec/system/editors/list_spec.rb index 8ccd36d1e..8781e20ad 100644 --- a/spec/system/editors/list_spec.rb +++ b/spec/system/editors/list_spec.rb @@ -44,7 +44,7 @@ expect(page).to have_content('Computing, Test systems') expect(page).to have_content('Software testing editor') expect(page).to have_content('topic') - click_link 'List' + click_link "List" expect(current_path).to eq(editors_path) end @@ -53,7 +53,7 @@ click_link "Edit", href: edit_editor_path(Editor.find_by(login: 'tester')) fill_in :editor_category_list, with: "Fancy" click_on "Update Editor" - click_link 'List' + click_link "List" expect(current_path).to eq(editors_path) expect(page).to have_content('Fancy') end diff --git a/spec/system/onboarding_spec.rb b/spec/system/onboarding_spec.rb index 00a94e7f4..c34c70789 100644 --- a/spec/system/onboarding_spec.rb +++ b/spec/system/onboarding_spec.rb @@ -99,6 +99,7 @@ before do login_as(admin) + allow(Repository).to receive(:editors).and_return([""]) end scenario "List pending editors" do @@ -121,7 +122,7 @@ click_link "Approve" end - expect(page).to have_content("Laura Edits (lauraedits33) accepted as topic editor!") + expect(page).to have_content("Laura Edits (@lauraedits33) accepted as topic editor!") expect(page).to_not have_css("#pending-editors") create(:pending_editor) @@ -133,6 +134,61 @@ visit editors_path expect(page).to have_content("lauraedits33") end + + scenario "Update editor's info" do + user = create(:user, editor: pending_editor) + visit onboardings_path + within("#pending-editors") do + expect(page).to have_content("Laura Edits") + click_link "lauraedits33" + end + expect(page).to have_content("Laura Edits") + click_link "Edit" + fill_in :editor_first_name, with: "Lauren" + click_on "Update Editor" + click_link "List of pending editors" + expect(current_path).to eq(onboardings_path) + within("#pending-editors") do + expect(page).to_not have_content("Laura Edits") + expect(page).to have_content("Lauren Edits") + end + end + + scenario "Invite to GH editors team" do + user = create(:user, editor: pending_editor) + onboarding = create(:onboarding_invitation, email: pending_editor.email) + onboarding.accepted!(pending_editor) + + visit onboardings_path + + expect(onboarding.invited_to_team_at).to be_blank + expect(Repository).to receive(:invite_to_editors_team).with("lauraedits33").and_return(true) + within("#pending-editors") do + expect(page).to have_content("Information registered. Ready to be invited to GitHub team") + click_link "Send invitation to join GitHub team" + end + + expect(onboarding.reload.invited_to_team_at).to be_present + expect(page).to have_content("@lauraedits33 invited to GitHub Open Journals' editors team") + + expect(Repository).to receive(:invite_to_editors_team).with("lauraedits33").and_return(true) + within("#pending-editors") do + expect(page).to have_content("Invitation to join organization sent. Pending acceptance.") + click_link "Re-send invitation to join GitHub organization" + end + + expect(page).to have_content("@lauraedits33 invited to GitHub Open Journals' editors team") + end + + scenario "Pending editors already in the GH editors team are detected" do + user = create(:user, editor: pending_editor) + expect(Repository).to receive(:editors).and_return(["@lauraedits33"]) + visit onboardings_path + + within("#pending-editors") do + expect(page).to have_content("Joined GitHub organization and editors team!") + end + end end feature "Invitations acceptance" do From 50b9e99c0669812edb77304002ac1f7945a3fb74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 17 Jun 2021 11:33:27 +0200 Subject: [PATCH 209/609] add spec for .invite_to_editors_team method --- spec/lib/repository_spec.rb | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/spec/lib/repository_spec.rb b/spec/lib/repository_spec.rb index 192a2878f..5cd7ad889 100644 --- a/spec/lib/repository_spec.rb +++ b/spec/lib/repository_spec.rb @@ -45,4 +45,31 @@ Repository.editors end end + + describe ".invite_to_editors_team" do + it "returns false if GitHub user does not exist" do + expect(Octokit).to receive(:user).and_raise(Octokit::NotFound) + expect(Repository.invite_to_editors_team("unexistent_user")).to be false + end + + it "returns false invitation is not created" do + expect(Octokit).to receive(:user).and_return(OpenStruct.new(id: 33)) + expected_url = "https://api.github.com/orgs/openjournals/invitations" + expected_params = {invitee_id: 33, team_ids: [1234]} + exheaders = {"Authorization" => "token ", "Content-Type" => "application/json", "Accept" => "application/vnd.github.v3+json"} + expect(Faraday).to receive(:post).with(expected_url, expected_params.to_json, exheaders).and_return(OpenStruct.new(status: 404)) + + expect(Repository.invite_to_editors_team("unexistent_user")).to be false + end + + it "returns true if invitation is created" do + expect(Octokit).to receive(:user).and_return(OpenStruct.new(id: 42)) + expected_url = "https://api.github.com/orgs/openjournals/invitations" + expected_params = {invitee_id: 42, team_ids: [1234]} + exheaders = {"Authorization" => "token ", "Content-Type" => "application/json", "Accept" => "application/vnd.github.v3+json"} + expect(Faraday).to receive(:post).with(expected_url, expected_params.to_json, exheaders).and_return(OpenStruct.new(status: 200)) + + expect(Repository.invite_to_editors_team("unexistent_user")).to be true + end + end end From 74040a9c10756034d9910afe166c962af5818e70 Mon Sep 17 00:00:00 2001 From: "Daniel S. Katz" Date: Fri, 18 Jun 2021 07:35:07 -0500 Subject: [PATCH 210/609] language fixes for submitting docs as pointed out by @eberharf in https://github.com/openjournals/joss/issues/946 --- docs/submitting.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/submitting.md b/docs/submitting.md index 9f2857c25..b9181184a 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -6,10 +6,10 @@ But please read these instructions carefully for a streamlined submission. ## Submission requirements -- The software should be open source as per the [OSI definition](https://opensource.org/osd). -- The software should have an **obvious** research application. -- You should be a major contributor to the software you are submitting. -- Your paper should not focus on new research results accomplished with the software. +- The software must be open source as per the [OSI definition](https://opensource.org/osd). +- The software must have an **obvious** research application. +- You must be a major contributor to the software you are submitting. +- Your paper must not focus on new research results accomplished with the software. - Your paper (`paper.md` and BibTeX files, plus any figures) must be hosted in a Git-based repository together with your software (although they may be in a short-lived branch which is never merged with the default). In addition, the software associated with your submission must: From e045466fb87318d9829b51d6186cc26c4ec22706 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 21 Jun 2021 11:38:17 +0100 Subject: [PATCH 211/609] Update editor.html.erb --- app/views/onboardings/editor.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/onboardings/editor.html.erb b/app/views/onboardings/editor.html.erb index 51c5e203b..570930f5d 100644 --- a/app/views/onboardings/editor.html.erb +++ b/app/views/onboardings/editor.html.erb @@ -1,7 +1,7 @@
    -

    Please complete your editor info:

    +

    Please complete your editor information

    @@ -57,4 +57,4 @@
    -
    \ No newline at end of file +
    From 4187f11f1b5041771d97314904fb68e719f695d8 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 21 Jun 2021 11:43:01 +0100 Subject: [PATCH 212/609] Update onboarding_spec.rb --- spec/system/onboarding_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/system/onboarding_spec.rb b/spec/system/onboarding_spec.rb index c34c70789..9c3968a1e 100644 --- a/spec/system/onboarding_spec.rb +++ b/spec/system/onboarding_spec.rb @@ -214,7 +214,7 @@ scenario "User can access they own invitations" do visit editor_onboardings_path(onboarding_invitation.token) - expect(page).to have_content("Please complete your editor info:") + expect(page).to have_content("Please complete your editor information") end scenario "Accepting invitations create a pending editor" do @@ -259,4 +259,4 @@ end end end -end \ No newline at end of file +end From d2dbbff900e7488abe3da94f0bef35bb904611ea Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 21 Jun 2021 12:03:38 +0100 Subject: [PATCH 213/609] Adding config --- app/mailers/notifications.rb | 2 +- config/environments/production.rb | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/mailers/notifications.rb b/app/mailers/notifications.rb index ba60ec1ba..258ce1079 100644 --- a/app/mailers/notifications.rb +++ b/app/mailers/notifications.rb @@ -34,6 +34,6 @@ def editor_scope_email(editor, issues) def onboarding_invitation_email(onboarding_invitation) @onboarding_invitation = onboarding_invitation - mail(to: onboarding_invitation.email,subject: "Invitation to join the #{Rails.application.settings["abbreviation"]} editorial board") + mail(to: onboarding_invitation.email, subject: "Invitation to join the #{Rails.application.settings["abbreviation"]} editorial board") end end diff --git a/config/environments/production.rb b/config/environments/production.rb index f40511011..358f939c5 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -65,6 +65,9 @@ config.action_mailer.perform_caching = false + config.action_mailer.default_url_options = { :host => "https://joss.theoj.org" } + + # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. # config.action_mailer.raise_delivery_errors = false From 6f6d00bce9153fec7f020f6071ec1404561243ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 22 Jun 2021 12:46:22 +0200 Subject: [PATCH 214/609] mention in docs admin privileges are needed --- docs/installing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installing.md b/docs/installing.md index 95333526a..2dd8d3dd7 100644 --- a/docs/installing.md +++ b/docs/installing.md @@ -32,7 +32,7 @@ We also recommend you gather the following information before deploying your application to Heroku: 1. A [public ORCID API](https://members.orcid.org/api/about-public-api) key -1. A GitHub [Personal Access Token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token) for the automated account that users will interact with (e.g., `@Whedon`, `@RoboNeuro`) +1. A GitHub [Personal Access Token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token) for the automated account that users will interact with (e.g., `@Whedon`, `@RoboNeuro`). In order to be able to send invitations to reviewers and collaborators, the automated GitHub account must be an admin of the organization the reviews take place at. And the Personal Access Token should include the `admin:org` scope. 1. An email address registered on a domain you control (i.e., not `gmail` or a related service) ```eval_rst From 0920d7483f4f891d0dd33af2a758cb41104bdb41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 22 Jun 2021 12:47:25 +0200 Subject: [PATCH 215/609] use GITHUB object --- lib/repository.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/repository.rb b/lib/repository.rb index 80201353a..ee9e8f8ba 100644 --- a/lib/repository.rb +++ b/lib/repository.rb @@ -28,7 +28,7 @@ def self.invite_to_editors_team(editor_handle) if invitee_id.present? org = Rails.application.settings["reviews"].split("/").first url = "https://api.github.com/orgs/#{org}/invitations" - headers = {"Authorization" => "token #{ENV['GH_TOKEN']}", "Content-Type" => "application/json", "Accept" => "application/vnd.github.v3+json"} + headers = {"Authorization" => "token #{GITHUB.access_token}", "Content-Type" => "application/json", "Accept" => "application/vnd.github.v3+json"} parameters = {invitee_id: invitee_id, team_ids: [config[nwo]["editor_team_id"]]} response = Faraday.post(url, parameters.to_json, headers) From 4fc5ead78f7699e9f885f1337f1e5aaeed2d736f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 24 Jun 2021 10:55:00 +0200 Subject: [PATCH 216/609] add fields to the editor registration --- app/controllers/onboardings_controller.rb | 4 ++-- app/models/editor.rb | 1 + app/views/onboardings/editor.html.erb | 19 +++++++++++++++++++ spec/system/onboarding_spec.rb | 9 +++++++-- 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/app/controllers/onboardings_controller.rb b/app/controllers/onboardings_controller.rb index 3c785bbb3..58ef30ece 100644 --- a/app/controllers/onboardings_controller.rb +++ b/app/controllers/onboardings_controller.rb @@ -13,7 +13,7 @@ def add_editor flash[:notice] = "Thanks! An editor in chief will review your info soon" redirect_to root_path else - flash[:error] = "Error saving your data: All fields are mandatory" + flash[:error] = "Error saving your data: Name, Email and GitHub username are mandatory" redirect_to editor_onboardings_path(@onboarding.token) end end @@ -91,6 +91,6 @@ def onboarding_invitation_params end def new_editor_params - params.require(:editor).permit(:first_name, :last_name, :login, :email).merge(kind: "pending") + params.require(:editor).permit(:first_name, :last_name, :login, :email, :category_list, :url, :description).merge(kind: "pending") end end diff --git a/app/models/editor.rb b/app/models/editor.rb index 3806f7873..c82b02200 100644 --- a/app/models/editor.rb +++ b/app/models/editor.rb @@ -2,6 +2,7 @@ class Editor < ApplicationRecord validates :kind, presence: true, inclusion: { in: ["board", "topic", "emeritus", "pending"] } validates :first_name, presence: true validates :last_name, presence: true + validates :email, presence: true, unless: Proc.new { |editor| editor.kind == "emeritus" } validates :login, presence: true, unless: Proc.new { |editor| editor.kind == "emeritus" } belongs_to :user, optional: true diff --git a/app/views/onboardings/editor.html.erb b/app/views/onboardings/editor.html.erb index 570930f5d..0b19e0780 100644 --- a/app/views/onboardings/editor.html.erb +++ b/app/views/onboardings/editor.html.erb @@ -48,6 +48,25 @@ +
    +
    +
    + <%= f.label :url %> + <%= f.text_field :url, class: "form-control" %> +
    + +
    + <%= f.label :category_list, "Categories (comma and space separated: item1, item2, item3)".html_safe %> + <%= f.text_field :category_list, class: "form-control" %> +
    +
    +
    + +
    + <%= f.label :description %> + <%= f.text_area :description, rows: 4, class: "form-control" %> +
    +
    <%= hidden_field_tag "token", @onboarding.token %> <%= f.submit "Save editor data", class: "btn action-btn" %> diff --git a/spec/system/onboarding_spec.rb b/spec/system/onboarding_spec.rb index 9c3968a1e..0f813f6ea 100644 --- a/spec/system/onboarding_spec.rb +++ b/spec/system/onboarding_spec.rb @@ -223,6 +223,9 @@ fill_in :editor_last_name, with: "Tor" fill_in :editor_email, with: "edi@tor.com" fill_in :editor_login, with: "@test_editor" + fill_in :editor_url, with: "https://joss.theoj.org" + fill_in :editor_category_list, with: "bioinformatics, open science" + fill_in :editor_description, with: "I'm a great person" click_on "Save editor data" expect(page).to have_content("Thanks! An editor in chief will review your info soon") @@ -236,12 +239,14 @@ visit editor_onboardings_path(onboarding_invitation.token) fill_in :editor_first_name, with: "UpdatedName" + fill_in :editor_category_list, with: "astrophysics, galaxies" click_on "Save editor data" expect(user.editor.reload.first_name).to eq("UpdatedName") + expect(user.editor.categories).to eq(["astrophysics", "galaxies"]) end - scenario "All fields are mandatory" do + scenario "Name, Email and GitHub username are mandatory" do data = { editor_first_name: "Eddie", editor_last_name: "Tor", editor_email: "edi@tor.com", @@ -255,7 +260,7 @@ end click_on "Save editor data" - expect(page).to have_content("Error saving your data: All fields are mandatory") + expect(page).to have_content("Error saving your data: Name, Email and GitHub username are mandatory") end end end From c9f7c7eebbeb3bc8c0976a276364c5ee3122d45c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Sat, 26 Jun 2021 11:20:48 +0200 Subject: [PATCH 217/609] rails up --- Gemfile | 2 +- Gemfile.lock | 124 +++++++++++++++++++++++++-------------------------- 2 files changed, 63 insertions(+), 63 deletions(-) diff --git a/Gemfile b/Gemfile index ac6642dd4..7e9513894 100644 --- a/Gemfile +++ b/Gemfile @@ -20,7 +20,7 @@ gem 'pg', '~> 1.2.3' # once this bug is fixed and Rails 6.1 is supported: # https://github.com/mislav/will_paginate/pull/619 gem 'will_paginate', git: "https://github.com/kvokka/will_paginate", branch: "fix-page_entries_info" -gem 'rails', '6.1.3.2' +gem 'rails', '6.1.4' gem 'responders' gem 'newrelic_rpm' gem 'sanitize', '~> 5.2.3' diff --git a/Gemfile.lock b/Gemfile.lock index 61833d861..19a70a7e3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,40 +11,40 @@ GEM Ascii85 (1.1.0) aasm (5.0.8) concurrent-ruby (~> 1.0) - actioncable (6.1.3.2) - actionpack (= 6.1.3.2) - activesupport (= 6.1.3.2) + actioncable (6.1.4) + actionpack (= 6.1.4) + activesupport (= 6.1.4) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.3.2) - actionpack (= 6.1.3.2) - activejob (= 6.1.3.2) - activerecord (= 6.1.3.2) - activestorage (= 6.1.3.2) - activesupport (= 6.1.3.2) + actionmailbox (6.1.4) + actionpack (= 6.1.4) + activejob (= 6.1.4) + activerecord (= 6.1.4) + activestorage (= 6.1.4) + activesupport (= 6.1.4) mail (>= 2.7.1) - actionmailer (6.1.3.2) - actionpack (= 6.1.3.2) - actionview (= 6.1.3.2) - activejob (= 6.1.3.2) - activesupport (= 6.1.3.2) + actionmailer (6.1.4) + actionpack (= 6.1.4) + actionview (= 6.1.4) + activejob (= 6.1.4) + activesupport (= 6.1.4) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.3.2) - actionview (= 6.1.3.2) - activesupport (= 6.1.3.2) + actionpack (6.1.4) + actionview (= 6.1.4) + activesupport (= 6.1.4) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.3.2) - actionpack (= 6.1.3.2) - activerecord (= 6.1.3.2) - activestorage (= 6.1.3.2) - activesupport (= 6.1.3.2) + actiontext (6.1.4) + actionpack (= 6.1.4) + activerecord (= 6.1.4) + activestorage (= 6.1.4) + activesupport (= 6.1.4) nokogiri (>= 1.8.5) - actionview (6.1.3.2) - activesupport (= 6.1.3.2) + actionview (6.1.4) + activesupport (= 6.1.4) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -52,22 +52,22 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (6.1.3.2) - activesupport (= 6.1.3.2) + activejob (6.1.4) + activesupport (= 6.1.4) globalid (>= 0.3.6) - activemodel (6.1.3.2) - activesupport (= 6.1.3.2) - activerecord (6.1.3.2) - activemodel (= 6.1.3.2) - activesupport (= 6.1.3.2) - activestorage (6.1.3.2) - actionpack (= 6.1.3.2) - activejob (= 6.1.3.2) - activerecord (= 6.1.3.2) - activesupport (= 6.1.3.2) + activemodel (6.1.4) + activesupport (= 6.1.4) + activerecord (6.1.4) + activemodel (= 6.1.4) + activesupport (= 6.1.4) + activestorage (6.1.4) + actionpack (= 6.1.4) + activejob (= 6.1.4) + activerecord (= 6.1.4) + activesupport (= 6.1.4) marcel (~> 1.0.0) - mini_mime (~> 1.0.2) - activesupport (6.1.3.2) + mini_mime (>= 1.1.0) + activesupport (6.1.4) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -107,7 +107,7 @@ GEM coffee-script-source (1.12.2) commonmarker (0.21.2) ruby-enum (~> 0.5) - concurrent-ruby (1.1.8) + concurrent-ruby (1.1.9) crack (0.4.5) rexml crass (1.0.6) @@ -211,7 +211,7 @@ GEM listen (3.5.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.9.1) + loofah (2.10.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) lumberjack (1.2.8) @@ -220,8 +220,8 @@ GEM marcel (1.0.1) memoist (0.16.2) method_source (1.0.0) - mini_mime (1.0.3) - mini_portile2 (2.5.1) + mini_mime (1.1.0) + mini_portile2 (2.5.3) minitest (5.14.4) msgpack (1.4.2) multi_json (1.15.0) @@ -230,7 +230,7 @@ GEM nenv (0.3.0) newrelic_rpm (7.0.0) nio4r (2.5.7) - nokogiri (1.11.5) + nokogiri (1.11.7) mini_portile2 (~> 2.5.0) racc (~> 1.4) nokogumbo (2.0.5) @@ -289,20 +289,20 @@ GEM rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.1.3.2) - actioncable (= 6.1.3.2) - actionmailbox (= 6.1.3.2) - actionmailer (= 6.1.3.2) - actionpack (= 6.1.3.2) - actiontext (= 6.1.3.2) - actionview (= 6.1.3.2) - activejob (= 6.1.3.2) - activemodel (= 6.1.3.2) - activerecord (= 6.1.3.2) - activestorage (= 6.1.3.2) - activesupport (= 6.1.3.2) + rails (6.1.4) + actioncable (= 6.1.4) + actionmailbox (= 6.1.4) + actionmailer (= 6.1.4) + actionpack (= 6.1.4) + actiontext (= 6.1.4) + actionview (= 6.1.4) + activejob (= 6.1.4) + activemodel (= 6.1.4) + activerecord (= 6.1.4) + activestorage (= 6.1.4) + activesupport (= 6.1.4) bundler (>= 1.15.0) - railties (= 6.1.3.2) + railties (= 6.1.4) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -313,11 +313,11 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.3.0) loofah (~> 2.3) - railties (6.1.3.2) - actionpack (= 6.1.3.2) - activesupport (= 6.1.3.2) + railties (6.1.4) + actionpack (= 6.1.4) + activesupport (= 6.1.4) method_source - rake (>= 0.8.7) + rake (>= 0.13) thor (~> 1.0) raindrops (0.19.1) rake (13.0.3) @@ -420,7 +420,7 @@ GEM crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) webrick (1.7.0) - websocket-driver (0.7.3) + websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) @@ -458,7 +458,7 @@ DEPENDENCIES pg (~> 1.2.3) pry-byebug rack-livereload - rails (= 6.1.3.2) + rails (= 6.1.4) rails-controller-testing (~> 1.0.5) responders rspec-rails (~> 5.0.0) From 14f153ec6e80ca19ba9a8de93948a7a9513edddf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Sat, 26 Jun 2021 11:32:52 +0200 Subject: [PATCH 218/609] use default will_paginate gem pagination links fixed by Rails 6.1.4 --- Gemfile | 5 +---- Gemfile.lock | 10 ++-------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/Gemfile b/Gemfile index 7e9513894..d8489e76e 100644 --- a/Gemfile +++ b/Gemfile @@ -16,10 +16,7 @@ gem 'omniauth-rails_csrf_protection' gem 'octokit', '~> 4.20' gem 'pdf-reader', '~> 2.4.2' gem 'pg', '~> 1.2.3' -# TODO: Remove git reference and revert to latest release -# once this bug is fixed and Rails 6.1 is supported: -# https://github.com/mislav/will_paginate/pull/619 -gem 'will_paginate', git: "https://github.com/kvokka/will_paginate", branch: "fix-page_entries_info" +gem 'will_paginate', '~> 3.3.0' gem 'rails', '6.1.4' gem 'responders' gem 'newrelic_rpm' diff --git a/Gemfile.lock b/Gemfile.lock index 19a70a7e3..c390251b7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,10 +1,3 @@ -GIT - remote: https://github.com/kvokka/will_paginate - revision: ae8f84106c71f270827ee86165f79d5681cd98bb - branch: fix-page_entries_info - specs: - will_paginate (3.3.0) - GEM remote: https://rubygems.org/ specs: @@ -423,6 +416,7 @@ GEM websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) + will_paginate (3.3.0) xpath (3.2.0) nokogiri (~> 1.8) zeitwerk (2.4.2) @@ -473,7 +467,7 @@ DEPENDENCIES vcr (~> 6.0, >= 6.0.0) web-console (~> 4.1.0) webmock - will_paginate! + will_paginate (~> 3.3.0) RUBY VERSION ruby 3.0.0p0 From bc3aaf680cc2ab958f388e2218e359b2b5bdd713 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 5 Jul 2021 21:14:09 +0200 Subject: [PATCH 219/609] remove webhook parsing code --- Gemfile | 1 + Gemfile.lock | 5 + app/controllers/dispatch_controller.rb | 40 +-- app/helpers/dispatch_helper.rb | 261 +++++------------- config/routes.rb | 2 +- spec/controllers/dispatch_controller_spec.rb | 47 ++-- .../should_update_the_last_activity_field.yml | 0 .../should_update_the_last_edits_key.yml | 0 ...ould_update_the_percent_complete_value.yml | 0 spec/fixtures/whedon-pre-review-comment.json | 4 +- 10 files changed, 117 insertions(+), 243 deletions(-) rename spec/fixtures/cassettes/DispatchController/{POST_github_recevier_for_REVIEW => POST_github_receiver_for_REVIEW}/should_update_the_last_activity_field.yml (100%) rename spec/fixtures/cassettes/DispatchController/{POST_github_recevier_for_REVIEW => POST_github_receiver_for_REVIEW}/should_update_the_last_edits_key.yml (100%) rename spec/fixtures/cassettes/DispatchController/{POST_github_recevier_for_REVIEW => POST_github_receiver_for_REVIEW}/should_update_the_percent_complete_value.yml (100%) diff --git a/Gemfile b/Gemfile index e1de1110e..3c20a706a 100644 --- a/Gemfile +++ b/Gemfile @@ -26,6 +26,7 @@ gem 'searchkick' gem 'uglifier', '4.2.0' gem 'coffee-rails', '~> 5.0.0' gem 'jbuilder', '~> 2.7' +gem 'issue' gem 'active_link_to' diff --git a/Gemfile.lock b/Gemfile.lock index 7ca936fb8..4bdfc63bd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -197,6 +197,9 @@ GEM httpclient (2.8.3) i18n (1.8.10) concurrent-ruby (~> 1.0) + issue (0.1.0) + openssl + rack jbuilder (2.11.2) activesupport (>= 5.0.0) jquery-rails (4.4.0) @@ -262,6 +265,7 @@ GEM omniauth-rails_csrf_protection (1.0.0) actionpack (>= 4.2) omniauth (~> 2.0) + openssl (2.2.0) os (1.1.1) pdf-reader (2.4.2) Ascii85 (~> 1.0) @@ -445,6 +449,7 @@ DEPENDENCIES guard-livereload honeybadger (~> 4.7.2) html-pipeline (~> 2.14.0) + issue jbuilder (~> 2.7) jquery-rails (~> 4.4.0) newrelic_rpm diff --git a/app/controllers/dispatch_controller.rb b/app/controllers/dispatch_controller.rb index 62e86074b..e84cf5267 100644 --- a/app/controllers/dispatch_controller.rb +++ b/app/controllers/dispatch_controller.rb @@ -1,4 +1,5 @@ require 'base64' +require 'issue' class DispatchController < ApplicationController include DispatchHelper @@ -9,41 +10,20 @@ class DispatchController < ApplicationController :api_start_review, :api_withdraw ] respond_to :json - def github_recevier - payload_body = request.body.read + def github_receiver + webhook = Issue::Webhook.new(secret_token: ENV["GH_SECRET"], + origin: Rails.application.settings["reviews"], + accept_events: ["issues", "issue_comment"]) + payload, error = webhook.parse_request(request) - unless verify_signature(payload_body) - head :unprocessable_entity and return - end - - payload = JSON.parse(payload_body) - - if valid_webhook(payload) - handle(payload) - head 200 + if webhook.errored? + head error.status, msg: error.message else - head :unprocessable_entity - end - end - - def verify_signature(payload_body) - signature = 'sha1=' + OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha1'), ENV['GH_SECRET'], payload_body) - return Rack::Utils.secure_compare(signature, request.env['HTTP_X_HUB_SIGNATURE']) - end - - def valid_webhook(payload) - if payload['issue'].nil? - return false - else - return false unless origin_correct?(payload) - return true + parse_payload!(payload) + head 200 end end - def origin_correct?(payload) - payload['repository']['full_name'] == Rails.application.settings["reviews"] - end - def api_assign_editor if params[:secret] == ENV['WHEDON_SECRET'] paper = Paper.find_by_meta_review_issue_id(params[:id]) diff --git a/app/helpers/dispatch_helper.rb b/app/helpers/dispatch_helper.rb index b63327c3e..04998a1d4 100644 --- a/app/helpers/dispatch_helper.rb +++ b/app/helpers/dispatch_helper.rb @@ -1,202 +1,89 @@ module DispatchHelper - def handle(payload) - parser = PayloadParser.new(payload) - - # Exit early if the paper doesn't exist - return false unless parser.paper - - parser.parse_payload! + def initial_activities + { + 'issues' => { + 'commenters' => { + 'pre-review' => {}, + 'review' => {} + }, + 'comments' => [], + 'last_edits' => {}, + 'last_comments' => {} + } + } end - class PayloadParser - attr_accessor :payload - attr_accessor :issue_number - attr_accessor :action - - def initialize(payload) - @payload = payload - @issue_number = payload['issue']['number'] - @action = payload['action'] - - initialize_activities if (paper && paper.activities.empty?) - end - - def paper - @paper ||= Paper.where('review_issue_id = ? OR meta_review_issue_id = ?', - issue_number, - issue_number).first - end - - def sender - payload['sender']['login'] - end - - def title - payload['issue']['title'] - end - - def labels - payload['issue']['labels'] - end - - def comment_body - payload['comment']['body'] - end - - def commented_at - payload['comment']['created_at'] - end - - def comment_url - payload['comment']['html_url'] - end - - def pre_review? - title.match(/^\[PRE REVIEW\]:/) - end - - # Has the review issue just been opened? If so, don't do anything. - def opened? - action == 'opened' || action == 'reopened' - end - - # Has the review issue just been closed? If so, don't do anything. - def closed? - action == 'closed' - end - - def commented? - action == 'created' - end - - def edited? - action == 'edited' - end - - def locked? - action == 'locked' - end - - def unlocked? - action == 'unlocked' - end - - def pinned? - action == 'pinned' || action == "unpinned" - end + def parse_payload!(payload) + return if payload.context.raw_payload.dig('issue').nil? - def assigned? - action == 'assigned' || action == 'unassigned' - end + @context = payload.context + @paper = Paper.where('review_issue_id = ? OR meta_review_issue_id = ?', @context.issue_id, @context.issue_id).first + return false unless @paper + @paper.activities = initial_activities if @paper.activities.empty? - def labeled? - action == 'labeled' || action == 'unlabeled' + if payload.edited? + process_edit + elsif payload.labeled? + process_labeling + elsif payload.commented? + process_comment + else + @paper.save end + end - def initialize_activities - activities = { - 'issues' => { - 'commenters' => { - 'pre-review' => {}, - 'review' => {} - }, - 'comments' => [], - 'last_edits' => {}, - 'last_comments' => {} - } - } - - paper.activities = activities - paper.save - end - - # Parse the incoming payload and do something with it... - def parse_payload! - return if assigned? - return if opened? - return if closed? - return if locked? - return if pinned? - return if unlocked? - - if edited? - if issues.has_key?('last_edits') - issues['last_edits'][sender] = payload['issue']['updated_at'] - else - issues['last_edits'] = {} - issues['last_edits'][sender] = payload['issue']['updated_at'] - end - - paper.percent_complete = paper.fraction_check_boxes_complete - paper.last_activity = payload['issue']['updated_at'] - paper.save and return - end - - # Parse the labels and update papers with the new labels. - if labeled? - new_labels = Hash.new - labels.each do |label| - new_labels.merge!(label['name'] => label['color']) - end - - paper.labels = new_labels - paper.save and return - end - - # New addition to keep track of the last comments by each - # person on the thread. - if commented? - if issues.has_key?('last_comments') - issues['last_comments'][sender] = payload['issue']['updated_at'] - else - issues['last_comments'] = {} - issues['last_comments'][sender] = payload['issue']['updated_at'] - end - paper.last_activity = payload['issue']['updated_at'] - end - - if pre_review? - kind = 'pre-review' - return if issue_number != paper.meta_review_issue_id - else - kind = 'review' - return if issue_number != paper.review_issue_id - end - - issues['comments'].unshift( - 'author' => sender, - 'comment' => comment_body, - 'commented_at' => commented_at, - 'comment_url' => comment_url, - 'kind' => kind - ) - - # Something has gone wrong if this isn't the case... - if issues['commenters'][kind].has_key?(sender) - issues['commenters'][kind][sender] += 1 - else - issues['commenters'][kind].merge!(sender => 1) - end - - # Only keep the last 5 comments - issues['comments'] = issues['comments'].take(5) - - paper.last_activity = commented_at - paper.save - end + def process_edit + updated_at = @context.raw_payload.dig('issue', 'updated_at') + @paper.activities['issues']['last_edits'] ||= {} + @paper.activities['issues']['last_edits'][@context.sender] = updated_at - # For each author, - def update_comment_counts - paper.activities - end + @paper.percent_complete = @paper.fraction_check_boxes_complete + @paper.last_activity = updated_at + @paper.save + end - def issues - paper.activities['issues'] + # Parse the labels and update paper with the new labels. + def process_labeling + new_labels = Hash.new + @context.issue_labels.each do |label| + new_labels.merge!(label['name'] => label['color']) end - def update_comments(comment) + @paper.labels = new_labels + @paper.save + end - end + def process_comment + if @context.issue_title.match(/^\[PRE REVIEW\]:/) + return if @context.issue_id != @paper.meta_review_issue_id + kind = 'pre-review' + else + return if @context.issue_id != @paper.review_issue_id + kind = 'review' + end + + @paper.activities['issues']['last_comments'] ||= {} + @paper.activities['issues']['last_comments'][@context.sender] = @context.comment_created_at + @paper.last_activity = @context.comment_created_at + @paper.activities['issues']['comments'].unshift( + 'author' => @context.sender, + 'comment' => @context.comment_body, + 'commented_at' => @context.comment_created_at, + 'comment_url' => @context.comment_url, + 'kind' => kind + ) + + if @paper.activities['issues']['commenters'][kind].has_key?(@context.sender) + @paper.activities['issues']['commenters'][kind][@context.sender] += 1 + else + @paper.activities['issues']['commenters'][kind].merge!(@context.sender => 1) + end + + # Only keep the last 5 comments + @paper.activities['issues']['comments'] = @paper.activities['issues']['comments'].take(5) + + @paper.last_activity = @context.comment_created_at + @paper.save end end diff --git a/config/routes.rb b/config/routes.rb index f0fbe8944..ad9693795 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -80,7 +80,7 @@ post '/papers/api_assign_reviewers', to: 'dispatch#api_assign_reviewers' post '/papers/api_reject', to: 'dispatch#api_reject' post '/papers/api_withdraw', to: 'dispatch#api_withdraw' - post '/dispatch', to: 'dispatch#github_recevier', format: 'json' + post '/dispatch', to: 'dispatch#github_receiver', format: 'json' root to: 'home#index' end diff --git a/spec/controllers/dispatch_controller_spec.rb b/spec/controllers/dispatch_controller_spec.rb index 891cdd0a1..21f693097 100644 --- a/spec/controllers/dispatch_controller_spec.rb +++ b/spec/controllers/dispatch_controller_spec.rb @@ -24,25 +24,26 @@ def set_signature(payload) let(:whedon_pre_review_comment_random) { json_fixture('whedon-pre-review-comment-random-review.json') } - describe "POST #github_recevier for REVIEW with invalid HTTP_X_HUB_SIGNATURE", type: :request do + describe "POST #github_receiver for REVIEW with invalid HTTP_X_HUB_SIGNATURE", type: :request do before do signature = "foobarbaz" @paper = create(:paper, meta_review_issue_id: 78, review_issue_id: 79) - post '/dispatch', params: whedon_review_opened, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_HUB_SIGNATURE' => signature } + post '/dispatch', params: whedon_review_opened, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_GITHUB_EVENT' => 'issues', 'HTTP_X_HUB_SIGNATURE' => signature } @paper.reload end - it "should initialize the activities when a review issue is opened" do - expect(response).to be_unprocessable + it "should detect invalid signature" do + expect(response).to be_forbidden + expect(response.headers['Msg']).to eq("Signatures didn't match!") expect(@paper.activities).to eq({}) end end - describe "POST #github_recevier for PRE-REVIEW", type: :request do + describe "POST #github_receiver for PRE-REVIEW", type: :request do before do signature = set_signature(whedon_pre_review_opened) @paper = create(:paper, meta_review_issue_id: 78, review_issue_id: nil) - post '/dispatch', params: whedon_pre_review_opened, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_HUB_SIGNATURE' => signature } + post '/dispatch', params: whedon_pre_review_opened, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_GITHUB_EVENT' => 'issues', 'HTTP_X_HUB_SIGNATURE' => signature } @paper.reload end @@ -53,11 +54,10 @@ def set_signature(payload) it "should UPDATE the activities when an issue is then commented on" do signature = set_signature(whedon_pre_review_comment) - - post '/dispatch', params: whedon_pre_review_comment, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_HUB_SIGNATURE' => signature } + post '/dispatch', params: whedon_pre_review_comment, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_GITHUB_EVENT' => 'issue_comment', 'HTTP_X_HUB_SIGNATURE' => signature } signature = set_signature(editor_pre_review_comment) - post '/dispatch', params: editor_pre_review_comment, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_HUB_SIGNATURE' => signature } + post '/dispatch', params: editor_pre_review_comment, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_GITHUB_EVENT' => 'issue_comment', 'HTTP_X_HUB_SIGNATURE' => signature } @paper.reload expect(response).to be_ok @@ -68,11 +68,11 @@ def set_signature(payload) end end - describe "POST #github_recevier for REVIEW with labeling event", type: :request do + describe "POST #github_receiver for REVIEW with labeling event", type: :request do before do signature = set_signature(whedon_review_labeled) @paper = create(:paper, meta_review_issue_id: 78, review_issue_id: 79, labels: [{ "foo" => "efefef" }]) - post '/dispatch', params: whedon_review_labeled, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_HUB_SIGNATURE' => signature } + post '/dispatch', params: whedon_review_labeled, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_GITHUB_EVENT' => 'issues', 'HTTP_X_HUB_SIGNATURE' => signature } @paper.reload end @@ -82,13 +82,13 @@ def set_signature(payload) end end - describe "POST #github_recevier for REVIEW when a paper doesn't have a suggested_editor set", type: :request do + describe "POST #github_receiver for REVIEW when a paper doesn't have a suggested_editor set", type: :request do before do - signature = set_signature(whedon_review_labeled) build(:paper, meta_review_issue_id: 78, suggested_editor: nil, review_issue_id: 79, labels: [{ "foo" => "efefef" }]).save(validate: false) @paper = Paper.find_by_meta_review_issue_id(78) - post '/dispatch', params: whedon_review_labeled, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_HUB_SIGNATURE' => signature } + signature = set_signature(whedon_review_labeled) + post '/dispatch', params: whedon_review_labeled, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_GITHUB_EVENT' => 'issues', 'HTTP_X_HUB_SIGNATURE' => signature } @paper.reload end @@ -98,11 +98,11 @@ def set_signature(payload) end end - describe "POST #github_recevier for REVIEW", type: :request, vcr: true do + describe "POST #github_receiver for REVIEW - open", type: :request, vcr: true do before do signature = set_signature(whedon_review_opened) @paper = create(:paper, meta_review_issue_id: 78, review_issue_id: 79) - post '/dispatch', params: whedon_review_opened, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_HUB_SIGNATURE' => signature } + post '/dispatch', params: whedon_review_opened, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_GITHUB_EVENT' => 'issues', 'HTTP_X_HUB_SIGNATURE' => signature } @paper.reload end @@ -112,12 +112,12 @@ def set_signature(payload) end end - describe "POST #github_recevier for REVIEW", type: :request, vcr: true do + describe "POST #github_receiver for REVIEW", type: :request, vcr: true do before do signature = set_signature(whedon_review_edit) @paper = create(:paper, meta_review_issue_id: 78, review_issue_id: 79) - post '/dispatch', params: whedon_review_edit, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_HUB_SIGNATURE' => signature } + post '/dispatch', params: whedon_review_edit, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_GITHUB_EVENT' => 'issues', 'HTTP_X_HUB_SIGNATURE' => signature } @paper.reload end @@ -136,12 +136,12 @@ def set_signature(payload) end end - describe "POST #github_recevier", type: :request do + describe "POST #github_receiver", type: :request do it "shouldn't do anything if the payload is not for one of the papers" do signature = set_signature(whedon_pre_review_comment) random_paper = create(:paper, meta_review_issue_id: 1234) - post '/dispatch', params: whedon_pre_review_comment, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_HUB_SIGNATURE' => signature } + post '/dispatch', params: whedon_pre_review_comment, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_GITHUB_EVENT' => 'issue_comment', 'HTTP_X_HUB_SIGNATURE' => signature } random_paper.reload expect(response).to be_ok @@ -152,10 +152,11 @@ def set_signature(payload) signature = set_signature(whedon_pre_review_comment_random) paper = create(:paper, meta_review_issue_id: 78) - post '/dispatch', params: whedon_pre_review_comment_random, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_HUB_SIGNATURE' => signature } + post '/dispatch', params: whedon_pre_review_comment_random, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_GITHUB_EVENT' => 'issue_comment', 'HTTP_X_HUB_SIGNATURE' => signature } paper.reload - expect(response).to be_unprocessable + expect(response).to be_forbidden + expect(response.headers['Msg']).to eq("Event origin not allowed") expect(paper.activities).to eq({}) end @@ -163,7 +164,7 @@ def set_signature(payload) signature = set_signature(whedon_review_comment) paper = create(:paper, meta_review_issue_id: 78, review_issue_id: 79) - post '/dispatch', params: whedon_review_comment, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_HUB_SIGNATURE' => signature } + post '/dispatch', params: whedon_review_comment, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_GITHUB_EVENT' => 'issue_comment', 'HTTP_X_HUB_SIGNATURE' => signature } paper.reload expect(response).to be_ok diff --git a/spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_last_activity_field.yml b/spec/fixtures/cassettes/DispatchController/POST_github_receiver_for_REVIEW/should_update_the_last_activity_field.yml similarity index 100% rename from spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_last_activity_field.yml rename to spec/fixtures/cassettes/DispatchController/POST_github_receiver_for_REVIEW/should_update_the_last_activity_field.yml diff --git a/spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_last_edits_key.yml b/spec/fixtures/cassettes/DispatchController/POST_github_receiver_for_REVIEW/should_update_the_last_edits_key.yml similarity index 100% rename from spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_last_edits_key.yml rename to spec/fixtures/cassettes/DispatchController/POST_github_receiver_for_REVIEW/should_update_the_last_edits_key.yml diff --git a/spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_percent_complete_value.yml b/spec/fixtures/cassettes/DispatchController/POST_github_receiver_for_REVIEW/should_update_the_percent_complete_value.yml similarity index 100% rename from spec/fixtures/cassettes/DispatchController/POST_github_recevier_for_REVIEW/should_update_the_percent_complete_value.yml rename to spec/fixtures/cassettes/DispatchController/POST_github_receiver_for_REVIEW/should_update_the_percent_complete_value.yml diff --git a/spec/fixtures/whedon-pre-review-comment.json b/spec/fixtures/whedon-pre-review-comment.json index 1b3241774..e4d7df9fb 100644 --- a/spec/fixtures/whedon-pre-review-comment.json +++ b/spec/fixtures/whedon-pre-review-comment.json @@ -74,8 +74,8 @@ "type": "User", "site_admin": false }, - "created_at": "2018-09-30T11:48:30Z", - "updated_at": "2018-09-30T11:48:30Z", + "created_at": "2018-09-30T11:48:40Z", + "updated_at": "2018-09-30T11:48:40Z", "author_association": "COLLABORATOR", "body": "FIRST: Hello human, I'm @whedon, a robot that can help you with some common editorial tasks.\n\nFor a list of things I can do to help you, just type:\n\n```\n@whedon commands\n```\n" }, From b0db806953bd22964800a341571de1f439367d5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 5 Jul 2021 21:19:58 +0200 Subject: [PATCH 220/609] dry headers --- spec/controllers/dispatch_controller_spec.rb | 46 +++++++++----------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/spec/controllers/dispatch_controller_spec.rb b/spec/controllers/dispatch_controller_spec.rb index 21f693097..05efd7590 100644 --- a/spec/controllers/dispatch_controller_spec.rb +++ b/spec/controllers/dispatch_controller_spec.rb @@ -8,6 +8,15 @@ def set_signature(payload) 'sha1=' + OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha1'), ENV['GH_SECRET'], payload) end +def headers(event, payload) + { + 'CONTENT_TYPE' => 'application/json', + 'ACCEPT' => 'application/json', + 'HTTP_X_GITHUB_EVENT' => event.to_s, + 'HTTP_X_HUB_SIGNATURE' => set_signature(payload) + } +end + describe DispatchController, type: :controller do render_views @@ -26,9 +35,9 @@ def set_signature(payload) describe "POST #github_receiver for REVIEW with invalid HTTP_X_HUB_SIGNATURE", type: :request do before do - signature = "foobarbaz" + wrong_payload = "foobarbaz" @paper = create(:paper, meta_review_issue_id: 78, review_issue_id: 79) - post '/dispatch', params: whedon_review_opened, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_GITHUB_EVENT' => 'issues', 'HTTP_X_HUB_SIGNATURE' => signature } + post '/dispatch', params: whedon_review_opened, headers: headers(:issues, wrong_payload) @paper.reload end @@ -41,9 +50,8 @@ def set_signature(payload) describe "POST #github_receiver for PRE-REVIEW", type: :request do before do - signature = set_signature(whedon_pre_review_opened) @paper = create(:paper, meta_review_issue_id: 78, review_issue_id: nil) - post '/dispatch', params: whedon_pre_review_opened, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_GITHUB_EVENT' => 'issues', 'HTTP_X_HUB_SIGNATURE' => signature } + post '/dispatch', params: whedon_pre_review_opened, headers: headers(:issues, whedon_pre_review_opened) @paper.reload end @@ -53,11 +61,8 @@ def set_signature(payload) end it "should UPDATE the activities when an issue is then commented on" do - signature = set_signature(whedon_pre_review_comment) - post '/dispatch', params: whedon_pre_review_comment, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_GITHUB_EVENT' => 'issue_comment', 'HTTP_X_HUB_SIGNATURE' => signature } - - signature = set_signature(editor_pre_review_comment) - post '/dispatch', params: editor_pre_review_comment, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_GITHUB_EVENT' => 'issue_comment', 'HTTP_X_HUB_SIGNATURE' => signature } + post '/dispatch', params: whedon_pre_review_comment, headers: headers(:issue_comment, whedon_pre_review_comment) + post '/dispatch', params: editor_pre_review_comment, headers: headers(:issue_comment, editor_pre_review_comment) @paper.reload expect(response).to be_ok @@ -70,9 +75,8 @@ def set_signature(payload) describe "POST #github_receiver for REVIEW with labeling event", type: :request do before do - signature = set_signature(whedon_review_labeled) @paper = create(:paper, meta_review_issue_id: 78, review_issue_id: 79, labels: [{ "foo" => "efefef" }]) - post '/dispatch', params: whedon_review_labeled, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_GITHUB_EVENT' => 'issues', 'HTTP_X_HUB_SIGNATURE' => signature } + post '/dispatch', params: whedon_review_labeled, headers: headers(:issues, whedon_review_labeled) @paper.reload end @@ -87,8 +91,7 @@ def set_signature(payload) build(:paper, meta_review_issue_id: 78, suggested_editor: nil, review_issue_id: 79, labels: [{ "foo" => "efefef" }]).save(validate: false) @paper = Paper.find_by_meta_review_issue_id(78) - signature = set_signature(whedon_review_labeled) - post '/dispatch', params: whedon_review_labeled, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_GITHUB_EVENT' => 'issues', 'HTTP_X_HUB_SIGNATURE' => signature } + post '/dispatch', params: whedon_review_labeled, headers: headers(:issues, whedon_review_labeled) @paper.reload end @@ -100,9 +103,8 @@ def set_signature(payload) describe "POST #github_receiver for REVIEW - open", type: :request, vcr: true do before do - signature = set_signature(whedon_review_opened) @paper = create(:paper, meta_review_issue_id: 78, review_issue_id: 79) - post '/dispatch', params: whedon_review_opened, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_GITHUB_EVENT' => 'issues', 'HTTP_X_HUB_SIGNATURE' => signature } + post '/dispatch', params: whedon_review_opened, headers: headers(:issues, whedon_review_opened) @paper.reload end @@ -114,10 +116,8 @@ def set_signature(payload) describe "POST #github_receiver for REVIEW", type: :request, vcr: true do before do - signature = set_signature(whedon_review_edit) - @paper = create(:paper, meta_review_issue_id: 78, review_issue_id: 79) - post '/dispatch', params: whedon_review_edit, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_GITHUB_EVENT' => 'issues', 'HTTP_X_HUB_SIGNATURE' => signature } + post '/dispatch', params: whedon_review_edit, headers: headers(:issues, whedon_review_edit) @paper.reload end @@ -138,10 +138,8 @@ def set_signature(payload) describe "POST #github_receiver", type: :request do it "shouldn't do anything if the payload is not for one of the papers" do - signature = set_signature(whedon_pre_review_comment) - random_paper = create(:paper, meta_review_issue_id: 1234) - post '/dispatch', params: whedon_pre_review_comment, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_GITHUB_EVENT' => 'issue_comment', 'HTTP_X_HUB_SIGNATURE' => signature } + post '/dispatch', params: whedon_pre_review_comment, headers: headers(:issue_comment, whedon_pre_review_comment) random_paper.reload expect(response).to be_ok @@ -149,10 +147,8 @@ def set_signature(payload) end it "shouldn't do anything if a payload is received for the wrong repository" do - signature = set_signature(whedon_pre_review_comment_random) - paper = create(:paper, meta_review_issue_id: 78) - post '/dispatch', params: whedon_pre_review_comment_random, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_GITHUB_EVENT' => 'issue_comment', 'HTTP_X_HUB_SIGNATURE' => signature } + post '/dispatch', params: whedon_pre_review_comment_random, headers: headers(:issue_comment, whedon_pre_review_comment_random) paper.reload expect(response).to be_forbidden @@ -164,7 +160,7 @@ def set_signature(payload) signature = set_signature(whedon_review_comment) paper = create(:paper, meta_review_issue_id: 78, review_issue_id: 79) - post '/dispatch', params: whedon_review_comment, headers: { 'CONTENT_TYPE' => 'application/json', 'ACCEPT' => 'application/json', 'HTTP_X_GITHUB_EVENT' => 'issue_comment', 'HTTP_X_HUB_SIGNATURE' => signature } + post '/dispatch', params: whedon_review_comment, headers: headers(:issue_comment, whedon_review_comment) paper.reload expect(response).to be_ok From fc23632515a47346e0eff92ccd9aa2b895b31f3e Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Tue, 6 Jul 2021 11:35:50 +0100 Subject: [PATCH 221/609] Updating defaulys --- .../20210317094834_change_availability_to_max_assignments.rb | 2 +- db/migrate/20210706101511_change_default_paper_count.rb | 5 +++++ db/schema.rb | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20210706101511_change_default_paper_count.rb diff --git a/db/migrate/20210317094834_change_availability_to_max_assignments.rb b/db/migrate/20210317094834_change_availability_to_max_assignments.rb index 03067d366..0d821c7c5 100644 --- a/db/migrate/20210317094834_change_availability_to_max_assignments.rb +++ b/db/migrate/20210317094834_change_availability_to_max_assignments.rb @@ -1,6 +1,6 @@ class ChangeAvailabilityToMaxAssignments < ActiveRecord::Migration[6.1] def change - add_column :editors,:max_assignments, :integer, null: false, default: 2 + add_column :editors, :max_assignments, :integer, null: false, default: 2 migrate_availability remove_column :editors, :availability, :string end diff --git a/db/migrate/20210706101511_change_default_paper_count.rb b/db/migrate/20210706101511_change_default_paper_count.rb new file mode 100644 index 000000000..93f19b290 --- /dev/null +++ b/db/migrate/20210706101511_change_default_paper_count.rb @@ -0,0 +1,5 @@ +class ChangeDefaultPaperCount < ActiveRecord::Migration[6.1] + def change + change_column_default :editors, :max_assignments, from: 2, to: 4 + end +end diff --git a/db/schema.rb b/db/schema.rb index 2511366c3..447d4f087 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -31,7 +31,7 @@ t.datetime "updated_at", null: false t.integer "user_id" t.string "availability_comment" - t.integer "max_assignments", default: 2, null: false + t.integer "max_assignments", default: 4, null: false t.index ["user_id"], name: "index_editors_on_user_id" end From d9ec6e194a45a242ec334aa1a80441de536ba04d Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Tue, 6 Jul 2021 11:54:20 +0100 Subject: [PATCH 222/609] Adding version --- db/schema.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/schema.rb b/db/schema.rb index c0ccf6c16..757b9c4b2 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2021_06_15_101009) do +ActiveRecord::Schema.define(version: 2021_07_06_101511) do # These are extensions that must be enabled in order to support this database enable_extension "hstore" From d10f4e7336cf8eb0d51d75d47508fa9319d631c8 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Tue, 6 Jul 2021 12:13:55 +0100 Subject: [PATCH 223/609] Fixing specs --- spec/system/editors/list_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/system/editors/list_spec.rb b/spec/system/editors/list_spec.rb index 8781e20ad..1ea913568 100644 --- a/spec/system/editors/list_spec.rb +++ b/spec/system/editors/list_spec.rb @@ -34,7 +34,7 @@ scenario "show the list of editors" do expect(page).to have_content('Computing, Test systems') - expect(page).to have_content('2*') + expect(page).to have_content('4*') end scenario "show editor's info" do From 3c9b096c4b6382feb0c328557abde0cdd31488fd Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Tue, 6 Jul 2021 18:29:42 +0100 Subject: [PATCH 224/609] Making it clear COI applies to editors too --- docs/reviewer_guidelines.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reviewer_guidelines.md b/docs/reviewer_guidelines.md index 731eee010..2d6cab0a2 100644 --- a/docs/reviewer_guidelines.md +++ b/docs/reviewer_guidelines.md @@ -19,8 +19,8 @@ You can include in your review links to any new issues that you the reviewer bel The definition of a conflict of Interest in peer review is a circumstance that makes you "unable to make an impartial scientific judgment or evaluation." ([PNAS Conflict of Interest Policy](http://www.pnas.org/site/authors/coi.xhtml)). JOSS is concerned with avoiding any actual conflicts of interest, and being sufficiently transparent that we avoid the appearance of conflicts of interest as well. -As a reviewer, COIs are your present or previous association with any authors of a submission: recent (past four years) collaborators in funded research or work that is published; and lifetime for the family members, business partners, and thesis student/advisor or mentor. In addition, your recent (past year) association with the same organization of a submitter is a COI, for example, being employed at the same institution. +As a reviewer (or editor), COIs are your present or previous association with any authors of a submission: recent (past four years) collaborators in funded research or work that is published; and lifetime for the family members, business partners, and thesis student/advisor or mentor. In addition, your recent (past year) association with the same organization of a submitter is a COI, for example, being employed at the same institution. -If you have a conflict of interest with a submission, you should disclose the specific reason to the submissions' editor. This may lead to you not being able to review the submission, but some conflicts may be recorded and then waived, and if you think you are able to make an impartial assessment of the work, you should request that the conflict be waived. For example, if you and a submitter were two of 2000 authors of a high energy physics paper but did not actually collaborate. Or if you and a submitter worked together 6 years ago, but due to delays in the publishing industry, a paper from that collaboration with both of you as authors was published 2 year ago. Or if you and a submitter are both employed by the same very large organization but in different units without any knowledge of each other. +If you have a conflict of interest with a submission, you should disclose the specific reason to the submissions' editor (or to an EiC if you are an editor). This may lead to you not being able to review or edit the submission, but some conflicts may be recorded and then waived, and if you think you are able to make an impartial assessment of the work, you should request that the conflict be waived. For example, if you and a submitter were two of 2000 authors of a high energy physics paper but did not actually collaborate. Or if you and a submitter worked together 6 years ago, but due to delays in the publishing industry, a paper from that collaboration with both of you as authors was published 2 year ago. Or if you and a submitter are both employed by the same very large organization but in different units without any knowledge of each other. Declaring actual, perceived, and potential conflicts of interest is required under professional ethics. If in doubt: ask the editors. From 1b1cdedc8da2e9517efdf97fd5ee4977e39ebb33 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 7 Jul 2021 10:30:14 +0100 Subject: [PATCH 225/609] Update docs/reviewer_guidelines.md Co-authored-by: Daniel S. Katz --- docs/reviewer_guidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reviewer_guidelines.md b/docs/reviewer_guidelines.md index 2d6cab0a2..a6f5aa5d8 100644 --- a/docs/reviewer_guidelines.md +++ b/docs/reviewer_guidelines.md @@ -21,6 +21,6 @@ The definition of a conflict of Interest in peer review is a circumstance that m As a reviewer (or editor), COIs are your present or previous association with any authors of a submission: recent (past four years) collaborators in funded research or work that is published; and lifetime for the family members, business partners, and thesis student/advisor or mentor. In addition, your recent (past year) association with the same organization of a submitter is a COI, for example, being employed at the same institution. -If you have a conflict of interest with a submission, you should disclose the specific reason to the submissions' editor (or to an EiC if you are an editor). This may lead to you not being able to review or edit the submission, but some conflicts may be recorded and then waived, and if you think you are able to make an impartial assessment of the work, you should request that the conflict be waived. For example, if you and a submitter were two of 2000 authors of a high energy physics paper but did not actually collaborate. Or if you and a submitter worked together 6 years ago, but due to delays in the publishing industry, a paper from that collaboration with both of you as authors was published 2 year ago. Or if you and a submitter are both employed by the same very large organization but in different units without any knowledge of each other. +If you have a conflict of interest with a submission, you should disclose the specific reason to the submissions' editor (or to an EiC if you are an editor, or to the other EiCs if you are an EiC). This may lead to you not being able to review or edit the submission, but some conflicts may be recorded and then waived, and if you think you are able to make an impartial assessment of the work, you should request that the conflict be waived. For example, if you and a submitter were two of 2000 authors of a high energy physics paper but did not actually collaborate. Or if you and a submitter worked together 6 years ago, but due to delays in the publishing industry, a paper from that collaboration with both of you as authors was published 2 year ago. Or if you and a submitter are both employed by the same very large organization but in different units without any knowledge of each other. Declaring actual, perceived, and potential conflicts of interest is required under professional ethics. If in doubt: ask the editors. From 48bd83d0474421c10a10a14ef3d84b55d8de4a62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 13 Jul 2021 12:40:20 +0200 Subject: [PATCH 226/609] update addressable security update --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 7ca936fb8..c034261d0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -66,7 +66,7 @@ GEM minitest (>= 5.1) tzinfo (~> 2.0) zeitwerk (~> 2.3) - addressable (2.7.0) + addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) afm (0.2.2) autoprefixer-rails (10.2.4.0) From ff2e4c82c6c8593fd0e2ab98d1b8b3dc3569394a Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 18 Jul 2021 16:10:04 +0100 Subject: [PATCH 227/609] Update submitting.md --- docs/submitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index b9181184a..f29902119 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -72,7 +72,7 @@ Before you submit, you should: .. important:: Begin your paper with a summary of the high-level functionality of your software for a non-specialist reader. Avoid jargon in this section. ``` -JOSS welcomes submissions from broadly diverse research areas. For this reason, we require that authors include in the paper some sentences that explain the software functionality and domain of use to a non-specialist reader. We also require that authors explain the research applications of the software. The paper should be between 250-1000 words. +JOSS welcomes submissions from broadly diverse research areas. For this reason, we require that authors include in the paper some sentences that explain the software functionality and domain of use to a non-specialist reader. We also require that authors explain the research applications of the software. The paper should be between 250-1000 words. Authors submitting papers significantly longer than 1000 words may be asked to reduce the length of their paper. Your paper should include: From 4013ef9c241228217516b1cecbfc177b10f7cf50 Mon Sep 17 00:00:00 2001 From: Jed Brown Date: Mon, 19 Jul 2021 15:28:50 -0600 Subject: [PATCH 228/609] review_criteria: remove specific call-out of Travis-CI There are many continuous integration providers, hosted and not. Travis-CI changed their open source policy and many packages moved away. GitHub Actions is the most convenient for projects on GitHub first considering CI, but docs are accessible enough we don't need to plug them specifically. --- docs/review_criteria.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/review_criteria.md b/docs/review_criteria.md index 7acee9823..d1a483ced 100644 --- a/docs/review_criteria.md +++ b/docs/review_criteria.md @@ -94,7 +94,7 @@ Reviewers are expected to install the software they are reviewing and to verify Authors are strongly encouraged to include an automated test suite covering the core functionality of their software. -> **Good:** An automated test suite hooked up to an external service such as Travis-CI or similar
    +> **Good:** An automated test suite hooked up to continuous integration
    > **OK:** Documented manual steps that can be followed to objectively check the expected functionality of the software (e.g., a sample input file to assert behavior)
    > **Bad (not acceptable):** No way for you, the reviewer, to objectively assess whether the software works From 0d67cdf94d937386c9c080d894acb5779acbafb3 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Tue, 20 Jul 2021 10:10:28 +0100 Subject: [PATCH 229/609] Adding some options --- docs/review_criteria.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/review_criteria.md b/docs/review_criteria.md index d1a483ced..5f488962d 100644 --- a/docs/review_criteria.md +++ b/docs/review_criteria.md @@ -94,7 +94,7 @@ Reviewers are expected to install the software they are reviewing and to verify Authors are strongly encouraged to include an automated test suite covering the core functionality of their software. -> **Good:** An automated test suite hooked up to continuous integration
    +> **Good:** An automated test suite hooked up to continuous integration (GitHub Actions, Circle CI, or similar)
    > **OK:** Documented manual steps that can be followed to objectively check the expected functionality of the software (e.g., a sample input file to assert behavior)
    > **Bad (not acceptable):** No way for you, the reviewer, to objectively assess whether the software works From 4f35781cacc7446fc6642fb6bf891dea3daa75e5 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Fri, 6 Aug 2021 12:05:55 +0100 Subject: [PATCH 230/609] Adding words about not opening issues from checklist --- app/views/content/github/_review_checklist.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/content/github/_review_checklist.erb b/app/views/content/github/_review_checklist.erb index 33eca50b9..2ebf3f73d 100644 --- a/app/views/content/github/_review_checklist.erb +++ b/app/views/content/github/_review_checklist.erb @@ -1,3 +1,5 @@ +✨ Important: Please do not use the _Convert to issue_ functionality when working through this checklist, instead, please open any new issues associated with your review on the <%= link_to "software repository", paper.repository_url, target: "_blank" %>. ✨ + ### Conflict of interest - [ ] I confirm that I have read the [JOSS conflict of interest (COI) policy](https://github.com/openjournals/joss/blob/master/COI.md) and that: I have no COIs with reviewing this work or that any perceived COIs have been waived by JOSS for the purpose of this review. From da3265b7d34478c9f43df89448adb680d9bbb104 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Fri, 6 Aug 2021 15:33:48 +0100 Subject: [PATCH 231/609] Language update. --- app/views/content/github/_review_checklist.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/content/github/_review_checklist.erb b/app/views/content/github/_review_checklist.erb index 2ebf3f73d..d6f7bc589 100644 --- a/app/views/content/github/_review_checklist.erb +++ b/app/views/content/github/_review_checklist.erb @@ -1,4 +1,4 @@ -✨ Important: Please do not use the _Convert to issue_ functionality when working through this checklist, instead, please open any new issues associated with your review on the <%= link_to "software repository", paper.repository_url, target: "_blank" %>. ✨ +✨ Important: Please do not use the _Convert to issue_ functionality when working through this checklist, instead, please open any new issues associated with your review <%= link_to "in the software repository associated with the submission", paper.repository_url, target: "_blank" %>. ✨ ### Conflict of interest From d8c0a86a9ceaabbd25020ae39350a31569469b2d Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 8 Aug 2021 12:28:48 +0100 Subject: [PATCH 232/609] Adding ability to sort by last comment too --- app/controllers/home_controller.rb | 78 +++++++++++++++++++++++------- app/helpers/home_helper.rb | 22 +++++++-- app/views/home/reviews.html.erb | 4 +- 3 files changed, 80 insertions(+), 24 deletions(-) diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index a38e83658..c81fa5d6e 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -54,11 +54,18 @@ def incoming end def reviews + sort = "complete" case params[:order] - when "desc" + when "complete-desc" @order = "desc" - when "asc" + when "complete-asc" @order = "asc" + when "active-desc" + @order = "desc" + sort = "active" + when "active-asc" + @order = "asc" + sort = "active" when nil @order = "desc" else @@ -68,10 +75,17 @@ def reviews if params[:editor] @editor = Editor.find_by_login(params[:editor]) - @papers = Paper.unscoped.in_progress.where(editor: @editor).order(percent_complete: @order).paginate( - page: params[:page], - per_page: 20 - ) + if sort == "active" + @papers = Paper.unscoped.in_progress.where(editor: @editor).order(last_activity: @order).paginate( + page: params[:page], + per_page: 20 + ) + else + @papers = Paper.unscoped.in_progress.where(editor: @editor).order(percent_complete: @order).paginate( + page: params[:page], + per_page: 20 + ) + end else @papers = Paper.everything.paginate( page: params[:page], @@ -81,11 +95,18 @@ def reviews end def in_progress + sort = "complete" case params[:order] - when "desc" + when "complete-desc" @order = "desc" - when "asc" + when "complete-asc" @order = "asc" + when "active-desc" + @order = "desc" + sort = "active" + when "active-asc" + @order = "asc" + sort = "active" when nil @order = "desc" else @@ -94,10 +115,17 @@ def in_progress @editor = current_user.editor - @papers = Paper.unscoped.in_progress.order(percent_complete: @order).paginate( - page: params[:page], - per_page: 20 - ) + if sort == "active" + @papers = Paper.unscoped.in_progress.order(last_activity: @order).paginate( + page: params[:page], + per_page: 20 + ) + else + @papers = Paper.unscoped.in_progress.order(percent_complete: @order).paginate( + page: params[:page], + per_page: 20 + ) + end load_pending_invitations_for_papers(@papers) @@ -105,11 +133,18 @@ def in_progress end def all + sort = "complete" case params[:order] - when "desc" + when "complete-desc" @order = "desc" - when "asc" + when "complete-asc" @order = "asc" + when "active-desc" + @order = "desc" + sort = "active" + when "active-asc" + @order = "asc" + sort = "active" when nil @order = "desc" else @@ -118,10 +153,17 @@ def all @editor = current_user.editor - @papers = Paper.unscoped.all.order(percent_complete: @order).paginate( - page: params[:page], - per_page: 20 - ) + if sort == "active" + @papers = Paper.unscoped.all.order(last_activity: @order).paginate( + page: params[:page], + per_page: 20 + ) + else + @papers = Paper.unscoped.all.order(percent_complete: @order).paginate( + page: params[:page], + per_page: 20 + ) + end load_pending_invitations_for_papers(@papers) diff --git a/app/helpers/home_helper.rb b/app/helpers/home_helper.rb index 7444e647c..75b6d88e0 100644 --- a/app/helpers/home_helper.rb +++ b/app/helpers/home_helper.rb @@ -71,12 +71,26 @@ def checklist_activity(paper) end end + def sort_activity(sort_order) + capture do + if sort_order == "active-desc" + concat(link_to octicon("chevron-up"), "#{request.path}?order=active-asc") + elsif sort_order == "active-asc" + concat(link_to octicon("chevron-down"), "#{request.path}?order=active-desc") + else + concat(link_to octicon("chevron-down"), "#{request.path}?order=active-desc") + end + end + end + def sort_icon(sort_order) capture do - if sort_order == "desc" - concat(link_to octicon("chevron-up"), "#{request.path}?order=asc") - elsif sort_order == "asc" - concat(link_to octicon("chevron-down"), "#{request.path}?order=desc") + if sort_order == "complete-desc" + concat(link_to octicon("chevron-up"), "#{request.path}?order=complete-asc") + elsif sort_order == "complete-asc" + concat(link_to octicon("chevron-down"), "#{request.path}?order=complete-desc") + else sort_order == "complete-asc" + concat(link_to octicon("chevron-down"), "#{request.path}?order=complete-desc") end end end diff --git a/app/views/home/reviews.html.erb b/app/views/home/reviews.html.erb index 5c07387f3..40e2715ba 100644 --- a/app/views/home/reviews.html.erb +++ b/app/views/home/reviews.html.erb @@ -49,8 +49,8 @@ <% end %>
    - - + + From 0d353c893b3bc5ab953a28ea513f40d59fd2a52b Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 8 Aug 2021 14:44:08 +0100 Subject: [PATCH 233/609] Adding editor email to profile --- app/views/editors/profile.html.erb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/views/editors/profile.html.erb b/app/views/editors/profile.html.erb index 55ce4aaad..b71c73a55 100644 --- a/app/views/editors/profile.html.erb +++ b/app/views/editors/profile.html.erb @@ -66,8 +66,16 @@
    - <%= f.label :url %> - <%= f.text_field :url, class: "form-control" %> +
    +
    + <%= f.label :url %> + <%= f.text_field :url, class: "form-control" %> +
    +
    + <%= f.label :email %> + <%= f.text_field :email, class: "form-control" %> +
    +
    From fbe355e1e681f891282ed9800bb53b3f5cef291a Mon Sep 17 00:00:00 2001 From: Martin Fleischmann Date: Tue, 10 Aug 2021 17:42:33 +0100 Subject: [PATCH 234/609] Proper caption to notification settings screenshot --- docs/editing.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/editing.md b/docs/editing.md index ed23f0921..37840bd40 100644 --- a/docs/editing.md +++ b/docs/editing.md @@ -45,22 +45,22 @@ To recruit reviewers, the handling editor can mention them in the `PRE-REVIEW` i **Reviewer Considerations** -- It is rare that all reviewers have the expertise to cover all aspects of a submission (e.g., knows the language really well and knows the scientific discipline well). As such, a good practice is to try and make sure that between the two or three reviewers, all aspects of the submission are covered. +- It is rare that all reviewers have the expertise to cover all aspects of a submission (e.g., knows the language really well and knows the scientific discipline well). As such, a good practice is to try and make sure that between the two or three reviewers, all aspects of the submission are covered. - Selection and assignment of reviewers should adhere to the [JOSS COI policy](https://joss.theoj.org/about#ethics). **Potential ways to find reviewers** Finding reviewers can be challenging, especially if a submission is outside of your immediate area of expertise. Some strategies you can use to identify potential candidates: -- Search the [reviewer spreadsheet](https://bit.ly/joss-reviewers) of volunteer reviewers. +- Search the [reviewer spreadsheet](https://bit.ly/joss-reviewers) of volunteer reviewers. - When using this spreadsheet, pay attention to the number of reviews this individual is already doing to avoid overloading them. - - It can be helpful to use the "Data > Filter Views" capability to temporarily filter the table view to include only people with language or domain expertise matching the paper. + - It can be helpful to use the "Data > Filter Views" capability to temporarily filter the table view to include only people with language or domain expertise matching the paper. - Ask the author(s): You are free to ask the submitting author to suggest possible reviewers by using the [reviewer spreadsheet](https://bit.ly/joss-reviewers) and also people from their professional network. In this situation, the editor still needs to verify that their suggestions are appropriate. - Use your professional network: You're welcome to invite people you know of who might be able to give a good review. - Search Google and GitHub for related work, and write to the authors of that related work. - You might like to try [this tool](https://github.com/dfm/joss-reviewer) from @dfm. - Ask on social networks: Sometimes asking on Twitter for reviewers can identify good candidates. -- Check the work being referenced in the submission: +- Check the work being referenced in the submission: - Authors of software that is being built on might be interested in reviewing the submission. - Users of the the software that is being submission be interested in reviewing the submission - Avoid asking JOSS editors to review: If at all possible, avoid asking JOSS editors to review as they are generally very busy editing their own papers. @@ -371,7 +371,7 @@ Being on the JOSS editorial team means that there can be a _lot_ of notification When you're added to the editorial team on GitHub, you will almost certainly find yourself subscribed (watching) to the [`joss-reviews`](https://github.com/openjournals/joss-reviews) repository. The first thing you should do is set yourself to 'not watching': -![watching](https://cloud.githubusercontent.com/assets/4483/20250593/64d7ce48-a9de-11e6-9225-d3dfb3e48e68.png) +![Repository notifications settings](https://cloud.githubusercontent.com/assets/4483/20250593/64d7ce48-a9de-11e6-9225-d3dfb3e48e68.png) Please note, that by not watching the reviews repository, you will still receive notifications for issues (reviews) where you are `@mentioned`. From 1f34f71ef0b3b782d93ce466b16a792d7db7d5c2 Mon Sep 17 00:00:00 2001 From: "Daniel S. Katz" Date: Thu, 19 Aug 2021 07:46:01 -0500 Subject: [PATCH 235/609] clarifying who is responsible intended to address https://github.com/openjournals/joss/issues/974 @khinsen - what do you think? --- CODE_OF_CONDUCT.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 1103c1288..af22d2365 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -33,11 +33,11 @@ advances ## Our Responsibilities -Project maintainers are responsible for clarifying the standards of acceptable +The JOSS Editors are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. -Project maintainers have the right and responsibility to remove, edit, or +JOSS Editors have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, From efdc862ec66dc330594372028c38267a6912a283 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sat, 21 Aug 2021 07:47:02 +0100 Subject: [PATCH 236/609] Fix sorting on incoming --- app/controllers/home_controller.rb | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index c81fa5d6e..266a70a0b 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -34,16 +34,34 @@ def dashboard end def incoming - if params[:order] - @papers = Paper.unscoped.in_progress.where(editor: nil).order(percent_complete: params[:order]).paginate( - page: params[:page], - per_page: 20 - ) + sort = "complete" + case params[:order] + when "complete-desc" + @order = "desc" + when "complete-asc" + @order = "asc" + when "active-desc" + @order = "desc" + sort = "active" + when "active-asc" + @order = "asc" + sort = "active" + when nil + @order = "desc" else - @papers = Paper.in_progress.where(editor: nil).paginate( + @order = "desc" + end + + if sort == "active" + @papers = Paper.unscoped.in_progress.where(editor: nil).order(last_activity: @order).paginate( page: params[:page], per_page: 20 ) + else + @papers = Paper.unscoped.in_progress.where(editor: nil).order(percent_complete: @order).paginate( + page: params[:page], + per_page: 20 + ) end load_pending_invitations_for_papers(@papers) From 974bb2e9441c6979aa0391da93c6ff2347b4844b Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sat, 21 Aug 2021 08:08:31 +0100 Subject: [PATCH 237/609] Update submitting.md --- docs/submitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index f29902119..9e7b75bb1 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -36,7 +36,7 @@ As a rule of thumb, JOSS' minimum allowable contribution should represent **not - Whether the software has already been cited in academic papers. - Whether the software is sufficiently useful that it is _likely to be cited_ by your peer group. -In addition, JOSS requires that software should be feature-complete (i.e. no half-baked solutions) and designed for maintainable extension (not one-off modifications of existing tools). "Minor utility" packages, including "thin" API clients, and single-function packages are not acceptable. +In addition, JOSS requires that software should be feature-complete (i.e., no half-baked solutions), packaged appropriately according to common community standards for the programming language being used, and designed for maintainable extension (not one-off modifications of existing tools). "Minor utility" packages, including "thin" API clients, and single-function packages are not acceptable. ### Co-publication of science, methods, and software From 3f5a91432be09de02933fef5dda3724a7ffeba5c Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 23 Aug 2021 09:29:04 +0100 Subject: [PATCH 238/609] Just papers by created --- app/controllers/home_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 266a70a0b..773db6e9b 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -58,7 +58,7 @@ def incoming per_page: 20 ) else - @papers = Paper.unscoped.in_progress.where(editor: nil).order(percent_complete: @order).paginate( + @papers = Paper.in_progress.where(editor: nil).paginate( page: params[:page], per_page: 20 ) From 734e9eefe657e9ab8d30e02c3720985b3be64126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 23 Aug 2021 12:24:54 +0200 Subject: [PATCH 239/609] Rails version up (security release 6.1.4.1) --- Gemfile | 2 +- Gemfile.lock | 128 +++++++++++++++++++++++++-------------------------- 2 files changed, 65 insertions(+), 65 deletions(-) diff --git a/Gemfile b/Gemfile index 3c20a706a..e22ca1a3b 100644 --- a/Gemfile +++ b/Gemfile @@ -17,7 +17,7 @@ gem 'octokit', '~> 4.21' gem 'pdf-reader', '~> 2.4.2' gem 'pg', '~> 1.2.3' gem 'will_paginate', '~> 3.3.0' -gem 'rails', '6.1.4' +gem 'rails', '6.1.4.1' gem 'responders' gem 'newrelic_rpm' gem 'sanitize', '~> 5.2.3' diff --git a/Gemfile.lock b/Gemfile.lock index a1052fd2a..6ac0d1407 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,40 +4,40 @@ GEM Ascii85 (1.1.0) aasm (5.0.8) concurrent-ruby (~> 1.0) - actioncable (6.1.4) - actionpack (= 6.1.4) - activesupport (= 6.1.4) + actioncable (6.1.4.1) + actionpack (= 6.1.4.1) + activesupport (= 6.1.4.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.4) - actionpack (= 6.1.4) - activejob (= 6.1.4) - activerecord (= 6.1.4) - activestorage (= 6.1.4) - activesupport (= 6.1.4) + actionmailbox (6.1.4.1) + actionpack (= 6.1.4.1) + activejob (= 6.1.4.1) + activerecord (= 6.1.4.1) + activestorage (= 6.1.4.1) + activesupport (= 6.1.4.1) mail (>= 2.7.1) - actionmailer (6.1.4) - actionpack (= 6.1.4) - actionview (= 6.1.4) - activejob (= 6.1.4) - activesupport (= 6.1.4) + actionmailer (6.1.4.1) + actionpack (= 6.1.4.1) + actionview (= 6.1.4.1) + activejob (= 6.1.4.1) + activesupport (= 6.1.4.1) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.4) - actionview (= 6.1.4) - activesupport (= 6.1.4) + actionpack (6.1.4.1) + actionview (= 6.1.4.1) + activesupport (= 6.1.4.1) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.4) - actionpack (= 6.1.4) - activerecord (= 6.1.4) - activestorage (= 6.1.4) - activesupport (= 6.1.4) + actiontext (6.1.4.1) + actionpack (= 6.1.4.1) + activerecord (= 6.1.4.1) + activestorage (= 6.1.4.1) + activesupport (= 6.1.4.1) nokogiri (>= 1.8.5) - actionview (6.1.4) - activesupport (= 6.1.4) + actionview (6.1.4.1) + activesupport (= 6.1.4.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -45,22 +45,22 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (6.1.4) - activesupport (= 6.1.4) + activejob (6.1.4.1) + activesupport (= 6.1.4.1) globalid (>= 0.3.6) - activemodel (6.1.4) - activesupport (= 6.1.4) - activerecord (6.1.4) - activemodel (= 6.1.4) - activesupport (= 6.1.4) - activestorage (6.1.4) - actionpack (= 6.1.4) - activejob (= 6.1.4) - activerecord (= 6.1.4) - activesupport (= 6.1.4) + activemodel (6.1.4.1) + activesupport (= 6.1.4.1) + activerecord (6.1.4.1) + activemodel (= 6.1.4.1) + activesupport (= 6.1.4.1) + activestorage (6.1.4.1) + actionpack (= 6.1.4.1) + activejob (= 6.1.4.1) + activerecord (= 6.1.4.1) + activesupport (= 6.1.4.1) marcel (~> 1.0.0) mini_mime (>= 1.1.0) - activesupport (6.1.4) + activesupport (6.1.4.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -141,8 +141,8 @@ GEM faraday-net_http_persistent (1.1.0) ffi (1.15.0) formatador (0.2.5) - globalid (0.4.2) - activesupport (>= 4.2.0) + globalid (0.5.2) + activesupport (>= 5.0) google-apis-core (0.3.0) addressable (~> 2.5, >= 2.5.1) googleauth (~> 0.14) @@ -211,7 +211,7 @@ GEM listen (3.5.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.10.0) + loofah (2.12.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) lumberjack (1.2.8) @@ -220,8 +220,8 @@ GEM marcel (1.0.1) memoist (0.16.2) method_source (1.0.0) - mini_mime (1.1.0) - mini_portile2 (2.5.3) + mini_mime (1.1.1) + mini_portile2 (2.6.1) minitest (5.14.4) msgpack (1.4.2) multi_json (1.15.0) @@ -229,9 +229,9 @@ GEM multipart-post (2.1.1) nenv (0.3.0) newrelic_rpm (7.0.0) - nio4r (2.5.7) - nokogiri (1.11.7) - mini_portile2 (~> 2.5.0) + nio4r (2.5.8) + nokogiri (1.12.3) + mini_portile2 (~> 2.6.1) racc (~> 1.4) nokogumbo (2.0.5) nokogiri (~> 1.8, >= 1.8.4) @@ -290,20 +290,20 @@ GEM rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.1.4) - actioncable (= 6.1.4) - actionmailbox (= 6.1.4) - actionmailer (= 6.1.4) - actionpack (= 6.1.4) - actiontext (= 6.1.4) - actionview (= 6.1.4) - activejob (= 6.1.4) - activemodel (= 6.1.4) - activerecord (= 6.1.4) - activestorage (= 6.1.4) - activesupport (= 6.1.4) + rails (6.1.4.1) + actioncable (= 6.1.4.1) + actionmailbox (= 6.1.4.1) + actionmailer (= 6.1.4.1) + actionpack (= 6.1.4.1) + actiontext (= 6.1.4.1) + actionview (= 6.1.4.1) + activejob (= 6.1.4.1) + activemodel (= 6.1.4.1) + activerecord (= 6.1.4.1) + activestorage (= 6.1.4.1) + activesupport (= 6.1.4.1) bundler (>= 1.15.0) - railties (= 6.1.4) + railties (= 6.1.4.1) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -312,16 +312,16 @@ GEM rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.3.0) + rails-html-sanitizer (1.4.1) loofah (~> 2.3) - railties (6.1.4) - actionpack (= 6.1.4) - activesupport (= 6.1.4) + railties (6.1.4.1) + actionpack (= 6.1.4.1) + activesupport (= 6.1.4.1) method_source rake (>= 0.13) thor (~> 1.0) raindrops (0.19.1) - rake (13.0.3) + rake (13.0.6) rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) @@ -461,7 +461,7 @@ DEPENDENCIES pg (~> 1.2.3) pry-byebug rack-livereload - rails (= 6.1.4) + rails (= 6.1.4.1) rails-controller-testing (~> 1.0.5) responders rspec-rails (~> 5.0.0) From bc6a6961a77081642cede121a8ec890aebae4d36 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 5 Sep 2021 15:43:25 +0100 Subject: [PATCH 240/609] Update submitting.md --- docs/submitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index f29902119..77a6f3c6e 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -8,7 +8,7 @@ But please read these instructions carefully for a streamlined submission. - The software must be open source as per the [OSI definition](https://opensource.org/osd). - The software must have an **obvious** research application. -- You must be a major contributor to the software you are submitting. +- You must be a major contributor to the software you are submitting, and have a GitHub account to participate in the review process. - Your paper must not focus on new research results accomplished with the software. - Your paper (`paper.md` and BibTeX files, plus any figures) must be hosted in a Git-based repository together with your software (although they may be in a short-lived branch which is never merged with the default). From 4c3216bbd19405d53b69e181758233b4689dd8f5 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 26 Sep 2021 09:11:59 +0100 Subject: [PATCH 241/609] Adding more detail to review criteria --- docs/review_criteria.md | 8 ++++---- docs/submitting.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/review_criteria.md b/docs/review_criteria.md index 5f488962d..1cf991ec6 100644 --- a/docs/review_criteria.md +++ b/docs/review_criteria.md @@ -56,11 +56,11 @@ The authors should clearly state what problems the software is designed to solve #### Installation instructions -There should be a clearly-stated list of dependencies. Ideally these should be handled with an automated package management solution. +Software depdendencies should be clearly documented and their installation handled by an automated proceedure. Where possible software installation should be managed with a package manager, however this criterion depends upon the maturity and availability of software packaging and distribution in the programming language being used. For example, Python packages should be `pip install`able, and have adopted [packaging conventions](https://packaging.python.org), Fortran submissions with a Makefile may be sufficient. -> **Good:** A package management file such as a Gemfile or package.json or equivalent
    -> **OK:** A list of dependencies to install
    -> **Bad (not acceptable):** Reliance on other software not listed by the authors +> **Good:** The software is simple to install, and follows established distribution and dependency management approaches for the language being used
    +> **OK:** A list of dependencies to install, together with some kind of script to handle their installation (e.g., a Makefile
    +> **Bad (not acceptable):** Dependencies are unclear, and/or installation process lacks automation #### Example usage diff --git a/docs/submitting.md b/docs/submitting.md index 9e7b75bb1..205dda138 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -36,7 +36,7 @@ As a rule of thumb, JOSS' minimum allowable contribution should represent **not - Whether the software has already been cited in academic papers. - Whether the software is sufficiently useful that it is _likely to be cited_ by your peer group. -In addition, JOSS requires that software should be feature-complete (i.e., no half-baked solutions), packaged appropriately according to common community standards for the programming language being used, and designed for maintainable extension (not one-off modifications of existing tools). "Minor utility" packages, including "thin" API clients, and single-function packages are not acceptable. +In addition, JOSS requires that software should be feature-complete (i.e., no half-baked solutions), packaged appropriately according to common community standards for the programming language being used (e.g., [Python](https://packaging.python.org), [R](https://r-pkgs.org/index.html)), and designed for maintainable extension (not one-off modifications of existing tools). "Minor utility" packages, including "thin" API clients, and single-function packages are not acceptable. ### Co-publication of science, methods, and software From 45a9fc06a3f3939246da11a55cb28e823cfcb854 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 27 Sep 2021 10:51:58 +0100 Subject: [PATCH 242/609] Update docs/review_criteria.md Co-authored-by: Daniel S. Katz --- docs/review_criteria.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/review_criteria.md b/docs/review_criteria.md index 1cf991ec6..bb41ea652 100644 --- a/docs/review_criteria.md +++ b/docs/review_criteria.md @@ -56,7 +56,7 @@ The authors should clearly state what problems the software is designed to solve #### Installation instructions -Software depdendencies should be clearly documented and their installation handled by an automated proceedure. Where possible software installation should be managed with a package manager, however this criterion depends upon the maturity and availability of software packaging and distribution in the programming language being used. For example, Python packages should be `pip install`able, and have adopted [packaging conventions](https://packaging.python.org), Fortran submissions with a Makefile may be sufficient. +Software depdendencies should be clearly documented and their installation handled by an automated proceedure. Where possible, software installation should be managed with a package manager. However, this criterion depends upon the maturity and availability of software packaging and distribution in the programming language being used. For example, Python packages should be `pip install`able, and have adopted [packaging conventions](https://packaging.python.org), while Fortran submissions with a Makefile may be sufficient. > **Good:** The software is simple to install, and follows established distribution and dependency management approaches for the language being used
    > **OK:** A list of dependencies to install, together with some kind of script to handle their installation (e.g., a Makefile
    From 67ca6b51141f7094f7314b917291c49d180b585f Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 27 Sep 2021 10:52:35 +0100 Subject: [PATCH 243/609] Update review_criteria.md --- docs/review_criteria.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/review_criteria.md b/docs/review_criteria.md index bb41ea652..2b5c4a75e 100644 --- a/docs/review_criteria.md +++ b/docs/review_criteria.md @@ -56,7 +56,7 @@ The authors should clearly state what problems the software is designed to solve #### Installation instructions -Software depdendencies should be clearly documented and their installation handled by an automated proceedure. Where possible, software installation should be managed with a package manager. However, this criterion depends upon the maturity and availability of software packaging and distribution in the programming language being used. For example, Python packages should be `pip install`able, and have adopted [packaging conventions](https://packaging.python.org), while Fortran submissions with a Makefile may be sufficient. +Software dependencies should be clearly documented and their installation handled by an automated proceedure. Where possible, software installation should be managed with a package manager. However, this criterion depends upon the maturity and availability of software packaging and distribution in the programming language being used. For example, Python packages should be `pip install`able, and have adopted [packaging conventions](https://packaging.python.org), while Fortran submissions with a Makefile may be sufficient. > **Good:** The software is simple to install, and follows established distribution and dependency management approaches for the language being used
    > **OK:** A list of dependencies to install, together with some kind of script to handle their installation (e.g., a Makefile
    From d6920ca6159fe003dfd54f00408f78672a26afdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 28 Sep 2021 13:34:47 +0200 Subject: [PATCH 244/609] update nokogiri [secfix] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6ac0d1407..3b539ae22 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -230,7 +230,7 @@ GEM nenv (0.3.0) newrelic_rpm (7.0.0) nio4r (2.5.8) - nokogiri (1.12.3) + nokogiri (1.12.5) mini_portile2 (~> 2.6.1) racc (~> 1.4) nokogumbo (2.0.5) From 3d337b08ed6fc3f56981e0c733ba5b14cb3a3cc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 25 Oct 2021 12:05:53 +0200 Subject: [PATCH 245/609] fix journal independent link --- app/views/aeic_dashboard/index.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/aeic_dashboard/index.html.erb b/app/views/aeic_dashboard/index.html.erb index c167ce5f4..c3c94adf8 100644 --- a/app/views/aeic_dashboard/index.html.erb +++ b/app/views/aeic_dashboard/index.html.erb @@ -28,7 +28,7 @@ <% end %>

    <%= link_to accepted_link_text, - "https://github.com/openjournals/joss-reviews/issues?utf8=%E2%9C%93&q=+label:recommend-accept+-label:published+", + "https://github.com/#{Rails.application.settings["reviews"]}/issues?utf8=%E2%9C%93&q=+label:recommend-accept+-label:published+", target: "_blank" %>

    @@ -48,7 +48,7 @@

    <%= link_to scope_query_link_text, - "https://github.com/openjournals/joss-reviews/labels/query-scope", + "https://github.com/#{Rails.application.settings["reviews"]}/labels/query-scope", target: "_blank" %>

    From c951e3768e3cc886d9193cc785c8425f27fa4569 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 25 Oct 2021 12:22:24 +0200 Subject: [PATCH 246/609] update dependencies to remove nokogumbo warnings --- Gemfile | 2 +- Gemfile.lock | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Gemfile b/Gemfile index e22ca1a3b..6a78fd670 100644 --- a/Gemfile +++ b/Gemfile @@ -20,7 +20,7 @@ gem 'will_paginate', '~> 3.3.0' gem 'rails', '6.1.4.1' gem 'responders' gem 'newrelic_rpm' -gem 'sanitize', '~> 5.2.3' +gem 'sanitize', '~> 6.0.0' gem 'sass-rails', '~> 6.0.0' gem 'searchkick' gem 'uglifier', '4.2.0' diff --git a/Gemfile.lock b/Gemfile.lock index 3b539ae22..84bdda65f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -233,8 +233,6 @@ GEM nokogiri (1.12.5) mini_portile2 (~> 2.6.1) racc (~> 1.4) - nokogumbo (2.0.5) - nokogiri (~> 1.8, >= 1.8.4) notiffany (0.1.3) nenv (~> 0.1) shellany (~> 0.0) @@ -282,7 +280,7 @@ GEM byebug (~> 11.0) pry (~> 0.13.0) public_suffix (4.0.6) - racc (1.5.2) + racc (1.6.0) rack (2.2.3) rack-livereload (0.3.17) rack @@ -358,10 +356,9 @@ GEM ruby2_keywords (0.0.4) ruby_dig (0.0.2) rubyzip (2.3.0) - sanitize (5.2.3) + sanitize (6.0.0) crass (~> 1.0.2) - nokogiri (>= 1.8.0) - nokogumbo (~> 2.0) + nokogiri (>= 1.12.0) sass-rails (6.0.0) sassc-rails (~> 2.1, >= 2.1.1) sassc (2.4.0) @@ -465,7 +462,7 @@ DEPENDENCIES rails-controller-testing (~> 1.0.5) responders rspec-rails (~> 5.0.0) - sanitize (~> 5.2.3) + sanitize (~> 6.0.0) sass-rails (~> 6.0.0) searchkick selenium-webdriver From 0d250bf58311df20e8b416f1960403cc61466836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 3 Nov 2021 11:28:52 +0100 Subject: [PATCH 247/609] show repository_url for all papers --- app/views/papers/show.json.jbuilder | 2 +- spec/controllers/papers_controller_spec.rb | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/papers/show.json.jbuilder b/app/views/papers/show.json.jbuilder index 4d142894f..f5a9c4168 100644 --- a/app/views/papers/show.json.jbuilder +++ b/app/views/papers/show.json.jbuilder @@ -1,6 +1,7 @@ json.title @paper.title json.state @paper.state json.submitted_at @paper.created_at +json.software_repository @paper.repository_url if @paper.published? json.doi @paper.doi json.published_at @paper.accepted_at @@ -18,7 +19,6 @@ if @paper.published? json.reviewers @paper.metadata_reviewers json.languages @paper.language_tags.join(', ') json.tags @paper.author_tags.join(', ') - json.software_repository @paper.repository_url json.paper_review @paper.review_url json.pdf_url @paper.seo_pdf_url json.software_archive @paper.clean_archive_doi diff --git a/spec/controllers/papers_controller_spec.rb b/spec/controllers/papers_controller_spec.rb index 66a977c1e..c20549c6a 100644 --- a/spec/controllers/papers_controller_spec.rb +++ b/spec/controllers/papers_controller_spec.rb @@ -270,6 +270,7 @@ parsed_response = JSON.parse(response.body) expect(parsed_response["title"]).to eq(paper.title) expect(parsed_response["state"]).to eq("superceded") + expect(parsed_response["software_repository"]).to eq("http://github.com/arfon/fidgit") expect(parsed_response["doi"]).to be_nil expect(parsed_response["published_at"]).to be_nil end @@ -282,6 +283,7 @@ parsed_response = JSON.parse(response.body) expect(parsed_response["title"]).to eq(paper.title) expect(parsed_response["state"]).to eq("accepted") + expect(parsed_response["software_repository"]).to eq("http://github.com/arfon/fidgit") expect(parsed_response["editor"]).to eq("@arfon") expect(parsed_response["editor_name"]).to eq("Person McEditor") expect(parsed_response["editor_orcid"]).to eq("0000-0000-0000-1234") From 7568ffa48a8d7e72776772dfb2a491cec31ed345 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 7 Nov 2021 15:18:57 +0000 Subject: [PATCH 248/609] Fixes #1008 --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 84bdda65f..43cb0c831 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -88,7 +88,7 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - chartkick (4.0.3) + chartkick (4.1.2) childprocess (3.0.0) coderay (1.1.3) coffee-rails (5.0.0) From ef341378e167799844fa0696b5544ccde32fe429 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Tue, 9 Nov 2021 10:26:55 +0000 Subject: [PATCH 249/609] Handle case of missing user (ORCID) --- app/views/papers/show.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/papers/show.json.jbuilder b/app/views/papers/show.json.jbuilder index f5a9c4168..cdd23f220 100644 --- a/app/views/papers/show.json.jbuilder +++ b/app/views/papers/show.json.jbuilder @@ -14,7 +14,7 @@ if @paper.published? if @paper.editor json.editor_name @paper.editor.full_name json.editor_url @paper.editor.url if @paper.editor.url - json.editor_orcid @paper.editor.orcid + json.editor_orcid @paper.editor.orcid if @paper.editor.user end json.reviewers @paper.metadata_reviewers json.languages @paper.language_tags.join(', ') From 1eafeed8e859d4455246cf3be325dfde8c6fbb03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 17 Nov 2021 12:35:29 +0100 Subject: [PATCH 250/609] editor orcid never errors --- app/models/editor.rb | 2 +- app/views/papers/show.json.jbuilder | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/editor.rb b/app/models/editor.rb index c82b02200..8d422b3a4 100644 --- a/app/models/editor.rb +++ b/app/models/editor.rb @@ -67,7 +67,7 @@ def full_name end def orcid - user.uid + user.uid if user end def clear_title diff --git a/app/views/papers/show.json.jbuilder b/app/views/papers/show.json.jbuilder index cdd23f220..4ccd1bc0e 100644 --- a/app/views/papers/show.json.jbuilder +++ b/app/views/papers/show.json.jbuilder @@ -14,7 +14,7 @@ if @paper.published? if @paper.editor json.editor_name @paper.editor.full_name json.editor_url @paper.editor.url if @paper.editor.url - json.editor_orcid @paper.editor.orcid if @paper.editor.user + json.editor_orcid @paper.editor.orcid if @paper.editor.orcid end json.reviewers @paper.metadata_reviewers json.languages @paper.language_tags.join(', ') From 54d32af72ba6a67a7dca2edddafaab8330f22832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 17 Nov 2021 12:35:55 +0100 Subject: [PATCH 251/609] add orcid to editor lookup --- app/controllers/editors_controller.rb | 5 +++-- spec/controllers/editors_controller_spec.rb | 22 +++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/app/controllers/editors_controller.rb b/app/controllers/editors_controller.rb index 1fa07aa4d..6005883f7 100644 --- a/app/controllers/editors_controller.rb +++ b/app/controllers/editors_controller.rb @@ -28,8 +28,9 @@ def lookup url = "https://github.com/#{params[:login]}" end - response = { name: "#{editor.first_name} #{editor.last_name}", - url: url } + response = { name: editor.full_name, + url: url, + orcid: editor.orcid } render json: response.to_json end diff --git a/spec/controllers/editors_controller_spec.rb b/spec/controllers/editors_controller_spec.rb index db3cc8f4d..1b81b0807 100644 --- a/spec/controllers/editors_controller_spec.rb +++ b/spec/controllers/editors_controller_spec.rb @@ -18,6 +18,7 @@ it "should allow the lookup of an editor" do editor = create(:editor) get :lookup, params: {login: editor.login } + expect(JSON.parse(response.body)['name']).to eq('Person McEditor') expect(JSON.parse(response.body)['url']).to eq('http://placekitten.com') end @@ -160,4 +161,25 @@ expect(response).to redirect_to(editors_url) end end + + describe "#lookup" do + it "returns nil orcid if no associated user" do + editor = create(:editor) + get :lookup, params: {login: editor.login } + + expect(JSON.parse(response.body)['name']).to eq('Person McEditor') + expect(JSON.parse(response.body)['url']).to eq('http://placekitten.com') + expect(JSON.parse(response.body)['orcid']).to eq(nil) + end + + it "includes editor's user orcid" do + editor = create(:editor, user: create(:user)) + + get :lookup, params: {login: editor.login } + + expect(JSON.parse(response.body)['name']).to eq('Person McEditor') + expect(JSON.parse(response.body)['url']).to eq('http://placekitten.com') + expect(JSON.parse(response.body)['orcid']).to eq('0000-0000-0000-1234') + end + end end From 99c7068aa2c62d8f5f115f92b1154d65e94892f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 19 Nov 2021 13:00:59 +0100 Subject: [PATCH 252/609] update aasm --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 6a78fd670..9a0486e75 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' ruby '3.0.0' -gem 'aasm', '~> 5.0.5' +gem 'aasm', '~> 5.2.0' gem 'chartkick' gem 'bootsnap' gem 'dotenv', '~> 2.7.6' diff --git a/Gemfile.lock b/Gemfile.lock index 43cb0c831..158621837 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,7 +2,7 @@ GEM remote: https://rubygems.org/ specs: Ascii85 (1.1.0) - aasm (5.0.8) + aasm (5.2.0) concurrent-ruby (~> 1.0) actioncable (6.1.4.1) actionpack (= 6.1.4.1) @@ -430,7 +430,7 @@ PLATFORMS ruby DEPENDENCIES - aasm (~> 5.0.5) + aasm (~> 5.2.0) active_link_to bootsnap bootstrap (~> 4.3.1) From d59a84eb694083f774a4c9ae305d9ba18b64f179 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 19 Nov 2021 13:01:16 +0100 Subject: [PATCH 253/609] expire pending invitations when a paper is rejected --- app/models/invitation.rb | 4 ++++ app/models/paper.rb | 6 +++++- spec/models/invitation_spec.rb | 27 +++++++++++++++++++++++++++ spec/models/paper_spec.rb | 12 ++++++++++++ 4 files changed, 48 insertions(+), 1 deletion(-) diff --git a/app/models/invitation.rb b/app/models/invitation.rb index 915169f15..c120b6da6 100644 --- a/app/models/invitation.rb +++ b/app/models/invitation.rb @@ -39,4 +39,8 @@ def self.resolve_pending(paper, editor) end end end + + def self.expire_all_for_paper(paper) + pending.where(paper: paper).update_all(state: "expired") + end end diff --git a/app/models/paper.rb b/app/models/paper.rb index 4c6759167..d57fcd83e 100644 --- a/app/models/paper.rb +++ b/app/models/paper.rb @@ -43,7 +43,7 @@ class Paper < ApplicationRecord state :withdrawn event :reject do - transitions to: :rejected + transitions to: :rejected, after: :expire_invitations end event :start_meta_review do @@ -176,6 +176,10 @@ def invite_editor(editor_handle) invitations.create(editor: editor) end + def expire_invitations + Invitation.expire_all_for_paper(self) + end + def scholar_title return nil unless published? metadata['paper']['title'] diff --git a/spec/models/invitation_spec.rb b/spec/models/invitation_spec.rb index 5edfd06cf..71e13df11 100644 --- a/spec/models/invitation_spec.rb +++ b/spec/models/invitation_spec.rb @@ -48,4 +48,31 @@ expect { Invitation.resolve_pending(create(:paper), create(:editor)) }.to_not change { Invitation.accepted.count } end end + + describe ".expire_all_for_paper" do + it "should expire all pending invitations for the paper" do + paper = create(:paper) + invitation_1 = create(:invitation, :pending, paper: paper) + invitation_2 = create(:invitation, :pending, paper: paper) + invitation_3 = create(:invitation, :pending) + + Invitation.expire_all_for_paper(paper) + expect(invitation_1.reload).to be_expired + expect(invitation_2.reload).to be_expired + expect(invitation_3.reload).to_not be_expired + end + + it "should not change accepted invitations state" do + invitation = create(:invitation, :accepted) + expect { Invitation.expire_all_for_paper(invitation.paper) }.to_not change { Invitation.pending.count } + expect { Invitation.expire_all_for_paper(invitation.paper) }.to_not change { Invitation.accepted.count } + end + + it "should do nothing if paper has no pending invitations" do + create(:invitation, :accepted) + create(:invitation, :pending) + expect { Invitation.expire_all_for_paper(create(:paper)) }.to_not change { Invitation.pending.count } + expect { Invitation.expire_all_for_paper(create(:paper)) }.to_not change { Invitation.accepted.count } + end + end end diff --git a/spec/models/paper_spec.rb b/spec/models/paper_spec.rb index 8c2a23fd4..2bc69da86 100644 --- a/spec/models/paper_spec.rb +++ b/spec/models/paper_spec.rb @@ -168,6 +168,18 @@ expect(paper.state).to eq('rejected') end + + it "should expire all pending invitations" do + paper = create(:paper, state: "submitted") + invitation_1 = create(:invitation, :pending, paper: paper) + invitation_2 = create(:invitation, :pending, paper: paper) + + paper.reject! + + expect(invitation_1.reload).to be_expired + expect(invitation_2.reload).to be_expired + expect(paper.state).to eq('rejected') + end end context "when starting review" do From cfe573ed5476d202062ad4762427cd1c0be3a82d Mon Sep 17 00:00:00 2001 From: "Daniel S. Katz" Date: Wed, 24 Nov 2021 07:32:29 -0600 Subject: [PATCH 254/609] adding JOSS URL to suggested email --- docs/editing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/editing.md b/docs/editing.md index 37840bd40..131055aff 100644 --- a/docs/editing.md +++ b/docs/editing.md @@ -181,7 +181,7 @@ Dear Dr. Jekyll, I found you following links from the page of The Super Project and/or on Twitter. This message is to ask if you can help us out with a submission to JOSS (The Journal of Open -Source Software), where I’m an editor. +Source Software, https://joss.theoj.org), where I’m an editor. JOSS publishes articles about open source research software. The submission I'd like you to review is titled: "great software name here" From 85d8e3b14775407c41cb0b1bd5b6c211f73e8b90 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Fri, 3 Dec 2021 06:42:07 +0000 Subject: [PATCH 255/609] Copy and paste editor feedback --- app/assets/javascripts/application.js | 11 ++++++++--- app/views/papers/_vote_summary.html.erb | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 59ef8fef9..ae7e99e13 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -21,9 +21,14 @@ $(document).ready(function(){ var clipboard = new Clipboard('.clipboard-btn', { text: function(trigger) { - target = trigger.getAttribute('data-clipboard-target').substring(1); - console.log(target); - return document.getElementById(target).innerHTML; + if (trigger.getAttribute('data-clipboard-target')) { + target = trigger.getAttribute('data-clipboard-target').substring(1); + console.log(target); + return document.getElementById(target).innerHTML; + } + else if (trigger.getAttribute('data-clipboard-text')) { + return trigger.getAttribute('data-clipboard-text'); + } } }); }); diff --git a/app/views/papers/_vote_summary.html.erb b/app/views/papers/_vote_summary.html.erb index a48ab72dd..77fd1a369 100644 --- a/app/views/papers/_vote_summary.html.erb +++ b/app/views/papers/_vote_summary.html.erb @@ -53,7 +53,7 @@ <% end %>
    - + <% end %> From f86b35654e8f81d58e0f22f779a377c53e404983 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 15 Dec 2021 13:15:34 +0100 Subject: [PATCH 256/609] update Rails [security update from 6.1.4.1 to 6.1.4.3] --- Gemfile | 2 +- Gemfile.lock | 130 +++++++++++++++++++++++++-------------------------- 2 files changed, 66 insertions(+), 66 deletions(-) diff --git a/Gemfile b/Gemfile index 9a0486e75..d82fcfd94 100644 --- a/Gemfile +++ b/Gemfile @@ -17,7 +17,7 @@ gem 'octokit', '~> 4.21' gem 'pdf-reader', '~> 2.4.2' gem 'pg', '~> 1.2.3' gem 'will_paginate', '~> 3.3.0' -gem 'rails', '6.1.4.1' +gem 'rails', '6.1.4.3' gem 'responders' gem 'newrelic_rpm' gem 'sanitize', '~> 6.0.0' diff --git a/Gemfile.lock b/Gemfile.lock index 158621837..529ec2662 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,40 +4,40 @@ GEM Ascii85 (1.1.0) aasm (5.2.0) concurrent-ruby (~> 1.0) - actioncable (6.1.4.1) - actionpack (= 6.1.4.1) - activesupport (= 6.1.4.1) + actioncable (6.1.4.3) + actionpack (= 6.1.4.3) + activesupport (= 6.1.4.3) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.4.1) - actionpack (= 6.1.4.1) - activejob (= 6.1.4.1) - activerecord (= 6.1.4.1) - activestorage (= 6.1.4.1) - activesupport (= 6.1.4.1) + actionmailbox (6.1.4.3) + actionpack (= 6.1.4.3) + activejob (= 6.1.4.3) + activerecord (= 6.1.4.3) + activestorage (= 6.1.4.3) + activesupport (= 6.1.4.3) mail (>= 2.7.1) - actionmailer (6.1.4.1) - actionpack (= 6.1.4.1) - actionview (= 6.1.4.1) - activejob (= 6.1.4.1) - activesupport (= 6.1.4.1) + actionmailer (6.1.4.3) + actionpack (= 6.1.4.3) + actionview (= 6.1.4.3) + activejob (= 6.1.4.3) + activesupport (= 6.1.4.3) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.4.1) - actionview (= 6.1.4.1) - activesupport (= 6.1.4.1) + actionpack (6.1.4.3) + actionview (= 6.1.4.3) + activesupport (= 6.1.4.3) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.4.1) - actionpack (= 6.1.4.1) - activerecord (= 6.1.4.1) - activestorage (= 6.1.4.1) - activesupport (= 6.1.4.1) + actiontext (6.1.4.3) + actionpack (= 6.1.4.3) + activerecord (= 6.1.4.3) + activestorage (= 6.1.4.3) + activesupport (= 6.1.4.3) nokogiri (>= 1.8.5) - actionview (6.1.4.1) - activesupport (= 6.1.4.1) + actionview (6.1.4.3) + activesupport (= 6.1.4.3) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -45,22 +45,22 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (6.1.4.1) - activesupport (= 6.1.4.1) + activejob (6.1.4.3) + activesupport (= 6.1.4.3) globalid (>= 0.3.6) - activemodel (6.1.4.1) - activesupport (= 6.1.4.1) - activerecord (6.1.4.1) - activemodel (= 6.1.4.1) - activesupport (= 6.1.4.1) - activestorage (6.1.4.1) - actionpack (= 6.1.4.1) - activejob (= 6.1.4.1) - activerecord (= 6.1.4.1) - activesupport (= 6.1.4.1) + activemodel (6.1.4.3) + activesupport (= 6.1.4.3) + activerecord (6.1.4.3) + activemodel (= 6.1.4.3) + activesupport (= 6.1.4.3) + activestorage (6.1.4.3) + actionpack (= 6.1.4.3) + activejob (= 6.1.4.3) + activerecord (= 6.1.4.3) + activesupport (= 6.1.4.3) marcel (~> 1.0.0) mini_mime (>= 1.1.0) - activesupport (6.1.4.1) + activesupport (6.1.4.3) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -141,7 +141,7 @@ GEM faraday-net_http_persistent (1.1.0) ffi (1.15.0) formatador (0.2.5) - globalid (0.5.2) + globalid (1.0.0) activesupport (>= 5.0) google-apis-core (0.3.0) addressable (~> 2.5, >= 2.5.1) @@ -195,7 +195,7 @@ GEM nokogiri (>= 1.4) http_parser.rb (0.6.0) httpclient (2.8.3) - i18n (1.8.10) + i18n (1.8.11) concurrent-ruby (~> 1.0) issue (0.1.0) openssl @@ -211,18 +211,18 @@ GEM listen (3.5.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.12.0) + loofah (2.13.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) lumberjack (1.2.8) mail (2.7.1) mini_mime (>= 0.1.1) - marcel (1.0.1) + marcel (1.0.2) memoist (0.16.2) method_source (1.0.0) - mini_mime (1.1.1) + mini_mime (1.1.2) mini_portile2 (2.6.1) - minitest (5.14.4) + minitest (5.15.0) msgpack (1.4.2) multi_json (1.15.0) multi_xml (0.6.0) @@ -288,20 +288,20 @@ GEM rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.1.4.1) - actioncable (= 6.1.4.1) - actionmailbox (= 6.1.4.1) - actionmailer (= 6.1.4.1) - actionpack (= 6.1.4.1) - actiontext (= 6.1.4.1) - actionview (= 6.1.4.1) - activejob (= 6.1.4.1) - activemodel (= 6.1.4.1) - activerecord (= 6.1.4.1) - activestorage (= 6.1.4.1) - activesupport (= 6.1.4.1) + rails (6.1.4.3) + actioncable (= 6.1.4.3) + actionmailbox (= 6.1.4.3) + actionmailer (= 6.1.4.3) + actionpack (= 6.1.4.3) + actiontext (= 6.1.4.3) + actionview (= 6.1.4.3) + activejob (= 6.1.4.3) + activemodel (= 6.1.4.3) + activerecord (= 6.1.4.3) + activestorage (= 6.1.4.3) + activesupport (= 6.1.4.3) bundler (>= 1.15.0) - railties (= 6.1.4.1) + railties (= 6.1.4.3) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -310,11 +310,11 @@ GEM rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.4.1) + rails-html-sanitizer (1.4.2) loofah (~> 2.3) - railties (6.1.4.1) - actionpack (= 6.1.4.1) - activesupport (= 6.1.4.1) + railties (6.1.4.3) + actionpack (= 6.1.4.3) + activesupport (= 6.1.4.3) method_source rake (>= 0.13) thor (~> 1.0) @@ -391,9 +391,9 @@ GEM sprockets (4.0.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.2.2) - actionpack (>= 4.0) - activesupport (>= 4.0) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) sprockets (>= 3.0.0) thor (1.1.0) tilt (2.0.10) @@ -424,7 +424,7 @@ GEM will_paginate (3.3.0) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.4.2) + zeitwerk (2.5.1) PLATFORMS ruby @@ -458,7 +458,7 @@ DEPENDENCIES pg (~> 1.2.3) pry-byebug rack-livereload - rails (= 6.1.4.1) + rails (= 6.1.4.3) rails-controller-testing (~> 1.0.5) responders rspec-rails (~> 5.0.0) From d7c4fbd9c8d1b6abb98c3d6614da8ecf43a2e447 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 16 Dec 2021 12:08:38 +0100 Subject: [PATCH 257/609] another rails upgrade --- Gemfile | 2 +- Gemfile.lock | 108 +++++++++++++++++++++++++-------------------------- 2 files changed, 55 insertions(+), 55 deletions(-) diff --git a/Gemfile b/Gemfile index d82fcfd94..4f0e45a2d 100644 --- a/Gemfile +++ b/Gemfile @@ -17,7 +17,7 @@ gem 'octokit', '~> 4.21' gem 'pdf-reader', '~> 2.4.2' gem 'pg', '~> 1.2.3' gem 'will_paginate', '~> 3.3.0' -gem 'rails', '6.1.4.3' +gem 'rails', '6.1.4.4' gem 'responders' gem 'newrelic_rpm' gem 'sanitize', '~> 6.0.0' diff --git a/Gemfile.lock b/Gemfile.lock index 529ec2662..3cc48471a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,40 +4,40 @@ GEM Ascii85 (1.1.0) aasm (5.2.0) concurrent-ruby (~> 1.0) - actioncable (6.1.4.3) - actionpack (= 6.1.4.3) - activesupport (= 6.1.4.3) + actioncable (6.1.4.4) + actionpack (= 6.1.4.4) + activesupport (= 6.1.4.4) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.4.3) - actionpack (= 6.1.4.3) - activejob (= 6.1.4.3) - activerecord (= 6.1.4.3) - activestorage (= 6.1.4.3) - activesupport (= 6.1.4.3) + actionmailbox (6.1.4.4) + actionpack (= 6.1.4.4) + activejob (= 6.1.4.4) + activerecord (= 6.1.4.4) + activestorage (= 6.1.4.4) + activesupport (= 6.1.4.4) mail (>= 2.7.1) - actionmailer (6.1.4.3) - actionpack (= 6.1.4.3) - actionview (= 6.1.4.3) - activejob (= 6.1.4.3) - activesupport (= 6.1.4.3) + actionmailer (6.1.4.4) + actionpack (= 6.1.4.4) + actionview (= 6.1.4.4) + activejob (= 6.1.4.4) + activesupport (= 6.1.4.4) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.4.3) - actionview (= 6.1.4.3) - activesupport (= 6.1.4.3) + actionpack (6.1.4.4) + actionview (= 6.1.4.4) + activesupport (= 6.1.4.4) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.4.3) - actionpack (= 6.1.4.3) - activerecord (= 6.1.4.3) - activestorage (= 6.1.4.3) - activesupport (= 6.1.4.3) + actiontext (6.1.4.4) + actionpack (= 6.1.4.4) + activerecord (= 6.1.4.4) + activestorage (= 6.1.4.4) + activesupport (= 6.1.4.4) nokogiri (>= 1.8.5) - actionview (6.1.4.3) - activesupport (= 6.1.4.3) + actionview (6.1.4.4) + activesupport (= 6.1.4.4) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -45,22 +45,22 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (6.1.4.3) - activesupport (= 6.1.4.3) + activejob (6.1.4.4) + activesupport (= 6.1.4.4) globalid (>= 0.3.6) - activemodel (6.1.4.3) - activesupport (= 6.1.4.3) - activerecord (6.1.4.3) - activemodel (= 6.1.4.3) - activesupport (= 6.1.4.3) - activestorage (6.1.4.3) - actionpack (= 6.1.4.3) - activejob (= 6.1.4.3) - activerecord (= 6.1.4.3) - activesupport (= 6.1.4.3) + activemodel (6.1.4.4) + activesupport (= 6.1.4.4) + activerecord (6.1.4.4) + activemodel (= 6.1.4.4) + activesupport (= 6.1.4.4) + activestorage (6.1.4.4) + actionpack (= 6.1.4.4) + activejob (= 6.1.4.4) + activerecord (= 6.1.4.4) + activesupport (= 6.1.4.4) marcel (~> 1.0.0) mini_mime (>= 1.1.0) - activesupport (6.1.4.3) + activesupport (6.1.4.4) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -288,20 +288,20 @@ GEM rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.1.4.3) - actioncable (= 6.1.4.3) - actionmailbox (= 6.1.4.3) - actionmailer (= 6.1.4.3) - actionpack (= 6.1.4.3) - actiontext (= 6.1.4.3) - actionview (= 6.1.4.3) - activejob (= 6.1.4.3) - activemodel (= 6.1.4.3) - activerecord (= 6.1.4.3) - activestorage (= 6.1.4.3) - activesupport (= 6.1.4.3) + rails (6.1.4.4) + actioncable (= 6.1.4.4) + actionmailbox (= 6.1.4.4) + actionmailer (= 6.1.4.4) + actionpack (= 6.1.4.4) + actiontext (= 6.1.4.4) + actionview (= 6.1.4.4) + activejob (= 6.1.4.4) + activemodel (= 6.1.4.4) + activerecord (= 6.1.4.4) + activestorage (= 6.1.4.4) + activesupport (= 6.1.4.4) bundler (>= 1.15.0) - railties (= 6.1.4.3) + railties (= 6.1.4.4) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -312,9 +312,9 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.4.2) loofah (~> 2.3) - railties (6.1.4.3) - actionpack (= 6.1.4.3) - activesupport (= 6.1.4.3) + railties (6.1.4.4) + actionpack (= 6.1.4.4) + activesupport (= 6.1.4.4) method_source rake (>= 0.13) thor (~> 1.0) @@ -458,7 +458,7 @@ DEPENDENCIES pg (~> 1.2.3) pry-byebug rack-livereload - rails (= 6.1.4.3) + rails (= 6.1.4.4) rails-controller-testing (~> 1.0.5) responders rspec-rails (~> 5.0.0) From fa63bc8321dc7c42dbc41318fe0437950e5dc773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 30 Sep 2021 14:10:12 +0200 Subject: [PATCH 258/609] update ruby to 3.0.2 --- .github/workflows/tests.yml | 2 +- .ruby-version | 2 +- Gemfile | 2 +- Gemfile.lock | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 31da408d4..5b2cc9f10 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,7 +19,7 @@ jobs: - name: Install Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3.0.0 + ruby-version: 3.0.2 bundler-cache: true - name: Install Elasticsearch uses: ankane/setup-elasticsearch@v1 diff --git a/.ruby-version b/.ruby-version index 4a36342fc..b50214693 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.0.0 +3.0.2 diff --git a/Gemfile b/Gemfile index 4f0e45a2d..b7046ca76 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ source 'https://rubygems.org' -ruby '3.0.0' +ruby '3.0.2' gem 'aasm', '~> 5.2.0' gem 'chartkick' diff --git a/Gemfile.lock b/Gemfile.lock index 3cc48471a..c3a080f8e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -476,7 +476,7 @@ DEPENDENCIES will_paginate (~> 3.3.0) RUBY VERSION - ruby 3.0.0p0 + ruby 3.0.2p107 BUNDLED WITH - 2.2.16 + 2.2.22 From 8ab2adef8fd27e9c1f52246f30d67781eefc9eed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 30 Sep 2021 14:27:19 +0200 Subject: [PATCH 259/609] remove reviewers checklists from the review body --- .../content/github/_review_checklist.erb | 39 ---------------- app/views/shared/review_body.text.erb | 18 +++----- spec/models/paper_spec.rb | 46 ++----------------- 3 files changed, 11 insertions(+), 92 deletions(-) delete mode 100644 app/views/content/github/_review_checklist.erb diff --git a/app/views/content/github/_review_checklist.erb b/app/views/content/github/_review_checklist.erb deleted file mode 100644 index d6f7bc589..000000000 --- a/app/views/content/github/_review_checklist.erb +++ /dev/null @@ -1,39 +0,0 @@ -✨ Important: Please do not use the _Convert to issue_ functionality when working through this checklist, instead, please open any new issues associated with your review <%= link_to "in the software repository associated with the submission", paper.repository_url, target: "_blank" %>. ✨ - -### Conflict of interest - -- [ ] I confirm that I have read the [JOSS conflict of interest (COI) policy](https://github.com/openjournals/joss/blob/master/COI.md) and that: I have no COIs with reviewing this work or that any perceived COIs have been waived by JOSS for the purpose of this review. - -### Code of Conduct - -- [ ] I confirm that I read and will adhere to the [JOSS code of conduct](https://joss.theoj.org/about#code_of_conduct). - -### General checks - -- [ ] **Repository:** Is the source code for this software available at the <%= link_to "repository url", paper.repository_url, target: "_blank" %>? -- [ ] **License:** Does the repository contain a plain-text LICENSE file with the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) software license? -- [ ] **Contribution and authorship:** Has the submitting author (<%= paper.submitting_author.github_username %>) made major contributions to the software? Does the full list of paper authors seem appropriate and complete? -- [ ] **Substantial scholarly effort:** Does this submission meet the scope eligibility described in the [JOSS guidelines](https://joss.readthedocs.io/en/latest/submitting.html#substantial-scholarly-effort) - -### Functionality - -- [ ] **Installation:** Does installation proceed as outlined in the documentation? -- [ ] **Functionality:** Have the functional claims of the software been confirmed? -- [ ] **Performance:** If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.) - -### Documentation - -- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is? -- [ ] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution. -- [ ] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems). -- [ ] **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)? -- [ ] **Automated tests:** Are there automated tests or manual steps described so that the functionality of the software can be verified? -- [ ] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support - -### Software paper - -- [ ] **Summary:** Has a clear description of the high-level functionality and purpose of the software for a diverse, non-specialist audience been provided? -- [ ] **A statement of need:** Does the paper have a section titled 'Statement of Need' that clearly states what problems the software is designed to solve and who the target audience is? -- [ ] **State of the field:** Do the authors describe how this software compares to other commonly-used packages? -- [ ] **Quality of writing:** Is the paper well written (i.e., it does not require editing for structure, language, or writing quality)? -- [ ] **References:** Is the list of references complete, and is everything cited appropriately that should be cited (e.g., papers, datasets, software)? Do references in the text use the proper [citation syntax]( https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html#citation_syntax)? diff --git a/app/views/shared/review_body.text.erb b/app/views/shared/review_body.text.erb index f5df8a60e..bad462578 100644 --- a/app/views/shared/review_body.text.erb +++ b/app/views/shared/review_body.text.erb @@ -26,19 +26,13 @@ Please avoid lengthy details of difficulties in the review thread. Instead, plea ## Reviewer instructions & questions -<%= reviewers.join(' & ').html_safe %>, please carry out your review in this issue by updating the checklist below. If you cannot edit the checklist please: -1. Make sure you're logged in to your GitHub account -2. Be sure to accept the invite at this URL: https://github.com/openjournals/joss-reviews/invitations +<%= reviewers.join(' & ').html_safe %>, your review will be checklist based. Each of you will have a separate checklist that you should update when carrying out your review. +First of all you need to run this command in a separate comment to create the checklist: + +``` +@whedon generate my checklist +``` The reviewer guidelines are available here: https://joss.readthedocs.io/en/latest/reviewer_guidelines.html. Any questions/concerns please let <%= editor %> know. ✨ **Please start on your review when you are able, and be sure to complete your review in the next six weeks, at the very latest** ✨ - -<%- reviewers.each do |reviewer| %> -## Review checklist for <%= reviewer %> -<%- if paper.kind.present? %> -<%= render partial: "content/github/#{paper.kind}_review_checklist", locals: local_assigns %> -<%- else %> -<%= render partial: "content/github/review_checklist", locals: local_assigns %> -<%- end %> -<%- end %> diff --git a/spec/models/paper_spec.rb b/spec/models/paper_spec.rb index 2bc69da86..8bbb921d3 100644 --- a/spec/models/paper_spec.rb +++ b/spec/models/paper_spec.rb @@ -228,55 +228,19 @@ refute Paper.visible.include?(paper) end - describe "#review_body with a single author" do - let(:author) { create(:user) } - let(:paper) do - instance = build(:paper_with_sha, user_id: author.id, kind: kind) - instance.save(validate: false) - instance - end - subject { paper.review_body("editor_name", "reviewer_name") } - - context "with a paper type" do - let(:kind) { "something_else" } - - it "renders the type-specific checklist" do - expect { - subject - }.to raise_error( - ActionView::Template::Error, - %r(Missing partial content/github/_something_else_review_checklist) - ) - end - end - - context "with no paper type" do - let(:kind) { nil } - it { is_expected.to match /Reviewer:/ } - it { is_expected.to match /JOSS conflict of interest/ } - it { is_expected.to match /Does the repository contain a plain-text LICENSE file/ } - it { is_expected.to match /Does installation proceed as outlined/ } - it { is_expected.to match /Are there automated tests/ } - end - end - - describe "#review_body with multiple reviewers" do + describe "#review_body" do let(:author) { create(:user) } let(:paper) do instance = build(:paper, user_id: author.id, kind: kind) instance.save(validate: false) instance end + let(:kind) { nil } subject { paper.review_body("editor_name", "mickey,mouse") } - context "with no paper type" do - let(:kind) { nil } - it { is_expected.to match /Reviewer:/ } - it { is_expected.to match /Review checklist for @mickey/ } - it { is_expected.to match /Review checklist for @mouse/ } - it { is_expected.to match /\/papers\/#{paper.sha}/ } - it { is_expected.to match /#{paper.repository_url}/ } - end + it { is_expected.to match /Reviewer:/ } + it { is_expected.to match /\/papers\/#{paper.sha}/ } + it { is_expected.to match /#{paper.repository_url}/ } end describe "#meta_review_body" do From d16ee951400286952200a96870ea5cb9c04042e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 4 Oct 2021 10:55:50 +0200 Subject: [PATCH 260/609] remove percent_complete from papers --- app/controllers/home_controller.rb | 6 +++--- app/helpers/dispatch_helper.rb | 1 - app/models/paper.rb | 14 -------------- app/views/home/reviews.html.erb | 4 +--- ...04085341_remove_percent_complete_from_papers.rb | 5 +++++ db/schema.rb | 4 +--- spec/controllers/dispatch_controller_spec.rb | 4 ---- spec/fixtures/whedon-review-edit.json | 4 ++-- 8 files changed, 12 insertions(+), 30 deletions(-) create mode 100644 db/migrate/20211004085341_remove_percent_complete_from_papers.rb diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 773db6e9b..2cc69e748 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -99,7 +99,7 @@ def reviews per_page: 20 ) else - @papers = Paper.unscoped.in_progress.where(editor: @editor).order(percent_complete: @order).paginate( + @papers = Paper.unscoped.in_progress.where(editor: @editor).order(created_at: @order).paginate( page: params[:page], per_page: 20 ) @@ -139,7 +139,7 @@ def in_progress per_page: 20 ) else - @papers = Paper.unscoped.in_progress.order(percent_complete: @order).paginate( + @papers = Paper.unscoped.in_progress.order(created_at: @order).paginate( page: params[:page], per_page: 20 ) @@ -177,7 +177,7 @@ def all per_page: 20 ) else - @papers = Paper.unscoped.all.order(percent_complete: @order).paginate( + @papers = Paper.unscoped.all.order(created_at: @order).paginate( page: params[:page], per_page: 20 ) diff --git a/app/helpers/dispatch_helper.rb b/app/helpers/dispatch_helper.rb index 04998a1d4..448c56856 100644 --- a/app/helpers/dispatch_helper.rb +++ b/app/helpers/dispatch_helper.rb @@ -38,7 +38,6 @@ def process_edit @paper.activities['issues']['last_edits'] ||= {} @paper.activities['issues']['last_edits'][@context.sender] = updated_at - @paper.percent_complete = @paper.fraction_check_boxes_complete @paper.last_activity = updated_at @paper.save end diff --git a/app/models/paper.rb b/app/models/paper.rb index d57fcd83e..4897d86f4 100644 --- a/app/models/paper.rb +++ b/app/models/paper.rb @@ -434,20 +434,6 @@ def pretty_state state.humanize.downcase end - def fraction_check_boxes_complete - return 0.0 if review_issue_id.nil? - issue = GITHUB.issue(Rails.application.settings["reviews"], review_issue_id) - - checkbox_count = issue.body.scan(/(- \[ \]|- \[x\])/m).count - checked_checkbox_count = issue.body.scan(/(- \[x\])/m).count - - return checked_checkbox_count.to_f / checkbox_count - end - - def pretty_percentage - (percent_complete * 100).to_i - end - # Returns DOI with URL e.g. "https://doi.org/10.21105/joss.00001" def cross_ref_doi_url "https://doi.org/#{doi}" diff --git a/app/views/home/reviews.html.erb b/app/views/home/reviews.html.erb index 40e2715ba..547badbc8 100644 --- a/app/views/home/reviews.html.erb +++ b/app/views/home/reviews.html.erb @@ -42,7 +42,7 @@ - + <% unless params[:editor]%> @@ -50,7 +50,6 @@ - @@ -69,7 +68,6 @@ <%- end %> - <% end %> diff --git a/db/migrate/20211004085341_remove_percent_complete_from_papers.rb b/db/migrate/20211004085341_remove_percent_complete_from_papers.rb new file mode 100644 index 000000000..9f24939ec --- /dev/null +++ b/db/migrate/20211004085341_remove_percent_complete_from_papers.rb @@ -0,0 +1,5 @@ +class RemovePercentCompleteFromPapers < ActiveRecord::Migration[6.1] + def change + remove_column :papers, :percent_complete, :float, default: 0.0 + end +end diff --git a/db/schema.rb b/db/schema.rb index 757b9c4b2..c386e03ba 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2021_07_06_101511) do +ActiveRecord::Schema.define(version: 2021_10_04_085341) do # These are extensions that must be enabled in order to support this database enable_extension "hstore" @@ -102,12 +102,10 @@ t.boolean "archived", default: false t.integer "eic_id" t.string "submission_kind" - t.float "percent_complete", default: 0.0 t.index ["editor_id"], name: "index_papers_on_editor_id" t.index ["eic_id"], name: "index_papers_on_eic_id" t.index ["labels"], name: "index_papers_on_labels", using: :gin t.index ["last_activity"], name: "index_papers_on_last_activity" - t.index ["percent_complete"], name: "index_papers_on_percent_complete" t.index ["reviewers"], name: "index_papers_on_reviewers", using: :gin t.index ["sha"], name: "index_papers_on_sha" t.index ["user_id"], name: "index_papers_on_user_id" diff --git a/spec/controllers/dispatch_controller_spec.rb b/spec/controllers/dispatch_controller_spec.rb index 05efd7590..6074ebbbd 100644 --- a/spec/controllers/dispatch_controller_spec.rb +++ b/spec/controllers/dispatch_controller_spec.rb @@ -126,10 +126,6 @@ def headers(event, payload) expect(@paper.activities).to eq({"issues"=>{"commenters"=>{"pre-review"=>{}, "review"=>{}}, "comments"=>[], "last_comments" => {}, "last_edits"=>{"comment-editor"=>"2018-10-06T16:18:56Z"}}}) end - it "should update the percent_complete value" do - expect(@paper.percent_complete).to eq(0.9375) - end - it "should update the last_activity field" do github_updated_at = JSON.parse(whedon_review_edit)['issue']['updated_at'].to_datetime.strftime("%Y-%m-%dT%l:%M:%S%z") expect(@paper.last_activity.strftime('%Y-%m-%dT%l:%M:%S%z')).to eql(github_updated_at) diff --git a/spec/fixtures/whedon-review-edit.json b/spec/fixtures/whedon-review-edit.json index 1008789a4..aad8cf0f5 100644 --- a/spec/fixtures/whedon-review-edit.json +++ b/spec/fixtures/whedon-review-edit.json @@ -91,11 +91,11 @@ "updated_at": "2018-10-06T16:18:56Z", "closed_at": null, "author_association": "COLLABORATOR", - "body": "**Submitting author:** @ifellows (Ian Fellows)\n**Repository:** https://github.com/fellstat/ipc\n**Version:** 0.1.0\n**Editor:** @yochannah\n**Reviewer:** @mschubert , @JohnCoene\n**Archive:** Pending\n\n## Status\n\n[![status](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230/status.svg)](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230)\n\nStatus badge code:\n\n```\nHTML: \nMarkdown: [![status](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230/status.svg)](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230)\n```\n**Reviewers and authors**:\n\nPlease avoid lengthy details of difficulties in the review thread. Instead, please create a new issue in the target repository and link to those issues (especially acceptance-blockers) in the review thread below. (For completists: if the target issue tracker is also on GitHub, linking the review thread in the issue or vice versa will create corresponding breadcrumb trails in the link target.)\n\n## Reviewer instructions & questions\n\n@mschubert & @JohnCoene, please carry out your review in this issue by updating the checklist below. If you cannot edit the checklist please:\n1. Make sure you're logged in to your GitHub account\n2. Be sure to accept the invite at this URL: https://github.com/openjournals/joss-reviews-testing/invitations\n\nThe reviewer guidelines are available here: https://joss.theoj.org/about#reviewer_guidelines. Any questions/concerns please let @yochannah know.\n\n✨ **Please try and complete your review in the next two weeks** ✨ \n\n## Review checklist for @mschubert \n### Conflict of interest\n\n- [x] As the reviewer I confirm that I have read the [JOSS conflict of interest policy](https://github.com/openjournals/joss/blob/master/COI.md) and that there are no conflicts of interest for me to review this work.\n\n### Code of Conduct\n\n- [x] I confirm that I read and will adhere to the [JOSS code of conduct](https://joss.theoj.org/about#code_of_conduct).\n\n### General checks\n\n- [x] **Repository:** Is the source code for this software available at the repository url?\n- [ ] **License:** Does the repository contain a plain-text LICENSE file with the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) software license?\n- [ ] **Version:** Does the release version given match the GitHub release (0.1.0)?\n- [x] **Authorship:** Has the submitting author (@ifellows) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?\n\n### Functionality\n\n- [x] **Installation:** Does installation proceed as outlined in the documentation?\n- [x] **Functionality:** Have the functional claims of the software been confirmed?\n- [ ] **Performance:** If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)\n\n### Documentation\n\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.\n- [x] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).\n- [x] **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?\n- [ ] **Automated tests:** Are there automated tests or manual steps described so that the function of the software can be verified?\n- [ ] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\n\n### Software paper\n\n- [ ] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [ ] **References:** Do all archival references that should have a DOI list one (e.g., papers, datasets, software)?\n\n## Review checklist for @JohnCoene\n### Conflict of interest\n\n- [x] As the reviewer I confirm that I have read the [JOSS conflict of interest policy](https://github.com/openjournals/joss/blob/master/COI.md) and that there are no conflicts of interest for me to review this work.\n\n### Code of Conduct\n\n- [x] I confirm that I read and will adhere to the [JOSS code of conduct](https://joss.theoj.org/about#code_of_conduct).\n\n### General checks\n\n- [x] **Repository:** Is the source code for this software available at the repository url?\n- [x] **License:** Does the repository contain a plain-text LICENSE file with the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) software license?\n- [x] **Version:** Does the release version given match the GitHub release (0.1.0)?\n- [x] **Authorship:** Has the submitting author (@ifellows) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?\n\n### Functionality\n\n- [x] **Installation:** Does installation proceed as outlined in the documentation?\n- [ ] **Functionality:** Have the functional claims of the software been confirmed?\n- [ ] **Performance:** If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)\n\n### Documentation\n\n- [x] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.\n- [x] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).\n- [x] **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?\n- [x] **Automated tests:** Are there automated tests or manual steps described so that the function of the software can be verified?\n- [x] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\n\n### Software paper\n\n- [x] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\n- [x] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **References:** Do all archival references that should have a DOI list one (e.g., papers, datasets, software)?\n\n" + "body": "**Submitting author:** @ifellows (Ian Fellows)\n**Repository:** https://github.com/fellstat/ipc\n**Version:** 0.1.0\n**Editor:** @yochannah\n**Reviewer:** @mschubert , @JohnCoene\n**Archive:** Pending\n\n## Status\n\n[![status](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230/status.svg)](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230)\n\nStatus badge code:\n\n```\nHTML: \nMarkdown: [![status](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230/status.svg)](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230)\n```\n**Reviewers and authors**:\n\nPlease avoid lengthy details of difficulties in the review thread. Instead, please create a new issue in the target repository and link to those issues (especially acceptance-blockers) in the review thread below. (For completists: if the target issue tracker is also on GitHub, linking the review thread in the issue or vice versa will create corresponding breadcrumb trails in the link target.)\n\n## Reviewer instructions & questions\n\n@mschubert & @JohnCoene, please carry out your review in this issue by updating the checklist below. If you cannot edit the checklist please:\n1. Make sure you're logged in to your GitHub account\n2. Be sure to accept the invite at this URL: https://github.com/openjournals/joss-reviews-testing/invitations\n\nThe reviewer guidelines are available here: https://joss.theoj.org/about#reviewer_guidelines. Any questions/concerns please let @yochannah know.\n\n✨ **Please try and complete your review in the next two weeks** ✨ \n\n" }, "changes": { "body": { - "from": "**Submitting author:** @ifellows (Ian Fellows)\n**Repository:** https://github.com/fellstat/ipc\n**Version:** 0.1.0\n**Editor:** @yochannah\n**Reviewer:** @mschubert , @JohnCoene\n**Archive:** Pending\n\n## Status\n\n[![status](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230/status.svg)](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230)\n\nStatus badge code:\n\n```\nHTML: \nMarkdown: [![status](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230/status.svg)](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230)\n```\n**Reviewers and authors**:\n\nPlease avoid lengthy details of difficulties in the review thread. Instead, please create a new issue in the target repository and link to those issues (especially acceptance-blockers) in the review thread below. (For completists: if the target issue tracker is also on GitHub, linking the review thread in the issue or vice versa will create corresponding breadcrumb trails in the link target.)\n\n## Reviewer instructions & questions\n\n@mschubert & @JohnCoene, please carry out your review in this issue by updating the checklist below. If you cannot edit the checklist please:\n1. Make sure you're logged in to your GitHub account\n2. Be sure to accept the invite at this URL: https://github.com/openjournals/joss-reviews-testing/invitations\n\nThe reviewer guidelines are available here: https://joss.theoj.org/about#reviewer_guidelines. Any questions/concerns please let @yochannah know.\n\n✨ **Please try and complete your review in the next two weeks** ✨ \n\n## Review checklist for @mschubert \n### Conflict of interest\n\n- [x] As the reviewer I confirm that I have read the [JOSS conflict of interest policy](https://github.com/openjournals/joss/blob/master/COI.md) and that there are no conflicts of interest for me to review this work.\n\n### Code of Conduct\n\n- [x] I confirm that I read and will adhere to the [JOSS code of conduct](https://joss.theoj.org/about#code_of_conduct).\n\n### General checks\n\n- [x] **Repository:** Is the source code for this software available at the repository url?\n- [ ] **License:** Does the repository contain a plain-text LICENSE file with the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) software license?\n- [ ] **Version:** Does the release version given match the GitHub release (0.1.0)?\n- [x] **Authorship:** Has the submitting author (@ifellows) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?\n\n### Functionality\n\n- [x] **Installation:** Does installation proceed as outlined in the documentation?\n- [ ] **Functionality:** Have the functional claims of the software been confirmed?\n- [ ] **Performance:** If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)\n\n### Documentation\n\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.\n- [x] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).\n- [x] **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?\n- [ ] **Automated tests:** Are there automated tests or manual steps described so that the function of the software can be verified?\n- [ ] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\n\n### Software paper\n\n- [ ] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\n- [ ] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [ ] **References:** Do all archival references that should have a DOI list one (e.g., papers, datasets, software)?\n\n## Review checklist for @JohnCoene\n### Conflict of interest\n\n- [x] As the reviewer I confirm that I have read the [JOSS conflict of interest policy](https://github.com/openjournals/joss/blob/master/COI.md) and that there are no conflicts of interest for me to review this work.\n\n### Code of Conduct\n\n- [x] I confirm that I read and will adhere to the [JOSS code of conduct](https://joss.theoj.org/about#code_of_conduct).\n\n### General checks\n\n- [x] **Repository:** Is the source code for this software available at the repository url?\n- [x] **License:** Does the repository contain a plain-text LICENSE file with the contents of an [OSI approved](https://opensource.org/licenses/alphabetical) software license?\n- [x] **Version:** Does the release version given match the GitHub release (0.1.0)?\n- [x] **Authorship:** Has the submitting author (@ifellows) made major contributions to the software? Does the full list of paper authors seem appropriate and complete?\n\n### Functionality\n\n- [x] **Installation:** Does installation proceed as outlined in the documentation?\n- [ ] **Functionality:** Have the functional claims of the software been confirmed?\n- [ ] **Performance:** If there are any performance claims of the software, have they been confirmed? (If there are no claims, please check off this item.)\n\n### Documentation\n\n- [x] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **Installation instructions:** Is there a clearly-stated list of dependencies? Ideally these should be handled with an automated package management solution.\n- [x] **Example usage:** Do the authors include examples of how to use the software (ideally to solve real-world analysis problems).\n- [x] **Functionality documentation:** Is the core functionality of the software documented to a satisfactory level (e.g., API method documentation)?\n- [x] **Automated tests:** Are there automated tests or manual steps described so that the function of the software can be verified?\n- [x] **Community guidelines:** Are there clear guidelines for third parties wishing to 1) Contribute to the software 2) Report issues or problems with the software 3) Seek support\n\n### Software paper\n\n- [x] **Authors:** Does the `paper.md` file include a list of authors with their affiliations?\n- [x] **A statement of need:** Do the authors clearly state what problems the software is designed to solve and who the target audience is?\n- [x] **References:** Do all archival references that should have a DOI list one (e.g., papers, datasets, software)?\n\n" + "from": "**Submitting author:** @ifellows (Ian Fellows)\n**Repository:** https://github.com/fellstat/ipc\n**Version:** 0.2.0\n**Editor:** @yochannah\n**Reviewer:** @mschubert , @JohnCoene\n**Archive:** Pending\n\n## Status\n\n[![status](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230/status.svg)](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230)\n\nStatus badge code:\n\n```\nHTML: \nMarkdown: [![status](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230/status.svg)](http://joss.theoj.org/papers/d422d276dd8f38e922b151e4ff248230)\n```\n**Reviewers and authors**:\n\nPlease avoid lengthy details of difficulties in the review thread. Instead, please create a new issue in the target repository and link to those issues (especially acceptance-blockers) in the review thread below. (For completists: if the target issue tracker is also on GitHub, linking the review thread in the issue or vice versa will create corresponding breadcrumb trails in the link target.)\n\n## Reviewer instructions & questions\n\n@mschubert & @JohnCoene, please carry out your review in this issue by updating the checklist below. If you cannot edit the checklist please:\n1. Make sure you're logged in to your GitHub account\n2. Be sure to accept the invite at this URL: https://github.com/openjournals/joss-reviews-testing/invitations\n\nThe reviewer guidelines are available here: https://joss.theoj.org/about#reviewer_guidelines. Any questions/concerns please let @yochannah know.\n\n✨ **Please try and complete your review in the next two weeks** ✨ \n\n" } }, "repository": { From 10c0b06535b393b4c4c03d9caeac2fa61fb0d278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 13 Dec 2021 11:25:55 +0100 Subject: [PATCH 261/609] update ruby --- .github/workflows/tests.yml | 2 +- Gemfile | 2 +- Gemfile.lock | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5b2cc9f10..bae8edc07 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,7 +19,7 @@ jobs: - name: Install Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3.0.2 + ruby-version: 3.0.3 bundler-cache: true - name: Install Elasticsearch uses: ankane/setup-elasticsearch@v1 diff --git a/Gemfile b/Gemfile index b7046ca76..b257965d9 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ source 'https://rubygems.org' -ruby '3.0.2' +ruby '3.0.3' gem 'aasm', '~> 5.2.0' gem 'chartkick' diff --git a/Gemfile.lock b/Gemfile.lock index c3a080f8e..0142e4630 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -72,7 +72,7 @@ GEM autoprefixer-rails (10.2.4.0) execjs bindex (0.8.1) - bootsnap (1.7.4) + bootsnap (1.9.3) msgpack (~> 1.0) bootstrap (4.3.1) autoprefixer-rails (>= 9.1.0) @@ -476,7 +476,7 @@ DEPENDENCIES will_paginate (~> 3.3.0) RUBY VERSION - ruby 3.0.2p107 + ruby 3.0.3p157 BUNDLED WITH - 2.2.22 + 2.2.33 From bc988c385e8fd36058ae4aeed06f08a9573ebc82 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 24 Oct 2021 12:28:59 +0100 Subject: [PATCH 262/609] Adding test config --- config/repository.yml | 2 +- config/settings-production.yml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config/repository.yml b/config/repository.yml index 13750c4a3..7ee620428 100644 --- a/config/repository.yml +++ b/config/repository.yml @@ -1,3 +1,3 @@ openjournals/joss-reviews-testing: editor_team_id: 2009411 - papers: openjournals/joss-papers + papers: openjournals/joss-papers-testing diff --git a/config/settings-production.yml b/config/settings-production.yml index c41e15fa0..defb37c51 100644 --- a/config/settings-production.yml +++ b/config/settings-production.yml @@ -3,16 +3,16 @@ name: "Journal of Open Source Software" abbreviation: "JOSS" issn: "2475-9066" tagline: "a developer friendly, open access journal for research software packages." -logo_url: "http://joss.theoj.org/logo_large.jpg" -url: "https://joss.theoj.org" +logo_url: "http://test.joss.theoj.org/logo_large.jpg" +url: "https://test.joss.theoj.org" editor_email: "admin@theoj.org" noreply_email: "noreply@joss.theoj.org" twitter: "@JOSS_TheOJ" google_analytics: "UA-47852178-4" github: "openjournals/joss" -reviews: "openjournals/joss-reviews" -papers_html_url: "https://www.theoj.org/joss-papers" -papers_repo: "openjournals/joss-papers" +reviews: "openjournals/joss-reviews-testing" +papers_html_url: "https://www.theoj.org/joss-papers-testing" +papers_repo: "openjournals/joss-papers-testing" product: "software" # the *thing* being submitted for review reviewers: "https://bit.ly/joss-reviewers" submission_enquiry: |- From bd162914af28a3ba87ed19f638c581670a0b130f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 16 Dec 2021 13:01:52 +0100 Subject: [PATCH 263/609] change .ruby-version --- .ruby-version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ruby-version b/.ruby-version index b50214693..75a22a26a 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.0.2 +3.0.3 From 1b34f46cbc388c43878bad43f92ddc59974a4754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 16 Dec 2021 13:08:05 +0100 Subject: [PATCH 264/609] add bot to config --- config/settings-development.yml | 1 + config/settings-production.yml | 1 + config/settings-test.yml | 1 + 3 files changed, 3 insertions(+) diff --git a/config/settings-development.yml b/config/settings-development.yml index 200a03cd7..1eb519be8 100644 --- a/config/settings-development.yml +++ b/config/settings-development.yml @@ -20,3 +20,4 @@ submission_enquiry: |- Briefly describe your software, its research application and any questions you have about the JOSS submission criteria. paper_types: [] +bot_username: whedon diff --git a/config/settings-production.yml b/config/settings-production.yml index defb37c51..70a4f735d 100644 --- a/config/settings-production.yml +++ b/config/settings-production.yml @@ -20,3 +20,4 @@ submission_enquiry: |- Briefly describe your software, its research application and any questions you have about the JOSS submission criteria. paper_types: [] +bot_username: botsci diff --git a/config/settings-test.yml b/config/settings-test.yml index 0f15c4086..c77c4b7be 100644 --- a/config/settings-test.yml +++ b/config/settings-test.yml @@ -20,3 +20,4 @@ submission_enquiry: |- Briefly describe your software, its research application and any questions you have about the JOSS submission criteria. paper_types: [] +bot_username: whedon From 40769b02c4fa0d4270813c99e298dc1cd2fa407c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 16 Dec 2021 13:08:19 +0100 Subject: [PATCH 265/609] change meta review temaplate --- app/views/shared/meta_view_body.text.erb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/views/shared/meta_view_body.text.erb b/app/views/shared/meta_view_body.text.erb index e8fbe6cc8..de865fead 100644 --- a/app/views/shared/meta_view_body.text.erb +++ b/app/views/shared/meta_view_body.text.erb @@ -1,8 +1,8 @@ -**Submitting author:** <%= paper.submitting_author.github_username %> (<%= link_to paper.submitting_author.name, paper.submitting_author.orcid_url %>) -**Repository:** <%= paper.repository_url %> -**Version:** <%= paper.software_version %> -**Editor:** Pending -**Reviewer:** Pending +**Submitting author:** <%= paper.submitting_author.github_username %> (<%= link_to paper.submitting_author.name, paper.submitting_author.orcid_url %>) +**Repository:** <%= paper.repository_url %> +**Version:** <%= paper.software_version %> +**Editor:** Pending +**Reviewers:** Pending **Managing EiC:** <%= eic_name %> **:warning: JOSS reduced service mode :warning:** @@ -23,7 +23,7 @@ Markdown: [![status](<%= url %>/papers/<%= paper.sha %>/status.svg)](<%= url %>/ **Author instructions** -<%- abbreviation, reviewers = Rails.application.settings.values_at("abbreviation", "reviewers") %> +<%- abbreviation, reviewers, botname = Rails.application.settings.values_at("abbreviation", "reviewers", "bot_username") %> <% if suggested_editor == "Pending" %> Thanks for submitting your paper to <%= abbreviation %> <%= paper.submitting_author.github_username %>. **Currently, there isn't an <%= abbreviation %> editor assigned** to your paper. <% else %> @@ -36,8 +36,8 @@ The author's suggestion for the handling editor is <%= suggested_editor %>. **Editor instructions** -The <%= abbreviation %> submission bot @whedon is here to help you find and assign reviewers and start the main review. To find out what @whedon can do for you type: +The <%= abbreviation %> submission bot @<%= botname %> is here to help you find and assign reviewers and start the main review. To find out what @<%= botname %> can do for you type: ``` -@whedon commands +@<%= botname %> commands ``` From 10b64b6d0c9b28bef78794642daf1bb16612d9eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 17 Dec 2021 12:01:23 +0100 Subject: [PATCH 266/609] add branch to pre-review template --- app/views/shared/meta_view_body.text.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/shared/meta_view_body.text.erb b/app/views/shared/meta_view_body.text.erb index de865fead..ffcbe3758 100644 --- a/app/views/shared/meta_view_body.text.erb +++ b/app/views/shared/meta_view_body.text.erb @@ -1,5 +1,6 @@ **Submitting author:** <%= paper.submitting_author.github_username %> (<%= link_to paper.submitting_author.name, paper.submitting_author.orcid_url %>) -**Repository:** <%= paper.repository_url %> +**Repository:** <%= paper.repository_url %> +**Branch (empty if default branch)** **Version:** <%= paper.software_version %> **Editor:** Pending **Reviewers:** Pending From 3ac57135c4b672e3309fac2c8d284321cd53ad6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 17 Dec 2021 12:03:00 +0100 Subject: [PATCH 267/609] better wording --- app/views/shared/meta_view_body.text.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/meta_view_body.text.erb b/app/views/shared/meta_view_body.text.erb index ffcbe3758..7f60723d9 100644 --- a/app/views/shared/meta_view_body.text.erb +++ b/app/views/shared/meta_view_body.text.erb @@ -1,6 +1,6 @@ **Submitting author:** <%= paper.submitting_author.github_username %> (<%= link_to paper.submitting_author.name, paper.submitting_author.orcid_url %>) **Repository:** <%= paper.repository_url %> -**Branch (empty if default branch)** +**Branch containing paper files (empty if default branch):** **Version:** <%= paper.software_version %> **Editor:** Pending **Reviewers:** Pending From e68c9da62b493633f4ca9261ad03abeb4e819f58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 22 Dec 2021 12:48:23 +0100 Subject: [PATCH 268/609] update review issue body --- app/views/shared/meta_view_body.text.erb | 2 +- app/views/shared/review_body.text.erb | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/views/shared/meta_view_body.text.erb b/app/views/shared/meta_view_body.text.erb index 7f60723d9..39bffb731 100644 --- a/app/views/shared/meta_view_body.text.erb +++ b/app/views/shared/meta_view_body.text.erb @@ -3,7 +3,7 @@ **Branch containing paper files (empty if default branch):** **Version:** <%= paper.software_version %> **Editor:** Pending -**Reviewers:** Pending +**Reviewers:** **Managing EiC:** <%= eic_name %> **:warning: JOSS reduced service mode :warning:** diff --git a/app/views/shared/review_body.text.erb b/app/views/shared/review_body.text.erb index bad462578..4e532e43a 100644 --- a/app/views/shared/review_body.text.erb +++ b/app/views/shared/review_body.text.erb @@ -1,8 +1,8 @@ -**Submitting author:** <%= paper.submitting_author.github_username %> (<%= link_to paper.submitting_author.name, paper.submitting_author.orcid_url %>) -**Repository:** <%= paper.repository_url %> -**Version:** <%= paper.software_version %> -**Editor:** <%= editor %> -**Reviewer:** <%= reviewers.join(', ') %> +**Submitting author:** <%= paper.submitting_author.github_username %> (<%= link_to paper.submitting_author.name, paper.submitting_author.orcid_url %>) +**Repository:** <%= paper.repository_url %> +**Version:** <%= paper.software_version %> +**Editor:** <%= editor %> +**Reviewer:** <%= reviewers.join(', ') %> **Archive:** Pending **:warning: JOSS reduced service mode :warning:** @@ -30,7 +30,7 @@ Please avoid lengthy details of difficulties in the review thread. Instead, plea First of all you need to run this command in a separate comment to create the checklist: ``` -@whedon generate my checklist +@<%= Rails.application.settings["bot_username"] || "botname" %> generate my checklist ``` The reviewer guidelines are available here: https://joss.readthedocs.io/en/latest/reviewer_guidelines.html. Any questions/concerns please let <%= editor %> know. From f5e6aa3e5d679b2a2bedd3cddb4a8f46c4283c54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 23 Dec 2021 10:37:03 +0100 Subject: [PATCH 269/609] add branch to review template --- app/models/paper.rb | 8 ++++---- app/views/shared/meta_view_body.text.erb | 2 +- app/views/shared/review_body.text.erb | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/models/paper.rb b/app/models/paper.rb index 4897d86f4..a3d210873 100644 --- a/app/models/paper.rb +++ b/app/models/paper.rb @@ -332,19 +332,19 @@ def pdf_url end # 'reviewers' should be a string (and may be comma-separated) - def review_body(editor, reviewers) + def review_body(editor, reviewers, branch=nil) reviewers = reviewers.split(',').each {|r| r.prepend('@')} ApplicationController.render( template: 'shared/review_body', formats: :text, - locals: { paper: self, editor: "@#{editor}", reviewers: reviewers } + locals: { paper: self, editor: "@#{editor}", reviewers: reviewers, branch: branch } ) end # Create a review issue (we know the reviewer and editor at this point) # Return false if the review_issue_id is already set # Return false if the editor login doesn't match one of the known editors - def create_review_issue(editor_handle, reviewers) + def create_review_issue(editor_handle, reviewers, branch=nil) return false if review_issue_id return false unless editor = Editor.find_by_login(editor_handle) @@ -357,7 +357,7 @@ def create_review_issue(editor_handle, reviewers) issue = GITHUB.create_issue(Rails.application.settings["reviews"], "[REVIEW]: #{self.title}", - review_body(editor_handle, reviewers), + review_body(editor_handle, reviewers, branch), { assignees: [editor_handle], labels: new_labels.join(",") }) diff --git a/app/views/shared/meta_view_body.text.erb b/app/views/shared/meta_view_body.text.erb index 39bffb731..27df74a93 100644 --- a/app/views/shared/meta_view_body.text.erb +++ b/app/views/shared/meta_view_body.text.erb @@ -1,6 +1,6 @@ **Submitting author:** <%= paper.submitting_author.github_username %> (<%= link_to paper.submitting_author.name, paper.submitting_author.orcid_url %>) **Repository:** <%= paper.repository_url %> -**Branch containing paper files (empty if default branch):** +**Branch with paper.md** (empty if default branch): **Version:** <%= paper.software_version %> **Editor:** Pending **Reviewers:** diff --git a/app/views/shared/review_body.text.erb b/app/views/shared/review_body.text.erb index 4e532e43a..1258b1f95 100644 --- a/app/views/shared/review_body.text.erb +++ b/app/views/shared/review_body.text.erb @@ -1,5 +1,6 @@ **Submitting author:** <%= paper.submitting_author.github_username %> (<%= link_to paper.submitting_author.name, paper.submitting_author.orcid_url %>) **Repository:** <%= paper.repository_url %> +**Branch with paper.md** (empty if default branch): <%= branch.to_s %> **Version:** <%= paper.software_version %> **Editor:** <%= editor %> **Reviewer:** <%= reviewers.join(', ') %> From f46dad607483cb2a32925277aeb9eda341a545f3 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Tue, 28 Dec 2021 15:24:27 +0000 Subject: [PATCH 270/609] Updating logic for new issues --- app/models/review_issue.rb | 6 +++--- lib/tasks/permissions.rake | 4 ++-- lib/tasks/sync.rake | 18 ------------------ 3 files changed, 5 insertions(+), 23 deletions(-) diff --git a/app/models/review_issue.rb b/app/models/review_issue.rb index d3f7f3264..c7c812d53 100644 --- a/app/models/review_issue.rb +++ b/app/models/review_issue.rb @@ -51,7 +51,7 @@ def self.download_completed_reviews(review_repo) def self.review_issues_for_editor(review_issues, editor_login) editor_issues = [] review_issues.each do |issue| - if issue.body.match(/\*\*Editor:\*\*\s*(@\S*|Pending)/i) + if issue.body.match(/(?<=)(@\S*|Pending)(?=)/i) if issue.editor.downcase == "@#{editor_login.downcase}" comments = GITHUB.issue_comments(Rails.application.settings["reviews"], issue.number) issue.last_comment = comments.last @@ -84,11 +84,11 @@ def pre_review? # Extract the Editor from the issue body def editor - body.match(/\*\*Editor:\*\*\s*(@\S*|Pending)/i)[1] + body.match(/(?<=)(@\S*|Pending)(?=)/i)[1] end # Extract the Reviewers from the issue body def reviewers - body.match(/Reviewers?:\*\*\s*(.+?)\r?\n/)[1].split(", ") - ["Pending"] + body.match(/(?<=)(\s*(.+?)\r?)(?=)/)[1].split(", ") - ["Pending"] end end diff --git a/lib/tasks/permissions.rake b/lib/tasks/permissions.rake index 48f1618be..df0346b67 100644 --- a/lib/tasks/permissions.rake +++ b/lib/tasks/permissions.rake @@ -10,14 +10,14 @@ namespace :permissions do active_reviewers = [] open_issues.each do |issue| - active_reviewers << issue.body.match(/Reviewers?:\*\*\s*(.+?)\r?\n/)[1].split(", ").each(&:strip!).each(&:downcase!) - ["Pending"] + active_reviewers << issue.body.match(/(?<=)(\s*(.+?)\r?)(?=)/)[1].split(", ").each(&:strip!).each(&:downcase!) - ["Pending"] end should_have_permissions = active_reviewers.flatten.uniq # Loop through each collaborator and check if they need permissions collaborator_logins.sort.each do |login| - next if login == 'whedon' + next if login == 'editorialbot' unless should_have_permissions.include?("@#{login}") GITHUB.remove_collaborator(reviews_repo, login) diff --git a/lib/tasks/sync.rake b/lib/tasks/sync.rake index 430eab99a..66cd78d2d 100644 --- a/lib/tasks/sync.rake +++ b/lib/tasks/sync.rake @@ -1,22 +1,4 @@ namespace :sync do - desc "Fix assignees on issues" - task assignees: :environment do - # We run this task daily on Heroku - reviews_repo = Rails.application.settings["reviews"] - open_issues = GITHUB.list_issues(reviews_repo, state: 'open') - - open_issues.each do |issue| - editor = issue.body.match(/\*\*Editor:\*\*\s*(@\S*|Pending)/i)[1] - reviewers = issue.body.match(/Reviewers?:\*\*\s*(.+?)\r?\n/)[1].split(", ") - ["Pending"] - assignees = reviewers << editor unless editor == "Pending" - - if assignees - assignees = assignees.collect {|a| a.sub!(/^@/, '')} - GITHUB.add_assignees(reviews_repo, issue.number, assignees) - end - end - end - desc "Papers cleanup" task cleanup_paper_branches: :environment do reviews_repo = Rails.application.settings["reviews"] From 8eb832c40994416b76f950feb92161203c852cd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 4 Jan 2022 13:07:48 +0100 Subject: [PATCH 271/609] pass branch info to review body --- app/controllers/dispatch_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/dispatch_controller.rb b/app/controllers/dispatch_controller.rb index e84cf5267..96b984635 100644 --- a/app/controllers/dispatch_controller.rb +++ b/app/controllers/dispatch_controller.rb @@ -90,7 +90,7 @@ def api_withdraw def api_start_review if params[:secret] == ENV['WHEDON_SECRET'] @paper = Paper.find_by_meta_review_issue_id(params[:id]) - if @paper.start_review!(params[:editor], params[:reviewers]) + if @paper.start_review!(params[:editor], params[:reviewers], params[:branch]) render json: @paper.to_json, status: '201' else head :unprocessable_entity From ab6c6ee329624954d9ff68a78bb19e36475fb4aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 4 Jan 2022 14:34:39 +0100 Subject: [PATCH 272/609] reviewers --- app/views/shared/review_body.text.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/review_body.text.erb b/app/views/shared/review_body.text.erb index 1258b1f95..f648a1c3d 100644 --- a/app/views/shared/review_body.text.erb +++ b/app/views/shared/review_body.text.erb @@ -3,7 +3,7 @@ **Branch with paper.md** (empty if default branch): <%= branch.to_s %> **Version:** <%= paper.software_version %> **Editor:** <%= editor %> -**Reviewer:** <%= reviewers.join(', ') %> +**Reviewers:** <%= reviewers.join(', ') %> **Archive:** Pending **:warning: JOSS reduced service mode :warning:** From cd712fb77c8be5be807d054b1c571b7fb0fd8137 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 4 Jan 2022 14:55:33 +0100 Subject: [PATCH 273/609] fix spec --- spec/models/paper_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/models/paper_spec.rb b/spec/models/paper_spec.rb index 8bbb921d3..8a83f842f 100644 --- a/spec/models/paper_spec.rb +++ b/spec/models/paper_spec.rb @@ -238,7 +238,7 @@ let(:kind) { nil } subject { paper.review_body("editor_name", "mickey,mouse") } - it { is_expected.to match /Reviewer:/ } + it { is_expected.to match /Reviewers:/ } it { is_expected.to match /\/papers\/#{paper.sha}/ } it { is_expected.to match /#{paper.repository_url}/ } end From 875080a6d4f66c6b6644f4ea0d37492bb4159a65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 5 Jan 2022 14:31:36 +0100 Subject: [PATCH 274/609] fix feed updated info --- app/views/papers/index.atom.builder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/papers/index.atom.builder b/app/views/papers/index.atom.builder index 7c1505390..ed690c074 100644 --- a/app/views/papers/index.atom.builder +++ b/app/views/papers/index.atom.builder @@ -6,7 +6,7 @@ atom_feed do |feed| feed.link(rel: 'previous', type: "application/atom+xml", href: url_for(params: url_params, format: 'atom', page: @papers.current_page - 1, only_path: false)) unless @papers.current_page == 1 feed.link(rel: 'last', type: "application/atom+xml", href: url_for(params: url_params, format: 'atom', page: @papers.total_pages, only_path: false)) feed.title(Rails.application.settings["name"]) - feed.updated(@papers[0].created_at) if @papers.length > 0 + feed.updated(@papers[0].accepted_at || @papers[0].created_at) if @papers.length > 0 feed.author do |author| author.name(Rails.application.settings["name"]) author.uri(Rails.application.settings["url"]) From b62a5a2734b28efee8c702bca98ca5c127e56f08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 12 Jan 2022 13:38:56 +0100 Subject: [PATCH 275/609] update entries' published_at info --- app/views/papers/index.atom.builder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/papers/index.atom.builder b/app/views/papers/index.atom.builder index ed690c074..85fdafa9f 100644 --- a/app/views/papers/index.atom.builder +++ b/app/views/papers/index.atom.builder @@ -14,7 +14,7 @@ atom_feed do |feed| @papers.each do |paper| next if paper.invisible? - feed.entry(paper, url: paper.seo_url) do |entry| + feed.entry(paper, url: paper.seo_url, published: (paper.accepted? ? paper.accepted_at : paper.created_at)) do |entry| entry.title(paper.title) entry.content(type: "application/xml") do |content| entry.state(paper.state) From 88cb4e78c0104d9efa59bbc051f392b4f6fbc0b5 Mon Sep 17 00:00:00 2001 From: "Daniel S. Katz" Date: Thu, 13 Jan 2022 12:37:38 -0600 Subject: [PATCH 276/609] taking out step that GitHub does for you --- docs/editing.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/editing.md b/docs/editing.md index 131055aff..b8a7302a0 100644 --- a/docs/editing.md +++ b/docs/editing.md @@ -154,7 +154,6 @@ If a paper has already been reviewed and accepted by rOpenSci, the streamlined J - Add the rOpenSci label to the pre-review issue - Start the review issue - Add a comment in the review issue pointing to the rOpenSci review -- Add the rOpenSci label to the review issue - Compile the paper and check it looks ok - Tick off all the review checkboxes - Go to to the source code repo and grab the Zenodo DOI From 37e9a7543e338eab38e247d1a42a8cf73efd1ca1 Mon Sep 17 00:00:00 2001 From: Dan Foreman-Mackey Date: Mon, 17 Jan 2022 10:02:38 -0500 Subject: [PATCH 277/609] Removing @adrn's ORCID from docs He's currently getting assigned a lot of random JOSS papers because authors don't seem to update the ORCID in their submissions. --- docs/submitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index 80a51df83..e67db98f1 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -104,7 +104,7 @@ tags: - milky way authors: - name: Adrian M. Price-Whelan^[co-first author] # note this makes a footnote saying 'co-first author' - orcid: 0000-0003-0872-7098 + orcid: 0000-0000-0000-0000 affiliation: "1, 2" # (Multiple affiliations must be quoted) - name: Author Without ORCID^[co-first author] # note this makes a footnote saying 'co-first author' affiliation: 2 From 4c9b09d5a903e6d6fbbdef167212d6fbe0922ddb Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 23 Jan 2022 10:37:33 +0000 Subject: [PATCH 278/609] ...and notebooks --- docs/submitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index e67db98f1..8aa77dc49 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -21,7 +21,7 @@ In addition, the software associated with your submission must: ### What we mean by research software -JOSS publishes articles about research software. This definition includes software that: solves complex modeling problems in a scientific context (physics, mathematics, biology, medicine, social science, neuroscience, engineering); supports the functioning of research instruments or the execution of research experiments; extracts knowledge from large data sets; offers a mathematical library, or similar. While useful for many areas of research, pre-trained machine learning models are not in-scope for JOSS. +JOSS publishes articles about research software. This definition includes software that: solves complex modeling problems in a scientific context (physics, mathematics, biology, medicine, social science, neuroscience, engineering); supports the functioning of research instruments or the execution of research experiments; extracts knowledge from large data sets; offers a mathematical library, or similar. While useful for many areas of research, pre-trained machine learning models and notebooks are not in-scope for JOSS. ### Substantial scholarly effort From db047867e6128e8a5e3cea30bc9a5fca280d5a81 Mon Sep 17 00:00:00 2001 From: Jed Brown Date: Fri, 14 Jan 2022 09:16:38 -0700 Subject: [PATCH 279/609] Statement of need: context of related work Normalize section case name to match example, which uses sentence case, consistent with APA style. --- app/views/content/github/_review_checklist.erb | 2 +- docs/review_checklist.md | 2 +- docs/review_criteria.md | 2 +- docs/submitting.md | 4 ++-- docs/whedon.md | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/content/github/_review_checklist.erb b/app/views/content/github/_review_checklist.erb index d6f7bc589..034da8d31 100644 --- a/app/views/content/github/_review_checklist.erb +++ b/app/views/content/github/_review_checklist.erb @@ -33,7 +33,7 @@ ### Software paper - [ ] **Summary:** Has a clear description of the high-level functionality and purpose of the software for a diverse, non-specialist audience been provided? -- [ ] **A statement of need:** Does the paper have a section titled 'Statement of Need' that clearly states what problems the software is designed to solve and who the target audience is? +- [ ] **A statement of need:** Does the paper have a section titled 'Statement of need' that clearly states what problems the software is designed to solve, who the target audience is, and its relation to other work? - [ ] **State of the field:** Do the authors describe how this software compares to other commonly-used packages? - [ ] **Quality of writing:** Is the paper well written (i.e., it does not require editing for structure, language, or writing quality)? - [ ] **References:** Is the list of references complete, and is everything cited appropriately that should be cited (e.g., papers, datasets, software)? Do references in the text use the proper [citation syntax]( https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html#citation_syntax)? diff --git a/docs/review_checklist.md b/docs/review_checklist.md index 78c15d132..020af00a0 100644 --- a/docs/review_checklist.md +++ b/docs/review_checklist.md @@ -40,7 +40,7 @@ Below is an example of the review checklist for the [Yellowbrick JOSS submission ### Software paper - **Summary:** Has a clear description of the high-level functionality and purpose of the software for a diverse, non-specialist audience been provided? -- **A statement of need:** Does the paper have a section titled 'Statement of Need' that clearly states what problems the software is designed to solve and who the target audience is? +- **A statement of need:** Does the paper have a section titled 'Statement of need' that clearly states what problems the software is designed to solve, who the target audience is, and its relation to other work? - **State of the field:** Do the authors describe how this software compares to other commonly-used packages? - **Quality of writing:** Is the paper well written (i.e., it does not require editing for structure, language, or writing quality)? - **References:** Is the list of references complete, and is everything cited appropriately that should be cited (e.g., papers, datasets, software)? Do references in the text use the proper [citation syntax]( https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html#citation_syntax)? diff --git a/docs/review_criteria.md b/docs/review_criteria.md index 2b5c4a75e..bbdbb5c6c 100644 --- a/docs/review_criteria.md +++ b/docs/review_criteria.md @@ -52,7 +52,7 @@ There should be sufficient documentation for you, the reviewer to understand the #### A statement of need -The authors should clearly state what problems the software is designed to solve and who the target audience is. +The authors should clearly state what problems the software is designed to solve, who the target audience is, and its relation to other work. #### Installation instructions diff --git a/docs/submitting.md b/docs/submitting.md index 80a51df83..610d2877e 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -78,12 +78,12 @@ Your paper should include: - A list of the authors of the software and their affiliations, using the correct format (see the example below). - A summary describing the high-level functionality and purpose of the software for a diverse, *non-specialist audience*. -- A *Statement of Need* section that clearly illustrates the research purpose of the software. +- A *Statement of need* section that clearly illustrates the research purpose of the software and places it in the context of related work. - A list of key references, including to other software addressing related needs. Note that the references should include full names of venues, e.g., journals and conferences, not abbreviations only understood in the context of a specific discipline. - Mention (if applicable) a representative set of past or ongoing research projects using the software and recent scholarly publications enabled by it. - Acknowledgement of any financial support. -As this short list shows, JOSS papers are only expected to contain a limited set of metadata (see example below), a Statement of Need, Summary, Acknowledgements, and References sections. You can look at an [example accepted paper](http://bit.ly/2x22gxT). Given this format, a "full length" paper is not permitted, and software documentation such as API (Application Programming Interface) functionality should not be in the paper and instead should be outlined in the software documentation. +As this short list shows, JOSS papers are only expected to contain a limited set of metadata (see example below), a Statement of need, Summary, Acknowledgements, and References sections. You can look at an [example accepted paper](http://bit.ly/2x22gxT). Given this format, a "full length" paper is not permitted, and software documentation such as API (Application Programming Interface) functionality should not be in the paper and instead should be outlined in the software documentation. ```eval_rst .. important:: Your paper will be reviewed by two or more reviewers in a public GitHub issue. Take a look at the `review checklist `_ and `review criteria `_ to better understand how your submission will be reviewed. diff --git a/docs/whedon.md b/docs/whedon.md index c73e787e5..97a7834cb 100644 --- a/docs/whedon.md +++ b/docs/whedon.md @@ -62,7 +62,7 @@ EDITORIAL TASKS @whedon check references # Ask Whedon to check repository statistics for the submitted software, for license, and -# for Statement of Need section in paper +# for Statement of need section in paper @whedon check repository EiC TASKS From cef607452daa4961462cd35a899c82467f6ade04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 31 Jan 2022 12:30:24 +0100 Subject: [PATCH 280/609] update Sphinx config --- docs/conf.py | 77 ++++++++++--------------------------------- docs/requirements.txt | 4 ++- 2 files changed, 20 insertions(+), 61 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index f40b8f552..5ed84e79d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- -# + # Configuration file for the Sphinx documentation builder. # -# This file does only contain a selection of the most common options. For a -# full list see the documentation: -# http://www.sphinx-doc.org/en/master/config +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- @@ -15,7 +15,8 @@ # import os # import sys # sys.path.insert(0, os.path.abspath('.')) - +import recommonmark +from recommonmark.transform import AutoStructify # -- Project information ----------------------------------------------------- @@ -32,81 +33,39 @@ # -- General configuration --------------------------------------------------- -# If your documentation needs a minimal Sphinx version, state it here. -# -# needs_sphinx = '1.0' - # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ 'sphinx.ext.mathjax', + 'recommonmark', ] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# -# source_suffix = ['.rst', '.md'] - -from recommonmark.parser import CommonMarkParser -from recommonmark.transform import AutoStructify - -source_parsers = { - '.md': CommonMarkParser, -} - -source_suffix = ['.rst', '.md'] - # The master toctree document. master_doc = 'index' -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -language = None - # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. -# This pattern also affects html_static_path and html_extra_path . +# This pattern also affects html_static_path and html_extra_path. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - - # -- Options for HTML output ------------------------------------------------- +# The name of the Pygments (syntax highlighting) style to use. +# pygments_style = 'sphinx' + # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme = 'sphinx_rtd_theme' -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -# -# html_theme_options = {} - # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - -# Custom sidebar templates, must be a dictionary that maps document names -# to template names. -# -# The default sidebars (for documents that don't match any pattern) are -# defined by theme itself. Builtin themes are using these templates by -# default: ``['localtoc.html', 'relations.html', 'sourcelink.html', -# 'searchbox.html']``. -# -# html_sidebars = {} - +#html_static_path = ['_static'] # -- Options for HTMLHelp output --------------------------------------------- @@ -166,13 +125,11 @@ # -- Extension configuration ------------------------------------------------- -# At the bottom of conf.py -# app setup hook def setup(app): app.add_config_value('recommonmark_config', { - 'auto_toc_tree_section': 'Contents', - 'enable_eval_rst': True, - 'enable_auto_doc_ref': True, - 'character_level_inline_markup': False, - }, True) + 'url_resolver': lambda url: github_doc_root + url, + 'auto_toc_tree_section': 'Contents', + 'enable_auto_toc_tree': True, + 'enable_eval_rst': True, + }, True) app.add_transform(AutoStructify) diff --git a/docs/requirements.txt b/docs/requirements.txt index 81c5f0207..2fd25f6dd 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1 +1,3 @@ -docutils==0.14 +docutils +recommonmark +sphinx_rtd_theme From a4cad9545ce08d3dc7ad1f8d321ec5cf71c52565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 31 Jan 2022 12:31:27 +0100 Subject: [PATCH 281/609] fix warnings --- docs/index.rst | 5 ++--- docs/installing.md | 3 ++- docs/review_checklist.md | 2 +- docs/submitting.md | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index dd590c2fa..469abd931 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,8 +1,7 @@ Journal of Open Source Software =============================== -The `Journal of Open Source Software -`_ (JOSS) is a developer friendly journal for research software packages. +The `Journal of Open Source Software `_ (JOSS) is a developer friendly journal for research software packages. JOSS is an academic journal (ISSN 2475-9066) with a formal peer-review process that is designed to *improve the quality of the software submitted*. Upon acceptance into JOSS, we mint a CrossRef DOI for your paper and we list it on the `JOSS website `_. @@ -19,7 +18,7 @@ If you're interested in learning more about JOSS, you might want to read: - The `about page `_ on the main JOSS site Submitting a paper to JOSS ------------------------ +-------------------------- If you'd like to submit a paper to JOSS, please read the author submission guidelines in the :doc:`submitting` section. diff --git a/docs/installing.md b/docs/installing.md index 2dd8d3dd7..d4704afd5 100644 --- a/docs/installing.md +++ b/docs/installing.md @@ -1,4 +1,5 @@ -# Installing the JOSS application +Installing the JOSS application +=============================== Any Open Journal (JOSS, JOSE, etc.) can be considered in three parts: diff --git a/docs/review_checklist.md b/docs/review_checklist.md index 78c15d132..670eba640 100644 --- a/docs/review_checklist.md +++ b/docs/review_checklist.md @@ -1,5 +1,5 @@ Review checklist -=============== +================ JOSS reviews are checklist-driven. That is, there is a checklist for each JOSS reviewer to work through when completing their review. A JOSS review is generally considered incomplete until the reviewer has checked off all of their checkboxes. diff --git a/docs/submitting.md b/docs/submitting.md index 8aa77dc49..cf8f634d7 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -62,7 +62,7 @@ Authors wishing to make a pre-submission enquiry should [open an issue](https:// Before you submit, you should: - Make your software available in an open repository (GitHub, Bitbucket, etc.) and include an [OSI approved open source license](https://opensource.org/licenses). -- Make sure that the software complies with the [JOSS review criteria](review_criteria.html). In particular, your software should be full-featured, well-documented, and contain procedures (such as automated tests) for checking correctness. +- Make sure that the software complies with the [JOSS review criteria](review_criteria). In particular, your software should be full-featured, well-documented, and contain procedures (such as automated tests) for checking correctness. - Write a short paper in Markdown format using `paper.md` as file name, including a title, summary, author names, affiliations, and key references. See our [example paper](#example-paper-and-bibliography) to follow the correct format. - (Optional) create a metadata file describing your software and include it in your repository. We provide [a script](https://gist.github.com/arfon/478b2ed49e11f984d6fb) that automates the generation of this metadata. @@ -339,7 +339,7 @@ After submission: - After we assign a DOI for your accepted JOSS paper, its metadata is deposited with CrossRef and listed on the JOSS website. - The review issue will be closed, and an automatic tweet from [@JOSS_TheOJ](https://twitter.com/JOSS_TheOJ) will announce it! -If you want to learn more details about the review process, take a look at the [reviewer guidelines](reviewer_guidelines.html). +If you want to learn more details about the review process, take a look at the [reviewer guidelines](reviewer_guidelines). ## Confidential requests From 9cfcb3ce6c00668d39a1961ecea149e42f01a0e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 31 Jan 2022 13:19:10 +0100 Subject: [PATCH 282/609] add docs for EditorialBot commands --- docs/editorial_bot.md | 298 ++++++++++++++++++++++++++++++++++++++++++ docs/index.rst | 4 +- docs/whedon.md | 251 ----------------------------------- 3 files changed, 300 insertions(+), 253 deletions(-) create mode 100644 docs/editorial_bot.md delete mode 100644 docs/whedon.md diff --git a/docs/editorial_bot.md b/docs/editorial_bot.md new file mode 100644 index 000000000..e3bec2d4b --- /dev/null +++ b/docs/editorial_bot.md @@ -0,0 +1,298 @@ +Interacting with EditorialBot +============================= + +The Open Journals' editorial bot or `@editorialbot` on GitHub, is our editorial bot that interacts with authors, reviewers, and editors on JOSS reviews. + +`@editorialbot` can do a bunch of different things. If you want to ask `@editorialbot` what it can do, simply type the following in a JOSS `review` or `pre-review` issue: + + +```text +@editorialbot commands +``` + +## Author and reviewers commands + +A subset of the EditorialBot commands are available to authors and reviewers: + +### Compiling papers + +When a `pre-review` or `review` issue is opened, `@editorialbot` will try to compile the JOSS paper by looking for a `paper.md` file in the repository specified when the paper was submitted. + +If it can't find the `paper.md` file it will say as much in the review issue. If it can't compile the paper (i.e. there's some kind of Pandoc error), it will try and report that error back in the thread too. + +```eval_rst +.. note:: To compile the papers ``@editorialbot`` is running this `Docker image `_. +``` + +Anyone can ask `@editorialbot` to compile the paper again (e.g. after a change has been made). To do this simply comment on the review thread as follows: + +```text +@editorialbot generate pdf +``` + +#### Compiling papers from a specific branch + +By default, EditorialBot will look for papers in the branch set in the body of the issue (or in the default git branch if none is present). If you want to compile a paper from a specific branch, this can be done as follows: + +```text +@editorialbot generate pdf from branch custom-branch-name +``` + +### Finding reviewers + +Sometimes submitting authors suggest people the think might be appropriate to review their submission. If you want the link to the current list of JOSS reviewers, type the following in the review thread: + +```text +@editorialbot list reviewers +``` + +## Reviewers checklist command + +Once a user is assigned as reviewer and the review has started, the reviewer must type the following to get a review checklist: + +```text +@editorialbot generate my checklist +``` + +## Editorial commands + +Most of `@editorialbot`'s functionality can only be used by the journal editors. + +### Assigning an editor + +Editors can either assign themselves or other editors as the editor of a submission as follows: + +```text +@editorialbot assign @editorname as editor +``` + +### Inviting an editor + +EditorialBot can be used by EiCs to send email invites to registered editors as follows: + +```text +@editorialbot invite @editorname as editor +``` + +This will send an automated email to the editor with a link to the GitHub `pre-review` issue. + +### Adding and removing reviewers + +Reviewers should be assigned by using the following commands: + +```text +# Add a GitHub user to the reviewers of this submission +@editorialbot add @username as reviewer +or +@editorialbot add @username to reviewers + +# Remove a GitHub user from the reviewers of this submission +@editorialbot remove @username from reviewers +``` + +### Starting the review + +Once the reviewer(s) and editor have been assigned in the `pre-review` issue, the editor starts the review with: + +```text +@editorialbot start review +``` + +```eval_rst +.. important:: If a reviewer recants their commitment or is unresponsive, editors can remove them with the command ``@editorialbot remove @username from reviewers``. You can then delete that reviewer's checklist. You can also add new reviewers in the ``REVIEW`` issue with the command ``@editorialbot add @username to reviewers``. +``` + +### Reminding reviewers and authors + +EditorialBot can remind authors and reviewers after a specified amount of time to return to the review issue. Reminders can only be set by editors, and only for REVIEW issues. For example: + +```text +# Remind the reviewer in two weeks to return to the review +@editorialbot remind @reviewer in two weeks +``` + +```text +# Remind the reviewer in five days to return to the review +@editorialbot remind @reviewer in five days +``` + +```text +# Remind the author in two weeks to return to the review +@editorialbot remind @author in two weeks +``` + +```eval_rst +.. note:: Most units of times are understood by EditorialBot e.g. `hour/hours/day/days/week/weeks`. +``` + +### Setting the software archive + +When a submission is accepted, we ask that the authors to create an archive (on [Zenodo](https://zenodo.org/), [fig**share**](https://figshare.com/), or other) and post the archive DOI in the `REVIEW` issue. The editor should ask `@editorialbot` to add the archive to the issue as follows: + +```text +@editorialbot set 10.0000/zenodo.00000 as archive +``` + +### Changing the software version + +Sometimes the version of the software changes as a consequence of the review process. To update the version of the software do the following: + +```text +@editorialbot set v1.0.1 as version +``` + +### Changing the git branch + +Sometimes the paper-md file is located in a topic branch. In order to have the PDF compiled from that branch it shuold be added to the issue. To update the branch do the following: + +```text +@editorialbot set custom-branch-with-paper as branch +``` + +### Check references + +Editors can ask EditorialBot to check if the DOIs in the bib file are valid with the command: + +```text +@editorialbot check references +``` + +```eval_rst +.. note:: EditorialBot can verify that DOIs resolve, but cannot verify that the DOI associated with a paper is actually correct. In addition, DOI suggestions from EditorialBot are just that - i.e. they may not be correct. +``` + +### Repository checks + +A series of checks can be run on the submitted repository with the command: + +```text +@editorialbot check repository +``` + +EditorialBot will report back with an analysis of the source code and list authorship, contributions and file types information. EditorialBot will also detect the languages used in the repository, will count the number of words in the paper file and will look for an Open Source License and for a *Statement of need* section in the paper. + +### Flag a paper with query-scope + +Editors can flag a paper with query-scope with the command: + +```text +@editorialbot query scope +``` + +### Recommending a paper for acceptance + +JOSS topic editors can recommend a paper for acceptance and ask for the final proofs to be created by EditorialBot with the following command: + +```text +@editorialbot recommend acceptance +``` + +On issuing this command, EditorialBot will also check the references of the paper for any missing DOIs. + + +## EiC-only commands + +Only the JOSS editors-in-chief can accept, reject or withdraw papers. + +### Accepting a paper + +If everything looks good with the draft proofs from the `@editorialbot recommend acceptance` command, JOSS editors-in-chief can take the additional step of actually accepting the JOSS paper with the following command: + +```text +@editorialbot accept +``` + +EditorialBot will accept the paper, assign it a DOI, deposit it and publish the paper. + +### Rejecting a paper + +JOSS editors-in-chief can reject a submission with the following command: + +```text +@editorialbot reject +``` + +### Withdrawing a paper + +JOSS editors-in-chief can withdraw a submission with the following command: + +```text +@editorialbot withdraw +``` + +## The complete list of available commands + +``` + +# List all available commands +@editorialbot commands + +# Add to this issue's reviewers list +@editorialbot add @username as reviewer + +# Remove from this issue's reviewers list +@editorialbot remove @username from reviewers + +# Get a list of all editors's GitHub handles +@editorialbot list editors + +# Assign a user as the editor of this submission +@editorialbot assign @username as editor + +# Remove the editor assigned to this submission +@editorialbot remove editor + +# Remind an author or reviewer to return to a review after a +# certain period of time (supported units days and weeks) +@editorialbot remind @reviewer in 2 weeks + +# Check the references of the paper for missing DOIs +# Optionally, it can be run on a non-default branch +@editorialbot check references +@editorialbot check references from custom-branch-name + +# Perform checks on the repository +# Optionally, it can be run on a non-default branch +@editorialbot check repository +@editorialbot check repository from custom-branch-name + +# Adds a checklist for the reviewer using this command +@editorialbot generate my checklist + +# Set a value for version +@editorialbot set v1.0.0 as version + +# Set a value for archive +@editorialbot set 10.21105/zenodo.12345 as archive + +# Set a value for branch +@editorialbot set joss-paper as branch + +# Reject paper +@editorialbot reject + +# Withdraw paper +@editorialbot withdraw + +# Invite an editor to edit a submission (sending them an email) +@editorialbot invite @(.*) as editor + +# Generates the pdf paper +@editorialbot generate pdf + +# Recommends the submission for acceptance +@editorialbot recommend acceptance + +# Accept and publish the paper +@editorialbot accept + +# Replies to query scope +@editorialbot query scope + +# Replies to list reviewers +@editorialbot list reviewers + +# Open the review issue +@editorialbot start review + +``` \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index 469abd931..f88e66685 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -46,10 +46,10 @@ JOSS is a proud affiliate of the `Open Source Initiative `_. -``` - -Anyone can ask `@whedon` to compile the paper again (e.g. after a change has been made). To do this simply comment on the review thread as follows: - -```text -@whedon generate pdf -``` - -#### Compiling papers from a non-default branch - -By default, Whedon will look for papers in the default git branch. If you want to compile a paper from a non-default branch, this can be done as follows: - -```text -@whedon generate pdf from branch custom-branch-name -``` - -### Finding reviewers - -Sometimes submitting authors suggest people the think might be appropriate to review their submission. If you want the link to the current list of JOSS reviewers, type the following in the review thread: - -```text -@whedon list reviewers -``` - -## Editorial commands - -Most of `@whedon`'s functionality can only be used by the journal editors. - -### Assigning an editor - -Editors can either assign themselves or other editors as the editor of a submission as follows: - -```text -@whedon assign @editorname as editor -``` - -### Inviting an editor - -Whedon can be used by EiCs to send email invites to registered editors as follows: - -```text -@whedon invite @editorname as editor -``` - -This will send an automated email to the editor with a link to the GitHub `pre-review` issue. - -### Adding and removing reviewers - -Reviewers should be assigned by using the following commands: - -```text -# Assign a GitHub user as the sole reviewer of this submission -@whedon assign @username as reviewer - -# Add a GitHub user to the reviewers of this submission -@whedon add @username as reviewer - -# Remove a GitHub user from the reviewers of this submission -@whedon remove @username as reviewer -``` - -```eval_rst -.. note:: The ``assign`` command clobbers all reviewer assignments. If you want to add an additional reviewer use the ``add`` command. -``` - -### Starting the review - -Once the reviewer(s) and editor have been assigned in the `pre-review` issue, the editor starts the review with: - -```text -@whedon start review -``` - -```eval_rst -.. important:: If a reviewer recants their commitment or is unresponsive, editors can remove them with the command ``@whedon remove @username as reviewer``. You can also add new reviewers in the ``REVIEW`` issue, but in this case, you need to manually add a review checklist for them by editing the issue body. -``` - -### Reminding reviewers and authors - -Whedon can reminders authors and reviewers after a specified amount of time to return to the review issue. Reminders can only be set by editors, and only for REVIEW issues. For example: - -```text -# Remind the reviewer in two weeks to return to the review -@whedon remind @reviewer in two weeks -``` - -```text -# Remind the reviewer in five days to return to the review -@whedon remind @reviewer in five days -``` - -```text -# Remind the author in two weeks to return to the review -@whedon remind @author in two weeks -``` - -```eval_rst -.. note:: Most units of times are understood by Whedon e.g. `hour/hours/day/days/week/weeks`. -``` - -```eval_rst -.. important:: For reviewers, the reminder will only be triggered if the reviewer's review is outstanding (i.e. outstanding checkboxes). -``` - -### Setting the software archive - -When a submission is accepted, we ask that the authors create an archive (on [Zenodo](https://zenodo.org/), [fig**share**](https://figshare.com/), or other) and post the archive DOI in the `REVIEW` issue. The editor should add the `accepted` label on the issue and ask `@whedon` to add the archive to the issue as follows: - -```text -@whedon set 10.0000/zenodo.00000 as archive -``` - -### Changing the software version - -Sometimes the version of the software changes as a consequence of the review process. To update the version of the software do the following: - -```text -@whedon set v1.0.1 as version -``` - -## Accepting a paper (dry run) - -Whedon can accept a paper from the review issue. This includes generating the final paper PDF, Crossref metedata, and depositing this metadata with the Crossref API. - -JOSS topic editors can ask for the final proofs to be created by Whedon with the following command: - -```text -@whedon recommend-accept -``` - -On issuing this command, Whedon will also check the references of the paper for any missing DOIs. This command can be triggered separately: - -### Check references - -```text -@whedon check references -``` - -```eval_rst -.. note:: Whedon can verify that DOIs resolve, but cannot verify that the DOI associated with a paper is actually correct. In addition, DOI suggestions from Whedon are just that - i.e. they may not be correct. -``` - -## Accepting a paper (for real) - -If everything looks good with the draft proofs from the `@whedon accept` command, JOSS editors-in-chief can take the additional step of actually accepting the JOSS paper with the following command: - -```text -@whedon accept deposit=true -``` - -```eval_rst -.. note:: This command is only available to the JOSS editor-in-chief, or associate editors-in-chief. -``` From ad6be1a932b399d22fe6378718771a5e94905f90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 31 Jan 2022 13:34:11 +0100 Subject: [PATCH 283/609] BOT_SECRET --- app.json | 4 ++-- app/controllers/dispatch_controller.rb | 14 +++++++------- docs/installing.md | 4 ++-- spec/controllers/dispatch_controller_spec.rb | 14 +++++++------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/app.json b/app.json index b80bd265a..ddac09677 100644 --- a/app.json +++ b/app.json @@ -17,8 +17,8 @@ "ORCID_SECRET": { "description": "The OAuth secret key for ORCID logins" }, - "WHEDON_SECRET": { - "description": "The key that Whedon uses to authenticate" + "BOT_SECRET": { + "description": "The key that the editoria bot uses to authenticate" }, "GH_TOKEN": { "description": "The GitHub token for Whedon" diff --git a/app/controllers/dispatch_controller.rb b/app/controllers/dispatch_controller.rb index 96b984635..5e3515ad4 100644 --- a/app/controllers/dispatch_controller.rb +++ b/app/controllers/dispatch_controller.rb @@ -25,7 +25,7 @@ def github_receiver end def api_assign_editor - if params[:secret] == ENV['WHEDON_SECRET'] + if params[:secret] == ENV['BOT_SECRET'] paper = Paper.find_by_meta_review_issue_id(params[:id]) editor = Editor.find_by_login(params[:editor]) return head :unprocessable_entity unless paper && editor @@ -36,7 +36,7 @@ def api_assign_editor end def api_editor_invite - if params[:secret] == ENV['WHEDON_SECRET'] + if params[:secret] == ENV['BOT_SECRET'] paper = Paper.find_by_meta_review_issue_id(params[:id]) return head :unprocessable_entity unless paper if paper.invite_editor(params[:editor]) @@ -50,7 +50,7 @@ def api_editor_invite end def api_assign_reviewers - if params[:secret] == ENV['WHEDON_SECRET'] + if params[:secret] == ENV['BOT_SECRET'] paper = Paper.find_by_meta_review_issue_id(params[:id]) return head :unprocessable_entity unless paper paper.set_reviewers(params[:reviewers]) @@ -60,7 +60,7 @@ def api_assign_reviewers end def api_reject - if params[:secret] == ENV['WHEDON_SECRET'] + if params[:secret] == ENV['BOT_SECRET'] paper = Paper.where('review_issue_id = ? OR meta_review_issue_id = ?', params[:id], params[:id]).first return head :unprocessable_entity unless paper if paper.reject! @@ -74,7 +74,7 @@ def api_reject end def api_withdraw - if params[:secret] == ENV['WHEDON_SECRET'] + if params[:secret] == ENV['BOT_SECRET'] paper = Paper.where('review_issue_id = ? OR meta_review_issue_id = ?', params[:id], params[:id]).first return head :unprocessable_entity unless paper if paper.withdraw! @@ -88,7 +88,7 @@ def api_withdraw end def api_start_review - if params[:secret] == ENV['WHEDON_SECRET'] + if params[:secret] == ENV['BOT_SECRET'] @paper = Paper.find_by_meta_review_issue_id(params[:id]) if @paper.start_review!(params[:editor], params[:reviewers], params[:branch]) render json: @paper.to_json, status: '201' @@ -101,7 +101,7 @@ def api_start_review end def api_deposit - if params[:secret] == ENV['WHEDON_SECRET'] + if params[:secret] == ENV['BOT_SECRET'] @paper = Paper.find_by_review_issue_id(params[:id]) if params[:metadata] diff --git a/docs/installing.md b/docs/installing.md index d4704afd5..28ec524ef 100644 --- a/docs/installing.md +++ b/docs/installing.md @@ -86,7 +86,7 @@ If you do not already have access to these keys, you can simply ignore them for ```eval_rst .. note:: - One secret key we have not covered thus far is WHEDON_SECRET. + One secret key we have not covered thus far is BOT_SECRET. This is because it is not one that you obtain from a provide, but a secret key that you set yourself. We recommend using something like a random SHA1 string. @@ -214,7 +214,7 @@ For a list of the expected secret key names, see the `app.json` file. Many of these will be re-used from deploying your JOSS application. Specifically, the `GH_TOKEN` should be the same personal access token as before. -The `JOSS_API_KEY` should match the `WHEDON_SECRET` key that you created in your JOSS deployment. +The `JOSS_API_KEY` should match the `BOT_SECRET` key that you created in your JOSS deployment. You'll also need to provide a `HEROKU_APP_NAME`, `HEROKU_CLI_TOKEN`, and `HEROKU_CLI_USER` that the `restart.sh` script can use when executing. You can find these directly from the heroku-cli as detailed in [their documentation](https://devcenter.heroku.com/articles/authentication). diff --git a/spec/controllers/dispatch_controller_spec.rb b/spec/controllers/dispatch_controller_spec.rb index 6074ebbbd..de97fb03b 100644 --- a/spec/controllers/dispatch_controller_spec.rb +++ b/spec/controllers/dispatch_controller_spec.rb @@ -167,7 +167,7 @@ def headers(event, payload) end describe "POST #api_start_review" do - ENV["WHEDON_SECRET"] = "mooo" + ENV["BOT_SECRET"] = "mooo" it "with no API key" do post :api_start_review @@ -248,7 +248,7 @@ def headers(event, payload) end describe "POST #api_assign_editor" do - ENV["WHEDON_SECRET"] = "mooo" + ENV["BOT_SECRET"] = "mooo" it "with no API key" do post :api_assign_editor @@ -296,7 +296,7 @@ def headers(event, payload) end describe "POST #api_editor_invite" do - ENV["WHEDON_SECRET"] = "mooo" + ENV["BOT_SECRET"] = "mooo" it "with no API key" do post :api_editor_invite @@ -323,7 +323,7 @@ def headers(event, payload) end describe "POST #api_assign_reviewers" do - ENV["WHEDON_SECRET"] = "mooo" + ENV["BOT_SECRET"] = "mooo" it "with no API key" do post :api_assign_reviewers @@ -358,7 +358,7 @@ def headers(event, payload) end describe "PUT #api_reject" do - ENV["WHEDON_SECRET"] = "mooo" + ENV["BOT_SECRET"] = "mooo" it "with no API key" do post :api_reject @@ -387,7 +387,7 @@ def headers(event, payload) end describe "PUT #api_withdraw" do - ENV["WHEDON_SECRET"] = "mooo" + ENV["BOT_SECRET"] = "mooo" it "with no API key" do post :api_withdraw @@ -416,7 +416,7 @@ def headers(event, payload) end describe "POST #api_deposit" do - ENV["WHEDON_SECRET"] = "mooo" + ENV["BOT_SECRET"] = "mooo" it "with no API key" do post :api_deposit From 486dfae8d651daab328e5952c6d6434661275f5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 31 Jan 2022 14:17:17 +0100 Subject: [PATCH 284/609] update docs whedon->editorialbot --- app.json | 2 +- app/helpers/home_helper.rb | 6 +-- config/settings-development.yml | 2 +- config/settings-test.yml | 2 +- docs/editing.md | 73 ++++++++++++++------------------- docs/installing.md | 64 +++++++++-------------------- docs/review_criteria.md | 2 +- 7 files changed, 58 insertions(+), 93 deletions(-) diff --git a/app.json b/app.json index ddac09677..1d5eb07a3 100644 --- a/app.json +++ b/app.json @@ -21,7 +21,7 @@ "description": "The key that the editoria bot uses to authenticate" }, "GH_TOKEN": { - "description": "The GitHub token for Whedon" + "description": "The GitHub token for the editorial bot GitHub user" }, "PORTICO_HOST": { "description": "The FTP host for Portico" diff --git a/app/helpers/home_helper.rb b/app/helpers/home_helper.rb index 75b6d88e0..3cbc93269 100644 --- a/app/helpers/home_helper.rb +++ b/app/helpers/home_helper.rb @@ -57,9 +57,9 @@ def checklist_activity(paper) capture do if !paper.activities['issues']['comments'].empty? if paper.activities['issues']['last_edits'] && paper.activities['issues']['last_edits'].keys.any? - non_whedon_activities = paper.activities['issues']['last_edits'].select {|user, time| user != "whedon"} - return "No activity" if non_whedon_activities.empty? - user, time = non_whedon_activities.first + non_editorial_bot_activities = paper.activities['issues']['last_edits'].select {|user, time| user != "whedon"} + return "No activity" if non_editorial_bot_activities.empty? + user, time = non_editorial_bot_activities.first concat(content_tag(:span, image_tag(avatar(user), size: "24x24", class: "avatar", title: user), class: "activity-avatar")) concat(content_tag(:span, style: "") do concat(content_tag(:span, "#{time_ago_in_words(time)} ago".html_safe, class: "time")) diff --git a/config/settings-development.yml b/config/settings-development.yml index 1eb519be8..17146eb16 100644 --- a/config/settings-development.yml +++ b/config/settings-development.yml @@ -20,4 +20,4 @@ submission_enquiry: |- Briefly describe your software, its research application and any questions you have about the JOSS submission criteria. paper_types: [] -bot_username: whedon +bot_username: editorialbot diff --git a/config/settings-test.yml b/config/settings-test.yml index c77c4b7be..6a3ced2fa 100644 --- a/config/settings-test.yml +++ b/config/settings-test.yml @@ -20,4 +20,4 @@ submission_enquiry: |- Briefly describe your software, its research application and any questions you have about the JOSS submission criteria. paper_types: [] -bot_username: whedon +bot_username: editorialbot diff --git a/docs/editing.md b/docs/editing.md index b8a7302a0..b2273bbf0 100644 --- a/docs/editing.md +++ b/docs/editing.md @@ -3,10 +3,10 @@ Editorial Guide The Journal of Open Source Software (JOSS) conducts all peer review and editorial processes in the open, on the GitHub issue tracker. -JOSS editors manage the review workflow with the help of our bot, `@whedon`. The bot is summoned with commands typed directly on the GitHub review issues. For a list of commands, type: `@whedon commands`. +JOSS editors manage the review workflow with the help of our bot, `@editorialbot`. The bot is summoned with commands typed directly on the GitHub review issues. For a list of commands, type: `@editorialbot commands`. ```eval_rst -.. note:: To learn more about ``@whedon``'s functionalities, take a look at our `dedicated guide `_. +.. note:: To learn more about ``@editorialbot``'s functionalities, take a look at our `dedicated guide `_. ``` ## Pre-review @@ -17,12 +17,12 @@ Once a submission comes in, it will be in the queue for a quick check by the Edi .. important:: If the paper is out-of-scope for JOSS, editors assess this and notify the author in the ``PRE-REVIEW`` issue. ``` -Editors can flag submissions of questionable scope using the command `@whedon query scope`. +Editors can flag submissions of questionable scope using the command `@editorialbot query scope`. -The EiC assigns an editor (or a volunteering editor self-assigns) with the command `@whedon assign @username as editor` in a comment. +The EiC assigns an editor (or a volunteering editor self-assigns) with the command `@editorialbot assign @username as editor` in a comment. ```eval_rst -.. note:: If a paper is submitted without a recommended editor, it will show up in the weekly digest email under the category ‘Papers currently without an editor.’ Please review this weekly email and volunteer to edit papers that look to be in your domain. If you choose to be an editor in the issue thread type the command ``@whedon assign @yourhandle as editor`` or simply ``@whedon assign me as editor`` +.. note:: If a paper is submitted without a recommended editor, it will show up in the weekly digest email under the category ‘Papers currently without an editor.’ Please review this weekly email and volunteer to edit papers that look to be in your domain. If you choose to be an editor in the issue thread type the command ``@editorialbot assign @yourhandle as editor`` or simply ``@editorialbot assign me as editor`` ``` ### How papers are assigned to editors @@ -35,7 +35,7 @@ By default, unless an editor volunteers, the Associated Editor-in-chief (AEiC) o In most cases, an AEiC will ask one or more editors to edit a submission (e.g. `@editor1, @editor 2 - would one of you be willing to edit this submission for JOSS`). If the editor doesn't respond within ~3 working days, the AEiC may assign the paper to the editor regardless. -Editors may also be invited to edit over email when an AEiC runs the command `@whedon invite @editor1 as editor`. +Editors may also be invited to edit over email when an AEiC runs the command `@editorialbot invite @editor1 as editor`. ### Finding reviewers @@ -65,26 +65,18 @@ Finding reviewers can be challenging, especially if a submission is outside of y - Users of the the software that is being submission be interested in reviewing the submission - Avoid asking JOSS editors to review: If at all possible, avoid asking JOSS editors to review as they are generally very busy editing their own papers. -Once a reviewer accepts, the handling editor runs the command `@whedon assign @username as reviewer` in the `PRE-REVIEW` issue. Add more reviewers with the command `@whedon add @username as reviewer`. +Once a reviewer accepts, the handling editor runs the command `@editorialbot add @username as reviewer` in the `PRE-REVIEW` issue. Add more reviewers with the same command. Under the uncommon circumstance that a review must be started before all reviewers have been identified (e.g., if finding a second reviewer is taking a long time and the first reviewer wants to get started), an editor may elect to start the review and add the remaining reviewers later. To accomplish this, the editor will need to hand-edit the review checklist to create space for the reviewers added after the review issues is created. -```eval_rst -.. note:: The ``assign`` command clobbers all reviewer assignments. If you want to add an additional reviewer use the ``add`` command. -``` - ### Starting the review -Next, run the command `@whedon start review`. If you haven't assigned an editor and reviewer, this command will fail and `@whedon` will tell you this. This will open the `REVIEW` issue, with prepared review checklists for each reviewer, and instructions. The editor should close the `PRE-REVIEW` issue, at this point, and move the conversation to the separate `REVIEW` issue. +Next, run the command `@editorialbot start review`. If you haven't assigned an editor and reviewer, this command will fail and `@editorialbot` will tell you this. This will open the `REVIEW` issue, with prepared review checklists for each reviewer, and instructions. The editor should move the conversation to the separate `REVIEW` issue. ## Review -The `REVIEW` issue contains some instructions, and reviewer checklists. The reviewer(s) should check off items of the checklist one-by-one, until done. In the meantime, reviewers can engage the authors freely in a conversation aimed at improving the paper. - -```eval_rst -.. note:: When a new review is started, Whedon invites the reviewers to the GitHub repository. The reviewers must accept the invitation to the GitHub repository in order for Whedon to be able to assign the review issue to them, and reviewers are unable to check off checklist items until they have accepted the repository invitation. -``` +The `REVIEW` issue contains some instructions for the reviewers to get a checklist using the command `@editorialbot generate my checklist`. The reviewer(s) should check off items of the checklist one-by-one, until done. In the meantime, reviewers can engage the authors freely in a conversation aimed at improving the paper. -If a reviewer recants their commitment or is unresponsive, editors can remove them with the command `@whedon remove @username as reviewer`. You can also add new reviewers in the `REVIEW` issue, but in this case, you need to manually add a review checklist for them by editing the issue body. +If a reviewer recants their commitment or is unresponsive, editors can remove them with the command `@editorialbot remove @username from reviewers`. You can also add new reviewers in the `REVIEW` issue. Comments in the `REVIEW` issue should be kept brief, as much as possible, with more lengthy suggestions or requests posted as separate issues, directly in the submission repository. A link-back to those issues in the `REVIEW` is helpful. @@ -94,25 +86,24 @@ When the reviewers are satisfied with the improvements, we ask that they confirm Sometimes you'll need to add a new reviewer once the main review (i.e. post pre-review) is already underway. In this situation you should do the following: -- In the review thread, do `@whedon add @newreviewer as reviewer`. -- Manually edit the first message in the thread to add a checklist for @newreviewer. +- In the review thread, do `@editorialbot add @newreviewer as reviewer`. +- The new reviewer must use the command `@editorialbot generate my checklist` to get a checklist. -In the future, this will be more automated but for now, there's some manual work required. ## After reviewers recommend acceptance When a submission is ready to be accepted, we ask that the authors issue a new tagged release of the software (if changed), and archive it (on [Zenodo](https://zenodo.org/), [fig**share**](https://figshare.com/), or other). The authors then post the version number and archive DOI in the `REVIEW` issue. The handling editor executes the pre-publication steps, and pings the EiCs for final processing. Pre-publication steps: -- Get a new proof with the `@whedon generate pdf` command. +- Get a new proof with the `@editorialbot generate pdf` command. - Download the proof, check all references have DOIs, follow the links and check the references. - - Whedon can help check references with the command `@whedon check references` + - EditorialBot can help check references with the command `@editorialbot check references` - Proof-read the paper and ask authors to fix any remaining typos, badly formed citations, awkward wording, etc.. - Ask the author to make a tagged release and archive, and report the version number and archive DOI in the review thread. - Check the archive deposit has the correct metadata (title and author list), and request the author edit it if it doesn’t match the paper. -- Run `@whedon set as archive`. -- Run `@whedon set as version` if the version was updated. -- Run `@whedon recommend-accept` to generate the final proofs, which has Whedon notify the `@openjournals/joss-eics` team that the paper is ready for final processing. +- Run `@editorialbot set as archive`. +- Run `@editorialbot set as version` if the version was updated. +- Run `@editorialbot recommend acceptance` to generate the final proofs, which has EditorialBot notify the `@openjournals/joss-eics` team that the paper is ready for final processing. At this point, the EiC/AEiC will take over to make final checks and publish the paper. @@ -163,7 +154,7 @@ If a paper has already been reviewed and accepted by rOpenSci, the streamlined J If you believe a submission should be rejected, for example, because it is out of scope for JOSS, then you should: -- Ask Whedon to flag the submission as potentially out of scope with the command `@whedon query scope`. This command adds the `query-scope` label to the issue. +- Ask EditorialBot to flag the submission as potentially out of scope with the command `@editorialbot query scope`. This command adds the `query-scope` label to the issue. - Mention to the author your reasons for flagging the submission as possibly out of scope, and give them an opportunity to defend their submission. - The EiC on rotation will make a final determination of whether a submission is in scope, taking into account the feedback of other editors. @@ -235,7 +226,7 @@ Both reviewers have checklists at the top of this thread with the JOSS requireme The JOSS review is different from most other journals. Our goal is to work with the authors to help them meet our criteria instead of merely passing judgment on the submission. As such, the reviewers are encouraged to submit issues and pull requests on the software repository. When doing so, please mention `openjournals/joss-reviews#REVIEW_NUMBER` so that a link is created to this thread (and I can keep an eye on what is happening). Please also feel free to comment and ask questions on this thread. In my experience, it is better to post comments/questions/suggestions as you come across them instead of waiting until you've reviewed the entire package. -We aim for reviews to be completed within about 2-4 weeks. Please let me know if any of you require some more time. We can also use Whedon (our bot) to set automatic reminders if you know you'll be away for a known period of time. +We aim for reviews to be completed within about 2-4 weeks. Please let me know if any of you require some more time. We can also use EditorialBot (our bot) to set automatic reminders if you know you'll be away for a known period of time. Please feel free to ping me (@editorname) if you have any questions/concerns. ``` @@ -266,6 +257,8 @@ This doesn’t mean that you’re the editor, just that you’ve been suggested **Step 3: Once you are the editor, find the link to the code repository in the `pre-review` issue** +- If the paper is not in the default branch, add it to the issue with the command: `@editorialbot set branch-where-paper-is as branch`. + **Step 4: The editor looks at the software submitted and checks to see if:** - There’s a general description of the software @@ -276,23 +269,19 @@ This doesn’t mean that you’re the editor, just that you’ve been suggested **Step 6: The editor finds >= 2 reviewers** -- Use the list of reviewers: type the command `@whedon list reviewers` or look at list of reviewers in a Google [spreadsheet](https://docs.google.com/spreadsheets/d/1PAPRJ63yq9aPC1COLjaQp8mHmEq3rZUzwUYxTulyu78/edit?usp=sharing) +- Use the list of reviewers: type the command `@editorialbot list reviewers` or look at list of reviewers in a Google [spreadsheet](https://docs.google.com/spreadsheets/d/1PAPRJ63yq9aPC1COLjaQp8mHmEq3rZUzwUYxTulyu78/edit?usp=sharing) - If people are in the review list, the editor can @-mention them on the issue to see if they will review: e.g. `@person1 @person2 can you review this submission for JOSS?` - Or solicit reviewers outside the list. Send an email to people describing what JOSS is and asking if they would be interested in reviewing. - If you ask the author to suggest potential reviewers, please be sure to tell the author not to @-tag their suggestions. -**Step 7: Editor tells Whedon to assign the reviewer to the paper** - -- Use `@whedon assign @reviewer as reviewer` -- To add a second reviewer use `@whedon add @reviwer2 as reviewer` +**Step 7: Editor tells EditorialBot to assign the reviewers to the paper** -```eval_rst -.. note:: The ``assign`` command clobbers all reviewer assignments. If you want to add an additional reviewer use the ``add`` command. -``` +- Use `@editorialbot add @reviewer as reviewer` +- To add a second reviewer use `@editorialbot add @reviwer2 as reviewer` **Step 8: Create the actual review issue** -- Use `@whedon start review` +- Use `@editorialbot start review` - An issue is created with the review checklist, one per reviewer, e.g. https://github.com/openjournals/joss-reviews/issues/717 **Step 9: Close the pre-review issue** @@ -304,9 +293,9 @@ This doesn’t mean that you’re the editor, just that you’ve been suggested **Step 11: The editor pings the EiC team to get the paper published** -- Make a final check of the paper with `@whedon generate pdf` and that all references have DOIs (where appropriate) with `@whedon check references`. -- If everything looks good, ask the author to make a new release (if possible) of the software being reviewed and deposit a new archive the software with Zenodo/figshare. Update the review thread with this archive DOI: `@whedon set 10.5281/zenodo.xxxxxx` as archive. -- Finally, use `@whedon recommend-accept` on the review thread to ping the `@openjournals/joss-eics` team letting them know the paper is ready to be accepted. +- Make a final check of the paper with `@editorialbot generate pdf` and that all references have DOIs (where appropriate) with `@editorialbot check references`. +- If everything looks good, ask the author to make a new release (if possible) of the software being reviewed and deposit a new archive the software with Zenodo/figshare. Update the review thread with this archive DOI: `@editorialbot set 10.5281/zenodo.xxxxxx` as archive. +- Finally, use `@editorialbot recommend acceptance` on the review thread to ping the `@openjournals/joss-eics` team letting them know the paper is ready to be accepted. **Step 12: Celebrate publication! Tweet! Thank reviewers! Say thank you on issue.** @@ -328,10 +317,10 @@ As an editor, part of your role is to ensure that submissions you're responsible Sometimes reviews go quiet, either because a reviewer has failed to complete their review or an author has been slow to respond to a reviewer's feedback. **As the editor, we need you to prompt the author/or reviewer(s) to revisit the submission if there has been no response within 7-10 days unless there's a clear statement in the review thread that says an action is coming at a slightly later time, perhaps because a reviewer committed to a review by a certain date, or an author is making changes and says they will be done by a certain date.** -[Whedon has functionality](https://joss.readthedocs.io/en/latest/whedon.html#reminding-reviewers-and-authors) to remind an author or review to return to a review at a certain point in the future. For example: +[EditorialBot has functionality](https://joss.readthedocs.io/en/latest/editorial_bot.html#reminding-reviewers-and-authors) to remind an author or review to return to a review at a certain point in the future. For example: ``` -@whedon remind @reviewer in five days +@editorialbot remind @reviewer in five days ``` ## Out of office diff --git a/docs/installing.md b/docs/installing.md index 28ec524ef..58622a843 100644 --- a/docs/installing.md +++ b/docs/installing.md @@ -4,21 +4,21 @@ Installing the JOSS application Any Open Journal (JOSS, JOSE, etc.) can be considered in three parts: 1. The website -2. The Whedon gem -3. A thin API wrapper around the Whedon gem to interface with GitHub +2. The Buffy gem to interface with GitHub +3. Inara, a docker image to compile papers being used in GitHub actions and workflows For JOSS, these correspond to the: 1. [JOSS](https://github.com/openjournals/joss), -2. [Whedon](https://github.com/openjournals/whedon), and -3. [Whedon-API](https://github.com/openjournals/whedon-api) +2. [Buffy](https://github.com/openjournals/buffy), and +3. [Inara](https://github.com/openjournals/inara) code bases. ## Setting up a local development environment All Open Journals are coded in Ruby, -with the website and Whedon-API developed as +with the website and Buffy developed as [Ruby on Rails](https://rubyonrails.org/inst) applications. If you'd like to develop these locally, @@ -33,7 +33,7 @@ We also recommend you gather the following information before deploying your application to Heroku: 1. A [public ORCID API](https://members.orcid.org/api/about-public-api) key -1. A GitHub [Personal Access Token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token) for the automated account that users will interact with (e.g., `@Whedon`, `@RoboNeuro`). In order to be able to send invitations to reviewers and collaborators, the automated GitHub account must be an admin of the organization the reviews take place at. And the Personal Access Token should include the `admin:org` scope. +1. A GitHub [Personal Access Token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token) for the automated account that users will interact with (e.g., `@editorialbot`, `@RoboNeuro`). In order to be able to send invitations to reviewers and collaborators, the automated GitHub account must be an admin of the organization the reviews take place at. And the Personal Access Token should include the `admin:org` scope. 1. An email address registered on a domain you control (i.e., not `gmail` or a related service) ```eval_rst @@ -92,7 +92,7 @@ If you do not already have access to these keys, you can simply ignore them for We recommend using something like a random SHA1 string. It is important to remember this key, - as you will need it when deploying your Whedon-API application. + as you will need it when deploying your Buffy application. ``` After pushing your application to Heroku, provisioning the appropriate add-ons, @@ -182,54 +182,32 @@ In the same folder, `utils.rake` is currently hard-coded to alternate assignment You should modify this to either set a single editor-in-chief, or design your own scheme of alternating between members of your editorial board. -## Deploying your Whedon-API Application +## Deploying your Buffy Application -Whedon-API can also be deployed on Heroku. -Note that — for full functionality — Whedon-API must be deployed on [Hobby dynos](https://devcenter.heroku.com/articles/dyno-types), rather than free dynos. -Hobby dynos allow the Whedon-API application to run continuously, without falling asleep after 30 minutes of inactivity; -this means that Whedon-API can respond to activity on GitHub at any time. -Whedon-API specifically requires two Hobby dynos: one for the `web` service and one for the `worker` service. +Buffy can also be deployed on Heroku. +Note that — for full functionality — Buffy must be deployed on [Hobby dynos](https://devcenter.heroku.com/articles/dyno-types), rather than free dynos. +Hobby dynos allow the Buffy application to run continuously, without falling asleep after 30 minutes of inactivity; +this means that Buffy can respond to activity on GitHub at any time. +Buffy specifically requires two Hobby dynos: one for the `web` service and one for the `worker` service. -On the Whedon-API Heroku deployment, you'll need to provision several [add-ons](https://elements.heroku.com/addons). -Specifically, you'll need: - -1. [Cloudinary add-on](https://elements.heroku.com/addons/cloudinary) -1. [Scheduler add-on](https://devcenter.heroku.com/articles/scheduler) -1. [Redis To Go add-on](https://elements.heroku.com/addons/redistogo) - -For the scheduler add-on, you'll need to designate which tasks it should run and when. -The only task that needs to be scheduled is the `restart.sh` script, -which should be set to execute every hour. - -```eval_rst -.. warn: - Cloudinary `does not allow free accounts to serve PDFs `_ by default. - This will prevent your application from offering a paper preview service, as in https://whedon.theoj.org - To have this restriction lifted, you will need to `contact Cloudinary customer support `_ directly. -``` +For a complete step-by-step guide on installing and deploying Buffy, you can read the [Buffy documentation](https://buffy.readthedocs.io). As before, once you've pushed your application to Heroku and provisioned the appropriate add-ons, you're ready to update your config with the appropriate secrets. -For a list of the expected secret key names, see the `app.json` file. -Many of these will be re-used from deploying your JOSS application. - -Specifically, the `GH_TOKEN` should be the same personal access token as before. -The `JOSS_API_KEY` should match the `BOT_SECRET` key that you created in your JOSS deployment. -You'll also need to provide a `HEROKU_APP_NAME`, `HEROKU_CLI_TOKEN`, and `HEROKU_CLI_USER` that the `restart.sh` script can use when executing. -You can find these directly from the heroku-cli as detailed in [their documentation](https://devcenter.heroku.com/articles/authentication). +Specifically, the `JOSS_API_KEY`env var in Heroku should match the `BOT_SECRET` key that you created in your JOSS deployment. -## Modifying your Whedon-API deployment +## Modifying your Buffy deployment -Some times you may not want to launch an exact copy of the Whedon-API, but a modified version. +Some times you may not want to launch an exact copy of the Buffy, but a modified version. This can be especially useful if you're planning to spin up your own platform based on the Open Journals framework. -[RoboNeuro](https://github.com/roboneuro) is one such example use-case. +[rOpenSci-review-bot](https://github.com/ropensci-review-bot) and [Scoobies](https://github.com/scoobies) are examples of use-cases. -### Modifying your Whedon-API configuration +### Modifying your Buffy configuration Similar to the JOSS deployment described above, -the Whedon-API configuration is controlled through a series of YAML files included in the `config/` folder. +the Buffy configuration is controlled through a series of YAML files included in the `config/` folder. Each of these files provide relevant configuration for a different development context. Specifically, two files are defined: @@ -237,8 +215,6 @@ Specifically, two files are defined: 1. `settings-production.yml` which can be used to define testing and production environment variables, respectively. -Much of the information [previously defined for your JOSS deployment](#modifying-your-site-configuration) will carry over, -including the editor team ID. Finally, you'll need to set up a [GitHub webhook](https://docs.github.com/en/free-pro-team@latest/developers/webhooks-and-events/about-webhooks) for your reviews repository. As a reminder, this should be a repository that you have write access to. diff --git a/docs/review_criteria.md b/docs/review_criteria.md index 2b5c4a75e..0138fb22b 100644 --- a/docs/review_criteria.md +++ b/docs/review_criteria.md @@ -36,7 +36,7 @@ Reviewers should verify that the software represents substantial scholarly effor - Age of software (is this a well-established software project) / length of commit history. - Number of commits. - Number of authors. -- Lines of code (LOC): These statistics are usually reported by Whedon in the `pre-review` issue thread. +- Lines of code (LOC): These statistics are usually reported by EditorialBot in the `pre-review` issue thread. - Whether the software has already been cited in academic papers. - Whether the software is sufficiently useful that it is _likely to be cited_ by other researchers working in this domain. From aa46eb29b94d49f7bb4b4c8e405ae451069984ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 31 Jan 2022 14:27:45 +0100 Subject: [PATCH 285/609] remove whedon from specs --- app/helpers/home_helper.rb | 2 +- spec/controllers/dispatch_controller_spec.rb | 44 ++++++++-------- .../should_update_the_last_activity_field.yml | 2 +- .../should_update_the_last_edits_key.yml | 2 +- ...ould_update_the_percent_complete_value.yml | 2 +- spec/fixtures/editor-pre-review-comment.json | 50 +++++++++--------- spec/fixtures/editor-review-comment.json | 50 +++++++++--------- ...bot-pre-review-comment-random-review.json} | 52 +++++++++---------- ...n => editorialbot-pre-review-comment.json} | 52 +++++++++---------- ...on => editorialbot-pre-review-opened.json} | 2 +- ....json => editorialbot-review-comment.json} | 52 +++++++++---------- ...dit.json => editorialbot-review-edit.json} | 24 ++++----- ....json => editorialbot-review-labeled.json} | 48 ++++++++--------- ...d.json => editorialbot-review-opened.json} | 2 +- spec/fixtures/review-body-79.json | 24 ++++----- 15 files changed, 204 insertions(+), 204 deletions(-) rename spec/fixtures/{whedon-pre-review-comment-random-review.json => editorialbot-pre-review-comment-random-review.json} (83%) rename spec/fixtures/{whedon-pre-review-comment.json => editorialbot-pre-review-comment.json} (83%) rename spec/fixtures/{whedon-pre-review-opened.json => editorialbot-pre-review-opened.json} (98%) rename spec/fixtures/{whedon-review-comment.json => editorialbot-review-comment.json} (83%) rename spec/fixtures/{whedon-review-edit.json => editorialbot-review-edit.json} (94%) rename spec/fixtures/{whedon-review-labeled.json => editorialbot-review-labeled.json} (86%) rename spec/fixtures/{whedon-review-opened.json => editorialbot-review-opened.json} (98%) diff --git a/app/helpers/home_helper.rb b/app/helpers/home_helper.rb index 3cbc93269..c1f3b0b48 100644 --- a/app/helpers/home_helper.rb +++ b/app/helpers/home_helper.rb @@ -57,7 +57,7 @@ def checklist_activity(paper) capture do if !paper.activities['issues']['comments'].empty? if paper.activities['issues']['last_edits'] && paper.activities['issues']['last_edits'].keys.any? - non_editorial_bot_activities = paper.activities['issues']['last_edits'].select {|user, time| user != "whedon"} + non_editorial_bot_activities = paper.activities['issues']['last_edits'].select {|user, time| user != Rails.application.settings["bot_username"]} return "No activity" if non_editorial_bot_activities.empty? user, time = non_editorial_bot_activities.first concat(content_tag(:span, image_tag(avatar(user), size: "24x24", class: "avatar", title: user), class: "activity-avatar")) diff --git a/spec/controllers/dispatch_controller_spec.rb b/spec/controllers/dispatch_controller_spec.rb index de97fb03b..04b30ec5c 100644 --- a/spec/controllers/dispatch_controller_spec.rb +++ b/spec/controllers/dispatch_controller_spec.rb @@ -20,24 +20,24 @@ def headers(event, payload) describe DispatchController, type: :controller do render_views - let(:whedon_pre_review_opened) { json_fixture('whedon-pre-review-opened.json') } - let(:whedon_pre_review_comment) { json_fixture('whedon-pre-review-comment.json') } + let(:editorialbot_pre_review_opened) { json_fixture('editorialbot-pre-review-opened.json') } + let(:editorialbot_pre_review_comment) { json_fixture('editorialbot-pre-review-comment.json') } let(:editor_pre_review_comment) { json_fixture('editor-pre-review-comment.json') } - let(:whedon_review_opened) { json_fixture('whedon-review-opened.json') } - let(:whedon_review_comment) { json_fixture('whedon-review-comment.json') } + let(:editorialbot_review_opened) { json_fixture('editorialbot-review-opened.json') } + let(:editorialbot_review_comment) { json_fixture('editorialbot-review-comment.json') } let(:editor_review_comment) { json_fixture('editor-review-comment.json') } - let(:whedon_review_edit) { json_fixture('whedon-review-edit.json') } + let(:editorialbot_review_edit) { json_fixture('editorialbot-review-edit.json') } - let(:whedon_review_labeled) { json_fixture('whedon-review-labeled.json') } + let(:editorialbot_review_labeled) { json_fixture('editorialbot-review-labeled.json') } - let(:whedon_pre_review_comment_random) { json_fixture('whedon-pre-review-comment-random-review.json') } + let(:editorialbot_pre_review_comment_random) { json_fixture('editorialbot-pre-review-comment-random-review.json') } describe "POST #github_receiver for REVIEW with invalid HTTP_X_HUB_SIGNATURE", type: :request do before do wrong_payload = "foobarbaz" @paper = create(:paper, meta_review_issue_id: 78, review_issue_id: 79) - post '/dispatch', params: whedon_review_opened, headers: headers(:issues, wrong_payload) + post '/dispatch', params: editorialbot_review_opened, headers: headers(:issues, wrong_payload) @paper.reload end @@ -51,7 +51,7 @@ def headers(event, payload) describe "POST #github_receiver for PRE-REVIEW", type: :request do before do @paper = create(:paper, meta_review_issue_id: 78, review_issue_id: nil) - post '/dispatch', params: whedon_pre_review_opened, headers: headers(:issues, whedon_pre_review_opened) + post '/dispatch', params: editorialbot_pre_review_opened, headers: headers(:issues, editorialbot_pre_review_opened) @paper.reload end @@ -61,22 +61,22 @@ def headers(event, payload) end it "should UPDATE the activities when an issue is then commented on" do - post '/dispatch', params: whedon_pre_review_comment, headers: headers(:issue_comment, whedon_pre_review_comment) + post '/dispatch', params: editorialbot_pre_review_comment, headers: headers(:issue_comment, editorialbot_pre_review_comment) post '/dispatch', params: editor_pre_review_comment, headers: headers(:issue_comment, editor_pre_review_comment) @paper.reload expect(response).to be_ok - expect(@paper.activities['issues']['commenters']).to eq({"pre-review"=>{"whedon"=>1, "editor"=>1}, "review"=>{}}) + expect(@paper.activities['issues']['commenters']).to eq({"pre-review"=>{"editorialbot"=>1, "editor"=>1}, "review"=>{}}) expect(@paper.activities['issues']['comments'].length).to eq(2) expect(@paper.activities['issues']['last_comments']['editor']).to eq("2018-09-30T11:48:30Z") - expect(@paper.activities['issues']['last_comments']['whedon']).to eq("2018-09-30T11:48:40Z") + expect(@paper.activities['issues']['last_comments']['editorialbot']).to eq("2018-09-30T11:48:40Z") end end describe "POST #github_receiver for REVIEW with labeling event", type: :request do before do @paper = create(:paper, meta_review_issue_id: 78, review_issue_id: 79, labels: [{ "foo" => "efefef" }]) - post '/dispatch', params: whedon_review_labeled, headers: headers(:issues, whedon_review_labeled) + post '/dispatch', params: editorialbot_review_labeled, headers: headers(:issues, editorialbot_review_labeled) @paper.reload end @@ -91,7 +91,7 @@ def headers(event, payload) build(:paper, meta_review_issue_id: 78, suggested_editor: nil, review_issue_id: 79, labels: [{ "foo" => "efefef" }]).save(validate: false) @paper = Paper.find_by_meta_review_issue_id(78) - post '/dispatch', params: whedon_review_labeled, headers: headers(:issues, whedon_review_labeled) + post '/dispatch', params: editorialbot_review_labeled, headers: headers(:issues, editorialbot_review_labeled) @paper.reload end @@ -104,7 +104,7 @@ def headers(event, payload) describe "POST #github_receiver for REVIEW - open", type: :request, vcr: true do before do @paper = create(:paper, meta_review_issue_id: 78, review_issue_id: 79) - post '/dispatch', params: whedon_review_opened, headers: headers(:issues, whedon_review_opened) + post '/dispatch', params: editorialbot_review_opened, headers: headers(:issues, editorialbot_review_opened) @paper.reload end @@ -117,7 +117,7 @@ def headers(event, payload) describe "POST #github_receiver for REVIEW", type: :request, vcr: true do before do @paper = create(:paper, meta_review_issue_id: 78, review_issue_id: 79) - post '/dispatch', params: whedon_review_edit, headers: headers(:issues, whedon_review_edit) + post '/dispatch', params: editorialbot_review_edit, headers: headers(:issues, editorialbot_review_edit) @paper.reload end @@ -127,7 +127,7 @@ def headers(event, payload) end it "should update the last_activity field" do - github_updated_at = JSON.parse(whedon_review_edit)['issue']['updated_at'].to_datetime.strftime("%Y-%m-%dT%l:%M:%S%z") + github_updated_at = JSON.parse(editorialbot_review_edit)['issue']['updated_at'].to_datetime.strftime("%Y-%m-%dT%l:%M:%S%z") expect(@paper.last_activity.strftime('%Y-%m-%dT%l:%M:%S%z')).to eql(github_updated_at) end end @@ -135,7 +135,7 @@ def headers(event, payload) describe "POST #github_receiver", type: :request do it "shouldn't do anything if the payload is not for one of the papers" do random_paper = create(:paper, meta_review_issue_id: 1234) - post '/dispatch', params: whedon_pre_review_comment, headers: headers(:issue_comment, whedon_pre_review_comment) + post '/dispatch', params: editorialbot_pre_review_comment, headers: headers(:issue_comment, editorialbot_pre_review_comment) random_paper.reload expect(response).to be_ok @@ -144,7 +144,7 @@ def headers(event, payload) it "shouldn't do anything if a payload is received for the wrong repository" do paper = create(:paper, meta_review_issue_id: 78) - post '/dispatch', params: whedon_pre_review_comment_random, headers: headers(:issue_comment, whedon_pre_review_comment_random) + post '/dispatch', params: editorialbot_pre_review_comment_random, headers: headers(:issue_comment, editorialbot_pre_review_comment_random) paper.reload expect(response).to be_forbidden @@ -153,14 +153,14 @@ def headers(event, payload) end it "shouldn't care if an issue comment payload is received before the 'opened' payload" do - signature = set_signature(whedon_review_comment) + signature = set_signature(editorialbot_review_comment) paper = create(:paper, meta_review_issue_id: 78, review_issue_id: 79) - post '/dispatch', params: whedon_review_comment, headers: headers(:issue_comment, whedon_review_comment) + post '/dispatch', params: editorialbot_review_comment, headers: headers(:issue_comment, editorialbot_review_comment) paper.reload expect(response).to be_ok - expect(paper.activities['issues']['commenters']).to eq({"pre-review"=>{}, "review"=>{"whedon"=>1}}) + expect(paper.activities['issues']['commenters']).to eq({"pre-review"=>{}, "review"=>{"editorialbot"=>1}}) expect(paper.activities['issues']['comments'].length).to eq(1) expect(paper.activities['issues']['commenters']['reviews']).to be_nil end diff --git a/spec/fixtures/cassettes/DispatchController/POST_github_receiver_for_REVIEW/should_update_the_last_activity_field.yml b/spec/fixtures/cassettes/DispatchController/POST_github_receiver_for_REVIEW/should_update_the_last_activity_field.yml index 4feaf9584..c7fba1089 100644 --- a/spec/fixtures/cassettes/DispatchController/POST_github_receiver_for_REVIEW/should_update_the_last_activity_field.yml +++ b/spec/fixtures/cassettes/DispatchController/POST_github_receiver_for_REVIEW/should_update_the_last_activity_field.yml @@ -69,7 +69,7 @@ http_interactions: body: encoding: ASCII-8BIT string: '{"url":"https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79","repository_url":"https://api.github.com/repos/openjournals/joss-reviews-testing","labels_url":"https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/comments","events_url":"https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/events","html_url":"https://github.com/openjournals/joss-reviews-testing/issues/79","id":178630651,"node_id":"MDU6SXNzdWUxNzg2MzA2NTE=","number":79,"title":"[REVIEW]: - Python Active-subspaces Utility Library","user":{"login":"whedon","id":18508068,"node_id":"MDQ6VXNlcjE4NTA4MDY4","avatar_url":"https://avatars.githubusercontent.com/u/18508068?v=4","gravatar_id":"","url":"https://api.github.com/users/whedon","html_url":"https://github.com/whedon","followers_url":"https://api.github.com/users/whedon/followers","following_url":"https://api.github.com/users/whedon/following{/other_user}","gists_url":"https://api.github.com/users/whedon/gists{/gist_id}","starred_url":"https://api.github.com/users/whedon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whedon/subscriptions","organizations_url":"https://api.github.com/users/whedon/orgs","repos_url":"https://api.github.com/users/whedon/repos","events_url":"https://api.github.com/users/whedon/events{/privacy}","received_events_url":"https://api.github.com/users/whedon/received_events","type":"User","site_admin":false},"labels":[{"id":330461591,"node_id":"MDU6TGFiZWwzMzA0NjE1OTE=","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/accepted","name":"accepted","color":"159818","default":false,"description":null},{"id":1880544947,"node_id":"MDU6TGFiZWwxODgwNTQ0OTQ3","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/published","name":"published","color":"e276d8","default":false,"description":"Papers + Python Active-subspaces Utility Library","user":{"login":"editorialbot","id":18508068,"node_id":"MDQ6VXNlcjE4NTA4MDY4","avatar_url":"https://avatars.githubusercontent.com/u/18508068?v=4","gravatar_id":"","url":"https://api.github.com/users/editorialbot","html_url":"https://github.com/editorialbot","followers_url":"https://api.github.com/users/editorialbot/followers","following_url":"https://api.github.com/users/editorialbot/following{/other_user}","gists_url":"https://api.github.com/users/editorialbot/gists{/gist_id}","starred_url":"https://api.github.com/users/editorialbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/editorialbot/subscriptions","organizations_url":"https://api.github.com/users/editorialbot/orgs","repos_url":"https://api.github.com/users/editorialbot/repos","events_url":"https://api.github.com/users/editorialbot/events{/privacy}","received_events_url":"https://api.github.com/users/editorialbot/received_events","type":"User","site_admin":false},"labels":[{"id":330461591,"node_id":"MDU6TGFiZWwzMzA0NjE1OTE=","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/accepted","name":"accepted","color":"159818","default":false,"description":null},{"id":1880544947,"node_id":"MDU6TGFiZWwxODgwNTQ0OTQ3","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/published","name":"published","color":"e276d8","default":false,"description":"Papers published in JOSS"},{"id":1880543836,"node_id":"MDU6TGFiZWwxODgwNTQzODM2","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/recommend-accept","name":"recommend-accept","color":"b9f9a9","default":false,"description":"Papers recommended for acceptance in JOSS."},{"id":330465313,"node_id":"MDU6TGFiZWwzMzA0NjUzMTM=","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/review","name":"review","color":"fbca04","default":false,"description":null}],"state":"closed","locked":false,"assignee":{"login":"kyleniemeyer","id":190432,"node_id":"MDQ6VXNlcjE5MDQzMg==","avatar_url":"https://avatars.githubusercontent.com/u/190432?v=4","gravatar_id":"","url":"https://api.github.com/users/kyleniemeyer","html_url":"https://github.com/kyleniemeyer","followers_url":"https://api.github.com/users/kyleniemeyer/followers","following_url":"https://api.github.com/users/kyleniemeyer/following{/other_user}","gists_url":"https://api.github.com/users/kyleniemeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleniemeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleniemeyer/subscriptions","organizations_url":"https://api.github.com/users/kyleniemeyer/orgs","repos_url":"https://api.github.com/users/kyleniemeyer/repos","events_url":"https://api.github.com/users/kyleniemeyer/events{/privacy}","received_events_url":"https://api.github.com/users/kyleniemeyer/received_events","type":"User","site_admin":false},"assignees":[{"login":"kyleniemeyer","id":190432,"node_id":"MDQ6VXNlcjE5MDQzMg==","avatar_url":"https://avatars.githubusercontent.com/u/190432?v=4","gravatar_id":"","url":"https://api.github.com/users/kyleniemeyer","html_url":"https://github.com/kyleniemeyer","followers_url":"https://api.github.com/users/kyleniemeyer/followers","following_url":"https://api.github.com/users/kyleniemeyer/following{/other_user}","gists_url":"https://api.github.com/users/kyleniemeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleniemeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleniemeyer/subscriptions","organizations_url":"https://api.github.com/users/kyleniemeyer/orgs","repos_url":"https://api.github.com/users/kyleniemeyer/repos","events_url":"https://api.github.com/users/kyleniemeyer/events{/privacy}","received_events_url":"https://api.github.com/users/kyleniemeyer/received_events","type":"User","site_admin":false},{"login":"nicoguaro","id":1097787,"node_id":"MDQ6VXNlcjEwOTc3ODc=","avatar_url":"https://avatars.githubusercontent.com/u/1097787?v=4","gravatar_id":"","url":"https://api.github.com/users/nicoguaro","html_url":"https://github.com/nicoguaro","followers_url":"https://api.github.com/users/nicoguaro/followers","following_url":"https://api.github.com/users/nicoguaro/following{/other_user}","gists_url":"https://api.github.com/users/nicoguaro/gists{/gist_id}","starred_url":"https://api.github.com/users/nicoguaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicoguaro/subscriptions","organizations_url":"https://api.github.com/users/nicoguaro/orgs","repos_url":"https://api.github.com/users/nicoguaro/repos","events_url":"https://api.github.com/users/nicoguaro/events{/privacy}","received_events_url":"https://api.github.com/users/nicoguaro/received_events","type":"User","site_admin":false},{"login":"mtezzele","id":8956946,"node_id":"MDQ6VXNlcjg5NTY5NDY=","avatar_url":"https://avatars.githubusercontent.com/u/8956946?v=4","gravatar_id":"","url":"https://api.github.com/users/mtezzele","html_url":"https://github.com/mtezzele","followers_url":"https://api.github.com/users/mtezzele/followers","following_url":"https://api.github.com/users/mtezzele/following{/other_user}","gists_url":"https://api.github.com/users/mtezzele/gists{/gist_id}","starred_url":"https://api.github.com/users/mtezzele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtezzele/subscriptions","organizations_url":"https://api.github.com/users/mtezzele/orgs","repos_url":"https://api.github.com/users/mtezzele/repos","events_url":"https://api.github.com/users/mtezzele/events{/privacy}","received_events_url":"https://api.github.com/users/mtezzele/received_events","type":"User","site_admin":false}],"milestone":null,"comments":28,"created_at":"2016-09-22T14:46:47Z","updated_at":"2021-02-14T16:46:54Z","closed_at":"2016-09-29T19:17:28Z","author_association":"COLLABORATOR","active_lock_reason":null,"body":"**Submitting author:** @paulcon (Paul diff --git a/spec/fixtures/cassettes/DispatchController/POST_github_receiver_for_REVIEW/should_update_the_last_edits_key.yml b/spec/fixtures/cassettes/DispatchController/POST_github_receiver_for_REVIEW/should_update_the_last_edits_key.yml index c1a4b5141..f4e4d8b6b 100644 --- a/spec/fixtures/cassettes/DispatchController/POST_github_receiver_for_REVIEW/should_update_the_last_edits_key.yml +++ b/spec/fixtures/cassettes/DispatchController/POST_github_receiver_for_REVIEW/should_update_the_last_edits_key.yml @@ -69,7 +69,7 @@ http_interactions: body: encoding: ASCII-8BIT string: '{"url":"https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79","repository_url":"https://api.github.com/repos/openjournals/joss-reviews-testing","labels_url":"https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/comments","events_url":"https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/events","html_url":"https://github.com/openjournals/joss-reviews-testing/issues/79","id":178630651,"node_id":"MDU6SXNzdWUxNzg2MzA2NTE=","number":79,"title":"[REVIEW]: - Python Active-subspaces Utility Library","user":{"login":"whedon","id":18508068,"node_id":"MDQ6VXNlcjE4NTA4MDY4","avatar_url":"https://avatars.githubusercontent.com/u/18508068?v=4","gravatar_id":"","url":"https://api.github.com/users/whedon","html_url":"https://github.com/whedon","followers_url":"https://api.github.com/users/whedon/followers","following_url":"https://api.github.com/users/whedon/following{/other_user}","gists_url":"https://api.github.com/users/whedon/gists{/gist_id}","starred_url":"https://api.github.com/users/whedon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whedon/subscriptions","organizations_url":"https://api.github.com/users/whedon/orgs","repos_url":"https://api.github.com/users/whedon/repos","events_url":"https://api.github.com/users/whedon/events{/privacy}","received_events_url":"https://api.github.com/users/whedon/received_events","type":"User","site_admin":false},"labels":[{"id":330461591,"node_id":"MDU6TGFiZWwzMzA0NjE1OTE=","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/accepted","name":"accepted","color":"159818","default":false,"description":null},{"id":1880544947,"node_id":"MDU6TGFiZWwxODgwNTQ0OTQ3","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/published","name":"published","color":"e276d8","default":false,"description":"Papers + Python Active-subspaces Utility Library","user":{"login":"editorialbot","id":18508068,"node_id":"MDQ6VXNlcjE4NTA4MDY4","avatar_url":"https://avatars.githubusercontent.com/u/18508068?v=4","gravatar_id":"","url":"https://api.github.com/users/editorialbot","html_url":"https://github.com/editorialbot","followers_url":"https://api.github.com/users/editorialbot/followers","following_url":"https://api.github.com/users/editorialbot/following{/other_user}","gists_url":"https://api.github.com/users/editorialbot/gists{/gist_id}","starred_url":"https://api.github.com/users/editorialbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/editorialbot/subscriptions","organizations_url":"https://api.github.com/users/editorialbot/orgs","repos_url":"https://api.github.com/users/editorialbot/repos","events_url":"https://api.github.com/users/editorialbot/events{/privacy}","received_events_url":"https://api.github.com/users/editorialbot/received_events","type":"User","site_admin":false},"labels":[{"id":330461591,"node_id":"MDU6TGFiZWwzMzA0NjE1OTE=","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/accepted","name":"accepted","color":"159818","default":false,"description":null},{"id":1880544947,"node_id":"MDU6TGFiZWwxODgwNTQ0OTQ3","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/published","name":"published","color":"e276d8","default":false,"description":"Papers published in JOSS"},{"id":1880543836,"node_id":"MDU6TGFiZWwxODgwNTQzODM2","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/recommend-accept","name":"recommend-accept","color":"b9f9a9","default":false,"description":"Papers recommended for acceptance in JOSS."},{"id":330465313,"node_id":"MDU6TGFiZWwzMzA0NjUzMTM=","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/review","name":"review","color":"fbca04","default":false,"description":null}],"state":"closed","locked":false,"assignee":{"login":"kyleniemeyer","id":190432,"node_id":"MDQ6VXNlcjE5MDQzMg==","avatar_url":"https://avatars.githubusercontent.com/u/190432?v=4","gravatar_id":"","url":"https://api.github.com/users/kyleniemeyer","html_url":"https://github.com/kyleniemeyer","followers_url":"https://api.github.com/users/kyleniemeyer/followers","following_url":"https://api.github.com/users/kyleniemeyer/following{/other_user}","gists_url":"https://api.github.com/users/kyleniemeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleniemeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleniemeyer/subscriptions","organizations_url":"https://api.github.com/users/kyleniemeyer/orgs","repos_url":"https://api.github.com/users/kyleniemeyer/repos","events_url":"https://api.github.com/users/kyleniemeyer/events{/privacy}","received_events_url":"https://api.github.com/users/kyleniemeyer/received_events","type":"User","site_admin":false},"assignees":[{"login":"kyleniemeyer","id":190432,"node_id":"MDQ6VXNlcjE5MDQzMg==","avatar_url":"https://avatars.githubusercontent.com/u/190432?v=4","gravatar_id":"","url":"https://api.github.com/users/kyleniemeyer","html_url":"https://github.com/kyleniemeyer","followers_url":"https://api.github.com/users/kyleniemeyer/followers","following_url":"https://api.github.com/users/kyleniemeyer/following{/other_user}","gists_url":"https://api.github.com/users/kyleniemeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleniemeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleniemeyer/subscriptions","organizations_url":"https://api.github.com/users/kyleniemeyer/orgs","repos_url":"https://api.github.com/users/kyleniemeyer/repos","events_url":"https://api.github.com/users/kyleniemeyer/events{/privacy}","received_events_url":"https://api.github.com/users/kyleniemeyer/received_events","type":"User","site_admin":false},{"login":"nicoguaro","id":1097787,"node_id":"MDQ6VXNlcjEwOTc3ODc=","avatar_url":"https://avatars.githubusercontent.com/u/1097787?v=4","gravatar_id":"","url":"https://api.github.com/users/nicoguaro","html_url":"https://github.com/nicoguaro","followers_url":"https://api.github.com/users/nicoguaro/followers","following_url":"https://api.github.com/users/nicoguaro/following{/other_user}","gists_url":"https://api.github.com/users/nicoguaro/gists{/gist_id}","starred_url":"https://api.github.com/users/nicoguaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicoguaro/subscriptions","organizations_url":"https://api.github.com/users/nicoguaro/orgs","repos_url":"https://api.github.com/users/nicoguaro/repos","events_url":"https://api.github.com/users/nicoguaro/events{/privacy}","received_events_url":"https://api.github.com/users/nicoguaro/received_events","type":"User","site_admin":false},{"login":"mtezzele","id":8956946,"node_id":"MDQ6VXNlcjg5NTY5NDY=","avatar_url":"https://avatars.githubusercontent.com/u/8956946?v=4","gravatar_id":"","url":"https://api.github.com/users/mtezzele","html_url":"https://github.com/mtezzele","followers_url":"https://api.github.com/users/mtezzele/followers","following_url":"https://api.github.com/users/mtezzele/following{/other_user}","gists_url":"https://api.github.com/users/mtezzele/gists{/gist_id}","starred_url":"https://api.github.com/users/mtezzele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtezzele/subscriptions","organizations_url":"https://api.github.com/users/mtezzele/orgs","repos_url":"https://api.github.com/users/mtezzele/repos","events_url":"https://api.github.com/users/mtezzele/events{/privacy}","received_events_url":"https://api.github.com/users/mtezzele/received_events","type":"User","site_admin":false}],"milestone":null,"comments":28,"created_at":"2016-09-22T14:46:47Z","updated_at":"2021-02-14T16:46:54Z","closed_at":"2016-09-29T19:17:28Z","author_association":"COLLABORATOR","active_lock_reason":null,"body":"**Submitting author:** @paulcon (Paul diff --git a/spec/fixtures/cassettes/DispatchController/POST_github_receiver_for_REVIEW/should_update_the_percent_complete_value.yml b/spec/fixtures/cassettes/DispatchController/POST_github_receiver_for_REVIEW/should_update_the_percent_complete_value.yml index 0a9a44f8c..b6a66af6c 100644 --- a/spec/fixtures/cassettes/DispatchController/POST_github_receiver_for_REVIEW/should_update_the_percent_complete_value.yml +++ b/spec/fixtures/cassettes/DispatchController/POST_github_receiver_for_REVIEW/should_update_the_percent_complete_value.yml @@ -69,7 +69,7 @@ http_interactions: body: encoding: ASCII-8BIT string: '{"url":"https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79","repository_url":"https://api.github.com/repos/openjournals/joss-reviews-testing","labels_url":"https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/comments","events_url":"https://api.github.com/repos/openjournals/joss-reviews-testing/issues/79/events","html_url":"https://github.com/openjournals/joss-reviews-testing/issues/79","id":178630651,"node_id":"MDU6SXNzdWUxNzg2MzA2NTE=","number":79,"title":"[REVIEW]: - Python Active-subspaces Utility Library","user":{"login":"whedon","id":18508068,"node_id":"MDQ6VXNlcjE4NTA4MDY4","avatar_url":"https://avatars.githubusercontent.com/u/18508068?v=4","gravatar_id":"","url":"https://api.github.com/users/whedon","html_url":"https://github.com/whedon","followers_url":"https://api.github.com/users/whedon/followers","following_url":"https://api.github.com/users/whedon/following{/other_user}","gists_url":"https://api.github.com/users/whedon/gists{/gist_id}","starred_url":"https://api.github.com/users/whedon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whedon/subscriptions","organizations_url":"https://api.github.com/users/whedon/orgs","repos_url":"https://api.github.com/users/whedon/repos","events_url":"https://api.github.com/users/whedon/events{/privacy}","received_events_url":"https://api.github.com/users/whedon/received_events","type":"User","site_admin":false},"labels":[{"id":330461591,"node_id":"MDU6TGFiZWwzMzA0NjE1OTE=","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/accepted","name":"accepted","color":"159818","default":false,"description":null},{"id":1880544947,"node_id":"MDU6TGFiZWwxODgwNTQ0OTQ3","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/published","name":"published","color":"e276d8","default":false,"description":"Papers + Python Active-subspaces Utility Library","user":{"login":"editorialbot","id":18508068,"node_id":"MDQ6VXNlcjE4NTA4MDY4","avatar_url":"https://avatars.githubusercontent.com/u/18508068?v=4","gravatar_id":"","url":"https://api.github.com/users/editorialbot","html_url":"https://github.com/editorialbot","followers_url":"https://api.github.com/users/editorialbot/followers","following_url":"https://api.github.com/users/editorialbot/following{/other_user}","gists_url":"https://api.github.com/users/editorialbot/gists{/gist_id}","starred_url":"https://api.github.com/users/editorialbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/editorialbot/subscriptions","organizations_url":"https://api.github.com/users/editorialbot/orgs","repos_url":"https://api.github.com/users/editorialbot/repos","events_url":"https://api.github.com/users/editorialbot/events{/privacy}","received_events_url":"https://api.github.com/users/editorialbot/received_events","type":"User","site_admin":false},"labels":[{"id":330461591,"node_id":"MDU6TGFiZWwzMzA0NjE1OTE=","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/accepted","name":"accepted","color":"159818","default":false,"description":null},{"id":1880544947,"node_id":"MDU6TGFiZWwxODgwNTQ0OTQ3","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/published","name":"published","color":"e276d8","default":false,"description":"Papers published in JOSS"},{"id":1880543836,"node_id":"MDU6TGFiZWwxODgwNTQzODM2","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/recommend-accept","name":"recommend-accept","color":"b9f9a9","default":false,"description":"Papers recommended for acceptance in JOSS."},{"id":330465313,"node_id":"MDU6TGFiZWwzMzA0NjUzMTM=","url":"https://api.github.com/repos/openjournals/joss-reviews-testing/labels/review","name":"review","color":"fbca04","default":false,"description":null}],"state":"closed","locked":false,"assignee":{"login":"kyleniemeyer","id":190432,"node_id":"MDQ6VXNlcjE5MDQzMg==","avatar_url":"https://avatars.githubusercontent.com/u/190432?v=4","gravatar_id":"","url":"https://api.github.com/users/kyleniemeyer","html_url":"https://github.com/kyleniemeyer","followers_url":"https://api.github.com/users/kyleniemeyer/followers","following_url":"https://api.github.com/users/kyleniemeyer/following{/other_user}","gists_url":"https://api.github.com/users/kyleniemeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleniemeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleniemeyer/subscriptions","organizations_url":"https://api.github.com/users/kyleniemeyer/orgs","repos_url":"https://api.github.com/users/kyleniemeyer/repos","events_url":"https://api.github.com/users/kyleniemeyer/events{/privacy}","received_events_url":"https://api.github.com/users/kyleniemeyer/received_events","type":"User","site_admin":false},"assignees":[{"login":"kyleniemeyer","id":190432,"node_id":"MDQ6VXNlcjE5MDQzMg==","avatar_url":"https://avatars.githubusercontent.com/u/190432?v=4","gravatar_id":"","url":"https://api.github.com/users/kyleniemeyer","html_url":"https://github.com/kyleniemeyer","followers_url":"https://api.github.com/users/kyleniemeyer/followers","following_url":"https://api.github.com/users/kyleniemeyer/following{/other_user}","gists_url":"https://api.github.com/users/kyleniemeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/kyleniemeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kyleniemeyer/subscriptions","organizations_url":"https://api.github.com/users/kyleniemeyer/orgs","repos_url":"https://api.github.com/users/kyleniemeyer/repos","events_url":"https://api.github.com/users/kyleniemeyer/events{/privacy}","received_events_url":"https://api.github.com/users/kyleniemeyer/received_events","type":"User","site_admin":false},{"login":"nicoguaro","id":1097787,"node_id":"MDQ6VXNlcjEwOTc3ODc=","avatar_url":"https://avatars.githubusercontent.com/u/1097787?v=4","gravatar_id":"","url":"https://api.github.com/users/nicoguaro","html_url":"https://github.com/nicoguaro","followers_url":"https://api.github.com/users/nicoguaro/followers","following_url":"https://api.github.com/users/nicoguaro/following{/other_user}","gists_url":"https://api.github.com/users/nicoguaro/gists{/gist_id}","starred_url":"https://api.github.com/users/nicoguaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicoguaro/subscriptions","organizations_url":"https://api.github.com/users/nicoguaro/orgs","repos_url":"https://api.github.com/users/nicoguaro/repos","events_url":"https://api.github.com/users/nicoguaro/events{/privacy}","received_events_url":"https://api.github.com/users/nicoguaro/received_events","type":"User","site_admin":false},{"login":"mtezzele","id":8956946,"node_id":"MDQ6VXNlcjg5NTY5NDY=","avatar_url":"https://avatars.githubusercontent.com/u/8956946?v=4","gravatar_id":"","url":"https://api.github.com/users/mtezzele","html_url":"https://github.com/mtezzele","followers_url":"https://api.github.com/users/mtezzele/followers","following_url":"https://api.github.com/users/mtezzele/following{/other_user}","gists_url":"https://api.github.com/users/mtezzele/gists{/gist_id}","starred_url":"https://api.github.com/users/mtezzele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtezzele/subscriptions","organizations_url":"https://api.github.com/users/mtezzele/orgs","repos_url":"https://api.github.com/users/mtezzele/repos","events_url":"https://api.github.com/users/mtezzele/events{/privacy}","received_events_url":"https://api.github.com/users/mtezzele/received_events","type":"User","site_admin":false}],"milestone":null,"comments":28,"created_at":"2016-09-22T14:46:47Z","updated_at":"2021-02-14T16:46:54Z","closed_at":"2016-09-29T19:17:28Z","author_association":"COLLABORATOR","active_lock_reason":null,"body":"**Submitting author:** @paulcon (Paul diff --git a/spec/fixtures/editor-pre-review-comment.json b/spec/fixtures/editor-pre-review-comment.json index f5293a88d..430e31ed5 100644 --- a/spec/fixtures/editor-pre-review-comment.json +++ b/spec/fixtures/editor-pre-review-comment.json @@ -46,7 +46,7 @@ "updated_at": "2018-09-30T11:48:30Z", "closed_at": null, "author_association": "COLLABORATOR", - "body": "**Submitting author:** @editor (Robert Gieseke)\r\n**Repository:** https://github.com/editor/fidgit\r\n**Version:** v1.0.1\r\n**Editor:** @editor\r\n**Reviewers:** @Robot\r\n\r\n**Author instructions**\r\n\r\nThanks for submitting your paper to JOSS @rgieseke. The JOSS editor (shown at the top of this issue) will work with you on this issue to find a reviewer for your submission before creating the main review issue.\r\n\r\n@rgieseke if you have any suggestions for potential reviewers then please mention them here in this thread. In addition, [this list of people](https://github.com/openjournals/joss/blob/master/docs/reviewers.csv) have already agreed to review for JOSS and may be suitable for this submission.\r\n\r\n**Editor instructions**\r\n\r\nThe JOSS submission bot @whedon is here to help you find and assign reviewers and start the main review. To find out what @whedon can do for you type:\r\n\r\n```\r\n@whedon commands\r\n```\r\n\r\n " + "body": "**Submitting author:** @editor (Robert Gieseke)\r\n**Repository:** https://github.com/editor/fidgit\r\n**Version:** v1.0.1\r\n**Editor:** @editor\r\n**Reviewers:** @Robot\r\n\r\n**Author instructions**\r\n\r\nThanks for submitting your paper to JOSS @rgieseke. The JOSS editor (shown at the top of this issue) will work with you on this issue to find a reviewer for your submission before creating the main review issue.\r\n\r\n@rgieseke if you have any suggestions for potential reviewers then please mention them here in this thread. In addition, [this list of people](https://github.com/openjournals/joss/blob/master/docs/reviewers.csv) have already agreed to review for JOSS and may be suitable for this submission.\r\n\r\n**Editor instructions**\r\n\r\nThe JOSS submission bot @editorialbot is here to help you find and assign reviewers and start the main review. To find out what @editorialbot can do for you type:\r\n\r\n```\r\n@editorialbot commands\r\n```\r\n\r\n " }, "comment": { "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/comments/425715160", @@ -55,29 +55,29 @@ "id": 425715160, "node_id": "MDEyOklzc3VlQ29tbWVudDQyNTcxNTE2MA==", "user": { - "login": "whedon", + "login": "editorialbot", "id": 18508068, "node_id": "MDQ6VXNlcjE4NTA4MDY4", "avatar_url": "https://avatars3.githubusercontent.com/u/18508068?v=4", "gravatar_id": "", - "url": "https://api.github.com/users/whedon", - "html_url": "https://github.com/whedon", - "followers_url": "https://api.github.com/users/whedon/followers", - "following_url": "https://api.github.com/users/whedon/following{/other_user}", - "gists_url": "https://api.github.com/users/whedon/gists{/gist_id}", - "starred_url": "https://api.github.com/users/whedon/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/whedon/subscriptions", - "organizations_url": "https://api.github.com/users/whedon/orgs", - "repos_url": "https://api.github.com/users/whedon/repos", - "events_url": "https://api.github.com/users/whedon/events{/privacy}", - "received_events_url": "https://api.github.com/users/whedon/received_events", + "url": "https://api.github.com/users/editorialbot", + "html_url": "https://github.com/editorialbot", + "followers_url": "https://api.github.com/users/editorialbot/followers", + "following_url": "https://api.github.com/users/editorialbot/following{/other_user}", + "gists_url": "https://api.github.com/users/editorialbot/gists{/gist_id}", + "starred_url": "https://api.github.com/users/editorialbot/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/editorialbot/subscriptions", + "organizations_url": "https://api.github.com/users/editorialbot/orgs", + "repos_url": "https://api.github.com/users/editorialbot/repos", + "events_url": "https://api.github.com/users/editorialbot/events{/privacy}", + "received_events_url": "https://api.github.com/users/editorialbot/received_events", "type": "User", "site_admin": false }, "created_at": "2018-09-30T11:48:30Z", "updated_at": "2018-09-30T11:48:30Z", "author_association": "COLLABORATOR", - "body": "FIRST: Hello human, I'm @whedon, a robot that can help you with some common editorial tasks.\n\nFor a list of things I can do to help you, just type:\n\n```\n@whedon commands\n```\n" + "body": "FIRST: Hello human, I'm @editorialbot, a robot that can help you with some common editorial tasks.\n\nFor a list of things I can do to help you, just type:\n\n```\n@editorialbot commands\n```\n" }, "repository": { "id": 59520368, @@ -192,17 +192,17 @@ "node_id": "MDQ6VXNlcjE4NTA4MDY4", "avatar_url": "https://avatars3.githubusercontent.com/u/18508068?v=4", "gravatar_id": "", - "url": "https://api.github.com/users/whedon", - "html_url": "https://github.com/whedon", - "followers_url": "https://api.github.com/users/whedon/followers", - "following_url": "https://api.github.com/users/whedon/following{/other_user}", - "gists_url": "https://api.github.com/users/whedon/gists{/gist_id}", - "starred_url": "https://api.github.com/users/whedon/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/whedon/subscriptions", - "organizations_url": "https://api.github.com/users/whedon/orgs", - "repos_url": "https://api.github.com/users/whedon/repos", - "events_url": "https://api.github.com/users/whedon/events{/privacy}", - "received_events_url": "https://api.github.com/users/whedon/received_events", + "url": "https://api.github.com/users/editorialbot", + "html_url": "https://github.com/editorialbot", + "followers_url": "https://api.github.com/users/editorialbot/followers", + "following_url": "https://api.github.com/users/editorialbot/following{/other_user}", + "gists_url": "https://api.github.com/users/editorialbot/gists{/gist_id}", + "starred_url": "https://api.github.com/users/editorialbot/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/editorialbot/subscriptions", + "organizations_url": "https://api.github.com/users/editorialbot/orgs", + "repos_url": "https://api.github.com/users/editorialbot/repos", + "events_url": "https://api.github.com/users/editorialbot/events{/privacy}", + "received_events_url": "https://api.github.com/users/editorialbot/received_events", "type": "User", "site_admin": false } diff --git a/spec/fixtures/editor-review-comment.json b/spec/fixtures/editor-review-comment.json index 3fe74d2af..6cfe00f2f 100644 --- a/spec/fixtures/editor-review-comment.json +++ b/spec/fixtures/editor-review-comment.json @@ -46,7 +46,7 @@ "updated_at": "2018-09-30T11:48:30Z", "closed_at": null, "author_association": "COLLABORATOR", - "body": "**Submitting author:** @editor (Robert Gieseke)\r\n**Repository:** https://github.com/editor/fidgit\r\n**Version:** v1.0.1\r\n**Editor:** @editor\r\n**Reviewers:** @Robot\r\n\r\n**Author instructions**\r\n\r\nThanks for submitting your paper to JOSS @rgieseke. The JOSS editor (shown at the top of this issue) will work with you on this issue to find a reviewer for your submission before creating the main review issue.\r\n\r\n@rgieseke if you have any suggestions for potential reviewers then please mention them here in this thread. In addition, [this list of people](https://github.com/openjournals/joss/blob/master/docs/reviewers.csv) have already agreed to review for JOSS and may be suitable for this submission.\r\n\r\n**Editor instructions**\r\n\r\nThe JOSS submission bot @whedon is here to help you find and assign reviewers and start the main review. To find out what @whedon can do for you type:\r\n\r\n```\r\n@whedon commands\r\n```\r\n\r\n " + "body": "**Submitting author:** @editor (Robert Gieseke)\r\n**Repository:** https://github.com/editor/fidgit\r\n**Version:** v1.0.1\r\n**Editor:** @editor\r\n**Reviewers:** @Robot\r\n\r\n**Author instructions**\r\n\r\nThanks for submitting your paper to JOSS @rgieseke. The JOSS editor (shown at the top of this issue) will work with you on this issue to find a reviewer for your submission before creating the main review issue.\r\n\r\n@rgieseke if you have any suggestions for potential reviewers then please mention them here in this thread. In addition, [this list of people](https://github.com/openjournals/joss/blob/master/docs/reviewers.csv) have already agreed to review for JOSS and may be suitable for this submission.\r\n\r\n**Editor instructions**\r\n\r\nThe JOSS submission bot @editorialbot is here to help you find and assign reviewers and start the main review. To find out what @editorialbot can do for you type:\r\n\r\n```\r\n@editorialbot commands\r\n```\r\n\r\n " }, "comment": { "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/comments/425715160", @@ -55,29 +55,29 @@ "id": 425715160, "node_id": "MDEyOklzc3VlQ29tbWVudDQyNTcxNTE2MA==", "user": { - "login": "whedon", + "login": "editorialbot", "id": 18508068, "node_id": "MDQ6VXNlcjE4NTA4MDY4", "avatar_url": "https://avatars3.githubusercontent.com/u/18508068?v=4", "gravatar_id": "", - "url": "https://api.github.com/users/whedon", - "html_url": "https://github.com/whedon", - "followers_url": "https://api.github.com/users/whedon/followers", - "following_url": "https://api.github.com/users/whedon/following{/other_user}", - "gists_url": "https://api.github.com/users/whedon/gists{/gist_id}", - "starred_url": "https://api.github.com/users/whedon/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/whedon/subscriptions", - "organizations_url": "https://api.github.com/users/whedon/orgs", - "repos_url": "https://api.github.com/users/whedon/repos", - "events_url": "https://api.github.com/users/whedon/events{/privacy}", - "received_events_url": "https://api.github.com/users/whedon/received_events", + "url": "https://api.github.com/users/editorialbot", + "html_url": "https://github.com/editorialbot", + "followers_url": "https://api.github.com/users/editorialbot/followers", + "following_url": "https://api.github.com/users/editorialbot/following{/other_user}", + "gists_url": "https://api.github.com/users/editorialbot/gists{/gist_id}", + "starred_url": "https://api.github.com/users/editorialbot/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/editorialbot/subscriptions", + "organizations_url": "https://api.github.com/users/editorialbot/orgs", + "repos_url": "https://api.github.com/users/editorialbot/repos", + "events_url": "https://api.github.com/users/editorialbot/events{/privacy}", + "received_events_url": "https://api.github.com/users/editorialbot/received_events", "type": "User", "site_admin": false }, "created_at": "2018-09-30T11:48:30Z", "updated_at": "2018-09-30T11:48:30Z", "author_association": "COLLABORATOR", - "body": "FIRST: Hello human, I'm @whedon, a robot that can help you with some common editorial tasks.\n\nFor a list of things I can do to help you, just type:\n\n```\n@whedon commands\n```\n" + "body": "FIRST: Hello human, I'm @editorialbot, a robot that can help you with some common editorial tasks.\n\nFor a list of things I can do to help you, just type:\n\n```\n@editorialbot commands\n```\n" }, "repository": { "id": 59520368, @@ -192,17 +192,17 @@ "node_id": "MDQ6VXNlcjE4NTA4MDY4", "avatar_url": "https://avatars3.githubusercontent.com/u/18508068?v=4", "gravatar_id": "", - "url": "https://api.github.com/users/whedon", - "html_url": "https://github.com/whedon", - "followers_url": "https://api.github.com/users/whedon/followers", - "following_url": "https://api.github.com/users/whedon/following{/other_user}", - "gists_url": "https://api.github.com/users/whedon/gists{/gist_id}", - "starred_url": "https://api.github.com/users/whedon/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/whedon/subscriptions", - "organizations_url": "https://api.github.com/users/whedon/orgs", - "repos_url": "https://api.github.com/users/whedon/repos", - "events_url": "https://api.github.com/users/whedon/events{/privacy}", - "received_events_url": "https://api.github.com/users/whedon/received_events", + "url": "https://api.github.com/users/editorialbot", + "html_url": "https://github.com/editorialbot", + "followers_url": "https://api.github.com/users/editorialbot/followers", + "following_url": "https://api.github.com/users/editorialbot/following{/other_user}", + "gists_url": "https://api.github.com/users/editorialbot/gists{/gist_id}", + "starred_url": "https://api.github.com/users/editorialbot/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/editorialbot/subscriptions", + "organizations_url": "https://api.github.com/users/editorialbot/orgs", + "repos_url": "https://api.github.com/users/editorialbot/repos", + "events_url": "https://api.github.com/users/editorialbot/events{/privacy}", + "received_events_url": "https://api.github.com/users/editorialbot/received_events", "type": "User", "site_admin": false } diff --git a/spec/fixtures/whedon-pre-review-comment-random-review.json b/spec/fixtures/editorialbot-pre-review-comment-random-review.json similarity index 83% rename from spec/fixtures/whedon-pre-review-comment-random-review.json rename to spec/fixtures/editorialbot-pre-review-comment-random-review.json index f25afeefc..50145be6d 100644 --- a/spec/fixtures/whedon-pre-review-comment-random-review.json +++ b/spec/fixtures/editorialbot-pre-review-comment-random-review.json @@ -46,7 +46,7 @@ "updated_at": "2018-09-30T11:48:30Z", "closed_at": null, "author_association": "COLLABORATOR", - "body": "**Submitting author:** @arfon (Robert Gieseke)\r\n**Repository:** https://github.com/arfon/fidgit\r\n**Version:** v1.0.1\r\n**Editor:** @arfon\r\n**Reviewers:** @Robot\r\n\r\n**Author instructions**\r\n\r\nThanks for submitting your paper to JOSS @rgieseke. The JOSS editor (shown at the top of this issue) will work with you on this issue to find a reviewer for your submission before creating the main review issue.\r\n\r\n@rgieseke if you have any suggestions for potential reviewers then please mention them here in this thread. In addition, [this list of people](https://github.com/openjournals/joss/blob/master/docs/reviewers.csv) have already agreed to review for JOSS and may be suitable for this submission.\r\n\r\n**Editor instructions**\r\n\r\nThe JOSS submission bot @whedon is here to help you find and assign reviewers and start the main review. To find out what @whedon can do for you type:\r\n\r\n```\r\n@whedon commands\r\n```\r\n\r\n " + "body": "**Submitting author:** @arfon (Robert Gieseke)\r\n**Repository:** https://github.com/arfon/fidgit\r\n**Version:** v1.0.1\r\n**Editor:** @arfon\r\n**Reviewers:** @Robot\r\n\r\n**Author instructions**\r\n\r\nThanks for submitting your paper to JOSS @rgieseke. The JOSS editor (shown at the top of this issue) will work with you on this issue to find a reviewer for your submission before creating the main review issue.\r\n\r\n@rgieseke if you have any suggestions for potential reviewers then please mention them here in this thread. In addition, [this list of people](https://github.com/openjournals/joss/blob/master/docs/reviewers.csv) have already agreed to review for JOSS and may be suitable for this submission.\r\n\r\n**Editor instructions**\r\n\r\nThe JOSS submission bot @editorialbot is here to help you find and assign reviewers and start the main review. To find out what @editorialbot can do for you type:\r\n\r\n```\r\n@editorialbot commands\r\n```\r\n\r\n " }, "comment": { "url": "https://api.github.com/repos/openjournals/foobar-reviews-testing/issues/comments/425715160", @@ -55,29 +55,29 @@ "id": 425715160, "node_id": "MDEyOklzc3VlQ29tbWVudDQyNTcxNTE2MA==", "user": { - "login": "whedon", + "login": "editorialbot", "id": 18508068, "node_id": "MDQ6VXNlcjE4NTA4MDY4", "avatar_url": "https://avatars3.githubusercontent.com/u/18508068?v=4", "gravatar_id": "", - "url": "https://api.github.com/users/whedon", - "html_url": "https://github.com/whedon", - "followers_url": "https://api.github.com/users/whedon/followers", - "following_url": "https://api.github.com/users/whedon/following{/other_user}", - "gists_url": "https://api.github.com/users/whedon/gists{/gist_id}", - "starred_url": "https://api.github.com/users/whedon/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/whedon/subscriptions", - "organizations_url": "https://api.github.com/users/whedon/orgs", - "repos_url": "https://api.github.com/users/whedon/repos", - "events_url": "https://api.github.com/users/whedon/events{/privacy}", - "received_events_url": "https://api.github.com/users/whedon/received_events", + "url": "https://api.github.com/users/editorialbot", + "html_url": "https://github.com/editorialbot", + "followers_url": "https://api.github.com/users/editorialbot/followers", + "following_url": "https://api.github.com/users/editorialbot/following{/other_user}", + "gists_url": "https://api.github.com/users/editorialbot/gists{/gist_id}", + "starred_url": "https://api.github.com/users/editorialbot/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/editorialbot/subscriptions", + "organizations_url": "https://api.github.com/users/editorialbot/orgs", + "repos_url": "https://api.github.com/users/editorialbot/repos", + "events_url": "https://api.github.com/users/editorialbot/events{/privacy}", + "received_events_url": "https://api.github.com/users/editorialbot/received_events", "type": "User", "site_admin": false }, "created_at": "2018-09-30T11:48:30Z", "updated_at": "2018-09-30T11:48:30Z", "author_association": "COLLABORATOR", - "body": "FIRST: Hello human, I'm @whedon, a robot that can help you with some common editorial tasks.\n\nFor a list of things I can do to help you, just type:\n\n```\n@whedon commands\n```\n" + "body": "FIRST: Hello human, I'm @editorialbot, a robot that can help you with some common editorial tasks.\n\nFor a list of things I can do to help you, just type:\n\n```\n@editorialbot commands\n```\n" }, "repository": { "id": 59520368, @@ -187,22 +187,22 @@ "description": "" }, "sender": { - "login": "whedon", + "login": "editorialbot", "id": 18508068, "node_id": "MDQ6VXNlcjE4NTA4MDY4", "avatar_url": "https://avatars3.githubusercontent.com/u/18508068?v=4", "gravatar_id": "", - "url": "https://api.github.com/users/whedon", - "html_url": "https://github.com/whedon", - "followers_url": "https://api.github.com/users/whedon/followers", - "following_url": "https://api.github.com/users/whedon/following{/other_user}", - "gists_url": "https://api.github.com/users/whedon/gists{/gist_id}", - "starred_url": "https://api.github.com/users/whedon/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/whedon/subscriptions", - "organizations_url": "https://api.github.com/users/whedon/orgs", - "repos_url": "https://api.github.com/users/whedon/repos", - "events_url": "https://api.github.com/users/whedon/events{/privacy}", - "received_events_url": "https://api.github.com/users/whedon/received_events", + "url": "https://api.github.com/users/editorialbot", + "html_url": "https://github.com/editorialbot", + "followers_url": "https://api.github.com/users/editorialbot/followers", + "following_url": "https://api.github.com/users/editorialbot/following{/other_user}", + "gists_url": "https://api.github.com/users/editorialbot/gists{/gist_id}", + "starred_url": "https://api.github.com/users/editorialbot/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/editorialbot/subscriptions", + "organizations_url": "https://api.github.com/users/editorialbot/orgs", + "repos_url": "https://api.github.com/users/editorialbot/repos", + "events_url": "https://api.github.com/users/editorialbot/events{/privacy}", + "received_events_url": "https://api.github.com/users/editorialbot/received_events", "type": "User", "site_admin": false } diff --git a/spec/fixtures/whedon-pre-review-comment.json b/spec/fixtures/editorialbot-pre-review-comment.json similarity index 83% rename from spec/fixtures/whedon-pre-review-comment.json rename to spec/fixtures/editorialbot-pre-review-comment.json index e4d7df9fb..2cd77eb55 100644 --- a/spec/fixtures/whedon-pre-review-comment.json +++ b/spec/fixtures/editorialbot-pre-review-comment.json @@ -46,7 +46,7 @@ "updated_at": "2018-09-30T11:48:40Z", "closed_at": null, "author_association": "COLLABORATOR", - "body": "**Submitting author:** @arfon (Robert Gieseke)\r\n**Repository:** https://github.com/arfon/fidgit\r\n**Version:** v1.0.1\r\n**Editor:** @arfon\r\n**Reviewers:** @Robot\r\n\r\n**Author instructions**\r\n\r\nThanks for submitting your paper to JOSS @rgieseke. The JOSS editor (shown at the top of this issue) will work with you on this issue to find a reviewer for your submission before creating the main review issue.\r\n\r\n@rgieseke if you have any suggestions for potential reviewers then please mention them here in this thread. In addition, [this list of people](https://github.com/openjournals/joss/blob/master/docs/reviewers.csv) have already agreed to review for JOSS and may be suitable for this submission.\r\n\r\n**Editor instructions**\r\n\r\nThe JOSS submission bot @whedon is here to help you find and assign reviewers and start the main review. To find out what @whedon can do for you type:\r\n\r\n```\r\n@whedon commands\r\n```\r\n\r\n " + "body": "**Submitting author:** @arfon (Robert Gieseke)\r\n**Repository:** https://github.com/arfon/fidgit\r\n**Version:** v1.0.1\r\n**Editor:** @arfon\r\n**Reviewers:** @Robot\r\n\r\n**Author instructions**\r\n\r\nThanks for submitting your paper to JOSS @rgieseke. The JOSS editor (shown at the top of this issue) will work with you on this issue to find a reviewer for your submission before creating the main review issue.\r\n\r\n@rgieseke if you have any suggestions for potential reviewers then please mention them here in this thread. In addition, [this list of people](https://github.com/openjournals/joss/blob/master/docs/reviewers.csv) have already agreed to review for JOSS and may be suitable for this submission.\r\n\r\n**Editor instructions**\r\n\r\nThe JOSS submission bot @editorialbot is here to help you find and assign reviewers and start the main review. To find out what @editorialbot can do for you type:\r\n\r\n```\r\n@editorialbot commands\r\n```\r\n\r\n " }, "comment": { "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/comments/425715160", @@ -55,29 +55,29 @@ "id": 425715160, "node_id": "MDEyOklzc3VlQ29tbWVudDQyNTcxNTE2MA==", "user": { - "login": "whedon", + "login": "editorialbot", "id": 18508068, "node_id": "MDQ6VXNlcjE4NTA4MDY4", "avatar_url": "https://avatars3.githubusercontent.com/u/18508068?v=4", "gravatar_id": "", - "url": "https://api.github.com/users/whedon", - "html_url": "https://github.com/whedon", - "followers_url": "https://api.github.com/users/whedon/followers", - "following_url": "https://api.github.com/users/whedon/following{/other_user}", - "gists_url": "https://api.github.com/users/whedon/gists{/gist_id}", - "starred_url": "https://api.github.com/users/whedon/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/whedon/subscriptions", - "organizations_url": "https://api.github.com/users/whedon/orgs", - "repos_url": "https://api.github.com/users/whedon/repos", - "events_url": "https://api.github.com/users/whedon/events{/privacy}", - "received_events_url": "https://api.github.com/users/whedon/received_events", + "url": "https://api.github.com/users/editorialbot", + "html_url": "https://github.com/editorialbot", + "followers_url": "https://api.github.com/users/editorialbot/followers", + "following_url": "https://api.github.com/users/editorialbot/following{/other_user}", + "gists_url": "https://api.github.com/users/editorialbot/gists{/gist_id}", + "starred_url": "https://api.github.com/users/editorialbot/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/editorialbot/subscriptions", + "organizations_url": "https://api.github.com/users/editorialbot/orgs", + "repos_url": "https://api.github.com/users/editorialbot/repos", + "events_url": "https://api.github.com/users/editorialbot/events{/privacy}", + "received_events_url": "https://api.github.com/users/editorialbot/received_events", "type": "User", "site_admin": false }, "created_at": "2018-09-30T11:48:40Z", "updated_at": "2018-09-30T11:48:40Z", "author_association": "COLLABORATOR", - "body": "FIRST: Hello human, I'm @whedon, a robot that can help you with some common editorial tasks.\n\nFor a list of things I can do to help you, just type:\n\n```\n@whedon commands\n```\n" + "body": "FIRST: Hello human, I'm @editorialbot, a robot that can help you with some common editorial tasks.\n\nFor a list of things I can do to help you, just type:\n\n```\n@editorialbot commands\n```\n" }, "repository": { "id": 59520368, @@ -187,22 +187,22 @@ "description": "" }, "sender": { - "login": "whedon", + "login": "editorialbot", "id": 18508068, "node_id": "MDQ6VXNlcjE4NTA4MDY4", "avatar_url": "https://avatars3.githubusercontent.com/u/18508068?v=4", "gravatar_id": "", - "url": "https://api.github.com/users/whedon", - "html_url": "https://github.com/whedon", - "followers_url": "https://api.github.com/users/whedon/followers", - "following_url": "https://api.github.com/users/whedon/following{/other_user}", - "gists_url": "https://api.github.com/users/whedon/gists{/gist_id}", - "starred_url": "https://api.github.com/users/whedon/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/whedon/subscriptions", - "organizations_url": "https://api.github.com/users/whedon/orgs", - "repos_url": "https://api.github.com/users/whedon/repos", - "events_url": "https://api.github.com/users/whedon/events{/privacy}", - "received_events_url": "https://api.github.com/users/whedon/received_events", + "url": "https://api.github.com/users/editorialbot", + "html_url": "https://github.com/editorialbot", + "followers_url": "https://api.github.com/users/editorialbot/followers", + "following_url": "https://api.github.com/users/editorialbot/following{/other_user}", + "gists_url": "https://api.github.com/users/editorialbot/gists{/gist_id}", + "starred_url": "https://api.github.com/users/editorialbot/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/editorialbot/subscriptions", + "organizations_url": "https://api.github.com/users/editorialbot/orgs", + "repos_url": "https://api.github.com/users/editorialbot/repos", + "events_url": "https://api.github.com/users/editorialbot/events{/privacy}", + "received_events_url": "https://api.github.com/users/editorialbot/received_events", "type": "User", "site_admin": false } diff --git a/spec/fixtures/whedon-pre-review-opened.json b/spec/fixtures/editorialbot-pre-review-opened.json similarity index 98% rename from spec/fixtures/whedon-pre-review-opened.json rename to spec/fixtures/editorialbot-pre-review-opened.json index 85a21d4a6..415b923b0 100644 --- a/spec/fixtures/whedon-pre-review-opened.json +++ b/spec/fixtures/editorialbot-pre-review-opened.json @@ -46,7 +46,7 @@ "updated_at": "2018-09-30T11:48:26Z", "closed_at": null, "author_association": "COLLABORATOR", - "body": "**Submitting author:** @arfon (Robert Gieseke)\r\n**Repository:** https://github.com/arfon/fidgit\r\n**Version:** v1.0.1\r\n**Editor:** @arfon\r\n**Reviewers:** @Robot\r\n\r\n**Author instructions**\r\n\r\nThanks for submitting your paper to JOSS @rgieseke. The JOSS editor (shown at the top of this issue) will work with you on this issue to find a reviewer for your submission before creating the main review issue.\r\n\r\n@rgieseke if you have any suggestions for potential reviewers then please mention them here in this thread. In addition, [this list of people](https://github.com/openjournals/joss/blob/master/docs/reviewers.csv) have already agreed to review for JOSS and may be suitable for this submission.\r\n\r\n**Editor instructions**\r\n\r\nThe JOSS submission bot @whedon is here to help you find and assign reviewers and start the main review. To find out what @whedon can do for you type:\r\n\r\n```\r\n@whedon commands\r\n```\r\n\r\n " + "body": "**Submitting author:** @arfon (Robert Gieseke)\r\n**Repository:** https://github.com/arfon/fidgit\r\n**Version:** v1.0.1\r\n**Editor:** @arfon\r\n**Reviewers:** @Robot\r\n\r\n**Author instructions**\r\n\r\nThanks for submitting your paper to JOSS @rgieseke. The JOSS editor (shown at the top of this issue) will work with you on this issue to find a reviewer for your submission before creating the main review issue.\r\n\r\n@rgieseke if you have any suggestions for potential reviewers then please mention them here in this thread. In addition, [this list of people](https://github.com/openjournals/joss/blob/master/docs/reviewers.csv) have already agreed to review for JOSS and may be suitable for this submission.\r\n\r\n**Editor instructions**\r\n\r\nThe JOSS submission bot @editorialbot is here to help you find and assign reviewers and start the main review. To find out what @editorialbot can do for you type:\r\n\r\n```\r\n@editorialbot commands\r\n```\r\n\r\n " }, "repository": { "id": 59520368, diff --git a/spec/fixtures/whedon-review-comment.json b/spec/fixtures/editorialbot-review-comment.json similarity index 83% rename from spec/fixtures/whedon-review-comment.json rename to spec/fixtures/editorialbot-review-comment.json index 170e50563..af59d392e 100644 --- a/spec/fixtures/whedon-review-comment.json +++ b/spec/fixtures/editorialbot-review-comment.json @@ -46,7 +46,7 @@ "updated_at": "2018-09-30T11:48:30Z", "closed_at": null, "author_association": "COLLABORATOR", - "body": "**Submitting author:** @arfon (Robert Gieseke)\r\n**Repository:** https://github.com/arfon/fidgit\r\n**Version:** v1.0.1\r\n**Editor:** @arfon\r\n**Reviewers:** @Robot\r\n\r\n**Author instructions**\r\n\r\nThanks for submitting your paper to JOSS @rgieseke. The JOSS editor (shown at the top of this issue) will work with you on this issue to find a reviewer for your submission before creating the main review issue.\r\n\r\n@rgieseke if you have any suggestions for potential reviewers then please mention them here in this thread. In addition, [this list of people](https://github.com/openjournals/joss/blob/master/docs/reviewers.csv) have already agreed to review for JOSS and may be suitable for this submission.\r\n\r\n**Editor instructions**\r\n\r\nThe JOSS submission bot @whedon is here to help you find and assign reviewers and start the main review. To find out what @whedon can do for you type:\r\n\r\n```\r\n@whedon commands\r\n```\r\n\r\n " + "body": "**Submitting author:** @arfon (Robert Gieseke)\r\n**Repository:** https://github.com/arfon/fidgit\r\n**Version:** v1.0.1\r\n**Editor:** @arfon\r\n**Reviewers:** @Robot\r\n\r\n**Author instructions**\r\n\r\nThanks for submitting your paper to JOSS @rgieseke. The JOSS editor (shown at the top of this issue) will work with you on this issue to find a reviewer for your submission before creating the main review issue.\r\n\r\n@rgieseke if you have any suggestions for potential reviewers then please mention them here in this thread. In addition, [this list of people](https://github.com/openjournals/joss/blob/master/docs/reviewers.csv) have already agreed to review for JOSS and may be suitable for this submission.\r\n\r\n**Editor instructions**\r\n\r\nThe JOSS submission bot @editorialbot is here to help you find and assign reviewers and start the main review. To find out what @editorialbot can do for you type:\r\n\r\n```\r\n@editorialbot commands\r\n```\r\n\r\n " }, "comment": { "url": "https://api.github.com/repos/openjournals/joss-reviews-testing/issues/comments/425715160", @@ -55,29 +55,29 @@ "id": 425715160, "node_id": "MDEyOklzc3VlQ29tbWVudDQyNTcxNTE2MA==", "user": { - "login": "whedon", + "login": "editorialbot", "id": 18508068, "node_id": "MDQ6VXNlcjE4NTA4MDY4", "avatar_url": "https://avatars3.githubusercontent.com/u/18508068?v=4", "gravatar_id": "", - "url": "https://api.github.com/users/whedon", - "html_url": "https://github.com/whedon", - "followers_url": "https://api.github.com/users/whedon/followers", - "following_url": "https://api.github.com/users/whedon/following{/other_user}", - "gists_url": "https://api.github.com/users/whedon/gists{/gist_id}", - "starred_url": "https://api.github.com/users/whedon/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/whedon/subscriptions", - "organizations_url": "https://api.github.com/users/whedon/orgs", - "repos_url": "https://api.github.com/users/whedon/repos", - "events_url": "https://api.github.com/users/whedon/events{/privacy}", - "received_events_url": "https://api.github.com/users/whedon/received_events", + "url": "https://api.github.com/users/editorialbot", + "html_url": "https://github.com/editorialbot", + "followers_url": "https://api.github.com/users/editorialbot/followers", + "following_url": "https://api.github.com/users/editorialbot/following{/other_user}", + "gists_url": "https://api.github.com/users/editorialbot/gists{/gist_id}", + "starred_url": "https://api.github.com/users/editorialbot/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/editorialbot/subscriptions", + "organizations_url": "https://api.github.com/users/editorialbot/orgs", + "repos_url": "https://api.github.com/users/editorialbot/repos", + "events_url": "https://api.github.com/users/editorialbot/events{/privacy}", + "received_events_url": "https://api.github.com/users/editorialbot/received_events", "type": "User", "site_admin": false }, "created_at": "2018-09-30T11:48:30Z", "updated_at": "2018-09-30T11:48:30Z", "author_association": "COLLABORATOR", - "body": "FIRST: Hello human, I'm @whedon, a robot that can help you with some common editorial tasks.\n\nFor a list of things I can do to help you, just type:\n\n```\n@whedon commands\n```\n" + "body": "FIRST: Hello human, I'm @editorialbot, a robot that can help you with some common editorial tasks.\n\nFor a list of things I can do to help you, just type:\n\n```\n@editorialbot commands\n```\n" }, "repository": { "id": 59520368, @@ -187,22 +187,22 @@ "description": "" }, "sender": { - "login": "whedon", + "login": "editorialbot", "id": 18508068, "node_id": "MDQ6VXNlcjE4NTA4MDY4", "avatar_url": "https://avatars3.githubusercontent.com/u/18508068?v=4", "gravatar_id": "", - "url": "https://api.github.com/users/whedon", - "html_url": "https://github.com/whedon", - "followers_url": "https://api.github.com/users/whedon/followers", - "following_url": "https://api.github.com/users/whedon/following{/other_user}", - "gists_url": "https://api.github.com/users/whedon/gists{/gist_id}", - "starred_url": "https://api.github.com/users/whedon/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/whedon/subscriptions", - "organizations_url": "https://api.github.com/users/whedon/orgs", - "repos_url": "https://api.github.com/users/whedon/repos", - "events_url": "https://api.github.com/users/whedon/events{/privacy}", - "received_events_url": "https://api.github.com/users/whedon/received_events", + "url": "https://api.github.com/users/editorialbot", + "html_url": "https://github.com/editorialbot", + "followers_url": "https://api.github.com/users/editorialbot/followers", + "following_url": "https://api.github.com/users/editorialbot/following{/other_user}", + "gists_url": "https://api.github.com/users/editorialbot/gists{/gist_id}", + "starred_url": "https://api.github.com/users/editorialbot/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/editorialbot/subscriptions", + "organizations_url": "https://api.github.com/users/editorialbot/orgs", + "repos_url": "https://api.github.com/users/editorialbot/repos", + "events_url": "https://api.github.com/users/editorialbot/events{/privacy}", + "received_events_url": "https://api.github.com/users/editorialbot/received_events", "type": "User", "site_admin": false } diff --git a/spec/fixtures/whedon-review-edit.json b/spec/fixtures/editorialbot-review-edit.json similarity index 94% rename from spec/fixtures/whedon-review-edit.json rename to spec/fixtures/editorialbot-review-edit.json index aad8cf0f5..ba6331e7e 100644 --- a/spec/fixtures/whedon-review-edit.json +++ b/spec/fixtures/editorialbot-review-edit.json @@ -12,22 +12,22 @@ "number": 79, "title": "[REVIEW]: ipc: An R Package for Inter-process Communication", "user": { - "login": "whedon", + "login": "editorialbot", "id": 18508068, "node_id": "MDQ6VXNlcjE4NTA4MDY4", "avatar_url": "https://avatars3.githubusercontent.com/u/18508068?v=4", "gravatar_id": "", - "url": "https://api.github.com/users/whedon", - "html_url": "https://github.com/whedon", - "followers_url": "https://api.github.com/users/whedon/followers", - "following_url": "https://api.github.com/users/whedon/following{/other_user}", - "gists_url": "https://api.github.com/users/whedon/gists{/gist_id}", - "starred_url": "https://api.github.com/users/whedon/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/whedon/subscriptions", - "organizations_url": "https://api.github.com/users/whedon/orgs", - "repos_url": "https://api.github.com/users/whedon/repos", - "events_url": "https://api.github.com/users/whedon/events{/privacy}", - "received_events_url": "https://api.github.com/users/whedon/received_events", + "url": "https://api.github.com/users/editorialbot", + "html_url": "https://github.com/editorialbot", + "followers_url": "https://api.github.com/users/editorialbot/followers", + "following_url": "https://api.github.com/users/editorialbot/following{/other_user}", + "gists_url": "https://api.github.com/users/editorialbot/gists{/gist_id}", + "starred_url": "https://api.github.com/users/editorialbot/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/editorialbot/subscriptions", + "organizations_url": "https://api.github.com/users/editorialbot/orgs", + "repos_url": "https://api.github.com/users/editorialbot/repos", + "events_url": "https://api.github.com/users/editorialbot/events{/privacy}", + "received_events_url": "https://api.github.com/users/editorialbot/received_events", "type": "User", "site_admin": false }, diff --git a/spec/fixtures/whedon-review-labeled.json b/spec/fixtures/editorialbot-review-labeled.json similarity index 86% rename from spec/fixtures/whedon-review-labeled.json rename to spec/fixtures/editorialbot-review-labeled.json index 4bd165e56..eee0a3637 100644 --- a/spec/fixtures/whedon-review-labeled.json +++ b/spec/fixtures/editorialbot-review-labeled.json @@ -12,22 +12,22 @@ "number": 79, "title": "TEST", "user": { - "login": "whedon", + "login": "editorialbot", "id": 18508068, "node_id": "MDQ6VXNlcjE4NTA4MDY4", "avatar_url": "https://avatars3.githubusercontent.com/u/18508068?v=4", "gravatar_id": "", - "url": "https://api.github.com/users/whedon", - "html_url": "https://github.com/whedon", - "followers_url": "https://api.github.com/users/whedon/followers", - "following_url": "https://api.github.com/users/whedon/following{/other_user}", - "gists_url": "https://api.github.com/users/whedon/gists{/gist_id}", - "starred_url": "https://api.github.com/users/whedon/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/whedon/subscriptions", - "organizations_url": "https://api.github.com/users/whedon/orgs", - "repos_url": "https://api.github.com/users/whedon/repos", - "events_url": "https://api.github.com/users/whedon/events{/privacy}", - "received_events_url": "https://api.github.com/users/whedon/received_events", + "url": "https://api.github.com/users/editorialbot", + "html_url": "https://github.com/editorialbot", + "followers_url": "https://api.github.com/users/editorialbot/followers", + "following_url": "https://api.github.com/users/editorialbot/following{/other_user}", + "gists_url": "https://api.github.com/users/editorialbot/gists{/gist_id}", + "starred_url": "https://api.github.com/users/editorialbot/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/editorialbot/subscriptions", + "organizations_url": "https://api.github.com/users/editorialbot/orgs", + "repos_url": "https://api.github.com/users/editorialbot/repos", + "events_url": "https://api.github.com/users/editorialbot/events{/privacy}", + "received_events_url": "https://api.github.com/users/editorialbot/received_events", "type": "User", "site_admin": false }, @@ -85,22 +85,22 @@ "site_admin": false }, { - "login": "whedon", + "login": "editorialbot", "id": 18508068, "node_id": "MDQ6VXNlcjE4NTA4MDY4", "avatar_url": "https://avatars3.githubusercontent.com/u/18508068?v=4", "gravatar_id": "", - "url": "https://api.github.com/users/whedon", - "html_url": "https://github.com/whedon", - "followers_url": "https://api.github.com/users/whedon/followers", - "following_url": "https://api.github.com/users/whedon/following{/other_user}", - "gists_url": "https://api.github.com/users/whedon/gists{/gist_id}", - "starred_url": "https://api.github.com/users/whedon/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/whedon/subscriptions", - "organizations_url": "https://api.github.com/users/whedon/orgs", - "repos_url": "https://api.github.com/users/whedon/repos", - "events_url": "https://api.github.com/users/whedon/events{/privacy}", - "received_events_url": "https://api.github.com/users/whedon/received_events", + "url": "https://api.github.com/users/editorialbot", + "html_url": "https://github.com/editorialbot", + "followers_url": "https://api.github.com/users/editorialbot/followers", + "following_url": "https://api.github.com/users/editorialbot/following{/other_user}", + "gists_url": "https://api.github.com/users/editorialbot/gists{/gist_id}", + "starred_url": "https://api.github.com/users/editorialbot/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/editorialbot/subscriptions", + "organizations_url": "https://api.github.com/users/editorialbot/orgs", + "repos_url": "https://api.github.com/users/editorialbot/repos", + "events_url": "https://api.github.com/users/editorialbot/events{/privacy}", + "received_events_url": "https://api.github.com/users/editorialbot/received_events", "type": "User", "site_admin": false } diff --git a/spec/fixtures/whedon-review-opened.json b/spec/fixtures/editorialbot-review-opened.json similarity index 98% rename from spec/fixtures/whedon-review-opened.json rename to spec/fixtures/editorialbot-review-opened.json index 063a0b4f3..4768566ac 100644 --- a/spec/fixtures/whedon-review-opened.json +++ b/spec/fixtures/editorialbot-review-opened.json @@ -46,7 +46,7 @@ "updated_at": "2018-09-30T11:48:26Z", "closed_at": null, "author_association": "COLLABORATOR", - "body": "**Submitting author:** @arfon (Robert Gieseke)\r\n**Repository:** https://github.com/arfon/fidgit\r\n**Version:** v1.0.1\r\n**Editor:** @arfon\r\n**Reviewers:** @Robot\r\n\r\n**Author instructions**\r\n\r\nThanks for submitting your paper to JOSS @rgieseke. The JOSS editor (shown at the top of this issue) will work with you on this issue to find a reviewer for your submission before creating the main review issue.\r\n\r\n@rgieseke if you have any suggestions for potential reviewers then please mention them here in this thread. In addition, [this list of people](https://github.com/openjournals/joss/blob/master/docs/reviewers.csv) have already agreed to review for JOSS and may be suitable for this submission.\r\n\r\n**Editor instructions**\r\n\r\nThe JOSS submission bot @whedon is here to help you find and assign reviewers and start the main review. To find out what @whedon can do for you type:\r\n\r\n```\r\n@whedon commands\r\n```\r\n\r\n " + "body": "**Submitting author:** @arfon (Robert Gieseke)\r\n**Repository:** https://github.com/arfon/fidgit\r\n**Version:** v1.0.1\r\n**Editor:** @arfon\r\n**Reviewers:** @Robot\r\n\r\n**Author instructions**\r\n\r\nThanks for submitting your paper to JOSS @rgieseke. The JOSS editor (shown at the top of this issue) will work with you on this issue to find a reviewer for your submission before creating the main review issue.\r\n\r\n@rgieseke if you have any suggestions for potential reviewers then please mention them here in this thread. In addition, [this list of people](https://github.com/openjournals/joss/blob/master/docs/reviewers.csv) have already agreed to review for JOSS and may be suitable for this submission.\r\n\r\n**Editor instructions**\r\n\r\nThe JOSS submission bot @editorialbot is here to help you find and assign reviewers and start the main review. To find out what @editorialbot can do for you type:\r\n\r\n```\r\n@editorialbot commands\r\n```\r\n\r\n " }, "repository": { "id": 59520368, diff --git a/spec/fixtures/review-body-79.json b/spec/fixtures/review-body-79.json index dd386c15e..442b63922 100644 --- a/spec/fixtures/review-body-79.json +++ b/spec/fixtures/review-body-79.json @@ -10,22 +10,22 @@ "number": 79, "title": "[REVIEW]: Python Active-subspaces Utility Library", "user": { - "login": "whedon", + "login": "editorialbot", "id": 18508068, "node_id": "MDQ6VXNlcjE4NTA4MDY4", "avatar_url": "https://avatars.githubusercontent.com/u/18508068?v=4", "gravatar_id": "", - "url": "https://api.github.com/users/whedon", - "html_url": "https://github.com/whedon", - "followers_url": "https://api.github.com/users/whedon/followers", - "following_url": "https://api.github.com/users/whedon/following{/other_user}", - "gists_url": "https://api.github.com/users/whedon/gists{/gist_id}", - "starred_url": "https://api.github.com/users/whedon/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/whedon/subscriptions", - "organizations_url": "https://api.github.com/users/whedon/orgs", - "repos_url": "https://api.github.com/users/whedon/repos", - "events_url": "https://api.github.com/users/whedon/events{/privacy}", - "received_events_url": "https://api.github.com/users/whedon/received_events", + "url": "https://api.github.com/users/editorialbot", + "html_url": "https://github.com/editorialbot", + "followers_url": "https://api.github.com/users/editorialbot/followers", + "following_url": "https://api.github.com/users/editorialbot/following{/other_user}", + "gists_url": "https://api.github.com/users/editorialbot/gists{/gist_id}", + "starred_url": "https://api.github.com/users/editorialbot/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/editorialbot/subscriptions", + "organizations_url": "https://api.github.com/users/editorialbot/orgs", + "repos_url": "https://api.github.com/users/editorialbot/repos", + "events_url": "https://api.github.com/users/editorialbot/events{/privacy}", + "received_events_url": "https://api.github.com/users/editorialbot/received_events", "type": "User", "site_admin": false }, From 59925b5d3f97ca409965a47d909b708d2bec558f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 1 Feb 2022 11:02:37 +0100 Subject: [PATCH 286/609] update command descriptions --- docs/editorial_bot.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/editorial_bot.md b/docs/editorial_bot.md index e3bec2d4b..af41f1733 100644 --- a/docs/editorial_bot.md +++ b/docs/editorial_bot.md @@ -286,10 +286,10 @@ JOSS editors-in-chief can withdraw a submission with the following command: # Accept and publish the paper @editorialbot accept -# Replies to query scope +# Flag submission with questionable scope @editorialbot query scope -# Replies to list reviewers +# Get a link to the complete list of reviewers @editorialbot list reviewers # Open the review issue From e506240b1c68efcd670aef7a908c9228d54eab97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 4 Feb 2022 11:18:24 +0100 Subject: [PATCH 287/609] add archive html comment to the review template --- app/views/shared/review_body.text.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/review_body.text.erb b/app/views/shared/review_body.text.erb index f648a1c3d..e308565d6 100644 --- a/app/views/shared/review_body.text.erb +++ b/app/views/shared/review_body.text.erb @@ -4,7 +4,7 @@ **Version:** <%= paper.software_version %> **Editor:** <%= editor %> **Reviewers:** <%= reviewers.join(', ') %> -**Archive:** Pending +**Archive:** Pending **:warning: JOSS reduced service mode :warning:** From 6c1dd176a24c9e495992f7716467ba99c6f0cfe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 4 Feb 2022 11:29:55 +0100 Subject: [PATCH 288/609] change abbreviation setting --- config/settings-production.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/settings-production.yml b/config/settings-production.yml index 70a4f735d..03c214420 100644 --- a/config/settings-production.yml +++ b/config/settings-production.yml @@ -1,6 +1,6 @@ # Changing this file necessitates a server restart name: "Journal of Open Source Software" -abbreviation: "JOSS" +abbreviation: "JOSS_TESTING" issn: "2475-9066" tagline: "a developer friendly, open access journal for research software packages." logo_url: "http://test.joss.theoj.org/logo_large.jpg" From feaca5b04b6e4a5202e817540a46089b689e1345 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 4 Feb 2022 11:30:24 +0100 Subject: [PATCH 289/609] generalize routes --- config/routes.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index ad9693795..73e9e8807 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -49,9 +49,12 @@ get '/papers/volume/:volume', to: "papers#filter", as: 'papers_by_volume' get '/papers/year/:year', to: "papers#filter", as: 'papers_by_year' get '/papers/:id/status.svg', to: "papers#status", format: "svg", as: 'status_badge' - get '/papers/:doi/status.svg', to: "papers#status", format: "svg", constraints: { doi: /10.21105\/joss\.\d{5}/} - get '/papers/:doi', to: "papers#show", constraints: { doi: /10.21105\/joss\.\d{5}/} - get '/papers/:doi.:format', to: "papers#show", constraints: { doi: /10.21105\/joss\.\d{5}/} + + doi_prefix_name = Rails.application.settings[:abbreviation].downcase || "joss" + + get '/papers/:doi/status.svg', to: "papers#status", format: "svg", constraints: { doi: /10.21105\/#{doi_prefix_name}\.\d{5}/} + get '/papers/:doi', to: "papers#show", constraints: { doi: /10.21105\/#{doi_prefix_name}\.\d{5}/} + get '/papers/:doi.:format', to: "papers#show", constraints: { doi: /10.21105\/#{doi_prefix_name}\.\d{5}/} get '/editor_profile', to: 'editors#profile', as: 'editor_profile' patch '/update_editor_profile', to: 'editors#update_profile', as: 'update_editor_profile' From a1d4699ba5d9f32c51f4e872abce6c635af160a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 4 Feb 2022 12:58:31 +0100 Subject: [PATCH 290/609] change test abbreviation setting --- config/settings-production.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/settings-production.yml b/config/settings-production.yml index 03c214420..23f7c7eed 100644 --- a/config/settings-production.yml +++ b/config/settings-production.yml @@ -1,6 +1,6 @@ # Changing this file necessitates a server restart name: "Journal of Open Source Software" -abbreviation: "JOSS_TESTING" +abbreviation: "TEST_JOURNAL" issn: "2475-9066" tagline: "a developer friendly, open access journal for research software packages." logo_url: "http://test.joss.theoj.org/logo_large.jpg" From 67156fcb7fd8093676891a95eed9d791baf8c6dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 7 Feb 2022 13:36:21 +0100 Subject: [PATCH 291/609] add checklists section to the review issue --- app/views/shared/review_body.text.erb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/views/shared/review_body.text.erb b/app/views/shared/review_body.text.erb index e308565d6..5a559b189 100644 --- a/app/views/shared/review_body.text.erb +++ b/app/views/shared/review_body.text.erb @@ -37,3 +37,13 @@ First of all you need to run this command in a separate comment to create the ch The reviewer guidelines are available here: https://joss.readthedocs.io/en/latest/reviewer_guidelines.html. Any questions/concerns please let <%= editor %> know. ✨ **Please start on your review when you are able, and be sure to complete your review in the next six weeks, at the very latest** ✨ + + +** Checklists + + +<% reviewers.each do |rev| %> + <%= rev %>, please create your checklist typing: `@<%= Rails.application.settings["bot_username"] || "botname" %> generate my checklist` + +<% end %> + From 9755a8a59b39253fdf7ba8294b18afb957bc7a77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 7 Feb 2022 13:43:24 +0100 Subject: [PATCH 292/609] fix markdown --- app/views/shared/review_body.text.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/review_body.text.erb b/app/views/shared/review_body.text.erb index 5a559b189..dbca2ca77 100644 --- a/app/views/shared/review_body.text.erb +++ b/app/views/shared/review_body.text.erb @@ -39,7 +39,7 @@ The reviewer guidelines are available here: https://joss.readthedocs.io/en/lates ✨ **Please start on your review when you are able, and be sure to complete your review in the next six weeks, at the very latest** ✨ -** Checklists +## Checklists <% reviewers.each do |rev| %> From 6611dce209c25f73c184171dce6ec63da6585334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 16 Feb 2022 11:49:40 +0100 Subject: [PATCH 293/609] add single issue migration rake task --- lib/tasks/migration.rake | 118 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 lib/tasks/migration.rake diff --git a/lib/tasks/migration.rake b/lib/tasks/migration.rake new file mode 100644 index 000000000..fec757610 --- /dev/null +++ b/lib/tasks/migration.rake @@ -0,0 +1,118 @@ +def gh + @gh ||= Octokit::Client.new(access_token: ENV["GH_TOKEN"]) +end + +def reviews_repo + @reviews_repo ||= Rails.application.settings["reviews"] +end + +def get_open_issues + gh.list_issues(reviews_repo , state: 'open', per_page: 300) +end + +def get_issue(issue_id) + gh.issue(reviews_repo, issue_id) +end + +def update_issue(issue_id, options) + gh.update_issue(reviews_repo, issue_id, options) +end + +def get_editor(text) + m = text.match(/\*\*Editor:\*\*\s*(@\S*|Pending)/i) + m.nil? ? "" : m[1] +end + +def get_reviewers(text) + m = text.match(/Reviewers?:\*\*\s*(.+?)\r?\n/) + m.nil? ? "" : m[1] +end + +def get_version(text) + m = text.match(/Version:\*\*\s*(\S*)\r?\n/) + m.nil? ? "" : m[1] +end + +def get_archive(text) + m = text.match(/Archive:\*\*\s*(\S*)\r?\n/) + m.nil? ? "" : m[1] +end + +def get_repository_url(text) + m = text.match(/Repository:\*\*.*>(\S*)<\/a>\r?\n/) + m.nil? ? "" : m[1] +end + +def get_submitting_author(text) + m = text.match(/Submitting author:\*\*\s*(@\S*) (.*)\r?\n/) + m.nil? ? [""] : [m[1], m[2]] +end + +def get_header(body) + body.match(/(.*)\*\*:warning: JOSS reduced service mode :warning:\*\*/m)[1] +end + +def build_new_header(header) + author_info = get_submitting_author(header) + + author_username = author_info[0] + author_link = author_info[1] + repository_url = get_repository_url(header) + version = get_version(header) + editor = get_editor(header) + reviewers = get_reviewers(header) + archive = get_archive(header) + + puts " Submitting Author: #{author_username} - Extra info: #{author_link}" + puts " Repository URL: #{repository_url}" + puts " Version: #{version}" + puts " Editor: #{editor}" + puts " Reviewers: #{reviewers}" + puts " Archive: #{archive}" + + new_header = <<-NEWHEADER +**Submitting author:** #{author_username} #{author_link} +**Repository:** #{repository_url} +**Branch with paper.md** (empty if default branch): +**Version:** #{version} +**Editor:** #{editor} +**Reviewers:** #{reviewers} +**Archive:** #{archive} + NEWHEADER + + new_header +end + +namespace :migration do + desc "Migrate a single issue to use the new bot system" + task :issue, [:issue_id] => :environment do |t, args| + if args.issue_id.blank? + puts "Missing issue id" + puts "Use: rake migration:issue[issue-id]" + else + issue_id = args.issue_id + issue = get_issue(issue_id) + + puts "!! Issue ##{issue_id} found: #{issue.title}" + issue_body = issue.body + header = get_header(issue_body) + + if header.start_with?("**Submitting author:** ") + puts " Issue already migrated! - Nothing done" + elsif header.start_with?("**Submitting author:** @") + puts " Migrating info:" + + new_header = build_new_header(header) + + new_issue_body = issue_body.sub(header, "#{new_header}\n\n \n\n") + update_issue(issue_id, body: new_issue_body) + + puts " Done!" + else + puts " !! Error: unexpected issue header format - Nothing done" + end + end + rescue Octokit::NotFound + puts "No issue found with id #{args.issue_id} in #{reviews_repo}" + end +end From 59357ae4a65fbb3471d3465faff6bcf6596e0cc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 16 Feb 2022 12:14:25 +0100 Subject: [PATCH 294/609] update issue migration task: PRE-REVIEW and REVIEW --- lib/tasks/migration.rake | 46 +++++++++++++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 8 deletions(-) diff --git a/lib/tasks/migration.rake b/lib/tasks/migration.rake index fec757610..235e87544 100644 --- a/lib/tasks/migration.rake +++ b/lib/tasks/migration.rake @@ -48,11 +48,16 @@ def get_submitting_author(text) m.nil? ? [""] : [m[1], m[2]] end +def get_managing_eic(text) + m = text.match(/Managing EiC:\*\*\s*(.*)\r?\n/) + m.nil? ? "" : m[1] +end + def get_header(body) body.match(/(.*)\*\*:warning: JOSS reduced service mode :warning:\*\*/m)[1] end -def build_new_header(header) +def build_new_header(header, issue_type) author_info = get_submitting_author(header) author_username = author_info[0] @@ -62,15 +67,28 @@ def build_new_header(header) editor = get_editor(header) reviewers = get_reviewers(header) archive = get_archive(header) + eic = get_managing_eic(header) puts " Submitting Author: #{author_username} - Extra info: #{author_link}" puts " Repository URL: #{repository_url}" puts " Version: #{version}" puts " Editor: #{editor}" puts " Reviewers: #{reviewers}" - puts " Archive: #{archive}" + puts " Archive: #{archive}" if issue_type == "review" + puts " Managing EiC: #{eic}" if issue_type == "pre-review" - new_header = <<-NEWHEADER + if issue_type == "pre-review" + new_header = <<-NEWHEADERMETA +**Submitting author:** #{author_username} #{author_link} +**Repository:** #{repository_url} +**Branch with paper.md** (empty if default branch): +**Version:** #{version} +**Editor:** #{editor} +**Reviewers:** #{reviewers} +**Managing EiC:** #{eic} + NEWHEADERMETA + elsif issue_type == "review" + new_header = <<-NEWHEADER **Submitting author:** #{author_username} #{author_link} **Repository:** #{repository_url} **Branch with paper.md** (empty if default branch): @@ -78,7 +96,10 @@ def build_new_header(header) **Editor:** #{editor} **Reviewers:** #{reviewers} **Archive:** #{archive} - NEWHEADER + NEWHEADER + else + new_header = nil + end new_header end @@ -93,16 +114,25 @@ namespace :migration do issue_id = args.issue_id issue = get_issue(issue_id) - puts "!! Issue ##{issue_id} found: #{issue.title}" + puts "-- Issue ##{issue_id} found: #{issue.title}" + + issue_type = "pre-review" if issue.title.match(/\[PRE REVIEW\]/) + issue_type = "review" if issue.title.match(/\[REVIEW\]/) + issue_body = issue.body header = get_header(issue_body) + if issue_type.nil? + puts " !! Error: Issue is not a [REVIEW] or [PRE-REVIEW] - Nothing done" + exit(0) + end + if header.start_with?("**Submitting author:** ") puts " Issue already migrated! - Nothing done" elsif header.start_with?("**Submitting author:** @") - puts " Migrating info:" + new_header = build_new_header(header, issue_type) - new_header = build_new_header(header) + puts " Migrating info:" new_issue_body = issue_body.sub(header, "#{new_header}\n\n \n\n") update_issue(issue_id, body: new_issue_body) @@ -113,6 +143,6 @@ namespace :migration do end end rescue Octokit::NotFound - puts "No issue found with id #{args.issue_id} in #{reviews_repo}" + puts "--!! No issue found with id #{args.issue_id} in #{reviews_repo}" end end From cfa812920a7d96abb089e09207519eb6c9c5ab87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 16 Feb 2022 12:24:02 +0100 Subject: [PATCH 295/609] add dry_run rake task for a single issue --- lib/tasks/migration.rake | 46 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/lib/tasks/migration.rake b/lib/tasks/migration.rake index 235e87544..3f93037f9 100644 --- a/lib/tasks/migration.rake +++ b/lib/tasks/migration.rake @@ -130,13 +130,10 @@ namespace :migration do if header.start_with?("**Submitting author:** ") puts " Issue already migrated! - Nothing done" elsif header.start_with?("**Submitting author:** @") - new_header = build_new_header(header, issue_type) - puts " Migrating info:" - + new_header = build_new_header(header, issue_type) new_issue_body = issue_body.sub(header, "#{new_header}\n\n \n\n") update_issue(issue_id, body: new_issue_body) - puts " Done!" else puts " !! Error: unexpected issue header format - Nothing done" @@ -145,4 +142,45 @@ namespace :migration do rescue Octokit::NotFound puts "--!! No issue found with id #{args.issue_id} in #{reviews_repo}" end + + namespace :dry_run do + desc "Migrate a single issue to use the new bot system" + task :issue, [:issue_id] => :environment do |t, args| + if args.issue_id.blank? + puts "Missing issue id" + puts "Use: rake migration:dry_run:issue[issue-id]" + else + issue_id = args.issue_id + issue = get_issue(issue_id) + + puts "-- Issue ##{issue_id} found: #{issue.title}\n" + + issue_type = "pre-review" if issue.title.match(/\[PRE REVIEW\]/) + issue_type = "review" if issue.title.match(/\[REVIEW\]/) + + issue_body = issue.body + header = get_header(issue_body) + + if issue_type.nil? + puts " !! Error: Issue is not a [REVIEW] or [PRE-REVIEW] - Nothing to do" + exit(0) + end + + if header.start_with?("**Submitting author:** ") + puts " Issue already migrated! - Nothing to do" + elsif header.start_with?("**Submitting author:** @") + puts " Information extracted:" + + new_header = build_new_header(header, issue_type) + + puts "\n New header would be changed to:" + puts "\n#{new_header}\n " + else + puts " !! Error: unexpected issue header format - Nothing to do" + end + end + rescue Octokit::NotFound + puts "--!! No issue found with id #{args.issue_id} in #{reviews_repo}" + end + end end From e987f891241a73bd5587ed4a44e1324a73530e35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 16 Feb 2022 12:42:20 +0100 Subject: [PATCH 296/609] add dry run task for migrating all issues --- lib/tasks/migration.rake | 43 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/lib/tasks/migration.rake b/lib/tasks/migration.rake index 3f93037f9..6bd82947d 100644 --- a/lib/tasks/migration.rake +++ b/lib/tasks/migration.rake @@ -1,5 +1,5 @@ def gh - @gh ||= Octokit::Client.new(access_token: ENV["GH_TOKEN"]) + @gh ||= GITHUB end def reviews_repo @@ -144,7 +144,7 @@ namespace :migration do end namespace :dry_run do - desc "Migrate a single issue to use the new bot system" + desc "Dry run of the migration of a single issue to the new bot system" task :issue, [:issue_id] => :environment do |t, args| if args.issue_id.blank? puts "Missing issue id" @@ -182,5 +182,44 @@ namespace :migration do rescue Octokit::NotFound puts "--!! No issue found with id #{args.issue_id} in #{reviews_repo}" end + + + desc "Dry run of the migration of all open issues to the new bot system" + task all_issues: :environment do + + open_issues = get_open_issues + puts "#{open_issues.size} issues found!\n" + open_issues.each_with_index do |issue, i| + + issue_id = issue.number + puts "-- #{i+1}) Issue ##{issue_id}: #{issue.title}\n" + + issue_type = "pre-review" if issue.title.match(/\[PRE REVIEW\]/) + issue_type = "review" if issue.title.match(/\[REVIEW\]/) + + issue_body = issue.body + header = get_header(issue_body) + + if issue_type.nil? + puts " !! Error: Issue is not a [REVIEW] or [PRE-REVIEW] - Nothing to do" + exit(0) + end + + if header.start_with?("**Submitting author:** ") + puts " Issue already migrated! - Nothing to do" + elsif header.start_with?("**Submitting author:** @") + puts " Information extracted:" + + new_header = build_new_header(header, issue_type) + + puts "\n New header would be changed to:" + puts "\n#{new_header}\n " + else + puts " !! Error: unexpected issue header format - Nothing to do" + end + end + rescue Octokit::NotFound + puts "--!! No issue found with id #{args.issue_id} in #{reviews_repo}" + end end end From e53c71a827aa8572c183302f130dab9eeceb014c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 16 Feb 2022 12:57:28 +0100 Subject: [PATCH 297/609] add task for complete migration --- lib/tasks/migration.rake | 63 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 2 deletions(-) diff --git a/lib/tasks/migration.rake b/lib/tasks/migration.rake index 6bd82947d..08aac2d87 100644 --- a/lib/tasks/migration.rake +++ b/lib/tasks/migration.rake @@ -54,7 +54,9 @@ def get_managing_eic(text) end def get_header(body) - body.match(/(.*)\*\*:warning: JOSS reduced service mode :warning:\*\*/m)[1] + # If covid warning is removed, "## Status" could be used + m = body.match(/(.*)\*\*:warning: JOSS reduced service mode :warning:\*\*/m) + m.nil? ? nil : m[1] end def build_new_header(header, issue_type) @@ -127,6 +129,11 @@ namespace :migration do exit(0) end + if header.nil? + puts " !! Error: Can't find header - Nothing to do" + exit(0) + end + if header.start_with?("**Submitting author:** ") puts " Issue already migrated! - Nothing done" elsif header.start_with?("**Submitting author:** @") @@ -143,6 +150,48 @@ namespace :migration do puts "--!! No issue found with id #{args.issue_id} in #{reviews_repo}" end + desc "Migrate all open issues to the new bot system" + task all_issues: :environment do + raise("DO NOT MIGRATE YET!") + open_issues = get_open_issues + puts "#{open_issues.size} issues found!\n" + open_issues.each_with_index do |issue, i| + + issue_id = issue.number + puts "-- #{i+1}) Issue ##{issue_id}: #{issue.title}\n" + + issue_type = "pre-review" if issue.title.match(/\[PRE REVIEW\]/) + issue_type = "review" if issue.title.match(/\[REVIEW\]/) + + issue_body = issue.body + header = get_header(issue_body) + + if issue_type.nil? + puts " !! Error: Issue is not a [REVIEW] or [PRE-REVIEW] - Nothing done" + next + end + + if header.nil? + puts " !! Error: Can't find header - Nothing to do" + next + end + + if header.start_with?("**Submitting author:** ") + puts " Issue already migrated! - Nothing done" + elsif header.start_with?("**Submitting author:** @") + puts " Migrating info:" + new_header = build_new_header(header, issue_type) + new_issue_body = issue_body.sub(header, "#{new_header}\n\n \n\n") + update_issue(issue_id, body: new_issue_body) + puts " Done!" + else + puts " !! Error: unexpected issue header format - Nothing done" + end + end + rescue Octokit::NotFound + puts "--!! No issue found with id #{args.issue_id} in #{reviews_repo}" + end + namespace :dry_run do desc "Dry run of the migration of a single issue to the new bot system" task :issue, [:issue_id] => :environment do |t, args| @@ -166,6 +215,11 @@ namespace :migration do exit(0) end + if header.nil? + puts " !! Error: Can't find header - Nothing to do" + exit(0) + end + if header.start_with?("**Submitting author:** ") puts " Issue already migrated! - Nothing to do" elsif header.start_with?("**Submitting author:** @") @@ -202,7 +256,12 @@ namespace :migration do if issue_type.nil? puts " !! Error: Issue is not a [REVIEW] or [PRE-REVIEW] - Nothing to do" - exit(0) + next + end + + if header.nil? + puts " !! Error: Can't find header - Nothing to do" + next end if header.start_with?("**Submitting author:** ") From cafc87b1120980903aba21fdd48ee366c69149eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 21 Feb 2022 13:40:36 +0100 Subject: [PATCH 298/609] update rails --- Gemfile | 4 +- Gemfile.lock | 140 ++++++++++++++++++++++++++------------------------- 2 files changed, 73 insertions(+), 71 deletions(-) diff --git a/Gemfile b/Gemfile index b257965d9..ff0b200df 100644 --- a/Gemfile +++ b/Gemfile @@ -17,7 +17,7 @@ gem 'octokit', '~> 4.21' gem 'pdf-reader', '~> 2.4.2' gem 'pg', '~> 1.2.3' gem 'will_paginate', '~> 3.3.0' -gem 'rails', '6.1.4.4' +gem 'rails', '6.1.4.6' gem 'responders' gem 'newrelic_rpm' gem 'sanitize', '~> 6.0.0' @@ -43,7 +43,7 @@ gem 'unicorn', '~> 5.8.0' group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'pry-byebug' - gem 'capybara', '~> 3.35.3' + gem 'capybara', '~> 3.36.0' gem 'factory_bot_rails', '~> 6.1.0' gem 'rspec-rails', '~> 5.0.0' gem 'rails-controller-testing', '~> 1.0.5' diff --git a/Gemfile.lock b/Gemfile.lock index 0142e4630..89b9e0776 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,40 +4,40 @@ GEM Ascii85 (1.1.0) aasm (5.2.0) concurrent-ruby (~> 1.0) - actioncable (6.1.4.4) - actionpack (= 6.1.4.4) - activesupport (= 6.1.4.4) + actioncable (6.1.4.6) + actionpack (= 6.1.4.6) + activesupport (= 6.1.4.6) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.4.4) - actionpack (= 6.1.4.4) - activejob (= 6.1.4.4) - activerecord (= 6.1.4.4) - activestorage (= 6.1.4.4) - activesupport (= 6.1.4.4) + actionmailbox (6.1.4.6) + actionpack (= 6.1.4.6) + activejob (= 6.1.4.6) + activerecord (= 6.1.4.6) + activestorage (= 6.1.4.6) + activesupport (= 6.1.4.6) mail (>= 2.7.1) - actionmailer (6.1.4.4) - actionpack (= 6.1.4.4) - actionview (= 6.1.4.4) - activejob (= 6.1.4.4) - activesupport (= 6.1.4.4) + actionmailer (6.1.4.6) + actionpack (= 6.1.4.6) + actionview (= 6.1.4.6) + activejob (= 6.1.4.6) + activesupport (= 6.1.4.6) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.4.4) - actionview (= 6.1.4.4) - activesupport (= 6.1.4.4) + actionpack (6.1.4.6) + actionview (= 6.1.4.6) + activesupport (= 6.1.4.6) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.4.4) - actionpack (= 6.1.4.4) - activerecord (= 6.1.4.4) - activestorage (= 6.1.4.4) - activesupport (= 6.1.4.4) + actiontext (6.1.4.6) + actionpack (= 6.1.4.6) + activerecord (= 6.1.4.6) + activestorage (= 6.1.4.6) + activesupport (= 6.1.4.6) nokogiri (>= 1.8.5) - actionview (6.1.4.4) - activesupport (= 6.1.4.4) + actionview (6.1.4.6) + activesupport (= 6.1.4.6) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -45,22 +45,22 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (6.1.4.4) - activesupport (= 6.1.4.4) + activejob (6.1.4.6) + activesupport (= 6.1.4.6) globalid (>= 0.3.6) - activemodel (6.1.4.4) - activesupport (= 6.1.4.4) - activerecord (6.1.4.4) - activemodel (= 6.1.4.4) - activesupport (= 6.1.4.4) - activestorage (6.1.4.4) - actionpack (= 6.1.4.4) - activejob (= 6.1.4.4) - activerecord (= 6.1.4.4) - activesupport (= 6.1.4.4) + activemodel (6.1.4.6) + activesupport (= 6.1.4.6) + activerecord (6.1.4.6) + activemodel (= 6.1.4.6) + activesupport (= 6.1.4.6) + activestorage (6.1.4.6) + actionpack (= 6.1.4.6) + activejob (= 6.1.4.6) + activerecord (= 6.1.4.6) + activesupport (= 6.1.4.6) marcel (~> 1.0.0) mini_mime (>= 1.1.0) - activesupport (6.1.4.4) + activesupport (6.1.4.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -72,16 +72,17 @@ GEM autoprefixer-rails (10.2.4.0) execjs bindex (0.8.1) - bootsnap (1.9.3) - msgpack (~> 1.0) + bootsnap (1.10.3) + msgpack (~> 1.2) bootstrap (4.3.1) autoprefixer-rails (>= 9.1.0) popper_js (>= 1.14.3, < 2) sassc-rails (>= 2.0.0) builder (3.2.4) byebug (11.1.3) - capybara (3.35.3) + capybara (3.36.0) addressable + matrix mini_mime (>= 0.1.3) nokogiri (~> 1.8) rack (>= 1.6.0) @@ -195,7 +196,7 @@ GEM nokogiri (>= 1.4) http_parser.rb (0.6.0) httpclient (2.8.3) - i18n (1.8.11) + i18n (1.10.0) concurrent-ruby (~> 1.0) issue (0.1.0) openssl @@ -211,27 +212,28 @@ GEM listen (3.5.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.13.0) + loofah (2.14.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) lumberjack (1.2.8) mail (2.7.1) mini_mime (>= 0.1.1) marcel (1.0.2) + matrix (0.4.2) memoist (0.16.2) method_source (1.0.0) mini_mime (1.1.2) - mini_portile2 (2.6.1) + mini_portile2 (2.7.1) minitest (5.15.0) - msgpack (1.4.2) + msgpack (1.4.5) multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.1.1) nenv (0.3.0) newrelic_rpm (7.0.0) nio4r (2.5.8) - nokogiri (1.12.5) - mini_portile2 (~> 2.6.1) + nokogiri (1.13.1) + mini_portile2 (~> 2.7.0) racc (~> 1.4) notiffany (0.1.3) nenv (~> 0.1) @@ -288,20 +290,20 @@ GEM rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.1.4.4) - actioncable (= 6.1.4.4) - actionmailbox (= 6.1.4.4) - actionmailer (= 6.1.4.4) - actionpack (= 6.1.4.4) - actiontext (= 6.1.4.4) - actionview (= 6.1.4.4) - activejob (= 6.1.4.4) - activemodel (= 6.1.4.4) - activerecord (= 6.1.4.4) - activestorage (= 6.1.4.4) - activesupport (= 6.1.4.4) + rails (6.1.4.6) + actioncable (= 6.1.4.6) + actionmailbox (= 6.1.4.6) + actionmailer (= 6.1.4.6) + actionpack (= 6.1.4.6) + actiontext (= 6.1.4.6) + actionview (= 6.1.4.6) + activejob (= 6.1.4.6) + activemodel (= 6.1.4.6) + activerecord (= 6.1.4.6) + activestorage (= 6.1.4.6) + activesupport (= 6.1.4.6) bundler (>= 1.15.0) - railties (= 6.1.4.4) + railties (= 6.1.4.6) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -312,9 +314,9 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.4.2) loofah (~> 2.3) - railties (6.1.4.4) - actionpack (= 6.1.4.4) - activesupport (= 6.1.4.4) + railties (6.1.4.6) + actionpack (= 6.1.4.6) + activesupport (= 6.1.4.6) method_source rake (>= 0.13) thor (~> 1.0) @@ -323,7 +325,7 @@ GEM rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) - regexp_parser (2.1.1) + regexp_parser (2.2.1) representable (3.1.1) declarative (< 0.1.0) trailblazer-option (>= 0.1.1, < 0.2.0) @@ -395,7 +397,7 @@ GEM actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - thor (1.1.0) + thor (1.2.1) tilt (2.0.10) trailblazer-option (0.1.1) ttfunk (1.7.0) @@ -424,7 +426,7 @@ GEM will_paginate (3.3.0) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.5.1) + zeitwerk (2.5.4) PLATFORMS ruby @@ -434,7 +436,7 @@ DEPENDENCIES active_link_to bootsnap bootstrap (~> 4.3.1) - capybara (~> 3.35.3) + capybara (~> 3.36.0) chartkick coffee-rails (~> 5.0.0) commonmarker (~> 0.21.1) @@ -458,7 +460,7 @@ DEPENDENCIES pg (~> 1.2.3) pry-byebug rack-livereload - rails (= 6.1.4.4) + rails (= 6.1.4.6) rails-controller-testing (~> 1.0.5) responders rspec-rails (~> 5.0.0) @@ -476,7 +478,7 @@ DEPENDENCIES will_paginate (~> 3.3.0) RUBY VERSION - ruby 3.0.3p157 + ruby 3.0.3 BUNDLED WITH - 2.2.33 + 2.3.7 From 9c10061aace8a35a9e8f12f880a77d0073bafc15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 21 Feb 2022 13:40:44 +0100 Subject: [PATCH 299/609] set test token --- spec/lib/repository_spec.rb | 4 ++-- spec/rails_helper.rb | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/spec/lib/repository_spec.rb b/spec/lib/repository_spec.rb index 5cd7ad889..41c3e358b 100644 --- a/spec/lib/repository_spec.rb +++ b/spec/lib/repository_spec.rb @@ -56,7 +56,7 @@ expect(Octokit).to receive(:user).and_return(OpenStruct.new(id: 33)) expected_url = "https://api.github.com/orgs/openjournals/invitations" expected_params = {invitee_id: 33, team_ids: [1234]} - exheaders = {"Authorization" => "token ", "Content-Type" => "application/json", "Accept" => "application/vnd.github.v3+json"} + exheaders = {"Authorization" => "token testGHtoken", "Content-Type" => "application/json", "Accept" => "application/vnd.github.v3+json"} expect(Faraday).to receive(:post).with(expected_url, expected_params.to_json, exheaders).and_return(OpenStruct.new(status: 404)) expect(Repository.invite_to_editors_team("unexistent_user")).to be false @@ -66,7 +66,7 @@ expect(Octokit).to receive(:user).and_return(OpenStruct.new(id: 42)) expected_url = "https://api.github.com/orgs/openjournals/invitations" expected_params = {invitee_id: 42, team_ids: [1234]} - exheaders = {"Authorization" => "token ", "Content-Type" => "application/json", "Accept" => "application/vnd.github.v3+json"} + exheaders = {"Authorization" => "token testGHtoken", "Content-Type" => "application/json", "Accept" => "application/vnd.github.v3+json"} expect(Faraday).to receive(:post).with(expected_url, expected_params.to_json, exheaders).and_return(OpenStruct.new(status: 200)) expect(Repository.invite_to_editors_team("unexistent_user")).to be true diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 4fcebdb57..e45178be7 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -2,6 +2,8 @@ require 'spec_helper' ENV['RAILS_ENV'] ||= 'test' +ENV['GH_TOKEN'] = "testGHtoken" + require File.expand_path('../config/environment', __dir__) # Prevent database truncation if the environment is production abort("The Rails environment is running in production mode!") if Rails.env.production? From e108332b887628d6f2e775dbeeb144e829aa35ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 21 Feb 2022 13:53:31 +0100 Subject: [PATCH 300/609] update production settings --- config/repository.yml | 4 ++-- config/settings-production.yml | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/config/repository.yml b/config/repository.yml index 7ee620428..24f9978e5 100644 --- a/config/repository.yml +++ b/config/repository.yml @@ -1,3 +1,3 @@ -openjournals/joss-reviews-testing: +openjournals/joss-reviews: editor_team_id: 2009411 - papers: openjournals/joss-papers-testing + papers: openjournals/joss-papers diff --git a/config/settings-production.yml b/config/settings-production.yml index 23f7c7eed..4f4cf5570 100644 --- a/config/settings-production.yml +++ b/config/settings-production.yml @@ -1,18 +1,18 @@ # Changing this file necessitates a server restart name: "Journal of Open Source Software" -abbreviation: "TEST_JOURNAL" +abbreviation: "JOSS" issn: "2475-9066" tagline: "a developer friendly, open access journal for research software packages." -logo_url: "http://test.joss.theoj.org/logo_large.jpg" -url: "https://test.joss.theoj.org" +logo_url: "http://joss.theoj.org/logo_large.jpg" +url: "https://joss.theoj.org" editor_email: "admin@theoj.org" noreply_email: "noreply@joss.theoj.org" twitter: "@JOSS_TheOJ" google_analytics: "UA-47852178-4" github: "openjournals/joss" -reviews: "openjournals/joss-reviews-testing" -papers_html_url: "https://www.theoj.org/joss-papers-testing" -papers_repo: "openjournals/joss-papers-testing" +reviews: "openjournals/joss-reviews" +papers_html_url: "https://www.theoj.org/joss-papers" +papers_repo: "openjournals/joss-papers" product: "software" # the *thing* being submitted for review reviewers: "https://bit.ly/joss-reviewers" submission_enquiry: |- @@ -20,4 +20,4 @@ submission_enquiry: |- Briefly describe your software, its research application and any questions you have about the JOSS submission criteria. paper_types: [] -bot_username: botsci +bot_username: editorialbot From 24f02a29119cceab27c6d8a071ed7086d5dba075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 21 Feb 2022 13:57:02 +0100 Subject: [PATCH 301/609] editorial --- app.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.json b/app.json index 1d5eb07a3..5ec2b369f 100644 --- a/app.json +++ b/app.json @@ -18,7 +18,7 @@ "description": "The OAuth secret key for ORCID logins" }, "BOT_SECRET": { - "description": "The key that the editoria bot uses to authenticate" + "description": "The key that the editorial bot uses to authenticate" }, "GH_TOKEN": { "description": "The GitHub token for the editorial bot GitHub user" From bef4c1a566f10c5770b85e4e374cdf3cdfb2459e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 22 Feb 2022 09:17:22 +0100 Subject: [PATCH 302/609] update command --- docs/editing.md | 4 ++-- docs/editorial_bot.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/editing.md b/docs/editing.md index b2273bbf0..0bc9aca45 100644 --- a/docs/editing.md +++ b/docs/editing.md @@ -103,7 +103,7 @@ Pre-publication steps: - Check the archive deposit has the correct metadata (title and author list), and request the author edit it if it doesn’t match the paper. - Run `@editorialbot set as archive`. - Run `@editorialbot set as version` if the version was updated. -- Run `@editorialbot recommend acceptance` to generate the final proofs, which has EditorialBot notify the `@openjournals/joss-eics` team that the paper is ready for final processing. +- Run `@editorialbot recommend-accept` to generate the final proofs, which has EditorialBot notify the `@openjournals/joss-eics` team that the paper is ready for final processing. At this point, the EiC/AEiC will take over to make final checks and publish the paper. @@ -295,7 +295,7 @@ This doesn’t mean that you’re the editor, just that you’ve been suggested - Make a final check of the paper with `@editorialbot generate pdf` and that all references have DOIs (where appropriate) with `@editorialbot check references`. - If everything looks good, ask the author to make a new release (if possible) of the software being reviewed and deposit a new archive the software with Zenodo/figshare. Update the review thread with this archive DOI: `@editorialbot set 10.5281/zenodo.xxxxxx` as archive. -- Finally, use `@editorialbot recommend acceptance` on the review thread to ping the `@openjournals/joss-eics` team letting them know the paper is ready to be accepted. +- Finally, use `@editorialbot recommend-accept` on the review thread to ping the `@openjournals/joss-eics` team letting them know the paper is ready to be accepted. **Step 12: Celebrate publication! Tweet! Thank reviewers! Say thank you on issue.** diff --git a/docs/editorial_bot.md b/docs/editorial_bot.md index af41f1733..9535ed761 100644 --- a/docs/editorial_bot.md +++ b/docs/editorial_bot.md @@ -184,7 +184,7 @@ Editors can flag a paper with query-scope with the command: JOSS topic editors can recommend a paper for acceptance and ask for the final proofs to be created by EditorialBot with the following command: ```text -@editorialbot recommend acceptance +@editorialbot recommend-accept ``` On issuing this command, EditorialBot will also check the references of the paper for any missing DOIs. @@ -281,7 +281,7 @@ JOSS editors-in-chief can withdraw a submission with the following command: @editorialbot generate pdf # Recommends the submission for acceptance -@editorialbot recommend acceptance +@editorialbot recommend-accept # Accept and publish the paper @editorialbot accept From b3640961141686ac864f03d17484a757d2efec09 Mon Sep 17 00:00:00 2001 From: Hugo Gruson Date: Tue, 22 Feb 2022 08:17:28 +0000 Subject: [PATCH 303/609] Update link to Markdown citation syntax docs Since the previous link to rstudio docs now redirects to an unhelpful section of pandoc docs --- docs/submitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index 8aa77dc49..ac3b9dccc 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -273,7 +273,7 @@ Example `paper.bib` file: } ``` -Note that the paper ends with a References heading, and the references are built automatically from the content in the `.bib` file. You should enter in-text citations in the paper body following correct [Markdown citation syntax](https://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html#citation_syntax). Also note that the references include full names of venues, e.g., journals and conferences, not abbreviations only understood in the context of a specific discipline. +Note that the paper ends with a References heading, and the references are built automatically from the content in the `.bib` file. You should enter in-text citations in the paper body following correct [Markdown citation syntax](https://pandoc.org/MANUAL.html#extension-citations). Also note that the references include full names of venues, e.g., journals and conferences, not abbreviations only understood in the context of a specific discipline. ## Checking that your paper compiles From 56d549a9d55aa12cafa9ec8db3d9d6ceac52b383 Mon Sep 17 00:00:00 2001 From: "Daniel S. Katz" Date: Tue, 22 Feb 2022 16:40:07 -0600 Subject: [PATCH 304/609] adding missing paren --- docs/review_criteria.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/review_criteria.md b/docs/review_criteria.md index 2b5c4a75e..129d13122 100644 --- a/docs/review_criteria.md +++ b/docs/review_criteria.md @@ -59,7 +59,7 @@ The authors should clearly state what problems the software is designed to solve Software dependencies should be clearly documented and their installation handled by an automated proceedure. Where possible, software installation should be managed with a package manager. However, this criterion depends upon the maturity and availability of software packaging and distribution in the programming language being used. For example, Python packages should be `pip install`able, and have adopted [packaging conventions](https://packaging.python.org), while Fortran submissions with a Makefile may be sufficient. > **Good:** The software is simple to install, and follows established distribution and dependency management approaches for the language being used
    -> **OK:** A list of dependencies to install, together with some kind of script to handle their installation (e.g., a Makefile
    +> **OK:** A list of dependencies to install, together with some kind of script to handle their installation (e.g., a Makefile)
    > **Bad (not acceptable):** Dependencies are unclear, and/or installation process lacks automation #### Example usage From 4721ccd7981080b375dfab35fe289097f411be60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 23 Feb 2022 10:02:50 +0100 Subject: [PATCH 305/609] settings --- config/settings-development.yml | 2 +- config/settings-production.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/settings-development.yml b/config/settings-development.yml index 17146eb16..5b7744bd1 100644 --- a/config/settings-development.yml +++ b/config/settings-development.yml @@ -2,7 +2,7 @@ name: "Journal of Open Source Software" abbreviation: "JOSS" issn: "2475-9066" -tagline: "a developer friendly journal for research software packages." +tagline: "a developer friendly, open access journal for research software packages." logo_url: "https://joss.theoj.org/logo_large.png" url: "http://0.0.0.0:3000" editor_email: "joss.theoj@gmail.com" diff --git a/config/settings-production.yml b/config/settings-production.yml index 4f4cf5570..6188bbbc6 100644 --- a/config/settings-production.yml +++ b/config/settings-production.yml @@ -3,7 +3,7 @@ name: "Journal of Open Source Software" abbreviation: "JOSS" issn: "2475-9066" tagline: "a developer friendly, open access journal for research software packages." -logo_url: "http://joss.theoj.org/logo_large.jpg" +logo_url: "https://joss.theoj.org/logo_large.jpg" url: "https://joss.theoj.org" editor_email: "admin@theoj.org" noreply_email: "noreply@joss.theoj.org" From 7291d7973a7c4ce21cdf06f9841529b9f67ae9e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 23 Feb 2022 10:53:41 +0100 Subject: [PATCH 306/609] remove failsafe --- lib/tasks/migration.rake | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/tasks/migration.rake b/lib/tasks/migration.rake index 08aac2d87..7281765cd 100644 --- a/lib/tasks/migration.rake +++ b/lib/tasks/migration.rake @@ -152,7 +152,6 @@ namespace :migration do desc "Migrate all open issues to the new bot system" task all_issues: :environment do - raise("DO NOT MIGRATE YET!") open_issues = get_open_issues puts "#{open_issues.size} issues found!\n" open_issues.each_with_index do |issue, i| From b82f783a2cb8276554ab83878f0dcd3162fae5a4 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 23 Feb 2022 13:22:42 +0000 Subject: [PATCH 307/609] Removing warning about reduced service mode --- app/views/shared/meta_view_body.text.erb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/views/shared/meta_view_body.text.erb b/app/views/shared/meta_view_body.text.erb index 27df74a93..cd401fe11 100644 --- a/app/views/shared/meta_view_body.text.erb +++ b/app/views/shared/meta_view_body.text.erb @@ -6,10 +6,6 @@ **Reviewers:** **Managing EiC:** <%= eic_name %> -**:warning: JOSS reduced service mode :warning:** - -Due to the challenges of the COVID-19 pandemic, JOSS is currently operating in a "reduced service mode". You can read more about what that means in [our blog post](https://blog.joss.theoj.org/2020/05/reopening-joss). - ## Status <%- url = Rails.application.settings["url"] %> From bac5734fe54304150ea16c24c08980ce4c428e21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 24 Feb 2022 12:42:29 +0100 Subject: [PATCH 308/609] update docs --- docs/editorial_bot.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/docs/editorial_bot.md b/docs/editorial_bot.md index 9535ed761..6078bab38 100644 --- a/docs/editorial_bot.md +++ b/docs/editorial_bot.md @@ -32,10 +32,16 @@ Anyone can ask `@editorialbot` to compile the paper again (e.g. after a change h #### Compiling papers from a specific branch -By default, EditorialBot will look for papers in the branch set in the body of the issue (or in the default git branch if none is present). If you want to compile a paper from a specific branch, this can be done as follows: +By default, EditorialBot will look for papers in the branch set in the body of the issue (or in the default git branch if none is present). If you want to compile a paper from a specific branch (for instance: `my-custom-branch-name`), change that value with: ```text -@editorialbot generate pdf from branch custom-branch-name +@editorialbot set my-custom-branch-name as branch +``` + +And then compile the paper normally: + +```text +@editorialbot generate pdf ``` ### Finding reviewers @@ -143,10 +149,10 @@ Sometimes the version of the software changes as a consequence of the review pro ### Changing the git branch -Sometimes the paper-md file is located in a topic branch. In order to have the PDF compiled from that branch it shuold be added to the issue. To update the branch do the following: +Sometimes the paper-md file is located in a topic branch. In order to have the PDF compiled from that branch it should be added to the issue. To update the branch value do the following (in the example, the name of the topic branch is _topic-branch-name_): ```text -@editorialbot set custom-branch-with-paper as branch +@editorialbot set topic-branch-name as branch ``` ### Check references @@ -249,12 +255,12 @@ JOSS editors-in-chief can withdraw a submission with the following command: # Check the references of the paper for missing DOIs # Optionally, it can be run on a non-default branch @editorialbot check references -@editorialbot check references from custom-branch-name +@editorialbot check references from branch custom-branch-name # Perform checks on the repository # Optionally, it can be run on a non-default branch @editorialbot check repository -@editorialbot check repository from custom-branch-name +@editorialbot check repository from branch custom-branch-name # Adds a checklist for the reviewer using this command @editorialbot generate my checklist From 40138dc7066bf0b4f2e9d2e7f42847cebf38f6c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 24 Feb 2022 13:01:18 +0100 Subject: [PATCH 309/609] remove warning about service mode from review's template --- app/views/shared/review_body.text.erb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/views/shared/review_body.text.erb b/app/views/shared/review_body.text.erb index dbca2ca77..f4f9d56b9 100644 --- a/app/views/shared/review_body.text.erb +++ b/app/views/shared/review_body.text.erb @@ -6,10 +6,6 @@ **Reviewers:** <%= reviewers.join(', ') %> **Archive:** Pending -**:warning: JOSS reduced service mode :warning:** - -Due to the challenges of the COVID-19 pandemic, JOSS is currently operating in a "reduced service mode". You can read more about what that means in [our blog post](https://blog.joss.theoj.org/2020/05/reopening-joss). - ## Status <%- url = Rails.application.settings["url"] %> From f78cfc8859c876bd86593e1762a247dbb149da58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 24 Feb 2022 13:01:39 +0100 Subject: [PATCH 310/609] update rake task --- lib/tasks/migration.rake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/tasks/migration.rake b/lib/tasks/migration.rake index 7281765cd..74103b60b 100644 --- a/lib/tasks/migration.rake +++ b/lib/tasks/migration.rake @@ -54,8 +54,7 @@ def get_managing_eic(text) end def get_header(body) - # If covid warning is removed, "## Status" could be used - m = body.match(/(.*)\*\*:warning: JOSS reduced service mode :warning:\*\*/m) + m = body.match(/(.*)## Status/m) m.nil? ? nil : m[1] end From 58a4ad02190f6298c94219d9a1767cebc366af09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 24 Feb 2022 13:44:08 +0100 Subject: [PATCH 311/609] initialize template with "Pending" value for reviewers --- app/views/shared/meta_view_body.text.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/meta_view_body.text.erb b/app/views/shared/meta_view_body.text.erb index cd401fe11..ef1da82af 100644 --- a/app/views/shared/meta_view_body.text.erb +++ b/app/views/shared/meta_view_body.text.erb @@ -3,7 +3,7 @@ **Branch with paper.md** (empty if default branch): **Version:** <%= paper.software_version %> **Editor:** Pending -**Reviewers:** +**Reviewers:** Pending **Managing EiC:** <%= eic_name %> ## Status From 1fe4fbc19f02bed63bae28d415c4559f2d160636 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 25 Feb 2022 09:06:52 +0100 Subject: [PATCH 312/609] update editorial bot docs --- docs/editorial_bot.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/editorial_bot.md b/docs/editorial_bot.md index 6078bab38..6acf00bf5 100644 --- a/docs/editorial_bot.md +++ b/docs/editorial_bot.md @@ -253,14 +253,10 @@ JOSS editors-in-chief can withdraw a submission with the following command: @editorialbot remind @reviewer in 2 weeks # Check the references of the paper for missing DOIs -# Optionally, it can be run on a non-default branch @editorialbot check references -@editorialbot check references from branch custom-branch-name # Perform checks on the repository -# Optionally, it can be run on a non-default branch @editorialbot check repository -@editorialbot check repository from branch custom-branch-name # Adds a checklist for the reviewer using this command @editorialbot generate my checklist From f32dd9f4376f14a7ff145ef09c12d47b0fbb5970 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 26 Feb 2022 12:35:23 +0000 Subject: [PATCH 313/609] Bump nokogiri from 1.13.1 to 1.13.3 Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.13.1 to 1.13.3. - [Release notes](https://github.com/sparklemotion/nokogiri/releases) - [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md) - [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.13.1...v1.13.3) --- updated-dependencies: - dependency-name: nokogiri dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 89b9e0776..f83abac4b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -223,7 +223,7 @@ GEM memoist (0.16.2) method_source (1.0.0) mini_mime (1.1.2) - mini_portile2 (2.7.1) + mini_portile2 (2.8.0) minitest (5.15.0) msgpack (1.4.5) multi_json (1.15.0) @@ -232,8 +232,8 @@ GEM nenv (0.3.0) newrelic_rpm (7.0.0) nio4r (2.5.8) - nokogiri (1.13.1) - mini_portile2 (~> 2.7.0) + nokogiri (1.13.3) + mini_portile2 (~> 2.8.0) racc (~> 1.4) notiffany (0.1.3) nenv (~> 0.1) From 84e046f56c7c87dc20d89ea06ae48d046b679f8b Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 27 Feb 2022 18:32:33 +0000 Subject: [PATCH 314/609] Fixing editor params --- app/controllers/dispatch_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/dispatch_controller.rb b/app/controllers/dispatch_controller.rb index 5e3515ad4..968c8e541 100644 --- a/app/controllers/dispatch_controller.rb +++ b/app/controllers/dispatch_controller.rb @@ -27,7 +27,8 @@ def github_receiver def api_assign_editor if params[:secret] == ENV['BOT_SECRET'] paper = Paper.find_by_meta_review_issue_id(params[:id]) - editor = Editor.find_by_login(params[:editor]) + editor_params = params[:editor].gsub(/^\@/, "") + editor = Editor.find_by_login(editor_params) return head :unprocessable_entity unless paper && editor paper.set_editor(editor) else From bffe237b402ed3ae2c61041f66e54cdd36246f71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 3 Mar 2022 14:12:27 +0100 Subject: [PATCH 315/609] remove preview service from docs --- app/views/papers/new.html.erb | 2 +- docs/submitting.md | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/app/views/papers/new.html.erb b/app/views/papers/new.html.erb index 47be37bd3..14f3ceeef 100644 --- a/app/views/papers/new.html.erb +++ b/app/views/papers/new.html.erb @@ -8,7 +8,7 @@

    As the submitting author, before you submit, please make sure that you have reviewed the following items. We promise this will make things go much more quickly during the review process:

    diff --git a/docs/submitting.md b/docs/submitting.md index 6709faa8e..36fff41ca 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -279,12 +279,6 @@ Note that the paper ends with a References heading, and the references are built JOSS uses Pandoc to compile papers from their Markdown form into a PDF. There are a few different ways you can test that your paper is going to compile properly for JOSS: -### JOSS paper preview service - -Visit [https://whedon.theoj.org](https://whedon.theoj.org) and enter your repository address (and custom branch if you're using one). Note that your repository must be world-readable (i.e., it cannot require a login to access). - -Screen Shot 2020-11-23 at 12 08 58 PM - ### GitHub Action If you're using GitHub for your repository, you can use the [Open Journals GitHub Action](https://github.com/marketplace/actions/open-journals-pdf-generator) to automatically compile your paper each time you update your repository. @@ -300,7 +294,7 @@ docker run --rm \ --volume $PWD/paper:/data \ --user $(id -u):$(id -g) \ --env JOURNAL=joss \ - openjournals/paperdraft + openjournals/inara ``` ## Submitting your paper From 71ff60fdc3b3e2ae900892fce2d7fa977cf96c37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 4 Mar 2022 10:09:19 +0100 Subject: [PATCH 316/609] update commonmarker --- Gemfile | 2 +- Gemfile.lock | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index ff0b200df..7e9b23534 100644 --- a/Gemfile +++ b/Gemfile @@ -9,7 +9,7 @@ gem 'google_drive' gem 'groupdate' gem 'honeybadger', '~> 4.7.2' gem 'html-pipeline', '~> 2.14.0' -gem 'commonmarker', '~> 0.21.1' +gem 'commonmarker', '~> 0.23.4' gem 'octicons_helper', '~> 11.3' gem 'omniauth-orcid', '~> 2.1.1' gem 'omniauth-rails_csrf_protection' diff --git a/Gemfile.lock b/Gemfile.lock index f83abac4b..d864d361d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -99,8 +99,7 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - commonmarker (0.21.2) - ruby-enum (~> 0.5) + commonmarker (0.23.4) concurrent-ruby (1.1.9) crack (0.4.5) rexml @@ -352,8 +351,6 @@ GEM rspec-mocks (~> 3.10) rspec-support (~> 3.10) rspec-support (3.10.2) - ruby-enum (0.9.0) - i18n ruby-rc4 (0.1.5) ruby2_keywords (0.0.4) ruby_dig (0.0.2) @@ -439,7 +436,7 @@ DEPENDENCIES capybara (~> 3.36.0) chartkick coffee-rails (~> 5.0.0) - commonmarker (~> 0.21.1) + commonmarker (~> 0.23.4) dotenv (~> 2.7.6) factory_bot_rails (~> 6.1.0) google_drive From cd8b3b8d4547ecd1c3934961bcc8d70bf865ba54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 4 Mar 2022 10:20:29 +0100 Subject: [PATCH 317/609] update COI link --- COI.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/COI.md b/COI.md index c32f095fa..6c3a0bd2a 100644 --- a/COI.md +++ b/COI.md @@ -1,6 +1,6 @@ # JOSS Conflict of Interest Policy -The definition of a conflict of Interest in peer review is a circumstance that makes you "unable to make an impartial scientific judgment or evaluation." ([PNAS Conflict of Interest Policy](http://www.pnas.org/site/authors/coi.xhtml)). JOSS is concerned with avoiding any actual conflicts of interest, and being sufficiently transparent that we avoid the appearance of conflicts of interest as well. +The definition of a conflict of Interest in peer review is a circumstance that makes you "unable to make an impartial scientific judgment or evaluation." ([PNAS Editorial Policies - Competing Interest](https://www.pnas.org/author-center/editorial-and-journal-policies#competing-interest)). JOSS is concerned with avoiding any actual conflicts of interest, and being sufficiently transparent that we avoid the appearance of conflicts of interest as well. As a reviewer, COIs are your present or previous association with any authors of a submission: recent (past four years) collaborators in funded research or work that is published; and lifetime for the family members, business partners, and thesis student/advisor or mentor. In addition, your recent (past year) association with the same organization of a submitter is a COI, for example, being employed at the same institution. From 017156b1d5b87b55c5fff079a7e7695f8ed8cafd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 4 Mar 2022 11:42:08 +0100 Subject: [PATCH 318/609] add git_branch to papers --- db/migrate/20220304092320_add_git_branch_to_papers.rb | 5 +++++ db/schema.rb | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20220304092320_add_git_branch_to_papers.rb diff --git a/db/migrate/20220304092320_add_git_branch_to_papers.rb b/db/migrate/20220304092320_add_git_branch_to_papers.rb new file mode 100644 index 000000000..1f5087625 --- /dev/null +++ b/db/migrate/20220304092320_add_git_branch_to_papers.rb @@ -0,0 +1,5 @@ +class AddGitBranchToPapers < ActiveRecord::Migration[6.1] + def change + add_column :papers, :git_branch, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index c386e03ba..bcea0bcbc 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2021_10_04_085341) do +ActiveRecord::Schema.define(version: 2022_03_04_092320) do # These are extensions that must be enabled in order to support this database enable_extension "hstore" @@ -102,6 +102,7 @@ t.boolean "archived", default: false t.integer "eic_id" t.string "submission_kind" + t.string "git_branch" t.index ["editor_id"], name: "index_papers_on_editor_id" t.index ["eic_id"], name: "index_papers_on_eic_id" t.index ["labels"], name: "index_papers_on_labels", using: :gin From cff08fa38027b4de0b49617c8982b3ff1bb2a238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 4 Mar 2022 11:42:40 +0100 Subject: [PATCH 319/609] add error message for submission_kind --- app/models/paper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/paper.rb b/app/models/paper.rb index a3d210873..4337484d1 100644 --- a/app/models/paper.rb +++ b/app/models/paper.rb @@ -125,7 +125,7 @@ class Paper < ApplicationRecord validates_presence_of :software_version, message: "Version can't be blank" validates_presence_of :body, message: "Description can't be blank" validates :kind, inclusion: { in: Rails.application.settings["paper_types"] }, allow_nil: true - validates :submission_kind, inclusion: { in: SUBMISSION_KINDS }, allow_nil: false + validates :submission_kind, inclusion: { in: SUBMISSION_KINDS, message: "You must select a submission type" }, allow_nil: false validate :check_repository_address, on: :create def notify_editors From 59851cc4ba40f2c7aa9e25e90c8cf3758611ff28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 4 Mar 2022 11:44:41 +0100 Subject: [PATCH 320/609] there no archive_doi in the form --- spec/controllers/papers_controller_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/controllers/papers_controller_spec.rb b/spec/controllers/papers_controller_spec.rb index c20549c6a..9a7e059bd 100644 --- a/spec/controllers/papers_controller_spec.rb +++ b/spec/controllers/papers_controller_spec.rb @@ -115,7 +115,7 @@ allow(controller).to receive_message_chain(:current_user).and_return(user) paper_count = Paper.count - paper_params = {title: "Yeah whateva", body: "something", repository_url: "", archive_doi: "https://doi.org/10.6084/m9.figshare.828487"} + paper_params = {title: "Yeah whateva", body: "something", repository_url: ""} post :create, params: {paper: paper_params} expect(response.body).to match /Your paper could not be saved/ @@ -128,7 +128,7 @@ paper_count = Paper.count request.env["HTTP_REFERER"] = new_paper_path - paper_params = {title: "Yeah whateva", body: "something", repository_url: "https://github.com/foo/bar", archive_doi: "https://doi.org/10.6084/m9.figshare.828487", software_version: "v1.0.1"} + paper_params = {title: "Yeah whateva", body: "something", repository_url: "https://github.com/foo/bar", software_version: "v1.0.1"} post :create, params: {paper: paper_params} expect(response).to be_redirect # as it's redirected us expect(Paper.count).to eq(paper_count) From cff961b82b6992fe15df915ab828c36f10ab37b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 4 Mar 2022 11:45:47 +0100 Subject: [PATCH 321/609] allow submissions to include a non default git branch --- app/controllers/papers_controller.rb | 2 +- app/views/papers/_form.html.erb | 17 +++++++++++++---- app/views/shared/meta_view_body.text.erb | 2 +- spec/controllers/papers_controller_spec.rb | 7 ++++++- spec/views/papers/new.html.erb_spec.rb | 4 ++++ 5 files changed, 25 insertions(+), 7 deletions(-) diff --git a/app/controllers/papers_controller.rb b/app/controllers/papers_controller.rb index b833a0341..4f3290742 100644 --- a/app/controllers/papers_controller.rb +++ b/app/controllers/papers_controller.rb @@ -306,7 +306,7 @@ def status private def paper_params - params.require(:paper).permit(:title, :repository_url, :archive_doi, :software_version, :suggested_editor, :body, :kind, :submission_kind) + params.require(:paper).permit(:title, :repository_url, :git_branch, :software_version, :suggested_editor, :body, :kind, :submission_kind) end def can_see_hidden_paper?(paper) diff --git a/app/views/papers/_form.html.erb b/app/views/papers/_form.html.erb index c78f2b5d5..605b1a796 100644 --- a/app/views/papers/_form.html.erb +++ b/app/views/papers/_form.html.erb @@ -21,12 +21,21 @@
    - <%= f.label "Software Version" %> - <%= f.text_field :software_version, placeholder: "e.g. v1.0.0", class: "form-control" %> + + <%= f.text_field :repository_url, placeholder: "e.g. https://github.com/openjournals/joss", class: "form-control" %>
    +
    +
    + +
    +
    - - <%= f.text_field :repository_url, placeholder: "e.g. https://github.com/openjournals/joss", class: "form-control" %> + <%= f.label "Git branch containing the paper" %> + <%= f.text_field :git_branch, placeholder: "Leave blank if paper.md is in the default branch", class: "form-control" %> +
    +
    + <%= f.label "Software Version" %> + <%= f.text_field :software_version, placeholder: "e.g. v1.0.0", class: "form-control" %>
    diff --git a/app/views/shared/meta_view_body.text.erb b/app/views/shared/meta_view_body.text.erb index ef1da82af..a14b4f2d4 100644 --- a/app/views/shared/meta_view_body.text.erb +++ b/app/views/shared/meta_view_body.text.erb @@ -1,6 +1,6 @@ **Submitting author:** <%= paper.submitting_author.github_username %> (<%= link_to paper.submitting_author.name, paper.submitting_author.orcid_url %>) **Repository:** <%= paper.repository_url %> -**Branch with paper.md** (empty if default branch): +**Branch with paper.md** (empty if default branch): <%= paper.git_branch %> **Version:** <%= paper.software_version %> **Editor:** Pending **Reviewers:** Pending diff --git a/spec/controllers/papers_controller_spec.rb b/spec/controllers/papers_controller_spec.rb index 9a7e059bd..9911be0a5 100644 --- a/spec/controllers/papers_controller_spec.rb +++ b/spec/controllers/papers_controller_spec.rb @@ -104,10 +104,15 @@ allow(controller).to receive_message_chain(:current_user).and_return(user) paper_count = Paper.count - paper_params = {title: "Yeah whateva", body: "something", repository_url: "https://github.com/openjournals/joss", archive_doi: "https://doi.org/10.6084/m9.figshare.828487", software_version: "v1.0.1", submission_kind: "new", suggested_editor: "@editor"} + paper_params = {title: "Yeah whateva", body: "something", repository_url: "https://github.com/openjournals/joss", git_branch: "joss-paper", software_version: "v1.0.1", submission_kind: "new", suggested_editor: "@editor"} post :create, params: {paper: paper_params} expect(response).to be_redirect # as it's created the thing expect(Paper.count).to eq(paper_count + 1) + + paper = Paper.last + paper_params.each_pair do |k, v| + expect(paper.send(k)).to eq(v) + end end it "LOGGED IN without complete params responds with errors" do diff --git a/spec/views/papers/new.html.erb_spec.rb b/spec/views/papers/new.html.erb_spec.rb index dc4c7ac07..247fe58f5 100644 --- a/spec/views/papers/new.html.erb_spec.rb +++ b/spec/views/papers/new.html.erb_spec.rb @@ -25,7 +25,9 @@ assert_select "select#paper_kind[name=?]", "paper[kind]" assert_select "input#paper_title[name=?]", "paper[title]" assert_select "input#paper_repository_url[name=?]", "paper[repository_url]" + assert_select "input#paper_git_branch[name=?]", "paper[git_branch]" assert_select "input#paper_software_version[name=?]", "paper[software_version]" + assert_select "select#paper_submission_kind[name=?]", "paper[submission_kind]" assert_select "select#paper_suggested_editor[name=?]", "paper[suggested_editor]" assert_select "textarea#paper_body[name=?]", "paper[body]" assert_select "input#author-check" @@ -44,7 +46,9 @@ assert_select "select#paper_kind", false assert_select "input#paper_title[name=?]", "paper[title]" assert_select "input#paper_repository_url[name=?]", "paper[repository_url]" + assert_select "input#paper_git_branch[name=?]", "paper[git_branch]" assert_select "input#paper_software_version[name=?]", "paper[software_version]" + assert_select "select#paper_submission_kind[name=?]", "paper[submission_kind]" assert_select "select#paper_suggested_editor[name=?]", "paper[suggested_editor]" assert_select "textarea#paper_body[name=?]", "paper[body]" assert_select "input#author-check" From 041b5678a52cf5f4fcc2b82a54323a6d1f094d8a Mon Sep 17 00:00:00 2001 From: Matt Haberland Date: Sat, 5 Mar 2022 05:34:51 -0800 Subject: [PATCH 322/609] Capitalize footnotes, add country to affiliation In openjournals/joss-reviews#4159, it was recommended to capitalize footnotes and add country to affiliation. This commit makes these changes to the example submission. --- docs/submitting.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/submitting.md b/docs/submitting.md index 36fff41ca..66acd4dcd 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -103,19 +103,19 @@ tags: - galactic dynamics - milky way authors: - - name: Adrian M. Price-Whelan^[co-first author] # note this makes a footnote saying 'co-first author' + - name: Adrian M. Price-Whelan^[Co-first author] # note this makes a footnote saying 'Co-first author' orcid: 0000-0000-0000-0000 affiliation: "1, 2" # (Multiple affiliations must be quoted) - - name: Author Without ORCID^[co-first author] # note this makes a footnote saying 'co-first author' + - name: Author Without ORCID^[Co-first author] # note this makes a footnote saying 'Co-first author' affiliation: 2 - - name: Author with no affiliation^[corresponding author] + - name: Author with no affiliation^[Corresponding author] affiliation: 3 affiliations: - - name: Lyman Spitzer, Jr. Fellow, Princeton University + - name: Lyman Spitzer, Jr. Fellow, Princeton University, USA index: 1 - - name: Institution Name + - name: Institution Name, Country index: 2 - - name: Independent Researcher + - name: Independent Researcher, Country index: 3 date: 13 August 2017 bibliography: paper.bib From 88fe3d375a98858beef353ff2eac4dcdbf86520b Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 9 Mar 2022 13:35:12 +0000 Subject: [PATCH 323/609] One row for title and repo address --- app/views/papers/_form.html.erb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/views/papers/_form.html.erb b/app/views/papers/_form.html.erb index 605b1a796..9019b7e9d 100644 --- a/app/views/papers/_form.html.erb +++ b/app/views/papers/_form.html.erb @@ -15,11 +15,7 @@ <%= f.label :title %> <%= f.text_field :title, placeholder: "What's the title of this paper?", class: "form-control" %> - - -
    -
    <%= f.text_field :repository_url, placeholder: "e.g. https://github.com/openjournals/joss", class: "form-control" %> From a80e0f84ebc6ae1ae2044f7c9fd790abf0eaf571 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 11 Mar 2022 11:38:25 +0100 Subject: [PATCH 324/609] Update Rails version (secfix) --- Gemfile | 2 +- Gemfile.lock | 110 +++++++++++++++++++++++++-------------------------- 2 files changed, 56 insertions(+), 56 deletions(-) diff --git a/Gemfile b/Gemfile index 7e9b23534..3f51b1567 100644 --- a/Gemfile +++ b/Gemfile @@ -17,7 +17,7 @@ gem 'octokit', '~> 4.21' gem 'pdf-reader', '~> 2.4.2' gem 'pg', '~> 1.2.3' gem 'will_paginate', '~> 3.3.0' -gem 'rails', '6.1.4.6' +gem 'rails', '6.1.4.7' gem 'responders' gem 'newrelic_rpm' gem 'sanitize', '~> 6.0.0' diff --git a/Gemfile.lock b/Gemfile.lock index d864d361d..5f7b263ac 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,40 +4,40 @@ GEM Ascii85 (1.1.0) aasm (5.2.0) concurrent-ruby (~> 1.0) - actioncable (6.1.4.6) - actionpack (= 6.1.4.6) - activesupport (= 6.1.4.6) + actioncable (6.1.4.7) + actionpack (= 6.1.4.7) + activesupport (= 6.1.4.7) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.4.6) - actionpack (= 6.1.4.6) - activejob (= 6.1.4.6) - activerecord (= 6.1.4.6) - activestorage (= 6.1.4.6) - activesupport (= 6.1.4.6) + actionmailbox (6.1.4.7) + actionpack (= 6.1.4.7) + activejob (= 6.1.4.7) + activerecord (= 6.1.4.7) + activestorage (= 6.1.4.7) + activesupport (= 6.1.4.7) mail (>= 2.7.1) - actionmailer (6.1.4.6) - actionpack (= 6.1.4.6) - actionview (= 6.1.4.6) - activejob (= 6.1.4.6) - activesupport (= 6.1.4.6) + actionmailer (6.1.4.7) + actionpack (= 6.1.4.7) + actionview (= 6.1.4.7) + activejob (= 6.1.4.7) + activesupport (= 6.1.4.7) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.4.6) - actionview (= 6.1.4.6) - activesupport (= 6.1.4.6) + actionpack (6.1.4.7) + actionview (= 6.1.4.7) + activesupport (= 6.1.4.7) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.4.6) - actionpack (= 6.1.4.6) - activerecord (= 6.1.4.6) - activestorage (= 6.1.4.6) - activesupport (= 6.1.4.6) + actiontext (6.1.4.7) + actionpack (= 6.1.4.7) + activerecord (= 6.1.4.7) + activestorage (= 6.1.4.7) + activesupport (= 6.1.4.7) nokogiri (>= 1.8.5) - actionview (6.1.4.6) - activesupport (= 6.1.4.6) + actionview (6.1.4.7) + activesupport (= 6.1.4.7) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -45,22 +45,22 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (6.1.4.6) - activesupport (= 6.1.4.6) + activejob (6.1.4.7) + activesupport (= 6.1.4.7) globalid (>= 0.3.6) - activemodel (6.1.4.6) - activesupport (= 6.1.4.6) - activerecord (6.1.4.6) - activemodel (= 6.1.4.6) - activesupport (= 6.1.4.6) - activestorage (6.1.4.6) - actionpack (= 6.1.4.6) - activejob (= 6.1.4.6) - activerecord (= 6.1.4.6) - activesupport (= 6.1.4.6) + activemodel (6.1.4.7) + activesupport (= 6.1.4.7) + activerecord (6.1.4.7) + activemodel (= 6.1.4.7) + activesupport (= 6.1.4.7) + activestorage (6.1.4.7) + actionpack (= 6.1.4.7) + activejob (= 6.1.4.7) + activerecord (= 6.1.4.7) + activesupport (= 6.1.4.7) marcel (~> 1.0.0) mini_mime (>= 1.1.0) - activesupport (6.1.4.6) + activesupport (6.1.4.7) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -289,20 +289,20 @@ GEM rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.1.4.6) - actioncable (= 6.1.4.6) - actionmailbox (= 6.1.4.6) - actionmailer (= 6.1.4.6) - actionpack (= 6.1.4.6) - actiontext (= 6.1.4.6) - actionview (= 6.1.4.6) - activejob (= 6.1.4.6) - activemodel (= 6.1.4.6) - activerecord (= 6.1.4.6) - activestorage (= 6.1.4.6) - activesupport (= 6.1.4.6) + rails (6.1.4.7) + actioncable (= 6.1.4.7) + actionmailbox (= 6.1.4.7) + actionmailer (= 6.1.4.7) + actionpack (= 6.1.4.7) + actiontext (= 6.1.4.7) + actionview (= 6.1.4.7) + activejob (= 6.1.4.7) + activemodel (= 6.1.4.7) + activerecord (= 6.1.4.7) + activestorage (= 6.1.4.7) + activesupport (= 6.1.4.7) bundler (>= 1.15.0) - railties (= 6.1.4.6) + railties (= 6.1.4.7) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -313,9 +313,9 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.4.2) loofah (~> 2.3) - railties (6.1.4.6) - actionpack (= 6.1.4.6) - activesupport (= 6.1.4.6) + railties (6.1.4.7) + actionpack (= 6.1.4.7) + activesupport (= 6.1.4.7) method_source rake (>= 0.13) thor (~> 1.0) @@ -387,7 +387,7 @@ GEM spring (2.1.1) spring-commands-rspec (1.0.4) spring (>= 0.9.1) - sprockets (4.0.2) + sprockets (4.0.3) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.4.2) @@ -457,7 +457,7 @@ DEPENDENCIES pg (~> 1.2.3) pry-byebug rack-livereload - rails (= 6.1.4.6) + rails (= 6.1.4.7) rails-controller-testing (~> 1.0.5) responders rspec-rails (~> 5.0.0) From fd9f6ac79bcea0dfcc128538ad8160c959cfea33 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 13 Mar 2022 19:36:31 +0000 Subject: [PATCH 325/609] Send scope email on Monday --- lib/tasks/editorials.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/editorials.rake b/lib/tasks/editorials.rake index 80a899396..8eee38051 100644 --- a/lib/tasks/editorials.rake +++ b/lib/tasks/editorials.rake @@ -26,7 +26,7 @@ namespace :editorials do task send_query_scope_email: :environment do # We run this task daily on Heroku but only want the email # sent once per week (on a Monday) - if Time.now.sunday? + if Time.now.monday? reviews_repo = Rails.application.settings["reviews"] review_issues = ReviewIssue.download_review_issues(reviews_repo, 'query-scope') From 4e4b1aacc1108cc4b23aad95ec062ed579636863 Mon Sep 17 00:00:00 2001 From: Fabian Scheipl Date: Thu, 31 Mar 2022 09:42:06 +0200 Subject: [PATCH 326/609] update sample message to reviewers update for changes in editorialbot. --- docs/editing.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/editing.md b/docs/editing.md index 0bc9aca45..39e92b745 100644 --- a/docs/editing.md +++ b/docs/editing.md @@ -222,7 +222,13 @@ Many thanks! ``` 👋🏼 @authorname @reviewer1 @reviewer2 this is the review thread for the paper. All of our communications will happen here from now on. -Both reviewers have checklists at the top of this thread with the JOSS requirements. As you go over the submission, please check any items that you feel have been satisfied. There are also links to the JOSS reviewer guidelines. +As a reviewer, the first step is to create a checklist for your review by entering + +```@editorialbot generate my checklist``` + +as a comment in this thread. + +These checklists contain the JOSS requirements. As you go over the submission, please check any items that you feel have been satisfied. The first comment in this thread also contains links to the JOSS reviewer guidelines. The JOSS review is different from most other journals. Our goal is to work with the authors to help them meet our criteria instead of merely passing judgment on the submission. As such, the reviewers are encouraged to submit issues and pull requests on the software repository. When doing so, please mention `openjournals/joss-reviews#REVIEW_NUMBER` so that a link is created to this thread (and I can keep an eye on what is happening). Please also feel free to comment and ask questions on this thread. In my experience, it is better to post comments/questions/suggestions as you come across them instead of waiting until you've reviewed the entire package. From 5930b93b8555f09581e5b46c303e11a3bee9d5d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Sun, 17 Apr 2022 13:38:10 +0200 Subject: [PATCH 327/609] update nokogiri --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5f7b263ac..f04572a04 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -231,7 +231,7 @@ GEM nenv (0.3.0) newrelic_rpm (7.0.0) nio4r (2.5.8) - nokogiri (1.13.3) + nokogiri (1.13.4) mini_portile2 (~> 2.8.0) racc (~> 1.4) notiffany (0.1.3) From 4e6389432ece1d440eb656ba89f8396c4a9d8eff Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Tue, 19 Apr 2022 12:06:18 +0200 Subject: [PATCH 328/609] Link to paper source in docs The bit.ly link points to an outdated version that's missing important parts of a paper, e.g., the "statement of need". --- docs/submitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index 66acd4dcd..df4e026bc 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -83,7 +83,7 @@ Your paper should include: - Mention (if applicable) a representative set of past or ongoing research projects using the software and recent scholarly publications enabled by it. - Acknowledgement of any financial support. -As this short list shows, JOSS papers are only expected to contain a limited set of metadata (see example below), a Statement of Need, Summary, Acknowledgements, and References sections. You can look at an [example accepted paper](http://bit.ly/2x22gxT). Given this format, a "full length" paper is not permitted, and software documentation such as API (Application Programming Interface) functionality should not be in the paper and instead should be outlined in the software documentation. +As this short list shows, JOSS papers are only expected to contain a limited set of metadata (see example below), a Statement of Need, Summary, Acknowledgements, and References sections. You can look at an [example accepted paper](#example-paper-and-bibliography). Given this format, a "full length" paper is not permitted, and software documentation such as API (Application Programming Interface) functionality should not be in the paper and instead should be outlined in the software documentation. ```eval_rst .. important:: Your paper will be reviewed by two or more reviewers in a public GitHub issue. Take a look at the `review checklist `_ and `review criteria `_ to better understand how your submission will be reviewed. From 79f89b11b10837146fae028523a12763c99f4e99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 19 Apr 2022 12:11:19 +0200 Subject: [PATCH 329/609] update searchkick --- Gemfile | 1 + Gemfile.lock | 40 +++++++++++++++++++++++++--------------- 2 files changed, 26 insertions(+), 15 deletions(-) diff --git a/Gemfile b/Gemfile index 3f51b1567..f960a9e15 100644 --- a/Gemfile +++ b/Gemfile @@ -23,6 +23,7 @@ gem 'newrelic_rpm' gem 'sanitize', '~> 6.0.0' gem 'sass-rails', '~> 6.0.0' gem 'searchkick' +gem 'elasticsearch', '<7.14' gem 'uglifier', '4.2.0' gem 'coffee-rails', '~> 5.0.0' gem 'jbuilder', '~> 2.7' diff --git a/Gemfile.lock b/Gemfile.lock index f04572a04..dd7900019 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -100,19 +100,19 @@ GEM execjs coffee-script-source (1.12.2) commonmarker (0.23.4) - concurrent-ruby (1.1.9) + concurrent-ruby (1.1.10) crack (0.4.5) rexml crass (1.0.6) declarative (0.0.20) diff-lcs (1.4.4) dotenv (2.7.6) - elasticsearch (7.12.0) - elasticsearch-api (= 7.12.0) - elasticsearch-transport (= 7.12.0) - elasticsearch-api (7.12.0) + elasticsearch (7.13.3) + elasticsearch-api (= 7.13.3) + elasticsearch-transport (= 7.13.3) + elasticsearch-api (7.13.3) multi_json - elasticsearch-transport (7.12.0) + elasticsearch-transport (7.13.3) faraday (~> 1) multi_json em-websocket (0.5.2) @@ -126,19 +126,29 @@ GEM factory_bot_rails (6.1.0) factory_bot (~> 6.1.0) railties (>= 5.0.0) - faraday (1.4.2) + faraday (1.10.0) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0) + faraday-multipart (~> 1.0) faraday-net_http (~> 1.0) - faraday-net_http_persistent (~> 1.1) - multipart-post (>= 1.2, < 3) + faraday-net_http_persistent (~> 1.0) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) + faraday-retry (~> 1.0) ruby2_keywords (>= 0.0.4) faraday-em_http (1.0.0) faraday-em_synchrony (1.0.0) faraday-excon (1.1.0) + faraday-httpclient (1.0.1) + faraday-multipart (1.0.3) + multipart-post (>= 1.2, < 3) faraday-net_http (1.0.1) - faraday-net_http_persistent (1.1.0) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + faraday-retry (1.0.3) ffi (1.15.0) formatador (0.2.5) globalid (1.0.0) @@ -188,7 +198,7 @@ GEM multi_json (~> 1.8) hashdiff (1.0.1) hashery (2.1.2) - hashie (4.1.0) + hashie (5.0.0) honeybadger (4.7.3) html-pipeline (2.14.0) activesupport (>= 2) @@ -352,7 +362,7 @@ GEM rspec-support (~> 3.10) rspec-support (3.10.2) ruby-rc4 (0.1.5) - ruby2_keywords (0.0.4) + ruby2_keywords (0.0.5) ruby_dig (0.0.2) rubyzip (2.3.0) sanitize (6.0.0) @@ -371,9 +381,8 @@ GEM sawyer (0.8.2) addressable (>= 2.3.5) faraday (> 0.8, < 2.0) - searchkick (4.4.4) - activemodel (>= 5) - elasticsearch (>= 6) + searchkick (5.0.3) + activemodel (>= 5.2) hashie selenium-webdriver (3.142.7) childprocess (>= 0.5, < 4.0) @@ -438,6 +447,7 @@ DEPENDENCIES coffee-rails (~> 5.0.0) commonmarker (~> 0.23.4) dotenv (~> 2.7.6) + elasticsearch (< 7.14) factory_bot_rails (~> 6.1.0) google_drive groupdate From b6c81eb9d1dec2ce066becca942c790ee371e494 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 19 Apr 2022 12:40:02 +0200 Subject: [PATCH 330/609] Update editor in papers under review --- app/controllers/dispatch_controller.rb | 1 + spec/controllers/dispatch_controller_spec.rb | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/app/controllers/dispatch_controller.rb b/app/controllers/dispatch_controller.rb index 968c8e541..72d62c59f 100644 --- a/app/controllers/dispatch_controller.rb +++ b/app/controllers/dispatch_controller.rb @@ -27,6 +27,7 @@ def github_receiver def api_assign_editor if params[:secret] == ENV['BOT_SECRET'] paper = Paper.find_by_meta_review_issue_id(params[:id]) + paper = Paper.find_by_review_issue_id(params[:id]) if paper.nil? editor_params = params[:editor].gsub(/^\@/, "") editor = Editor.find_by_login(editor_params) return head :unprocessable_entity unless paper && editor diff --git a/spec/controllers/dispatch_controller_spec.rb b/spec/controllers/dispatch_controller_spec.rb index 04b30ec5c..2658f16e1 100644 --- a/spec/controllers/dispatch_controller_spec.rb +++ b/spec/controllers/dispatch_controller_spec.rb @@ -268,6 +268,19 @@ def headers(event, payload) expect(paper.reload.editor).to eql(editor) end + it "with the correct API key and valid editor finding paper by review_issue" do + editor = create(:editor, login: "jimmy") + paper = create(:under_review_paper, state: "under_review", review_issue_id: 1234) + + post :api_assign_editor, params: {secret: "mooo", + id: 1234, + editor: "jimmy" + } + + expect(response).to be_successful + expect(paper.reload.editor).to eql(editor) + end + it "with the correct API key and invalid editor" do editor = create(:editor, login: "jimmy") paper = create(:review_pending_paper, state: "review_pending", meta_review_issue_id: 1234) From ccbb9772eec33bcf13ae6a8b60c52557d9b963d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 20 Apr 2022 11:09:58 +0200 Subject: [PATCH 331/609] Rails 6.1.5 --- Gemfile | 2 +- Gemfile.lock | 114 +++++++++++++++++++++++++-------------------------- 2 files changed, 58 insertions(+), 58 deletions(-) diff --git a/Gemfile b/Gemfile index f960a9e15..28d228e66 100644 --- a/Gemfile +++ b/Gemfile @@ -17,7 +17,7 @@ gem 'octokit', '~> 4.21' gem 'pdf-reader', '~> 2.4.2' gem 'pg', '~> 1.2.3' gem 'will_paginate', '~> 3.3.0' -gem 'rails', '6.1.4.7' +gem 'rails', '6.1.5' gem 'responders' gem 'newrelic_rpm' gem 'sanitize', '~> 6.0.0' diff --git a/Gemfile.lock b/Gemfile.lock index dd7900019..d0ea51236 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,40 +4,40 @@ GEM Ascii85 (1.1.0) aasm (5.2.0) concurrent-ruby (~> 1.0) - actioncable (6.1.4.7) - actionpack (= 6.1.4.7) - activesupport (= 6.1.4.7) + actioncable (6.1.5) + actionpack (= 6.1.5) + activesupport (= 6.1.5) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.4.7) - actionpack (= 6.1.4.7) - activejob (= 6.1.4.7) - activerecord (= 6.1.4.7) - activestorage (= 6.1.4.7) - activesupport (= 6.1.4.7) + actionmailbox (6.1.5) + actionpack (= 6.1.5) + activejob (= 6.1.5) + activerecord (= 6.1.5) + activestorage (= 6.1.5) + activesupport (= 6.1.5) mail (>= 2.7.1) - actionmailer (6.1.4.7) - actionpack (= 6.1.4.7) - actionview (= 6.1.4.7) - activejob (= 6.1.4.7) - activesupport (= 6.1.4.7) + actionmailer (6.1.5) + actionpack (= 6.1.5) + actionview (= 6.1.5) + activejob (= 6.1.5) + activesupport (= 6.1.5) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.4.7) - actionview (= 6.1.4.7) - activesupport (= 6.1.4.7) + actionpack (6.1.5) + actionview (= 6.1.5) + activesupport (= 6.1.5) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.4.7) - actionpack (= 6.1.4.7) - activerecord (= 6.1.4.7) - activestorage (= 6.1.4.7) - activesupport (= 6.1.4.7) + actiontext (6.1.5) + actionpack (= 6.1.5) + activerecord (= 6.1.5) + activestorage (= 6.1.5) + activesupport (= 6.1.5) nokogiri (>= 1.8.5) - actionview (6.1.4.7) - activesupport (= 6.1.4.7) + actionview (6.1.5) + activesupport (= 6.1.5) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -45,22 +45,22 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (6.1.4.7) - activesupport (= 6.1.4.7) + activejob (6.1.5) + activesupport (= 6.1.5) globalid (>= 0.3.6) - activemodel (6.1.4.7) - activesupport (= 6.1.4.7) - activerecord (6.1.4.7) - activemodel (= 6.1.4.7) - activesupport (= 6.1.4.7) - activestorage (6.1.4.7) - actionpack (= 6.1.4.7) - activejob (= 6.1.4.7) - activerecord (= 6.1.4.7) - activesupport (= 6.1.4.7) - marcel (~> 1.0.0) + activemodel (6.1.5) + activesupport (= 6.1.5) + activerecord (6.1.5) + activemodel (= 6.1.5) + activesupport (= 6.1.5) + activestorage (6.1.5) + actionpack (= 6.1.5) + activejob (= 6.1.5) + activerecord (= 6.1.5) + activesupport (= 6.1.5) + marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (6.1.4.7) + activesupport (6.1.5) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -221,7 +221,7 @@ GEM listen (3.5.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.14.0) + loofah (2.16.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) lumberjack (1.2.8) @@ -299,20 +299,20 @@ GEM rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.1.4.7) - actioncable (= 6.1.4.7) - actionmailbox (= 6.1.4.7) - actionmailer (= 6.1.4.7) - actionpack (= 6.1.4.7) - actiontext (= 6.1.4.7) - actionview (= 6.1.4.7) - activejob (= 6.1.4.7) - activemodel (= 6.1.4.7) - activerecord (= 6.1.4.7) - activestorage (= 6.1.4.7) - activesupport (= 6.1.4.7) + rails (6.1.5) + actioncable (= 6.1.5) + actionmailbox (= 6.1.5) + actionmailer (= 6.1.5) + actionpack (= 6.1.5) + actiontext (= 6.1.5) + actionview (= 6.1.5) + activejob (= 6.1.5) + activemodel (= 6.1.5) + activerecord (= 6.1.5) + activestorage (= 6.1.5) + activesupport (= 6.1.5) bundler (>= 1.15.0) - railties (= 6.1.4.7) + railties (= 6.1.5) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -323,11 +323,11 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.4.2) loofah (~> 2.3) - railties (6.1.4.7) - actionpack (= 6.1.4.7) - activesupport (= 6.1.4.7) + railties (6.1.5) + actionpack (= 6.1.5) + activesupport (= 6.1.5) method_source - rake (>= 0.13) + rake (>= 12.2) thor (~> 1.0) raindrops (0.19.1) rake (13.0.6) @@ -467,7 +467,7 @@ DEPENDENCIES pg (~> 1.2.3) pry-byebug rack-livereload - rails (= 6.1.4.7) + rails (= 6.1.5) rails-controller-testing (~> 1.0.5) responders rspec-rails (~> 5.0.0) From acff2622a479986a7cbdd4c8486c401926b33708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 20 Apr 2022 11:12:00 +0200 Subject: [PATCH 332/609] Update docs/editing.md Co-authored-by: Daniel S. Katz --- docs/editing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/editing.md b/docs/editing.md index 39e92b745..aa720bcf1 100644 --- a/docs/editing.md +++ b/docs/editing.md @@ -226,7 +226,7 @@ As a reviewer, the first step is to create a checklist for your review by enteri ```@editorialbot generate my checklist``` -as a comment in this thread. +as the top of a new comment in this thread. These checklists contain the JOSS requirements. As you go over the submission, please check any items that you feel have been satisfied. The first comment in this thread also contains links to the JOSS reviewer guidelines. From fd8fac907ea5ce3c199b412060b61ded1dd142e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 27 Apr 2022 10:44:43 +0200 Subject: [PATCH 333/609] Update Rails version (security release 6.1.5.1) --- Gemfile | 2 +- Gemfile.lock | 108 +++++++++++++++++++++++++-------------------------- 2 files changed, 55 insertions(+), 55 deletions(-) diff --git a/Gemfile b/Gemfile index 28d228e66..0f8bbcb74 100644 --- a/Gemfile +++ b/Gemfile @@ -17,7 +17,7 @@ gem 'octokit', '~> 4.21' gem 'pdf-reader', '~> 2.4.2' gem 'pg', '~> 1.2.3' gem 'will_paginate', '~> 3.3.0' -gem 'rails', '6.1.5' +gem 'rails', '6.1.5.1' gem 'responders' gem 'newrelic_rpm' gem 'sanitize', '~> 6.0.0' diff --git a/Gemfile.lock b/Gemfile.lock index d0ea51236..32001558c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,40 +4,40 @@ GEM Ascii85 (1.1.0) aasm (5.2.0) concurrent-ruby (~> 1.0) - actioncable (6.1.5) - actionpack (= 6.1.5) - activesupport (= 6.1.5) + actioncable (6.1.5.1) + actionpack (= 6.1.5.1) + activesupport (= 6.1.5.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.5) - actionpack (= 6.1.5) - activejob (= 6.1.5) - activerecord (= 6.1.5) - activestorage (= 6.1.5) - activesupport (= 6.1.5) + actionmailbox (6.1.5.1) + actionpack (= 6.1.5.1) + activejob (= 6.1.5.1) + activerecord (= 6.1.5.1) + activestorage (= 6.1.5.1) + activesupport (= 6.1.5.1) mail (>= 2.7.1) - actionmailer (6.1.5) - actionpack (= 6.1.5) - actionview (= 6.1.5) - activejob (= 6.1.5) - activesupport (= 6.1.5) + actionmailer (6.1.5.1) + actionpack (= 6.1.5.1) + actionview (= 6.1.5.1) + activejob (= 6.1.5.1) + activesupport (= 6.1.5.1) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.5) - actionview (= 6.1.5) - activesupport (= 6.1.5) + actionpack (6.1.5.1) + actionview (= 6.1.5.1) + activesupport (= 6.1.5.1) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.5) - actionpack (= 6.1.5) - activerecord (= 6.1.5) - activestorage (= 6.1.5) - activesupport (= 6.1.5) + actiontext (6.1.5.1) + actionpack (= 6.1.5.1) + activerecord (= 6.1.5.1) + activestorage (= 6.1.5.1) + activesupport (= 6.1.5.1) nokogiri (>= 1.8.5) - actionview (6.1.5) - activesupport (= 6.1.5) + actionview (6.1.5.1) + activesupport (= 6.1.5.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -45,22 +45,22 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (6.1.5) - activesupport (= 6.1.5) + activejob (6.1.5.1) + activesupport (= 6.1.5.1) globalid (>= 0.3.6) - activemodel (6.1.5) - activesupport (= 6.1.5) - activerecord (6.1.5) - activemodel (= 6.1.5) - activesupport (= 6.1.5) - activestorage (6.1.5) - actionpack (= 6.1.5) - activejob (= 6.1.5) - activerecord (= 6.1.5) - activesupport (= 6.1.5) + activemodel (6.1.5.1) + activesupport (= 6.1.5.1) + activerecord (6.1.5.1) + activemodel (= 6.1.5.1) + activesupport (= 6.1.5.1) + activestorage (6.1.5.1) + actionpack (= 6.1.5.1) + activejob (= 6.1.5.1) + activerecord (= 6.1.5.1) + activesupport (= 6.1.5.1) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (6.1.5) + activesupport (6.1.5.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -299,20 +299,20 @@ GEM rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.1.5) - actioncable (= 6.1.5) - actionmailbox (= 6.1.5) - actionmailer (= 6.1.5) - actionpack (= 6.1.5) - actiontext (= 6.1.5) - actionview (= 6.1.5) - activejob (= 6.1.5) - activemodel (= 6.1.5) - activerecord (= 6.1.5) - activestorage (= 6.1.5) - activesupport (= 6.1.5) + rails (6.1.5.1) + actioncable (= 6.1.5.1) + actionmailbox (= 6.1.5.1) + actionmailer (= 6.1.5.1) + actionpack (= 6.1.5.1) + actiontext (= 6.1.5.1) + actionview (= 6.1.5.1) + activejob (= 6.1.5.1) + activemodel (= 6.1.5.1) + activerecord (= 6.1.5.1) + activestorage (= 6.1.5.1) + activesupport (= 6.1.5.1) bundler (>= 1.15.0) - railties (= 6.1.5) + railties (= 6.1.5.1) sprockets-rails (>= 2.0.0) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) @@ -323,9 +323,9 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.4.2) loofah (~> 2.3) - railties (6.1.5) - actionpack (= 6.1.5) - activesupport (= 6.1.5) + railties (6.1.5.1) + actionpack (= 6.1.5.1) + activesupport (= 6.1.5.1) method_source rake (>= 12.2) thor (~> 1.0) @@ -467,7 +467,7 @@ DEPENDENCIES pg (~> 1.2.3) pry-byebug rack-livereload - rails (= 6.1.5) + rails (= 6.1.5.1) rails-controller-testing (~> 1.0.5) responders rspec-rails (~> 5.0.0) From 6c87ba9a299678dc27b820d73ba1e5b9956168b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 20 Apr 2022 12:29:36 +0200 Subject: [PATCH 334/609] Update Gemfile with Rails 7.0.2.3 --- Gemfile | 2 +- Gemfile.lock | 137 ++++++++++++++++++++++++++++++--------------------- 2 files changed, 81 insertions(+), 58 deletions(-) diff --git a/Gemfile b/Gemfile index 0f8bbcb74..5cb6d16b7 100644 --- a/Gemfile +++ b/Gemfile @@ -17,7 +17,7 @@ gem 'octokit', '~> 4.21' gem 'pdf-reader', '~> 2.4.2' gem 'pg', '~> 1.2.3' gem 'will_paginate', '~> 3.3.0' -gem 'rails', '6.1.5.1' +gem 'rails', '7.0.2.3' gem 'responders' gem 'newrelic_rpm' gem 'sanitize', '~> 6.0.0' diff --git a/Gemfile.lock b/Gemfile.lock index 32001558c..c6187ec12 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,40 +4,47 @@ GEM Ascii85 (1.1.0) aasm (5.2.0) concurrent-ruby (~> 1.0) - actioncable (6.1.5.1) - actionpack (= 6.1.5.1) - activesupport (= 6.1.5.1) + actioncable (7.0.2.3) + actionpack (= 7.0.2.3) + activesupport (= 7.0.2.3) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.5.1) - actionpack (= 6.1.5.1) - activejob (= 6.1.5.1) - activerecord (= 6.1.5.1) - activestorage (= 6.1.5.1) - activesupport (= 6.1.5.1) + actionmailbox (7.0.2.3) + actionpack (= 7.0.2.3) + activejob (= 7.0.2.3) + activerecord (= 7.0.2.3) + activestorage (= 7.0.2.3) + activesupport (= 7.0.2.3) mail (>= 2.7.1) - actionmailer (6.1.5.1) - actionpack (= 6.1.5.1) - actionview (= 6.1.5.1) - activejob (= 6.1.5.1) - activesupport (= 6.1.5.1) + net-imap + net-pop + net-smtp + actionmailer (7.0.2.3) + actionpack (= 7.0.2.3) + actionview (= 7.0.2.3) + activejob (= 7.0.2.3) + activesupport (= 7.0.2.3) mail (~> 2.5, >= 2.5.4) + net-imap + net-pop + net-smtp rails-dom-testing (~> 2.0) - actionpack (6.1.5.1) - actionview (= 6.1.5.1) - activesupport (= 6.1.5.1) - rack (~> 2.0, >= 2.0.9) + actionpack (7.0.2.3) + actionview (= 7.0.2.3) + activesupport (= 7.0.2.3) + rack (~> 2.0, >= 2.2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.5.1) - actionpack (= 6.1.5.1) - activerecord (= 6.1.5.1) - activestorage (= 6.1.5.1) - activesupport (= 6.1.5.1) + actiontext (7.0.2.3) + actionpack (= 7.0.2.3) + activerecord (= 7.0.2.3) + activestorage (= 7.0.2.3) + activesupport (= 7.0.2.3) + globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (6.1.5.1) - activesupport (= 6.1.5.1) + actionview (7.0.2.3) + activesupport (= 7.0.2.3) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -45,27 +52,26 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (6.1.5.1) - activesupport (= 6.1.5.1) + activejob (7.0.2.3) + activesupport (= 7.0.2.3) globalid (>= 0.3.6) - activemodel (6.1.5.1) - activesupport (= 6.1.5.1) - activerecord (6.1.5.1) - activemodel (= 6.1.5.1) - activesupport (= 6.1.5.1) - activestorage (6.1.5.1) - actionpack (= 6.1.5.1) - activejob (= 6.1.5.1) - activerecord (= 6.1.5.1) - activesupport (= 6.1.5.1) + activemodel (7.0.2.3) + activesupport (= 7.0.2.3) + activerecord (7.0.2.3) + activemodel (= 7.0.2.3) + activesupport (= 7.0.2.3) + activestorage (7.0.2.3) + actionpack (= 7.0.2.3) + activejob (= 7.0.2.3) + activerecord (= 7.0.2.3) + activesupport (= 7.0.2.3) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (6.1.5.1) + activesupport (7.0.2.3) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - zeitwerk (~> 2.3) addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) afm (0.2.2) @@ -106,6 +112,7 @@ GEM crass (1.0.6) declarative (0.0.20) diff-lcs (1.4.4) + digest (3.1.0) dotenv (2.7.6) elasticsearch (7.13.3) elasticsearch-api (= 7.13.3) @@ -239,6 +246,20 @@ GEM multi_xml (0.6.0) multipart-post (2.1.1) nenv (0.3.0) + net-imap (0.2.3) + digest + net-protocol + strscan + net-pop (0.1.1) + digest + net-protocol + timeout + net-protocol (0.1.3) + timeout + net-smtp (0.3.1) + digest + net-protocol + timeout newrelic_rpm (7.0.0) nio4r (2.5.8) nokogiri (1.13.4) @@ -299,21 +320,20 @@ GEM rack rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.1.5.1) - actioncable (= 6.1.5.1) - actionmailbox (= 6.1.5.1) - actionmailer (= 6.1.5.1) - actionpack (= 6.1.5.1) - actiontext (= 6.1.5.1) - actionview (= 6.1.5.1) - activejob (= 6.1.5.1) - activemodel (= 6.1.5.1) - activerecord (= 6.1.5.1) - activestorage (= 6.1.5.1) - activesupport (= 6.1.5.1) + rails (7.0.2.3) + actioncable (= 7.0.2.3) + actionmailbox (= 7.0.2.3) + actionmailer (= 7.0.2.3) + actionpack (= 7.0.2.3) + actiontext (= 7.0.2.3) + actionview (= 7.0.2.3) + activejob (= 7.0.2.3) + activemodel (= 7.0.2.3) + activerecord (= 7.0.2.3) + activestorage (= 7.0.2.3) + activesupport (= 7.0.2.3) bundler (>= 1.15.0) - railties (= 6.1.5.1) - sprockets-rails (>= 2.0.0) + railties (= 7.0.2.3) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -323,12 +343,13 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.4.2) loofah (~> 2.3) - railties (6.1.5.1) - actionpack (= 6.1.5.1) - activesupport (= 6.1.5.1) + railties (7.0.2.3) + actionpack (= 7.0.2.3) + activesupport (= 7.0.2.3) method_source rake (>= 12.2) thor (~> 1.0) + zeitwerk (~> 2.5) raindrops (0.19.1) rake (13.0.6) rb-fsevent (0.10.4) @@ -403,8 +424,10 @@ GEM actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) + strscan (3.0.1) thor (1.2.1) tilt (2.0.10) + timeout (0.2.0) trailblazer-option (0.1.1) ttfunk (1.7.0) tzinfo (2.0.4) @@ -467,7 +490,7 @@ DEPENDENCIES pg (~> 1.2.3) pry-byebug rack-livereload - rails (= 6.1.5.1) + rails (= 7.0.2.3) rails-controller-testing (~> 1.0.5) responders rspec-rails (~> 5.0.0) From 791c2381f1ef6502963c31c69f815098d373767b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 20 Apr 2022 12:29:47 +0200 Subject: [PATCH 335/609] Update Spring --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index c6187ec12..12d0d5439 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -414,7 +414,7 @@ GEM faraday (>= 0.17.3, < 2.0) jwt (>= 1.5, < 3.0) multi_json (~> 1.10) - spring (2.1.1) + spring (4.0.0) spring-commands-rspec (1.0.4) spring (>= 0.9.1) sprockets (4.0.3) From e9cef48862182239ca95ec1736f33dc737882bcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 20 Apr 2022 13:38:02 +0200 Subject: [PATCH 336/609] Update Rails config files --- Gemfile | 1 + Gemfile.lock | 1 + bin/rails | 2 +- bin/setup | 18 +-- config/application.rb | 16 ++- config/boot.rb | 2 +- config/environments/development.rb | 18 +-- config/environments/production.rb | 50 ++------ config/environments/test.rb | 14 ++- config/initializers/assets.rb | 3 +- .../initializers/content_security_policy.rb | 40 +++--- .../initializers/filter_parameter_logging.rb | 6 +- config/initializers/inflections.rb | 8 +- .../new_framework_defaults_7_0.rb | 117 ++++++++++++++++++ db/schema.rb | 2 +- 15 files changed, 195 insertions(+), 103 deletions(-) create mode 100644 config/initializers/new_framework_defaults_7_0.rb diff --git a/Gemfile b/Gemfile index 5cb6d16b7..ba3c16492 100644 --- a/Gemfile +++ b/Gemfile @@ -33,6 +33,7 @@ gem 'active_link_to' # Use Bootstrap for the front-end gem 'bootstrap', '~> 4.3.1' +gem 'sprockets-rails' # Use jquery as the JavaScript library diff --git a/Gemfile.lock b/Gemfile.lock index 12d0d5439..e20a463a4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -500,6 +500,7 @@ DEPENDENCIES selenium-webdriver spring spring-commands-rspec + sprockets-rails uglifier (= 4.2.0) unicorn (~> 5.8.0) vcr (~> 6.0, >= 6.0.0) diff --git a/bin/rails b/bin/rails index 6fb4e4051..efc037749 100755 --- a/bin/rails +++ b/bin/rails @@ -1,4 +1,4 @@ #!/usr/bin/env ruby -APP_PATH = File.expand_path('../config/application', __dir__) +APP_PATH = File.expand_path("../config/application", __dir__) require_relative "../config/boot" require "rails/commands" diff --git a/bin/setup b/bin/setup index 57923026c..ec47b79b3 100755 --- a/bin/setup +++ b/bin/setup @@ -2,7 +2,7 @@ require "fileutils" # path to your application root. -APP_ROOT = File.expand_path('..', __dir__) +APP_ROOT = File.expand_path("..", __dir__) def system!(*args) system(*args) || abort("\n== Command #{args} failed ==") @@ -13,21 +13,21 @@ FileUtils.chdir APP_ROOT do # This script is idempotent, so that you can run it at any time and get an expectable outcome. # Add necessary setup steps to this file. - puts '== Installing dependencies ==' - system! 'gem install bundler --conservative' - system('bundle check') || system!('bundle install') + puts "== Installing dependencies ==" + system! "gem install bundler --conservative" + system("bundle check") || system!("bundle install") # puts "\n== Copying sample files ==" - # unless File.exist?('config/database.yml') - # FileUtils.cp 'config/database.yml.sample', 'config/database.yml' + # unless File.exist?("config/database.yml") + # FileUtils.cp "config/database.yml.sample", "config/database.yml" # end puts "\n== Preparing database ==" - system! 'bin/rails db:prepare' + system! "bin/rails db:prepare" puts "\n== Removing old logs and tempfiles ==" - system! 'bin/rails log:clear tmp:clear' + system! "bin/rails log:clear tmp:clear" puts "\n== Restarting application server ==" - system! 'bin/rails restart' + system! "bin/rails restart" end diff --git a/config/application.rb b/config/application.rb index 4a3f8a3fd..5a4ab2054 100644 --- a/config/application.rb +++ b/config/application.rb @@ -1,6 +1,6 @@ -require_relative 'boot' +require_relative "boot" -require 'rails/all' +require "rails/all" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. @@ -11,10 +11,10 @@ class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. config.load_defaults 6.1 - # Settings in config/environments/* take precedence over those specified here. - # Application configuration can go into files in config/initializers - # -- all .rb files in that directory are automatically loaded after loading - # the framework and any gems in your application. + # Configuration for the application, engines, and railties goes here. + # + # These settings can be overridden in specific environments using the files + # in config/environments, which are processed later. attr_accessor :settings self.settings = YAML.load_file(Rails.root.join("config/settings-#{Rails.env}.yml")).with_indifferent_access @@ -25,5 +25,9 @@ class Application < Rails::Application config.eager_load_paths += [ "#{config.root}/lib" ] + + # + # config.time_zone = "Central Time (US & Canada)" + # config.eager_load_paths << Rails.root.join("extras") end end diff --git a/config/boot.rb b/config/boot.rb index 3cda23b4d..988a5ddc4 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -1,4 +1,4 @@ -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) require "bundler/setup" # Set up gems listed in the Gemfile. require "bootsnap/setup" # Speed up boot time by caching expensive operations. diff --git a/config/environments/development.rb b/config/environments/development.rb index 6daea8244..a8bf03e5f 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -14,15 +14,18 @@ # Show full error reports. config.consider_all_requests_local = true + # Enable server timing + config.server_timing = true + # Enable/disable caching. By default caching is disabled. # Run rails dev:cache to toggle caching. - if Rails.root.join('tmp', 'caching-dev.txt').exist? + if Rails.root.join("tmp/caching-dev.txt").exist? config.action_controller.perform_caching = true config.action_controller.enable_fragment_cache_logging = true config.cache_store = :memory_store config.public_file_server.headers = { - 'Cache-Control' => "public, max-age=#{2.days.to_i}" + "Cache-Control" => "public, max-age=#{2.days.to_i}" } else config.action_controller.perform_caching = false @@ -35,10 +38,10 @@ # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false - config.action_mailer.default_url_options = { host: "localhost", port: 3000 } # Don't send emails in development config.action_mailer.perform_deliveries = false + config.action_mailer.default_url_options = { host: "localhost", port: 3000 } config.action_mailer.perform_caching = false @@ -57,11 +60,6 @@ # Highlight code that triggered database queries in logs. config.active_record.verbose_query_logs = true - # Debug mode disables concatenation and preprocessing of assets. - # This option may cause significant delays in view rendering with a large - # number of complex assets. - config.assets.debug = true - # Suppress logger output for asset requests. config.assets.quiet = true @@ -71,10 +69,6 @@ # Annotate rendered view with file names. # config.action_view.annotate_rendered_view_with_filenames = true - # Use an evented file watcher to asynchronously detect changes in source code, - # routes, locales, etc. This feature depends on the listen gem. - config.file_watcher = ActiveSupport::EventedFileUpdateChecker - # Uncomment if you wish to allow Action Cable access from any origin. # config.action_cable.disable_request_forgery_protection = true end diff --git a/config/environments/production.rb b/config/environments/production.rb index 358f939c5..6f6f07faf 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -22,7 +22,7 @@ # Disable serving static files from the `/public` folder by default since # Apache or NGINX already handles this. - config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? + config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? # Compress CSS using a preprocessor. # config.assets.css_compressor = :sass @@ -31,26 +31,26 @@ config.assets.compile = false # Enable serving of images, stylesheets, and JavaScripts from an asset server. - # config.asset_host = 'http://assets.example.com' + # config.asset_host = "http://assets.example.com" # Specifies the header that your server uses for sending files. - # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache - # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX + # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache + # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX # Store uploaded files on the local file system (see config/storage.yml for options). config.active_storage.service = :local # Mount Action Cable outside main process or domain. # config.action_cable.mount_path = nil - # config.action_cable.url = 'wss://example.com/cable' - # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] + # config.action_cable.url = "wss://example.com/cable" + # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ] # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. config.force_ssl = true # Include generic and useful information about system operation, but avoid logging too much # information to avoid inadvertent exposure of personally identifiable information (PII). - config.log_level = :debug + config.log_level = :info # Prepend all log lines with the following tags. config.log_tags = [ :request_id ] @@ -65,9 +65,6 @@ config.action_mailer.perform_caching = false - config.action_mailer.default_url_options = { :host => "https://joss.theoj.org" } - - # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. # config.action_mailer.raise_delivery_errors = false @@ -76,21 +73,15 @@ # the I18n.default_locale when a translation cannot be found). config.i18n.fallbacks = true - # Send deprecation notices to registered listeners. - config.active_support.deprecation = :notify - - # Log disallowed deprecations. - config.active_support.disallowed_deprecation = :log - - # Tell Active Support which deprecation messages to disallow. - config.active_support.disallowed_deprecation_warnings = [] + # Don't log any deprecations. + config.active_support.report_deprecations = false # Use default logging formatter so that PID and timestamp are not suppressed. config.log_formatter = ::Logger::Formatter.new # Use a different logger for distributed setups. # require "syslog/logger" - # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') + # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new "app-name") if ENV["RAILS_LOG_TO_STDOUT"].present? logger = ActiveSupport::Logger.new(STDOUT) @@ -101,26 +92,7 @@ # Do not dump schema after migrations. config.active_record.dump_schema_after_migration = false - # Inserts middleware to perform automatic connection switching. - # The `database_selector` hash is used to pass options to the DatabaseSelector - # middleware. The `delay` is used to determine how long to wait after a write - # to send a subsequent read to the primary. - # - # The `database_resolver` class is used by the middleware to determine which - # database is appropriate to use based on the time delay. - # - # The `database_resolver_context` class is used by the middleware to set - # timestamps for the last write to the primary. The resolver uses the context - # class timestamps to determine how long to wait before reading from the - # replica. - # - # By default Rails will store a last write timestamp in the session. The - # DatabaseSelector middleware is designed as such you can define your own - # strategy for connection switching and pass that into the middleware through - # these configuration options. - # config.active_record.database_selector = { delay: 2.seconds } - # config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver - # config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session + config.action_mailer.default_url_options = { :host => "https://joss.theoj.org" } config.action_mailer.smtp_settings = { user_name: 'apikey', diff --git a/config/environments/test.rb b/config/environments/test.rb index 0b4bcdc40..db5992264 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -8,17 +8,19 @@ Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. - config.cache_classes = true + # Turn false under Spring and add config.action_view.cache_template_loading = true. + config.cache_classes = false + config.action_view.cache_template_loading = true - # Do not eager load code on boot. This avoids loading your whole application - # just for the purpose of running a single test. If you are using a tool that - # preloads Rails for running tests, you may have to set it to true. - config.eager_load = false + # Eager loading loads your whole application. When running a single test locally, + # this probably isn't necessary. It's a good idea to do in a continuous integration + # system, or in some way before deploying your code. + config.eager_load = ENV["CI"].present? # Configure public file server for tests with Cache-Control for performance. config.public_file_server.enabled = true config.public_file_server.headers = { - 'Cache-Control' => "public, max-age=#{1.hour.to_i}" + "Cache-Control" => "public, max-age=#{1.hour.to_i}" } # Show full error reports and disable caching. diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 2efd2d715..b0020f689 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -1,9 +1,10 @@ # Be sure to restart your server when you modify this file. # Version of your assets, change this if you want to expire all your assets. -Rails.application.config.assets.version = '1.0' +Rails.application.config.assets.version = "1.0" # Add additional assets to the asset load path. +# Rails.application.config.assets.paths << Emoji.images_path Rails.application.config.assets.paths << Rails.root.join("vendor", "assets", "bower_components") # Precompile additional assets. diff --git a/config/initializers/content_security_policy.rb b/config/initializers/content_security_policy.rb index 41c43016f..3621f97f8 100644 --- a/config/initializers/content_security_policy.rb +++ b/config/initializers/content_security_policy.rb @@ -4,25 +4,23 @@ # For further information see the following documentation # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy -# Rails.application.config.content_security_policy do |policy| -# policy.default_src :self, :https -# policy.font_src :self, :https, :data -# policy.img_src :self, :https, :data -# policy.object_src :none -# policy.script_src :self, :https -# policy.style_src :self, :https - -# # Specify URI for violation reports -# # policy.report_uri "/csp-violation-report-endpoint" +# Rails.application.configure do +# config.content_security_policy do |policy| +# policy.default_src :self, :https +# policy.font_src :self, :https, :data +# policy.img_src :self, :https, :data +# policy.object_src :none +# policy.script_src :self, :https +# policy.style_src :self, :https +# # Specify URI for violation reports +# # policy.report_uri "/csp-violation-report-endpoint" +# end +# +# # Generate session nonces for permitted importmap and inline scripts +# config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s } +# config.content_security_policy_nonce_directives = %w(script-src) +# +# # Report CSP violations to a specified URI. See: +# # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only +# # config.content_security_policy_report_only = true # end - -# If you are using UJS then enable automatic nonce generation -# Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) } - -# Set the nonce only to specific directives -# Rails.application.config.content_security_policy_nonce_directives = %w(script-src) - -# Report CSP violations to a specified URI -# For further information see the following documentation: -# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only -# Rails.application.config.content_security_policy_report_only = true diff --git a/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb index 2899da4ec..adc6568ce 100644 --- a/config/initializers/filter_parameter_logging.rb +++ b/config/initializers/filter_parameter_logging.rb @@ -1,6 +1,8 @@ # Be sure to restart your server when you modify this file. -# Configure sensitive parameters which will be filtered from the log file. +# Configure parameters to be filtered from the log file. Use this to limit dissemination of +# sensitive information. See the ActiveSupport::ParameterFilter documentation for supported +# notations and behaviors. Rails.application.config.filter_parameters += [ - :password, :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn + :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn ] diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb index ac033bf9d..3860f659e 100644 --- a/config/initializers/inflections.rb +++ b/config/initializers/inflections.rb @@ -4,13 +4,13 @@ # are locale specific, and you may define rules for as many different # locales as you wish. All of these examples are active by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.plural /^(ox)$/i, '\1en' -# inflect.singular /^(ox)en/i, '\1' -# inflect.irregular 'person', 'people' +# inflect.plural /^(ox)$/i, "\\1en" +# inflect.singular /^(ox)en/i, "\\1" +# inflect.irregular "person", "people" # inflect.uncountable %w( fish sheep ) # end # These inflection rules are supported but not enabled by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| -# inflect.acronym 'RESTful' +# inflect.acronym "RESTful" # end diff --git a/config/initializers/new_framework_defaults_7_0.rb b/config/initializers/new_framework_defaults_7_0.rb new file mode 100644 index 000000000..a579326e2 --- /dev/null +++ b/config/initializers/new_framework_defaults_7_0.rb @@ -0,0 +1,117 @@ +# Be sure to restart your server when you modify this file. +# +# This file eases your Rails 7.0 framework defaults upgrade. +# +# Uncomment each configuration one by one to switch to the new default. +# Once your application is ready to run with all new defaults, you can remove +# this file and set the `config.load_defaults` to `7.0`. +# +# Read the Guide for Upgrading Ruby on Rails for more info on each option. +# https://guides.rubyonrails.org/upgrading_ruby_on_rails.html + +# `button_to` view helper will render `
    - + <%- end %> From eaf6fe1acc6e220b09590ad17c12a8e190e00c08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 18 May 2022 12:04:29 +0200 Subject: [PATCH 371/609] Remove reduced service mode notice --- app/views/notifications/author_submission_email.html.erb | 3 --- app/views/notifications/author_submission_email.text.erb | 2 -- 2 files changed, 5 deletions(-) diff --git a/app/views/notifications/author_submission_email.html.erb b/app/views/notifications/author_submission_email.html.erb index ff97a42d6..f113b3876 100644 --- a/app/views/notifications/author_submission_email.html.erb +++ b/app/views/notifications/author_submission_email.html.erb @@ -3,9 +3,6 @@ Hello there, thanks for your submission to <%= Rails.application.settings['a Your paper, '<%= @paper.title %>', is currently awaiting triage by our managing editor. This generally takes between 24 and 72 hours and until then, your paper won't show up in the https://github.com/<%= Rails.application.settings['reviews'] %> repository.
    -Due to the COVID-19 pandemic, <%= Rails.application.settings['abbreviation'] %> is currently operating in a reduced service mode. More details about what this means for authors, editors, and reviewers is available in <%= link_to "this blog post", "https://blog.joss.theoj.org/2020/05/reopening-joss" %>, but in short, authors should anticipate a significantly longer review period than before and your patience is appreciated. -
    - You can view the latest status of your paper here: <%= @url %>
    Many thanks
    diff --git a/app/views/notifications/author_submission_email.text.erb b/app/views/notifications/author_submission_email.text.erb index 14404eb29..960c5868a 100644 --- a/app/views/notifications/author_submission_email.text.erb +++ b/app/views/notifications/author_submission_email.text.erb @@ -2,8 +2,6 @@ Hello there, thanks for your submission to <%= Rails.application.settings['abbre Your paper, '<%= @paper.title %>', is currently awaiting triage by our managing editor. This generally takes between 24 and 72 hours and until then, your paper won't show up in the https://github.com/<%= Rails.application.settings['reviews'] %> repository. -Due to the COVID-19 pandemic, <%= Rails.application.settings['abbreviation'] %> is currently operating in a reduced service mode. More details about what this means for authors, editors, and reviewers is available in <%= link_to "this blog post", "https://blog.joss.theoj.org/2020/05/reopening-joss" %>, but in short, authors should anticipate a significantly longer review period than before and your patience is appreciated. - You can view the latest status of your paper here: <%= @url %> Many thanks From b3317cc7eaf3288c9b61af6eb82a1e7f4d7c9865 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sat, 21 May 2022 06:19:28 -0700 Subject: [PATCH 372/609] Extending ethics section --- app/views/home/about.html.erb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/views/home/about.html.erb b/app/views/home/about.html.erb index 460792f23..54a60ebc0 100644 --- a/app/views/home/about.html.erb +++ b/app/views/home/about.html.erb @@ -70,7 +70,7 @@

    Contact <%= setting(:abbreviation) %>

    - To suggest a feature, report a bug, or enquire about a possible submission in <%= setting(:abbreviation) %>, please open a GitHub Issue. + To suggest a feature, report a bug, or enquire about a possible submission in <%= setting(:abbreviation) %>, please open a GitHub Issue. If you need to contact <%= setting(:abbreviation) %> privately then you can <%= mail_to "admin@theoj.org", "email us" %>.

    @@ -100,10 +100,13 @@

    -

    Any potentially unethical behavior should be brought to the attention of the <%= setting(:abbreviation) %> staff. See Contacting <%= setting(:abbreviation) %>.

    + Allegations of misconduct +

    Allegations of research misconduct associated with a <%= setting(:abbreviation) %> submission (either during review, or post-publication) are handled by the Open Journals ethics team. Reports should be sent privately to <%= mail_to "admin@theoj.org", "our editorial team" %> at which point the report will be triaged by the Open Journals ethics officer who to determine the nature and severity of the case. Options available to the Open Journals ethics officer range from recommending no action, to instigating a full investigation by the Open Journals ethics team which may result in researchers' institutions and funders being notified and the <%= setting(:abbreviation) %> being retracted.

    -

    The <%= setting(:abbreviation) %> Editors will track any concerns and respond to the submitter with a resolution, which will range from doing nothing if the editors disagree about the issue to withdrawing papers and notifying authors' institutions. -

    +

    Although <%= setting(:abbreviation) %> is not yet a member of <%= link_to "COPE", "https://publicationethics.org" %> (application pending), our processes are modeled on the <%= link_to "COPE guideline proceedures for ethics complaints", "https://publicationethics.org/files/publication-ethics-editorial-office-cope-flowchart.pdf" %>.

    + + Complaints process +

    Complaints about the conduct or decision making of the <%= setting(:abbreviation) %> editorial team can be sent to the <%= mail_to "admin@theoj.org", "Open Journals governance team" %>.

    <%= setting(:abbreviation) %> Publication Ethics and Malpractice Statement

    Editorial Board @@ -143,7 +146,7 @@
  • <%= setting(:abbreviation) %> reviews are public and non-anonymous while in progress and post-review, as they take place via GitHub issues in a public repository.
  • - Publication ethics + Publication Ethics
    - + <%- end %> diff --git a/app/views/onboardings/index.html.erb b/app/views/onboardings/index.html.erb index af9f873a3..66c9a69a8 100644 --- a/app/views/onboardings/index.html.erb +++ b/app/views/onboardings/index.html.erb @@ -57,10 +57,10 @@ <%- end %> @@ -103,13 +103,13 @@ <% end %> diff --git a/app/views/papers/_notes.html.erb b/app/views/papers/_notes.html.erb index 79db3fc1f..5a1f88923 100644 --- a/app/views/papers/_notes.html.erb +++ b/app/views/papers/_notes.html.erb @@ -14,7 +14,7 @@ <%= note.comment %>
    <%= time_ago_in_words(note.created_at) %> ago. - <%= link_to("Delete note", paper_note_path(paper,note), method: :delete) if note.editor == current_user.editor %> + <%= link_to("Delete note", paper_note_path(paper,note), data: { turbo_method: :delete }) if note.editor == current_user.editor %>
    diff --git a/spec/system/onboarding_spec.rb b/spec/system/onboarding_spec.rb index 0f813f6ea..d563cebd4 100644 --- a/spec/system/onboarding_spec.rb +++ b/spec/system/onboarding_spec.rb @@ -65,6 +65,9 @@ expect(page).to have_content("Onboarding invitation deleted") expect(page).to_not have_content("editor@dele.te") + + visit onboardings_path + expect(page).to_not have_content("editor@dele.te") end scenario "Resend onboarding invitation" do From 4736ce7643d2c98e2985d9c1635b3a33e49ab6ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 6 Jun 2022 12:34:02 +0200 Subject: [PATCH 401/609] Remove net-ftp gem, not longer used --- Gemfile | 1 - Gemfile.lock | 7 ------- 2 files changed, 8 deletions(-) diff --git a/Gemfile b/Gemfile index c8a1c733a..3e29492e5 100644 --- a/Gemfile +++ b/Gemfile @@ -30,7 +30,6 @@ gem 'elasticsearch', '<7.14' gem 'uglifier', '4.2.0' gem 'jbuilder', '~> 2.11' gem 'issue' -gem 'net-ftp' gem 'active_link_to' diff --git a/Gemfile.lock b/Gemfile.lock index c6984f4e8..ab8bf0c06 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -97,7 +97,6 @@ GEM crack (0.4.5) rexml crass (1.0.6) - date (3.2.2) declarative (0.0.20) diff-lcs (1.5.0) digest (3.1.0) @@ -237,9 +236,6 @@ GEM multi_xml (0.6.0) multipart-post (2.1.1) nenv (0.3.0) - net-ftp (0.1.3) - net-protocol - time net-imap (0.2.3) digest net-protocol @@ -431,8 +427,6 @@ GEM strscan (3.0.3) thor (1.2.1) tilt (2.0.10) - time (0.2.0) - date timeout (0.3.0) trailblazer-option (0.1.2) ttfunk (1.7.0) @@ -490,7 +484,6 @@ DEPENDENCIES issue jbuilder (~> 2.11) mini_racer - net-ftp net-sftp (~> 2.1, >= 2.1.2) newrelic_rpm octicons_helper From 7c6b70dc9ed41f09f97d63e56d49d516cdba8733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 7 Jun 2022 11:14:26 +0200 Subject: [PATCH 402/609] Style subjects autocomplete options --- app/assets/stylesheets/papers.scss | 10 ++++++++++ app/views/papers/_form.html.erb | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/papers.scss b/app/assets/stylesheets/papers.scss index ab1f45307..569f3425f 100644 --- a/app/assets/stylesheets/papers.scss +++ b/app/assets/stylesheets/papers.scss @@ -106,3 +106,13 @@ .btn.start-review { margin-top: 5px; } + +ul.subjects-options { + position: absolute; + z-index: 33; +} + +ul.subjects-options li { + background-color: #e4f0f2; +} + diff --git a/app/views/papers/_form.html.erb b/app/views/papers/_form.html.erb index 291f2bbdf..34c00f9bb 100644 --- a/app/views/papers/_form.html.erb +++ b/app/views/papers/_form.html.erb @@ -55,7 +55,7 @@ <%= f.label "Main subject of the paper" %> <%= text_field_tag :subject, nil, value: params[:subject], placeholder: "Select the subject that best applies to your paper", class: "form-control", style: "margin-right: 12px;", data: {"autocomplete-target" => "input"} %> <%= f.hidden_field :track_id, data: {"autocomplete-target" => "hidden"} %> -
      +
        From 007fa7243569988489b75a2361942e28fd41691b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 7 Jun 2022 11:51:00 +0200 Subject: [PATCH 403/609] Fix actions to work with Turbo --- app/views/papers/_actions.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/papers/_actions.html.erb b/app/views/papers/_actions.html.erb index 7aa3178c7..cdb20f4b1 100644 --- a/app/views/papers/_actions.html.erb +++ b/app/views/papers/_actions.html.erb @@ -22,14 +22,14 @@ <% unless paper.review_issue_id %>
        - <%= button_to "Reject paper", reject_paper_path(paper), data: { confirm: "Are you sure?" }, form_class: "left", class: "btn btn-danger" %> + <%= link_to "Reject paper", reject_paper_path(paper), data: { turbo_method: :post, turbo_confirm: "Rejecting. Are you sure?" }, form_class: "left", class: "btn btn-danger" %>
        <% end %> <% end %> <% if (current_user == paper.submitting_author) || current_user.admin? %>
        - <%= button_to "Withdraw paper", withdraw_paper_path(paper), data: { confirm: "Are you sure?" }, form_class: "left", class: "btn btn-danger" %> + <%= link_to "Withdraw paper", withdraw_paper_path(paper), data: { turbo_method: :post, turbo_confirm: "Withdrawing. Are you sure?" }, form_class: "left", class: "btn btn-danger" %>
        <% end %> From 4779ff691a7dbdd56309931b32d9608b342ba6fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 7 Jun 2022 11:51:29 +0200 Subject: [PATCH 404/609] Add status message for withdrawn papers --- app/views/papers/_status.html.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/papers/_status.html.erb b/app/views/papers/_status.html.erb index 0eb224fd3..6af40523d 100644 --- a/app/views/papers/_status.html.erb +++ b/app/views/papers/_status.html.erb @@ -21,5 +21,7 @@ <% when "rejected" %> This paper is <%= paper.pretty_state %> which means is has not been accepted into The Journal of Open Source Software. + <% when "withdrawn" %> + This paper was <%= paper.pretty_state %>. <% end %> From 0204b43dc2777c3a5421fa534b6b55a0e81a4702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 7 Jun 2022 12:56:02 +0200 Subject: [PATCH 405/609] Fix specs --- spec/views/papers/show.html.erb_spec.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/views/papers/show.html.erb_spec.rb b/spec/views/papers/show.html.erb_spec.rb index 78dd0910b..1ffcb5a91 100644 --- a/spec/views/papers/show.html.erb_spec.rb +++ b/spec/views/papers/show.html.erb_spec.rb @@ -88,7 +88,7 @@ render template: "papers/show", formats: :html - expect(rendered).to have_selector("button[type=submit]", text: "Reject paper") + expect(rendered).to have_selector("a[data-turbo-method=post]", text: "Reject paper") end it "shows only the withdraw to paper owners" do @@ -100,8 +100,8 @@ assign(:paper, paper) render template: "papers/show", formats: :html - expect(rendered).to have_selector("button[type=submit]", text: "Withdraw paper") - expect(rendered).to_not have_selector("button[type=submit]", text: "Reject paper") + expect(rendered).to have_selector("a[data-turbo-method=post]", text: "Withdraw paper") + expect(rendered).to_not have_selector("a[data-turbo-method=post]", text: "Reject paper") expect(rendered).to_not have_selector("input[type=submit][value='Start meta review']") end @@ -116,8 +116,8 @@ assign(:paper, paper) render template: "papers/show", formats: :html - expect(rendered).to have_selector("button[type=submit]", text: "Withdraw paper") - expect(rendered).to have_selector("button[type=submit]", text: "Reject paper") + expect(rendered).to have_selector("a[data-turbo-method=post]", text: "Withdraw paper") + expect(rendered).to have_selector("a[data-turbo-method=post]", text: "Reject paper") expect(rendered).to have_selector("input[type=submit][value='Start meta review']") expect(rendered).to have_content(author.email) end From eca578a7ff36fc3ff61ef5e8bae8479ef13fe603 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Thu, 9 Jun 2022 10:28:49 +0100 Subject: [PATCH 406/609] Suggested edits from Dan --- lib/tracks.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/tracks.yml b/lib/tracks.yml index f77cee34f..ae34c48f2 100644 --- a/lib/tracks.yml +++ b/lib/tracks.yml @@ -230,6 +230,8 @@ tracks: - Statistical and Nonlinear Physics [Physical Sciences] - Building and Construction [Physical Sciences] - Architecture [Physical Sciences] + - Ocean Engineering [Physical Sciences] + - Mathematical Physics [Physical Sciences] sbcs: name: Social, Behavioral, and Cognitive Sciences short_name: sbcs @@ -311,6 +313,7 @@ tracks: fields: - Artificial Intelligence [Physical Sciences] - Statistics and Probability [Physical Sciences] + - Computer Vision and Pattern Recognition [Physical Sciences] ese: name: Earth Sciences and Ecology short_name: ese @@ -363,12 +366,10 @@ tracks: - Computer Graphics and Computer-Aided Design [Physical Sciences] - Computer Networks and Communications [Physical Sciences] - Computer Science Applications [Physical Sciences] - - Computer Vision and Pattern Recognition [Physical Sciences] - Hardware and Architecture [Physical Sciences] - Human-Computer Interaction [Physical Sciences] - Information Systems [Physical Sciences] - Signal Processing [Physical Sciences] - - Ocean Engineering [Physical Sciences] - Safety, Risk, Reliability and Quality [Physical Sciences] - Media Technology [Physical Sciences] - General Mathematics [Physical Sciences] @@ -381,7 +382,6 @@ tracks: - Discrete Mathematics and Combinatorics [Physical Sciences] - Geometry and Topology [Physical Sciences] - Logic [Physical Sciences] - - Mathematical Physics [Physical Sciences] - Modeling and Simulation [Physical Sciences] - Numerical Analysis [Physical Sciences] - Theoretical Computer Science [Physical Sciences] From 970e2a2f2ea8c6a89d6a548c34c77c0d9687a8b8 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Thu, 9 Jun 2022 10:31:02 +0100 Subject: [PATCH 407/609] Edits from Kyle --- lib/tracks.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/tracks.yml b/lib/tracks.yml index ae34c48f2..50079de79 100644 --- a/lib/tracks.yml +++ b/lib/tracks.yml @@ -232,6 +232,14 @@ tracks: - Architecture [Physical Sciences] - Ocean Engineering [Physical Sciences] - Mathematical Physics [Physical Sciences] + - General Energy [Physical Sciences] + - Energy (miscellaneous) [Physical Sciences] + - Energy Engineering and Power Technology [Physical Sciences] + - Fuel Technology [Physical Sciences] + - Nuclear Energy and Engineering [Physical Sciences] + - Renewable Energy, Sustainability and the Environment [Physical Sciences] + - Pollution [Physical Sciences] + - Waste Management and Disposal [Physical Sciences] sbcs: name: Social, Behavioral, and Cognitive Sciences short_name: sbcs @@ -334,15 +342,7 @@ tracks: - Oceanography [Physical Sciences] - Paleontology [Physical Sciences] - Stratigraphy [Physical Sciences] - - General Energy [Physical Sciences] - - Energy (miscellaneous) [Physical Sciences] - - Energy Engineering and Power Technology [Physical Sciences] - - Fuel Technology [Physical Sciences] - - Nuclear Energy and Engineering [Physical Sciences] - - Renewable Energy, Sustainability and the Environment [Physical Sciences] - Nature and Landscape Conservation [Physical Sciences] - - Pollution [Physical Sciences] - - Waste Management and Disposal [Physical Sciences] - Water Science and Technology [Physical Sciences] - General Environmental Science [Physical Sciences] - Environmental Science (miscellaneous) [Physical Sciences] From 97073afed8027158059d308cb6df9481ad0f8afe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 9 Jun 2022 11:37:50 +0200 Subject: [PATCH 408/609] Remove paper author's suggested editor (#1088) --- app/controllers/papers_controller.rb | 2 +- app/models/paper.rb | 1 - app/views/papers/_actions.html.erb | 2 +- app/views/papers/_eic_summary.html.erb | 7 ------- app/views/papers/_form.html.erb | 10 ---------- app/views/shared/meta_view_body.text.erb | 2 +- ...220607095358_remove_suggested_editor_from_papers.rb | 5 +++++ db/schema.rb | 3 +-- spec/controllers/dispatch_controller_spec.rb | 4 ++-- spec/controllers/papers_controller_spec.rb | 2 +- spec/factories/papers_factory.rb | 1 - spec/models/paper_spec.rb | 5 ++--- spec/views/papers/new.html.erb_spec.rb | 4 ++-- 13 files changed, 16 insertions(+), 32 deletions(-) create mode 100644 db/migrate/20220607095358_remove_suggested_editor_from_papers.rb diff --git a/app/controllers/papers_controller.rb b/app/controllers/papers_controller.rb index e670402ba..be09ee76f 100644 --- a/app/controllers/papers_controller.rb +++ b/app/controllers/papers_controller.rb @@ -306,7 +306,7 @@ def status private def paper_params - params.require(:paper).permit(:title, :repository_url, :git_branch, :software_version, :suggested_editor, :body, :kind, :submission_kind, :track_id) + params.require(:paper).permit(:title, :repository_url, :git_branch, :software_version, :body, :kind, :submission_kind, :track_id) end def can_see_hidden_paper?(paper) diff --git a/app/models/paper.rb b/app/models/paper.rb index 32bbeed4f..746e71212 100644 --- a/app/models/paper.rb +++ b/app/models/paper.rb @@ -122,7 +122,6 @@ class Paper < ApplicationRecord after_create :notify_editors, :notify_author validates_presence_of :title, message: "The paper must have a title" - validates_presence_of :suggested_editor, on: :create, message: "You must suggest an editor to handle your submission" validates_presence_of :repository_url, message: "Repository address can't be blank" validates_presence_of :software_version, message: "Version can't be blank" validates_presence_of :body, message: "Description can't be blank" diff --git a/app/views/papers/_actions.html.erb b/app/views/papers/_actions.html.erb index cdb20f4b1..b7492d8c5 100644 --- a/app/views/papers/_actions.html.erb +++ b/app/views/papers/_actions.html.erb @@ -11,7 +11,7 @@ <% unless paper.meta_review_issue_id %>
        <%= form_tag(start_meta_review_paper_url(paper), class: "left") do %> - Editor: <%= select_tag :editor, options_for_select(Repository.editors, selected: paper.suggested_editor), include_blank: true, prompt: "Select editor", class: "form-control left" %> + Editor: <%= select_tag :editor, options_for_select(Repository.editors, selected: nil), prompt: "Suggest editor (optional)", class: "form-control left" %> Track: <%= select_tag :track_id, options_from_collection_for_select(Track.all, "id", "name", paper.track_id), include_blank: false, class: "form-control left" %> <%= submit_tag "Start meta review", class: "btn btn-primary left start-review" %> <% end %> diff --git a/app/views/papers/_eic_summary.html.erb b/app/views/papers/_eic_summary.html.erb index 97fbcfa42..fb7e598bf 100644 --- a/app/views/papers/_eic_summary.html.erb +++ b/app/views/papers/_eic_summary.html.erb @@ -18,13 +18,6 @@
        Email address
        <%= mail_to paper.submitting_author.email if paper.submitting_author.email? %>
        -
        Suggested editor
        -
        <% if paper.suggested_editor.blank? %> - No editor suggested. - <% else %> - <%= paper.suggested_editor %> - <% end %>
        -
        GitHub username
        <%= github_link(paper.submitting_author.github_username) %>
        diff --git a/app/views/papers/_form.html.erb b/app/views/papers/_form.html.erb index 34c00f9bb..9ddaf94a3 100644 --- a/app/views/papers/_form.html.erb +++ b/app/views/papers/_form.html.erb @@ -42,22 +42,12 @@ <%= f.label "Type of submission" %> <%= f.select(:submission_kind, {'New submission' => 'new', 'Resubmission' => 'resubmission', 'Major new version' => 'new version'}, {include_blank: false, prompt: "Select one and explain choice below"}, class: "form-control", style: "margin-right: 12px;") %>
        -
        - - <%= f.select(:suggested_editor, options_for_select(Repository.editors), {include_blank: false, prompt: "Suggested editor (required)"}, class: "form-control", style: "margin-right: 12px;") %> -
        - - - -
        -
        <%= f.label "Main subject of the paper" %> <%= text_field_tag :subject, nil, value: params[:subject], placeholder: "Select the subject that best applies to your paper", class: "form-control", style: "margin-right: 12px;", data: {"autocomplete-target" => "input"} %> <%= f.hidden_field :track_id, data: {"autocomplete-target" => "hidden"} %>
          -
          diff --git a/app/views/shared/meta_view_body.text.erb b/app/views/shared/meta_view_body.text.erb index a14b4f2d4..bea41eb85 100644 --- a/app/views/shared/meta_view_body.text.erb +++ b/app/views/shared/meta_view_body.text.erb @@ -26,7 +26,7 @@ Thanks for submitting your paper to <%= abbreviation %> <%= paper.submitting_aut <% else %> Thanks for submitting your paper to <%= abbreviation %> <%= paper.submitting_author.github_username %>. **Currently, there isn't an <%= abbreviation %> editor assigned** to your paper. -The author's suggestion for the handling editor is <%= suggested_editor %>. +The AEiC suggestion for the handling editor is <%= suggested_editor %>. <% end %> <%= paper.submitting_author.github_username %> if you have any suggestions for potential reviewers then please mention them here in this thread (without tagging them with an @). In addition, [this list of people](<%= reviewers %>) have already agreed to review for <%= abbreviation %> and may be suitable for this submission (please start at the bottom of the list). diff --git a/db/migrate/20220607095358_remove_suggested_editor_from_papers.rb b/db/migrate/20220607095358_remove_suggested_editor_from_papers.rb new file mode 100644 index 000000000..bb4c40210 --- /dev/null +++ b/db/migrate/20220607095358_remove_suggested_editor_from_papers.rb @@ -0,0 +1,5 @@ +class RemoveSuggestedEditorFromPapers < ActiveRecord::Migration[7.0] + def change + remove_column :papers, :suggested_editor, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index 4274558f2..eb2ed445b 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2022_05_12_083929) do +ActiveRecord::Schema[7.0].define(version: 2022_06_07_095358) do # These are extensions that must be enabled in order to support this database enable_extension "hstore" enable_extension "plpgsql" @@ -93,7 +93,6 @@ t.string "doi" t.text "paper_body" t.integer "meta_review_issue_id" - t.string "suggested_editor" t.string "kind" t.text "authors" t.text "citation_string" diff --git a/spec/controllers/dispatch_controller_spec.rb b/spec/controllers/dispatch_controller_spec.rb index 2658f16e1..c2d1f63dd 100644 --- a/spec/controllers/dispatch_controller_spec.rb +++ b/spec/controllers/dispatch_controller_spec.rb @@ -86,9 +86,9 @@ def headers(event, payload) end end - describe "POST #github_receiver for REVIEW when a paper doesn't have a suggested_editor set", type: :request do + describe "POST #github_receiver for REVIEW", type: :request do before do - build(:paper, meta_review_issue_id: 78, suggested_editor: nil, review_issue_id: 79, labels: [{ "foo" => "efefef" }]).save(validate: false) + build(:paper, meta_review_issue_id: 78, review_issue_id: 79, labels: [{ "foo" => "efefef" }]).save(validate: false) @paper = Paper.find_by_meta_review_issue_id(78) post '/dispatch', params: editorialbot_review_labeled, headers: headers(:issues, editorialbot_review_labeled) diff --git a/spec/controllers/papers_controller_spec.rb b/spec/controllers/papers_controller_spec.rb index d255c3f07..8cec56f62 100644 --- a/spec/controllers/papers_controller_spec.rb +++ b/spec/controllers/papers_controller_spec.rb @@ -104,7 +104,7 @@ allow(controller).to receive_message_chain(:current_user).and_return(user) paper_count = Paper.count - paper_params = {title: "Yeah whateva", body: "something", repository_url: "https://github.com/openjournals/joss", git_branch: "joss-paper", software_version: "v1.0.1", submission_kind: "new", suggested_editor: "@editor", track_id: create(:track).id} + paper_params = {title: "Yeah whateva", body: "something", repository_url: "https://github.com/openjournals/joss", git_branch: "joss-paper", software_version: "v1.0.1", submission_kind: "new", track_id: create(:track).id} post :create, params: {paper: paper_params} expect(response).to be_redirect # as it's created the thing expect(Paper.count).to eq(paper_count + 1) diff --git a/spec/factories/papers_factory.rb b/spec/factories/papers_factory.rb index b86b46584..c0abe9dff 100644 --- a/spec/factories/papers_factory.rb +++ b/spec/factories/papers_factory.rb @@ -7,7 +7,6 @@ software_version { 'v1.0.0' } submitting_author { create(:user) } submission_kind { 'new' } - suggested_editor { '@editor' } track { create(:track) } created_at { Time.now } diff --git a/spec/models/paper_spec.rb b/spec/models/paper_spec.rb index 4550fdf53..dcaa527c7 100644 --- a/spec/models/paper_spec.rb +++ b/spec/models/paper_spec.rb @@ -44,8 +44,7 @@ repository_url: 'http://github.com/arfon/fidgit', software_version: 'v1.0.0', submitting_author: create(:user), - submission_kind: 'new', - suggested_editor: '@editor' } + submission_kind: 'new' } valid_params = no_track_params.merge track: create(:track) @@ -348,7 +347,7 @@ is_expected.to match /Important Editor/ end - it { is_expected.to match "The author's suggestion for the handling editor is @joss_editor" } + it { is_expected.to match "The AEiC suggestion for the handling editor is @joss_editor" } end context "with no editor" do diff --git a/spec/views/papers/new.html.erb_spec.rb b/spec/views/papers/new.html.erb_spec.rb index 247fe58f5..2dbe0af08 100644 --- a/spec/views/papers/new.html.erb_spec.rb +++ b/spec/views/papers/new.html.erb_spec.rb @@ -28,7 +28,7 @@ assert_select "input#paper_git_branch[name=?]", "paper[git_branch]" assert_select "input#paper_software_version[name=?]", "paper[software_version]" assert_select "select#paper_submission_kind[name=?]", "paper[submission_kind]" - assert_select "select#paper_suggested_editor[name=?]", "paper[suggested_editor]" + assert_select "input#paper_track_id[name=?]", "paper[track_id]" assert_select "textarea#paper_body[name=?]", "paper[body]" assert_select "input#author-check" assert_select "input#coc-check" @@ -49,7 +49,7 @@ assert_select "input#paper_git_branch[name=?]", "paper[git_branch]" assert_select "input#paper_software_version[name=?]", "paper[software_version]" assert_select "select#paper_submission_kind[name=?]", "paper[submission_kind]" - assert_select "select#paper_suggested_editor[name=?]", "paper[suggested_editor]" + assert_select "input#paper_track_id[name=?]", "paper[track_id]" assert_select "textarea#paper_body[name=?]", "paper[body]" assert_select "input#author-check" assert_select "input#coc-check" From 229fa4ef79b81a7d68f7f35b94c27c5b451664aa Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Thu, 9 Jun 2022 10:42:33 +0100 Subject: [PATCH 409/609] Adding suggestions from George --- lib/tracks.yml | 14 +++++++++++++- spec/fixtures/reference-tracks.yml | 16 +++++++++++++++- spec/lib/tracks_spec.rb | 8 ++++---- 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/lib/tracks.yml b/lib/tracks.yml index 50079de79..f59048cee 100644 --- a/lib/tracks.yml +++ b/lib/tracks.yml @@ -319,9 +319,21 @@ tracks: - gkthiruvathukal code: 5 fields: - - Artificial Intelligence [Physical Sciences] + - Artificial Intelligence & Machine Learning (General) [Physical Sciences] + - Distributed Artificial Intelligence [Physical Sciences] - Statistics and Probability [Physical Sciences] - Computer Vision and Pattern Recognition [Physical Sciences] + - Artificial Intelligence: Applications and Expert Systems [Physical Sciences] + - Artificial Intelligence: Automatic Programming [Physical Sciences] + - Artificial Intelligence: Deduction and Theorem Proving [Physical Sciences] + - Artificial Intelligence: Knowledge Representation Formalisms and Methods [Physical Sciences] + - Artificial Intelligence: Natural Language Processing [Physical Sciences] + - Artificial Intelligence: Problem Solving, Control Methods, and Search [Physical Sciences] + - Artificial Intelligence: Robotics [Physical Sciences] + - Data Science: Statistical Libraries and Tools [Physical Sciences] + - Data Science: Modeling and Simulation [Physical Sciences] + - Data Science: Decision Analysis [Physical Sciences] + - Data Science: Linear Programming and Optimization [Physical Sciences] ese: name: Earth Sciences and Ecology short_name: ese diff --git a/spec/fixtures/reference-tracks.yml b/spec/fixtures/reference-tracks.yml index a4b7165c4..ede954393 100644 --- a/spec/fixtures/reference-tracks.yml +++ b/spec/fixtures/reference-tracks.yml @@ -141,7 +141,7 @@ - Spectroscopy [Physical Sciences] - General Computer Science [Physical Sciences] - Computer Science (miscellaneous) [Physical Sciences] -- Artificial Intelligence [Physical Sciences] +- Artificial Intelligence & Machine Learning (General) [Physical Sciences] - Computational Theory and Mathematics [Physical Sciences] - Computer Graphics and Computer-Aided Design [Physical Sciences] - Computer Networks and Communications [Physical Sciences] @@ -237,6 +237,20 @@ - Statistical and Nonlinear Physics [Physical Sciences] - Surfaces and Interfaces [Physical Sciences] +# Additions based on https://github.com/openjournals/joss/pull/1086#issuecomment-1148119259 +- Distributed Artificial Intelligence [Physical Sciences] +- Artificial Intelligence: Applications and Expert Systems [Physical Sciences] +- Artificial Intelligence: Automatic Programming [Physical Sciences] +- Artificial Intelligence: Deduction and Theorem Proving [Physical Sciences] +- Artificial Intelligence: Knowledge Representation Formalisms and Methods [Physical Sciences] +- Artificial Intelligence: Natural Language Processing [Physical Sciences] +- Artificial Intelligence: Problem Solving, Control Methods, and Search [Physical Sciences] +- Artificial Intelligence: Robotics [Physical Sciences] +- Data Science: Statistical Libraries and Tools [Physical Sciences] +- Data Science: Modeling and Simulation [Physical Sciences] +- Data Science: Decision Analysis [Physical Sciences] +- Data Science: Linear Programming and Optimization [Physical Sciences] + # Health Sciences - General Medicine [Health Sciences] - Medicine (miscellaneous) [Health Sciences] diff --git a/spec/lib/tracks_spec.rb b/spec/lib/tracks_spec.rb index c5ba29bdf..ac045d381 100644 --- a/spec/lib/tracks_spec.rb +++ b/spec/lib/tracks_spec.rb @@ -8,12 +8,12 @@ end describe "Reference tracks" do - it "should be 333 in total" do - expect(reference_tracks.size).to eq(332) + it "should be 344 in total" do + expect(reference_tracks.size).to eq(344) end it "should be not have any dupes" do - expect(reference_tracks.uniq.size).to eq(332) + expect(reference_tracks.uniq.size).to eq(344) end end @@ -36,7 +36,7 @@ it "should have no dupes" do all_tracks = joss_tracks['tracks'].collect {|k,v| v['fields']}.flatten.uniq - expect(all_tracks.size).to eq(332) + expect(all_tracks.size).to eq(344) end it "should include all of the reference tracks" do From 12327adad371f515c1f3c5dbbf62bcd126b3acb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 10 Jun 2022 12:14:33 +0200 Subject: [PATCH 410/609] Add tracks to editor's profiles --- .../stylesheets/bootstrap-4.3.1/_forms.scss | 5 ++++ app/controllers/editors_controller.rb | 4 +-- app/controllers/onboardings_controller.rb | 4 +-- app/models/editor.rb | 1 + app/views/editors/_form.html.erb | 11 +++++++ app/views/editors/profile.html.erb | 21 ++++++++++---- app/views/editors/show.html.erb | 9 ++++++ app/views/onboardings/editor.html.erb | 11 +++++++ spec/controllers/editors_controller_spec.rb | 9 ++++-- spec/factories/editors.rb | 1 + spec/system/editors/profile_spec.rb | 4 +++ spec/system/onboarding_spec.rb | 29 +++++++++++++++++-- spec/views/editors/edit.html.erb_spec.rb | 1 + spec/views/editors/new.html.erb_spec.rb | 3 +- 14 files changed, 97 insertions(+), 16 deletions(-) diff --git a/app/assets/stylesheets/bootstrap-4.3.1/_forms.scss b/app/assets/stylesheets/bootstrap-4.3.1/_forms.scss index ec9c33559..6b05f8b7b 100644 --- a/app/assets/stylesheets/bootstrap-4.3.1/_forms.scss +++ b/app/assets/stylesheets/bootstrap-4.3.1/_forms.scss @@ -234,6 +234,11 @@ textarea.form-control { } } +.label-container-check-box { + display: inline-block; + width: 100%; +} + // Form validation // diff --git a/app/controllers/editors_controller.rb b/app/controllers/editors_controller.rb index 22bc70628..c79d1f4c0 100644 --- a/app/controllers/editors_controller.rb +++ b/app/controllers/editors_controller.rb @@ -89,10 +89,10 @@ def set_current_editor end def editor_params - params.require(:editor).permit(:max_assignments, :availability_comment, :kind, :title, :first_name, :last_name, :login, :email, :avatar_url, :category_list, :url, :description) + params.require(:editor).permit(:max_assignments, :availability_comment, :kind, :title, :first_name, :last_name, :login, :email, :avatar_url, :category_list, :url, :description, { track_ids: [] }) end def profile_params - params.require(:editor).permit(:max_assignments, :availability_comment, :first_name, :last_name, :email, :avatar_url, :category_list, :url, :description) + params.require(:editor).permit(:max_assignments, :availability_comment, :first_name, :last_name, :email, :avatar_url, :category_list, :url, :description, { track_ids: [] }) end end diff --git a/app/controllers/onboardings_controller.rb b/app/controllers/onboardings_controller.rb index 58ef30ece..284dac123 100644 --- a/app/controllers/onboardings_controller.rb +++ b/app/controllers/onboardings_controller.rb @@ -13,7 +13,7 @@ def add_editor flash[:notice] = "Thanks! An editor in chief will review your info soon" redirect_to root_path else - flash[:error] = "Error saving your data: Name, Email and GitHub username are mandatory" + flash[:error] = "Error saving your data: Name, Email, GitHub username and Tracks are mandatory" redirect_to editor_onboardings_path(@onboarding.token) end end @@ -91,6 +91,6 @@ def onboarding_invitation_params end def new_editor_params - params.require(:editor).permit(:first_name, :last_name, :login, :email, :category_list, :url, :description).merge(kind: "pending") + params.require(:editor).permit(:first_name, :last_name, :login, :email, :category_list, :url, :description, { track_ids: [] }).merge(kind: "pending") end end diff --git a/app/models/editor.rb b/app/models/editor.rb index d59b4c4ab..9f4153f1b 100644 --- a/app/models/editor.rb +++ b/app/models/editor.rb @@ -4,6 +4,7 @@ class Editor < ApplicationRecord validates :last_name, presence: true validates :email, presence: true, unless: Proc.new { |editor| editor.kind == "emeritus" } validates :login, presence: true, unless: Proc.new { |editor| editor.kind == "emeritus" } + validates :tracks, presence: true belongs_to :user, optional: true has_many :papers diff --git a/app/views/editors/_form.html.erb b/app/views/editors/_form.html.erb index 077559608..d1af1f0fe 100644 --- a/app/views/editors/_form.html.erb +++ b/app/views/editors/_form.html.erb @@ -89,6 +89,17 @@ <%= f.text_field :url, class: "form-control" %> +
          + <%= f.label :tracks %> +
          +
          + <%= f.collection_check_boxes(:track_ids, Track.all, :id, :name) do |b| + b.label(class: "label-container-check-box") { b.check_box(class: "form-check-inline") + b.text } + end %> +
          +
          +
          +
          <%= f.label :description %> <%= f.text_area :description, rows: 4, class: "form-control" %> diff --git a/app/views/editors/profile.html.erb b/app/views/editors/profile.html.erb index b71c73a55..69d750eef 100644 --- a/app/views/editors/profile.html.erb +++ b/app/views/editors/profile.html.erb @@ -10,15 +10,15 @@ <%= link_to "View papers you have edited →".html_safe, papers_by_editor_url(@editor.login)%> <%= form_for(@editor, url: update_editor_profile_path) do |f| %> +
          <% if @editor.errors.any? %> -
          -

          <%= pluralize(@editor.errors.count, "error") %> prohibited this editor from being saved:

          - +
          +

          Your profile could not be saved.

            - <% @editor.errors.each do |error| %> + <% @editor.errors.each do |error| -%>
          • <%= error.attribute.to_s.humanize %>: <%= error.message %>
          • - <% end %> + <% end -%>
          <% end %> @@ -78,6 +78,17 @@
          +
          + <%= f.label :tracks %> +
          +
          + <%= f.collection_check_boxes(:track_ids, Track.all, :id, :name) do |b| + b.label(class: "label-container-check-box") { b.check_box(class: "form-check-inline") + b.text } + end %> +
          +
          +
          +
          <%= f.label :description %> <%= f.text_area :description, rows: 4, class: "form-control" %> diff --git a/app/views/editors/show.html.erb b/app/views/editors/show.html.erb index a49d96a8f..4d48e014a 100644 --- a/app/views/editors/show.html.erb +++ b/app/views/editors/show.html.erb @@ -47,6 +47,15 @@ <%= @editor.url %>

          +

          + Tracks: +

            + <% @editor.tracks.each do |t| %> +
          • <%= t.name %>
          • + <% end %> +
          +

          +

          Description: <%= @editor.description.html_safe %> diff --git a/app/views/onboardings/editor.html.erb b/app/views/onboardings/editor.html.erb index 0b19e0780..420142120 100644 --- a/app/views/onboardings/editor.html.erb +++ b/app/views/onboardings/editor.html.erb @@ -62,6 +62,17 @@

          +
          + <%= f.label :tracks %> +
          +
          + <%= f.collection_check_boxes(:track_ids, Track.all, :id, :name) do |b| + b.label(class: "label-container-check-box") { b.check_box(class: "form-check-inline") + b.text } + end %> +
          +
          +
          +
          <%= f.label :description %> <%= f.text_area :description, rows: 4, class: "form-control" %> diff --git a/spec/controllers/editors_controller_spec.rb b/spec/controllers/editors_controller_spec.rb index 1b81b0807..082e906b6 100644 --- a/spec/controllers/editors_controller_spec.rb +++ b/spec/controllers/editors_controller_spec.rb @@ -80,19 +80,22 @@ describe "#create" do context "with valid params" do it "creates a new Editor" do + new_editor = build(:editor) expect { - post :create, params: {editor: build(:editor).attributes} + post :create, params: {editor: new_editor.attributes.merge(track_ids: new_editor.track_ids)} }.to change(Editor, :count).by(1) end it "assigns a newly created editor as @editor" do - post :create, params: {editor: build(:editor).attributes} + new_editor = build(:editor) + post :create, params: {editor: new_editor.attributes.merge(track_ids: new_editor.track_ids)} expect(assigns(:editor)).to be_a(Editor) expect(assigns(:editor)).to be_persisted end it "redirects to the created editor" do - post :create, params: {editor: build(:editor).attributes} + new_editor = build(:editor) + post :create, params: {editor: new_editor.attributes.merge(track_ids: new_editor.track_ids)} expect(response).to redirect_to(Editor.last) end end diff --git a/spec/factories/editors.rb b/spec/factories/editors.rb index 441baf52d..deb8b69bd 100644 --- a/spec/factories/editors.rb +++ b/spec/factories/editors.rb @@ -10,6 +10,7 @@ url { "http://placekitten.com" } description { "Person McEditor is an editor" } availability_comment { "OOO until March 1" } + track_ids {[create(:track).id]} factory :board_editor do kind { "board" } diff --git a/spec/system/editors/profile_spec.rb b/spec/system/editors/profile_spec.rb index a2fb1d1b9..a7d23e25d 100644 --- a/spec/system/editors/profile_spec.rb +++ b/spec/system/editors/profile_spec.rb @@ -29,6 +29,10 @@ expect(first_name).to eq('Lorena') expect(description).to eq('Science testing editor') + expect(user_editor.editor.track_ids.size > 0).to be true + user_editor.editor.track_ids.each do |track_id| + expect(page).to have_checked_field("editor_track_ids_#{track_id}") + end end diff --git a/spec/system/onboarding_spec.rb b/spec/system/onboarding_spec.rb index d563cebd4..de6564aa9 100644 --- a/spec/system/onboarding_spec.rb +++ b/spec/system/onboarding_spec.rb @@ -221,6 +221,8 @@ end scenario "Accepting invitations create a pending editor" do + track = create(:track) + visit editor_onboardings_path(onboarding_invitation.token) fill_in :editor_first_name, with: "Eddie" fill_in :editor_last_name, with: "Tor" @@ -229,6 +231,7 @@ fill_in :editor_url, with: "https://joss.theoj.org" fill_in :editor_category_list, with: "bioinformatics, open science" fill_in :editor_description, with: "I'm a great person" + check track.name click_on "Save editor data" expect(page).to have_content("Thanks! An editor in chief will review your info soon") @@ -249,7 +252,8 @@ expect(user.editor.categories).to eq(["astrophysics", "galaxies"]) end - scenario "Name, Email and GitHub username are mandatory" do + scenario "Name, Email, GitHub username are mandatory" do + track = create(:track) data = { editor_first_name: "Eddie", editor_last_name: "Tor", editor_email: "edi@tor.com", @@ -259,12 +263,31 @@ visit editor_onboardings_path(onboarding_invitation.token) fields = data.keys - [field_name] fields.each do |field| - fill_in field, with: data[:field] + fill_in field, with: data[field] end + fill_in field_name, with: nil + check track.name click_on "Save editor data" - expect(page).to have_content("Error saving your data: Name, Email and GitHub username are mandatory") + expect(page).to have_content("Error saving your data: Name, Email, GitHub username and Tracks are mandatory") + end + end + + scenario "Tracks are mandatory" do + track = create(:track) + data = { editor_first_name: "Eddie", + editor_last_name: "Tor", + editor_email: "edi@tor.com", + editor_login: "@test" } + + visit editor_onboardings_path(onboarding_invitation.token) + data.keys.each do |field| + fill_in field, with: data[field] end + uncheck track.name + click_on "Save editor data" + + expect(page).to have_content("Error saving your data: Name, Email, GitHub username and Tracks are mandatory") end end end diff --git a/spec/views/editors/edit.html.erb_spec.rb b/spec/views/editors/edit.html.erb_spec.rb index 3c0752394..7f15474b1 100644 --- a/spec/views/editors/edit.html.erb_spec.rb +++ b/spec/views/editors/edit.html.erb_spec.rb @@ -21,6 +21,7 @@ assert_select "input#editor_avatar_url[name=?]", "editor[avatar_url]" assert_select "input#editor_category_list[name=?]", "editor[category_list]" assert_select "input#editor_url[name=?]", "editor[url]" + assert_select "input[name=?]", "editor[track_ids][]" assert_select "textarea#editor_description[name=?]", "editor[description]" end end diff --git a/spec/views/editors/new.html.erb_spec.rb b/spec/views/editors/new.html.erb_spec.rb index 4d73bee36..5c162037b 100644 --- a/spec/views/editors/new.html.erb_spec.rb +++ b/spec/views/editors/new.html.erb_spec.rb @@ -6,7 +6,7 @@ allow(Repository).to receive(:editors).and_return %w(@user1 @user2 @user3) end - it "renders the edit editor form" do + it "renders the new editor form" do render assert_select "form[action=?][method=?]", editors_path, "post" do @@ -19,6 +19,7 @@ assert_select "input#editor_avatar_url[name=?]", "editor[avatar_url]" assert_select "input#editor_category_list[name=?]", "editor[category_list]" assert_select "input#editor_url[name=?]", "editor[url]" + assert_select "input[name=?]", "editor[track_ids][]" assert_select "textarea#editor_description[name=?]", "editor[description]" end end From 2665c9b4675c3eab724bdec1e06d56e23958215e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 15 Jun 2022 13:05:46 +0200 Subject: [PATCH 411/609] Add track management for admin users --- app/assets/stylesheets/editors.scss | 6 +- app/controllers/onboardings_controller.rb | 2 +- app/controllers/tracks_controller.rb | 80 +++++++++ app/models/editor.rb | 6 +- app/models/track.rb | 13 +- app/views/editors/index.html.erb | 2 +- app/views/editors/new.html.erb | 14 +- app/views/tracks/_form.html.erb | 64 +++++++ app/views/tracks/edit.html.erb | 12 ++ app/views/tracks/index.html.erb | 38 +++++ app/views/tracks/new.html.erb | 11 ++ app/views/tracks/remove.html.erb | 106 ++++++++++++ app/views/tracks/show.html.erb | 35 ++++ config/routes.rb | 4 + spec/controllers/editors_controller_spec.rb | 9 +- spec/factories/editors.rb | 4 +- spec/factories/subjects.rb | 2 +- spec/factories/tracks.rb | 3 +- spec/models/editor_spec.rb | 11 +- spec/models/track_spec.rb | 4 +- spec/system/tracks_spec.rb | 174 ++++++++++++++++++++ 21 files changed, 570 insertions(+), 30 deletions(-) create mode 100644 app/controllers/tracks_controller.rb create mode 100644 app/views/tracks/_form.html.erb create mode 100644 app/views/tracks/edit.html.erb create mode 100644 app/views/tracks/index.html.erb create mode 100644 app/views/tracks/new.html.erb create mode 100644 app/views/tracks/remove.html.erb create mode 100644 app/views/tracks/show.html.erb create mode 100644 spec/system/tracks_spec.rb diff --git a/app/assets/stylesheets/editors.scss b/app/assets/stylesheets/editors.scss index c4069b364..fd2cd29bc 100644 --- a/app/assets/stylesheets/editors.scss +++ b/app/assets/stylesheets/editors.scss @@ -3,7 +3,7 @@ } -.editors { +.editors, .tracks { margin: 0 10%; .content { @@ -24,3 +24,7 @@ } } } + +.tracks { + margin: 0 20%; +} diff --git a/app/controllers/onboardings_controller.rb b/app/controllers/onboardings_controller.rb index 284dac123..25d82e265 100644 --- a/app/controllers/onboardings_controller.rb +++ b/app/controllers/onboardings_controller.rb @@ -2,7 +2,7 @@ class OnboardingsController < ApplicationController before_action :require_admin_user, except: [:editor, :add_editor] before_action :require_user, only: [:editor, :add_editor] before_action :check_invited_editor, only: [:editor, :add_editor] - before_action :load_editor, only: [:editor, :add_editor, ] + before_action :load_editor, only: [:editor, :add_editor] def editor end diff --git a/app/controllers/tracks_controller.rb b/app/controllers/tracks_controller.rb new file mode 100644 index 000000000..532aa3bd2 --- /dev/null +++ b/app/controllers/tracks_controller.rb @@ -0,0 +1,80 @@ +class TracksController < ApplicationController + before_action :require_admin_user + before_action :set_track, only: [:show, :edit, :update, :destroy, :remove] + before_action :load_aeics, only: [:new, :edit] + + def index + @tracks = Track.includes(:aeics).all + end + + def show + end + + def new + @track = Track.new + end + + def edit + end + + def create + @track = Track.new(track_params) + + if @track.save + redirect_to @track, notice: 'Track was successfully created.' + else + load_aeics + render :new, status: :unprocessable_entity + end + end + + def update + if @track.update(track_params) + redirect_to @track, notice: 'Track was successfully updated.' + else + load_aeics + render :edit, status: :unprocessable_entity + end + end + + def remove + @editors = @track.editors + @subjects = @track.subjects + @other_tracks = Track.where.not(id: @track.id) + @assigned_papers = @track.papers.count + @in_progress_papers = @track.papers.in_progress.count + end + + def destroy + @assigned_papers = @track.papers.count + + if params[:new_track_id].blank? && @assigned_papers > 0 + @editors = @track.editors + @subjects = @track.subjects + @other_tracks = Track.where.not(id: @track.id) + @in_progress_papers = @track.papers.in_progress.count + @track.errors.add :base, "You must provide a track to assign all papers from this track before deleting it." + render :remove, status: :unprocessable_entity + else + if @assigned_papers > 0 + new_track = Track.find(params[:new_track_id]) + @track.papers.update_all(track_id: new_track.id) + end + @track.destroy + redirect_to tracks_url, notice: 'Track was successfully destroyed.' + end + end + + private + def set_track + @track = Track.find(params[:id]) + end + + def load_aeics + @aeics = Editor.board.order(first_name: :asc) + end + + def track_params + params.require(:track).permit(:name, :short_name, :code, :last_name, { aeic_ids: [] }) + end +end diff --git a/app/models/editor.rb b/app/models/editor.rb index 9f4153f1b..3dc8546fe 100644 --- a/app/models/editor.rb +++ b/app/models/editor.rb @@ -2,9 +2,9 @@ class Editor < ApplicationRecord validates :kind, presence: true, inclusion: { in: ["board", "topic", "emeritus", "pending"] } validates :first_name, presence: true validates :last_name, presence: true - validates :email, presence: true, unless: Proc.new { |editor| editor.kind == "emeritus" } - validates :login, presence: true, unless: Proc.new { |editor| editor.kind == "emeritus" } - validates :tracks, presence: true + validates :email, presence: true, unless: Proc.new { |editor| editor.kind == "emeritus" } + validates :login, presence: true, unless: Proc.new { |editor| editor.kind == "emeritus" } + validates :tracks, presence: true, unless: Proc.new { |editor| ["board", "emeritus"].include?(editor.kind) } belongs_to :user, optional: true has_many :papers diff --git a/app/models/track.rb b/app/models/track.rb index 4992af960..b88a80ea3 100644 --- a/app/models/track.rb +++ b/app/models/track.rb @@ -1,17 +1,24 @@ class Track < ApplicationRecord has_many :papers - has_many :subjects, inverse_of: :track + has_many :subjects, inverse_of: :track, dependent: :destroy has_and_belongs_to_many :editors has_many :track_aeics, dependent: :destroy has_many :aeics, through: :track_aeics, source: :editor - validates_uniqueness_of :code + validates_presence_of :name + validates_numericality_of :code, only_integer: true + validates_uniqueness_of :code, scope: :short_name + validates_presence_of :aeics, message: "Each track must have at least one Associate Editor in Chief" + + before_destroy { editors.clear } + + default_scope { order(code: :asc) } def full_name [code.to_s, name].join(" ") end def label - "Track: #{code} (#{name})" + "Track: #{code} (#{short_name})" end end diff --git a/app/views/editors/index.html.erb b/app/views/editors/index.html.erb index 6ec4e57cb..a4459f6c8 100644 --- a/app/views/editors/index.html.erb +++ b/app/views/editors/index.html.erb @@ -33,7 +33,7 @@
          + <%= link_to editor.login, editor, title: editor.full_name %> diff --git a/app/views/editors/new.html.erb b/app/views/editors/new.html.erb index 608777508..f5dc4b7ca 100644 --- a/app/views/editors/new.html.erb +++ b/app/views/editors/new.html.erb @@ -1,12 +1,10 @@ -
          -
          -
          -

          New Editor

          - <%= render 'form' %> +
          +
          +

          New Editor

          + <%= render 'form' %> - +
          diff --git a/app/views/tracks/_form.html.erb b/app/views/tracks/_form.html.erb new file mode 100644 index 000000000..c8e7013ca --- /dev/null +++ b/app/views/tracks/_form.html.erb @@ -0,0 +1,64 @@ +<%= form_for(@track) do |f| %> +
          + <% if @track.errors.any? %> +
          +

          Track could not be saved.

          +
            + <% @track.errors.each do |error| -%> +
          • <%= error.attribute.to_s.humanize %>: <%= error.message %>
          • + <% end -%> +
          +
          + <% end %> +
          + +
          +
          +
          + <%= f.label :name, "Name" %> + <%= f.text_field :name, class: "form-control" %> +
          +
          +
          + +
          +
          +
          + <%= f.label :short_name, "Short name" %> + <%= f.text_field :short_name, class: "form-control" %> +
          +
          + <%= f.label :code, "Code" %> + <%= f.text_field :code, class: "form-control" %> +
          +
          +
          + +
          + +
          +
          + <% + @aeics, aeics2 = @aeics.each_slice( (@aeics.size/2.0).round ).to_a if @aeics.size > 10 + %> +
          + <%= f.label :aeic, "AEiCs" %> + <%= f.collection_check_boxes(:aeic_ids, @aeics, :id, :full_name) do |b| + b.label(class: "label-container-check-box") { b.check_box(class: "form-check-inline") + b.text } + end %> +
          + +
          +
          + <%= f.collection_check_boxes(:aeic_ids, aeics2, :id, :full_name) do |b| + b.label(class: "label-container-check-box") { b.check_box(class: "form-check-inline") + b.text } + end if aeics2 %> +
          +
          +
          +
          + +
          + <%= f.submit class: "btn paper-submit" %> +
          +<% end %> diff --git a/app/views/tracks/edit.html.erb b/app/views/tracks/edit.html.erb new file mode 100644 index 000000000..6c483ac91 --- /dev/null +++ b/app/views/tracks/edit.html.erb @@ -0,0 +1,12 @@ +
          +
          +

          Editing track: <%= @track.short_name %>

          + <%= render 'form' %> + + +
          +
          diff --git a/app/views/tracks/index.html.erb b/app/views/tracks/index.html.erb new file mode 100644 index 000000000..2c7bd0980 --- /dev/null +++ b/app/views/tracks/index.html.erb @@ -0,0 +1,38 @@ +
          +
          +
          Hi, <%= current_user.editor.full_name %>
          +
          +
          + <%= image_tag "icon_papers.svg", height: "32px" %>

          Tracks

          +
          +
          +
          +
          + +
          + <%= link_to 'New Track', new_track_path, class: 'btn action-btn float-right' %> + +
          EmailName Token Sent Actions
          <%= onboarding_invitation.email %><%= onboarding_invitation.name %> <%= onboarding_invitation.token %> ><%= time_ago_in_words(onboarding_invitation.last_sent_at) %> ago diff --git a/db/migrate/20210607093405_create_onboarding_invitations.rb b/db/migrate/20210607093405_create_onboarding_invitations.rb index c986bc455..c6b7d5fb9 100644 --- a/db/migrate/20210607093405_create_onboarding_invitations.rb +++ b/db/migrate/20210607093405_create_onboarding_invitations.rb @@ -3,9 +3,13 @@ def change create_table :onboarding_invitations do |t| t.string :email t.string :token + t.string :name t.datetime :last_sent_at t.timestamps end + + add_index :onboarding_invitations, :token + add_index :onboarding_invitations, [:token, :email] end end diff --git a/db/schema.rb b/db/schema.rb index 20568d927..a5a3635bf 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -60,9 +60,12 @@ create_table "onboarding_invitations", force: :cascade do |t| t.string "email" t.string "token" + t.string "name" t.datetime "last_sent_at" t.datetime "created_at", precision: 6, null: false t.datetime "updated_at", precision: 6, null: false + t.index ["token", "email"], name: "index_onboarding_invitations_on_token_and_email" + t.index ["token"], name: "index_onboarding_invitations_on_token" end create_table "papers", force: :cascade do |t| From bf84475fd43bf2878fef69f615a983119b6bc9fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 9 Jun 2021 10:32:55 +0200 Subject: [PATCH 197/609] add specs for onboarding --- spec/system/onboarding_spec.rb | 84 ++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 spec/system/onboarding_spec.rb diff --git a/spec/system/onboarding_spec.rb b/spec/system/onboarding_spec.rb new file mode 100644 index 000000000..028bef948 --- /dev/null +++ b/spec/system/onboarding_spec.rb @@ -0,0 +1,84 @@ +require "rails_helper" + +feature "Onboarding" do + let(:user_editor) { create(:user, editor: create(:editor)) } + let(:admin) { create(:admin_user) } + + scenario "Is not public" do + visit onboardings_path + expect(page).to have_content("Please login first") + end + + scenario "Is not available to non-eic users" do + login_as(user_editor) + visit onboardings_path + expect(page).to have_content("You are not permitted to view that page") + end + + scenario "Is visible to admins" do + login_as(admin) + visit onboardings_path + expect(page).to_not have_content("You are not permitted to view that page") + expect(page).to have_content("Invitations to join the editorial team") + end + + feature "Manage invitations to join the editorial board" do + before do + login_as(admin) + end + + scenario "Create onboarding invitation" do + emails_sent = ActionMailer::Base.deliveries.count + + visit onboardings_path + fill_in :onboarding_invitation_email, with: "new@editor.org" + fill_in :onboarding_invitation_name, with: "J.R." + click_on "Invite" + + expect(page).to have_content("Invitation to join the editorial team sent") + within("#onboarding-invitations") do + expect(page).to have_content("new@editor.org") + expect(page).to have_content("J.R.") + end + + expect(ActionMailer::Base.deliveries.count).to eq(emails_sent + 1) + end + + scenario "Emails can't be duplicated" do + create(:onboarding_invitation, email: "abc@def.com") + + visit onboardings_path + fill_in :onboarding_invitation_email, with: "abc@def.com" + click_on "Invite" + + expect(page).to have_content("Email is already present in the list on sent invitations") + end + + scenario "Delete onboarding invitation" do + create(:onboarding_invitation, email: "editor@dele.te") + visit onboardings_path + within("#onboarding-invitations") { + expect(page).to have_content("editor@dele.te") + click_link "Delete" + } + + expect(page).to have_content("Onboarding invitation deleted") + expect(page).to_not have_content("editor@dele.te") + end + + scenario "Resend onboarding invitation" do + create(:onboarding_invitation, email: "invited@editor.org") + emails_sent = ActionMailer::Base.deliveries.count + + visit onboardings_path + within("#onboarding-invitations") { + expect(page).to have_content("invited@editor.org") + click_link "Re-invite" + } + expect(page).to have_content("Email sent again") + + expect(ActionMailer::Base.deliveries.count).to eq(emails_sent + 1) + expect(ActionMailer::Base.deliveries.last.to).to eq(["invited@editor.org"]) + end + end +end \ No newline at end of file From ac46172015e7343d9233d27776d851db83a67634 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 9 Jun 2021 11:11:13 +0200 Subject: [PATCH 198/609] move queries to controller --- app/controllers/editors_controller.rb | 3 ++- app/views/editors/index.html.erb | 4 ++-- spec/controllers/editors_controller_spec.rb | 6 ++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/controllers/editors_controller.rb b/app/controllers/editors_controller.rb index a0c274110..1fa07aa4d 100644 --- a/app/controllers/editors_controller.rb +++ b/app/controllers/editors_controller.rb @@ -5,7 +5,8 @@ class EditorsController < ApplicationController before_action :set_current_editor, only: [:profile, :update_profile] def index - @editors = Editor.all + @active_editors = Editor.active.order('last_name ASC') + @emeritus_editors = Editor.emeritus.order('last_name ASC') @assignment_by_editor = Paper.unscoped.in_progress.group(:editor_id).count @paused_by_editor = Paper.unscoped.in_progress.where("labels->>'paused' ILIKE '%'").group(:editor_id).count @pending_invitations_by_editor = Invitation.pending.group(:editor_id).count diff --git a/app/views/editors/index.html.erb b/app/views/editors/index.html.erb index a322a1cfc..e61f28b0b 100644 --- a/app/views/editors/index.html.erb +++ b/app/views/editors/index.html.erb @@ -27,7 +27,7 @@
          > <%= link_to(image_tag(avatar(editor.login), size: "24x24", class: "avatar", title: editor.full_name), github_user_link(editor.login), target: "_blank") %> @@ -72,7 +72,7 @@
          <%= link_to editor.full_name, editor %> > diff --git a/spec/controllers/editors_controller_spec.rb b/spec/controllers/editors_controller_spec.rb index 536b086ff..d1a920f89 100644 --- a/spec/controllers/editors_controller_spec.rb +++ b/spec/controllers/editors_controller_spec.rb @@ -37,10 +37,12 @@ end describe "#index" do - it "assigns all editors as @editors" do + it "assigns editors to @active_editors and @emeritus_editors" do editor = create(:editor) + emeritus = create(:editor, kind: "emeritus") get :index - expect(assigns(:editors)).to eq([editor]) + expect(assigns(:active_editors)).to eq([editor]) + expect(assigns(:emeritus_editors)).to eq([emeritus]) end it "assigns grouped availability information" do From db0c8b754c5456ec886f3c1d384d22bf27520bf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 9 Jun 2021 11:17:57 +0200 Subject: [PATCH 199/609] add pending state for editors --- app/models/editor.rb | 3 ++- spec/controllers/editors_controller_spec.rb | 1 + spec/models/editor_spec.rb | 4 +++- spec/system/editors/list_spec.rb | 6 ++++++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/models/editor.rb b/app/models/editor.rb index 93419cbe5..8f885c6f9 100644 --- a/app/models/editor.rb +++ b/app/models/editor.rb @@ -1,5 +1,5 @@ class Editor < ApplicationRecord - validates :kind, presence: true, inclusion: { in: ["board", "topic", "emeritus"] } + validates :kind, presence: true, inclusion: { in: ["board", "topic", "emeritus", "pending"] } validates :first_name, presence: true validates :last_name, presence: true validates :login, presence: true, unless: Proc.new { |editor| editor.kind == "emeritus" } @@ -20,6 +20,7 @@ class Editor < ApplicationRecord scope :board, -> { where(kind: "board") } scope :topic, -> { where(kind: "topic") } scope :emeritus, -> { where(kind: "emeritus") } + scope :pending, -> { where(kind: "pending") } scope :active, -> { where(kind: ACTIVE_EDITOR_STATES) } scope :since, -> (date) { where('created_at >= ?', date) } diff --git a/spec/controllers/editors_controller_spec.rb b/spec/controllers/editors_controller_spec.rb index d1a920f89..02f6d025f 100644 --- a/spec/controllers/editors_controller_spec.rb +++ b/spec/controllers/editors_controller_spec.rb @@ -40,6 +40,7 @@ it "assigns editors to @active_editors and @emeritus_editors" do editor = create(:editor) emeritus = create(:editor, kind: "emeritus") + create(:editor, kind: "pending") get :index expect(assigns(:active_editors)).to eq([editor]) expect(assigns(:emeritus_editors)).to eq([emeritus]) diff --git a/spec/models/editor_spec.rb b/spec/models/editor_spec.rb index fcd6d6314..dc65623a1 100644 --- a/spec/models/editor_spec.rb +++ b/spec/models/editor_spec.rb @@ -105,13 +105,15 @@ end describe "#active editors" do - it "should exclude emeritus" do + it "should exclude emeritus and pending" do editor_1 = create(:editor, login: "@board1", kind: "board") editor_2 = create(:editor, login: "@topic1", kind: "topic") editor_3 = create(:editor, login: "@retired1", kind: "emeritus") + editor_3 = create(:editor, login: "@pending1", kind: "pending") assert Editor.active.count == 2 assert Editor.emeritus.count == 1 + assert Editor.pending.count == 1 end end end diff --git a/spec/system/editors/list_spec.rb b/spec/system/editors/list_spec.rb index ace5a89a8..d97a0aaf5 100644 --- a/spec/system/editors/list_spec.rb +++ b/spec/system/editors/list_spec.rb @@ -45,5 +45,11 @@ visit editors_path expect(page).to have_content('Fancy') end + + scenario "Pending editors are not listed" do + create(:editor, first_name: "Future Editor", kind: "pending") + visit editors_path + expect(page).to_not have_content('Future Editor') + end end end From 9d1ca1df2a0746b4efa032e1c9bea4e04fcaa61e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 9 Jun 2021 12:41:44 +0200 Subject: [PATCH 200/609] list pending editors --- app/controllers/onboardings_controller.rb | 1 + app/models/editor.rb | 4 +++ app/views/content/layout/_navbar.html.erb | 2 +- app/views/onboardings/index.html.erb | 36 ++++++++++++++++++++ spec/factories/editors.rb | 8 +++++ spec/system/dashboard_spec.rb | 41 +++++++++++++++++++++++ spec/system/onboarding_spec.rb | 17 ++++++++++ 7 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 spec/system/dashboard_spec.rb diff --git a/app/controllers/onboardings_controller.rb b/app/controllers/onboardings_controller.rb index 15c11d5fe..65d903907 100644 --- a/app/controllers/onboardings_controller.rb +++ b/app/controllers/onboardings_controller.rb @@ -7,6 +7,7 @@ def editor def index @onboardings = OnboardingInvitation.all.order(last_sent_at: :desc) + @pending_editors = Editor.pending end def create diff --git a/app/models/editor.rb b/app/models/editor.rb index 8f885c6f9..52473354e 100644 --- a/app/models/editor.rb +++ b/app/models/editor.rb @@ -44,6 +44,10 @@ def retired? kind == "emeritus" end + def pending? + kind == "pending" + end + def category_list=(new_list = "") self.categories = new_list.split(/,\s+/) end diff --git a/app/views/content/layout/_navbar.html.erb b/app/views/content/layout/_navbar.html.erb index e728c87c5..398d09bf8 100644 --- a/app/views/content/layout/_navbar.html.erb +++ b/app/views/content/layout/_navbar.html.erb @@ -20,7 +20,7 @@ <%= link_to "AEiC", aeic_dashboard_path, class: "nav-item nav-link" %> <%- end %> - <%- if current_user&.editor %> + <%- if current_user&.editor && !current_user.editor.pending? %> <%= link_to "Dashboard", "/dashboard/#{current_user.editor.login}", class: "nav-item nav-link" %> <%- end %> diff --git a/app/views/onboardings/index.html.erb b/app/views/onboardings/index.html.erb index b50f1860e..7e893fd2d 100644 --- a/app/views/onboardings/index.html.erb +++ b/app/views/onboardings/index.html.erb @@ -72,5 +72,41 @@

          Pending editors

          + + <% if @pending_editors.empty? %> + There are no pending editors + <% else %> + + + + + + + + + + + + <%- @pending_editors.each do |editor| %> + + + + + + + + + <%- end %> + +
          NameGitHub userStatusActions
          <%= editor.full_name %>> + <%= link_to(image_tag(avatar(editor.login), size: "24x24", class: "avatar", title: "GitHub profile"), github_user_link(editor.login), target: "_blank") %> + <%= link_to editor.login, editor, title: "View info" %> + <%= ["Invitation to join organization sent. Pending acceptance.", "Joined organization, pending adding to Editors team"].sample %> + + <%= link_to("Approve", "#") %> + + <%= link_to("Re-send invitation to join GitHub organization", "#") %> +
          + <% end %>
          \ No newline at end of file diff --git a/spec/factories/editors.rb b/spec/factories/editors.rb index 11e710d2c..441baf52d 100644 --- a/spec/factories/editors.rb +++ b/spec/factories/editors.rb @@ -14,5 +14,13 @@ factory :board_editor do kind { "board" } end + + factory :emeritus_editor do + kind { "emeritus" } + end + + factory :pending_editor do + kind { "pending" } + end end end diff --git a/spec/system/dashboard_spec.rb b/spec/system/dashboard_spec.rb new file mode 100644 index 000000000..82a108952 --- /dev/null +++ b/spec/system/dashboard_spec.rb @@ -0,0 +1,41 @@ +require "rails_helper" + +feature "Dashboard" do + let(:dashboard_paths) {[dashboard_all_path, dashboard_incoming_path, dashboard_in_progress_path, dashboard_path]} + let(:user_editor) { create(:user, editor: create(:editor)) } + + scenario "Is not public" do + dashboard_paths.each do |dashboard_path| + visit dashboard_path + expect(page).to have_content("Please login first") + end + end + + scenario "Is not available to non-editor users" do + login_as(create(:user)) + dashboard_paths.each do |dashboard_path| + visit dashboard_path + expect(page).to have_content("You are not permitted to view that page") + end + end + + scenario "Is visible to editors" do + login_as(user_editor) + + visit root_path + expect(page).to have_link "Dashboard" + + dashboard_paths.each do |dashboard_path| + visit dashboard_path + expect(page).to_not have_content("You are not permitted to view that page") + expect(page).to have_content("Welcome, #{user_editor.editor.full_name}") + end + end + + scenario "Link is not visible to pending editors" do + login_as(create(:user, editor: create(:pending_editor))) + visit root_path + + expect(page).to_not have_link "Dashboard" + end +end \ No newline at end of file diff --git a/spec/system/onboarding_spec.rb b/spec/system/onboarding_spec.rb index 028bef948..a018a662f 100644 --- a/spec/system/onboarding_spec.rb +++ b/spec/system/onboarding_spec.rb @@ -81,4 +81,21 @@ expect(ActionMailer::Base.deliveries.last.to).to eq(["invited@editor.org"]) end end + + feature "Manage pending editors" do + before do + login_as(admin) + end + + scenario "List pending editors" do + create(:editor, first_name: "TopicEditor", last_name: "1") + create(:pending_editor, first_name: "PendingEditor", last_name: "2") + visit onboardings_path + + within("#pending-editors") do + expect(page).to have_content("PendingEditor 2") + expect(page).to_not have_content("TopicEditor") + end + end + end end \ No newline at end of file From 142f8a64584276a9cb2991ae263c13107f424dc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 11 Jun 2021 17:41:40 +0200 Subject: [PATCH 201/609] add default avatar_url to editor --- app/models/editor.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/models/editor.rb b/app/models/editor.rb index 52473354e..a35927ecc 100644 --- a/app/models/editor.rb +++ b/app/models/editor.rb @@ -11,6 +11,7 @@ class Editor < ApplicationRecord before_save :clear_title, if: :board_removed? before_save :format_login, if: :login_changed? + before_save :add_default_avatar_url ACTIVE_EDITOR_STATES = [ "board", @@ -75,4 +76,10 @@ def board_removed? def format_login login.gsub!(/^@/, "") end + + def add_default_avatar_url + if avatar_url.blank? && login.present? + self.avatar_url = "https://github.com/#{login}.png" + end + end end From f800fbb1d8608b4e946807f3a6fa39367c5c0e5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 14 Jun 2021 12:22:47 +0200 Subject: [PATCH 202/609] accept invitations and approve pending editors --- app/controllers/onboardings_controller.rb | 42 +++++++++- app/models/editor.rb | 7 ++ app/views/editors/profile.html.erb | 4 +- app/views/onboardings/editor.html.erb | 60 ++++++++++++++ app/views/onboardings/index.html.erb | 3 +- config/routes.rb | 2 + spec/controllers/editors_controller_spec.rb | 2 +- spec/factories/users_factory.rb | 1 + spec/models/editor_spec.rb | 32 +++++++ spec/system/onboarding_spec.rb | 92 +++++++++++++++++++++ 10 files changed, 237 insertions(+), 8 deletions(-) create mode 100644 app/views/onboardings/editor.html.erb diff --git a/app/controllers/onboardings_controller.rb b/app/controllers/onboardings_controller.rb index 65d903907..9c687a36d 100644 --- a/app/controllers/onboardings_controller.rb +++ b/app/controllers/onboardings_controller.rb @@ -1,10 +1,21 @@ class OnboardingsController < ApplicationController - before_action :require_user, only: [:editor] - before_action :require_admin_user, except: [:editor] + before_action :require_admin_user, except: [:editor, :add_editor] + before_action :require_user, only: [:editor, :add_editor] + before_action :check_invited_editor, only: [:editor, :add_editor] + before_action :load_editor, only: [:editor, :add_editor] def editor end + def add_editor + if @editor.update(new_editor_params) + flash[:notice] = "Thanks! An editor in chief will review your info soon" + else + flash[:error] = "Error saving your data: All fields are mandatory" + end + redirect_to editor_onboardings_path(@onboarding.token) + end + def index @onboardings = OnboardingInvitation.all.order(last_sent_at: :desc) @pending_editors = Editor.pending @@ -17,7 +28,14 @@ def create else flash[:error] = onboarding.errors.full_messages.first end + redirect_to onboardings_path + end + def accept_editor + if editor = Editor.find(params[:editor_id]) + editor.accept! + flash[:notice] = "#{editor.full_name} (#{editor.login}) accepted as topic editor!" + end redirect_to onboardings_path end @@ -39,7 +57,27 @@ def destroy private + def check_invited_editor + unless @onboarding = OnboardingInvitation.find_by(token: params[:token], email: current_user.email) + flash[:error] = "The page you requested is not available" + redirect_to root_path + end + + unless !current_user.editor? || current_user.editor.pending? + flash[:error] = "You already are an editor" + redirect_to root_path + end + end + + def load_editor + @editor = current_user.editor || Editor.new(user: current_user, kind: "pending") + end + def onboarding_invitation_params params.require(:onboarding_invitation).permit(:email, :name) end + + def new_editor_params + params.require(:editor).permit(:first_name, :last_name, :login, :email).merge(kind: "pending") + end end diff --git a/app/models/editor.rb b/app/models/editor.rb index a35927ecc..adf00f7fe 100644 --- a/app/models/editor.rb +++ b/app/models/editor.rb @@ -49,6 +49,13 @@ def pending? kind == "pending" end + def accept! + update_attribute(:kind, "topic") if self.pending? + if invite = OnboardingInvitation.find_by(email: self.email) + invite.destroy + end + end + def category_list=(new_list = "") self.categories = new_list.split(/,\s+/) end diff --git a/app/views/editors/profile.html.erb b/app/views/editors/profile.html.erb index 98e279d82..55ce4aaad 100644 --- a/app/views/editors/profile.html.erb +++ b/app/views/editors/profile.html.erb @@ -80,9 +80,7 @@ <% end %> + - - - \ No newline at end of file diff --git a/app/views/onboardings/editor.html.erb b/app/views/onboardings/editor.html.erb new file mode 100644 index 000000000..51c5e203b --- /dev/null +++ b/app/views/onboardings/editor.html.erb @@ -0,0 +1,60 @@ +
          +
          +
          +

          Please complete your editor info:

          + +
          + + <%= form_for(@editor ||= Editor.new, url: add_editor_onboardings_path, method: :post) do |f| %> +
          + <% if @editor.errors.any? %> +
          +

          <%= pluralize(@editor.errors.count, "error") %> prohibited this editor from being saved:

          + +
            + <% @editor.errors.each do |error| %> +
          • <%= error.attribute.to_s.humanize %>: <%= error.message %>
          • + <% end %> +
          +
          + <% end %> +
          + +
          +
          +
          + <%= f.label :first_name %> + <%= f.text_field :first_name, class: "form-control" %> +
          + +
          + <%= f.label :last_name %> + <%= f.text_field :last_name, class: "form-control" %> +
          +
          +
          + +
          +
          +
          + <%= f.label :email %> + <%= f.email_field :email, class: "form-control" %> +
          + +
          + <%= f.label :login, "GitHub username" %> + <%= f.text_field :login, placeholder: "@username", class: "form-control" %> +
          +
          +
          + +
          + <%= hidden_field_tag "token", @onboarding.token %> + <%= f.submit "Save editor data", class: "btn action-btn" %> +
          + <% end %> +
          + +
          +
          +
          \ No newline at end of file diff --git a/app/views/onboardings/index.html.erb b/app/views/onboardings/index.html.erb index 7e893fd2d..9175f900c 100644 --- a/app/views/onboardings/index.html.erb +++ b/app/views/onboardings/index.html.erb @@ -1,5 +1,4 @@
          -

          <%= notice %>

          Editors in Chief Dashboard
          @@ -98,7 +97,7 @@ <%= ["Invitation to join organization sent. Pending acceptance.", "Joined organization, pending adding to Editors team"].sample %>
          - <%= link_to("Approve", "#") %> + <%= link_to("Approve", accept_editor_onboardings_path(editor_id: editor.id), method: :post, data: {confirm: "This will make #{editor.login} a topic editor" }) %> <%= link_to("Re-send invitation to join GitHub organization", "#") %> diff --git a/config/routes.rb b/config/routes.rb index f7e78584f..e6831b833 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -31,6 +31,8 @@ collection do get :pending get 'editor/:token', action: :editor, as: :editor + post :add_editor + post :accept_editor end end diff --git a/spec/controllers/editors_controller_spec.rb b/spec/controllers/editors_controller_spec.rb index 02f6d025f..db3cc8f4d 100644 --- a/spec/controllers/editors_controller_spec.rb +++ b/spec/controllers/editors_controller_spec.rb @@ -42,7 +42,7 @@ emeritus = create(:editor, kind: "emeritus") create(:editor, kind: "pending") get :index - expect(assigns(:active_editors)).to eq([editor]) + expect(assigns(:active_editors)).to eq([current_user.editor, editor]) expect(assigns(:emeritus_editors)).to eq([emeritus]) end diff --git a/spec/factories/users_factory.rb b/spec/factories/users_factory.rb index 59bd4d859..690f83993 100644 --- a/spec/factories/users_factory.rb +++ b/spec/factories/users_factory.rb @@ -9,6 +9,7 @@ factory :admin_user do admin { true } + editor { create(:editor) } end factory :no_email_user do diff --git a/spec/models/editor_spec.rb b/spec/models/editor_spec.rb index dc65623a1..0207033ee 100644 --- a/spec/models/editor_spec.rb +++ b/spec/models/editor_spec.rb @@ -116,4 +116,36 @@ assert Editor.pending.count == 1 end end + + describe "#accept!" do + it "should upgrade a pending editor to a topic editor" do + editor = create(:pending_editor) + + assert editor.kind = "pending" + editor.accept! + assert editor.reload.kind = "topic" + end + + it "should delete the onboarding invitation" do + editor = create(:pending_editor) + create(:onboarding_invitation, email: editor.email) + create(:onboarding_invitation) + + expect { editor.accept! }.to change(OnboardingInvitation, :count).by(-1) + end + + it "should not affect non-pending editors" do + topic_editor = create(:editor) + board_editor = create(:board_editor) + emeritus_editor = create(:emeritus_editor) + + topic_editor.accept! + board_editor.accept! + emeritus_editor.accept! + + assert topic_editor.reload.kind = "topic" + assert board_editor.reload.kind = "board" + assert emeritus_editor.reload.kind = "emeritus" + end + end end diff --git a/spec/system/onboarding_spec.rb b/spec/system/onboarding_spec.rb index a018a662f..c3771d12a 100644 --- a/spec/system/onboarding_spec.rb +++ b/spec/system/onboarding_spec.rb @@ -1,6 +1,7 @@ require "rails_helper" feature "Onboarding" do + let(:user) { create(:user) } let(:user_editor) { create(:user, editor: create(:editor)) } let(:admin) { create(:admin_user) } @@ -83,6 +84,8 @@ end feature "Manage pending editors" do + let(:pending_editor) { create(:pending_editor, first_name: "Laura", last_name: "Edits", login: "lauraedits33") } + before do login_as(admin) end @@ -97,5 +100,94 @@ expect(page).to_not have_content("TopicEditor") end end + + scenario "Accept pending editor" do + user = create(:user, editor: pending_editor) + visit onboardings_path + + within("#pending-editors") do + expect(page).to have_content("Laura Edits") + click_link "Approve" + end + + expect(page).to have_content("Laura Edits (lauraedits33) accepted as topic editor!") + expect(page).to_not have_css("#pending-editors") + + create(:pending_editor) + visit onboardings_path + within("#pending-editors") do + expect(page).to_not have_content("Laura Edits") + end + + visit editors_path + expect(page).to have_content("lauraedits33") + end + end + + feature "Invitations acceptance" do + let(:onboarding_invitation) { create(:onboarding_invitation, email: user.email) } + + before do + login_as(user) + end + + scenario "Users can't access other users invitations" do + inv = create(:onboarding_invitation) + visit editor_onboardings_path(inv.token) + + expect(page).to have_content("The page you requested is not available") + end + + scenario "Invitation is not valid if user is already an editor" do + create(:editor, user: user) + visit editor_onboardings_path(onboarding_invitation.token) + + expect(page).to have_content("You already are an editor") + end + + scenario "User can access they own invitations" do + visit editor_onboardings_path(onboarding_invitation.token) + expect(page).to have_content("Please complete your editor info:") + end + + scenario "Accepting invitations create a pending editor" do + visit editor_onboardings_path(onboarding_invitation.token) + fill_in :editor_first_name, with: "Eddie" + fill_in :editor_last_name, with: "Tor" + fill_in :editor_email, with: "edi@tor.com" + fill_in :editor_login, with: "@test_editor" + click_on "Save editor data" + + expect(page).to have_content("Thanks! An editor in chief will review your info soon") + expect(user.editor).to be_pending + end + + scenario "Pending editors can update their info" do + user.editor = create(:pending_editor, first_name: "WrongName") + + visit editor_onboardings_path(onboarding_invitation.token) + fill_in :editor_first_name, with: "UpdatedName" + click_on "Save editor data" + + expect(user.editor.reload.first_name).to eq("UpdatedName") + end + + scenario "All fields are mandatory" do + data = { editor_first_name: "Eddie", + editor_last_name: "Tor", + editor_email: "edi@tor.com", + editor_login: "@test" } + + data.keys.each do |field_name| + visit editor_onboardings_path(onboarding_invitation.token) + fields = data.keys - [field_name] + fields.each do |field| + fill_in field, with: data[:field] + end + click_on "Save editor data" + + expect(page).to have_content("Error saving your data: All fields are mandatory") + end + end end end \ No newline at end of file From 6cf8cada7ad60326656d2c898ce504f300092c01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 15 Jun 2021 11:56:52 +0200 Subject: [PATCH 203/609] fix double redirection --- app/controllers/onboardings_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/onboardings_controller.rb b/app/controllers/onboardings_controller.rb index 9c687a36d..b9d4f8b31 100644 --- a/app/controllers/onboardings_controller.rb +++ b/app/controllers/onboardings_controller.rb @@ -60,7 +60,7 @@ def destroy def check_invited_editor unless @onboarding = OnboardingInvitation.find_by(token: params[:token], email: current_user.email) flash[:error] = "The page you requested is not available" - redirect_to root_path + redirect_to(root_path) and return end unless !current_user.editor? || current_user.editor.pending? From bc0540e366ac26b804fa264f24402d6c9dcd2239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 15 Jun 2021 11:58:50 +0200 Subject: [PATCH 204/609] add tracking of acceptance and team invitations to onboardings --- app/models/onboarding_invitation.rb | 18 +++++ ...ed_to_team_at_to_onboarding_invitations.rb | 6 ++ db/schema.rb | 4 +- spec/models/onboarding_invitation_spec.rb | 73 +++++++++++++++++++ 4 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20210615091027_add_accepted_at_and_invited_to_team_at_to_onboarding_invitations.rb diff --git a/app/models/onboarding_invitation.rb b/app/models/onboarding_invitation.rb index 481275176..fde080c45 100644 --- a/app/models/onboarding_invitation.rb +++ b/app/models/onboarding_invitation.rb @@ -7,11 +7,29 @@ class OnboardingInvitation < ApplicationRecord before_validation :strip_email after_create :send_email + scope :pending_acceptance, -> { where(accepted_at: nil) } + def send_email Notifications.onboarding_invitation_email(self).deliver_now self.touch(:last_sent_at) end + def accepted? + self.accepted_at.present? + end + + def invited_to_team? + self.invited_to_team_at.present? + end + + def accepted! + self.touch(:accepted_at) + end + + def invited_to_team! + self.touch(:invited_to_team_at) + end + private def set_token diff --git a/db/migrate/20210615091027_add_accepted_at_and_invited_to_team_at_to_onboarding_invitations.rb b/db/migrate/20210615091027_add_accepted_at_and_invited_to_team_at_to_onboarding_invitations.rb new file mode 100644 index 000000000..0794fdcab --- /dev/null +++ b/db/migrate/20210615091027_add_accepted_at_and_invited_to_team_at_to_onboarding_invitations.rb @@ -0,0 +1,6 @@ +class AddAcceptedAtAndInvitedToTeamAtToOnboardingInvitations < ActiveRecord::Migration[6.1] + def change + add_column :onboarding_invitations, :accepted_at, :datetime, default: nil + add_column :onboarding_invitations, :invited_to_team_at, :datetime, default: nil + end +end diff --git a/db/schema.rb b/db/schema.rb index a5a3635bf..ab7d40547 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2021_06_07_093405) do +ActiveRecord::Schema.define(version: 2021_06_15_091027) do # These are extensions that must be enabled in order to support this database enable_extension "hstore" @@ -64,6 +64,8 @@ t.datetime "last_sent_at" t.datetime "created_at", precision: 6, null: false t.datetime "updated_at", precision: 6, null: false + t.datetime "accepted_at" + t.datetime "invited_to_team_at" t.index ["token", "email"], name: "index_onboarding_invitations_on_token_and_email" t.index ["token"], name: "index_onboarding_invitations_on_token" end diff --git a/spec/models/onboarding_invitation_spec.rb b/spec/models/onboarding_invitation_spec.rb index 55e5dd30d..cecae0c90 100644 --- a/spec/models/onboarding_invitation_spec.rb +++ b/spec/models/onboarding_invitation_spec.rb @@ -52,4 +52,77 @@ end end end + + describe "#accepted!" do + it "should update accepted_at info" do + onboarding = create(:onboarding_invitation) + expect(onboarding.accepted_at).to be_nil + + onboarding.accepted! + accepted_at_1 = onboarding.reload.accepted_at + + onboarding.accepted! + accepted_at_2 = onboarding.reload.accepted_at + + expect(accepted_at_1).to_not be_nil + expect(accepted_at_2).to_not be_nil + expect(accepted_at_1 < accepted_at_2).to be true + end + end + + describe "#accepted?" do + it "should be true if accepted_at is present" do + onboarding = create(:onboarding_invitation, accepted_at: Time.now) + expect(onboarding.accepted?).to be true + end + + it "should be false if accepted_at is nil" do + onboarding = create(:onboarding_invitation, accepted_at: nil) + expect(onboarding.accepted?).to be false + end + end + + describe "#invited_to_team!" do + it "should update invited_to_team_at info" do + onboarding = create(:onboarding_invitation) + expect(onboarding.invited_to_team_at).to be_nil + + onboarding.invited_to_team! + invited_to_team_at_1 = onboarding.reload.invited_to_team_at + + onboarding.invited_to_team! + invited_to_team_at_2 = onboarding.reload.invited_to_team_at + + expect(invited_to_team_at_1).to_not be_nil + expect(invited_to_team_at_2).to_not be_nil + expect(invited_to_team_at_1 < invited_to_team_at_2).to be true + end + end + + describe "#invited_to_team?" do + it "should be true if invited_to_team_at is present" do + onboarding = create(:onboarding_invitation, invited_to_team_at: Time.now) + expect(onboarding.invited_to_team?).to be true + end + + it "should be false if invited_to_team_at is nil" do + onboarding = create(:onboarding_invitation, invited_to_team_at: nil) + expect(onboarding.invited_to_team?).to be false + end + end + + describe "pending_acceptance scope" do + it "should return only accepted onboarding invitations" do + accepted_onboarding = create(:onboarding_invitation, accepted_at: Time.now) + not_accepted_onboarding = create(:onboarding_invitation, accepted_at: nil) + + scope_results = OnboardingInvitation.pending_acceptance.to_a + expect(scope_results).to eq([not_accepted_onboarding]) + end + + it "should be false if invited_to_team_at is nil" do + onboarding = create(:onboarding_invitation, invited_to_team_at: nil) + expect(onboarding.invited_to_team?).to be false + end + end end From 6af974de5cdb6aa784e0b47aa36fd7595bef6dd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 15 Jun 2021 12:44:09 +0200 Subject: [PATCH 205/609] assign editor on onboarding acceptance --- app/controllers/onboardings_controller.rb | 5 +++-- app/models/editor.rb | 1 + app/models/onboarding_invitation.rb | 6 ++++-- ...01009_add_editor_id_to_onboarding_invitations.rb | 5 +++++ db/schema.rb | 4 +++- spec/models/onboarding_invitation_spec.rb | 11 +++++++++++ spec/system/onboarding_spec.rb | 13 +++++++++++++ 7 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 db/migrate/20210615101009_add_editor_id_to_onboarding_invitations.rb diff --git a/app/controllers/onboardings_controller.rb b/app/controllers/onboardings_controller.rb index b9d4f8b31..1370da8dc 100644 --- a/app/controllers/onboardings_controller.rb +++ b/app/controllers/onboardings_controller.rb @@ -9,6 +9,7 @@ def editor def add_editor if @editor.update(new_editor_params) + @onboarding.accepted!(@editor) flash[:notice] = "Thanks! An editor in chief will review your info soon" else flash[:error] = "Error saving your data: All fields are mandatory" @@ -17,8 +18,8 @@ def add_editor end def index - @onboardings = OnboardingInvitation.all.order(last_sent_at: :desc) - @pending_editors = Editor.pending + @onboardings = OnboardingInvitation.pending_acceptance.order(last_sent_at: :desc) + @pending_editors = Editor.includes(:onboarding_invitation).pending end def create diff --git a/app/models/editor.rb b/app/models/editor.rb index adf00f7fe..3806f7873 100644 --- a/app/models/editor.rb +++ b/app/models/editor.rb @@ -8,6 +8,7 @@ class Editor < ApplicationRecord has_many :papers has_many :votes has_many :invitations + has_one :onboarding_invitation, dependent: :destroy before_save :clear_title, if: :board_removed? before_save :format_login, if: :login_changed? diff --git a/app/models/onboarding_invitation.rb b/app/models/onboarding_invitation.rb index fde080c45..3ea696649 100644 --- a/app/models/onboarding_invitation.rb +++ b/app/models/onboarding_invitation.rb @@ -1,4 +1,6 @@ class OnboardingInvitation < ApplicationRecord + belongs_to :editor, optional: true + validates :email, presence: true validates_uniqueness_of :email, message: "is already present in the list on sent invitations" validates :token, presence: true, uniqueness: true @@ -22,8 +24,8 @@ def invited_to_team? self.invited_to_team_at.present? end - def accepted! - self.touch(:accepted_at) + def accepted!(ed = nil) + self.update(editor: ed, accepted_at: Time.now) end def invited_to_team! diff --git a/db/migrate/20210615101009_add_editor_id_to_onboarding_invitations.rb b/db/migrate/20210615101009_add_editor_id_to_onboarding_invitations.rb new file mode 100644 index 000000000..1ca5a5295 --- /dev/null +++ b/db/migrate/20210615101009_add_editor_id_to_onboarding_invitations.rb @@ -0,0 +1,5 @@ +class AddEditorIdToOnboardingInvitations < ActiveRecord::Migration[6.1] + def change + add_reference :onboarding_invitations, :editor + end +end diff --git a/db/schema.rb b/db/schema.rb index ab7d40547..4731de3c0 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2021_06_15_091027) do +ActiveRecord::Schema.define(version: 2021_06_15_101009) do # These are extensions that must be enabled in order to support this database enable_extension "hstore" @@ -66,6 +66,8 @@ t.datetime "updated_at", precision: 6, null: false t.datetime "accepted_at" t.datetime "invited_to_team_at" + t.bigint "editor_id" + t.index ["editor_id"], name: "index_onboarding_invitations_on_editor_id" t.index ["token", "email"], name: "index_onboarding_invitations_on_token_and_email" t.index ["token"], name: "index_onboarding_invitations_on_token" end diff --git a/spec/models/onboarding_invitation_spec.rb b/spec/models/onboarding_invitation_spec.rb index cecae0c90..1fcc550dc 100644 --- a/spec/models/onboarding_invitation_spec.rb +++ b/spec/models/onboarding_invitation_spec.rb @@ -68,6 +68,17 @@ expect(accepted_at_2).to_not be_nil expect(accepted_at_1 < accepted_at_2).to be true end + + it "should assign an editor" do + onboarding = create(:onboarding_invitation) + editor = create(:pending_editor) + expect(onboarding.accepted_at).to be_nil + + onboarding.accepted!(editor) + + expect(onboarding.reload.accepted_at).to_not be_nil + expect(onboarding.editor_id).to eq(editor.id) + end end describe "#accepted?" do diff --git a/spec/system/onboarding_spec.rb b/spec/system/onboarding_spec.rb index c3771d12a..00a94e7f4 100644 --- a/spec/system/onboarding_spec.rb +++ b/spec/system/onboarding_spec.rb @@ -81,6 +81,17 @@ expect(ActionMailer::Base.deliveries.count).to eq(emails_sent + 1) expect(ActionMailer::Base.deliveries.last.to).to eq(["invited@editor.org"]) end + + scenario "List pending invitations" do + create(:onboarding_invitation, email: "invited@editor.org") + create(:onboarding_invitation, email: "accepted@editor.org", accepted_at: Time.now) + + visit onboardings_path + within("#onboarding-invitations") { + expect(page).to have_content("invited@editor.org") + expect(page).to_not have_content("accepted@editor.org") + } + end end feature "Manage pending editors" do @@ -160,6 +171,8 @@ expect(page).to have_content("Thanks! An editor in chief will review your info soon") expect(user.editor).to be_pending + expect(onboarding_invitation.reload).to be_accepted + expect(onboarding_invitation.editor).to eq(user.editor) end scenario "Pending editors can update their info" do From 599fbede1396ca59fe90693cc42ab69257555ef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 16 Jun 2021 14:30:12 +0200 Subject: [PATCH 206/609] update Octokit --- Gemfile | 2 +- Gemfile.lock | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index ac6642dd4..f02d62c3f 100644 --- a/Gemfile +++ b/Gemfile @@ -13,7 +13,7 @@ gem 'commonmarker', '~> 0.21.1' gem 'octicons_helper', '~> 11.3' gem 'omniauth-orcid', '~> 2.1.1' gem 'omniauth-rails_csrf_protection' -gem 'octokit', '~> 4.20' +gem 'octokit', '~> 4.21' gem 'pdf-reader', '~> 2.4.2' gem 'pg', '~> 1.2.3' # TODO: Remove git reference and revert to latest release diff --git a/Gemfile.lock b/Gemfile.lock index 61833d861..15abe84a7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -133,12 +133,16 @@ GEM factory_bot_rails (6.1.0) factory_bot (~> 6.1.0) railties (>= 5.0.0) - faraday (1.4.1) + faraday (1.4.2) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) faraday-net_http (~> 1.0) faraday-net_http_persistent (~> 1.1) multipart-post (>= 1.2, < 3) ruby2_keywords (>= 0.0.4) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) faraday-excon (1.1.0) faraday-net_http (1.0.1) faraday-net_http_persistent (1.1.0) @@ -451,7 +455,7 @@ DEPENDENCIES jquery-rails (~> 4.4.0) newrelic_rpm octicons_helper (~> 11.3) - octokit (~> 4.20) + octokit (~> 4.21) omniauth-orcid (~> 2.1.1) omniauth-rails_csrf_protection pdf-reader (~> 2.4.2) From da7e5b37ceed70659af729a8b827a86d246e4829 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 16 Jun 2021 14:30:42 +0200 Subject: [PATCH 207/609] allow to edit pending editors info --- app/views/editors/_form.html.erb | 12 ++++++++++-- app/views/editors/edit.html.erb | 6 +++++- app/views/editors/show.html.erb | 6 +++++- spec/system/editors/list_spec.rb | 18 +++++++++++++++--- 4 files changed, 35 insertions(+), 7 deletions(-) diff --git a/app/views/editors/_form.html.erb b/app/views/editors/_form.html.erb index 19d506feb..077559608 100644 --- a/app/views/editors/_form.html.erb +++ b/app/views/editors/_form.html.erb @@ -17,7 +17,11 @@
          <%= f.label :kind, "Kind" %> - <%= f.select :kind, %w(topic board emeritus), {}, class: "form-control" %> + <% if @editor.pending? %> + <%= f.text_field :kind, disabled: true, class: "form-control" %> + <% else %> + <%= f.select :kind, %w(topic board emeritus), {}, class: "form-control" %> + <% end %>
          <%= f.label :max_assignments, "Max number of assignments" %> @@ -52,7 +56,11 @@
          <%= f.label :login %> - <%= f.select :login, Repository.editors, { include_blank: true, selected: "@#{@editor.login}" }, class: "form-control" %> + <% if @editor.pending? %> + <%= f.text_field :login, disabled: true, class: "form-control" %> + <% else %> + <%= f.select :login, Repository.editors, { include_blank: true, selected: "@#{@editor.login}" }, class: "form-control" %> + <% end %>
          diff --git a/app/views/editors/edit.html.erb b/app/views/editors/edit.html.erb index 4038abb7b..a96b434e7 100644 --- a/app/views/editors/edit.html.erb +++ b/app/views/editors/edit.html.erb @@ -5,7 +5,11 @@
          diff --git a/app/views/editors/show.html.erb b/app/views/editors/show.html.erb index 7bba037fb..a49d96a8f 100644 --- a/app/views/editors/show.html.erb +++ b/app/views/editors/show.html.erb @@ -59,7 +59,11 @@
          diff --git a/spec/system/editors/list_spec.rb b/spec/system/editors/list_spec.rb index d97a0aaf5..8ccd36d1e 100644 --- a/spec/system/editors/list_spec.rb +++ b/spec/system/editors/list_spec.rb @@ -23,7 +23,7 @@ feature "Logged as an admin" do before do - create(:editor, first_name: 'Tester', + @editor = create(:editor, first_name: 'Tester', login: 'tester', description: 'Software testing editor', categories: ['Computing', 'Test systems'], @@ -37,12 +37,24 @@ expect(page).to have_content('2*') end - scenario "editors info is editable" do + scenario "show editor's info" do + click_link "tester" + expect(current_path).to eq(editor_path(@editor)) + expect(page).to have_content('Tester') + expect(page).to have_content('Computing, Test systems') + expect(page).to have_content('Software testing editor') + expect(page).to have_content('topic') + click_link 'List' + expect(current_path).to eq(editors_path) + end + + scenario "change editor info" do allow(Repository).to receive(:editors).and_return(["@tester", "@mctester"]) click_link "Edit", href: edit_editor_path(Editor.find_by(login: 'tester')) fill_in :editor_category_list, with: "Fancy" click_on "Update Editor" - visit editors_path + click_link 'List' + expect(current_path).to eq(editors_path) expect(page).to have_content('Fancy') end From 4e7be98401f3ac0e50afe7867821c5624440c637 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 16 Jun 2021 14:59:41 +0200 Subject: [PATCH 208/609] send invitations to GitHub editors team --- app/controllers/onboardings_controller.rb | 18 +++++-- app/views/onboardings/index.html.erb | 16 +++++-- config/routes.rb | 1 + lib/repository.rb | 20 ++++++++ spec/system/editors/list_spec.rb | 4 +- spec/system/onboarding_spec.rb | 58 ++++++++++++++++++++++- 6 files changed, 108 insertions(+), 9 deletions(-) diff --git a/app/controllers/onboardings_controller.rb b/app/controllers/onboardings_controller.rb index 1370da8dc..3c785bbb3 100644 --- a/app/controllers/onboardings_controller.rb +++ b/app/controllers/onboardings_controller.rb @@ -2,7 +2,7 @@ class OnboardingsController < ApplicationController before_action :require_admin_user, except: [:editor, :add_editor] before_action :require_user, only: [:editor, :add_editor] before_action :check_invited_editor, only: [:editor, :add_editor] - before_action :load_editor, only: [:editor, :add_editor] + before_action :load_editor, only: [:editor, :add_editor, ] def editor end @@ -11,10 +11,11 @@ def add_editor if @editor.update(new_editor_params) @onboarding.accepted!(@editor) flash[:notice] = "Thanks! An editor in chief will review your info soon" + redirect_to root_path else flash[:error] = "Error saving your data: All fields are mandatory" + redirect_to editor_onboardings_path(@onboarding.token) end - redirect_to editor_onboardings_path(@onboarding.token) end def index @@ -35,7 +36,7 @@ def create def accept_editor if editor = Editor.find(params[:editor_id]) editor.accept! - flash[:notice] = "#{editor.full_name} (#{editor.login}) accepted as topic editor!" + flash[:notice] = "#{editor.full_name} (@#{editor.login}) accepted as topic editor!" end redirect_to onboardings_path end @@ -56,6 +57,17 @@ def destroy redirect_to onboardings_path end + def invite_to_editors_team + editor = Editor.find(params[:editor_id]) + if editor && Repository.invite_to_editors_team(editor.login) + editor.onboarding_invitation.invited_to_team! + flash[:notice] = "@#{editor.login} invited to GitHub Open Journals' editors team" + else + flash[:error] = "Failure sending GitHub invitation" + end + redirect_to onboardings_path + end + private def check_invited_editor diff --git a/app/views/onboardings/index.html.erb b/app/views/onboardings/index.html.erb index 9175f900c..af9f873a3 100644 --- a/app/views/onboardings/index.html.erb +++ b/app/views/onboardings/index.html.erb @@ -69,7 +69,7 @@ <% end %> -
          +

          Pending editors

          <% if @pending_editors.empty? %> @@ -94,13 +94,23 @@ <%= link_to editor.login, editor, title: "View info" %>
          - <%= ["Invitation to join organization sent. Pending acceptance.", "Joined organization, pending adding to Editors team"].sample %> + <% if Repository.editors.include?("@#{editor.login}") %> + Joined GitHub organization and editors team! + <% elsif editor.onboarding_invitation&.invited_to_team? %> + Invitation to join organization sent. Pending acceptance. + <% else %> + Information registered. Ready to be invited to GitHub team + <% end %> <%= link_to("Approve", accept_editor_onboardings_path(editor_id: editor.id), method: :post, data: {confirm: "This will make #{editor.login} a topic editor" }) %> - <%= link_to("Re-send invitation to join GitHub organization", "#") %> + <% if editor.onboarding_invitation&.invited_to_team? %> + <%= link_to("Re-send invitation to join GitHub organization", invite_to_editors_team_onboardings_path(editor_id: editor.id), method: :post) %> + <% else %> + <%= link_to("Send invitation to join GitHub team", invite_to_editors_team_onboardings_path(editor_id: editor.id), method: :post) %> + <% end %>
          Reviews ReviewersLast comment<%= sort_icon(@order) %>Last activity <%= sort_activity(params[:order]) %><%= sort_icon(params[:order]) %>
          <%= vote.editor.user.name %> (<%= vote.editor.login %>)<%= vote_comment_preview(vote) %><%= octicon "clippy", "data-clipboard-action": "copy", "data-clipboard-text": "#{vote.comment}", height: 16, class: "clipboard-btn", style: "cursor: pointer;" %> <%= vote_comment_preview(vote) %> <%= time_ago_in_words(vote.created_at) %> ago
          StatusPaper titlePaper titleScope InvitesReviews Reviewers Last activity <%= sort_activity(params[:order]) %><%= sort_icon(params[:order]) %>
          <%= comment_activity(paper) %><%= paper.pretty_percentage %> %
          <%= invitation_status(invitation) %> >Invited <%= time_ago_in_words(invitation.created_at) %> ago<%= link_to("Cancel", expire_invitation_path(invitation, page: params[:page]), method: :put, data: {confirm: "Are you sure you want to mark this invitation as expired?" }) if invitation.pending? %><%= link_to("Cancel", expire_invitation_path(invitation, page: params[:page], track_id: params[:track_id].presence), method: :put, data: {confirm: "Are you sure you want to mark this invitation as expired?" }) if invitation.pending? %>
          ` elements. + +body { + margin: 0; // 1 + font-family: $font-family-base; + @include font-size($font-size-base); + font-weight: $font-weight-base; + line-height: $line-height-base; + color: $body-color; + text-align: left; // 3 + background-color: $body-bg; // 2 +} + +// Suppress the focus outline on elements that cannot be accessed via keyboard. +// This prevents an unwanted focus outline from appearing around elements that +// might still respond to pointer events. +// +// Credit: https://github.com/suitcss/base +[tabindex="-1"]:focus { + outline: 0 !important; +} + + +// Content grouping +// +// 1. Add the correct box sizing in Firefox. +// 2. Show the overflow in Edge and IE. + +hr { + box-sizing: content-box; // 1 + height: 0; // 1 + overflow: visible; // 2 +} + + +// +// Typography +// + +// Remove top margins from headings +// +// By default, `

          `-`

          ` all receive top and bottom margins. We nuke the top +// margin for easier control within type scales as it avoids margin collapsing. +// stylelint-disable-next-line selector-list-comma-newline-after +h1, h2, h3, h4, h5, h6 { + margin-top: 0; + margin-bottom: $headings-margin-bottom; +} + +// Reset margins on paragraphs +// +// Similarly, the top margin on `

          `s get reset. However, we also reset the +// bottom margin to use `rem` units instead of `em`. +p { + margin-top: 0; + margin-bottom: $paragraph-margin-bottom; +} + +// Abbreviations +// +// 1. Duplicate behavior to the data-* attribute for our tooltip plugin +// 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. +// 3. Add explicit cursor to indicate changed behavior. +// 4. Remove the bottom border in Firefox 39-. +// 5. Prevent the text-decoration to be skipped. + +abbr[title], +abbr[data-original-title] { // 1 + text-decoration: underline; // 2 + text-decoration: underline dotted; // 2 + cursor: help; // 3 + border-bottom: 0; // 4 + text-decoration-skip-ink: none; // 5 +} + +address { + margin-bottom: 1rem; + font-style: normal; + line-height: inherit; +} + +ol, +ul, +dl { + margin-top: 0; + margin-bottom: 1rem; +} + +ol ol, +ul ul, +ol ul, +ul ol { + margin-bottom: 0; +} + +dt { + font-weight: $dt-font-weight; +} + +dd { + margin-bottom: .5rem; + margin-left: 0; // Undo browser default +} + +blockquote { + margin: 0 0 1rem; +} + +b, +strong { + font-weight: $font-weight-bolder; // Add the correct font weight in Chrome, Edge, and Safari +} + +small { + @include font-size(80%); // Add the correct font size in all browsers +} + +// +// Prevent `sub` and `sup` elements from affecting the line height in +// all browsers. +// + +sub, +sup { + position: relative; + @include font-size(75%); + line-height: 0; + vertical-align: baseline; +} + +sub { bottom: -.25em; } +sup { top: -.5em; } + + +// +// Links +// + +a { + color: $link-color; + text-decoration: $link-decoration; + background-color: transparent; // Remove the gray background on active links in IE 10. + + @include hover { + color: $link-hover-color; + text-decoration: $link-hover-decoration; + } +} + +// And undo these styles for placeholder links/named anchors (without href) +// which have not been made explicitly keyboard-focusable (without tabindex). +// It would be more straightforward to just use a[href] in previous block, but that +// causes specificity issues in many other styles that are too complex to fix. +// See https://github.com/twbs/bootstrap/issues/19402 + +a:not([href]):not([tabindex]) { + color: inherit; + text-decoration: none; + + @include hover-focus { + color: inherit; + text-decoration: none; + } + + &:focus { + outline: 0; + } +} + + +// +// Code +// + +pre, +code, +kbd, +samp { + font-family: $font-family-monospace; + @include font-size(1em); // Correct the odd `em` font sizing in all browsers. +} + +pre { + // Remove browser default top margin + margin-top: 0; + // Reset browser default of `1em` to use `rem`s + margin-bottom: 1rem; + // Don't allow content to break outside + overflow: auto; +} + + +// +// Figures +// + +figure { + // Apply a consistent margin strategy (matches our type styles). + margin: 0 0 1rem; +} + + +// +// Images and content +// + +img { + vertical-align: middle; + border-style: none; // Remove the border on images inside links in IE 10-. +} + +svg { + // Workaround for the SVG overflow bug in IE10/11 is still required. + // See https://github.com/twbs/bootstrap/issues/26878 + overflow: hidden; + vertical-align: middle; +} + + +// +// Tables +// + +table { + border-collapse: collapse; // Prevent double borders +} + +caption { + padding-top: $table-cell-padding; + padding-bottom: $table-cell-padding; + color: $table-caption-color; + text-align: left; + caption-side: bottom; +} + +th { + // Matches default `

          ` alignment by inheriting from the ``, or the + // closest parent with a set `text-align`. + text-align: inherit; +} + + +// +// Forms +// + +label { + // Allow labels to use `margin` for spacing. + display: inline-block; + margin-bottom: $label-margin-bottom; +} + +// Remove the default `border-radius` that macOS Chrome adds. +// +// Details at https://github.com/twbs/bootstrap/issues/24093 +button { + // stylelint-disable-next-line property-blacklist + border-radius: 0; +} + +// Work around a Firefox/IE bug where the transparent `button` background +// results in a loss of the default `button` focus styles. +// +// Credit: https://github.com/suitcss/base/ +button:focus { + outline: 1px dotted; + outline: 5px auto -webkit-focus-ring-color; +} + +input, +button, +select, +optgroup, +textarea { + margin: 0; // Remove the margin in Firefox and Safari + font-family: inherit; + @include font-size(inherit); + line-height: inherit; +} + +button, +input { + overflow: visible; // Show the overflow in Edge +} + +button, +select { + text-transform: none; // Remove the inheritance of text transform in Firefox +} + +// Remove the inheritance of word-wrap in Safari. +// +// Details at https://github.com/twbs/bootstrap/issues/24990 +select { + word-wrap: normal; +} + + +// 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` +// controls in Android 4. +// 2. Correct the inability to style clickable types in iOS and Safari. +button, +[type="button"], // 1 +[type="reset"], +[type="submit"] { + -webkit-appearance: button; // 2 +} + +// Opinionated: add "hand" cursor to non-disabled button elements. +@if $enable-pointer-cursor-for-buttons { + button, + [type="button"], + [type="reset"], + [type="submit"] { + &:not(:disabled) { + cursor: pointer; + } + } +} + +// Remove inner border and padding from Firefox, but don't restore the outline like Normalize. +button::-moz-focus-inner, +[type="button"]::-moz-focus-inner, +[type="reset"]::-moz-focus-inner, +[type="submit"]::-moz-focus-inner { + padding: 0; + border-style: none; +} + +input[type="radio"], +input[type="checkbox"] { + box-sizing: border-box; // 1. Add the correct box sizing in IE 10- + padding: 0; // 2. Remove the padding in IE 10- +} + + +input[type="date"], +input[type="time"], +input[type="datetime-local"], +input[type="month"] { + // Remove the default appearance of temporal inputs to avoid a Mobile Safari + // bug where setting a custom line-height prevents text from being vertically + // centered within the input. + // See https://bugs.webkit.org/show_bug.cgi?id=139848 + // and https://github.com/twbs/bootstrap/issues/11266 + -webkit-appearance: listbox; +} + +textarea { + overflow: auto; // Remove the default vertical scrollbar in IE. + // Textareas should really only resize vertically so they don't break their (horizontal) containers. + resize: vertical; +} + +fieldset { + // Browsers set a default `min-width: min-content;` on fieldsets, + // unlike e.g. `
          `s, which have `min-width: 0;` by default. + // So we reset that to ensure fieldsets behave more like a standard block element. + // See https://github.com/twbs/bootstrap/issues/12359 + // and https://html.spec.whatwg.org/multipage/#the-fieldset-and-legend-elements + min-width: 0; + // Reset the default outline behavior of fieldsets so they don't affect page layout. + padding: 0; + margin: 0; + border: 0; +} + +// 1. Correct the text wrapping in Edge and IE. +// 2. Correct the color inheritance from `fieldset` elements in IE. +legend { + display: block; + width: 100%; + max-width: 100%; // 1 + padding: 0; + margin-bottom: .5rem; + @include font-size(1.5rem); + line-height: inherit; + color: inherit; // 2 + white-space: normal; // 1 +} + +progress { + vertical-align: baseline; // Add the correct vertical alignment in Chrome, Firefox, and Opera. +} + +// Correct the cursor style of increment and decrement buttons in Chrome. +[type="number"]::-webkit-inner-spin-button, +[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +[type="search"] { + // This overrides the extra rounded corners on search inputs in iOS so that our + // `.form-control` class can properly style them. Note that this cannot simply + // be added to `.form-control` as it's not specific enough. For details, see + // https://github.com/twbs/bootstrap/issues/11586. + outline-offset: -2px; // 2. Correct the outline style in Safari. + -webkit-appearance: none; +} + +// +// Remove the inner padding in Chrome and Safari on macOS. +// + +[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +// +// 1. Correct the inability to style clickable types in iOS and Safari. +// 2. Change font properties to `inherit` in Safari. +// + +::-webkit-file-upload-button { + font: inherit; // 2 + -webkit-appearance: button; // 1 +} + +// +// Correct element displays +// + +output { + display: inline-block; +} + +summary { + display: list-item; // Add the correct display in all browsers + cursor: pointer; +} + +template { + display: none; // Add the correct display in IE +} + +// Always hide an element with the `hidden` HTML attribute (from PureCSS). +// Needed for proper display in IE 10-. +[hidden] { + display: none !important; +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/_root.scss b/app/assets/stylesheets/bootstrap-4.3.1/_root.scss new file mode 100644 index 000000000..ad550df3b --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/_root.scss @@ -0,0 +1,19 @@ +:root { + // Custom variable values only support SassScript inside `#{}`. + @each $color, $value in $colors { + --#{$color}: #{$value}; + } + + @each $color, $value in $theme-colors { + --#{$color}: #{$value}; + } + + @each $bp, $value in $grid-breakpoints { + --breakpoint-#{$bp}: #{$value}; + } + + // Use `inspect` for lists so that quoted items keep the quotes. + // See https://github.com/sass/sass/issues/2383#issuecomment-336349172 + --font-family-sans-serif: #{inspect($font-family-sans-serif)}; + --font-family-monospace: #{inspect($font-family-monospace)}; +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/_spinners.scss b/app/assets/stylesheets/bootstrap-4.3.1/_spinners.scss new file mode 100644 index 000000000..364a5c1a6 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/_spinners.scss @@ -0,0 +1,55 @@ +// +// Rotating border +// + +@keyframes spinner-border { + to { transform: rotate(360deg); } +} + +.spinner-border { + display: inline-block; + width: $spinner-width; + height: $spinner-height; + vertical-align: text-bottom; + border: $spinner-border-width solid currentColor; + border-right-color: transparent; + // stylelint-disable-next-line property-blacklist + border-radius: 50%; + animation: spinner-border .75s linear infinite; +} + +.spinner-border-sm { + width: $spinner-width-sm; + height: $spinner-height-sm; + border-width: $spinner-border-width-sm; +} + +// +// Growing circle +// + +@keyframes spinner-grow { + 0% { + transform: scale(0); + } + 50% { + opacity: 1; + } +} + +.spinner-grow { + display: inline-block; + width: $spinner-width; + height: $spinner-height; + vertical-align: text-bottom; + background-color: currentColor; + // stylelint-disable-next-line property-blacklist + border-radius: 50%; + opacity: 0; + animation: spinner-grow .75s linear infinite; +} + +.spinner-grow-sm { + width: $spinner-width-sm; + height: $spinner-height-sm; +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/_tables.scss b/app/assets/stylesheets/bootstrap-4.3.1/_tables.scss new file mode 100644 index 000000000..b7ab3d506 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/_tables.scss @@ -0,0 +1,185 @@ +// +// Basic Bootstrap table +// + +.table { + width: 100%; + margin-bottom: $spacer; + color: $table-color; + background-color: $table-bg; // Reset for nesting within parents with `background-color`. + + th, + td { + padding: $table-cell-padding; + vertical-align: top; + border-top: $table-border-width solid $table-border-color; + } + + thead th { + vertical-align: bottom; + border-bottom: (2 * $table-border-width) solid $table-border-color; + } + + tbody + tbody { + border-top: (2 * $table-border-width) solid $table-border-color; + } +} + + +// +// Condensed table w/ half padding +// + +.table-sm { + th, + td { + padding: $table-cell-padding-sm; + } +} + + +// Border versions +// +// Add or remove borders all around the table and between all the columns. + +.table-bordered { + border: $table-border-width solid $table-border-color; + + th, + td { + border: $table-border-width solid $table-border-color; + } + + thead { + th, + td { + border-bottom-width: 2 * $table-border-width; + } + } +} + +.table-borderless { + th, + td, + thead th, + tbody + tbody { + border: 0; + } +} + +// Zebra-striping +// +// Default zebra-stripe styles (alternating gray and transparent backgrounds) + +.table-striped { + tbody tr:nth-of-type(#{$table-striped-order}) { + background-color: $table-accent-bg; + } +} + + +// Hover effect +// +// Placed here since it has to come after the potential zebra striping + +.table-hover { + tbody tr { + @include hover { + color: $table-hover-color; + background-color: $table-hover-bg; + } + } +} + + +// Table backgrounds +// +// Exact selectors below required to override `.table-striped` and prevent +// inheritance to nested tables. + +@each $color, $value in $theme-colors { + @include table-row-variant($color, theme-color-level($color, $table-bg-level), theme-color-level($color, $table-border-level)); +} + +@include table-row-variant(active, $table-active-bg); + + +// Dark styles +// +// Same table markup, but inverted color scheme: dark background and light text. + +// stylelint-disable-next-line no-duplicate-selectors +.table { + .thead-dark { + th { + color: $table-dark-color; + background-color: $table-dark-bg; + border-color: $table-dark-border-color; + } + } + + .thead-light { + th { + color: $table-head-color; + background-color: $table-head-bg; + border-color: $table-border-color; + } + } +} + +.table-dark { + color: $table-dark-color; + background-color: $table-dark-bg; + + th, + td, + thead th { + border-color: $table-dark-border-color; + } + + &.table-bordered { + border: 0; + } + + &.table-striped { + tbody tr:nth-of-type(odd) { + background-color: $table-dark-accent-bg; + } + } + + &.table-hover { + tbody tr { + @include hover { + color: $table-dark-hover-color; + background-color: $table-dark-hover-bg; + } + } + } +} + + +// Responsive tables +// +// Generate series of `.table-responsive-*` classes for configuring the screen +// size of where your table will overflow. + +.table-responsive { + @each $breakpoint in map-keys($grid-breakpoints) { + $next: breakpoint-next($breakpoint, $grid-breakpoints); + $infix: breakpoint-infix($next, $grid-breakpoints); + + &#{$infix} { + @include media-breakpoint-down($breakpoint) { + display: block; + width: 100%; + overflow-x: auto; + -webkit-overflow-scrolling: touch; + + // Prevent double border on horizontal scroll due to use of `display: block;` + > .table-bordered { + border: 0; + } + } + } + } +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/_toasts.scss b/app/assets/stylesheets/bootstrap-4.3.1/_toasts.scss new file mode 100644 index 000000000..6aa5352a3 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/_toasts.scss @@ -0,0 +1,44 @@ +.toast { + max-width: $toast-max-width; + overflow: hidden; // cheap rounded corners on nested items + @include font-size($toast-font-size); + color: $toast-color; + background-color: $toast-background-color; + background-clip: padding-box; + border: $toast-border-width solid $toast-border-color; + box-shadow: $toast-box-shadow; + backdrop-filter: blur(10px); + opacity: 0; + @include border-radius($toast-border-radius); + + &:not(:last-child) { + margin-bottom: $toast-padding-x; + } + + &.showing { + opacity: 1; + } + + &.show { + display: block; + opacity: 1; + } + + &.hide { + display: none; + } +} + +.toast-header { + display: flex; + align-items: center; + padding: $toast-padding-y $toast-padding-x; + color: $toast-header-color; + background-color: $toast-header-background-color; + background-clip: padding-box; + border-bottom: $toast-border-width solid $toast-header-border-color; +} + +.toast-body { + padding: $toast-padding-x; // apply to both vertical and horizontal +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/_tooltip.scss b/app/assets/stylesheets/bootstrap-4.3.1/_tooltip.scss new file mode 100644 index 000000000..6b3aa62dd --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/_tooltip.scss @@ -0,0 +1,115 @@ +// Base class +.tooltip { + position: absolute; + z-index: $zindex-tooltip; + display: block; + margin: $tooltip-margin; + // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element. + // So reset our font and text properties to avoid inheriting weird values. + @include reset-text(); + @include font-size($tooltip-font-size); + // Allow breaking very long words so they don't overflow the tooltip's bounds + word-wrap: break-word; + opacity: 0; + + &.show { opacity: $tooltip-opacity; } + + .arrow { + position: absolute; + display: block; + width: $tooltip-arrow-width; + height: $tooltip-arrow-height; + + &::before { + position: absolute; + content: ""; + border-color: transparent; + border-style: solid; + } + } +} + +.bs-tooltip-top { + padding: $tooltip-arrow-height 0; + + .arrow { + bottom: 0; + + &::before { + top: 0; + border-width: $tooltip-arrow-height ($tooltip-arrow-width / 2) 0; + border-top-color: $tooltip-arrow-color; + } + } +} + +.bs-tooltip-right { + padding: 0 $tooltip-arrow-height; + + .arrow { + left: 0; + width: $tooltip-arrow-height; + height: $tooltip-arrow-width; + + &::before { + right: 0; + border-width: ($tooltip-arrow-width / 2) $tooltip-arrow-height ($tooltip-arrow-width / 2) 0; + border-right-color: $tooltip-arrow-color; + } + } +} + +.bs-tooltip-bottom { + padding: $tooltip-arrow-height 0; + + .arrow { + top: 0; + + &::before { + bottom: 0; + border-width: 0 ($tooltip-arrow-width / 2) $tooltip-arrow-height; + border-bottom-color: $tooltip-arrow-color; + } + } +} + +.bs-tooltip-left { + padding: 0 $tooltip-arrow-height; + + .arrow { + right: 0; + width: $tooltip-arrow-height; + height: $tooltip-arrow-width; + + &::before { + left: 0; + border-width: ($tooltip-arrow-width / 2) 0 ($tooltip-arrow-width / 2) $tooltip-arrow-height; + border-left-color: $tooltip-arrow-color; + } + } +} + +.bs-tooltip-auto { + &[x-placement^="top"] { + @extend .bs-tooltip-top; + } + &[x-placement^="right"] { + @extend .bs-tooltip-right; + } + &[x-placement^="bottom"] { + @extend .bs-tooltip-bottom; + } + &[x-placement^="left"] { + @extend .bs-tooltip-left; + } +} + +// Wrapper for the tooltip content +.tooltip-inner { + max-width: $tooltip-max-width; + padding: $tooltip-padding-y $tooltip-padding-x; + color: $tooltip-color; + text-align: center; + background-color: $tooltip-bg; + @include border-radius($tooltip-border-radius); +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/_transitions.scss b/app/assets/stylesheets/bootstrap-4.3.1/_transitions.scss new file mode 100644 index 000000000..40be4d918 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/_transitions.scss @@ -0,0 +1,20 @@ +.fade { + @include transition($transition-fade); + + &:not(.show) { + opacity: 0; + } +} + +.collapse { + &:not(.show) { + display: none; + } +} + +.collapsing { + position: relative; + height: 0; + overflow: hidden; + @include transition($transition-collapse); +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/_type.scss b/app/assets/stylesheets/bootstrap-4.3.1/_type.scss new file mode 100644 index 000000000..f8ed09065 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/_type.scss @@ -0,0 +1,125 @@ +// stylelint-disable declaration-no-important, selector-list-comma-newline-after + +// +// Headings +// + +h1, h2, h3, h4, h5, h6, +.h1, .h2, .h3, .h4, .h5, .h6 { + margin-bottom: $headings-margin-bottom; + font-family: $headings-font-family; + font-weight: $headings-font-weight; + line-height: $headings-line-height; + color: $headings-color; +} + +h1, .h1 { @include font-size($h1-font-size); } +h2, .h2 { @include font-size($h2-font-size); } +h3, .h3 { @include font-size($h3-font-size); } +h4, .h4 { @include font-size($h4-font-size); } +h5, .h5 { @include font-size($h5-font-size); } +h6, .h6 { @include font-size($h6-font-size); } + +.lead { + @include font-size($lead-font-size); + font-weight: $lead-font-weight; +} + +// Type display classes +.display-1 { + @include font-size($display1-size); + font-weight: $display1-weight; + line-height: $display-line-height; +} +.display-2 { + @include font-size($display2-size); + font-weight: $display2-weight; + line-height: $display-line-height; +} +.display-3 { + @include font-size($display3-size); + font-weight: $display3-weight; + line-height: $display-line-height; +} +.display-4 { + @include font-size($display4-size); + font-weight: $display4-weight; + line-height: $display-line-height; +} + + +// +// Horizontal rules +// + +hr { + margin-top: $hr-margin-y; + margin-bottom: $hr-margin-y; + border: 0; + border-top: $hr-border-width solid $hr-border-color; +} + + +// +// Emphasis +// + +small, +.small { + @include font-size($small-font-size); + font-weight: $font-weight-normal; +} + +mark, +.mark { + padding: $mark-padding; + background-color: $mark-bg; +} + + +// +// Lists +// + +.list-unstyled { + @include list-unstyled; +} + +// Inline turns list items into inline-block +.list-inline { + @include list-unstyled; +} +.list-inline-item { + display: inline-block; + + &:not(:last-child) { + margin-right: $list-inline-padding; + } +} + + +// +// Misc +// + +// Builds on `abbr` +.initialism { + @include font-size(90%); + text-transform: uppercase; +} + +// Blockquotes +.blockquote { + margin-bottom: $spacer; + @include font-size($blockquote-font-size); +} + +.blockquote-footer { + display: block; + @include font-size($blockquote-small-font-size); + color: $blockquote-small-color; + + &::before { + content: "\2014\00A0"; // em dash, nbsp + } +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/_utilities.scss b/app/assets/stylesheets/bootstrap-4.3.1/_utilities.scss new file mode 100644 index 000000000..a5de31ba6 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/_utilities.scss @@ -0,0 +1,17 @@ +@import "utilities/align"; +@import "utilities/background"; +@import "utilities/borders"; +@import "utilities/clearfix"; +@import "utilities/display"; +@import "utilities/embed"; +@import "utilities/flex"; +@import "utilities/float"; +@import "utilities/overflow"; +@import "utilities/position"; +@import "utilities/screenreaders"; +@import "utilities/shadows"; +@import "utilities/sizing"; +@import "utilities/stretched-link"; +@import "utilities/spacing"; +@import "utilities/text"; +@import "utilities/visibility"; diff --git a/app/assets/stylesheets/bootstrap-4.3.1/_variables.scss b/app/assets/stylesheets/bootstrap-4.3.1/_variables.scss new file mode 100644 index 000000000..d9e88df9a --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/_variables.scss @@ -0,0 +1,1123 @@ +// Variables +// +// Variables should follow the `$component-state-property-size` formula for +// consistent naming. Ex: $nav-link-disabled-color and $modal-content-box-shadow-xs. + +// Color system + +$white: #fff !default; +$gray-100: #f8f9fa !default; +$gray-200: #e9ecef !default; +$gray-300: #dee2e6 !default; +$gray-400: #ced4da !default; +$gray-500: #adb5bd !default; +$gray-600: #6c757d !default; +$gray-700: #495057 !default; +$gray-800: #343a40 !default; +$gray-900: #212529 !default; +$black: #000 !default; + +$grays: () !default; +// stylelint-disable-next-line scss/dollar-variable-default +$grays: map-merge( + ( + "100": $gray-100, + "200": $gray-200, + "300": $gray-300, + "400": $gray-400, + "500": $gray-500, + "600": $gray-600, + "700": $gray-700, + "800": $gray-800, + "900": $gray-900 + ), + $grays +); + +$blue: #007bff !default; +$indigo: #6610f2 !default; +$purple: #6f42c1 !default; +$pink: #e83e8c !default; +$red: #dc3545 !default; +$orange: #fd7e14 !default; +$yellow: #ffc107 !default; +$green: #28a745 !default; +$teal: #20c997 !default; +$cyan: #17a2b8 !default; + +$colors: () !default; +// stylelint-disable-next-line scss/dollar-variable-default +$colors: map-merge( + ( + "blue": $blue, + "indigo": $indigo, + "purple": $purple, + "pink": $pink, + "red": $red, + "orange": $orange, + "yellow": $yellow, + "green": $green, + "teal": $teal, + "cyan": $cyan, + "white": $white, + "gray": $gray-600, + "gray-dark": $gray-800 + ), + $colors +); + +$primary: $blue !default; +$secondary: $gray-600 !default; +$success: $green !default; +$info: $cyan !default; +$warning: $yellow !default; +$danger: $red !default; +$light: $gray-100 !default; +$dark: $gray-800 !default; + +$theme-colors: () !default; +// stylelint-disable-next-line scss/dollar-variable-default +$theme-colors: map-merge( + ( + "primary": $primary, + "secondary": $secondary, + "success": $success, + "info": $info, + "warning": $warning, + "danger": $danger, + "light": $light, + "dark": $dark + ), + $theme-colors +); + +// Set a specific jump point for requesting color jumps +$theme-color-interval: 8% !default; + +// The yiq lightness value that determines when the lightness of color changes from "dark" to "light". Acceptable values are between 0 and 255. +$yiq-contrasted-threshold: 150 !default; + +// Customize the light and dark text colors for use in our YIQ color contrast function. +$yiq-text-dark: $gray-900 !default; +$yiq-text-light: $white !default; + + +// Options +// +// Quickly modify global styling by enabling or disabling optional features. + +$enable-caret: true !default; +$enable-rounded: true !default; +$enable-shadows: false !default; +$enable-gradients: false !default; +$enable-transitions: true !default; +$enable-prefers-reduced-motion-media-query: true !default; +$enable-hover-media-query: false !default; // Deprecated, no longer affects any compiled CSS +$enable-grid-classes: true !default; +$enable-pointer-cursor-for-buttons: true !default; +$enable-print-styles: true !default; +$enable-responsive-font-sizes: false !default; +$enable-validation-icons: true !default; +$enable-deprecation-messages: true !default; + + +// Spacing +// +// Control the default styling of most Bootstrap elements by modifying these +// variables. Mostly focused on spacing. +// You can add more entries to the $spacers map, should you need more variation. + +$spacer: 1rem !default; +$spacers: () !default; +// stylelint-disable-next-line scss/dollar-variable-default +$spacers: map-merge( + ( + 0: 0, + 1: ($spacer * .25), + 2: ($spacer * .5), + 3: $spacer, + 4: ($spacer * 1.5), + 5: ($spacer * 3) + ), + $spacers +); + +// This variable affects the `.h-*` and `.w-*` classes. +$sizes: () !default; +// stylelint-disable-next-line scss/dollar-variable-default +$sizes: map-merge( + ( + 25: 25%, + 50: 50%, + 75: 75%, + 100: 100%, + auto: auto + ), + $sizes +); + + +// Body +// +// Settings for the `` element. + +$body-bg: $white !default; +$body-color: $gray-900 !default; + + +// Links +// +// Style anchor elements. + +$link-color: theme-color("primary") !default; +$link-decoration: none !default; +$link-hover-color: darken($link-color, 15%) !default; +$link-hover-decoration: underline !default; +// Darken percentage for links with `.text-*` class (e.g. `.text-success`) +$emphasized-link-hover-darken-percentage: 15% !default; + +// Paragraphs +// +// Style p element. + +$paragraph-margin-bottom: 1rem !default; + + +// Grid breakpoints +// +// Define the minimum dimensions at which your layout will change, +// adapting to different screen sizes, for use in media queries. + +$grid-breakpoints: ( + xs: 0, + sm: 576px, + md: 768px, + lg: 992px, + xl: 1200px +) !default; + +@include _assert-ascending($grid-breakpoints, "$grid-breakpoints"); +@include _assert-starts-at-zero($grid-breakpoints, "$grid-breakpoints"); + + +// Grid containers +// +// Define the maximum width of `.container` for different screen sizes. + +$container-max-widths: ( + sm: 540px, + md: 720px, + lg: 960px, + xl: 1140px +) !default; + +@include _assert-ascending($container-max-widths, "$container-max-widths"); + + +// Grid columns +// +// Set the number of columns and specify the width of the gutters. + +$grid-columns: 12 !default; +$grid-gutter-width: 30px !default; + + +// Components +// +// Define common padding and border radius sizes and more. + +$line-height-lg: 1.5 !default; +$line-height-sm: 1.5 !default; + +$border-width: 1px !default; +$border-color: $gray-300 !default; + +$border-radius: .25rem !default; +$border-radius-lg: .3rem !default; +$border-radius-sm: .2rem !default; + +$rounded-pill: 50rem !default; + +$box-shadow-sm: 0 .125rem .25rem rgba($black, .075) !default; +$box-shadow: 0 .5rem 1rem rgba($black, .15) !default; +$box-shadow-lg: 0 1rem 3rem rgba($black, .175) !default; + +$component-active-color: $white !default; +$component-active-bg: theme-color("primary") !default; + +$caret-width: .3em !default; +$caret-vertical-align: $caret-width * .85 !default; +$caret-spacing: $caret-width * .85 !default; + +$transition-base: all .2s ease-in-out !default; +$transition-fade: opacity .15s linear !default; +$transition-collapse: height .35s ease !default; + +$embed-responsive-aspect-ratios: () !default; +// stylelint-disable-next-line scss/dollar-variable-default +$embed-responsive-aspect-ratios: join( + ( + (21 9), + (16 9), + (4 3), + (1 1), + ), + $embed-responsive-aspect-ratios +); + +// Typography +// +// Font, line-height, and color for body text, headings, and more. + +// stylelint-disable value-keyword-case +$font-family-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !default; +$font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !default; +$font-family-base: $font-family-sans-serif !default; +// stylelint-enable value-keyword-case + +$font-size-base: 1rem !default; // Assumes the browser default, typically `16px` +$font-size-lg: $font-size-base * 1.25 !default; +$font-size-sm: $font-size-base * .875 !default; + +$font-weight-lighter: lighter !default; +$font-weight-light: 300 !default; +$font-weight-normal: 400 !default; +$font-weight-bold: 700 !default; +$font-weight-bolder: bolder !default; + +$font-weight-base: $font-weight-normal !default; +$line-height-base: 1.5 !default; + +$h1-font-size: $font-size-base * 2.5 !default; +$h2-font-size: $font-size-base * 2 !default; +$h3-font-size: $font-size-base * 1.75 !default; +$h4-font-size: $font-size-base * 1.5 !default; +$h5-font-size: $font-size-base * 1.25 !default; +$h6-font-size: $font-size-base !default; + +$headings-margin-bottom: $spacer / 2 !default; +$headings-font-family: null !default; +$headings-font-weight: 500 !default; +$headings-line-height: 1.2 !default; +$headings-color: null !default; + +$display1-size: 6rem !default; +$display2-size: 5.5rem !default; +$display3-size: 4.5rem !default; +$display4-size: 3.5rem !default; + +$display1-weight: 300 !default; +$display2-weight: 300 !default; +$display3-weight: 300 !default; +$display4-weight: 300 !default; +$display-line-height: $headings-line-height !default; + +$lead-font-size: $font-size-base * 1.25 !default; +$lead-font-weight: 300 !default; + +$small-font-size: 80% !default; + +$text-muted: $gray-600 !default; + +$blockquote-small-color: $gray-600 !default; +$blockquote-small-font-size: $small-font-size !default; +$blockquote-font-size: $font-size-base * 1.25 !default; + +$hr-border-color: rgba($black, .1) !default; +$hr-border-width: $border-width !default; + +$mark-padding: .2em !default; + +$dt-font-weight: $font-weight-bold !default; + +$kbd-box-shadow: inset 0 -.1rem 0 rgba($black, .25) !default; +$nested-kbd-font-weight: $font-weight-bold !default; + +$list-inline-padding: .5rem !default; + +$mark-bg: #fcf8e3 !default; + +$hr-margin-y: $spacer !default; + + +// Tables +// +// Customizes the `.table` component with basic values, each used across all table variations. + +$table-cell-padding: .75rem !default; +$table-cell-padding-sm: .3rem !default; + +$table-color: $body-color !default; +$table-bg: null !default; +$table-accent-bg: rgba($black, .05) !default; +$table-hover-color: $table-color !default; +$table-hover-bg: rgba($black, .075) !default; +$table-active-bg: $table-hover-bg !default; + +$table-border-width: $border-width !default; +$table-border-color: $border-color !default; + +$table-head-bg: $gray-200 !default; +$table-head-color: $gray-700 !default; + +$table-dark-color: $white !default; +$table-dark-bg: $gray-800 !default; +$table-dark-accent-bg: rgba($white, .05) !default; +$table-dark-hover-color: $table-dark-color !default; +$table-dark-hover-bg: rgba($white, .075) !default; +$table-dark-border-color: lighten($table-dark-bg, 7.5%) !default; +$table-dark-color: $white !default; + +$table-striped-order: odd !default; + +$table-caption-color: $text-muted !default; + +$table-bg-level: -9 !default; +$table-border-level: -6 !default; + + +// Buttons + Forms +// +// Shared variables that are reassigned to `$input-` and `$btn-` specific variables. + +$input-btn-padding-y: .375rem !default; +$input-btn-padding-x: .75rem !default; +$input-btn-font-family: null !default; +$input-btn-font-size: $font-size-base !default; +$input-btn-line-height: $line-height-base !default; + +$input-btn-focus-width: .2rem !default; +$input-btn-focus-color: rgba($component-active-bg, .25) !default; +$input-btn-focus-box-shadow: 0 0 0 $input-btn-focus-width $input-btn-focus-color !default; + +$input-btn-padding-y-sm: .25rem !default; +$input-btn-padding-x-sm: .5rem !default; +$input-btn-font-size-sm: $font-size-sm !default; +$input-btn-line-height-sm: $line-height-sm !default; + +$input-btn-padding-y-lg: .5rem !default; +$input-btn-padding-x-lg: 1rem !default; +$input-btn-font-size-lg: $font-size-lg !default; +$input-btn-line-height-lg: $line-height-lg !default; + +$input-btn-border-width: $border-width !default; + + +// Buttons +// +// For each of Bootstrap's buttons, define text, background, and border color. + +$btn-padding-y: $input-btn-padding-y !default; +$btn-padding-x: $input-btn-padding-x !default; +$btn-font-family: $input-btn-font-family !default; +$btn-font-size: $input-btn-font-size !default; +$btn-line-height: $input-btn-line-height !default; + +$btn-padding-y-sm: $input-btn-padding-y-sm !default; +$btn-padding-x-sm: $input-btn-padding-x-sm !default; +$btn-font-size-sm: $input-btn-font-size-sm !default; +$btn-line-height-sm: $input-btn-line-height-sm !default; + +$btn-padding-y-lg: $input-btn-padding-y-lg !default; +$btn-padding-x-lg: $input-btn-padding-x-lg !default; +$btn-font-size-lg: $input-btn-font-size-lg !default; +$btn-line-height-lg: $input-btn-line-height-lg !default; + +$btn-border-width: $input-btn-border-width !default; + +$btn-font-weight: $font-weight-normal !default; +$btn-box-shadow: inset 0 1px 0 rgba($white, .15), 0 1px 1px rgba($black, .075) !default; +$btn-focus-width: $input-btn-focus-width !default; +$btn-focus-box-shadow: $input-btn-focus-box-shadow !default; +$btn-disabled-opacity: .65 !default; +$btn-active-box-shadow: inset 0 3px 5px rgba($black, .125) !default; + +$btn-link-disabled-color: $gray-600 !default; + +$btn-block-spacing-y: .5rem !default; + +// Allows for customizing button radius independently from global border radius +$btn-border-radius: $border-radius !default; +$btn-border-radius-lg: $border-radius-lg !default; +$btn-border-radius-sm: $border-radius-sm !default; + +$btn-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default; + + +// Forms + +$label-margin-bottom: .5rem !default; + +$input-padding-y: $input-btn-padding-y !default; +$input-padding-x: $input-btn-padding-x !default; +$input-font-family: $input-btn-font-family !default; +$input-font-size: $input-btn-font-size !default; +$input-font-weight: $font-weight-base !default; +$input-line-height: $input-btn-line-height !default; + +$input-padding-y-sm: $input-btn-padding-y-sm !default; +$input-padding-x-sm: $input-btn-padding-x-sm !default; +$input-font-size-sm: $input-btn-font-size-sm !default; +$input-line-height-sm: $input-btn-line-height-sm !default; + +$input-padding-y-lg: $input-btn-padding-y-lg !default; +$input-padding-x-lg: $input-btn-padding-x-lg !default; +$input-font-size-lg: $input-btn-font-size-lg !default; +$input-line-height-lg: $input-btn-line-height-lg !default; + +$input-bg: $white !default; +$input-disabled-bg: $gray-200 !default; + +$input-color: $gray-700 !default; +$input-border-color: $gray-400 !default; +$input-border-width: $input-btn-border-width !default; +$input-box-shadow: inset 0 1px 1px rgba($black, .075) !default; + +$input-border-radius: $border-radius !default; +$input-border-radius-lg: $border-radius-lg !default; +$input-border-radius-sm: $border-radius-sm !default; + +$input-focus-bg: $input-bg !default; +$input-focus-border-color: lighten($component-active-bg, 25%) !default; +$input-focus-color: $input-color !default; +$input-focus-width: $input-btn-focus-width !default; +$input-focus-box-shadow: $input-btn-focus-box-shadow !default; + +$input-placeholder-color: $gray-600 !default; +$input-plaintext-color: $body-color !default; + +$input-height-border: $input-border-width * 2 !default; + +$input-height-inner: calc(#{$input-line-height * 1em} + #{$input-padding-y * 2}) !default; +$input-height-inner-half: calc(#{$input-line-height * .5em} + #{$input-padding-y}) !default; +$input-height-inner-quarter: calc(#{$input-line-height * .25em} + #{$input-padding-y / 2}) !default; + +$input-height: calc(#{$input-line-height * 1em} + #{$input-padding-y * 2} + #{$input-height-border}) !default; +$input-height-sm: calc(#{$input-line-height-sm * 1em} + #{$input-btn-padding-y-sm * 2} + #{$input-height-border}) !default; +$input-height-lg: calc(#{$input-line-height-lg * 1em} + #{$input-btn-padding-y-lg * 2} + #{$input-height-border}) !default; + +$input-transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out !default; + +$form-text-margin-top: .25rem !default; + +$form-check-input-gutter: 1.25rem !default; +$form-check-input-margin-y: .3rem !default; +$form-check-input-margin-x: .25rem !default; + +$form-check-inline-margin-x: .75rem !default; +$form-check-inline-input-margin-x: .3125rem !default; + +$form-grid-gutter-width: 10px !default; +$form-group-margin-bottom: 1rem !default; + +$input-group-addon-color: $input-color !default; +$input-group-addon-bg: $gray-200 !default; +$input-group-addon-border-color: $input-border-color !default; + +$custom-forms-transition: background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default; + +$custom-control-gutter: .5rem !default; +$custom-control-spacer-x: 1rem !default; + +$custom-control-indicator-size: 1rem !default; +$custom-control-indicator-bg: $input-bg !default; + +$custom-control-indicator-bg-size: 50% 50% !default; +$custom-control-indicator-box-shadow: $input-box-shadow !default; +$custom-control-indicator-border-color: $gray-500 !default; +$custom-control-indicator-border-width: $input-border-width !default; + +$custom-control-indicator-disabled-bg: $input-disabled-bg !default; +$custom-control-label-disabled-color: $gray-600 !default; + +$custom-control-indicator-checked-color: $component-active-color !default; +$custom-control-indicator-checked-bg: $component-active-bg !default; +$custom-control-indicator-checked-disabled-bg: rgba(theme-color("primary"), .5) !default; +$custom-control-indicator-checked-box-shadow: none !default; +$custom-control-indicator-checked-border-color: $custom-control-indicator-checked-bg !default; + +$custom-control-indicator-focus-box-shadow: $input-focus-box-shadow !default; +$custom-control-indicator-focus-border-color: $input-focus-border-color !default; + +$custom-control-indicator-active-color: $component-active-color !default; +$custom-control-indicator-active-bg: lighten($component-active-bg, 35%) !default; +$custom-control-indicator-active-box-shadow: none !default; +$custom-control-indicator-active-border-color: $custom-control-indicator-active-bg !default; + +$custom-checkbox-indicator-border-radius: $border-radius !default; +$custom-checkbox-indicator-icon-checked: str-replace(url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='#{$custom-control-indicator-checked-color}' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e"), "#", "%23") !default; + +$custom-checkbox-indicator-indeterminate-bg: $component-active-bg !default; +$custom-checkbox-indicator-indeterminate-color: $custom-control-indicator-checked-color !default; +$custom-checkbox-indicator-icon-indeterminate: str-replace(url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3e%3cpath stroke='#{$custom-checkbox-indicator-indeterminate-color}' d='M0 2h4'/%3e%3c/svg%3e"), "#", "%23") !default; +$custom-checkbox-indicator-indeterminate-box-shadow: none !default; +$custom-checkbox-indicator-indeterminate-border-color: $custom-checkbox-indicator-indeterminate-bg !default; + +$custom-radio-indicator-border-radius: 50% !default; +$custom-radio-indicator-icon-checked: str-replace(url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='#{$custom-control-indicator-checked-color}'/%3e%3c/svg%3e"), "#", "%23") !default; + +$custom-switch-width: $custom-control-indicator-size * 1.75 !default; +$custom-switch-indicator-border-radius: $custom-control-indicator-size / 2 !default; +$custom-switch-indicator-size: calc(#{$custom-control-indicator-size} - #{$custom-control-indicator-border-width * 4}) !default; + +$custom-select-padding-y: $input-padding-y !default; +$custom-select-padding-x: $input-padding-x !default; +$custom-select-font-family: $input-font-family !default; +$custom-select-font-size: $input-font-size !default; +$custom-select-height: $input-height !default; +$custom-select-indicator-padding: 1rem !default; // Extra padding to account for the presence of the background-image based indicator +$custom-select-font-weight: $input-font-weight !default; +$custom-select-line-height: $input-line-height !default; +$custom-select-color: $input-color !default; +$custom-select-disabled-color: $gray-600 !default; +$custom-select-bg: $input-bg !default; +$custom-select-disabled-bg: $gray-200 !default; +$custom-select-bg-size: 8px 10px !default; // In pixels because image dimensions +$custom-select-indicator-color: $gray-800 !default; +$custom-select-indicator: str-replace(url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3e%3cpath fill='#{$custom-select-indicator-color}' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e"), "#", "%23") !default; +$custom-select-background: $custom-select-indicator no-repeat right $custom-select-padding-x center / $custom-select-bg-size !default; // Used so we can have multiple background elements (e.g., arrow and feedback icon) + +$custom-select-feedback-icon-padding-right: calc((1em + #{2 * $custom-select-padding-y}) * 3 / 4 + #{$custom-select-padding-x + $custom-select-indicator-padding}) !default; +$custom-select-feedback-icon-position: center right ($custom-select-padding-x + $custom-select-indicator-padding) !default; +$custom-select-feedback-icon-size: $input-height-inner-half $input-height-inner-half !default; + +$custom-select-border-width: $input-border-width !default; +$custom-select-border-color: $input-border-color !default; +$custom-select-border-radius: $border-radius !default; +$custom-select-box-shadow: inset 0 1px 2px rgba($black, .075) !default; + +$custom-select-focus-border-color: $input-focus-border-color !default; +$custom-select-focus-width: $input-focus-width !default; +$custom-select-focus-box-shadow: 0 0 0 $custom-select-focus-width $input-btn-focus-color !default; + +$custom-select-padding-y-sm: $input-padding-y-sm !default; +$custom-select-padding-x-sm: $input-padding-x-sm !default; +$custom-select-font-size-sm: $input-font-size-sm !default; +$custom-select-height-sm: $input-height-sm !default; + +$custom-select-padding-y-lg: $input-padding-y-lg !default; +$custom-select-padding-x-lg: $input-padding-x-lg !default; +$custom-select-font-size-lg: $input-font-size-lg !default; +$custom-select-height-lg: $input-height-lg !default; + +$custom-range-track-width: 100% !default; +$custom-range-track-height: .5rem !default; +$custom-range-track-cursor: pointer !default; +$custom-range-track-bg: $gray-300 !default; +$custom-range-track-border-radius: 1rem !default; +$custom-range-track-box-shadow: inset 0 .25rem .25rem rgba($black, .1) !default; + +$custom-range-thumb-width: 1rem !default; +$custom-range-thumb-height: $custom-range-thumb-width !default; +$custom-range-thumb-bg: $component-active-bg !default; +$custom-range-thumb-border: 0 !default; +$custom-range-thumb-border-radius: 1rem !default; +$custom-range-thumb-box-shadow: 0 .1rem .25rem rgba($black, .1) !default; +$custom-range-thumb-focus-box-shadow: 0 0 0 1px $body-bg, $input-focus-box-shadow !default; +$custom-range-thumb-focus-box-shadow-width: $input-focus-width !default; // For focus box shadow issue in IE/Edge +$custom-range-thumb-active-bg: lighten($component-active-bg, 35%) !default; +$custom-range-thumb-disabled-bg: $gray-500 !default; + +$custom-file-height: $input-height !default; +$custom-file-height-inner: $input-height-inner !default; +$custom-file-focus-border-color: $input-focus-border-color !default; +$custom-file-focus-box-shadow: $input-focus-box-shadow !default; +$custom-file-disabled-bg: $input-disabled-bg !default; + +$custom-file-padding-y: $input-padding-y !default; +$custom-file-padding-x: $input-padding-x !default; +$custom-file-line-height: $input-line-height !default; +$custom-file-font-family: $input-font-family !default; +$custom-file-font-weight: $input-font-weight !default; +$custom-file-color: $input-color !default; +$custom-file-bg: $input-bg !default; +$custom-file-border-width: $input-border-width !default; +$custom-file-border-color: $input-border-color !default; +$custom-file-border-radius: $input-border-radius !default; +$custom-file-box-shadow: $input-box-shadow !default; +$custom-file-button-color: $custom-file-color !default; +$custom-file-button-bg: $input-group-addon-bg !default; +$custom-file-text: ( + en: "Browse" +) !default; + + +// Form validation + +$form-feedback-margin-top: $form-text-margin-top !default; +$form-feedback-font-size: $small-font-size !default; +$form-feedback-valid-color: theme-color("success") !default; +$form-feedback-invalid-color: theme-color("danger") !default; + +$form-feedback-icon-valid-color: $form-feedback-valid-color !default; +$form-feedback-icon-valid: str-replace(url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='#{$form-feedback-icon-valid-color}' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e"), "#", "%23") !default; +$form-feedback-icon-invalid-color: $form-feedback-invalid-color !default; +$form-feedback-icon-invalid: str-replace(url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='#{$form-feedback-icon-invalid-color}' viewBox='-2 -2 7 7'%3e%3cpath stroke='#{$form-feedback-icon-invalid-color}' d='M0 0l3 3m0-3L0 3'/%3e%3ccircle r='.5'/%3e%3ccircle cx='3' r='.5'/%3e%3ccircle cy='3' r='.5'/%3e%3ccircle cx='3' cy='3' r='.5'/%3e%3c/svg%3E"), "#", "%23") !default; + +$form-validation-states: () !default; +// stylelint-disable-next-line scss/dollar-variable-default +$form-validation-states: map-merge( + ( + "valid": ( + "color": $form-feedback-valid-color, + "icon": $form-feedback-icon-valid + ), + "invalid": ( + "color": $form-feedback-invalid-color, + "icon": $form-feedback-icon-invalid + ), + ), + $form-validation-states +); + +// Z-index master list +// +// Warning: Avoid customizing these values. They're used for a bird's eye view +// of components dependent on the z-axis and are designed to all work together. + +$zindex-dropdown: 1000 !default; +$zindex-sticky: 1020 !default; +$zindex-fixed: 1030 !default; +$zindex-modal-backdrop: 1040 !default; +$zindex-modal: 1050 !default; +$zindex-popover: 1060 !default; +$zindex-tooltip: 1070 !default; + + +// Navs + +$nav-link-padding-y: .5rem !default; +$nav-link-padding-x: 1rem !default; +$nav-link-disabled-color: $gray-600 !default; + +$nav-tabs-border-color: $gray-300 !default; +$nav-tabs-border-width: $border-width !default; +$nav-tabs-border-radius: $border-radius !default; +$nav-tabs-link-hover-border-color: $gray-200 $gray-200 $nav-tabs-border-color !default; +$nav-tabs-link-active-color: $gray-700 !default; +$nav-tabs-link-active-bg: $body-bg !default; +$nav-tabs-link-active-border-color: $gray-300 $gray-300 $nav-tabs-link-active-bg !default; + +$nav-pills-border-radius: $border-radius !default; +$nav-pills-link-active-color: $component-active-color !default; +$nav-pills-link-active-bg: $component-active-bg !default; + +$nav-divider-color: $gray-200 !default; +$nav-divider-margin-y: $spacer / 2 !default; + + +// Navbar + +$navbar-padding-y: $spacer / 2 !default; +$navbar-padding-x: $spacer !default; + +$navbar-nav-link-padding-x: .5rem !default; + +$navbar-brand-font-size: $font-size-lg !default; +// Compute the navbar-brand padding-y so the navbar-brand will have the same height as navbar-text and nav-link +$nav-link-height: $font-size-base * $line-height-base + $nav-link-padding-y * 2 !default; +$navbar-brand-height: $navbar-brand-font-size * $line-height-base !default; +$navbar-brand-padding-y: ($nav-link-height - $navbar-brand-height) / 2 !default; + +$navbar-toggler-padding-y: .25rem !default; +$navbar-toggler-padding-x: .75rem !default; +$navbar-toggler-font-size: $font-size-lg !default; +$navbar-toggler-border-radius: $btn-border-radius !default; + +$navbar-dark-color: rgba($white, .5) !default; +$navbar-dark-hover-color: rgba($white, .75) !default; +$navbar-dark-active-color: $white !default; +$navbar-dark-disabled-color: rgba($white, .25) !default; +$navbar-dark-toggler-icon-bg: str-replace(url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='#{$navbar-dark-color}' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"), "#", "%23") !default; +$navbar-dark-toggler-border-color: rgba($white, .1) !default; + +$navbar-light-color: rgba($black, .5) !default; +$navbar-light-hover-color: rgba($black, .7) !default; +$navbar-light-active-color: rgba($black, .9) !default; +$navbar-light-disabled-color: rgba($black, .3) !default; +$navbar-light-toggler-icon-bg: str-replace(url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='#{$navbar-light-color}' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e"), "#", "%23") !default; +$navbar-light-toggler-border-color: rgba($black, .1) !default; + +$navbar-light-brand-color: $navbar-light-active-color !default; +$navbar-light-brand-hover-color: $navbar-light-active-color !default; +$navbar-dark-brand-color: $navbar-dark-active-color !default; +$navbar-dark-brand-hover-color: $navbar-dark-active-color !default; + + +// Dropdowns +// +// Dropdown menu container and contents. + +$dropdown-min-width: 10rem !default; +$dropdown-padding-y: .5rem !default; +$dropdown-spacer: .125rem !default; +$dropdown-font-size: $font-size-base !default; +$dropdown-color: $body-color !default; +$dropdown-bg: $white !default; +$dropdown-border-color: rgba($black, .15) !default; +$dropdown-border-radius: $border-radius !default; +$dropdown-border-width: $border-width !default; +$dropdown-inner-border-radius: calc(#{$dropdown-border-radius} - #{$dropdown-border-width}) !default; +$dropdown-divider-bg: $gray-200 !default; +$dropdown-divider-margin-y: $nav-divider-margin-y !default; +$dropdown-box-shadow: 0 .5rem 1rem rgba($black, .175) !default; + +$dropdown-link-color: $gray-900 !default; +$dropdown-link-hover-color: darken($gray-900, 5%) !default; +$dropdown-link-hover-bg: $gray-100 !default; + +$dropdown-link-active-color: $component-active-color !default; +$dropdown-link-active-bg: $component-active-bg !default; + +$dropdown-link-disabled-color: $gray-600 !default; + +$dropdown-item-padding-y: .25rem !default; +$dropdown-item-padding-x: 1.5rem !default; + +$dropdown-header-color: $gray-600 !default; + + +// Pagination + +$pagination-padding-y: .5rem !default; +$pagination-padding-x: .75rem !default; +$pagination-padding-y-sm: .25rem !default; +$pagination-padding-x-sm: .5rem !default; +$pagination-padding-y-lg: .75rem !default; +$pagination-padding-x-lg: 1.5rem !default; +$pagination-line-height: 1.25 !default; + +$pagination-color: $link-color !default; +$pagination-bg: $white !default; +$pagination-border-width: $border-width !default; +$pagination-border-color: $gray-300 !default; + +$pagination-focus-box-shadow: $input-btn-focus-box-shadow !default; +$pagination-focus-outline: 0 !default; + +$pagination-hover-color: $link-hover-color !default; +$pagination-hover-bg: $gray-200 !default; +$pagination-hover-border-color: $gray-300 !default; + +$pagination-active-color: $component-active-color !default; +$pagination-active-bg: $component-active-bg !default; +$pagination-active-border-color: $pagination-active-bg !default; + +$pagination-disabled-color: $gray-600 !default; +$pagination-disabled-bg: $white !default; +$pagination-disabled-border-color: $gray-300 !default; + + +// Jumbotron + +$jumbotron-padding: 2rem !default; +$jumbotron-color: null !default; +$jumbotron-bg: $gray-200 !default; + + +// Cards + +$card-spacer-y: .75rem !default; +$card-spacer-x: 1.25rem !default; +$card-border-width: $border-width !default; +$card-border-radius: $border-radius !default; +$card-border-color: rgba($black, .125) !default; +$card-inner-border-radius: calc(#{$card-border-radius} - #{$card-border-width}) !default; +$card-cap-bg: rgba($black, .03) !default; +$card-cap-color: null !default; +$card-color: null !default; +$card-bg: $white !default; + +$card-img-overlay-padding: 1.25rem !default; + +$card-group-margin: $grid-gutter-width / 2 !default; +$card-deck-margin: $card-group-margin !default; + +$card-columns-count: 3 !default; +$card-columns-gap: 1.25rem !default; +$card-columns-margin: $card-spacer-y !default; + + +// Tooltips + +$tooltip-font-size: $font-size-sm !default; +$tooltip-max-width: 200px !default; +$tooltip-color: $white !default; +$tooltip-bg: $black !default; +$tooltip-border-radius: $border-radius !default; +$tooltip-opacity: .9 !default; +$tooltip-padding-y: .25rem !default; +$tooltip-padding-x: .5rem !default; +$tooltip-margin: 0 !default; + +$tooltip-arrow-width: .8rem !default; +$tooltip-arrow-height: .4rem !default; +$tooltip-arrow-color: $tooltip-bg !default; + +// Form tooltips must come after regular tooltips +$form-feedback-tooltip-padding-y: $tooltip-padding-y !default; +$form-feedback-tooltip-padding-x: $tooltip-padding-x !default; +$form-feedback-tooltip-font-size: $tooltip-font-size !default; +$form-feedback-tooltip-line-height: $line-height-base !default; +$form-feedback-tooltip-opacity: $tooltip-opacity !default; +$form-feedback-tooltip-border-radius: $tooltip-border-radius !default; + + +// Popovers + +$popover-font-size: $font-size-sm !default; +$popover-bg: $white !default; +$popover-max-width: 276px !default; +$popover-border-width: $border-width !default; +$popover-border-color: rgba($black, .2) !default; +$popover-border-radius: $border-radius-lg !default; +$popover-box-shadow: 0 .25rem .5rem rgba($black, .2) !default; + +$popover-header-bg: darken($popover-bg, 3%) !default; +$popover-header-color: $headings-color !default; +$popover-header-padding-y: .5rem !default; +$popover-header-padding-x: .75rem !default; + +$popover-body-color: $body-color !default; +$popover-body-padding-y: $popover-header-padding-y !default; +$popover-body-padding-x: $popover-header-padding-x !default; + +$popover-arrow-width: 1rem !default; +$popover-arrow-height: .5rem !default; +$popover-arrow-color: $popover-bg !default; + +$popover-arrow-outer-color: fade-in($popover-border-color, .05) !default; + + +// Toasts + +$toast-max-width: 350px !default; +$toast-padding-x: .75rem !default; +$toast-padding-y: .25rem !default; +$toast-font-size: .875rem !default; +$toast-color: null !default; +$toast-background-color: rgba($white, .85) !default; +$toast-border-width: 1px !default; +$toast-border-color: rgba(0, 0, 0, .1) !default; +$toast-border-radius: .25rem !default; +$toast-box-shadow: 0 .25rem .75rem rgba($black, .1) !default; + +$toast-header-color: $gray-600 !default; +$toast-header-background-color: rgba($white, .85) !default; +$toast-header-border-color: rgba(0, 0, 0, .05) !default; + + +// Badges + +$badge-font-size: 75% !default; +$badge-font-weight: $font-weight-bold !default; +$badge-padding-y: .25em !default; +$badge-padding-x: .4em !default; +$badge-border-radius: $border-radius !default; + +$badge-transition: $btn-transition !default; +$badge-focus-width: $input-btn-focus-width !default; + +$badge-pill-padding-x: .6em !default; +// Use a higher than normal value to ensure completely rounded edges when +// customizing padding or font-size on labels. +$badge-pill-border-radius: 10rem !default; + + +// Modals + +// Padding applied to the modal body +$modal-inner-padding: 1rem !default; + +$modal-dialog-margin: .5rem !default; +$modal-dialog-margin-y-sm-up: 1.75rem !default; + +$modal-title-line-height: $line-height-base !default; + +$modal-content-color: null !default; +$modal-content-bg: $white !default; +$modal-content-border-color: rgba($black, .2) !default; +$modal-content-border-width: $border-width !default; +$modal-content-border-radius: $border-radius-lg !default; +$modal-content-box-shadow-xs: 0 .25rem .5rem rgba($black, .5) !default; +$modal-content-box-shadow-sm-up: 0 .5rem 1rem rgba($black, .5) !default; + +$modal-backdrop-bg: $black !default; +$modal-backdrop-opacity: .5 !default; +$modal-header-border-color: $border-color !default; +$modal-footer-border-color: $modal-header-border-color !default; +$modal-header-border-width: $modal-content-border-width !default; +$modal-footer-border-width: $modal-header-border-width !default; +$modal-header-padding-y: 1rem !default; +$modal-header-padding-x: 1rem !default; +$modal-header-padding: $modal-header-padding-y $modal-header-padding-x !default; // Keep this for backwards compatibility + +$modal-xl: 1140px !default; +$modal-lg: 800px !default; +$modal-md: 500px !default; +$modal-sm: 300px !default; + +$modal-fade-transform: translate(0, -50px) !default; +$modal-show-transform: none !default; +$modal-transition: transform .3s ease-out !default; + + +// Alerts +// +// Define alert colors, border radius, and padding. + +$alert-padding-y: .75rem !default; +$alert-padding-x: 1.25rem !default; +$alert-margin-bottom: 1rem !default; +$alert-border-radius: $border-radius !default; +$alert-link-font-weight: $font-weight-bold !default; +$alert-border-width: $border-width !default; + +$alert-bg-level: -10 !default; +$alert-border-level: -9 !default; +$alert-color-level: 6 !default; + + +// Progress bars + +$progress-height: 1rem !default; +$progress-font-size: $font-size-base * .75 !default; +$progress-bg: $gray-200 !default; +$progress-border-radius: $border-radius !default; +$progress-box-shadow: inset 0 .1rem .1rem rgba($black, .1) !default; +$progress-bar-color: $white !default; +$progress-bar-bg: theme-color("primary") !default; +$progress-bar-animation-timing: 1s linear infinite !default; +$progress-bar-transition: width .6s ease !default; + + +// List group + +$list-group-color: null !default; +$list-group-bg: $white !default; +$list-group-border-color: rgba($black, .125) !default; +$list-group-border-width: $border-width !default; +$list-group-border-radius: $border-radius !default; + +$list-group-item-padding-y: .75rem !default; +$list-group-item-padding-x: 1.25rem !default; + +$list-group-hover-bg: $gray-100 !default; +$list-group-active-color: $component-active-color !default; +$list-group-active-bg: $component-active-bg !default; +$list-group-active-border-color: $list-group-active-bg !default; + +$list-group-disabled-color: $gray-600 !default; +$list-group-disabled-bg: $list-group-bg !default; + +$list-group-action-color: $gray-700 !default; +$list-group-action-hover-color: $list-group-action-color !default; + +$list-group-action-active-color: $body-color !default; +$list-group-action-active-bg: $gray-200 !default; + + +// Image thumbnails + +$thumbnail-padding: .25rem !default; +$thumbnail-bg: $body-bg !default; +$thumbnail-border-width: $border-width !default; +$thumbnail-border-color: $gray-300 !default; +$thumbnail-border-radius: $border-radius !default; +$thumbnail-box-shadow: 0 1px 2px rgba($black, .075) !default; + + +// Figures + +$figure-caption-font-size: 90% !default; +$figure-caption-color: $gray-600 !default; + + +// Breadcrumbs + +$breadcrumb-padding-y: .75rem !default; +$breadcrumb-padding-x: 1rem !default; +$breadcrumb-item-padding: .5rem !default; + +$breadcrumb-margin-bottom: 1rem !default; + +$breadcrumb-bg: $gray-200 !default; +$breadcrumb-divider-color: $gray-600 !default; +$breadcrumb-active-color: $gray-600 !default; +$breadcrumb-divider: quote("/") !default; + +$breadcrumb-border-radius: $border-radius !default; + + +// Carousel + +$carousel-control-color: $white !default; +$carousel-control-width: 15% !default; +$carousel-control-opacity: .5 !default; +$carousel-control-hover-opacity: .9 !default; +$carousel-control-transition: opacity .15s ease !default; + +$carousel-indicator-width: 30px !default; +$carousel-indicator-height: 3px !default; +$carousel-indicator-hit-area-height: 10px !default; +$carousel-indicator-spacer: 3px !default; +$carousel-indicator-active-bg: $white !default; +$carousel-indicator-transition: opacity .6s ease !default; + +$carousel-caption-width: 70% !default; +$carousel-caption-color: $white !default; + +$carousel-control-icon-width: 20px !default; + +$carousel-control-prev-icon-bg: str-replace(url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3e%3c/svg%3e"), "#", "%23") !default; +$carousel-control-next-icon-bg: str-replace(url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='#{$carousel-control-color}' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3e%3c/svg%3e"), "#", "%23") !default; + +$carousel-transition-duration: .6s !default; +$carousel-transition: transform $carousel-transition-duration ease-in-out !default; // Define transform transition first if using multiple transitions (e.g., `transform 2s ease, opacity .5s ease-out`) + + +// Spinners + +$spinner-width: 2rem !default; +$spinner-height: $spinner-width !default; +$spinner-border-width: .25em !default; + +$spinner-width-sm: 1rem !default; +$spinner-height-sm: $spinner-width-sm !default; +$spinner-border-width-sm: .2em !default; + + +// Close + +$close-font-size: $font-size-base * 1.5 !default; +$close-font-weight: $font-weight-bold !default; +$close-color: $black !default; +$close-text-shadow: 0 1px 0 $white !default; + + +// Code + +$code-font-size: 87.5% !default; +$code-color: $pink !default; + +$kbd-padding-y: .2rem !default; +$kbd-padding-x: .4rem !default; +$kbd-font-size: $code-font-size !default; +$kbd-color: $white !default; +$kbd-bg: $gray-900 !default; + +$pre-color: $gray-900 !default; +$pre-scrollable-max-height: 340px !default; + + +// Utilities + +$displays: none, inline, inline-block, block, table, table-row, table-cell, flex, inline-flex !default; +$overflows: auto, hidden !default; +$positions: static, relative, absolute, fixed, sticky !default; + + +// Printing + +$print-page-size: a3 !default; +$print-body-min-width: map-get($grid-breakpoints, "lg") !default; diff --git a/app/assets/stylesheets/bootstrap-4.3.1/bootstrap-grid.scss b/app/assets/stylesheets/bootstrap-4.3.1/bootstrap-grid.scss new file mode 100644 index 000000000..d5f92a16a --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/bootstrap-grid.scss @@ -0,0 +1,29 @@ +/*! + * Bootstrap Grid v4.3.1 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors + * Copyright 2011-2019 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + +html { + box-sizing: border-box; + -ms-overflow-style: scrollbar; +} + +*, +*::before, +*::after { + box-sizing: inherit; +} + +@import "functions"; +@import "variables"; + +@import "mixins/breakpoints"; +@import "mixins/grid-framework"; +@import "mixins/grid"; + +@import "grid"; +@import "utilities/display"; +@import "utilities/flex"; +@import "utilities/spacing"; diff --git a/app/assets/stylesheets/bootstrap-4.3.1/bootstrap-reboot.scss b/app/assets/stylesheets/bootstrap-4.3.1/bootstrap-reboot.scss new file mode 100644 index 000000000..2983f3f6d --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/bootstrap-reboot.scss @@ -0,0 +1,12 @@ +/*! + * Bootstrap Reboot v4.3.1 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors + * Copyright 2011-2019 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) + */ + +@import "functions"; +@import "variables"; +@import "mixins"; +@import "reboot"; diff --git a/app/assets/stylesheets/bootstrap-4.3.1/bootstrap.scss b/app/assets/stylesheets/bootstrap-4.3.1/bootstrap.scss new file mode 100644 index 000000000..9f15c2a8b --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/bootstrap.scss @@ -0,0 +1,44 @@ +/*! + * Bootstrap v4.3.1 (https://getbootstrap.com/) + * Copyright 2011-2019 The Bootstrap Authors + * Copyright 2011-2019 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + +@import "functions"; +@import "variables"; +@import "mixins"; +@import "root"; +@import "reboot"; +@import "type"; +@import "images"; +@import "code"; +@import "grid"; +@import "tables"; +@import "forms"; +@import "buttons"; +@import "transitions"; +@import "dropdown"; +@import "button-group"; +@import "input-group"; +@import "custom-forms"; +@import "nav"; +@import "navbar"; +@import "card"; +@import "breadcrumb"; +@import "pagination"; +@import "badge"; +@import "jumbotron"; +@import "alert"; +@import "progress"; +@import "media"; +@import "list-group"; +@import "close"; +@import "toasts"; +@import "modal"; +@import "tooltip"; +@import "popover"; +@import "carousel"; +@import "spinners"; +@import "utilities"; +@import "print"; diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_alert.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_alert.scss new file mode 100644 index 000000000..db5a7eb45 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_alert.scss @@ -0,0 +1,13 @@ +@mixin alert-variant($background, $border, $color) { + color: $color; + @include gradient-bg($background); + border-color: $border; + + hr { + border-top-color: darken($border, 5%); + } + + .alert-link { + color: darken($color, 10%); + } +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_background-variant.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_background-variant.scss new file mode 100644 index 000000000..494439d2b --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_background-variant.scss @@ -0,0 +1,21 @@ +// stylelint-disable declaration-no-important + +// Contextual backgrounds + +@mixin bg-variant($parent, $color) { + #{$parent} { + background-color: $color !important; + } + a#{$parent}, + button#{$parent} { + @include hover-focus { + background-color: darken($color, 10%) !important; + } + } +} + +@mixin bg-gradient-variant($parent, $color) { + #{$parent} { + background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x !important; + } +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_badge.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_badge.scss new file mode 100644 index 000000000..64b29cb57 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_badge.scss @@ -0,0 +1,17 @@ +@mixin badge-variant($bg) { + color: color-yiq($bg); + background-color: $bg; + + @at-root a#{&} { + @include hover-focus { + color: color-yiq($bg); + background-color: darken($bg, 10%); + } + + &:focus, + &.focus { + outline: 0; + box-shadow: 0 0 0 $badge-focus-width rgba($bg, .5); + } + } +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_border-radius.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_border-radius.scss new file mode 100644 index 000000000..88aeb37d8 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_border-radius.scss @@ -0,0 +1,63 @@ +// stylelint-disable property-blacklist +// Single side border-radius + +@mixin border-radius($radius: $border-radius, $fallback-border-radius: false) { + @if $enable-rounded { + border-radius: $radius; + } + @else if $fallback-border-radius != false { + border-radius: $fallback-border-radius; + } +} + +@mixin border-top-radius($radius) { + @if $enable-rounded { + border-top-left-radius: $radius; + border-top-right-radius: $radius; + } +} + +@mixin border-right-radius($radius) { + @if $enable-rounded { + border-top-right-radius: $radius; + border-bottom-right-radius: $radius; + } +} + +@mixin border-bottom-radius($radius) { + @if $enable-rounded { + border-bottom-right-radius: $radius; + border-bottom-left-radius: $radius; + } +} + +@mixin border-left-radius($radius) { + @if $enable-rounded { + border-top-left-radius: $radius; + border-bottom-left-radius: $radius; + } +} + +@mixin border-top-left-radius($radius) { + @if $enable-rounded { + border-top-left-radius: $radius; + } +} + +@mixin border-top-right-radius($radius) { + @if $enable-rounded { + border-top-right-radius: $radius; + } +} + +@mixin border-bottom-right-radius($radius) { + @if $enable-rounded { + border-bottom-right-radius: $radius; + } +} + +@mixin border-bottom-left-radius($radius) { + @if $enable-rounded { + border-bottom-left-radius: $radius; + } +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_box-shadow.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_box-shadow.scss new file mode 100644 index 000000000..0726d4359 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_box-shadow.scss @@ -0,0 +1,20 @@ +@mixin box-shadow($shadow...) { + @if $enable-shadows { + $result: (); + + @if (length($shadow) == 1) { + // We can pass `@include box-shadow(none);` + $result: $shadow; + } @else { + // Filter to avoid invalid properties for example `box-shadow: none, 1px 1px black;` + @for $i from 1 through length($shadow) { + @if nth($shadow, $i) != "none" { + $result: append($result, nth($shadow, $i), "comma"); + } + } + } + @if (length($result) > 0) { + box-shadow: $result; + } + } +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_breakpoints.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_breakpoints.scss new file mode 100644 index 000000000..23a5de96b --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_breakpoints.scss @@ -0,0 +1,123 @@ +// Breakpoint viewport sizes and media queries. +// +// Breakpoints are defined as a map of (name: minimum width), order from small to large: +// +// (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px) +// +// The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default. + +// Name of the next breakpoint, or null for the last breakpoint. +// +// >> breakpoint-next(sm) +// md +// >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)) +// md +// >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl)) +// md +@function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) { + $n: index($breakpoint-names, $name); + @return if($n != null and $n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null); +} + +// Minimum breakpoint width. Null for the smallest (first) breakpoint. +// +// >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)) +// 576px +@function breakpoint-min($name, $breakpoints: $grid-breakpoints) { + $min: map-get($breakpoints, $name); + @return if($min != 0, $min, null); +} + +// Maximum breakpoint width. Null for the largest (last) breakpoint. +// The maximum value is calculated as the minimum of the next one less 0.02px +// to work around the limitations of `min-` and `max-` prefixes and viewports with fractional widths. +// See https://www.w3.org/TR/mediaqueries-4/#mq-min-max +// Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari. +// See https://bugs.webkit.org/show_bug.cgi?id=178261 +// +// >> breakpoint-max(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)) +// 767.98px +@function breakpoint-max($name, $breakpoints: $grid-breakpoints) { + $next: breakpoint-next($name, $breakpoints); + @return if($next, breakpoint-min($next, $breakpoints) - .02, null); +} + +// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front. +// Useful for making responsive utilities. +// +// >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)) +// "" (Returns a blank string) +// >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)) +// "-sm" +@function breakpoint-infix($name, $breakpoints: $grid-breakpoints) { + @return if(breakpoint-min($name, $breakpoints) == null, "", "-#{$name}"); +} + +// Media of at least the minimum breakpoint width. No query for the smallest breakpoint. +// Makes the @content apply to the given breakpoint and wider. +@mixin media-breakpoint-up($name, $breakpoints: $grid-breakpoints) { + $min: breakpoint-min($name, $breakpoints); + @if $min { + @media (min-width: $min) { + @content; + } + } @else { + @content; + } +} + +// Media of at most the maximum breakpoint width. No query for the largest breakpoint. +// Makes the @content apply to the given breakpoint and narrower. +@mixin media-breakpoint-down($name, $breakpoints: $grid-breakpoints) { + $max: breakpoint-max($name, $breakpoints); + @if $max { + @media (max-width: $max) { + @content; + } + } @else { + @content; + } +} + +// Media that spans multiple breakpoint widths. +// Makes the @content apply between the min and max breakpoints +@mixin media-breakpoint-between($lower, $upper, $breakpoints: $grid-breakpoints) { + $min: breakpoint-min($lower, $breakpoints); + $max: breakpoint-max($upper, $breakpoints); + + @if $min != null and $max != null { + @media (min-width: $min) and (max-width: $max) { + @content; + } + } @else if $max == null { + @include media-breakpoint-up($lower, $breakpoints) { + @content; + } + } @else if $min == null { + @include media-breakpoint-down($upper, $breakpoints) { + @content; + } + } +} + +// Media between the breakpoint's minimum and maximum widths. +// No minimum for the smallest breakpoint, and no maximum for the largest one. +// Makes the @content apply only to the given breakpoint, not viewports any wider or narrower. +@mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) { + $min: breakpoint-min($name, $breakpoints); + $max: breakpoint-max($name, $breakpoints); + + @if $min != null and $max != null { + @media (min-width: $min) and (max-width: $max) { + @content; + } + } @else if $max == null { + @include media-breakpoint-up($name, $breakpoints) { + @content; + } + } @else if $min == null { + @include media-breakpoint-down($name, $breakpoints) { + @content; + } + } +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_buttons.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_buttons.scss new file mode 100644 index 000000000..eee903f83 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_buttons.scss @@ -0,0 +1,107 @@ +// Button variants +// +// Easily pump out default styles, as well as :hover, :focus, :active, +// and disabled options for all buttons + +@mixin button-variant($background, $border, $hover-background: darken($background, 7.5%), $hover-border: darken($border, 10%), $active-background: darken($background, 10%), $active-border: darken($border, 12.5%)) { + color: color-yiq($background); + @include gradient-bg($background); + border-color: $border; + @include box-shadow($btn-box-shadow); + + @include hover { + color: color-yiq($hover-background); + @include gradient-bg($hover-background); + border-color: $hover-border; + } + + &:focus, + &.focus { + // Avoid using mixin so we can pass custom focus shadow properly + @if $enable-shadows { + box-shadow: $btn-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5); + } @else { + box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5); + } + } + + // Disabled comes first so active can properly restyle + &.disabled, + &:disabled { + color: color-yiq($background); + background-color: $background; + border-color: $border; + // Remove CSS gradients if they're enabled + @if $enable-gradients { + background-image: none; + } + } + + &:not(:disabled):not(.disabled):active, + &:not(:disabled):not(.disabled).active, + .show > &.dropdown-toggle { + color: color-yiq($active-background); + background-color: $active-background; + @if $enable-gradients { + background-image: none; // Remove the gradient for the pressed/active state + } + border-color: $active-border; + + &:focus { + // Avoid using mixin so we can pass custom focus shadow properly + @if $enable-shadows and $btn-active-box-shadow != none { + box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5); + } @else { + box-shadow: 0 0 0 $btn-focus-width rgba(mix(color-yiq($background), $border, 15%), .5); + } + } + } +} + +@mixin button-outline-variant($color, $color-hover: color-yiq($color), $active-background: $color, $active-border: $color) { + color: $color; + border-color: $color; + + @include hover { + color: $color-hover; + background-color: $active-background; + border-color: $active-border; + } + + &:focus, + &.focus { + box-shadow: 0 0 0 $btn-focus-width rgba($color, .5); + } + + &.disabled, + &:disabled { + color: $color; + background-color: transparent; + } + + &:not(:disabled):not(.disabled):active, + &:not(:disabled):not(.disabled).active, + .show > &.dropdown-toggle { + color: color-yiq($active-background); + background-color: $active-background; + border-color: $active-border; + + &:focus { + // Avoid using mixin so we can pass custom focus shadow properly + @if $enable-shadows and $btn-active-box-shadow != none { + box-shadow: $btn-active-box-shadow, 0 0 0 $btn-focus-width rgba($color, .5); + } @else { + box-shadow: 0 0 0 $btn-focus-width rgba($color, .5); + } + } + } +} + +// Button sizes +@mixin button-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) { + padding: $padding-y $padding-x; + @include font-size($font-size); + line-height: $line-height; + // Manually declare to provide an override to the browser default + @include border-radius($border-radius, 0); +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_caret.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_caret.scss new file mode 100644 index 000000000..8ecef65b4 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_caret.scss @@ -0,0 +1,62 @@ +@mixin caret-down { + border-top: $caret-width solid; + border-right: $caret-width solid transparent; + border-bottom: 0; + border-left: $caret-width solid transparent; +} + +@mixin caret-up { + border-top: 0; + border-right: $caret-width solid transparent; + border-bottom: $caret-width solid; + border-left: $caret-width solid transparent; +} + +@mixin caret-right { + border-top: $caret-width solid transparent; + border-right: 0; + border-bottom: $caret-width solid transparent; + border-left: $caret-width solid; +} + +@mixin caret-left { + border-top: $caret-width solid transparent; + border-right: $caret-width solid; + border-bottom: $caret-width solid transparent; +} + +@mixin caret($direction: down) { + @if $enable-caret { + &::after { + display: inline-block; + margin-left: $caret-spacing; + vertical-align: $caret-vertical-align; + content: ""; + @if $direction == down { + @include caret-down; + } @else if $direction == up { + @include caret-up; + } @else if $direction == right { + @include caret-right; + } + } + + @if $direction == left { + &::after { + display: none; + } + + &::before { + display: inline-block; + margin-right: $caret-spacing; + vertical-align: $caret-vertical-align; + content: ""; + @include caret-left; + } + } + + &:empty::after { + margin-left: 0; + } + } +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_clearfix.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_clearfix.scss new file mode 100644 index 000000000..11a977b73 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_clearfix.scss @@ -0,0 +1,7 @@ +@mixin clearfix() { + &::after { + display: block; + clear: both; + content: ""; + } +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_deprecate.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_deprecate.scss new file mode 100644 index 000000000..df070bc59 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_deprecate.scss @@ -0,0 +1,10 @@ +// Deprecate mixin +// +// This mixin can be used to deprecate mixins or functions. +// `$enable-deprecation-messages` is a global variable, `$ignore-warning` is a variable that can be passed to +// some deprecated mixins to suppress the warning (for example if the mixin is still be used in the current version of Bootstrap) +@mixin deprecate($name, $deprecate-version, $remove-version, $ignore-warning: false) { + @if ($enable-deprecation-messages != false and $ignore-warning != true) { + @warn "#{$name} has been deprecated as of #{$deprecate-version}. It will be removed entirely in #{$remove-version}."; + } +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_float.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_float.scss new file mode 100644 index 000000000..adff88e79 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_float.scss @@ -0,0 +1,14 @@ +// stylelint-disable declaration-no-important + +@mixin float-left { + float: left !important; + @include deprecate("The `float-left` mixin", "v4.3.0", "v5"); +} +@mixin float-right { + float: right !important; + @include deprecate("The `float-right` mixin", "v4.3.0", "v5"); +} +@mixin float-none { + float: none !important; + @include deprecate("The `float-none` mixin", "v4.3.0", "v5"); +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_forms.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_forms.scss new file mode 100644 index 000000000..ea8a91a02 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_forms.scss @@ -0,0 +1,192 @@ +// Form control focus state +// +// Generate a customized focus state and for any input with the specified color, +// which defaults to the `$input-focus-border-color` variable. +// +// We highly encourage you to not customize the default value, but instead use +// this to tweak colors on an as-needed basis. This aesthetic change is based on +// WebKit's default styles, but applicable to a wider range of browsers. Its +// usability and accessibility should be taken into account with any change. +// +// Example usage: change the default blue border and shadow to white for better +// contrast against a dark gray background. +@mixin form-control-focus() { + &:focus { + color: $input-focus-color; + background-color: $input-focus-bg; + border-color: $input-focus-border-color; + outline: 0; + // Avoid using mixin so we can pass custom focus shadow properly + @if $enable-shadows { + box-shadow: $input-box-shadow, $input-focus-box-shadow; + } @else { + box-shadow: $input-focus-box-shadow; + } + } +} + + +@mixin form-validation-state($state, $color, $icon) { + .#{$state}-feedback { + display: none; + width: 100%; + margin-top: $form-feedback-margin-top; + @include font-size($form-feedback-font-size); + color: $color; + } + + .#{$state}-tooltip { + position: absolute; + top: 100%; + z-index: 5; + display: none; + max-width: 100%; // Contain to parent when possible + padding: $form-feedback-tooltip-padding-y $form-feedback-tooltip-padding-x; + margin-top: .1rem; + @include font-size($form-feedback-tooltip-font-size); + line-height: $form-feedback-tooltip-line-height; + color: color-yiq($color); + background-color: rgba($color, $form-feedback-tooltip-opacity); + @include border-radius($form-feedback-tooltip-border-radius); + } + + .form-control { + .was-validated &:#{$state}, + &.is-#{$state} { + border-color: $color; + + @if $enable-validation-icons { + padding-right: $input-height-inner; + background-image: $icon; + background-repeat: no-repeat; + background-position: center right $input-height-inner-quarter; + background-size: $input-height-inner-half $input-height-inner-half; + } + + &:focus { + border-color: $color; + box-shadow: 0 0 0 $input-focus-width rgba($color, .25); + } + + ~ .#{$state}-feedback, + ~ .#{$state}-tooltip { + display: block; + } + } + } + + // stylelint-disable-next-line selector-no-qualifying-type + textarea.form-control { + .was-validated &:#{$state}, + &.is-#{$state} { + @if $enable-validation-icons { + padding-right: $input-height-inner; + background-position: top $input-height-inner-quarter right $input-height-inner-quarter; + } + } + } + + .custom-select { + .was-validated &:#{$state}, + &.is-#{$state} { + border-color: $color; + + @if $enable-validation-icons { + padding-right: $custom-select-feedback-icon-padding-right; + background: $custom-select-background, $icon $custom-select-bg no-repeat $custom-select-feedback-icon-position / $custom-select-feedback-icon-size; + } + + &:focus { + border-color: $color; + box-shadow: 0 0 0 $input-focus-width rgba($color, .25); + } + + ~ .#{$state}-feedback, + ~ .#{$state}-tooltip { + display: block; + } + } + } + + + .form-control-file { + .was-validated &:#{$state}, + &.is-#{$state} { + ~ .#{$state}-feedback, + ~ .#{$state}-tooltip { + display: block; + } + } + } + + .form-check-input { + .was-validated &:#{$state}, + &.is-#{$state} { + ~ .form-check-label { + color: $color; + } + + ~ .#{$state}-feedback, + ~ .#{$state}-tooltip { + display: block; + } + } + } + + .custom-control-input { + .was-validated &:#{$state}, + &.is-#{$state} { + ~ .custom-control-label { + color: $color; + + &::before { + border-color: $color; + } + } + + ~ .#{$state}-feedback, + ~ .#{$state}-tooltip { + display: block; + } + + &:checked { + ~ .custom-control-label::before { + border-color: lighten($color, 10%); + @include gradient-bg(lighten($color, 10%)); + } + } + + &:focus { + ~ .custom-control-label::before { + box-shadow: 0 0 0 $input-focus-width rgba($color, .25); + } + + &:not(:checked) ~ .custom-control-label::before { + border-color: $color; + } + } + } + } + + // custom file + .custom-file-input { + .was-validated &:#{$state}, + &.is-#{$state} { + ~ .custom-file-label { + border-color: $color; + } + + ~ .#{$state}-feedback, + ~ .#{$state}-tooltip { + display: block; + } + + &:focus { + ~ .custom-file-label { + border-color: $color; + box-shadow: 0 0 0 $input-focus-width rgba($color, .25); + } + } + } + } +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_gradients.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_gradients.scss new file mode 100644 index 000000000..88c4d64b7 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_gradients.scss @@ -0,0 +1,45 @@ +// Gradients + +@mixin gradient-bg($color) { + @if $enable-gradients { + background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x; + } @else { + background-color: $color; + } +} + +// Horizontal gradient, from left to right +// +// Creates two color stops, start and end, by specifying a color and position for each color stop. +@mixin gradient-x($start-color: $gray-700, $end-color: $gray-800, $start-percent: 0%, $end-percent: 100%) { + background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent); + background-repeat: repeat-x; +} + +// Vertical gradient, from top to bottom +// +// Creates two color stops, start and end, by specifying a color and position for each color stop. +@mixin gradient-y($start-color: $gray-700, $end-color: $gray-800, $start-percent: 0%, $end-percent: 100%) { + background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent); + background-repeat: repeat-x; +} + +@mixin gradient-directional($start-color: $gray-700, $end-color: $gray-800, $deg: 45deg) { + background-image: linear-gradient($deg, $start-color, $end-color); + background-repeat: repeat-x; +} +@mixin gradient-x-three-colors($start-color: $blue, $mid-color: $purple, $color-stop: 50%, $end-color: $red) { + background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color); + background-repeat: no-repeat; +} +@mixin gradient-y-three-colors($start-color: $blue, $mid-color: $purple, $color-stop: 50%, $end-color: $red) { + background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color); + background-repeat: no-repeat; +} +@mixin gradient-radial($inner-color: $gray-700, $outer-color: $gray-800) { + background-image: radial-gradient(circle, $inner-color, $outer-color); + background-repeat: no-repeat; +} +@mixin gradient-striped($color: rgba($white, .15), $angle: 45deg) { + background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent); +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_grid-framework.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_grid-framework.scss new file mode 100644 index 000000000..649c28bf7 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_grid-framework.scss @@ -0,0 +1,66 @@ +// Framework grid generation +// +// Used only by Bootstrap to generate the correct number of grid classes given +// any value of `$grid-columns`. + +@mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) { + // Common properties for all breakpoints + %grid-column { + position: relative; + width: 100%; + padding-right: $gutter / 2; + padding-left: $gutter / 2; + } + + @each $breakpoint in map-keys($breakpoints) { + $infix: breakpoint-infix($breakpoint, $breakpoints); + + // Allow columns to stretch full width below their breakpoints + @for $i from 1 through $columns { + .col#{$infix}-#{$i} { + @extend %grid-column; + } + } + .col#{$infix}, + .col#{$infix}-auto { + @extend %grid-column; + } + + @include media-breakpoint-up($breakpoint, $breakpoints) { + // Provide basic `.col-{bp}` classes for equal-width flexbox columns + .col#{$infix} { + flex-basis: 0; + flex-grow: 1; + max-width: 100%; + } + .col#{$infix}-auto { + flex: 0 0 auto; + width: auto; + max-width: 100%; // Reset earlier grid tiers + } + + @for $i from 1 through $columns { + .col#{$infix}-#{$i} { + @include make-col($i, $columns); + } + } + + .order#{$infix}-first { order: -1; } + + .order#{$infix}-last { order: $columns + 1; } + + @for $i from 0 through $columns { + .order#{$infix}-#{$i} { order: $i; } + } + + // `$columns - 1` because offsetting by the width of an entire row isn't possible + @for $i from 0 through ($columns - 1) { + @if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0 + .offset#{$infix}-#{$i} { + @include make-col-offset($i, $columns); + } + } + } + } + } +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_grid.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_grid.scss new file mode 100644 index 000000000..924eb0cfc --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_grid.scss @@ -0,0 +1,51 @@ +/// Grid system +// +// Generate semantic grid columns with these mixins. + +@mixin make-container($gutter: $grid-gutter-width) { + width: 100%; + padding-right: $gutter / 2; + padding-left: $gutter / 2; + margin-right: auto; + margin-left: auto; +} + + +// For each breakpoint, define the maximum width of the container in a media query +@mixin make-container-max-widths($max-widths: $container-max-widths, $breakpoints: $grid-breakpoints) { + @each $breakpoint, $container-max-width in $max-widths { + @include media-breakpoint-up($breakpoint, $breakpoints) { + max-width: $container-max-width; + } + } +} + +@mixin make-row($gutter: $grid-gutter-width) { + display: flex; + flex-wrap: wrap; + margin-right: -$gutter / 2; + margin-left: -$gutter / 2; +} + +@mixin make-col-ready($gutter: $grid-gutter-width) { + position: relative; + // Prevent columns from becoming too narrow when at smaller grid tiers by + // always setting `width: 100%;`. This works because we use `flex` values + // later on to override this initial width. + width: 100%; + padding-right: $gutter / 2; + padding-left: $gutter / 2; +} + +@mixin make-col($size, $columns: $grid-columns) { + flex: 0 0 percentage($size / $columns); + // Add a `max-width` to ensure content within each column does not blow out + // the width of the column. Applies to IE10+ and Firefox. Chrome and Safari + // do not appear to require this. + max-width: percentage($size / $columns); +} + +@mixin make-col-offset($size, $columns: $grid-columns) { + $num: $size / $columns; + margin-left: if($num == 0, 0, percentage($num)); +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_hover.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_hover.scss new file mode 100644 index 000000000..192f847e1 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_hover.scss @@ -0,0 +1,37 @@ +// Hover mixin and `$enable-hover-media-query` are deprecated. +// +// Originally added during our alphas and maintained during betas, this mixin was +// designed to prevent `:hover` stickiness on iOS-an issue where hover styles +// would persist after initial touch. +// +// For backward compatibility, we've kept these mixins and updated them to +// always return their regular pseudo-classes instead of a shimmed media query. +// +// Issue: https://github.com/twbs/bootstrap/issues/25195 + +@mixin hover { + &:hover { @content; } +} + +@mixin hover-focus { + &:hover, + &:focus { + @content; + } +} + +@mixin plain-hover-focus { + &, + &:hover, + &:focus { + @content; + } +} + +@mixin hover-focus-active { + &:hover, + &:focus, + &:active { + @content; + } +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_image.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_image.scss new file mode 100644 index 000000000..a76a6082b --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_image.scss @@ -0,0 +1,36 @@ +// Image Mixins +// - Responsive image +// - Retina image + + +// Responsive image +// +// Keep images from scaling beyond the width of their parents. + +@mixin img-fluid { + // Part 1: Set a maximum relative to the parent + max-width: 100%; + // Part 2: Override the height to auto, otherwise images will be stretched + // when setting a width and height attribute on the img element. + height: auto; +} + + +// Retina image +// +// Short retina mixin for setting background-image and -size. + +@mixin img-retina($file-1x, $file-2x, $width-1x, $height-1x) { + background-image: url($file-1x); + + // Autoprefixer takes care of adding -webkit-min-device-pixel-ratio and -o-min-device-pixel-ratio, + // but doesn't convert dppx=>dpi. + // There's no such thing as unprefixed min-device-pixel-ratio since it's nonstandard. + // Compatibility info: https://caniuse.com/#feat=css-media-resolution + @media only screen and (min-resolution: 192dpi), // IE9-11 don't support dppx + only screen and (min-resolution: 2dppx) { // Standardized + background-image: url($file-2x); + background-size: $width-1x $height-1x; + } + @include deprecate("`img-retina()`", "v4.3.0", "v5"); +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_list-group.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_list-group.scss new file mode 100644 index 000000000..cd47a4e9f --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_list-group.scss @@ -0,0 +1,21 @@ +// List Groups + +@mixin list-group-item-variant($state, $background, $color) { + .list-group-item-#{$state} { + color: $color; + background-color: $background; + + &.list-group-item-action { + @include hover-focus { + color: $color; + background-color: darken($background, 5%); + } + + &.active { + color: $white; + background-color: $color; + border-color: $color; + } + } + } +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_lists.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_lists.scss new file mode 100644 index 000000000..251856266 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_lists.scss @@ -0,0 +1,7 @@ +// Lists + +// Unstyled keeps list items block level, just removes default browser padding and list-style +@mixin list-unstyled { + padding-left: 0; + list-style: none; +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_nav-divider.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_nav-divider.scss new file mode 100644 index 000000000..4fb37b622 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_nav-divider.scss @@ -0,0 +1,10 @@ +// Horizontal dividers +// +// Dividers (basically an hr) within dropdowns and nav lists + +@mixin nav-divider($color: $nav-divider-color, $margin-y: $nav-divider-margin-y) { + height: 0; + margin: $margin-y 0; + overflow: hidden; + border-top: 1px solid $color; +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_pagination.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_pagination.scss new file mode 100644 index 000000000..af8e16d6a --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_pagination.scss @@ -0,0 +1,22 @@ +// Pagination + +@mixin pagination-size($padding-y, $padding-x, $font-size, $line-height, $border-radius) { + .page-link { + padding: $padding-y $padding-x; + @include font-size($font-size); + line-height: $line-height; + } + + .page-item { + &:first-child { + .page-link { + @include border-left-radius($border-radius); + } + } + &:last-child { + .page-link { + @include border-right-radius($border-radius); + } + } + } +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_reset-text.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_reset-text.scss new file mode 100644 index 000000000..bfa9f6e9a --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_reset-text.scss @@ -0,0 +1,17 @@ +@mixin reset-text { + font-family: $font-family-base; + // We deliberately do NOT reset font-size or word-wrap. + font-style: normal; + font-weight: $font-weight-normal; + line-height: $line-height-base; + text-align: left; // Fallback for where `start` is not supported + text-align: start; + text-decoration: none; + text-shadow: none; + text-transform: none; + letter-spacing: normal; + word-break: normal; + word-spacing: normal; + white-space: normal; + line-break: auto; +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_resize.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_resize.scss new file mode 100644 index 000000000..66f233a63 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_resize.scss @@ -0,0 +1,6 @@ +// Resize anything + +@mixin resizable($direction) { + overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible` + resize: $direction; // Options: horizontal, vertical, both +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_screen-reader.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_screen-reader.scss new file mode 100644 index 000000000..812591bc5 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_screen-reader.scss @@ -0,0 +1,33 @@ +// Only display content to screen readers +// +// See: https://a11yproject.com/posts/how-to-hide-content/ +// See: https://hugogiraudel.com/2016/10/13/css-hide-and-seek/ + +@mixin sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} + +// Use in conjunction with .sr-only to only display content when it's focused. +// +// Useful for "Skip to main content" links; see https://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1 +// +// Credit: HTML5 Boilerplate + +@mixin sr-only-focusable { + &:active, + &:focus { + position: static; + width: auto; + height: auto; + overflow: visible; + clip: auto; + white-space: normal; + } +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_size.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_size.scss new file mode 100644 index 000000000..69e056d2c --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_size.scss @@ -0,0 +1,7 @@ +// Sizing shortcuts + +@mixin size($width, $height: $width) { + width: $width; + height: $height; + @include deprecate("`size()`", "v4.3.0", "v5"); +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_table-row.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_table-row.scss new file mode 100644 index 000000000..f8d61869a --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_table-row.scss @@ -0,0 +1,39 @@ +// Tables + +@mixin table-row-variant($state, $background, $border: null) { + // Exact selectors below required to override `.table-striped` and prevent + // inheritance to nested tables. + .table-#{$state} { + &, + > th, + > td { + background-color: $background; + } + + @if $border != null { + th, + td, + thead th, + tbody + tbody { + border-color: $border; + } + } + } + + // Hover states for `.table-hover` + // Note: this is not available for cells or rows within `thead` or `tfoot`. + .table-hover { + $hover-background: darken($background, 5%); + + .table-#{$state} { + @include hover { + background-color: $hover-background; + + > td, + > th { + background-color: $hover-background; + } + } + } + } +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_text-emphasis.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_text-emphasis.scss new file mode 100644 index 000000000..155d6ca8c --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_text-emphasis.scss @@ -0,0 +1,16 @@ +// stylelint-disable declaration-no-important + +// Typography + +@mixin text-emphasis-variant($parent, $color) { + #{$parent} { + color: $color !important; + } + @if $emphasized-link-hover-darken-percentage != 0 { + a#{$parent} { + @include hover-focus { + color: darken($color, $emphasized-link-hover-darken-percentage) !important; + } + } + } +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_text-hide.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_text-hide.scss new file mode 100644 index 000000000..3a923011e --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_text-hide.scss @@ -0,0 +1,11 @@ +// CSS image replacement +@mixin text-hide($ignore-warning: false) { + // stylelint-disable-next-line font-family-no-missing-generic-family-keyword + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; + + @include deprecate("`text-hide()`", "v4.1.0", "v5", $ignore-warning); +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_text-truncate.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_text-truncate.scss new file mode 100644 index 000000000..3504bb1aa --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_text-truncate.scss @@ -0,0 +1,8 @@ +// Text truncate +// Requires inline-block or block for proper styling + +@mixin text-truncate() { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_transition.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_transition.scss new file mode 100644 index 000000000..8ce35a6b8 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_transition.scss @@ -0,0 +1,16 @@ +// stylelint-disable property-blacklist +@mixin transition($transition...) { + @if $enable-transitions { + @if length($transition) == 0 { + transition: $transition-base; + } @else { + transition: $transition; + } + } + + @if $enable-prefers-reduced-motion-media-query { + @media (prefers-reduced-motion: reduce) { + transition: none; + } + } +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/mixins/_visibility.scss b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_visibility.scss new file mode 100644 index 000000000..f17467311 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/mixins/_visibility.scss @@ -0,0 +1,8 @@ +// stylelint-disable declaration-no-important + +// Visibility + +@mixin invisible($visibility) { + visibility: $visibility !important; + @include deprecate("`invisible()`", "v4.3.0", "v5"); +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/utilities/_align.scss b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_align.scss new file mode 100644 index 000000000..8b7df9f76 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_align.scss @@ -0,0 +1,8 @@ +// stylelint-disable declaration-no-important + +.align-baseline { vertical-align: baseline !important; } // Browser default +.align-top { vertical-align: top !important; } +.align-middle { vertical-align: middle !important; } +.align-bottom { vertical-align: bottom !important; } +.align-text-bottom { vertical-align: text-bottom !important; } +.align-text-top { vertical-align: text-top !important; } diff --git a/app/assets/stylesheets/bootstrap-4.3.1/utilities/_background.scss b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_background.scss new file mode 100644 index 000000000..1f18b2f3f --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_background.scss @@ -0,0 +1,19 @@ +// stylelint-disable declaration-no-important + +@each $color, $value in $theme-colors { + @include bg-variant(".bg-#{$color}", $value); +} + +@if $enable-gradients { + @each $color, $value in $theme-colors { + @include bg-gradient-variant(".bg-gradient-#{$color}", $value); + } +} + +.bg-white { + background-color: $white !important; +} + +.bg-transparent { + background-color: transparent !important; +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/utilities/_borders.scss b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_borders.scss new file mode 100644 index 000000000..302f6bf84 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_borders.scss @@ -0,0 +1,75 @@ +// stylelint-disable property-blacklist, declaration-no-important + +// +// Border +// + +.border { border: $border-width solid $border-color !important; } +.border-top { border-top: $border-width solid $border-color !important; } +.border-right { border-right: $border-width solid $border-color !important; } +.border-bottom { border-bottom: $border-width solid $border-color !important; } +.border-left { border-left: $border-width solid $border-color !important; } + +.border-0 { border: 0 !important; } +.border-top-0 { border-top: 0 !important; } +.border-right-0 { border-right: 0 !important; } +.border-bottom-0 { border-bottom: 0 !important; } +.border-left-0 { border-left: 0 !important; } + +@each $color, $value in $theme-colors { + .border-#{$color} { + border-color: $value !important; + } +} + +.border-white { + border-color: $white !important; +} + +// +// Border-radius +// + +.rounded-sm { + border-radius: $border-radius-sm !important; +} + +.rounded { + border-radius: $border-radius !important; +} + +.rounded-top { + border-top-left-radius: $border-radius !important; + border-top-right-radius: $border-radius !important; +} + +.rounded-right { + border-top-right-radius: $border-radius !important; + border-bottom-right-radius: $border-radius !important; +} + +.rounded-bottom { + border-bottom-right-radius: $border-radius !important; + border-bottom-left-radius: $border-radius !important; +} + +.rounded-left { + border-top-left-radius: $border-radius !important; + border-bottom-left-radius: $border-radius !important; +} + +.rounded-lg { + border-radius: $border-radius-lg !important; +} + +.rounded-circle { + border-radius: 50% !important; +} + +.rounded-pill { + border-radius: $rounded-pill !important; +} + +.rounded-0 { + border-radius: 0 !important; +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/utilities/_clearfix.scss b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_clearfix.scss new file mode 100644 index 000000000..e92522a94 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_clearfix.scss @@ -0,0 +1,3 @@ +.clearfix { + @include clearfix(); +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/utilities/_display.scss b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_display.scss new file mode 100644 index 000000000..130367998 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_display.scss @@ -0,0 +1,26 @@ +// stylelint-disable declaration-no-important + +// +// Utilities for common `display` values +// + +@each $breakpoint in map-keys($grid-breakpoints) { + @include media-breakpoint-up($breakpoint) { + $infix: breakpoint-infix($breakpoint, $grid-breakpoints); + + @each $value in $displays { + .d#{$infix}-#{$value} { display: $value !important; } + } + } +} + + +// +// Utilities for toggling `display` in print +// + +@media print { + @each $value in $displays { + .d-print-#{$value} { display: $value !important; } + } +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/utilities/_embed.scss b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_embed.scss new file mode 100644 index 000000000..4497ac040 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_embed.scss @@ -0,0 +1,39 @@ +// Credit: Nicolas Gallagher and SUIT CSS. + +.embed-responsive { + position: relative; + display: block; + width: 100%; + padding: 0; + overflow: hidden; + + &::before { + display: block; + content: ""; + } + + .embed-responsive-item, + iframe, + embed, + object, + video { + position: absolute; + top: 0; + bottom: 0; + left: 0; + width: 100%; + height: 100%; + border: 0; + } +} + +@each $embed-responsive-aspect-ratio in $embed-responsive-aspect-ratios { + $embed-responsive-aspect-ratio-x: nth($embed-responsive-aspect-ratio, 1); + $embed-responsive-aspect-ratio-y: nth($embed-responsive-aspect-ratio, 2); + + .embed-responsive-#{$embed-responsive-aspect-ratio-x}by#{$embed-responsive-aspect-ratio-y} { + &::before { + padding-top: percentage($embed-responsive-aspect-ratio-y / $embed-responsive-aspect-ratio-x); + } + } +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/utilities/_flex.scss b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_flex.scss new file mode 100644 index 000000000..3d4266e0d --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_flex.scss @@ -0,0 +1,51 @@ +// stylelint-disable declaration-no-important + +// Flex variation +// +// Custom styles for additional flex alignment options. + +@each $breakpoint in map-keys($grid-breakpoints) { + @include media-breakpoint-up($breakpoint) { + $infix: breakpoint-infix($breakpoint, $grid-breakpoints); + + .flex#{$infix}-row { flex-direction: row !important; } + .flex#{$infix}-column { flex-direction: column !important; } + .flex#{$infix}-row-reverse { flex-direction: row-reverse !important; } + .flex#{$infix}-column-reverse { flex-direction: column-reverse !important; } + + .flex#{$infix}-wrap { flex-wrap: wrap !important; } + .flex#{$infix}-nowrap { flex-wrap: nowrap !important; } + .flex#{$infix}-wrap-reverse { flex-wrap: wrap-reverse !important; } + .flex#{$infix}-fill { flex: 1 1 auto !important; } + .flex#{$infix}-grow-0 { flex-grow: 0 !important; } + .flex#{$infix}-grow-1 { flex-grow: 1 !important; } + .flex#{$infix}-shrink-0 { flex-shrink: 0 !important; } + .flex#{$infix}-shrink-1 { flex-shrink: 1 !important; } + + .justify-content#{$infix}-start { justify-content: flex-start !important; } + .justify-content#{$infix}-end { justify-content: flex-end !important; } + .justify-content#{$infix}-center { justify-content: center !important; } + .justify-content#{$infix}-between { justify-content: space-between !important; } + .justify-content#{$infix}-around { justify-content: space-around !important; } + + .align-items#{$infix}-start { align-items: flex-start !important; } + .align-items#{$infix}-end { align-items: flex-end !important; } + .align-items#{$infix}-center { align-items: center !important; } + .align-items#{$infix}-baseline { align-items: baseline !important; } + .align-items#{$infix}-stretch { align-items: stretch !important; } + + .align-content#{$infix}-start { align-content: flex-start !important; } + .align-content#{$infix}-end { align-content: flex-end !important; } + .align-content#{$infix}-center { align-content: center !important; } + .align-content#{$infix}-between { align-content: space-between !important; } + .align-content#{$infix}-around { align-content: space-around !important; } + .align-content#{$infix}-stretch { align-content: stretch !important; } + + .align-self#{$infix}-auto { align-self: auto !important; } + .align-self#{$infix}-start { align-self: flex-start !important; } + .align-self#{$infix}-end { align-self: flex-end !important; } + .align-self#{$infix}-center { align-self: center !important; } + .align-self#{$infix}-baseline { align-self: baseline !important; } + .align-self#{$infix}-stretch { align-self: stretch !important; } + } +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/utilities/_float.scss b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_float.scss new file mode 100644 index 000000000..54250844f --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_float.scss @@ -0,0 +1,11 @@ +// stylelint-disable declaration-no-important + +@each $breakpoint in map-keys($grid-breakpoints) { + @include media-breakpoint-up($breakpoint) { + $infix: breakpoint-infix($breakpoint, $grid-breakpoints); + + .float#{$infix}-left { float: left !important; } + .float#{$infix}-right { float: right !important; } + .float#{$infix}-none { float: none !important; } + } +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/utilities/_overflow.scss b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_overflow.scss new file mode 100644 index 000000000..8326c3064 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_overflow.scss @@ -0,0 +1,5 @@ +// stylelint-disable declaration-no-important + +@each $value in $overflows { + .overflow-#{$value} { overflow: $value !important; } +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/utilities/_position.scss b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_position.scss new file mode 100644 index 000000000..cdf6c115f --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_position.scss @@ -0,0 +1,32 @@ +// stylelint-disable declaration-no-important + +// Common values +@each $position in $positions { + .position-#{$position} { position: $position !important; } +} + +// Shorthand + +.fixed-top { + position: fixed; + top: 0; + right: 0; + left: 0; + z-index: $zindex-fixed; +} + +.fixed-bottom { + position: fixed; + right: 0; + bottom: 0; + left: 0; + z-index: $zindex-fixed; +} + +.sticky-top { + @supports (position: sticky) { + position: sticky; + top: 0; + z-index: $zindex-sticky; + } +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/utilities/_screenreaders.scss b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_screenreaders.scss new file mode 100644 index 000000000..9f26fde03 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_screenreaders.scss @@ -0,0 +1,11 @@ +// +// Screenreaders +// + +.sr-only { + @include sr-only(); +} + +.sr-only-focusable { + @include sr-only-focusable(); +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/utilities/_shadows.scss b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_shadows.scss new file mode 100644 index 000000000..f5d03fcd5 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_shadows.scss @@ -0,0 +1,6 @@ +// stylelint-disable declaration-no-important + +.shadow-sm { box-shadow: $box-shadow-sm !important; } +.shadow { box-shadow: $box-shadow !important; } +.shadow-lg { box-shadow: $box-shadow-lg !important; } +.shadow-none { box-shadow: none !important; } diff --git a/app/assets/stylesheets/bootstrap-4.3.1/utilities/_sizing.scss b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_sizing.scss new file mode 100644 index 000000000..f37648802 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_sizing.scss @@ -0,0 +1,20 @@ +// stylelint-disable declaration-no-important + +// Width and height + +@each $prop, $abbrev in (width: w, height: h) { + @each $size, $length in $sizes { + .#{$abbrev}-#{$size} { #{$prop}: $length !important; } + } +} + +.mw-100 { max-width: 100% !important; } +.mh-100 { max-height: 100% !important; } + +// Viewport additional helpers + +.min-vw-100 { min-width: 100vw !important; } +.min-vh-100 { min-height: 100vh !important; } + +.vw-100 { width: 100vw !important; } +.vh-100 { height: 100vh !important; } diff --git a/app/assets/stylesheets/bootstrap-4.3.1/utilities/_spacing.scss b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_spacing.scss new file mode 100644 index 000000000..351136790 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_spacing.scss @@ -0,0 +1,73 @@ +// stylelint-disable declaration-no-important + +// Margin and Padding + +@each $breakpoint in map-keys($grid-breakpoints) { + @include media-breakpoint-up($breakpoint) { + $infix: breakpoint-infix($breakpoint, $grid-breakpoints); + + @each $prop, $abbrev in (margin: m, padding: p) { + @each $size, $length in $spacers { + .#{$abbrev}#{$infix}-#{$size} { #{$prop}: $length !important; } + .#{$abbrev}t#{$infix}-#{$size}, + .#{$abbrev}y#{$infix}-#{$size} { + #{$prop}-top: $length !important; + } + .#{$abbrev}r#{$infix}-#{$size}, + .#{$abbrev}x#{$infix}-#{$size} { + #{$prop}-right: $length !important; + } + .#{$abbrev}b#{$infix}-#{$size}, + .#{$abbrev}y#{$infix}-#{$size} { + #{$prop}-bottom: $length !important; + } + .#{$abbrev}l#{$infix}-#{$size}, + .#{$abbrev}x#{$infix}-#{$size} { + #{$prop}-left: $length !important; + } + } + } + + // Negative margins (e.g., where `.mb-n1` is negative version of `.mb-1`) + @each $size, $length in $spacers { + @if $size != 0 { + .m#{$infix}-n#{$size} { margin: -$length !important; } + .mt#{$infix}-n#{$size}, + .my#{$infix}-n#{$size} { + margin-top: -$length !important; + } + .mr#{$infix}-n#{$size}, + .mx#{$infix}-n#{$size} { + margin-right: -$length !important; + } + .mb#{$infix}-n#{$size}, + .my#{$infix}-n#{$size} { + margin-bottom: -$length !important; + } + .ml#{$infix}-n#{$size}, + .mx#{$infix}-n#{$size} { + margin-left: -$length !important; + } + } + } + + // Some special margin utils + .m#{$infix}-auto { margin: auto !important; } + .mt#{$infix}-auto, + .my#{$infix}-auto { + margin-top: auto !important; + } + .mr#{$infix}-auto, + .mx#{$infix}-auto { + margin-right: auto !important; + } + .mb#{$infix}-auto, + .my#{$infix}-auto { + margin-bottom: auto !important; + } + .ml#{$infix}-auto, + .mx#{$infix}-auto { + margin-left: auto !important; + } + } +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/utilities/_stretched-link.scss b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_stretched-link.scss new file mode 100644 index 000000000..fb5066bf5 --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_stretched-link.scss @@ -0,0 +1,19 @@ +// +// Stretched link +// + +.stretched-link { + &::after { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1; + // Just in case `pointer-events: none` is set on a parent + pointer-events: auto; + content: ""; + // IE10 bugfix, see https://stackoverflow.com/questions/16947967/ie10-hover-pseudo-class-doesnt-work-without-background-color + background-color: rgba(0, 0, 0, 0); + } +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/utilities/_text.scss b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_text.scss new file mode 100644 index 000000000..589e5687a --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_text.scss @@ -0,0 +1,72 @@ +// stylelint-disable declaration-no-important + +// +// Text +// + +.text-monospace { font-family: $font-family-monospace !important; } + +// Alignment + +.text-justify { text-align: justify !important; } +.text-wrap { white-space: normal !important; } +.text-nowrap { white-space: nowrap !important; } +.text-truncate { @include text-truncate; } + +// Responsive alignment + +@each $breakpoint in map-keys($grid-breakpoints) { + @include media-breakpoint-up($breakpoint) { + $infix: breakpoint-infix($breakpoint, $grid-breakpoints); + + .text#{$infix}-left { text-align: left !important; } + .text#{$infix}-right { text-align: right !important; } + .text#{$infix}-center { text-align: center !important; } + } +} + +// Transformation + +.text-lowercase { text-transform: lowercase !important; } +.text-uppercase { text-transform: uppercase !important; } +.text-capitalize { text-transform: capitalize !important; } + +// Weight and italics + +.font-weight-light { font-weight: $font-weight-light !important; } +.font-weight-lighter { font-weight: $font-weight-lighter !important; } +.font-weight-normal { font-weight: $font-weight-normal !important; } +.font-weight-bold { font-weight: $font-weight-bold !important; } +.font-weight-bolder { font-weight: $font-weight-bolder !important; } +.font-italic { font-style: italic !important; } + +// Contextual colors + +.text-white { color: $white !important; } + +@each $color, $value in $theme-colors { + @include text-emphasis-variant(".text-#{$color}", $value); +} + +.text-body { color: $body-color !important; } +.text-muted { color: $text-muted !important; } + +.text-black-50 { color: rgba($black, .5) !important; } +.text-white-50 { color: rgba($white, .5) !important; } + +// Misc + +.text-hide { + @include text-hide($ignore-warning: true); +} + +.text-decoration-none { text-decoration: none !important; } + +.text-break { + word-break: break-word !important; // IE & < Edge 18 + overflow-wrap: break-word !important; +} + +// Reset + +.text-reset { color: inherit !important; } diff --git a/app/assets/stylesheets/bootstrap-4.3.1/utilities/_visibility.scss b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_visibility.scss new file mode 100644 index 000000000..7756c3bfa --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/utilities/_visibility.scss @@ -0,0 +1,13 @@ +// stylelint-disable declaration-no-important + +// +// Visibility utilities +// + +.visible { + visibility: visible !important; +} + +.invisible { + visibility: hidden !important; +} diff --git a/app/assets/stylesheets/bootstrap-4.3.1/vendor/_rfs.scss b/app/assets/stylesheets/bootstrap-4.3.1/vendor/_rfs.scss new file mode 100644 index 000000000..497e07eda --- /dev/null +++ b/app/assets/stylesheets/bootstrap-4.3.1/vendor/_rfs.scss @@ -0,0 +1,204 @@ +// stylelint-disable property-blacklist, scss/dollar-variable-default + +// SCSS RFS mixin +// +// Automated font-resizing +// +// See https://github.com/twbs/rfs + +// Configuration + +// Base font size +$rfs-base-font-size: 1.25rem !default; +$rfs-font-size-unit: rem !default; + +// Breakpoint at where font-size starts decreasing if screen width is smaller +$rfs-breakpoint: 1200px !default; +$rfs-breakpoint-unit: px !default; + +// Resize font-size based on screen height and width +$rfs-two-dimensional: false !default; + +// Factor of decrease +$rfs-factor: 10 !default; + +@if type-of($rfs-factor) != "number" or $rfs-factor <= 1 { + @error "`#{$rfs-factor}` is not a valid $rfs-factor, it must be greater than 1."; +} + +// Generate enable or disable classes. Possibilities: false, "enable" or "disable" +$rfs-class: false !default; + +// 1 rem = $rfs-rem-value px +$rfs-rem-value: 16 !default; + +// Safari iframe resize bug: https://github.com/twbs/rfs/issues/14 +$rfs-safari-iframe-resize-bug-fix: false !default; + +// Disable RFS by setting $enable-responsive-font-sizes to false +$enable-responsive-font-sizes: true !default; + +// Cache $rfs-base-font-size unit +$rfs-base-font-size-unit: unit($rfs-base-font-size); + +// Remove px-unit from $rfs-base-font-size for calculations +@if $rfs-base-font-size-unit == "px" { + $rfs-base-font-size: $rfs-base-font-size / ($rfs-base-font-size * 0 + 1); +} +@else if $rfs-base-font-size-unit == "rem" { + $rfs-base-font-size: $rfs-base-font-size / ($rfs-base-font-size * 0 + 1 / $rfs-rem-value); +} + +// Cache $rfs-breakpoint unit to prevent multiple calls +$rfs-breakpoint-unit-cache: unit($rfs-breakpoint); + +// Remove unit from $rfs-breakpoint for calculations +@if $rfs-breakpoint-unit-cache == "px" { + $rfs-breakpoint: $rfs-breakpoint / ($rfs-breakpoint * 0 + 1); +} +@else if $rfs-breakpoint-unit-cache == "rem" or $rfs-breakpoint-unit-cache == "em" { + $rfs-breakpoint: $rfs-breakpoint / ($rfs-breakpoint * 0 + 1 / $rfs-rem-value); +} + +// Responsive font-size mixin +@mixin rfs($fs, $important: false) { + // Cache $fs unit + $fs-unit: if(type-of($fs) == "number", unit($fs), false); + + // Add !important suffix if needed + $rfs-suffix: if($important, " !important", ""); + + // If $fs isn't a number (like inherit) or $fs has a unit (not px or rem, like 1.5em) or $ is 0, just print the value + @if not $fs-unit or $fs-unit != "" and $fs-unit != "px" and $fs-unit != "rem" or $fs == 0 { + font-size: #{$fs}#{$rfs-suffix}; + } + @else { + // Variables for storing static and fluid rescaling + $rfs-static: null; + $rfs-fluid: null; + + // Remove px-unit from $fs for calculations + @if $fs-unit == "px" { + $fs: $fs / ($fs * 0 + 1); + } + @else if $fs-unit == "rem" { + $fs: $fs / ($fs * 0 + 1 / $rfs-rem-value); + } + + // Set default font-size + @if $rfs-font-size-unit == rem { + $rfs-static: #{$fs / $rfs-rem-value}rem#{$rfs-suffix}; + } + @else if $rfs-font-size-unit == px { + $rfs-static: #{$fs}px#{$rfs-suffix}; + } + @else { + @error "`#{$rfs-font-size-unit}` is not a valid unit for $rfs-font-size-unit. Use `px` or `rem`."; + } + + // Only add media query if font-size is bigger as the minimum font-size + // If $rfs-factor == 1, no rescaling will take place + @if $fs > $rfs-base-font-size and $enable-responsive-font-sizes { + $min-width: null; + $variable-unit: null; + + // Calculate minimum font-size for given font-size + $fs-min: $rfs-base-font-size + ($fs - $rfs-base-font-size) / $rfs-factor; + + // Calculate difference between given font-size and minimum font-size for given font-size + $fs-diff: $fs - $fs-min; + + // Base font-size formatting + // No need to check if the unit is valid, because we did that before + $min-width: if($rfs-font-size-unit == rem, #{$fs-min / $rfs-rem-value}rem, #{$fs-min}px); + + // If two-dimensional, use smallest of screen width and height + $variable-unit: if($rfs-two-dimensional, vmin, vw); + + // Calculate the variable width between 0 and $rfs-breakpoint + $variable-width: #{$fs-diff * 100 / $rfs-breakpoint}#{$variable-unit}; + + // Set the calculated font-size. + $rfs-fluid: calc(#{$min-width} + #{$variable-width}) #{$rfs-suffix}; + } + + // Rendering + @if $rfs-fluid == null { + // Only render static font-size if no fluid font-size is available + font-size: $rfs-static; + } + @else { + $mq-value: null; + + // RFS breakpoint formatting + @if $rfs-breakpoint-unit == em or $rfs-breakpoint-unit == rem { + $mq-value: #{$rfs-breakpoint / $rfs-rem-value}#{$rfs-breakpoint-unit}; + } + @else if $rfs-breakpoint-unit == px { + $mq-value: #{$rfs-breakpoint}px; + } + @else { + @error "`#{$rfs-breakpoint-unit}` is not a valid unit for $rfs-breakpoint-unit. Use `px`, `em` or `rem`."; + } + + @if $rfs-class == "disable" { + // Adding an extra class increases specificity, + // which prevents the media query to override the font size + &, + .disable-responsive-font-size &, + &.disable-responsive-font-size { + font-size: $rfs-static; + } + } + @else { + font-size: $rfs-static; + } + + @if $rfs-two-dimensional { + @media (max-width: #{$mq-value}), (max-height: #{$mq-value}) { + @if $rfs-class == "enable" { + .enable-responsive-font-size &, + &.enable-responsive-font-size { + font-size: $rfs-fluid; + } + } + @else { + font-size: $rfs-fluid; + } + + @if $rfs-safari-iframe-resize-bug-fix { + // stylelint-disable-next-line length-zero-no-unit + min-width: 0vw; + } + } + } + @else { + @media (max-width: #{$mq-value}) { + @if $rfs-class == "enable" { + .enable-responsive-font-size &, + &.enable-responsive-font-size { + font-size: $rfs-fluid; + } + } + @else { + font-size: $rfs-fluid; + } + + @if $rfs-safari-iframe-resize-bug-fix { + // stylelint-disable-next-line length-zero-no-unit + min-width: 0vw; + } + } + } + } + } +} + +// The font-size & responsive-font-size mixin uses RFS to rescale font sizes +@mixin font-size($fs, $important: false) { + @include rfs($fs, $important); +} + +@mixin responsive-font-size($fs, $important: false) { + @include rfs($fs, $important); +} diff --git a/app/javascript/application.js b/app/javascript/application.js new file mode 100644 index 000000000..3750ac026 --- /dev/null +++ b/app/javascript/application.js @@ -0,0 +1,29 @@ +// Configure your import map in config/importmap.rb. Read more: https://github.com/rails/importmap-rails +//Chartkick +import "chartkick" +import "Chart.bundle" + +// JQuery +import jQuery from "jquery"; +import "jquery-ujs"; +// make jQuery global +window.$ = window.jQuery = jQuery; + +import "bootstrap" + +$(document).ready(function(){ + var clipboard; + if (typeof ClipboardJS !== 'undefined') { + clipboard = new ClipboardJS('.clipboard-btn', { + text: function(trigger) { + if (trigger.getAttribute('data-clipboard-target')) { + var target = trigger.getAttribute('data-clipboard-target').substring(1); + return document.getElementById(target).innerHTML; + } + else if (trigger.getAttribute('data-clipboard-text')) { + return trigger.getAttribute('data-clipboard-text'); + } + } + }); + } +}); diff --git a/app/assets/javascripts/editors.js b/app/javascript/editors.js similarity index 100% rename from app/assets/javascripts/editors.js rename to app/javascript/editors.js diff --git a/app/assets/javascripts/home.js b/app/javascript/home.js similarity index 100% rename from app/assets/javascripts/home.js rename to app/javascript/home.js diff --git a/app/assets/javascripts/papers.js b/app/javascript/papers.js similarity index 90% rename from app/assets/javascripts/papers.js rename to app/javascript/papers.js index 279e07811..d7283e598 100644 --- a/app/assets/javascripts/papers.js +++ b/app/javascript/papers.js @@ -32,12 +32,8 @@ $(window).resize(function() { }); $(function() { - var clipboard; $("#joss-paper").on('load', setPaperSize()); $("form#new_paper").submit(function() { e.preventDefault(); }); - if (typeof ClipboardJS !== 'undefined') { - clipboard = new ClipboardJS('.clippy'); - } }); diff --git a/app/assets/javascripts/sortable.js b/app/javascript/sortable.js similarity index 100% rename from app/assets/javascripts/sortable.js rename to app/javascript/sortable.js diff --git a/app/assets/javascripts/turbolinks_transitions.js b/app/javascript/turbolinks_transitions.js similarity index 100% rename from app/assets/javascripts/turbolinks_transitions.js rename to app/javascript/turbolinks_transitions.js diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 1dc25e996..edcef80ab 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -4,7 +4,7 @@ <%= setting(:name) %> <%= stylesheet_link_tag 'application', media: 'all' %> - <%= javascript_include_tag 'application' %> + <%= javascript_importmap_tags %> <%= csrf_meta_tags %> diff --git a/app/views/papers/_show_published.html.erb b/app/views/papers/_show_published.html.erb index 6b9dc0d7e..05a61f884 100644 --- a/app/views/papers/_show_published.html.erb +++ b/app/views/papers/_show_published.html.erb @@ -68,7 +68,7 @@
          Markdown badge
          -

          <%= image_tag @paper.status_badge_url %>   <%= octicon "paste", height: 16, class: "", "aria-label": "Copy" %>

          +

          <%= image_tag @paper.status_badge_url %>   <%= octicon "paste", height: 16, class: "", "aria-label": "Copy" %>

          License

          Authors of <%= Rails.application.settings['abbreviation'] %> papers retain copyright.

          diff --git a/app/views/papers/_show_unpublished.html.erb b/app/views/papers/_show_unpublished.html.erb index 68e9a69b8..c4a30afe4 100644 --- a/app/views/papers/_show_unpublished.html.erb +++ b/app/views/papers/_show_unpublished.html.erb @@ -43,7 +43,7 @@ <% if @paper.review_issue_id %>
          Markdown badge
          -

          <%= image_tag @paper.status_badge_url %>   <%= octicon "paste", height: 16, class: "", "aria-label": "Copy" %>

          +

          <%= image_tag @paper.status_badge_url %>   <%= octicon "paste", height: 16, class: "", "aria-label": "Copy" %>

          <% end %>
          diff --git a/app/views/papers/show.html.erb b/app/views/papers/show.html.erb index bb8025479..8076652d0 100644 --- a/app/views/papers/show.html.erb +++ b/app/views/papers/show.html.erb @@ -3,7 +3,7 @@ <%= Rails.application.settings['name'] %>: <%= @paper.title %> <%= stylesheet_link_tag 'application', media: 'all' %> - <%= javascript_include_tag 'application' %> + <%= javascript_importmap_tags %> <%= csrf_meta_tags %> diff --git a/bin/importmap b/bin/importmap new file mode 100755 index 000000000..36502ab16 --- /dev/null +++ b/bin/importmap @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby + +require_relative "../config/application" +require "importmap/commands" diff --git a/config/importmap.rb b/config/importmap.rb new file mode 100644 index 000000000..3a14488c7 --- /dev/null +++ b/config/importmap.rb @@ -0,0 +1,18 @@ +# Pin npm packages by running ./bin/importmap + +pin "application", preload: true + +# Chartkick +pin "chartkick", to: "chartkick.js" +pin "Chart.bundle", to: "Chart.bundle.js" + +# ClipboardJS +pin "clipboard.js", to: "https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.10/clipboard.min.js", preload: true + +# JQuery +pin "jquery", to: "https://ga.jspm.io/npm:jquery@3.6.0/dist/jquery.js", preload: true +pin "jquery-ujs", to: "https://ga.jspm.io/npm:jquery-ujs@1.2.3/src/rails.js", preload: true + +# Bootstrap +pin "bootstrap", to: "https://ga.jspm.io/npm:bootstrap@4.3.1/dist/js/bootstrap.js", preload: true +pin "popper.js", to: "https://ga.jspm.io/npm:popper.js@1.16.1/dist/umd/popper.js", preload: true \ No newline at end of file diff --git a/vendor/javascript/.keep b/vendor/javascript/.keep new file mode 100644 index 000000000..e69de29bb From f4e748646c544feb3f931d56997dd4f401afd6b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 2 Jun 2022 14:40:58 +0200 Subject: [PATCH 385/609] Add missing active-links --- app/views/content/layout/_navbar.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/content/layout/_navbar.html.erb b/app/views/content/layout/_navbar.html.erb index 398d09bf8..60608a7f2 100644 --- a/app/views/content/layout/_navbar.html.erb +++ b/app/views/content/layout/_navbar.html.erb @@ -17,11 +17,11 @@
          <%= invitation_status(invitation) %> >Invited <%= time_ago_in_words(invitation.created_at) %> ago<%= link_to("Cancel", expire_invitation_path(invitation, page: params[:page], track_id: params[:track_id].presence), method: :put, data: {confirm: "Are you sure you want to mark this invitation as expired?" }) if invitation.pending? %><%= link_to("Cancel", expire_invitation_path(invitation, page: params[:page], track_id: params[:track_id].presence), data: { turbo_method: :put, turbo_confirm: "Are you sure you want to mark this invitation as expired?" }) if invitation.pending? %>
          <%= onboarding_invitation.token %> ><%= time_ago_in_words(onboarding_invitation.last_sent_at) %> ago - <%= link_to("Delete", onboarding_path(onboarding_invitation), method: :delete, data: {confirm: "Are you sure you want to delete this invitation?" }) %> + <%= link_to("Delete", onboarding_path(onboarding_invitation), data: { turbo_method: :delete, turbo_confirm: "Are you sure you want to delete this invitation?" }) %> - <%= link_to("Re-invite", resend_invitation_onboarding_path(onboarding_invitation), method: :post, data: {confirm: "This will re-send the invitation email" }) %> + <%= link_to("Re-invite", resend_invitation_onboarding_path(onboarding_invitation), data: { turbo_method: :post, turbo_confirm: "This will re-send the invitation email" }) %>
          - <%= link_to("Approve", accept_editor_onboardings_path(editor_id: editor.id), method: :post, data: {confirm: "This will make #{editor.login} a topic editor" }) %> + <%= link_to("Approve", accept_editor_onboardings_path(editor_id: editor.id), data: { turbo_method: :post, turbo_confirm: "This will make #{editor.login} a topic editor" }) %> <% if editor.onboarding_invitation&.invited_to_team? %> - <%= link_to("Re-send invitation to join GitHub organization", invite_to_editors_team_onboardings_path(editor_id: editor.id), method: :post) %> + <%= link_to("Re-send invitation to join GitHub organization", invite_to_editors_team_onboardings_path(editor_id: editor.id), data: { turbo_method: :post }) %> <% else %> - <%= link_to("Send invitation to join GitHub team", invite_to_editors_team_onboardings_path(editor_id: editor.id), method: :post) %> + <%= link_to("Send invitation to join GitHub team", invite_to_editors_team_onboardings_path(editor_id: editor.id), data: { turbo_method: :post }) %> <% end %>
          > <%= link_to(image_tag(avatar(editor.login), size: "24x24", class: "avatar", title: editor.full_name), github_user_link(editor.login), target: "_blank") %> - <%= link_to editor.login, editor, title: editor.full_name %><%= editor.category_list %> <%= link_to in_progress_for_editor(editor), "/dashboard/#{editor.login}" %>
          + + + + + + + + + + + + <%- @tracks.each do |track| %> + + + + + + + + <%- end %> + +
          CodeShort nameTrackAEiC(s)
          <%= track.code %><%= track.short_name %>><%= link_to track.name, track_path(track) %><%= track.aeics.map(&:full_name).join(', ') %><%= link_to 'Edit', edit_track_path(track), title: 'Edit' %>
          + diff --git a/app/views/tracks/new.html.erb b/app/views/tracks/new.html.erb new file mode 100644 index 000000000..71f8c8bf1 --- /dev/null +++ b/app/views/tracks/new.html.erb @@ -0,0 +1,11 @@ +
          +
          +

          New Track

          + <%= render 'form' %> + + +
          +
          + diff --git a/app/views/tracks/remove.html.erb b/app/views/tracks/remove.html.erb new file mode 100644 index 000000000..7be6c7d15 --- /dev/null +++ b/app/views/tracks/remove.html.erb @@ -0,0 +1,106 @@ +
          +
          +

          Removing <%= @track.label %>

          + + <%= form_for @track, method: :delete do |f| %> + +
          + <% if @track.errors.any? %> +
          +

          Track could not be deleted.

          +
            + <% @track.errors.each do |error| -%> +
          • <%= error.message %>
          • + <% end -%> +
          +
          + <% end %> +
          + +
          +
          +
          + Your are going to delete the track: <%= @track.name %> +
          +
          +
          + +
          +
          +
          + Papers in this track: + <%= link_to "In-progress", dashboard_in_progress_path(track_id: @track) %>: + <%= @in_progress_papers %>, + Total: + <%= @assigned_papers %> +
          +
          +
          + + <% if @assigned_papers > 0 %> +
          +
          +
          All the papers in this track will be reassigned to:
          +
          +
          +
          + <%= select_tag :new_track_id, options_from_collection_for_select(@other_tracks, :id, :name), prompt: "Select track", class: "form-control", style: "margin-right: 12px;" %> +
          +
          +
          +
          + <% end %> + + <% unless @editors.empty? %> +
          +
          +
          Editors currently assigned to this track:
          +
          +
          +
          + + <% @editors.each do |e| %> + + <% end %> +
          <%= e.full_name %>
          +
          +
          +
          +
          + <% end %> + + <% unless @subjects.empty? %> +
          +
          +
          All these subjects will be deleted:
          +
          +
          +
          + + <% @subjects.in_groups_of(2).each do |subject_pair| %> + + <% subject_pair.each do |subject| %> + + <% end %> + + <% end %> +
          <%= subject.name if subject %>
          +
          +
          +
          + <% end %> + + +
          + <%= f.submit "Reassign papers and Delete track", class: "btn btn-danger" %> +
          + <% end %> + + + +
          +
          diff --git a/app/views/tracks/show.html.erb b/app/views/tracks/show.html.erb new file mode 100644 index 000000000..d70b8a9a7 --- /dev/null +++ b/app/views/tracks/show.html.erb @@ -0,0 +1,35 @@ +
          +
          + +

          <%= @track.name %>

          + +

          + Code: + <%= @track.code %> +

          + +

          + Short name: + <%= @track.short_name %> +

          + +

          + Associate Editor(s) in Chief: +

            + <% @track.aeics.each do |aeic| %> +
          • <%= aeic.full_name %>
          • + <% end %> +
          +

          + +

          + <%= link_to "In-progress papers currently assigned to this track", dashboard_in_progress_path(track_id: @track) %>: + <%= Paper.in_progress.by_track(@track.id).count %> +

          + + +
          +
          diff --git a/config/routes.rb b/config/routes.rb index ba9cffbaf..ddac4010a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -24,6 +24,10 @@ end end + resources :tracks do + get 'remove', on: :member + end + resources :subjects, only: [] do get 'search', on: :collection end diff --git a/spec/controllers/editors_controller_spec.rb b/spec/controllers/editors_controller_spec.rb index 082e906b6..56b93d507 100644 --- a/spec/controllers/editors_controller_spec.rb +++ b/spec/controllers/editors_controller_spec.rb @@ -39,11 +39,14 @@ describe "#index" do it "assigns editors to @active_editors and @emeritus_editors" do - editor = create(:editor) + track = current_user.editor.tracks.first + board = track.aeics.first + editor = create(:editor, track_ids: [track.id]) emeritus = create(:editor, kind: "emeritus") - create(:editor, kind: "pending") + create(:editor, kind: "pending", track_ids: [track.id]) get :index - expect(assigns(:active_editors)).to eq([current_user.editor, editor]) + + expect(assigns(:active_editors)).to eq([board, current_user.editor, editor]) expect(assigns(:emeritus_editors)).to eq([emeritus]) end diff --git a/spec/factories/editors.rb b/spec/factories/editors.rb index deb8b69bd..099d52c7b 100644 --- a/spec/factories/editors.rb +++ b/spec/factories/editors.rb @@ -10,14 +10,16 @@ url { "http://placekitten.com" } description { "Person McEditor is an editor" } availability_comment { "OOO until March 1" } - track_ids {[create(:track).id]} + track_ids { ["board", "emeritus"].include?(kind) ? [] : [create(:track).id]} factory :board_editor do kind { "board" } + track_ids {[]} end factory :emeritus_editor do kind { "emeritus" } + track_ids {[]} end factory :pending_editor do diff --git a/spec/factories/subjects.rb b/spec/factories/subjects.rb index d7028c904..b4e711a44 100644 --- a/spec/factories/subjects.rb +++ b/spec/factories/subjects.rb @@ -1,6 +1,6 @@ FactoryBot.define do factory :subject do sequence(:name) {|n| "Bioengineering #{n}" } - track_id { create(:track) } + track { create(:track) } end end diff --git a/spec/factories/tracks.rb b/spec/factories/tracks.rb index 9729548f8..814b3c89a 100644 --- a/spec/factories/tracks.rb +++ b/spec/factories/tracks.rb @@ -2,6 +2,7 @@ factory :track do sequence(:name) { |n| "Astronomy & Astrophysics #{n}" } sequence(:code) { |n| n } - sequence(:short_name) { |n| "a_and_a_#{n}" } + sequence(:short_name) { |n| "a_and_a_#{n}" } + aeic_ids {[create(:board_editor).id]} end end diff --git a/spec/models/editor_spec.rb b/spec/models/editor_spec.rb index 9cf92dfe0..98f606e85 100644 --- a/spec/models/editor_spec.rb +++ b/spec/models/editor_spec.rb @@ -121,12 +121,13 @@ describe "#active editors" do it "should exclude emeritus and pending" do - editor_1 = create(:editor, login: "@board1", kind: "board") - editor_2 = create(:editor, login: "@topic1", kind: "topic") - editor_3 = create(:editor, login: "@retired1", kind: "emeritus") - editor_3 = create(:editor, login: "@pending1", kind: "pending") + editor_in_chief = create(:editor, login: "@board1", kind: "board") + track = create(:track, aeic_ids: [editor_in_chief.id]) + create(:editor, login: "@topic1", kind: "topic", track_ids: [track.id]) + create(:editor, login: "@retired1", kind: "emeritus", track_ids: [track.id]) + create(:editor, login: "@pending1", kind: "pending", track_ids: [track.id]) - assert Editor.active.count == 2 + expect(Editor.active.count).to eq(2) assert Editor.emeritus.count == 1 assert Editor.pending.count == 1 end diff --git a/spec/models/track_spec.rb b/spec/models/track_spec.rb index a5996849a..c3e2f4a7b 100644 --- a/spec/models/track_spec.rb +++ b/spec/models/track_spec.rb @@ -38,10 +38,10 @@ end describe "#label" do - it "includes code and name" do + it "includes code and short name" do track = create(:track, code: 33, name: "Earth sciences and Ecology", short_name: "ESE") - expect(track.label).to eq "Track: 33 (Earth sciences and Ecology)" + expect(track.label).to eq "Track: 33 (ESE)" end end end diff --git a/spec/system/tracks_spec.rb b/spec/system/tracks_spec.rb new file mode 100644 index 000000000..4e7a359c2 --- /dev/null +++ b/spec/system/tracks_spec.rb @@ -0,0 +1,174 @@ +require "rails_helper" + +feature "Manage Tracks" do + let(:user_editor) { create(:user, editor: create(:editor, first_name: "Lorena", description: "Science testing editor")) } + let(:admin_editor) { create(:admin_user, editor: create(:board_editor)) } + + scenario "Is not public" do + visit tracks_path + expect(page).to have_content("Please login first") + end + + scenario "Is not available to non-eic users" do + login_as(user_editor) + visit tracks_path + expect(page).to have_content("You are not permitted to view that page") + end + + scenario "Is visible to admins" do + login_as(admin_editor) + visit tracks_path + expect(page).to_not have_content("You are not permitted to view that page") + expect(page).to have_content("Tracks") + end + + feature "Logged as an admin" do + before do + @eiac = create(:board_editor, first_name: "Testeditor", last_name: "In-chief") + @track = create(:track, name: "Testing track", short_name: "TE", code: "33", aeic_ids: [@eiac.id]) + login_as(admin_editor) + visit tracks_path + end + + scenario "Show the list of tracks" do + expect(page).to have_content("Testing track") + expect(page).to have_content("TE") + expect(page).to have_content("33") + end + + scenario "Show track's info" do + click_link "Testing track" + expect(current_path).to eq(track_path(@track)) + expect(page).to have_content("Testing track") + expect(page).to have_content("TE") + expect(page).to have_content("33") + expect(page).to have_content("Testeditor In-chief") + click_link "List" + expect(current_path).to eq(tracks_path) + end + + scenario "Update track info" do + within("#track_#{@track.id}") { + click_link "Edit" + } + expect(current_path).to eq(edit_track_path(@track)) + fill_in :track_short_name, with: "TESTR" + click_on "Update Track" + expect(page).to have_content("Track was successfully updated.") + click_link "List" + expect(current_path).to eq(tracks_path) + within("#track_#{@track.id}") { + expect(page).to have_content("TESTR") + } + end + + scenario "Create track" do + click_on "New Track" + expect(current_path).to eq(new_track_path) + + fill_in :track_name, with: "Test Software" + fill_in :track_short_name, with: "TS" + fill_in :track_code, with: "42" + check "Testeditor In-chief" + + click_on "Create Track" + + expect(page).to have_content("Track was successfully created.") + click_link "List" + expect(current_path).to eq(tracks_path) + expect(page).to have_content("Test Software") + expect(page).to have_content("TS") + expect(page).to have_content("42") + end + + scenario "Name, code and AEiC fields are mandatory" do + visit new_track_path + + fill_in :track_short_name, with: "TS" + fill_in :track_code, with: "42" + check "Testeditor In-chief" + click_on "Create Track" + expect(page).to have_content("Track could not be saved.") + expect(page).to have_content("Name: can't be blank") + + fill_in :track_name, with: "Test Software" + fill_in :track_short_name, with: "TS" + fill_in :track_code, with: "" + check "Testeditor In-chief" + click_on "Create Track" + expect(page).to have_content("Track could not be saved.") + expect(page).to have_content("Code: is not a number") + + fill_in :track_name, with: "Test Software" + fill_in :track_short_name, with: "TS" + fill_in :track_code, with: "42" + uncheck "Testeditor In-chief" + click_on "Create Track" + expect(page).to have_content("Track could not be saved.") + expect(page).to have_content("Each track must have at least one Associate Editor in Chief") + end + + feature "Deleting a track" do + before do + @other_track = create(:track, name: "New track", short_name: "NT", code: "7", aeic_ids: [@eiac.id]) + @editor = create(:editor, first_name: "Testtopic", last_name: "Editorperson", track_ids: [@track.id, @other_track.id]) + @pending_paper = create(:submitted_paper, track: @track) + @submitted_paper = create(:accepted_paper, track: @track) + @subject_A = create(:subject, name: "Tester subsubject", track_id: @track.id) + @subject_B = create(:subject, name: "Solar Astronomy") + end + + scenario "Show papers, editors and subjects assigned to the track" do + within("#track_#{@track.id}") { + click_link "Edit" + } + click_link "Reassign papers and Delete" + + expect(current_path).to eq(remove_track_path(@track)) + expect(page).to have_content("Papers in this track: In-progress: 1, Total: 2") + expect(page).to have_content("Your are going to delete the track: Testing track") + expect(page).to have_content("Removing Track: 33 (TE)") + expect(page).to have_content("Testtopic Editorperson") + expect(page).to have_content("Tester subsubject") + expect(page).to_not have_content("Solar Astronomy") + end + + scenario "A new track must be specified for assigned papers" do + visit remove_track_path(@track) + click_on "Reassign papers and Delete track" + + expect(page).to have_content("Track could not be deleted.") + expect(page).to have_content("You must provide a track to assign all papers from this track before deleting it.") + end + + scenario "Papers are reassigned and track destroyed" do + tracks_before = Track.count + subjects_before = Subject.count + + visit remove_track_path(@track) + select "New track", from: "new_track_id" + click_on "Reassign papers and Delete track" + + expect(page).to have_content("Track was successfully destroyed.") + expect(current_path).to eq(tracks_path) + expect(page).to_not have_content("Testing track") + expect(page).to have_content("New track") + + expect(@pending_paper.reload.track).to eq(@other_track) + expect(@submitted_paper.reload.track).to eq(@other_track) + + expect(@editor.reload.tracks.size).to eq(1) + expect(@editor.tracks.first).to eq(@other_track) + + expect(@eiac.reload.managed_tracks.size).to eq(1) + expect(@eiac.managed_tracks.first).to eq(@other_track) + + tracks_after = Track.count + subjects_after = Subject.count + + expect(tracks_before - tracks_after).to eq(1) + expect(subjects_before - subjects_after).to eq(1) + end + end + end +end From 10d727b02dc108b175005c1a678709487f0b66ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 17 Jun 2022 13:49:34 +0200 Subject: [PATCH 412/609] Allow AEiC to change paper's track --- app/assets/stylesheets/papers.scss | 2 +- app/controllers/papers_controller.rb | 14 +- app/models/paper.rb | 18 +++ app/views/papers/_actions.html.erb | 56 ++++++++ app/views/papers/_form.html.erb | 2 +- config/routes.rb | 1 + config/settings-development.yml | 4 +- ...6085520_add_suggested_subject_to_papers.rb | 5 + db/schema.rb | 3 +- spec/controllers/papers_controller_spec.rb | 10 +- spec/models/paper_spec.rb | 53 +++++++ spec/system/papers/track_info_spec.rb | 134 ++++++++++++++++++ spec/system/tracks_spec.rb | 10 +- spec/views/papers/new.html.erb_spec.rb | 2 + 14 files changed, 301 insertions(+), 13 deletions(-) create mode 100644 db/migrate/20220616085520_add_suggested_subject_to_papers.rb create mode 100644 spec/system/papers/track_info_spec.rb diff --git a/app/assets/stylesheets/papers.scss b/app/assets/stylesheets/papers.scss index 569f3425f..87b4f1aee 100644 --- a/app/assets/stylesheets/papers.scss +++ b/app/assets/stylesheets/papers.scss @@ -103,7 +103,7 @@ } } -.btn.start-review { +.btn.start-review, .btn.change-track { margin-top: 5px; } diff --git a/app/controllers/papers_controller.rb b/app/controllers/papers_controller.rb index be09ee76f..a34c454e5 100644 --- a/app/controllers/papers_controller.rb +++ b/app/controllers/papers_controller.rb @@ -189,6 +189,16 @@ def start_meta_review end end + def change_track + @paper = Paper.find_by_sha(params[:id]) + track = Track.find(params[:track_id]) + + @paper.move_to_track(track) + + flash[:notice] = "Track for the paper changed!" + redirect_to paper_path(@paper) + end + def reject @paper = Paper.find_by_sha(params[:id]) @@ -225,7 +235,7 @@ def show if params[:doi] && valid_doi? @paper = Paper.find_by_doi!(params[:doi]) else - @paper = Paper.includes(notes: :editor).find_by_sha!(params[:id]) + @paper = Paper.includes(:votes, :editor, notes: :editor, track: :aeics).find_by_sha!(params[:id]) # By default we want people to use the URLs with the DOI in the path if # the paper is accepted. if @paper.accepted? @@ -306,7 +316,7 @@ def status private def paper_params - params.require(:paper).permit(:title, :repository_url, :git_branch, :software_version, :body, :kind, :submission_kind, :track_id) + params.require(:paper).permit(:title, :repository_url, :git_branch, :software_version, :body, :kind, :submission_kind, :suggested_subject, :track_id) end def can_see_hidden_paper?(paper) diff --git a/app/models/paper.rb b/app/models/paper.rb index 746e71212..43929470d 100644 --- a/app/models/paper.rb +++ b/app/models/paper.rb @@ -427,6 +427,24 @@ def set_track_id(new_track_id) self.update_attribute(:track_id, new_track_id) if new_track_id != self.track_id end + def move_to_track(new_track) + return if new_track.nil? + current_label = self.track.present? ? self.track.label : "" + if current_label != new_track.label + set_track_id(new_track.id) + + if self.meta_review_issue_id + GITHUB.remove_label(Rails.application.settings["reviews"], self.meta_review_issue_id, current_label) if current_label.present? + GITHUB.add_labels_to_an_issue(Rails.application.settings["reviews"], self.meta_review_issue_id, [new_track.label]) + end + + if self.review_issue_id + GITHUB.remove_label(Rails.application.settings["reviews"], self.review_issue_id, current_label) if current_label.present? + GITHUB.add_labels_to_an_issue(Rails.application.settings["reviews"], self.review_issue_id, [new_track.label]) + end + end + end + def meta_review_url "https://github.com/#{Rails.application.settings["reviews"]}/issues/#{self.meta_review_issue_id}" end diff --git a/app/views/papers/_actions.html.erb b/app/views/papers/_actions.html.erb index b7492d8c5..ed9c4b080 100644 --- a/app/views/papers/_actions.html.erb +++ b/app/views/papers/_actions.html.erb @@ -1,3 +1,59 @@ +<% if current_user.admin? %> +
          +
          Track
          +
          + <% if paper.meta_review_issue_id %> + + <% if paper.track %> +

          + This paper is assigned to the track: <%= paper.track.name %>. +

          +

          + This track is managed by: +

            + <% paper.track.aeics.each do |aeic| %> +
          • <%= aeic.full_name %> (<%= aeic.login %>)
          • + <% end %> +
          +

          + <% else %> +

          + This paper is not assigned to any track +

          + <% end %> + +
          +
          + <%= form_tag(change_track_paper_url(paper), class: "left") do %> + <%= select_tag :track_id, options_from_collection_for_select(Track.where.not(id: paper.track_id), "id", "name"), prompt: "Select new track", class: "form-control left" %> + <%= submit_tag "Change paper's track", class: "btn btn-primary left change-track" %> + <% end %> +
          +
          + <% else %> + <% if paper.suggested_subject %> +

          + Author suggested this paper' subject is <%= paper.suggested_subject %> +

          +

          + The subject belongs to the track: <%= paper.track.name %>
          managed by: +

            + <% paper.track.aeics.each do |aeic| %> +
          • <%= aeic.full_name %> (<%= aeic.login %>)
          • + <% end %> +
          +

          + <% else %> +

          + Author didn't suggest any subject for this paper. +

          + <% end %> + <% end %> +
          +
          +
          +<% end %> + <% if current_user.admin? || (current_user == paper.submitting_author) %>
          diff --git a/app/views/papers/_form.html.erb b/app/views/papers/_form.html.erb index 9ddaf94a3..f86f6dfa2 100644 --- a/app/views/papers/_form.html.erb +++ b/app/views/papers/_form.html.erb @@ -44,7 +44,7 @@
          <%= f.label "Main subject of the paper" %> - <%= text_field_tag :subject, nil, value: params[:subject], placeholder: "Select the subject that best applies to your paper", class: "form-control", style: "margin-right: 12px;", data: {"autocomplete-target" => "input"} %> + <%= f.text_field :suggested_subject, placeholder: "Select the subject that best applies to your paper", class: "form-control", style: "margin-right: 12px;", data: {"autocomplete-target" => "input"} %> <%= f.hidden_field :track_id, data: {"autocomplete-target" => "hidden"} %>
            diff --git a/config/routes.rb b/config/routes.rb index ddac4010a..957b3fcd8 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -13,6 +13,7 @@ post 'start_meta_review' post 'reject' post 'withdraw' + post 'change_track' end collection do diff --git a/config/settings-development.yml b/config/settings-development.yml index 5b7744bd1..36c7a1dda 100644 --- a/config/settings-development.yml +++ b/config/settings-development.yml @@ -10,9 +10,9 @@ noreply_email: "noreply@joss.theoj.org" twitter: "@JOSS_TheOJ" google_analytics: "UA-47852178-4" github: "openjournals/joss" -reviews: "openjournals/joss-reviews" +reviews: "openjournals/joss-reviews-testing" +papers_repo: "openjournals/joss-papers-testing" papers_html_url: "https://www.theoj.org/joss-papers" -papers_repo: "openjournals/joss-papers" product: "software" # the *thing* being submitted for review reviewers: "https://bit.ly/joss-reviewers" submission_enquiry: |- diff --git a/db/migrate/20220616085520_add_suggested_subject_to_papers.rb b/db/migrate/20220616085520_add_suggested_subject_to_papers.rb new file mode 100644 index 000000000..45247e8f8 --- /dev/null +++ b/db/migrate/20220616085520_add_suggested_subject_to_papers.rb @@ -0,0 +1,5 @@ +class AddSuggestedSubjectToPapers < ActiveRecord::Migration[7.0] + def change + add_column :papers, :suggested_subject, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index eb2ed445b..fc27cbd69 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2022_06_07_095358) do +ActiveRecord::Schema[7.0].define(version: 2022_06_16_085520) do # These are extensions that must be enabled in order to support this database enable_extension "hstore" enable_extension "plpgsql" @@ -109,6 +109,7 @@ t.string "submission_kind" t.string "git_branch" t.bigint "track_id" + t.string "suggested_subject" t.index ["editor_id"], name: "index_papers_on_editor_id" t.index ["eic_id"], name: "index_papers_on_eic_id" t.index ["labels"], name: "index_papers_on_labels", using: :gin diff --git a/spec/controllers/papers_controller_spec.rb b/spec/controllers/papers_controller_spec.rb index 8cec56f62..534f5ca52 100644 --- a/spec/controllers/papers_controller_spec.rb +++ b/spec/controllers/papers_controller_spec.rb @@ -104,7 +104,15 @@ allow(controller).to receive_message_chain(:current_user).and_return(user) paper_count = Paper.count - paper_params = {title: "Yeah whateva", body: "something", repository_url: "https://github.com/openjournals/joss", git_branch: "joss-paper", software_version: "v1.0.1", submission_kind: "new", track_id: create(:track).id} + paper_params = { title: "Yeah whateva", + body: "something", + repository_url: "https://github.com/openjournals/joss", + git_branch: "joss-paper", + software_version: "v1.0.1", + submission_kind: "new", + suggested_subject: "Astronomy & astrophysics", + track_id: create(:track).id + } post :create, params: {paper: paper_params} expect(response).to be_redirect # as it's created the thing expect(Paper.count).to eq(paper_count + 1) diff --git a/spec/models/paper_spec.rb b/spec/models/paper_spec.rb index dcaa527c7..fb05f799d 100644 --- a/spec/models/paper_spec.rb +++ b/spec/models/paper_spec.rb @@ -362,4 +362,57 @@ it { is_expected.to match "Currently, there isn't an JOSS editor assigned" } end end + + describe "#move_to_track" do + before do + @track_1 = create(:track, name: "Astronomy", short_name: "ASTRO", code: "32") + @track_2 = create(:track, name: "Biology", short_name: "BIO", code: "33") + @paper = create(:paper, track_id: @track_1.id) + end + + it "should recibe a new track to assign" do + expect(@paper).to_not receive(:track) + expect(@paper).to_not receive(:set_track_id) + @paper.move_to_track(nil) + end + + it "should do nothing if track does not change" do + expect(@paper).to_not receive(:set_track_id) + expect_any_instance_of(Octokit::Client).to_not receive(:remove_label) + expect_any_instance_of(Octokit::Client).to_not receive(:add_labels_to_an_issue) + @paper.move_to_track(@track_1) + end + + it "should update paper's track" do + allow_any_instance_of(Octokit::Client).to receive(:remove_label) + allow_any_instance_of(Octokit::Client).to receive(:add_labels_to_an_issue) + + expect(@paper.track).to eq(@track_1) + @paper.move_to_track(@track_2) + expect(@paper.reload.track).to eq(@track_2) + end + + it "should change labels if issues exist" do + @paper.meta_review_issue_id = 3333 + @paper.review_issue_id = 4444 + + expect_any_instance_of(Octokit::Client).to receive(:remove_label).with(anything, 3333, @track_1.label) + expect_any_instance_of(Octokit::Client).to receive(:add_labels_to_an_issue).with(anything, 3333, [@track_2.label]) + expect_any_instance_of(Octokit::Client).to receive(:remove_label).with(anything, 4444, @track_1.label) + expect_any_instance_of(Octokit::Client).to receive(:add_labels_to_an_issue).with(anything, 4444, [@track_2.label]) + + @paper.move_to_track(@track_2) + end + + it "should not change labels if no issues created" do + @paper.meta_review_issue_id = nil + @paper.review_issue_id = nil + expect_any_instance_of(Octokit::Client).to_not receive(:remove_label) + expect_any_instance_of(Octokit::Client).to_not receive(:add_labels_to_an_issue) + + expect(@paper.track).to eq(@track_1) + @paper.move_to_track(@track_2) + expect(@paper.reload.track).to eq(@track_2) + end + end end diff --git a/spec/system/papers/track_info_spec.rb b/spec/system/papers/track_info_spec.rb new file mode 100644 index 000000000..48bb8c86e --- /dev/null +++ b/spec/system/papers/track_info_spec.rb @@ -0,0 +1,134 @@ +require "rails_helper" + +feature "Paper's track info" do + + before do + @track_1 = create(:track, name: "Astrophysics", short_name: "ASTRO", code: "42") + @track_2 = create(:track, name: "Biology", short_name: "BIO", code: "34") + @paper = create(:paper) + + allow(Repository).to receive(:editors).and_return(["@editor_1", "@editor_2"]) + end + + scenario "Is not public" do + visit paper_path(@paper) + expect(page).to_not have_css("#track-info") + end + + scenario "Is not available to non-eic users" do + login_as create(:user, editor: create(:editor)) + visit paper_path(@paper) + expect(page).to_not have_css("#track-info") + end + + scenario "Is visible to AEiCs" do + login_as create(:admin_user, editor: create(:board_editor)) + visit paper_path(@paper) + expect(page).to have_css("#track-info") + end + + feature "Logged as an admin" do + before do + @aeic = create(:admin_user, editor: create(:board_editor)) + @track = create(:track, name: "Testing track", short_name: "TE", code: "33") + login_as(@aeic) + end + + feature "For new submitted papers" do + scenario "Show info for papers with no suggested subject" do + @paper.update(suggested_subject: nil, track_id: nil, meta_review_issue_id: nil) + + visit paper_path(@paper) + + within("#track-info"){ + expect(page).to have_content("Author didn't suggest any subject for this paper.") + } + end + + scenario "Show info for papers with suggested subject" do + @paper.update!(suggested_subject: "Solar Astronomy", track_id: @track_1.id, meta_review_issue_id: nil) + + visit paper_path(@paper) + + within("#track-info"){ + expect(page).to_not have_content("Author didn't suggest any subject for this paper.") + + expect(page).to have_content("Author suggested this paper' subject is Solar Astronomy") + expect(page).to have_content("The subject belongs to the track: Astrophysics") + } + end + + scenario "Don't show form to change track" do + @paper.update!(suggested_subject: "Solar Astronomy", track_id: @track_1.id, meta_review_issue_id: nil) + + visit paper_path(@paper) + + within("#track-info"){ + expect(page).to_not have_css("select#track_id") + expect(page).to_not have_css("input[type='submit']") + } + end + end + + feature "For papers with ongoing (meta)review" do + before do + @paper.update(suggested_subject: "Solar astronomy", track_id: @track_1.id, meta_review_issue_id: 3333, state: "review_pending") + end + + scenario "Show info for papers assigned to a track" do + visit paper_path(@paper) + + within("#track-info"){ + expect(page).to_not have_content("Author didn't suggest any subject for this paper.") + expect(page).to_not have_content("Author suggested this paper' subject is Solar Astronomy") + + expect(page).to have_content("This paper is assigned to the track: Astrophysics") + expect(page).to have_content("This track is managed by:") + expect(page).to have_content(@track_1.aeics.first.full_name) + expect(page).to have_content(@track_1.aeics.first.login) + } + end + + scenario "Show info for papers without track" do + @paper.update(track_id: nil) + visit paper_path(@paper) + + within("#track-info"){ + expect(page).to_not have_content("This paper is assigned to the track: Astrophysics") + expect(page).to_not have_content("This track is managed by:") + expect(page).to_not have_content(@track_1.aeics.first.full_name) + expect(page).to_not have_content(@track_1.aeics.first.login) + } + end + + scenario "Show form to change track" do + visit paper_path(@paper) + + within("#track-info"){ + expect(page).to have_css("select#track_id") + expect(page).to have_css("input[type='submit'][value=\"Change paper's track\"]") + } + end + + scenario "Change paper's track" do + allow_any_instance_of(Octokit::Client).to receive(:remove_label) + allow_any_instance_of(Octokit::Client).to receive(:add_labels_to_an_issue) + + visit paper_path(@paper) + + within("#track-info"){ + select @track_2.name, from: "track_id" + click_on "Change paper's track" + } + + expect(page).to have_content("Track for the paper changed!") + visit paper_path(@paper) + + expect(page).to have_content("This paper is assigned to the track: Biology") + expect(page).to have_content("This track is managed by:") + expect(page).to have_content(@track_2.aeics.first.full_name) + expect(page).to have_content(@track_2.aeics.first.login) + end + end + end +end diff --git a/spec/system/tracks_spec.rb b/spec/system/tracks_spec.rb index 4e7a359c2..f3f37c13f 100644 --- a/spec/system/tracks_spec.rb +++ b/spec/system/tracks_spec.rb @@ -24,8 +24,8 @@ feature "Logged as an admin" do before do - @eiac = create(:board_editor, first_name: "Testeditor", last_name: "In-chief") - @track = create(:track, name: "Testing track", short_name: "TE", code: "33", aeic_ids: [@eiac.id]) + @aeic = create(:board_editor, first_name: "Testeditor", last_name: "In-chief") + @track = create(:track, name: "Testing track", short_name: "TE", code: "33", aeic_ids: [@aeic.id]) login_as(admin_editor) visit tracks_path end @@ -110,7 +110,7 @@ feature "Deleting a track" do before do - @other_track = create(:track, name: "New track", short_name: "NT", code: "7", aeic_ids: [@eiac.id]) + @other_track = create(:track, name: "New track", short_name: "NT", code: "7", aeic_ids: [@aeic.id]) @editor = create(:editor, first_name: "Testtopic", last_name: "Editorperson", track_ids: [@track.id, @other_track.id]) @pending_paper = create(:submitted_paper, track: @track) @submitted_paper = create(:accepted_paper, track: @track) @@ -160,8 +160,8 @@ expect(@editor.reload.tracks.size).to eq(1) expect(@editor.tracks.first).to eq(@other_track) - expect(@eiac.reload.managed_tracks.size).to eq(1) - expect(@eiac.managed_tracks.first).to eq(@other_track) + expect(@aeic.reload.managed_tracks.size).to eq(1) + expect(@aeic.managed_tracks.first).to eq(@other_track) tracks_after = Track.count subjects_after = Subject.count diff --git a/spec/views/papers/new.html.erb_spec.rb b/spec/views/papers/new.html.erb_spec.rb index 2dbe0af08..48da0037c 100644 --- a/spec/views/papers/new.html.erb_spec.rb +++ b/spec/views/papers/new.html.erb_spec.rb @@ -29,6 +29,7 @@ assert_select "input#paper_software_version[name=?]", "paper[software_version]" assert_select "select#paper_submission_kind[name=?]", "paper[submission_kind]" assert_select "input#paper_track_id[name=?]", "paper[track_id]" + assert_select "input#paper_suggested_subject[name=?]", "paper[suggested_subject]" assert_select "textarea#paper_body[name=?]", "paper[body]" assert_select "input#author-check" assert_select "input#coc-check" @@ -50,6 +51,7 @@ assert_select "input#paper_software_version[name=?]", "paper[software_version]" assert_select "select#paper_submission_kind[name=?]", "paper[submission_kind]" assert_select "input#paper_track_id[name=?]", "paper[track_id]" + assert_select "input#paper_suggested_subject[name=?]", "paper[suggested_subject]" assert_select "textarea#paper_body[name=?]", "paper[body]" assert_select "input#author-check" assert_select "input#coc-check" From 7ac5e2d49ad1ebf7e303136d0705fb39955b1a9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 20 Jun 2022 11:18:50 +0200 Subject: [PATCH 413/609] Fix sorttable.js for Turbo visits --- app/javascript/custom/sortable.js | 40 +++++-------------------------- 1 file changed, 6 insertions(+), 34 deletions(-) diff --git a/app/javascript/custom/sortable.js b/app/javascript/custom/sortable.js index c8a8a8702..ba3456fa5 100644 --- a/app/javascript/custom/sortable.js +++ b/app/javascript/custom/sortable.js @@ -20,9 +20,6 @@ var stIsIE = /*@cc_on!@*/false; var sorttable = { init: function() { - // kill the timer - if (_timer) clearInterval(_timer); - if (!document.createElement || !document.getElementsByTagName) return; sorttable.DATE_RE = /^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/; @@ -311,37 +308,6 @@ var sorttable = { Supporting functions: bundled here to avoid depending on a library ****************************************************************** */ -// Dean Edwards/Matthias Miller/John Resig - -/* for Mozilla/Opera9 */ -if (document.addEventListener) { - document.addEventListener("DOMContentLoaded", sorttable.init, false); -} - -/* for Internet Explorer */ -/*@cc_on @*/ -/*@if (@_win32) - document.write(" + + <%= setting(:name) %> <%= stylesheet_link_tag 'application', media: 'all' %> <%= javascript_include_tag 'application' %> @@ -51,23 +60,6 @@ - - diff --git a/app/views/papers/show.html.erb b/app/views/papers/show.html.erb index bb8025479..3ac6b595f 100644 --- a/app/views/papers/show.html.erb +++ b/app/views/papers/show.html.erb @@ -1,6 +1,16 @@ + + + + <%= Rails.application.settings['name'] %>: <%= @paper.title %> <%= stylesheet_link_tag 'application', media: 'all' %> <%= javascript_include_tag 'application' %> @@ -67,17 +77,6 @@ <% end %> - -
            From 7fba38ce27a7c06114517ee5b4335b19b540adf6 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 31 Jul 2022 17:14:29 +0100 Subject: [PATCH 432/609] Removing avatars and subject areas for retired editors --- app/views/shared/_editor.html.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/shared/_editor.html.erb b/app/views/shared/_editor.html.erb index 6d1c3c090..9c354c2a0 100644 --- a/app/views/shared/_editor.html.erb +++ b/app/views/shared/_editor.html.erb @@ -1,5 +1,7 @@
            + <%- unless editor.retired? %> <%= editor.full_name %> + <%- end %>
            <% if !editor.login.blank? %> @@ -8,10 +10,10 @@ <%= link_to "#{editor.full_name}", editor.url %> <% end %>
            + <%- unless editor.retired? %>
            <%- if editor.board? %><%= editor.title %><%- else %>Editor<%- end %><%- if editor.categories.present? %>: <%= editor.category_list %><%- end %>
            - <%- unless editor.retired? %>

            <%= editor.description.html_safe %>

            <%- end %>
            From 502066e62286b3267ac6f82647e9e128ebecab06 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 31 Jul 2022 17:23:32 +0100 Subject: [PATCH 433/609] Editors as a string --- app/views/home/about.html.erb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/views/home/about.html.erb b/app/views/home/about.html.erb index 68f8e0838..b6f4670c0 100644 --- a/app/views/home/about.html.erb +++ b/app/views/home/about.html.erb @@ -60,10 +60,8 @@ <%- end %>

            Editors Emeritus

            - - <%- Editor.emeritus.order('last_name ASC').each do |editor| %> - <%= render partial: "shared/editor", locals: { editor: editor } %> - <%- end %> +

            <%= Editor.emeritus.order('last_name ASC').collect {|e| e.full_name +}.join(', ') %>

            From 06b372a5f6236af7cf8a8dee508a8514ff5a7fb2 Mon Sep 17 00:00:00 2001 From: Chris Hartgerink Date: Fri, 5 Aug 2022 14:01:02 +0200 Subject: [PATCH 434/609] Add note to submission --- app/views/papers/_form.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/papers/_form.html.erb b/app/views/papers/_form.html.erb index 9019b7e9d..c6ced3d73 100644 --- a/app/views/papers/_form.html.erb +++ b/app/views/papers/_form.html.erb @@ -53,7 +53,7 @@
            <%= f.label "Message to editors" %> <%= f.text_area :body, rows: "7", - placeholder: "Has any portion of the submitted work (which includes code and documentation) been published or submitted, or is planned for submission, to another peer-reviewed publication venue? If yes, please describe. Please also give short (1-2 line) description of your #{setting(:product)} including specific notes to the editor if this is a resubmission or a second paper in #{setting(:abbreviation)} about this #{setting(:product)}.", class: 'form-control' %> + placeholder: "Has any portion of the submitted work (which includes code and documentation) been published or submitted, or is planned for submission, to another peer-reviewed publication venue? If yes, please describe. Please also give short (1-2 line) description of your #{setting(:product)} including specific notes to the editor if this is a resubmission or a second paper in #{setting(:abbreviation)} about this #{setting(:product)}. Please disclose any potential conflicts of interest, including financial ones.", class: 'form-control' %>
            From 8baaaad7451ddd959d0c7abb2d475bb7582db298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 10 Aug 2022 13:42:27 +0200 Subject: [PATCH 435/609] Skip git command on paper creation in specs --- spec/controllers/dispatch_controller_spec.rb | 1 + spec/controllers/papers_controller_spec.rb | 3 ++- spec/controllers/votes_controller_spec.rb | 2 ++ spec/mailers/notifications_spec.rb | 2 ++ spec/models/editor_spec.rb | 2 ++ spec/models/invitation_spec.rb | 2 ++ spec/models/paper_spec.rb | 5 +++-- spec/models/vote_spec.rb | 2 ++ spec/support/common_actions.rb | 12 ++++++++++++ spec/system/dashboard_spec.rb | 1 + spec/system/invitations_spec.rb | 1 + spec/system/notes_spec.rb | 1 + spec/system/papers/track_info_spec.rb | 1 + spec/system/tracks_spec.rb | 1 + spec/views/papers/recent.html.erb_spec.rb | 2 ++ spec/views/papers/show.html.erb_spec.rb | 1 + spec/views/papers/submitted.html.erb_spec.rb | 2 ++ 17 files changed, 38 insertions(+), 3 deletions(-) diff --git a/spec/controllers/dispatch_controller_spec.rb b/spec/controllers/dispatch_controller_spec.rb index c2d1f63dd..e2131f774 100644 --- a/spec/controllers/dispatch_controller_spec.rb +++ b/spec/controllers/dispatch_controller_spec.rb @@ -18,6 +18,7 @@ def headers(event, payload) end describe DispatchController, type: :controller do + before { skip_paper_repo_url_check } render_views let(:editorialbot_pre_review_opened) { json_fixture('editorialbot-pre-review-opened.json') } diff --git a/spec/controllers/papers_controller_spec.rb b/spec/controllers/papers_controller_spec.rb index 534f5ca52..1fb5949b0 100644 --- a/spec/controllers/papers_controller_spec.rb +++ b/spec/controllers/papers_controller_spec.rb @@ -4,6 +4,7 @@ render_views before(:each) do + skip_paper_repo_url_check allow(Repository).to receive(:editors).and_return ["@user1", "@user2"] end @@ -128,7 +129,7 @@ allow(controller).to receive_message_chain(:current_user).and_return(user) paper_count = Paper.count - paper_params = {title: "Yeah whateva", body: "something", repository_url: ""} + paper_params = {title: "Yeah whateva", body: "something", repository_url: "wrong url!"} post :create, params: {paper: paper_params} expect(response.body).to match /Your paper could not be saved/ diff --git a/spec/controllers/votes_controller_spec.rb b/spec/controllers/votes_controller_spec.rb index 99b63e6be..8721f3807 100644 --- a/spec/controllers/votes_controller_spec.rb +++ b/spec/controllers/votes_controller_spec.rb @@ -1,6 +1,8 @@ require 'rails_helper' RSpec.describe VotesController, type: :controller do + before { skip_paper_repo_url_check } + it "LOGGED IN, not blank, responds with success" do editor = create(:editor, login: "josseditor") editing_user = create(:user, editor: editor) diff --git a/spec/mailers/notifications_spec.rb b/spec/mailers/notifications_spec.rb index 195106260..af256d7fd 100644 --- a/spec/mailers/notifications_spec.rb +++ b/spec/mailers/notifications_spec.rb @@ -1,6 +1,8 @@ require "rails_helper" describe Notifications, type: :mailer do + before { skip_paper_repo_url_check } + it "should include the idea text in the body" do paper = create(:paper, title: "Nice paper!") mail = Notifications.submission_email(paper) diff --git a/spec/models/editor_spec.rb b/spec/models/editor_spec.rb index 98f606e85..f8c616a17 100644 --- a/spec/models/editor_spec.rb +++ b/spec/models/editor_spec.rb @@ -1,6 +1,8 @@ require 'rails_helper' RSpec.describe Editor, type: :model do + before { skip_paper_repo_url_check } + let(:editor) { create(:editor) } describe "#category_list" do diff --git a/spec/models/invitation_spec.rb b/spec/models/invitation_spec.rb index 74a08876d..d214cc378 100644 --- a/spec/models/invitation_spec.rb +++ b/spec/models/invitation_spec.rb @@ -1,6 +1,8 @@ require 'rails_helper' describe Invitation do + before { skip_paper_repo_url_check } + it "at creation is not accepted" do invitation = Invitation.create!(paper: create(:paper), editor: create(:editor)) expect(invitation).to_not be_accepted diff --git a/spec/models/paper_spec.rb b/spec/models/paper_spec.rb index fb05f799d..60a6f3dd2 100644 --- a/spec/models/paper_spec.rb +++ b/spec/models/paper_spec.rb @@ -2,6 +2,7 @@ describe Paper do before(:each) do + skip_paper_repo_url_check Paper.destroy_all end @@ -97,9 +98,9 @@ # GitHub stuff it "should know how to return a pretty repo name with owner" do - paper = create(:paper, repository_url: "https://github.com/arfon/joss-reviews") + paper = create(:paper, repository_url: "https://github.com/openjournals/joss-reviews") - expect(paper.pretty_repository_name).to eq("arfon / joss-reviews") + expect(paper.pretty_repository_name).to eq("openjournals / joss-reviews") end it 'should know how to return a pretty DOI' do diff --git a/spec/models/vote_spec.rb b/spec/models/vote_spec.rb index 828feaa7b..2a034cc40 100644 --- a/spec/models/vote_spec.rb +++ b/spec/models/vote_spec.rb @@ -4,6 +4,8 @@ before(:each) do Paper.destroy_all Vote.destroy_all + + skip_paper_repo_url_check end it "belongs_to a paper" do diff --git a/spec/support/common_actions.rb b/spec/support/common_actions.rb index ca57c06c7..d578ad755 100644 --- a/spec/support/common_actions.rb +++ b/spec/support/common_actions.rb @@ -8,4 +8,16 @@ def logout allow_any_instance_of(ApplicationController). to receive(:current_user).and_return(nil) end + + def skip_paper_repo_url_check + # Do not run git ls-remote command from paper.check_repository_address + # on paper creation. + # Allowed values in specs are ok, anything else no_ok + ok = OpenStruct.new(success?: true) + no_ok = OpenStruct.new(success?: false) + allow(Open3).to receive(:capture3).and_return(["", "", no_ok ]) + allow(Open3).to receive(:capture3).with("git ls-remote http://github.com/arfon/fidgit").and_return(["", "", ok ]) + allow(Open3).to receive(:capture3).with("git ls-remote https://github.com/openjournals/joss").and_return(["", "", ok ]) + allow(Open3).to receive(:capture3).with("git ls-remote https://github.com/openjournals/joss-reviews").and_return(["", "", ok ]) + end end diff --git a/spec/system/dashboard_spec.rb b/spec/system/dashboard_spec.rb index b8356708d..5ca85cb4f 100644 --- a/spec/system/dashboard_spec.rb +++ b/spec/system/dashboard_spec.rb @@ -1,6 +1,7 @@ require "rails_helper" feature "Dashboard" do + before { skip_paper_repo_url_check } let(:dashboard_paths) {[dashboard_all_path, dashboard_incoming_path, dashboard_in_progress_path, dashboard_path]} let(:user_editor) { create(:user, editor: create(:editor)) } diff --git a/spec/system/invitations_spec.rb b/spec/system/invitations_spec.rb index 42aad3a09..94a345677 100644 --- a/spec/system/invitations_spec.rb +++ b/spec/system/invitations_spec.rb @@ -1,6 +1,7 @@ require "rails_helper" feature "Invitations list" do + before { skip_paper_repo_url_check } let(:user_editor) { create(:user, editor: create(:editor, first_name: "Lorena")) } let(:admin) { create(:admin_user) } diff --git a/spec/system/notes_spec.rb b/spec/system/notes_spec.rb index dcec4b9e5..1ebbfb20d 100644 --- a/spec/system/notes_spec.rb +++ b/spec/system/notes_spec.rb @@ -1,6 +1,7 @@ require "rails_helper" feature "Editor notes on papers" do + before { skip_paper_repo_url_check } let(:paper) { create(:review_pending_paper) } let(:editor_user) { create(:user, editor: create(:editor)) } diff --git a/spec/system/papers/track_info_spec.rb b/spec/system/papers/track_info_spec.rb index 67577e7c9..16a43bca6 100644 --- a/spec/system/papers/track_info_spec.rb +++ b/spec/system/papers/track_info_spec.rb @@ -3,6 +3,7 @@ feature "Paper's track info" do before do + skip_paper_repo_url_check @track_1 = create(:track, name: "Astrophysics", short_name: "ASTRO", code: "42") @track_2 = create(:track, name: "Biology", short_name: "BIO", code: "34") @paper = create(:paper) diff --git a/spec/system/tracks_spec.rb b/spec/system/tracks_spec.rb index f3f37c13f..8f1953706 100644 --- a/spec/system/tracks_spec.rb +++ b/spec/system/tracks_spec.rb @@ -1,6 +1,7 @@ require "rails_helper" feature "Manage Tracks" do + before { skip_paper_repo_url_check } let(:user_editor) { create(:user, editor: create(:editor, first_name: "Lorena", description: "Science testing editor")) } let(:admin_editor) { create(:admin_user, editor: create(:board_editor)) } diff --git a/spec/views/papers/recent.html.erb_spec.rb b/spec/views/papers/recent.html.erb_spec.rb index 94fb53840..6a9e2515d 100644 --- a/spec/views/papers/recent.html.erb_spec.rb +++ b/spec/views/papers/recent.html.erb_spec.rb @@ -1,6 +1,8 @@ require 'rails_helper' describe 'papers/recent.html.erb' do + before { skip_paper_repo_url_check } + context 'for recent papers' do it "should show the correct number of papers" do user = create(:user) diff --git a/spec/views/papers/show.html.erb_spec.rb b/spec/views/papers/show.html.erb_spec.rb index 1ffcb5a91..e81221d0d 100644 --- a/spec/views/papers/show.html.erb_spec.rb +++ b/spec/views/papers/show.html.erb_spec.rb @@ -2,6 +2,7 @@ describe 'papers/show.html.erb' do before(:each) do + skip_paper_repo_url_check allow(Repository).to receive(:editors).and_return ["@user1", "@user2"] end diff --git a/spec/views/papers/submitted.html.erb_spec.rb b/spec/views/papers/submitted.html.erb_spec.rb index 63948e934..9cb125f99 100644 --- a/spec/views/papers/submitted.html.erb_spec.rb +++ b/spec/views/papers/submitted.html.erb_spec.rb @@ -1,6 +1,8 @@ require 'rails_helper' describe 'papers/submitted.html.erb' do + before { skip_paper_repo_url_check } + context 'for submitted papers' do it "should show the correct number of papers" do user = create(:user) From bb91b151dd9d04d7f6479ce9e13ee36372cdc44c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 10 Aug 2022 13:53:08 +0200 Subject: [PATCH 436/609] Rails version 7.0.3.1 --- Gemfile | 2 +- Gemfile.lock | 134 +++++++++++++++++++++++++-------------------------- 2 files changed, 68 insertions(+), 68 deletions(-) diff --git a/Gemfile b/Gemfile index 3e29492e5..0cbc6e5c2 100644 --- a/Gemfile +++ b/Gemfile @@ -18,7 +18,7 @@ gem 'octokit', '~> 4.22' gem 'pdf-reader', '~> 2.9.2' gem 'pg', '~> 1.3.5' gem 'will_paginate', '~> 3.3.1' -gem 'rails', '7.0.3' +gem 'rails', '7.0.3.1' gem "importmap-rails" gem "turbo-rails" gem "stimulus-rails" diff --git a/Gemfile.lock b/Gemfile.lock index ab8bf0c06..4773c000c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,47 +4,47 @@ GEM Ascii85 (1.1.0) aasm (5.2.0) concurrent-ruby (~> 1.0) - actioncable (7.0.3) - actionpack (= 7.0.3) - activesupport (= 7.0.3) + actioncable (7.0.3.1) + actionpack (= 7.0.3.1) + activesupport (= 7.0.3.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.3) - actionpack (= 7.0.3) - activejob (= 7.0.3) - activerecord (= 7.0.3) - activestorage (= 7.0.3) - activesupport (= 7.0.3) + actionmailbox (7.0.3.1) + actionpack (= 7.0.3.1) + activejob (= 7.0.3.1) + activerecord (= 7.0.3.1) + activestorage (= 7.0.3.1) + activesupport (= 7.0.3.1) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.3) - actionpack (= 7.0.3) - actionview (= 7.0.3) - activejob (= 7.0.3) - activesupport (= 7.0.3) + actionmailer (7.0.3.1) + actionpack (= 7.0.3.1) + actionview (= 7.0.3.1) + activejob (= 7.0.3.1) + activesupport (= 7.0.3.1) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.3) - actionview (= 7.0.3) - activesupport (= 7.0.3) + actionpack (7.0.3.1) + actionview (= 7.0.3.1) + activesupport (= 7.0.3.1) rack (~> 2.0, >= 2.2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.3) - actionpack (= 7.0.3) - activerecord (= 7.0.3) - activestorage (= 7.0.3) - activesupport (= 7.0.3) + actiontext (7.0.3.1) + actionpack (= 7.0.3.1) + activerecord (= 7.0.3.1) + activestorage (= 7.0.3.1) + activesupport (= 7.0.3.1) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.3) - activesupport (= 7.0.3) + actionview (7.0.3.1) + activesupport (= 7.0.3.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -52,22 +52,22 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (7.0.3) - activesupport (= 7.0.3) + activejob (7.0.3.1) + activesupport (= 7.0.3.1) globalid (>= 0.3.6) - activemodel (7.0.3) - activesupport (= 7.0.3) - activerecord (7.0.3) - activemodel (= 7.0.3) - activesupport (= 7.0.3) - activestorage (7.0.3) - actionpack (= 7.0.3) - activejob (= 7.0.3) - activerecord (= 7.0.3) - activesupport (= 7.0.3) + activemodel (7.0.3.1) + activesupport (= 7.0.3.1) + activerecord (7.0.3.1) + activemodel (= 7.0.3.1) + activesupport (= 7.0.3.1) + activestorage (7.0.3.1) + actionpack (= 7.0.3.1) + activejob (= 7.0.3.1) + activerecord (= 7.0.3.1) + activesupport (= 7.0.3.1) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.3) + activesupport (7.0.3.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -112,7 +112,7 @@ GEM em-websocket (0.5.3) eventmachine (>= 0.12.9) http_parser.rb (~> 0) - erubi (1.10.0) + erubi (1.11.0) eventmachine (1.2.7) execjs (2.8.1) factory_bot (6.2.1) @@ -198,7 +198,7 @@ GEM nokogiri (>= 1.4) http_parser.rb (0.8.0) httpclient (2.8.3) - i18n (1.10.0) + i18n (1.12.0) concurrent-ruby (~> 1.0) importmap-rails (1.1.0) actionpack (>= 6.0.0) @@ -230,7 +230,7 @@ GEM mini_portile2 (2.8.0) mini_racer (0.6.2) libv8-node (~> 16.10.0.0) - minitest (5.15.0) + minitest (5.16.2) msgpack (1.5.2) multi_json (1.15.0) multi_xml (0.6.0) @@ -255,12 +255,12 @@ GEM net-ssh (6.1.0) newrelic_rpm (8.7.0) nio4r (2.5.8) - nokogiri (1.13.6) + nokogiri (1.13.8) mini_portile2 (~> 2.8.0) racc (~> 1.4) - nokogiri (1.13.6-x86_64-darwin) + nokogiri (1.13.8-x86_64-darwin) racc (~> 1.4) - nokogiri (1.13.6-x86_64-linux) + nokogiri (1.13.8-x86_64-linux) racc (~> 1.4) notiffany (0.1.3) nenv (~> 0.1) @@ -311,27 +311,27 @@ GEM puma (5.6.4) nio4r (~> 2.0) racc (1.6.0) - rack (2.2.3.1) + rack (2.2.4) rack-livereload (0.3.17) rack rack-protection (2.2.0) rack - rack-test (1.1.0) - rack (>= 1.0, < 3) - rails (7.0.3) - actioncable (= 7.0.3) - actionmailbox (= 7.0.3) - actionmailer (= 7.0.3) - actionpack (= 7.0.3) - actiontext (= 7.0.3) - actionview (= 7.0.3) - activejob (= 7.0.3) - activemodel (= 7.0.3) - activerecord (= 7.0.3) - activestorage (= 7.0.3) - activesupport (= 7.0.3) + rack-test (2.0.2) + rack (>= 1.3) + rails (7.0.3.1) + actioncable (= 7.0.3.1) + actionmailbox (= 7.0.3.1) + actionmailer (= 7.0.3.1) + actionpack (= 7.0.3.1) + actiontext (= 7.0.3.1) + actionview (= 7.0.3.1) + activejob (= 7.0.3.1) + activemodel (= 7.0.3.1) + activerecord (= 7.0.3.1) + activestorage (= 7.0.3.1) + activesupport (= 7.0.3.1) bundler (>= 1.15.0) - railties (= 7.0.3) + railties (= 7.0.3.1) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -339,11 +339,11 @@ GEM rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.4.2) + rails-html-sanitizer (1.4.3) loofah (~> 2.3) - railties (7.0.3) - actionpack (= 7.0.3) - activesupport (= 7.0.3) + railties (7.0.3.1) + actionpack (= 7.0.3.1) + activesupport (= 7.0.3.1) method_source rake (>= 12.2) thor (~> 1.0) @@ -424,7 +424,7 @@ GEM sprockets (>= 3.0.0) stimulus-rails (1.0.4) railties (>= 6.0.0) - strscan (3.0.3) + strscan (3.0.4) thor (1.2.1) tilt (2.0.10) timeout (0.3.0) @@ -434,7 +434,7 @@ GEM actionpack (>= 6.0.0) activejob (>= 6.0.0) railties (>= 6.0.0) - tzinfo (2.0.4) + tzinfo (2.0.5) concurrent-ruby (~> 1.0) uber (0.1.0) uglifier (4.2.0) @@ -457,7 +457,7 @@ GEM will_paginate (3.3.1) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.5.4) + zeitwerk (2.6.0) PLATFORMS ruby @@ -495,7 +495,7 @@ DEPENDENCIES pry-byebug puma rack-livereload - rails (= 7.0.3) + rails (= 7.0.3.1) rails-controller-testing (~> 1.0.5) redis (~> 4.0) responders From 1d53d834245d550b4f0465f588c237d0c0212930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 10 Aug 2022 14:26:33 +0200 Subject: [PATCH 437/609] 8 tracks --- spec/lib/tracks_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/lib/tracks_spec.rb b/spec/lib/tracks_spec.rb index 8680375fc..23be60970 100644 --- a/spec/lib/tracks_spec.rb +++ b/spec/lib/tracks_spec.rb @@ -18,7 +18,7 @@ end describe "JOSS tracks" do - it "should have 7 top level tracks" do + it "should have 8 top level tracks" do expect(joss_tracks['tracks'].size).to eq(8) end From a651f697b17d392dfd4cf75cd2418795adcb7637 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 11 Aug 2022 13:52:52 +0200 Subject: [PATCH 438/609] String tracks --- lib/tracks.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/tracks.yml b/lib/tracks.yml index 9db83abfa..2700e5888 100644 --- a/lib/tracks.yml +++ b/lib/tracks.yml @@ -289,19 +289,19 @@ tracks: - Distributed Artificial Intelligence [Physical Sciences] - Statistics and Probability [Physical Sciences] - Computer Vision and Pattern Recognition [Physical Sciences] - - Artificial Intelligence: Applications and Expert Systems [Physical Sciences] - - Artificial Intelligence: Automatic Programming [Physical Sciences] - - Artificial Intelligence: Deduction and Theorem Proving [Physical Sciences] - - Artificial Intelligence: Knowledge Representation Formalisms and Methods [Physical Sciences] - - Artificial Intelligence: Natural Language Processing [Physical Sciences] - - Artificial Intelligence: Problem Solving, Control Methods, and Search [Physical Sciences] - - Artificial Intelligence: Robotics [Physical Sciences] - - Data Science: Statistical Libraries and Tools [Physical Sciences] - - Data Science: Modeling and Simulation [Physical Sciences] - - Data Science: Decision Analysis [Physical Sciences] - - Data Science: Linear Programming and Optimization [Physical Sciences] + - "Artificial Intelligence: Applications and Expert Systems [Physical Sciences]" + - "Artificial Intelligence: Automatic Programming [Physical Sciences]" + - "Artificial Intelligence: Deduction and Theorem Proving [Physical Sciences]" + - "Artificial Intelligence: Knowledge Representation Formalisms and Methods [Physical Sciences]" + - "Artificial Intelligence: Natural Language Processing [Physical Sciences]" + - "Artificial Intelligence: Problem Solving, Control Methods, and Search [Physical Sciences]" + - "Artificial Intelligence: Robotics [Physical Sciences]" + - "Data Science: Statistical Libraries and Tools [Physical Sciences]" + - "Data Science: Modeling and Simulation [Physical Sciences]" + - "Data Science: Decision Analysis [Physical Sciences]" + - "Data Science: Linear Programming and Optimization [Physical Sciences]" ese: - name: Earth Sciences and Ecology + name: Earth Sciences and Ecology short_name: ese eics: - kthyng From e06c8cfac136279c65c0687cdbb181b9f1460574 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 11 Aug 2022 13:57:31 +0200 Subject: [PATCH 439/609] Update import subjects task --- lib/tasks/tracks.rake | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/lib/tasks/tracks.rake b/lib/tasks/tracks.rake index 803258745..b72c1f908 100644 --- a/lib/tasks/tracks.rake +++ b/lib/tasks/tracks.rake @@ -21,19 +21,24 @@ namespace :tracks do end end - desc "Import tracks and subjects from the lib/tracks.yml file" - task import: :environment do - tracks_info = YAML.load_file(Rails.root + "lib/tracks.yml") - tracks_info["tracks"].each_pair do |k, v| - track = Track.find_or_initialize_by(name: v["name"]) - track.code = v["code"] - track.short_name = v["short_name"] - track.save! + namespace :import do + desc "Import subjects from the lib/tracks.yml file" + task subjects: :environment do + tracks_info = YAML.load_file(Rails.root + "lib/tracks.yml") + tracks_info["tracks"].each_pair do |k, v| + track = Track.find_by(name: v["name"].to_s.strip) + if track.nil? + puts "!! There is not a '#{v["name"]}' track. Please create it before importing the subjects." + else + track.subjects.delete_all - v["fields"].each do |subject| - s = Subject.find_or_initialize_by(name: subject) - s.track_id = track.id - s.save! + v["fields"].each do |subject| + s = Subject.find_or_initialize_by(name: subject) + s.track_id = track.id + s.save! + end + puts "- Track '#{v["name"]}': #{v['fields'].size} subjects imported" + end end end end From 556a7171c349b910b56e6233d16c4261e0cbc3bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 11 Aug 2022 13:57:59 +0200 Subject: [PATCH 440/609] Add tracks:import:dry_run task --- lib/tasks/tracks.rake | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/tasks/tracks.rake b/lib/tasks/tracks.rake index b72c1f908..d6885d161 100644 --- a/lib/tasks/tracks.rake +++ b/lib/tasks/tracks.rake @@ -41,5 +41,18 @@ namespace :tracks do end end end + + desc "Import tracks and subjects from the lib/tracks.yml file" + task dry_run: :environment do + tracks_info = YAML.load_file(Rails.root + "lib/tracks.yml") + tracks_info["tracks"].each_pair do |k, v| + track = Track.find_by(name: v["name"].to_s.strip) + if track.nil? + puts "!! There is not a '#{v["name"]}' track. Please create it before importing the subjects." + else + puts "- Track '#{v["name"]}': #{v['fields'].size} subjects will be imported" + end + end + end end end From 4fa609f3c5f0d7b3d668ce5c44deb5038a681794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 11 Aug 2022 14:28:52 +0200 Subject: [PATCH 441/609] Fix fixture --- spec/fixtures/reference-tracks.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/spec/fixtures/reference-tracks.yml b/spec/fixtures/reference-tracks.yml index ede954393..e86f8e664 100644 --- a/spec/fixtures/reference-tracks.yml +++ b/spec/fixtures/reference-tracks.yml @@ -239,17 +239,17 @@ # Additions based on https://github.com/openjournals/joss/pull/1086#issuecomment-1148119259 - Distributed Artificial Intelligence [Physical Sciences] -- Artificial Intelligence: Applications and Expert Systems [Physical Sciences] -- Artificial Intelligence: Automatic Programming [Physical Sciences] -- Artificial Intelligence: Deduction and Theorem Proving [Physical Sciences] -- Artificial Intelligence: Knowledge Representation Formalisms and Methods [Physical Sciences] -- Artificial Intelligence: Natural Language Processing [Physical Sciences] -- Artificial Intelligence: Problem Solving, Control Methods, and Search [Physical Sciences] -- Artificial Intelligence: Robotics [Physical Sciences] -- Data Science: Statistical Libraries and Tools [Physical Sciences] -- Data Science: Modeling and Simulation [Physical Sciences] -- Data Science: Decision Analysis [Physical Sciences] -- Data Science: Linear Programming and Optimization [Physical Sciences] +- "Artificial Intelligence: Applications and Expert Systems [Physical Sciences]" +- "Artificial Intelligence: Automatic Programming [Physical Sciences]" +- "Artificial Intelligence: Deduction and Theorem Proving [Physical Sciences]" +- "Artificial Intelligence: Knowledge Representation Formalisms and Methods [Physical Sciences]" +- "Artificial Intelligence: Natural Language Processing [Physical Sciences]" +- "Artificial Intelligence: Problem Solving, Control Methods, and Search [Physical Sciences]" +- "Artificial Intelligence: Robotics [Physical Sciences]" +- "Data Science: Statistical Libraries and Tools [Physical Sciences]" +- "Data Science: Modeling and Simulation [Physical Sciences]" +- "Data Science: Decision Analysis [Physical Sciences]" +- "Data Science: Linear Programming and Optimization [Physical Sciences]" # Health Sciences - General Medicine [Health Sciences] From 669e6386ef5450b009f021faa7005587e20f0fe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 12 Aug 2022 13:59:35 +0200 Subject: [PATCH 442/609] Add track labels to dashboard listings --- app/helpers/home_helper.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/helpers/home_helper.rb b/app/helpers/home_helper.rb index 5b1213766..4ea6f22c5 100644 --- a/app/helpers/home_helper.rb +++ b/app/helpers/home_helper.rb @@ -12,6 +12,8 @@ def pretty_labels_for(paper) concat content_tag(:span, label, style: "padding: 3px; margin-right: 3px; border-radius: 2px; background-color: ##{colour}; color: #000000;") elsif label == "waitlisted" concat content_tag(:span, label, style: "padding: 3px; margin-right: 3px; border-radius: 2px; background-color: ##{colour}; color: #000000;") + elsif label.start_with?("Track: ") + concat content_tag(:span, label, style: "padding: 3px; margin-right: 3px; border-radius: 2px; background-color: ##{colour}; color: #000000;") end end end From 301890167fb00f76064de2dbde4dc15264ed7a4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 12 Aug 2022 14:23:54 +0200 Subject: [PATCH 443/609] Smaller track select box --- app/views/home/_menu.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/home/_menu.html.erb b/app/views/home/_menu.html.erb index 0c668c29a..cd101f1bf 100644 --- a/app/views/home/_menu.html.erb +++ b/app/views/home/_menu.html.erb @@ -23,7 +23,7 @@ <% if [dashboard_incoming_path, dashboard_in_progress_path, dashboard_all_path].include?(request.path) %>
            - <%= select_tag :track_id, options_from_collection_for_select(Track.all, "id", "name", params[:track_id].presence), include_blank: "All tracks", class: "form-control left", onchange: "top.location.href='?track_id=' + this.options[this.selectedIndex].value;" %> + <%= select_tag :track_id, options_from_collection_for_select(Track.all, "id", "name", params[:track_id].presence), include_blank: "All tracks", class: "form-control left", style: "font-size:81%", onchange: "top.location.href='?track_id=' + this.options[this.selectedIndex].value;" %>
            <% end %>
            From 49c868740ade38e97955e614eb876c552292bb70 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Fri, 12 Aug 2022 22:14:30 +0100 Subject: [PATCH 444/609] Smaller menus --- app/assets/stylesheets/application.scss | 4 ++++ app/views/home/_menu.html.erb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index e06ae4fff..ad75de2d6 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -757,6 +757,10 @@ $btn-primary-border: darken($btn-primary-bg, 5%) !default; border: 1px solid #EAE9ED; font-size: 14px; + &:smaller { + font-size: 12px; + } + .tabnav-tab:first-of-type { border-radius: 0.25em 0 0 0.25em; } diff --git a/app/views/home/_menu.html.erb b/app/views/home/_menu.html.erb index cd101f1bf..c99693ed7 100644 --- a/app/views/home/_menu.html.erb +++ b/app/views/home/_menu.html.erb @@ -1,5 +1,5 @@
            -
            +
            <%= link_to "/dashboard/#{current_user.editor.login}", class: current_class?("/dashboard/#{current_user.editor.login}") do %> Your papers
            <%= raw current_user.editor.papers.in_progress.count %>
            From 49769934a2c98662bde927a303a4ee64610d74e6 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Fri, 12 Aug 2022 22:17:39 +0100 Subject: [PATCH 445/609] Smaller menus --- app/assets/stylesheets/application.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index ad75de2d6..8427eb822 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -757,10 +757,10 @@ $btn-primary-border: darken($btn-primary-bg, 5%) !default; border: 1px solid #EAE9ED; font-size: 14px; - &:smaller { + .smaller { font-size: 12px; } - + .tabnav-tab:first-of-type { border-radius: 0.25em 0 0 0.25em; } From f271edaaa7b92825844585ac1719733b64919360 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Fri, 12 Aug 2022 22:30:37 +0100 Subject: [PATCH 446/609] Smaller menus --- app/assets/stylesheets/application.scss | 6 +----- app/views/home/_menu.html.erb | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 8427eb822..e936d2d7b 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -755,11 +755,7 @@ $btn-primary-border: darken($btn-primary-bg, 5%) !default; .btn-group { border: 1px solid #EAE9ED; - font-size: 14px; - - .smaller { - font-size: 12px; - } + font-size: 12px; .tabnav-tab:first-of-type { border-radius: 0.25em 0 0 0.25em; diff --git a/app/views/home/_menu.html.erb b/app/views/home/_menu.html.erb index c99693ed7..cd101f1bf 100644 --- a/app/views/home/_menu.html.erb +++ b/app/views/home/_menu.html.erb @@ -1,5 +1,5 @@
            -
            +
            <%= link_to "/dashboard/#{current_user.editor.login}", class: current_class?("/dashboard/#{current_user.editor.login}") do %> Your papers
            <%= raw current_user.editor.papers.in_progress.count %>
            From a09238f0c1f7480628846723a6c0c9f522c556d5 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Fri, 12 Aug 2022 22:39:29 +0100 Subject: [PATCH 447/609] Pre review not meta --- app/views/papers/_actions.html.erb | 2 +- app/views/papers/_show_unpublished.html.erb | 2 +- spec/views/papers/show.html.erb_spec.rb | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/papers/_actions.html.erb b/app/views/papers/_actions.html.erb index af39b15bc..a6f8baed1 100644 --- a/app/views/papers/_actions.html.erb +++ b/app/views/papers/_actions.html.erb @@ -77,7 +77,7 @@
            <%= form_tag(start_meta_review_paper_url(paper), class: "left") do %> Editor: <%= select_tag :editor, options_for_select(Repository.editors, selected: nil), prompt: "Suggest editor (optional)", class: "form-control left" %> - <%= submit_tag "Start meta review", class: "btn btn-primary left start-review" %> + <%= submit_tag "Start pre review", class: "btn btn-primary left start-review" %> <% end %>
            diff --git a/app/views/papers/_show_unpublished.html.erb b/app/views/papers/_show_unpublished.html.erb index c4a30afe4..700311258 100644 --- a/app/views/papers/_show_unpublished.html.erb +++ b/app/views/papers/_show_unpublished.html.erb @@ -29,7 +29,7 @@ <% if @paper.meta_review_issue_id %> <%= link_to @paper.meta_review_url, class: 'btn paper-btn' do %> <%= image_tag "icon_docs.svg" %> - Paper meta review + Paper pre review <% end %> <% end %> diff --git a/spec/views/papers/show.html.erb_spec.rb b/spec/views/papers/show.html.erb_spec.rb index e81221d0d..a8c4ed643 100644 --- a/spec/views/papers/show.html.erb_spec.rb +++ b/spec/views/papers/show.html.erb_spec.rb @@ -103,7 +103,7 @@ render template: "papers/show", formats: :html expect(rendered).to have_selector("a[data-turbo-method=post]", text: "Withdraw paper") expect(rendered).to_not have_selector("a[data-turbo-method=post]", text: "Reject paper") - expect(rendered).to_not have_selector("input[type=submit][value='Start meta review']") + expect(rendered).to_not have_selector("input[type=submit][value='Start pre review']") end it "shows the withdraw/reject/start-meta-review buttons button to admins" do @@ -119,7 +119,7 @@ render template: "papers/show", formats: :html expect(rendered).to have_selector("a[data-turbo-method=post]", text: "Withdraw paper") expect(rendered).to have_selector("a[data-turbo-method=post]", text: "Reject paper") - expect(rendered).to have_selector("input[type=submit][value='Start meta review']") + expect(rendered).to have_selector("input[type=submit][value='Start pre review']") expect(rendered).to have_content(author.email) end @@ -136,7 +136,7 @@ render template: "papers/show", formats: :html expect(rendered).to_not have_selector("button[type=submit]", text: "Withdraw paper") expect(rendered).to_not have_selector("button[type=submit]", text: "Reject paper") - expect(rendered).to_not have_selector("input[type=submit][value='Start meta review']") + expect(rendered).to_not have_selector("input[type=submit][value='Start pre review']") end it "doesn't displays buttons when there's a GitHub issue" do From 2248901b10cd9793cf1513bdcbef64e5d203c5d9 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sat, 13 Aug 2022 17:59:15 +0100 Subject: [PATCH 448/609] Smaller track menu on AEiC dashboard too --- app/views/aeic_dashboard/_menu.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/aeic_dashboard/_menu.html.erb b/app/views/aeic_dashboard/_menu.html.erb index 9be5e4989..1f5db730e 100644 --- a/app/views/aeic_dashboard/_menu.html.erb +++ b/app/views/aeic_dashboard/_menu.html.erb @@ -8,7 +8,7 @@ <% if [aeic_dashboard_path, editors_path, invitations_path].include?(request.path) %>
            - <%= select_tag :track_id, options_from_collection_for_select(Track.all, "id", "name", params[:track_id].presence), include_blank: "All tracks", class: "form-control left", onchange: "top.location.href='?track_id=' + this.options[this.selectedIndex].value;" %> + <%= select_tag :track_id, options_from_collection_for_select(Track.all, "id", "name", params[:track_id].presence), include_blank: "All tracks", class: "form-control left", style: "font-size:81%", onchange: "top.location.href='?track_id=' + this.options[this.selectedIndex].value;" %>
            <% end %>
            From f9a7dba6f0710f4819ecae3dfa744dbd45b326b6 Mon Sep 17 00:00:00 2001 From: Chris Hartgerink Date: Fri, 19 Aug 2022 10:03:03 +0200 Subject: [PATCH 449/609] Add initial correction and retraction to publication ethics --- app/views/home/about.html.erb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/home/about.html.erb b/app/views/home/about.html.erb index b6f4670c0..add063ca2 100644 --- a/app/views/home/about.html.erb +++ b/app/views/home/about.html.erb @@ -151,7 +151,10 @@
          • Self-plagiarism (repeated publication of the same work) is not allowed.
          • Author lists must be correct and complete. All listed authors must have made a contribution to the work, and all significant contributors should be included in the author list.
          • Reviews should be accurate and non-fraudulent. Examples of concerns are: Authors should not suggest reviewers who are not real people or have conflicts. Reviewers and editors must disclose conflicts. Bribes for authors, reviewers, editors are not permitted.
          • - +
          • Minor fixes are processed by the Editors in Chief (EiCs), and are publicly handled based on requests from the original authors (managed in the GitHub review linked to from the paper).
          • +
          • Major corrections will be reviewed by the EiC and ethics team. If accepted, the paper will be re-published with an editorial note on the GitHub review (linked from the paper page).
          • +
          • Retractions: EiC team and the ethics team review. If we deem that a retraction is warranted, we will update the paper and leave a retraction notice (see an example retraction for the linked paper)
          • + Copyright and Access
              From 928bbe8a7ca09dc93d5a5a265352bbdfe19086b9 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Fri, 19 Aug 2022 10:59:55 +0100 Subject: [PATCH 450/609] Fixes #1103 --- docs/submitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index 3d512a993..987680c06 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -276,7 +276,7 @@ Example `paper.bib` file: } ``` -Note that the paper ends with a References heading, and the references are built automatically from the content in the `.bib` file. You should enter in-text citations in the paper body following correct [Markdown citation syntax](https://pandoc.org/MANUAL.html#extension-citations). Also note that the references include full names of venues, e.g., journals and conferences, not abbreviations only understood in the context of a specific discipline. +Note that the paper begins by a metadata section (the enclosing --- lines are mandatory) and ends with a References heading, and the references are built automatically from the content in the `.bib` file. You should enter in-text citations in the paper body following correct [Markdown citation syntax](https://pandoc.org/MANUAL.html#extension-citations). Also note that the references include full names of venues, e.g., journals and conferences, not abbreviations only understood in the context of a specific discipline. ## Checking that your paper compiles From 0336d7853f3240cfdae74560267cec1ca9bba457 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Fri, 19 Aug 2022 15:16:39 +0100 Subject: [PATCH 451/609] Closing missing tag --- app/views/aeic_dashboard/index.html.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/aeic_dashboard/index.html.erb b/app/views/aeic_dashboard/index.html.erb index 62cdddd85..59287f0d2 100644 --- a/app/views/aeic_dashboard/index.html.erb +++ b/app/views/aeic_dashboard/index.html.erb @@ -1,5 +1,5 @@
              -

              <%= notice %>

              +

              <%= notice %>

              Welcome, <%= current_user.editor.full_name %>
              @@ -9,6 +9,7 @@
              +
            <%= render partial: "menu" %> From 2f779f3a840281f386cdfd3edbf4c702e3c7eb08 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Fri, 19 Aug 2022 16:22:32 +0100 Subject: [PATCH 452/609] Adding link to vote --- app/helpers/application_helper.rb | 8 ++++++++ app/views/aeic_dashboard/index.html.erb | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 26176f45e..4e69a1c9c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -45,4 +45,12 @@ def name_and_tagline def avatar(username) return "https://github.com/#{username.sub(/^@/, "")}.png" end + + def scope_link_for_issue(github_issue) + id = github_issue.number + paper = Paper.where('review_issue_id = ? OR meta_review_issue_id = ?', id, id).first + + return "" unless paper + return url_for(paper) + end end diff --git a/app/views/aeic_dashboard/index.html.erb b/app/views/aeic_dashboard/index.html.erb index 59287f0d2..48ac3ecd9 100644 --- a/app/views/aeic_dashboard/index.html.erb +++ b/app/views/aeic_dashboard/index.html.erb @@ -49,7 +49,7 @@

            Open submissions flagged for editorial review (labeled as query-scope):

              <% @with_query_scope.each do |flagged_issue| %> -
            • <%= link_to "##{flagged_issue.number}", flagged_issue.html_url, :target => "_blank" %> <%= flagged_issue.title %>
            • +
            • <%= link_to "##{flagged_issue.number}", flagged_issue.html_url, :target => "_blank" %> • <%= link_to "Vote →".html_safe, scope_link_for_issue(flagged_issue) %> • <%= flagged_issue.title %>
            • <% end %>
            <% scope_query_link_text = "List of submissions pending editorial review at GitHub →".html_safe %> From 3902a8b84703a7f1907c0ab8f05e99ea40927cd0 Mon Sep 17 00:00:00 2001 From: Chris Hartgerink Date: Tue, 23 Aug 2022 14:11:00 +0200 Subject: [PATCH 453/609] Update app/views/home/about.html.erb Co-authored-by: Daniel S. Katz --- app/views/home/about.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/home/about.html.erb b/app/views/home/about.html.erb index add063ca2..0db5cdadf 100644 --- a/app/views/home/about.html.erb +++ b/app/views/home/about.html.erb @@ -151,7 +151,7 @@
          • Self-plagiarism (repeated publication of the same work) is not allowed.
          • Author lists must be correct and complete. All listed authors must have made a contribution to the work, and all significant contributors should be included in the author list.
          • Reviews should be accurate and non-fraudulent. Examples of concerns are: Authors should not suggest reviewers who are not real people or have conflicts. Reviewers and editors must disclose conflicts. Bribes for authors, reviewers, editors are not permitted.
          • -
          • Minor fixes are processed by the Editors in Chief (EiCs), and are publicly handled based on requests from the original authors (managed in the GitHub review linked to from the paper).
          • +
          • Minor fixes are processed by the Editors in Chief (EiCs), and are publicly handled based on requests from the original authors (managed in the GitHub review linked from the paper).
          • Major corrections will be reviewed by the EiC and ethics team. If accepted, the paper will be re-published with an editorial note on the GitHub review (linked from the paper page).
          • Retractions: EiC team and the ethics team review. If we deem that a retraction is warranted, we will update the paper and leave a retraction notice (see an example retraction for the linked paper)
          • From dec4939badec1a0cecdf788bdbb810776f3dc0c9 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 24 Aug 2022 16:16:44 +0100 Subject: [PATCH 454/609] Skipping problem issue --- lib/tasks/permissions.rake | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/tasks/permissions.rake b/lib/tasks/permissions.rake index c4931ed1c..941edbcfe 100644 --- a/lib/tasks/permissions.rake +++ b/lib/tasks/permissions.rake @@ -11,6 +11,7 @@ namespace :permissions do active_reviewers = [] open_issues.each do |issue| puts issue.number + next if issue.number == 4682 active_reviewers << issue.body.match(/(?<=)(\s*(.+?)\r?)(?=)/)[1].split(", ").each(&:strip!).each(&:downcase!) - ["Pending"] end From 16fb813580c14dd6e06580c2dcdd691d9b88ac16 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 24 Aug 2022 17:37:42 +0100 Subject: [PATCH 455/609] Checklist not needed now for rOpenSci submissions --- docs/editing.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/editing.md b/docs/editing.md index 6ec9a9fd0..cc474709b 100644 --- a/docs/editing.md +++ b/docs/editing.md @@ -146,7 +146,6 @@ If a paper has already been reviewed and accepted by rOpenSci, the streamlined J - Start the review issue - Add a comment in the review issue pointing to the rOpenSci review - Compile the paper and check it looks ok -- Tick off all the review checkboxes - Go to to the source code repo and grab the Zenodo DOI - Accept and publish the paper From 432861dbd3f906838a755675683aae85c80f79f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 26 Aug 2022 12:52:24 +0200 Subject: [PATCH 456/609] Set bot_secret for test env --- spec/controllers/dispatch_controller_spec.rb | 46 ++++++++------------ spec/rails_helper.rb | 1 + 2 files changed, 20 insertions(+), 27 deletions(-) diff --git a/spec/controllers/dispatch_controller_spec.rb b/spec/controllers/dispatch_controller_spec.rb index f0d1471bc..4aa8bd76a 100644 --- a/spec/controllers/dispatch_controller_spec.rb +++ b/spec/controllers/dispatch_controller_spec.rb @@ -168,7 +168,6 @@ def headers(event, payload) end describe "POST #api_start_review" do - ENV["BOT_SECRET"] = "mooo" it "with no API key" do post :api_start_review @@ -192,7 +191,7 @@ def headers(event, payload) # Can't create review issue because editor is invalid expect { - post :api_start_review, params: {secret: "mooo", id: 1234, reviewers: "mickey", editor: "NOTmouse"} + post :api_start_review, params: {secret: "testBOTsecret", id: 1234, reviewers: "mickey", editor: "NOTmouse"} }.to raise_error(AASM::InvalidTransition) expect(editor.papers.count).to eq(0) @@ -208,7 +207,7 @@ def headers(event, payload) allow(fake_issue).to receive(:number).and_return(1) allow(GITHUB).to receive(:create_issue).and_return(fake_issue) - post :api_start_review, params: {secret: "mooo", id: 1234, reviewers: "mickey", editor: "mouse"} + post :api_start_review, params: {secret: "testBOTsecret", id: 1234, reviewers: "mickey", editor: "mouse"} expect(response).to be_created expect(editor.papers.count).to eq(1) @@ -225,7 +224,7 @@ def headers(event, payload) allow(fake_issue).to receive(:number).and_return(1) allow(GITHUB).to receive(:create_issue).and_return(fake_issue) - post :api_start_review, params: {secret: "mooo", id: 1234, reviewers: "mickey,minnie", editor: "mouse"} + post :api_start_review, params: {secret: "testBOTsecret", id: 1234, reviewers: "mickey,minnie", editor: "mouse"} expect(response).to be_created expect(editor.papers.count).to eq(1) expect(paper.reload.reviewers).to eq(['@mickey', '@minnie']) @@ -241,7 +240,7 @@ def headers(event, payload) allow(fake_issue).to receive(:number).and_return(1) allow(GITHUB).to receive(:create_issue).and_return(fake_issue) - post :api_start_review, params: {secret: "mooo", id: 1234, reviewers: " white ,space ", editor: "mouse"} + post :api_start_review, params: {secret: "testBOTsecret", id: 1234, reviewers: " white ,space ", editor: "mouse"} expect(response).to be_created expect(editor.papers.count).to eq(1) expect(paper.reload.reviewers).to eq(['@white', '@space']) @@ -249,7 +248,6 @@ def headers(event, payload) end describe "POST #api_assign_editor" do - ENV["BOT_SECRET"] = "mooo" it "with no API key" do post :api_assign_editor @@ -260,7 +258,7 @@ def headers(event, payload) editor = create(:editor, login: "jimmy") paper = create(:review_pending_paper, state: "review_pending", meta_review_issue_id: 1234) - post :api_assign_editor, params: {secret: "mooo", + post :api_assign_editor, params: {secret: "testBOTsecret", id: 1234, editor: "jimmy" } @@ -273,7 +271,7 @@ def headers(event, payload) editor = create(:editor, login: "jimmy") paper = create(:under_review_paper, state: "under_review", review_issue_id: 1234) - post :api_assign_editor, params: {secret: "mooo", + post :api_assign_editor, params: {secret: "testBOTsecret", id: 1234, editor: "jimmy" } @@ -286,7 +284,7 @@ def headers(event, payload) editor = create(:editor, login: "jimmy") paper = create(:review_pending_paper, state: "review_pending", meta_review_issue_id: 1234) - post :api_assign_editor, params: {secret: "mooo", + post :api_assign_editor, params: {secret: "testBOTsecret", id: 1234, editor: "joey" } @@ -299,7 +297,7 @@ def headers(event, payload) editor = create(:editor, login: "jimmy") paper = create(:review_pending_paper, state: "review_pending", meta_review_issue_id: 1234) - post :api_assign_editor, params: {secret: "mooo", + post :api_assign_editor, params: {secret: "testBOTsecret", id: 12345, editor: "jimmy" } @@ -310,7 +308,6 @@ def headers(event, payload) end describe "POST #api_editor_invite" do - ENV["BOT_SECRET"] = "mooo" it "with no API key" do post :api_editor_invite @@ -320,7 +317,7 @@ def headers(event, payload) it "with the correct API key and valid editor" do editor = create(:editor, login: "jimmy") paper = create(:review_pending_paper, state: "review_pending", meta_review_issue_id: 1234) - post_params = { secret: "mooo", id: 1234, editor: "jimmy" } + post_params = { secret: "testBOTsecret", id: 1234, editor: "jimmy" } expect { post :api_editor_invite, params: post_params }.to change { ActionMailer::Base.deliveries.count }.by(1) expect { post :api_editor_invite, params: post_params }.to change { editor.invitations.count }.by(1) @@ -329,7 +326,7 @@ def headers(event, payload) it "with the correct API key and invalid editor" do paper = create(:review_pending_paper, state: "review_pending", meta_review_issue_id: 1234) - post_params = { secret: "mooo", id: 1234, editor: "not-editor" } + post_params = { secret: "testBOTsecret", id: 1234, editor: "not-editor" } post :api_editor_invite, params: post_params expect(response).to be_unprocessable @@ -337,7 +334,6 @@ def headers(event, payload) end describe "POST #api_assign_reviewers" do - ENV["BOT_SECRET"] = "mooo" it "with no API key" do post :api_assign_reviewers @@ -348,7 +344,7 @@ def headers(event, payload) editor = create(:editor, login: "jimmy") paper = create(:review_pending_paper, state: "review_pending", meta_review_issue_id: 1234) - post :api_assign_reviewers, params: {secret: "mooo", + post :api_assign_reviewers, params: {secret: "testBOTsecret", id: 1234, reviewers: "joey, dave" } @@ -361,7 +357,7 @@ def headers(event, payload) editor = create(:editor, login: "jimmy") paper = create(:review_pending_paper, state: "review_pending", meta_review_issue_id: 1234) - post :api_assign_reviewers, params: {secret: "mooo", + post :api_assign_reviewers, params: {secret: "testBOTsecret", id: 12345, reviewers: "mike" } @@ -372,7 +368,6 @@ def headers(event, payload) end describe "POST #api_update_paper_info" do - ENV["BOT_SECRET"] = "mooo" it "with no API key" do post :api_update_paper_info @@ -382,7 +377,7 @@ def headers(event, payload) it "with the correct API key" do paper = create(:review_pending_paper, state: "review_pending", meta_review_issue_id: 1234) - post :api_update_paper_info, params: {secret: "mooo", + post :api_update_paper_info, params: {secret: "testBOTsecret", id: 1234, repository_url: "http://github.com/openjournals/new-repo-value" } @@ -394,7 +389,7 @@ def headers(event, payload) it "with the correct API key and invalid paper" do paper = create(:review_pending_paper, state: "review_pending", meta_review_issue_id: 1234) - post :api_update_paper_info, params: {secret: "mooo", + post :api_update_paper_info, params: {secret: "testBOTsecret", id: 12345, repository_url: "http://github.com/openjournals/joss" } @@ -405,7 +400,6 @@ def headers(event, payload) end describe "PUT #api_reject" do - ENV["BOT_SECRET"] = "mooo" it "with no API key" do post :api_reject @@ -415,7 +409,7 @@ def headers(event, payload) it "with the correct API key for a review_pending paper" do paper = create(:review_pending_paper, state: "review_pending", meta_review_issue_id: 1234) - post :api_reject, params: { secret: "mooo", + post :api_reject, params: { secret: "testBOTsecret", id: 1234} expect(response).to be_successful @@ -425,7 +419,7 @@ def headers(event, payload) it "with the correct API key for rejected paper" do paper = create(:rejected_paper, meta_review_issue_id: 1234) - post :api_reject, params: { secret: "mooo", + post :api_reject, params: { secret: "testBOTsecret", id: 1234} expect(response).to be_successful @@ -434,7 +428,6 @@ def headers(event, payload) end describe "PUT #api_withdraw" do - ENV["BOT_SECRET"] = "mooo" it "with no API key" do post :api_withdraw @@ -444,7 +437,7 @@ def headers(event, payload) it "with the correct API key for a review_pending paper" do paper = create(:review_pending_paper, state: "review_pending", meta_review_issue_id: 1234) - post :api_withdraw, params: { secret: "mooo", + post :api_withdraw, params: { secret: "testBOTsecret", id: 1234} expect(response).to be_successful @@ -454,7 +447,7 @@ def headers(event, payload) it "with the correct API key for rejected paper" do paper = create(:rejected_paper, meta_review_issue_id: 1234) - post :api_withdraw, params: { secret: "mooo", + post :api_withdraw, params: { secret: "testBOTsecret", id: 1234} expect(response).to be_successful @@ -463,7 +456,6 @@ def headers(event, payload) end describe "POST #api_deposit" do - ENV["BOT_SECRET"] = "mooo" it "with no API key" do post :api_deposit @@ -475,7 +467,7 @@ def headers(event, payload) paper = create(:under_review_paper, review_issue_id: 1234, user_id: user.id) encoded_metadata = "eyJwYXBlciI6eyJ0aXRsZSI6IkZpZGdpdDogQW4gdW5nb2RseSB1bmlvbiBv\nZiBHaXRIdWIgYW5kIGZpZ3NoYXJlIiwidGFncyI6WyJleGFtcGxlIiwidGFn\ncyIsImZvciB0aGUgcGFwZXIiXSwibGFuZ3VhZ2VzIjpbIlB5dGhvbiIsIlJ1\nc3QiLCJQZXJsIl0sImF1dGhvcnMiOlt7ImdpdmVuX25hbWUiOiJBcmZvbiIs\nIm1pZGRsZV9uYW1lIjoiTS4iLCJsYXN0X25hbWUiOiJTbWl0aCIsIm9yY2lk\nIjoiMDAwMC0wMDAyLTM5NTctMjQ3NCIsImFmZmlsaWF0aW9uIjoiR2l0SHVi\nIEluYy4sIERpc25leSBJbmMuIn0seyJnaXZlbl9uYW1lIjoiSmFtZXMiLCJt\naWRkbGVfbmFtZSI6IlAuIiwibGFzdF9uYW1lIjoidmFuIERpc2hvZWNrIiwi\nb3JjaWQiOiIwMDAwLTAwMDItMzk1Ny0yNDc0IiwiYWZmaWxpYXRpb24iOiJE\naXNuZXkgSW5jLiJ9XSwiZG9pIjoiMTAuMjExMDUvam9zcy4wMDAxNyIsImFy\nY2hpdmVfZG9pIjoiaHR0cDovL2R4LmRvaS5vcmcvMTAuNTI4MS96ZW5vZG8u\nMTM3NTAiLCJyZXBvc2l0b3J5X2FkZHJlc3MiOiJodHRwczovL2dpdGh1Yi5j\nb20vYXBwbGljYXRpb25za2VsZXRvbi9Ta2VsZXRvbiIsImVkaXRvciI6ImFy\nZm9uIiwicmV2aWV3ZXJzIjpbIkBqaW0iLCJAYm9iIl19fQ==\n" - post :api_deposit, params: {secret: "mooo", + post :api_deposit, params: {secret: "testBOTsecret", id: 1234, doi: "10.0001/joss.01234", archive_doi: "10.0001/zenodo.01234", diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index e45178be7..c7eb50e7c 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -3,6 +3,7 @@ ENV['RAILS_ENV'] ||= 'test' ENV['GH_TOKEN'] = "testGHtoken" +ENV['BOT_SECRET'] = "testBOTsecret" require File.expand_path('../config/environment', __dir__) # Prevent database truncation if the environment is production From e04b918e9ef96d8c592c261c5d8beb5b42e07c88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 26 Aug 2022 12:54:05 +0200 Subject: [PATCH 457/609] Don't update accepted_at on paper reacceptance --- app/controllers/dispatch_controller.rb | 2 +- spec/controllers/dispatch_controller_spec.rb | 41 ++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/app/controllers/dispatch_controller.rb b/app/controllers/dispatch_controller.rb index f019acaf4..03a72980e 100644 --- a/app/controllers/dispatch_controller.rb +++ b/app/controllers/dispatch_controller.rb @@ -129,7 +129,7 @@ def api_deposit @paper.update( doi: params[:doi], archive_doi: params[:archive_doi], - accepted_at: Time.now, + accepted_at: @paper.accepted_at.present? ? @paper.accepted_at : Time.now, citation_string: params[:citation_string], authors: params[:authors], title: params[:title], diff --git a/spec/controllers/dispatch_controller_spec.rb b/spec/controllers/dispatch_controller_spec.rb index 4aa8bd76a..16bfac80b 100644 --- a/spec/controllers/dispatch_controller_spec.rb +++ b/spec/controllers/dispatch_controller_spec.rb @@ -465,6 +465,8 @@ def headers(event, payload) it "with the correct API key" do user = create(:user) paper = create(:under_review_paper, review_issue_id: 1234, user_id: user.id) + expect(paper.accepted_at).to be_nil + expect(paper.state).to eql('under_review') encoded_metadata = "eyJwYXBlciI6eyJ0aXRsZSI6IkZpZGdpdDogQW4gdW5nb2RseSB1bmlvbiBv\nZiBHaXRIdWIgYW5kIGZpZ3NoYXJlIiwidGFncyI6WyJleGFtcGxlIiwidGFn\ncyIsImZvciB0aGUgcGFwZXIiXSwibGFuZ3VhZ2VzIjpbIlB5dGhvbiIsIlJ1\nc3QiLCJQZXJsIl0sImF1dGhvcnMiOlt7ImdpdmVuX25hbWUiOiJBcmZvbiIs\nIm1pZGRsZV9uYW1lIjoiTS4iLCJsYXN0X25hbWUiOiJTbWl0aCIsIm9yY2lk\nIjoiMDAwMC0wMDAyLTM5NTctMjQ3NCIsImFmZmlsaWF0aW9uIjoiR2l0SHVi\nIEluYy4sIERpc25leSBJbmMuIn0seyJnaXZlbl9uYW1lIjoiSmFtZXMiLCJt\naWRkbGVfbmFtZSI6IlAuIiwibGFzdF9uYW1lIjoidmFuIERpc2hvZWNrIiwi\nb3JjaWQiOiIwMDAwLTAwMDItMzk1Ny0yNDc0IiwiYWZmaWxpYXRpb24iOiJE\naXNuZXkgSW5jLiJ9XSwiZG9pIjoiMTAuMjExMDUvam9zcy4wMDAxNyIsImFy\nY2hpdmVfZG9pIjoiaHR0cDovL2R4LmRvaS5vcmcvMTAuNTI4MS96ZW5vZG8u\nMTM3NTAiLCJyZXBvc2l0b3J5X2FkZHJlc3MiOiJodHRwczovL2dpdGh1Yi5j\nb20vYXBwbGljYXRpb25za2VsZXRvbi9Ta2VsZXRvbiIsImVkaXRvciI6ImFy\nZm9uIiwicmV2aWV3ZXJzIjpbIkBqaW0iLCJAYm9iIl19fQ==\n" post :api_deposit, params: {secret: "testBOTsecret", @@ -477,8 +479,47 @@ def headers(event, payload) metadata: encoded_metadata } expect(response).to be_successful + expect(paper.reload.accepted_at).to_not be_nil expect(paper.reload.state).to eql('accepted') expect(paper.metadata['paper']['reviewers']).to eql(["@jim", "@bob"]) end + + it "should not update accepted_at on paper reacceptance" do + paper = create(:accepted_paper, review_issue_id: 1234, accepted_at: 2.days.ago) + expect(paper.state).to eql('accepted') + expect(paper.accepted_at).to_not be_nil + initial_accepted_at = paper.accepted_at + + metadata = { paper: { + title: "Foo, bar, baz", + tags: ["test"], + languages: ["python","c", "ruby"], + authors: ["A", "B"], + doi: "10.0001/joss.01234", + archive_doi: "10.0001/zenodo.01234", + repository_address: "http://theoj.org/repos/test", + editor: "editor1", + reviewers: ["reviewer1", "reviewer2"], + volume: 33, + issue: 42, + year: 2022, + page: 1234 + } + }.to_json + + + post :api_deposit, params: {secret: "testBOTsecret", + id: 1234, + doi: "10.0001/joss.01234", + archive_doi: "10.0001/zenodo.01234", + citation_string: "Smith et al., 2008, JOSS, etc.", + authors: "Arfon Smith, Mickey Mouse", + title: "Foo, bar, baz", + metadata: Base64.encode64(metadata) + } + expect(response).to be_successful + expect(paper.reload.state).to eql('accepted') + expect(paper.accepted_at).to eql(initial_accepted_at) + end end end From 50cd836f8b52b82845b7fd1aa57b12df090e227e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 26 Aug 2022 13:07:39 +0200 Subject: [PATCH 458/609] Reload paper --- spec/controllers/dispatch_controller_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/controllers/dispatch_controller_spec.rb b/spec/controllers/dispatch_controller_spec.rb index 16bfac80b..ee00d1d60 100644 --- a/spec/controllers/dispatch_controller_spec.rb +++ b/spec/controllers/dispatch_controller_spec.rb @@ -488,7 +488,7 @@ def headers(event, payload) paper = create(:accepted_paper, review_issue_id: 1234, accepted_at: 2.days.ago) expect(paper.state).to eql('accepted') expect(paper.accepted_at).to_not be_nil - initial_accepted_at = paper.accepted_at + initial_accepted_at = paper.reload.accepted_at metadata = { paper: { title: "Foo, bar, baz", From 11fde9ff26f369a6a50344e0ef9b27204362a43c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Sun, 11 Sep 2022 14:16:04 +0200 Subject: [PATCH 459/609] New Rails version --- Gemfile | 2 +- Gemfile.lock | 110 +++++++++++++++++++++++++-------------------------- 2 files changed, 56 insertions(+), 56 deletions(-) diff --git a/Gemfile b/Gemfile index 0cbc6e5c2..695cb81c2 100644 --- a/Gemfile +++ b/Gemfile @@ -18,7 +18,7 @@ gem 'octokit', '~> 4.22' gem 'pdf-reader', '~> 2.9.2' gem 'pg', '~> 1.3.5' gem 'will_paginate', '~> 3.3.1' -gem 'rails', '7.0.3.1' +gem 'rails', '7.0.4' gem "importmap-rails" gem "turbo-rails" gem "stimulus-rails" diff --git a/Gemfile.lock b/Gemfile.lock index 4773c000c..3331e22df 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,47 +4,47 @@ GEM Ascii85 (1.1.0) aasm (5.2.0) concurrent-ruby (~> 1.0) - actioncable (7.0.3.1) - actionpack (= 7.0.3.1) - activesupport (= 7.0.3.1) + actioncable (7.0.4) + actionpack (= 7.0.4) + activesupport (= 7.0.4) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.3.1) - actionpack (= 7.0.3.1) - activejob (= 7.0.3.1) - activerecord (= 7.0.3.1) - activestorage (= 7.0.3.1) - activesupport (= 7.0.3.1) + actionmailbox (7.0.4) + actionpack (= 7.0.4) + activejob (= 7.0.4) + activerecord (= 7.0.4) + activestorage (= 7.0.4) + activesupport (= 7.0.4) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.3.1) - actionpack (= 7.0.3.1) - actionview (= 7.0.3.1) - activejob (= 7.0.3.1) - activesupport (= 7.0.3.1) + actionmailer (7.0.4) + actionpack (= 7.0.4) + actionview (= 7.0.4) + activejob (= 7.0.4) + activesupport (= 7.0.4) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.3.1) - actionview (= 7.0.3.1) - activesupport (= 7.0.3.1) + actionpack (7.0.4) + actionview (= 7.0.4) + activesupport (= 7.0.4) rack (~> 2.0, >= 2.2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.3.1) - actionpack (= 7.0.3.1) - activerecord (= 7.0.3.1) - activestorage (= 7.0.3.1) - activesupport (= 7.0.3.1) + actiontext (7.0.4) + actionpack (= 7.0.4) + activerecord (= 7.0.4) + activestorage (= 7.0.4) + activesupport (= 7.0.4) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.3.1) - activesupport (= 7.0.3.1) + actionview (7.0.4) + activesupport (= 7.0.4) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -52,22 +52,22 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (7.0.3.1) - activesupport (= 7.0.3.1) + activejob (7.0.4) + activesupport (= 7.0.4) globalid (>= 0.3.6) - activemodel (7.0.3.1) - activesupport (= 7.0.3.1) - activerecord (7.0.3.1) - activemodel (= 7.0.3.1) - activesupport (= 7.0.3.1) - activestorage (7.0.3.1) - actionpack (= 7.0.3.1) - activejob (= 7.0.3.1) - activerecord (= 7.0.3.1) - activesupport (= 7.0.3.1) + activemodel (7.0.4) + activesupport (= 7.0.4) + activerecord (7.0.4) + activemodel (= 7.0.4) + activesupport (= 7.0.4) + activestorage (7.0.4) + actionpack (= 7.0.4) + activejob (= 7.0.4) + activerecord (= 7.0.4) + activesupport (= 7.0.4) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.3.1) + activesupport (7.0.4) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -230,7 +230,7 @@ GEM mini_portile2 (2.8.0) mini_racer (0.6.2) libv8-node (~> 16.10.0.0) - minitest (5.16.2) + minitest (5.16.3) msgpack (1.5.2) multi_json (1.15.0) multi_xml (0.6.0) @@ -318,20 +318,20 @@ GEM rack rack-test (2.0.2) rack (>= 1.3) - rails (7.0.3.1) - actioncable (= 7.0.3.1) - actionmailbox (= 7.0.3.1) - actionmailer (= 7.0.3.1) - actionpack (= 7.0.3.1) - actiontext (= 7.0.3.1) - actionview (= 7.0.3.1) - activejob (= 7.0.3.1) - activemodel (= 7.0.3.1) - activerecord (= 7.0.3.1) - activestorage (= 7.0.3.1) - activesupport (= 7.0.3.1) + rails (7.0.4) + actioncable (= 7.0.4) + actionmailbox (= 7.0.4) + actionmailer (= 7.0.4) + actionpack (= 7.0.4) + actiontext (= 7.0.4) + actionview (= 7.0.4) + activejob (= 7.0.4) + activemodel (= 7.0.4) + activerecord (= 7.0.4) + activestorage (= 7.0.4) + activesupport (= 7.0.4) bundler (>= 1.15.0) - railties (= 7.0.3.1) + railties (= 7.0.4) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -341,9 +341,9 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.4.3) loofah (~> 2.3) - railties (7.0.3.1) - actionpack (= 7.0.3.1) - activesupport (= 7.0.3.1) + railties (7.0.4) + actionpack (= 7.0.4) + activesupport (= 7.0.4) method_source rake (>= 12.2) thor (~> 1.0) @@ -495,7 +495,7 @@ DEPENDENCIES pry-byebug puma rack-livereload - rails (= 7.0.3.1) + rails (= 7.0.4) rails-controller-testing (~> 1.0.5) redis (~> 4.0) responders From cd3e89ce1c62cdcd87bce4ecb53efcefec095ae8 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sat, 24 Sep 2022 08:09:05 +0100 Subject: [PATCH 460/609] Track EiCs get a notification email too... --- app/mailers/notifications.rb | 3 ++- app/models/track.rb | 5 +++++ spec/mailers/notifications_spec.rb | 1 + spec/models/track_spec.rb | 10 ++++++++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/app/mailers/notifications.rb b/app/mailers/notifications.rb index 258ce1079..b690ed30a 100644 --- a/app/mailers/notifications.rb +++ b/app/mailers/notifications.rb @@ -2,9 +2,10 @@ class Notifications < ApplicationMailer EDITOR_EMAILS = [Rails.application.settings["editor_email"]] def submission_email(paper) + aeic_emails = paper.track.aeic_emails @url = "#{Rails.application.settings["url"]}/papers/#{paper.sha}" @paper = paper - mail(to: EDITOR_EMAILS, subject: "New submission: #{paper.title}") + mail(to: aeic_emails, cc: EDITOR_EMAILS, subject: "New submission: #{paper.title}") end def editor_invite_email(paper, editor) diff --git a/app/models/track.rb b/app/models/track.rb index b88a80ea3..a5d2c2a6f 100644 --- a/app/models/track.rb +++ b/app/models/track.rb @@ -21,4 +21,9 @@ def full_name def label "Track: #{code} (#{short_name})" end + + def aeic_emails + return [] if aeics.empty? + aeics.collect { |e| e.email } + end end diff --git a/spec/mailers/notifications_spec.rb b/spec/mailers/notifications_spec.rb index af256d7fd..135312cbf 100644 --- a/spec/mailers/notifications_spec.rb +++ b/spec/mailers/notifications_spec.rb @@ -8,6 +8,7 @@ mail = Notifications.submission_email(paper) expect(mail.subject).to match /Nice paper/ + expect(mail.recipients).to match_array paper.track.aeic_emails end it "should tell the submitting author to chill out" do diff --git a/spec/models/track_spec.rb b/spec/models/track_spec.rb index c3e2f4a7b..ea97e5747 100644 --- a/spec/models/track_spec.rb +++ b/spec/models/track_spec.rb @@ -44,4 +44,14 @@ expect(track.label).to eq "Track: 33 (ESE)" end end + + describe "#aeic_emails" do + it "returns an array of aeic emails" do + editor_1 = create(:board_editor, :email => "editor_1@example.com") + editor_2 = create(:board_editor, :email => "editor_2@example.com") + track = create(:track, :aeics => [editor_1, editor_2]) + + expect(track.aeic_emails).to eq ["editor_1@example.com", "editor_2@example.com"] + end + end end From 0a026de699485a43164df28e0cb2d8afbea113d3 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sat, 24 Sep 2022 08:15:42 +0100 Subject: [PATCH 461/609] All the recipients --- spec/mailers/notifications_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/mailers/notifications_spec.rb b/spec/mailers/notifications_spec.rb index 135312cbf..dc134acc5 100644 --- a/spec/mailers/notifications_spec.rb +++ b/spec/mailers/notifications_spec.rb @@ -7,8 +7,9 @@ paper = create(:paper, title: "Nice paper!") mail = Notifications.submission_email(paper) + expected_recipients = [paper.track.aeic_emails + Notifications::EDITOR_EMAILS].flatten expect(mail.subject).to match /Nice paper/ - expect(mail.recipients).to match_array paper.track.aeic_emails + expect(mail.recipients).to match_array expected_recipients end it "should tell the submitting author to chill out" do From b4564c148b6e583292214bb82a77832fb0a0836a Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 25 Sep 2022 12:38:00 +0100 Subject: [PATCH 462/609] Send an email if the track changes too. --- app/mailers/notifications.rb | 9 +++++++++ app/models/paper.rb | 3 +++ app/views/notifications/notify_new_aeic.html.erb | 9 +++++++++ app/views/notifications/notify_new_aeic.text.erb | 9 +++++++++ spec/models/paper_spec.rb | 10 +++++++++- 5 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 app/views/notifications/notify_new_aeic.html.erb create mode 100644 app/views/notifications/notify_new_aeic.text.erb diff --git a/app/mailers/notifications.rb b/app/mailers/notifications.rb index b690ed30a..d1519c3ec 100644 --- a/app/mailers/notifications.rb +++ b/app/mailers/notifications.rb @@ -8,6 +8,15 @@ def submission_email(paper) mail(to: aeic_emails, cc: EDITOR_EMAILS, subject: "New submission: #{paper.title}") end + def notify_new_aeic(paper, old_track, new_track) + aeic_emails = new_track.aeic_emails + @url = "#{Rails.application.settings["url"]}/papers/#{paper.sha}" + @paper = paper + @old_track = old_track + @new_track = new_track + mail(to: aeic_emails, cc: EDITOR_EMAILS, subject: "Track move for submission: #{paper.title}") + end + def editor_invite_email(paper, editor) @paper = paper mail(to: editor.email, subject: "JOSS editorial invite: #{paper.title}") diff --git a/app/models/paper.rb b/app/models/paper.rb index 43929470d..98c074ace 100644 --- a/app/models/paper.rb +++ b/app/models/paper.rb @@ -429,10 +429,13 @@ def set_track_id(new_track_id) def move_to_track(new_track) return if new_track.nil? + old_track = self.track current_label = self.track.present? ? self.track.label : "" if current_label != new_track.label set_track_id(new_track.id) + Notifications.notify_new_aeic(self, old_track, new_track).deliver_now + if self.meta_review_issue_id GITHUB.remove_label(Rails.application.settings["reviews"], self.meta_review_issue_id, current_label) if current_label.present? GITHUB.add_labels_to_an_issue(Rails.application.settings["reviews"], self.meta_review_issue_id, [new_track.label]) diff --git a/app/views/notifications/notify_new_aeic.html.erb b/app/views/notifications/notify_new_aeic.html.erb new file mode 100644 index 000000000..2488f4e84 --- /dev/null +++ b/app/views/notifications/notify_new_aeic.html.erb @@ -0,0 +1,9 @@ +A paper has just been moved to your track (<%= @new_track.name %>) from the <%= @old_track.name %> track. + +Title: <%= @paper.title %> +Repo: <%= @paper.repository_url %> + +View the paper here: <%= @url %> + +Thanks! +The <%= Rails.application.settings['abbreviation'] %> editorial robot. diff --git a/app/views/notifications/notify_new_aeic.text.erb b/app/views/notifications/notify_new_aeic.text.erb new file mode 100644 index 000000000..2488f4e84 --- /dev/null +++ b/app/views/notifications/notify_new_aeic.text.erb @@ -0,0 +1,9 @@ +A paper has just been moved to your track (<%= @new_track.name %>) from the <%= @old_track.name %> track. + +Title: <%= @paper.title %> +Repo: <%= @paper.repository_url %> + +View the paper here: <%= @url %> + +Thanks! +The <%= Rails.application.settings['abbreviation'] %> editorial robot. diff --git a/spec/models/paper_spec.rb b/spec/models/paper_spec.rb index 3c4bd2e27..4ba3bd44a 100644 --- a/spec/models/paper_spec.rb +++ b/spec/models/paper_spec.rb @@ -371,12 +371,20 @@ @paper = create(:paper, track_id: @track_1.id) end - it "should recibe a new track to assign" do + it "should receive a new track to assign" do expect(@paper).to_not receive(:track) expect(@paper).to_not receive(:set_track_id) @paper.move_to_track(nil) end + it "should not send an email if the track does not change" do + expect { @paper.move_to_track(@track_1) }.to change { ActionMailer::Base.deliveries.count }.by(0) + end + + it "should send an email if the track does change" do + expect { @paper.move_to_track(@track_2) }.to change { ActionMailer::Base.deliveries.count }.by(1) + end + it "should do nothing if track does not change" do expect(@paper).to_not receive(:set_track_id) expect_any_instance_of(Octokit::Client).to_not receive(:remove_label) From cc34f20588d3c853c535142980a0ad71f4ed9b3c Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 25 Sep 2022 18:48:24 +0100 Subject: [PATCH 463/609] Adding track short_name to editor profile --- app/models/track.rb | 4 ++++ app/views/editors/profile.html.erb | 4 ++-- spec/models/track_spec.rb | 8 ++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/app/models/track.rb b/app/models/track.rb index b88a80ea3..f122080d8 100644 --- a/app/models/track.rb +++ b/app/models/track.rb @@ -21,4 +21,8 @@ def full_name def label "Track: #{code} (#{short_name})" end + + def name_with_short_name + "#{name} (#{short_name})" + end end diff --git a/app/views/editors/profile.html.erb b/app/views/editors/profile.html.erb index 69d750eef..4e9720993 100644 --- a/app/views/editors/profile.html.erb +++ b/app/views/editors/profile.html.erb @@ -82,8 +82,8 @@ <%= f.label :tracks %>
            - <%= f.collection_check_boxes(:track_ids, Track.all, :id, :name) do |b| - b.label(class: "label-container-check-box") { b.check_box(class: "form-check-inline") + b.text } + <%= f.collection_check_boxes(:track_ids, Track.all, :id, :name_with_short_name) do |b| + b.label(class: "label-container-check-box") { b.check_box(class: "form-check-inline") + "#{b.text}" } end %>
            diff --git a/spec/models/track_spec.rb b/spec/models/track_spec.rb index c3e2f4a7b..1e5652e47 100644 --- a/spec/models/track_spec.rb +++ b/spec/models/track_spec.rb @@ -44,4 +44,12 @@ expect(track.label).to eq "Track: 33 (ESE)" end end + + describe "#name_with_short_name" do + it "includes name and short name" do + track = create(:track, code: 33, name: "Earth sciences and Ecology", short_name: "ESE") + + expect { track.name_with_short_name }.to eq "Earth sciences and Ecology (ESE)" + end + end end From 32b870e055d898981431fcacafefab135b121090 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 25 Sep 2022 18:56:54 +0100 Subject: [PATCH 464/609] Syntax init --- spec/models/track_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/models/track_spec.rb b/spec/models/track_spec.rb index 1e5652e47..7f50547ec 100644 --- a/spec/models/track_spec.rb +++ b/spec/models/track_spec.rb @@ -49,7 +49,7 @@ it "includes name and short name" do track = create(:track, code: 33, name: "Earth sciences and Ecology", short_name: "ESE") - expect { track.name_with_short_name }.to eq "Earth sciences and Ecology (ESE)" + expect(track.name_with_short_name).to eq "Earth sciences and Ecology (ESE)" end end end From 3275df82312954aba0b457da2d9948d1e573cd91 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 25 Sep 2022 19:04:35 +0100 Subject: [PATCH 465/609] Update tracks.yml --- lib/tracks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tracks.yml b/lib/tracks.yml index 2700e5888..7867d8f1a 100644 --- a/lib/tracks.yml +++ b/lib/tracks.yml @@ -7,7 +7,7 @@ tracks: name: Astronomy, Astrophysics, and Space Sciences short_name: AASS eics: - - arfon + - dfm code: 1 fields: - General Physics and Astronomy [Physical Sciences] From 4cc74f5ec47abb45661fb97fea63bc6555ea4f4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 28 Sep 2022 12:03:15 +0200 Subject: [PATCH 466/609] Add track short name to paper lookup --- app/controllers/papers_controller.rb | 3 ++- spec/controllers/papers_controller_spec.rb | 23 ++++++++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/app/controllers/papers_controller.rb b/app/controllers/papers_controller.rb index 8925b9d12..87c1a588f 100644 --- a/app/controllers/papers_controller.rb +++ b/app/controllers/papers_controller.rb @@ -268,7 +268,8 @@ def lookup paper = Paper.where('review_issue_id = ? OR meta_review_issue_id = ?', params[:id], params[:id]).first! accepted_at = paper.accepted_at ? paper.accepted_at.strftime('%d %B %Y') : nil response = { submitted: paper.created_at.strftime('%d %B %Y'), - accepted: accepted_at } + accepted: accepted_at, + track: paper.track&.short_name } render json: response.to_json end diff --git a/spec/controllers/papers_controller_spec.rb b/spec/controllers/papers_controller_spec.rb index e51d06be0..99295bb00 100644 --- a/spec/controllers/papers_controller_spec.rb +++ b/spec/controllers/papers_controller_spec.rb @@ -230,11 +230,30 @@ end describe "paper lookup" do - it "should return the created_at date for a paper" do + it "should return the created_at date for a submitted paper" do submitted_paper = create(:paper, state: 'submitted', created_at: 3.days.ago, meta_review_issue_id: 123) get :lookup, params: {id: 123} - expect(JSON.parse(response.body)['submitted']).to eq(3.days.ago.strftime('%d %B %Y')) + parsed_response = JSON.parse(response.body) + expect(parsed_response['submitted']).to eq(3.days.ago.strftime('%d %B %Y')) + expect(parsed_response['accepted']).to eq(nil) + end + + it "should return the created_at and accepted_at dates for a published paper" do + submitted_paper = create(:accepted_paper, created_at: 3.days.ago, accepted_at: 2.days.ago, meta_review_issue_id: 123) + + get :lookup, params: {id: 123} + parsed_response = JSON.parse(response.body) + expect(parsed_response['submitted']).to eq(3.days.ago.strftime('%d %B %Y')) + expect(parsed_response['accepted']).to eq(2.days.ago.strftime('%d %B %Y')) + end + + it "should return paper's track short name" do + track = create(:track, name: "Test track", short_name: "Testtr") + submitted_paper = create(:paper, state: 'submitted', track: track, meta_review_issue_id: 123) + + get :lookup, params: {id: 123} + expect(JSON.parse(response.body)['track']).to eq("Testtr") end it "should 404 when passed an invalid id" do From c90f3e98b0813595cb54374c84f862c3a76c111f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 28 Sep 2022 12:04:07 +0200 Subject: [PATCH 467/609] Add paper's track lookup --- app/controllers/papers_controller.rb | 19 ++++++++++++++++++ app/models/track.rb | 4 ++++ config/routes.rb | 1 + spec/controllers/papers_controller_spec.rb | 23 ++++++++++++++++++++++ spec/models/track_spec.rb | 8 ++++++++ 5 files changed, 55 insertions(+) diff --git a/app/controllers/papers_controller.rb b/app/controllers/papers_controller.rb index 87c1a588f..2c84a2c26 100644 --- a/app/controllers/papers_controller.rb +++ b/app/controllers/papers_controller.rb @@ -273,6 +273,25 @@ def lookup render json: response.to_json end + def lookup_track + paper = Paper.where('review_issue_id = ? OR meta_review_issue_id = ?', params[:id], params[:id]).first! + track = paper.track + response = { name: nil, + short_name: nil, + code: nil, + label: nil, + parameterized: nil} + unless track.nil? + response[:name] = track.name + response[:short_name] = track.short_name + response[:code] = track.code + response[:label] = track.label + response[:parameterized] = track.parameterized_short_name + end + + render json: response.to_json + end + def valid_doi? if params[:doi] && params[:doi].include?("10.21105") return true diff --git a/app/models/track.rb b/app/models/track.rb index f122080d8..68d9b0c52 100644 --- a/app/models/track.rb +++ b/app/models/track.rb @@ -25,4 +25,8 @@ def label def name_with_short_name "#{name} (#{short_name})" end + + def parameterized_short_name + short_name.gsub(/[^a-z0-9\-_]+/i, "-").downcase + end end diff --git a/config/routes.rb b/config/routes.rb index 98f0d8519..ae17f5323 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -14,6 +14,7 @@ post 'reject' post 'withdraw' post 'change_track' + get 'lookup_track' end collection do diff --git a/spec/controllers/papers_controller_spec.rb b/spec/controllers/papers_controller_spec.rb index 99295bb00..30aa69763 100644 --- a/spec/controllers/papers_controller_spec.rb +++ b/spec/controllers/papers_controller_spec.rb @@ -264,6 +264,29 @@ end end + describe "lookup_track" do + it "should return paper's track info" do + track = create(:track, name: "Test track", short_name: "Tes Tr", code: 22) + create(:paper, track: track, meta_review_issue_id: 123) + + get :lookup_track, params: {id: 123} + + track_info = JSON.parse(response.body) + expect(track_info['name']).to eq("Test track") + expect(track_info['short_name']).to eq("Tes Tr") + expect(track_info['code']).to eq(22) + expect(track_info['label']).to eq("Track: 22 (Tes Tr)") + expect(track_info['parameterized']).to eq("tes-tr") + end + + it "should 404 when passed an invalid id" do + get :lookup_track, params: {id: 12345} + + expect(response.body).to match /404 Not Found/ + expect(response.status).to eq(404) + end + end + describe "accepted papers" do it "should not redirect when accepting any content type" do paper = create(:accepted_paper) diff --git a/spec/models/track_spec.rb b/spec/models/track_spec.rb index 7f50547ec..012df80b3 100644 --- a/spec/models/track_spec.rb +++ b/spec/models/track_spec.rb @@ -52,4 +52,12 @@ expect(track.name_with_short_name).to eq "Earth sciences and Ecology (ESE)" end end + + describe "#parameterized_short_name" do + it "returns parameterized short name" do + track = create(:track, code: 33, name: "Earth sciences and Ecology", short_name: "Earth S.E") + + expect(track.parameterized_short_name).to eq "earth-s-e" + end + end end From f9ec80d0fdb70a17ccada97ffec25bbb9c6dd7f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 28 Sep 2022 13:42:42 +0200 Subject: [PATCH 468/609] Update Octokit --- Gemfile | 2 +- Gemfile.lock | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Gemfile b/Gemfile index 695cb81c2..89e1097d5 100644 --- a/Gemfile +++ b/Gemfile @@ -14,7 +14,7 @@ gem 'net-sftp', '~> 2.1', '>= 2.1.2' gem 'octicons_helper' gem 'omniauth-orcid', '~> 2.1.1' gem 'omniauth-rails_csrf_protection' -gem 'octokit', '~> 4.22' +gem 'octokit', '~> 4.25' gem 'pdf-reader', '~> 2.9.2' gem 'pg', '~> 1.3.5' gem 'will_paginate', '~> 3.3.1' diff --git a/Gemfile.lock b/Gemfile.lock index 3331e22df..f650258aa 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -72,8 +72,8 @@ GEM i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) + addressable (2.8.1) + public_suffix (>= 2.0.2, < 6.0) afm (0.2.2) bindex (0.8.1) bootsnap (1.12.0) @@ -120,7 +120,7 @@ GEM factory_bot_rails (6.2.0) factory_bot (~> 6.2.0) railties (>= 5.0.0) - faraday (1.10.0) + faraday (1.10.2) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) @@ -136,8 +136,8 @@ GEM faraday-em_synchrony (1.0.0) faraday-excon (1.1.0) faraday-httpclient (1.0.1) - faraday-multipart (1.0.3) - multipart-post (>= 1.2, < 3) + faraday-multipart (1.0.4) + multipart-post (~> 2) faraday-net_http (1.0.1) faraday-net_http_persistent (1.2.0) faraday-patron (1.0.0) @@ -234,7 +234,7 @@ GEM msgpack (1.5.2) multi_json (1.15.0) multi_xml (0.6.0) - multipart-post (2.1.1) + multipart-post (2.2.3) nenv (0.3.0) net-imap (0.2.3) digest @@ -276,7 +276,7 @@ GEM actionview octicons (= 17.2.0) railties - octokit (4.23.0) + octokit (4.25.1) faraday (>= 1, < 3) sawyer (~> 0.9) omniauth (2.1.0) @@ -307,7 +307,7 @@ GEM pry-byebug (3.9.0) byebug (~> 11.0) pry (~> 0.13.0) - public_suffix (4.0.7) + public_suffix (5.0.0) puma (5.6.4) nio4r (~> 2.0) racc (1.6.0) @@ -395,7 +395,7 @@ GEM sprockets (> 3.0) sprockets-rails tilt - sawyer (0.9.1) + sawyer (0.9.2) addressable (>= 2.3.5) faraday (>= 0.17.3, < 3) searchkick (5.0.3) @@ -487,7 +487,7 @@ DEPENDENCIES net-sftp (~> 2.1, >= 2.1.2) newrelic_rpm octicons_helper - octokit (~> 4.22) + octokit (~> 4.25) omniauth-orcid (~> 2.1.1) omniauth-rails_csrf_protection pdf-reader (~> 2.9.2) From ff25aff40c99ef3b959f93a12801876860334326 Mon Sep 17 00:00:00 2001 From: Jacob Schreiber Date: Sun, 2 Oct 2022 21:01:05 -0700 Subject: [PATCH 469/609] ADD requirement free accounts --- docs/review_criteria.md | 4 ++++ docs/submitting.md | 1 + 2 files changed, 5 insertions(+) diff --git a/docs/review_criteria.md b/docs/review_criteria.md index f88fe6e4b..ecda160c5 100644 --- a/docs/review_criteria.md +++ b/docs/review_criteria.md @@ -119,3 +119,7 @@ We ask that reviewers grade submissions in one of three categories: 1) Accept 2) As outlined in our author guidelines, submissions that rely upon a proprietary/closed source language or development environment are acceptable provided that they meet the other submission requirements and that you, the reviewer, are able to install the software & verify the functionality of the submission as required by our reviewer guidelines. If an open source or free variant of the programming language exists, feel free to encourage the submitting author to consider making their software compatible with the open source/free variant. + +### Where can I host the repository? + +We ask that repositories are hosted at a location that allows outside users to freely open issues and make pull requests, such as BitBucket or GitHub. Submissions will not be accepted if the repository is at a location where users must pay to open issues or make pull requests, or where accounts must be manually approved, regardless of if this approval is done by the owners of the repository or some other entity. diff --git a/docs/submitting.md b/docs/submitting.md index 987680c06..1032e8c17 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -7,6 +7,7 @@ But please read these instructions carefully for a streamlined submission. ## Submission requirements - The software must be open source as per the [OSI definition](https://opensource.org/osd). +- The software must be hosted at a location where users can open issues and submit pull requests for free and without manual approval of accounts. - The software must have an **obvious** research application. - You must be a major contributor to the software you are submitting, and have a GitHub account to participate in the review process. - Your paper must not focus on new research results accomplished with the software. From 469c1c792eba203e2052761dccb4ac08fb7b57ab Mon Sep 17 00:00:00 2001 From: Mehmet Hakan Satman Date: Fri, 7 Oct 2022 17:34:53 +0300 Subject: [PATCH 470/609] update editorial_bot doc --- docs/editorial_bot.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/editorial_bot.md b/docs/editorial_bot.md index 6ea82a770..94a6e2f2e 100644 --- a/docs/editorial_bot.md +++ b/docs/editorial_bot.md @@ -309,4 +309,7 @@ JOSS editors-in-chief can withdraw a submission with the following command: # Open the review issue @editorialbot start review +# Ping the EiCs for the current track +@editorialbot ping track-eic + ``` \ No newline at end of file From a75fb96b3402d97fb9789be5865b56130c6f85ed Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sat, 15 Oct 2022 11:50:18 +0100 Subject: [PATCH 471/609] Update docs/review_criteria.md Co-authored-by: Daniel S. Katz --- docs/review_criteria.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/review_criteria.md b/docs/review_criteria.md index ecda160c5..4acc1a7ea 100644 --- a/docs/review_criteria.md +++ b/docs/review_criteria.md @@ -122,4 +122,4 @@ If an open source or free variant of the programming language exists, feel free ### Where can I host the repository? -We ask that repositories are hosted at a location that allows outside users to freely open issues and make pull requests, such as BitBucket or GitHub. Submissions will not be accepted if the repository is at a location where users must pay to open issues or make pull requests, or where accounts must be manually approved, regardless of if this approval is done by the owners of the repository or some other entity. +We ask that repositories are hosted at a location that allows outside users to freely open issues and make pull requests, such as GitHub, GitLab, Bitbucket, etc. Submissions will not be accepted if the repository is at a location where users must pay to open issues or make pull requests, or where accounts must be manually approved, regardless of if this approval is done by the owners of the repository or some other entity. From 058b4c6095fffaf5cc455cfbca1df10c079a5b2e Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sat, 15 Oct 2022 11:53:27 +0100 Subject: [PATCH 472/609] Update review_criteria.md --- docs/review_criteria.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/review_criteria.md b/docs/review_criteria.md index 4acc1a7ea..224217608 100644 --- a/docs/review_criteria.md +++ b/docs/review_criteria.md @@ -122,4 +122,4 @@ If an open source or free variant of the programming language exists, feel free ### Where can I host the repository? -We ask that repositories are hosted at a location that allows outside users to freely open issues and make pull requests, such as GitHub, GitLab, Bitbucket, etc. Submissions will not be accepted if the repository is at a location where users must pay to open issues or make pull requests, or where accounts must be manually approved, regardless of if this approval is done by the owners of the repository or some other entity. +Repositories must be hosted at a location that allows outside users to freely open issues and propose changes, such as GitHub, GitLab, Bitbucket, etc. Submissions will not be accepted if the repository is hosted at a location where where accounts must be manually approved (or paid for), regardless of if this approval is done by the owners of the repository or some other entity. From 52b7ffda99ea4c39597a7ea0a352116f982dc2a2 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sat, 15 Oct 2022 11:54:21 +0100 Subject: [PATCH 473/609] Update submitting.md --- docs/submitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index 1032e8c17..bf3752198 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -7,7 +7,7 @@ But please read these instructions carefully for a streamlined submission. ## Submission requirements - The software must be open source as per the [OSI definition](https://opensource.org/osd). -- The software must be hosted at a location where users can open issues and submit pull requests for free and without manual approval of accounts. +- The software must be hosted at a location where users can open issues and propose changes without manual approval (or payment) of accounts. - The software must have an **obvious** research application. - You must be a major contributor to the software you are submitting, and have a GitHub account to participate in the review process. - Your paper must not focus on new research results accomplished with the software. From e3181efc127775556b84d33e562559cb7fbc0e42 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sat, 15 Oct 2022 11:54:46 +0100 Subject: [PATCH 474/609] Update review_criteria.md --- docs/review_criteria.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/review_criteria.md b/docs/review_criteria.md index 224217608..6ae77a18a 100644 --- a/docs/review_criteria.md +++ b/docs/review_criteria.md @@ -122,4 +122,4 @@ If an open source or free variant of the programming language exists, feel free ### Where can I host the repository? -Repositories must be hosted at a location that allows outside users to freely open issues and propose changes, such as GitHub, GitLab, Bitbucket, etc. Submissions will not be accepted if the repository is hosted at a location where where accounts must be manually approved (or paid for), regardless of if this approval is done by the owners of the repository or some other entity. +Repositories must be hosted at a location that allows outside users to freely open issues and propose code changes, such as GitHub, GitLab, Bitbucket, etc. Submissions will not be accepted if the repository is hosted at a location where where accounts must be manually approved (or paid for), regardless of if this approval is done by the owners of the repository or some other entity. From 50c58b059c50b958aabf2057d1d7954dca672b88 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sat, 15 Oct 2022 11:55:09 +0100 Subject: [PATCH 475/609] Update submitting.md --- docs/submitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index bf3752198..02ee8405f 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -7,7 +7,7 @@ But please read these instructions carefully for a streamlined submission. ## Submission requirements - The software must be open source as per the [OSI definition](https://opensource.org/osd). -- The software must be hosted at a location where users can open issues and propose changes without manual approval (or payment) of accounts. +- The software must be hosted at a location where users can open issues and propose code changes without manual approval (or payment) of accounts. - The software must have an **obvious** research application. - You must be a major contributor to the software you are submitting, and have a GitHub account to participate in the review process. - Your paper must not focus on new research results accomplished with the software. From 28e72e2fc8fe4e318d2e3ca4f821a902287cc384 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sat, 15 Oct 2022 12:01:46 +0100 Subject: [PATCH 476/609] Update submitting.md --- docs/submitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index 02ee8405f..c2ac2a3ae 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -7,7 +7,7 @@ But please read these instructions carefully for a streamlined submission. ## Submission requirements - The software must be open source as per the [OSI definition](https://opensource.org/osd). -- The software must be hosted at a location where users can open issues and propose code changes without manual approval (or payment) of accounts. +- The software must be hosted at a location where users can open issues and propose code changes without manual approval of (or payment for) accounts. - The software must have an **obvious** research application. - You must be a major contributor to the software you are submitting, and have a GitHub account to participate in the review process. - Your paper must not focus on new research results accomplished with the software. From 0b2735d8413465253d61c8d5b377fcfdac629df7 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sat, 15 Oct 2022 12:23:13 +0100 Subject: [PATCH 477/609] Email formatting --- .../notifications/notify_new_aeic.html.erb | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/app/views/notifications/notify_new_aeic.html.erb b/app/views/notifications/notify_new_aeic.html.erb index 2488f4e84..7a99f95dd 100644 --- a/app/views/notifications/notify_new_aeic.html.erb +++ b/app/views/notifications/notify_new_aeic.html.erb @@ -1,9 +1,10 @@ -A paper has just been moved to your track (<%= @new_track.name %>) from the <%= @old_track.name %> track. - -Title: <%= @paper.title %> -Repo: <%= @paper.repository_url %> - -View the paper here: <%= @url %> - -Thanks! +A paper has just been moved to your track (<%= @new_track.name %>) from the <%= @old_track.name %> track.
            +
            +Title: <%= @paper.title %>
            +Repo: <%= @paper.repository_url %>
            +
            +View the paper here: <%= @url %>
            +
            +
            +Thanks!
            The <%= Rails.application.settings['abbreviation'] %> editorial robot. From bd0f8f7037420f6915460a5cc34ed3210d852740 Mon Sep 17 00:00:00 2001 From: Ian Hunter Date: Sat, 15 Oct 2022 15:24:14 +0100 Subject: [PATCH 478/609] Update to new checkout version Removes Node js upgrade warning --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e45dba738..5c736d107 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,7 +11,7 @@ jobs: POSTGRES_USER: postgres POSTGRES_PASSWORD: secret steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install Ruby uses: ruby/setup-ruby@v1 with: From a19f059133c9e5970c5b3d87b3304fdb761052c4 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 16 Oct 2022 19:53:13 +0100 Subject: [PATCH 479/609] Adding some notes about editor SLAs --- docs/submitting.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/submitting.md b/docs/submitting.md index c2ac2a3ae..60f907ed6 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -332,17 +332,21 @@ After submission: - An Associate Editor-in-Chief will carry out an initial check of your submission, and proceed to assign a handling editor. - The handling editor will assign two or more JOSS reviewers, and the review will be carried out in the [JOSS reviews repository](https://github.com/openjournals/joss-reviews). -- Authors will respond to reviewer-raised issues (if any are raised) on the submission repository's issue tracker. Reviewer and editor contributions, like any other contributions, should be acknowledged in the repository. +- Authors will respond to reviewer-raised issues (if any are raised) on the submission repository's issue tracker. Reviewer and editor contributions, like any other contributions, should be acknowledged in the repository. +- **JOSS reviews are iterative and conversational in nature.** Reviewers are encouraged to post comments/questions/suggestions in the review thread as they arise, and authors expected to respond in a timely fashion. +- Authors and reviewers are asked to be patient when waiting for a response from an editor. Please allow two weeks for an editor to respond to a question before prompting them for further action. - Upon successful completion of the review, authors will make a tagged release of the software, and deposit a copy of the repository with a data-archiving service such as [Zenodo](https://zenodo.org/) or [figshare](https://figshare.com/), get a DOI for the archive, and update the review issue thread with the version number and DOI. - After we assign a DOI for your accepted JOSS paper, its metadata is deposited with CrossRef and listed on the JOSS website. - The review issue will be closed, and an automatic tweet from [@JOSS_TheOJ](https://twitter.com/JOSS_TheOJ) will announce it! If you want to learn more details about the review process, take a look at the [reviewer guidelines](reviewer_guidelines). +### A note about + ## Confidential requests Please write admin@theoj.org with confidential matters such as retraction requests, report of misconduct, and retroactive author name changes. In case of a name change, the DOI will be unchanged and the paper will be updated without publishing a correction notice or notifying co-authors. -JOSS will also update CrossRef metadata. +JOSS will also update CrosrRef metadata. From 78a45d8081e9e7b95f71213c6c973d3ef5dce6c2 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 17 Oct 2022 20:38:44 +0100 Subject: [PATCH 480/609] Labels need to show up on pre pre-review issues --- app/helpers/home_helper.rb | 7 +++++-- app/models/track.rb | 23 +++++++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/app/helpers/home_helper.rb b/app/helpers/home_helper.rb index 4ea6f22c5..7cfec47c4 100644 --- a/app/helpers/home_helper.rb +++ b/app/helpers/home_helper.rb @@ -1,7 +1,10 @@ module HomeHelper def pretty_labels_for(paper) - return nil unless paper.labels.any? - + if paper.labels.empty? + return nil unless paper.track + concat content_tag(:span, paper.track.label, style: "padding: 3px; margin-right: 3px; border-radius: 2px; background-color: ##{paper.track.label_color}; color: #000000;") + end + capture do paper.labels.each do |label, colour| if label == "paused" diff --git a/app/models/track.rb b/app/models/track.rb index 2c6d96e12..99c8bbf1b 100644 --- a/app/models/track.rb +++ b/app/models/track.rb @@ -31,6 +31,29 @@ def name_with_short_name "#{name} (#{short_name})" end + def label_color + case short_name.downcase + when "aass" + "D4C5F9" + when "bcm" + "44D276" + when "csism" + "2B613B" + when "dsais" + "fc7484" + when "ese" + "FBCA04" + when "misc" + "5AD5D0" + when "pe" + "D07786" + when "sbcs" + "e374fc" + else + "3c3c3c" + end + end + def parameterized_short_name short_name.gsub(/[^a-z0-9\-_]+/i, "-").downcase end From 8dc7a63190b351cdb8084547cd1d0d185db612fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 21 Oct 2022 09:59:54 +0200 Subject: [PATCH 481/609] Update nokogiri --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index f650258aa..223b3514b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -255,12 +255,12 @@ GEM net-ssh (6.1.0) newrelic_rpm (8.7.0) nio4r (2.5.8) - nokogiri (1.13.8) + nokogiri (1.13.9) mini_portile2 (~> 2.8.0) racc (~> 1.4) - nokogiri (1.13.8-x86_64-darwin) + nokogiri (1.13.9-x86_64-darwin) racc (~> 1.4) - nokogiri (1.13.8-x86_64-linux) + nokogiri (1.13.9-x86_64-linux) racc (~> 1.4) notiffany (0.1.3) nenv (~> 0.1) From 6397ef5b49758391325da3aa3ffce83471c194ca Mon Sep 17 00:00:00 2001 From: "Daniel S. Katz" Date: Tue, 25 Oct 2022 14:07:24 -0500 Subject: [PATCH 482/609] fixing suggested message from editor to author at the end of the review --- docs/editing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/editing.md b/docs/editing.md index cc474709b..58b1f7071 100644 --- a/docs/editing.md +++ b/docs/editing.md @@ -245,7 +245,7 @@ At this point could you: - [ ] Check the archival deposit (e.g., in Zenodo) has the correct metadata. This includes the title (should match the paper title) and author list (make sure the list is correct and people who only made a small fix are not on it). You may also add the authors' ORCID. - [ ] Please list the DOI of the archived version here. -I can then move forward with accepting the submission. +I can then move forward with recommending acceptance of the submission. ``` ### From 9704be1f838fa406d49726e35b338f152b2c3ca8 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sat, 29 Oct 2022 17:18:21 +0100 Subject: [PATCH 483/609] Fixes #1151 --- app/views/shared/_editor.html.erb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/shared/_editor.html.erb b/app/views/shared/_editor.html.erb index 9c354c2a0..bcb950dec 100644 --- a/app/views/shared/_editor.html.erb +++ b/app/views/shared/_editor.html.erb @@ -12,7 +12,11 @@ <%- unless editor.retired? %>
            - <%- if editor.board? %><%= editor.title %><%- else %>Editor<%- end %><%- if editor.categories.present? %>: <%= editor.category_list %><%- end %> + <%- if editor.board? %> + <%= editor.title %> + <%- else %> + Editor <%- if editor.categories.present? %>: <%= editor.category_list %><%- end %> + <%- end %>

            <%= editor.description.html_safe %>

            <%- end %> From a11d49cce949c75b4c7ca9fc75d008cd99f73693 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 31 Oct 2022 10:44:33 +0000 Subject: [PATCH 484/609] Check twice per week during pre-review --- docs/editing.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/editing.md b/docs/editing.md index 58b1f7071..614674849 100644 --- a/docs/editing.md +++ b/docs/editing.md @@ -316,7 +316,12 @@ As documented above, usually, papers will be assigned to you by one of the AEiCs ### Continued attention to assigned submissions -As an editor, part of your role is to ensure that submissions you're responsible for are progressing smoothly through the editorial process. This means that once or twice per week we ask that you check your GitHub notifications and/or your editorial dashboard (e.g. `http://joss.theoj.org/dashboard/youreditorname`) for updates to the papers you are handling. +As an editor, part of your role is to ensure that submissions you're responsible for are progressing smoothly through the editorial process. This means that: + +- During pre-review, and before reviewers have been identified, editors should be checking on their submissions twice per week to ensure reviewers are identified in a timely fashion. +- During review, editors should check on their submissions once or twice per week to see if their input is required. + +Your editorial dashboard (e.g. `https://joss.theoj.org/dashboard/youreditorname`) is the best place to check if there have been any updates to the papers you are editing. **If reviews go stale** From a1f00bc0bf1e770646b1c7c0637796807d795201 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sat, 19 Nov 2022 08:03:22 -0500 Subject: [PATCH 485/609] Setting expectations --- app/views/notifications/author_submission_email.html.erb | 2 +- app/views/notifications/author_submission_email.text.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/notifications/author_submission_email.html.erb b/app/views/notifications/author_submission_email.html.erb index f113b3876..3da371d8d 100644 --- a/app/views/notifications/author_submission_email.html.erb +++ b/app/views/notifications/author_submission_email.html.erb @@ -1,6 +1,6 @@ Hello there, thanks for your submission to <%= Rails.application.settings['abbreviation'] %>.
            -Your paper, '<%= @paper.title %>', is currently awaiting triage by our managing editor. This generally takes between 24 and 72 hours and until then, your paper won't show up in the https://github.com/<%= Rails.application.settings['reviews'] %> repository. +Your paper, '<%= @paper.title %>', is currently awaiting triage by our managing editor. This generally takes up to a week and until then, your paper won't show up in the https://github.com/<%= Rails.application.settings['reviews'] %> repository.
            You can view the latest status of your paper here: <%= @url %> diff --git a/app/views/notifications/author_submission_email.text.erb b/app/views/notifications/author_submission_email.text.erb index 960c5868a..29cc513fe 100644 --- a/app/views/notifications/author_submission_email.text.erb +++ b/app/views/notifications/author_submission_email.text.erb @@ -1,6 +1,6 @@ Hello there, thanks for your submission to <%= Rails.application.settings['abbreviation'] %>. -Your paper, '<%= @paper.title %>', is currently awaiting triage by our managing editor. This generally takes between 24 and 72 hours and until then, your paper won't show up in the https://github.com/<%= Rails.application.settings['reviews'] %> repository. +Your paper, '<%= @paper.title %>', is currently awaiting triage by our managing editor. This generally takes up to a week and until then, your paper won't show up in the https://github.com/<%= Rails.application.settings['reviews'] %> repository. You can view the latest status of your paper here: <%= @url %> From 7afd7178e0ca13b97d5de3bc5679d87c4bddba8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 24 Nov 2022 12:31:19 +0100 Subject: [PATCH 486/609] Don't error on nil settings --- lib/settings_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/settings_helper.rb b/lib/settings_helper.rb index 8808aed55..c9df38fc5 100644 --- a/lib/settings_helper.rb +++ b/lib/settings_helper.rb @@ -1,5 +1,5 @@ module SettingsHelper def setting(*paths) - Rails.application.settings.dig(*paths).html_safe + Rails.application.settings.dig(*paths)&.html_safe end end From 21e320dead0fd0c6fe6927c0b2695322a93614be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 24 Nov 2022 12:31:49 +0100 Subject: [PATCH 487/609] Add Mastodon account --- config/settings-development.yml | 1 + config/settings-production.yml | 1 + config/settings-test.yml | 1 + docs/submitting.md | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/config/settings-development.yml b/config/settings-development.yml index 36c7a1dda..8787c2176 100644 --- a/config/settings-development.yml +++ b/config/settings-development.yml @@ -8,6 +8,7 @@ url: "http://0.0.0.0:3000" editor_email: "joss.theoj@gmail.com" noreply_email: "noreply@joss.theoj.org" twitter: "@JOSS_TheOJ" +mastodon_url: "https://fosstodon.org/@JOSS" google_analytics: "UA-47852178-4" github: "openjournals/joss" reviews: "openjournals/joss-reviews-testing" diff --git a/config/settings-production.yml b/config/settings-production.yml index b251986e1..9a9438834 100644 --- a/config/settings-production.yml +++ b/config/settings-production.yml @@ -8,6 +8,7 @@ url: "https://joss.theoj.org" editor_email: "admin@theoj.org" noreply_email: "admin@theoj.org" twitter: "@JOSS_TheOJ" +mastodon_url: "https://fosstodon.org/@JOSS" google_analytics: "UA-47852178-4" github: "openjournals/joss" reviews: "openjournals/joss-reviews" diff --git a/config/settings-test.yml b/config/settings-test.yml index 6a3ced2fa..486537435 100644 --- a/config/settings-test.yml +++ b/config/settings-test.yml @@ -8,6 +8,7 @@ url: "http://joss.theoj.org" editor_email: "joss.theoj@gmail.com" noreply_email: "noreply@joss.theoj.org" twitter: "@JOSS_TheOJ" +mastodon_url: "https://fosstodon.org/@JOSS" google_analytics: "UA-47852178-4" github: "openjournals/joss" reviews: "openjournals/joss-reviews-testing" diff --git a/docs/submitting.md b/docs/submitting.md index c2ac2a3ae..2dae052a2 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -335,7 +335,7 @@ After submission: - Authors will respond to reviewer-raised issues (if any are raised) on the submission repository's issue tracker. Reviewer and editor contributions, like any other contributions, should be acknowledged in the repository. - Upon successful completion of the review, authors will make a tagged release of the software, and deposit a copy of the repository with a data-archiving service such as [Zenodo](https://zenodo.org/) or [figshare](https://figshare.com/), get a DOI for the archive, and update the review issue thread with the version number and DOI. - After we assign a DOI for your accepted JOSS paper, its metadata is deposited with CrossRef and listed on the JOSS website. -- The review issue will be closed, and an automatic tweet from [@JOSS_TheOJ](https://twitter.com/JOSS_TheOJ) will announce it! +- The review issue will be closed, and automatic posts from [@JOSS_TheOJ at Twitter](https://twitter.com/JOSS_TheOJ) and [@JOSS at Mastodon](https://fosstodon.org/@joss) will announce it! If you want to learn more details about the review process, take a look at the [reviewer guidelines](reviewer_guidelines). From 7774ad7b4c2087b055dd7729e690b7abaa5abfd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 24 Nov 2022 12:32:19 +0100 Subject: [PATCH 488/609] Link social media from about/contact page --- app/helpers/application_helper.rb | 7 +++++++ app/views/home/about.html.erb | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 4e69a1c9c..c42388d14 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -53,4 +53,11 @@ def scope_link_for_issue(github_issue) return "" unless paper return url_for(paper) end + + def social_media_links + links = [] + links << link_to("Twitter", "https://twitter.com/#{setting(:twitter)}", target: "_blank").html_safe if setting(:twitter).present? + links << link_to("Mastodon", setting(:mastodon_url), target: "_blank", rel: "me").html_safe if setting(:mastodon_url).present? + links + end end diff --git a/app/views/home/about.html.erb b/app/views/home/about.html.erb index 0db5cdadf..fd6859453 100644 --- a/app/views/home/about.html.erb +++ b/app/views/home/about.html.erb @@ -70,6 +70,12 @@

            To suggest a feature, report a bug, or enquire about a possible submission in <%= setting(:abbreviation) %>, please open a GitHub Issue. If you need to contact <%= setting(:abbreviation) %> privately then you can <%= mail_to "admin@theoj.org", "email us" %>.

            + <% unless social_media_links.empty? %> +

            + You can also find <%= setting(:abbreviation) %> at + <%= social_media_links.join(" and ").html_safe %> +

            + <% end %>
            From 60194453971a14e218ef5291165e4ed4606e369b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 24 Nov 2022 12:38:15 +0100 Subject: [PATCH 489/609] Add title to links --- app/helpers/application_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index c42388d14..8d22a924b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -56,8 +56,8 @@ def scope_link_for_issue(github_issue) def social_media_links links = [] - links << link_to("Twitter", "https://twitter.com/#{setting(:twitter)}", target: "_blank").html_safe if setting(:twitter).present? - links << link_to("Mastodon", setting(:mastodon_url), target: "_blank", rel: "me").html_safe if setting(:mastodon_url).present? + links << link_to("Twitter", "https://twitter.com/#{setting(:twitter)}", target: "_blank", title: "#{setting(:twitter)}").html_safe if setting(:twitter).present? + links << link_to("Mastodon", setting(:mastodon_url), target: "_blank", rel: "me", title: "#{setting(:mastodon_url)}").html_safe if setting(:mastodon_url).present? links end end From bf75d9c7405f4a23c34647df92057ac9c7e29961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 8 Dec 2022 11:57:54 +0100 Subject: [PATCH 490/609] Update dependencies --- Gemfile | 2 +- Gemfile.lock | 152 +++++++++++++++++++++++++-------------------------- 2 files changed, 76 insertions(+), 78 deletions(-) diff --git a/Gemfile b/Gemfile index 89e1097d5..20a88ef72 100644 --- a/Gemfile +++ b/Gemfile @@ -16,7 +16,7 @@ gem 'omniauth-orcid', '~> 2.1.1' gem 'omniauth-rails_csrf_protection' gem 'octokit', '~> 4.25' gem 'pdf-reader', '~> 2.9.2' -gem 'pg', '~> 1.3.5' +gem 'pg', '~> 1.4.5' gem 'will_paginate', '~> 3.3.1' gem 'rails', '7.0.4' gem "importmap-rails" diff --git a/Gemfile.lock b/Gemfile.lock index 223b3514b..5e571bce0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -76,11 +76,11 @@ GEM public_suffix (>= 2.0.2, < 6.0) afm (0.2.2) bindex (0.8.1) - bootsnap (1.12.0) + bootsnap (1.15.0) msgpack (~> 1.2) builder (3.2.4) byebug (11.1.3) - capybara (3.37.1) + capybara (3.38.0) addressable matrix mini_mime (>= 0.1.3) @@ -89,17 +89,15 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - chartkick (4.1.3) - childprocess (4.1.0) + chartkick (4.2.1) coderay (1.1.3) - commonmarker (0.23.4) + commonmarker (0.23.6) concurrent-ruby (1.1.10) crack (0.4.5) rexml crass (1.0.6) declarative (0.0.20) diff-lcs (1.5.0) - digest (3.1.0) dotenv (2.7.6) elasticsearch (7.13.3) elasticsearch-api (= 7.13.3) @@ -147,7 +145,7 @@ GEM formatador (1.1.0) globalid (1.0.0) activesupport (>= 5.0) - google-apis-core (0.5.0) + google-apis-core (0.9.1) addressable (~> 2.5, >= 2.5.1) googleauth (>= 0.16.2, < 2.a) httpclient (>= 2.8.1, < 3.a) @@ -156,10 +154,10 @@ GEM retriable (>= 2.0, < 4.a) rexml webrick - google-apis-drive_v3 (0.22.0) - google-apis-core (>= 0.4, < 2.a) - google-apis-sheets_v4 (0.13.0) - google-apis-core (>= 0.4, < 2.a) + google-apis-drive_v3 (0.32.0) + google-apis-core (>= 0.9.1, < 2.a) + google-apis-sheets_v4 (0.20.0) + google-apis-core (>= 0.9.1, < 2.a) google_drive (3.0.7) google-apis-drive_v3 (>= 0.5.0, < 1.0.0) google-apis-sheets_v4 (>= 0.4.0, < 1.0.0) @@ -192,15 +190,15 @@ GEM hashdiff (1.0.1) hashery (2.1.2) hashie (5.0.0) - honeybadger (4.12.1) - html-pipeline (2.14.1) + honeybadger (4.12.2) + html-pipeline (2.14.3) activesupport (>= 2) nokogiri (>= 1.4) http_parser.rb (0.8.0) httpclient (2.8.3) i18n (1.12.0) concurrent-ruby (~> 1.0) - importmap-rails (1.1.0) + importmap-rails (1.1.5) actionpack (>= 6.0.0) railties (>= 6.0.0) issue (1.0.0) @@ -209,72 +207,70 @@ GEM jbuilder (2.11.5) actionview (>= 5.0.0) activesupport (>= 5.0.0) - jwt (2.3.0) + jwt (2.5.0) libv8-node (16.10.0.0) libv8-node (16.10.0.0-x86_64-darwin) libv8-node (16.10.0.0-x86_64-linux) listen (3.7.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.18.0) + loofah (2.19.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) lumberjack (1.2.8) - mail (2.7.1) + mail (2.8.0) mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp marcel (1.0.2) matrix (0.4.2) memoist (0.16.2) method_source (1.0.0) mini_mime (1.1.2) mini_portile2 (2.8.0) - mini_racer (0.6.2) + mini_racer (0.6.3) libv8-node (~> 16.10.0.0) minitest (5.16.3) - msgpack (1.5.2) + msgpack (1.6.0) multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.2.3) nenv (0.3.0) - net-imap (0.2.3) - digest + net-imap (0.3.1) net-protocol - strscan - net-pop (0.1.1) - digest + net-pop (0.1.2) net-protocol - timeout - net-protocol (0.1.3) + net-protocol (0.2.1) timeout net-sftp (2.1.2) net-ssh (>= 2.6.5) - net-smtp (0.3.1) - digest + net-smtp (0.3.3) net-protocol - timeout - net-ssh (6.1.0) - newrelic_rpm (8.7.0) + net-ssh (7.0.1) + newrelic_rpm (8.13.1) nio4r (2.5.8) - nokogiri (1.13.9) + nokogiri (1.13.10) mini_portile2 (~> 2.8.0) racc (~> 1.4) - nokogiri (1.13.9-x86_64-darwin) + nokogiri (1.13.10-x86_64-darwin) racc (~> 1.4) - nokogiri (1.13.9-x86_64-linux) + nokogiri (1.13.10-x86_64-linux) racc (~> 1.4) notiffany (0.1.3) nenv (~> 0.1) shellany (~> 0.0) - oauth2 (1.4.9) + oauth2 (2.0.9) faraday (>= 0.17.3, < 3.0) jwt (>= 1.0, < 3.0) - multi_json (~> 1.3) multi_xml (~> 0.5) - rack (>= 1.2, < 3) - octicons (17.2.0) - octicons_helper (17.2.0) + rack (>= 1.2, < 4) + snaky_hash (~> 2.0) + version_gem (~> 1.1) + octicons (17.9.0) + octicons_helper (17.9.0) actionview - octicons (= 17.2.0) + octicons (= 17.9.0) railties octokit (4.25.1) faraday (>= 1, < 3) @@ -283,16 +279,16 @@ GEM hashie (>= 3.4.6) rack (>= 2.2.3) rack-protection - omniauth-oauth2 (1.7.2) - oauth2 (~> 1.4) - omniauth (>= 1.9, < 3) + omniauth-oauth2 (1.8.0) + oauth2 (>= 1.4, < 3) + omniauth (~> 2.0) omniauth-orcid (2.1.1) omniauth-oauth2 (~> 1.3) ruby_dig (~> 0.0.2) omniauth-rails_csrf_protection (1.0.1) actionpack (>= 4.2) omniauth (~> 2.0) - openssl (3.0.0) + openssl (3.0.1) os (1.1.4) pdf-reader (2.9.2) Ascii85 (~> 1.0) @@ -300,21 +296,21 @@ GEM hashery (~> 2.0) ruby-rc4 ttfunk - pg (1.3.5) - pry (0.13.1) + pg (1.4.5) + pry (0.14.1) coderay (~> 1.1) method_source (~> 1.0) - pry-byebug (3.9.0) + pry-byebug (3.10.1) byebug (~> 11.0) - pry (~> 0.13.0) - public_suffix (5.0.0) - puma (5.6.4) + pry (>= 0.13, < 0.15) + public_suffix (5.0.1) + puma (6.0.0) nio4r (~> 2.0) - racc (1.6.0) + racc (1.6.1) rack (2.2.4) rack-livereload (0.3.17) rack - rack-protection (2.2.0) + rack-protection (3.0.4) rack rack-test (2.0.2) rack (>= 1.3) @@ -349,11 +345,11 @@ GEM thor (~> 1.0) zeitwerk (~> 2.5) rake (13.0.6) - rb-fsevent (0.11.1) + rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) - redis (4.6.0) - regexp_parser (2.5.0) + redis (4.8.0) + regexp_parser (2.6.1) representable (3.2.0) declarative (< 0.1.0) trailblazer-option (>= 0.1.1, < 0.2.0) @@ -363,14 +359,14 @@ GEM railties (>= 5.0) retriable (3.1.2) rexml (3.2.5) - rspec-core (3.11.0) - rspec-support (~> 3.11.0) - rspec-expectations (3.11.0) + rspec-core (3.12.0) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) - rspec-mocks (3.11.1) + rspec-support (~> 3.12.0) + rspec-mocks (3.12.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) + rspec-support (~> 3.12.0) rspec-rails (5.1.2) actionpack (>= 5.2) activesupport (>= 5.2) @@ -379,7 +375,7 @@ GEM rspec-expectations (~> 3.10) rspec-mocks (~> 3.10) rspec-support (~> 3.10) - rspec-support (3.11.0) + rspec-support (3.12.0) ruby-rc4 (0.1.5) ruby2_keywords (0.0.5) ruby_dig (0.0.2) @@ -398,39 +394,40 @@ GEM sawyer (0.9.2) addressable (>= 2.3.5) faraday (>= 0.17.3, < 3) - searchkick (5.0.3) + searchkick (5.1.1) activemodel (>= 5.2) hashie - selenium-webdriver (4.2.0) - childprocess (>= 0.5, < 5.0) + selenium-webdriver (4.7.1) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) shellany (0.0.1) - signet (0.16.1) + signet (0.17.0) addressable (~> 2.8) - faraday (>= 0.17.5, < 3.0) + faraday (>= 0.17.5, < 3.a) jwt (>= 1.5, < 3.0) multi_json (~> 1.10) - spring (4.0.0) + snaky_hash (2.0.1) + hashie + version_gem (~> 1.1, >= 1.1.1) + spring (4.1.0) spring-commands-rspec (1.0.4) spring (>= 0.9.1) - sprockets (4.0.3) + sprockets (4.1.1) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.4.2) actionpack (>= 5.2) activesupport (>= 5.2) sprockets (>= 3.0.0) - stimulus-rails (1.0.4) + stimulus-rails (1.2.1) railties (>= 6.0.0) - strscan (3.0.4) thor (1.2.1) - tilt (2.0.10) - timeout (0.3.0) + tilt (2.0.11) + timeout (0.3.1) trailblazer-option (0.1.2) ttfunk (1.7.0) - turbo-rails (1.1.1) + turbo-rails (1.3.2) actionpack (>= 6.0.0) activejob (>= 6.0.0) railties (>= 6.0.0) @@ -440,12 +437,13 @@ GEM uglifier (4.2.0) execjs (>= 0.3.0, < 3) vcr (6.1.0) + version_gem (1.1.1) web-console (4.2.0) actionview (>= 6.0.0) activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webmock (3.14.0) + webmock (3.18.1) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) @@ -457,7 +455,7 @@ GEM will_paginate (3.3.1) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.6.0) + zeitwerk (2.6.6) PLATFORMS ruby @@ -491,7 +489,7 @@ DEPENDENCIES omniauth-orcid (~> 2.1.1) omniauth-rails_csrf_protection pdf-reader (~> 2.9.2) - pg (~> 1.3.5) + pg (~> 1.4.5) pry-byebug puma rack-livereload From cfa32189cced5ab420647408f7a68e5dced2691a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 14 Dec 2022 10:57:21 +0100 Subject: [PATCH 491/609] Bundle update several sec-fixes --- Gemfile.lock | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5e571bce0..d88247ea7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -96,6 +96,7 @@ GEM crack (0.4.5) rexml crass (1.0.6) + date (3.3.1) declarative (0.0.20) diff-lcs (1.5.0) dotenv (2.7.6) @@ -145,7 +146,7 @@ GEM formatador (1.1.0) globalid (1.0.0) activesupport (>= 5.0) - google-apis-core (0.9.1) + google-apis-core (0.9.2) addressable (~> 2.5, >= 2.5.1) googleauth (>= 0.16.2, < 2.a) httpclient (>= 2.8.1, < 3.a) @@ -214,7 +215,7 @@ GEM listen (3.7.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.19.0) + loofah (2.19.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) lumberjack (1.2.8) @@ -237,7 +238,8 @@ GEM multi_xml (0.6.0) multipart-post (2.2.3) nenv (0.3.0) - net-imap (0.3.1) + net-imap (0.3.2) + date net-protocol net-pop (0.1.2) net-protocol @@ -267,10 +269,10 @@ GEM rack (>= 1.2, < 4) snaky_hash (~> 2.0) version_gem (~> 1.1) - octicons (17.9.0) - octicons_helper (17.9.0) + octicons (17.10.0) + octicons_helper (17.10.0) actionview - octicons (= 17.9.0) + octicons (= 17.10.0) railties octokit (4.25.1) faraday (>= 1, < 3) @@ -335,8 +337,8 @@ GEM rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.4.3) - loofah (~> 2.3) + rails-html-sanitizer (1.4.4) + loofah (~> 2.19, >= 2.19.1) railties (7.0.4) actionpack (= 7.0.4) activesupport (= 7.0.4) @@ -364,7 +366,7 @@ GEM rspec-expectations (3.12.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-mocks (3.12.0) + rspec-mocks (3.12.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-rails (5.1.2) From 216ed86ee7c77a069a51aba65017a948a331b1e6 Mon Sep 17 00:00:00 2001 From: Neil Shephard Date: Sat, 17 Dec 2022 21:03:52 +0000 Subject: [PATCH 492/609] Removing word duplication --- docs/review_criteria.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/review_criteria.md b/docs/review_criteria.md index 6ae77a18a..3bd3d2d0a 100644 --- a/docs/review_criteria.md +++ b/docs/review_criteria.md @@ -122,4 +122,4 @@ If an open source or free variant of the programming language exists, feel free ### Where can I host the repository? -Repositories must be hosted at a location that allows outside users to freely open issues and propose code changes, such as GitHub, GitLab, Bitbucket, etc. Submissions will not be accepted if the repository is hosted at a location where where accounts must be manually approved (or paid for), regardless of if this approval is done by the owners of the repository or some other entity. +Repositories must be hosted at a location that allows outside users to freely open issues and propose code changes, such as GitHub, GitLab, Bitbucket, etc. Submissions will not be accepted if the repository is hosted at a location where accounts must be manually approved (or paid for), regardless of if this approval is done by the owners of the repository or some other entity. From 0ed23ec070e89c8657f5902cbc9733abd75633a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 18 Jan 2023 13:14:58 +0100 Subject: [PATCH 493/609] Update Rails version --- Gemfile | 2 +- Gemfile.lock | 132 +++++++++++++++++++++++++-------------------------- 2 files changed, 67 insertions(+), 67 deletions(-) diff --git a/Gemfile b/Gemfile index 20a88ef72..ab60fb1ad 100644 --- a/Gemfile +++ b/Gemfile @@ -18,7 +18,7 @@ gem 'octokit', '~> 4.25' gem 'pdf-reader', '~> 2.9.2' gem 'pg', '~> 1.4.5' gem 'will_paginate', '~> 3.3.1' -gem 'rails', '7.0.4' +gem 'rails', '7.0.4.1' gem "importmap-rails" gem "turbo-rails" gem "stimulus-rails" diff --git a/Gemfile.lock b/Gemfile.lock index d88247ea7..957956afd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,47 +4,47 @@ GEM Ascii85 (1.1.0) aasm (5.2.0) concurrent-ruby (~> 1.0) - actioncable (7.0.4) - actionpack (= 7.0.4) - activesupport (= 7.0.4) + actioncable (7.0.4.1) + actionpack (= 7.0.4.1) + activesupport (= 7.0.4.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.4) - actionpack (= 7.0.4) - activejob (= 7.0.4) - activerecord (= 7.0.4) - activestorage (= 7.0.4) - activesupport (= 7.0.4) + actionmailbox (7.0.4.1) + actionpack (= 7.0.4.1) + activejob (= 7.0.4.1) + activerecord (= 7.0.4.1) + activestorage (= 7.0.4.1) + activesupport (= 7.0.4.1) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.4) - actionpack (= 7.0.4) - actionview (= 7.0.4) - activejob (= 7.0.4) - activesupport (= 7.0.4) + actionmailer (7.0.4.1) + actionpack (= 7.0.4.1) + actionview (= 7.0.4.1) + activejob (= 7.0.4.1) + activesupport (= 7.0.4.1) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.4) - actionview (= 7.0.4) - activesupport (= 7.0.4) + actionpack (7.0.4.1) + actionview (= 7.0.4.1) + activesupport (= 7.0.4.1) rack (~> 2.0, >= 2.2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.4) - actionpack (= 7.0.4) - activerecord (= 7.0.4) - activestorage (= 7.0.4) - activesupport (= 7.0.4) + actiontext (7.0.4.1) + actionpack (= 7.0.4.1) + activerecord (= 7.0.4.1) + activestorage (= 7.0.4.1) + activesupport (= 7.0.4.1) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.4) - activesupport (= 7.0.4) + actionview (7.0.4.1) + activesupport (= 7.0.4.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -52,22 +52,22 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (7.0.4) - activesupport (= 7.0.4) + activejob (7.0.4.1) + activesupport (= 7.0.4.1) globalid (>= 0.3.6) - activemodel (7.0.4) - activesupport (= 7.0.4) - activerecord (7.0.4) - activemodel (= 7.0.4) - activesupport (= 7.0.4) - activestorage (7.0.4) - actionpack (= 7.0.4) - activejob (= 7.0.4) - activerecord (= 7.0.4) - activesupport (= 7.0.4) + activemodel (7.0.4.1) + activesupport (= 7.0.4.1) + activerecord (7.0.4.1) + activemodel (= 7.0.4.1) + activesupport (= 7.0.4.1) + activestorage (7.0.4.1) + actionpack (= 7.0.4.1) + activejob (= 7.0.4.1) + activerecord (= 7.0.4.1) + activesupport (= 7.0.4.1) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.4) + activesupport (7.0.4.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -96,7 +96,7 @@ GEM crack (0.4.5) rexml crass (1.0.6) - date (3.3.1) + date (3.3.3) declarative (0.0.20) diff-lcs (1.5.0) dotenv (2.7.6) @@ -111,7 +111,7 @@ GEM em-websocket (0.5.3) eventmachine (>= 0.12.9) http_parser.rb (~> 0) - erubi (1.11.0) + erubi (1.12.0) eventmachine (1.2.7) execjs (2.8.1) factory_bot (6.2.1) @@ -144,7 +144,7 @@ GEM faraday-retry (1.0.3) ffi (1.15.5) formatador (1.1.0) - globalid (1.0.0) + globalid (1.0.1) activesupport (>= 5.0) google-apis-core (0.9.2) addressable (~> 2.5, >= 2.5.1) @@ -219,7 +219,7 @@ GEM crass (~> 1.0.2) nokogiri (>= 1.5.9) lumberjack (1.2.8) - mail (2.8.0) + mail (2.8.0.1) mini_mime (>= 0.1.1) net-imap net-pop @@ -229,16 +229,16 @@ GEM memoist (0.16.2) method_source (1.0.0) mini_mime (1.1.2) - mini_portile2 (2.8.0) + mini_portile2 (2.8.1) mini_racer (0.6.3) libv8-node (~> 16.10.0.0) - minitest (5.16.3) + minitest (5.17.0) msgpack (1.6.0) multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.2.3) nenv (0.3.0) - net-imap (0.3.2) + net-imap (0.3.4) date net-protocol net-pop (0.1.2) @@ -252,12 +252,12 @@ GEM net-ssh (7.0.1) newrelic_rpm (8.13.1) nio4r (2.5.8) - nokogiri (1.13.10) + nokogiri (1.14.0) mini_portile2 (~> 2.8.0) racc (~> 1.4) - nokogiri (1.13.10-x86_64-darwin) + nokogiri (1.14.0-x86_64-darwin) racc (~> 1.4) - nokogiri (1.13.10-x86_64-linux) + nokogiri (1.14.0-x86_64-linux) racc (~> 1.4) notiffany (0.1.3) nenv (~> 0.1) @@ -308,28 +308,28 @@ GEM public_suffix (5.0.1) puma (6.0.0) nio4r (~> 2.0) - racc (1.6.1) - rack (2.2.4) + racc (1.6.2) + rack (2.2.6.2) rack-livereload (0.3.17) rack rack-protection (3.0.4) rack rack-test (2.0.2) rack (>= 1.3) - rails (7.0.4) - actioncable (= 7.0.4) - actionmailbox (= 7.0.4) - actionmailer (= 7.0.4) - actionpack (= 7.0.4) - actiontext (= 7.0.4) - actionview (= 7.0.4) - activejob (= 7.0.4) - activemodel (= 7.0.4) - activerecord (= 7.0.4) - activestorage (= 7.0.4) - activesupport (= 7.0.4) + rails (7.0.4.1) + actioncable (= 7.0.4.1) + actionmailbox (= 7.0.4.1) + actionmailer (= 7.0.4.1) + actionpack (= 7.0.4.1) + actiontext (= 7.0.4.1) + actionview (= 7.0.4.1) + activejob (= 7.0.4.1) + activemodel (= 7.0.4.1) + activerecord (= 7.0.4.1) + activestorage (= 7.0.4.1) + activesupport (= 7.0.4.1) bundler (>= 1.15.0) - railties (= 7.0.4) + railties (= 7.0.4.1) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -339,9 +339,9 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.4.4) loofah (~> 2.19, >= 2.19.1) - railties (7.0.4) - actionpack (= 7.0.4) - activesupport (= 7.0.4) + railties (7.0.4.1) + actionpack (= 7.0.4.1) + activesupport (= 7.0.4.1) method_source rake (>= 12.2) thor (~> 1.0) @@ -495,7 +495,7 @@ DEPENDENCIES pry-byebug puma rack-livereload - rails (= 7.0.4) + rails (= 7.0.4.1) rails-controller-testing (~> 1.0.5) redis (~> 4.0) responders From df5031d68c2c6cc3805a0f03ea509d2673fa41ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 18 Jan 2023 13:18:48 +0100 Subject: [PATCH 494/609] Update Ruby minor version --- .ruby-version | 2 +- Gemfile | 2 +- Gemfile.lock | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.ruby-version b/.ruby-version index ef538c281..ff365e06b 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.1.2 +3.1.3 diff --git a/Gemfile b/Gemfile index ab60fb1ad..b9fbef134 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ source 'https://rubygems.org' -ruby '3.1.2' +ruby '3.1.3' gem 'aasm', '~> 5.2.0' gem 'chartkick' diff --git a/Gemfile.lock b/Gemfile.lock index 957956afd..730d2cb9a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -516,7 +516,7 @@ DEPENDENCIES will_paginate (~> 3.3.1) RUBY VERSION - ruby 3.1.2p20 + ruby 3.1.3p185 BUNDLED WITH 2.3.12 From a74e2cd811293867f580a82b068be440c2b4392a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 18 Jan 2023 13:20:07 +0100 Subject: [PATCH 495/609] Update tests.yml --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5c736d107..3c4f20356 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,7 +15,7 @@ jobs: - name: Install Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3.1.2 + ruby-version: 3.1.3 bundler-cache: true - name: Install Elasticsearch uses: ankane/setup-elasticsearch@v1 From b39450cbaabbac2fd1aefbc4f8691578dad8045f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Jan 2023 04:35:53 +0000 Subject: [PATCH 496/609] Bump commonmarker from 0.23.6 to 0.23.7 Bumps [commonmarker](https://github.com/gjtorikian/commonmarker) from 0.23.6 to 0.23.7. - [Release notes](https://github.com/gjtorikian/commonmarker/releases) - [Changelog](https://github.com/gjtorikian/commonmarker/blob/main/CHANGELOG.md) - [Commits](https://github.com/gjtorikian/commonmarker/compare/v0.23.6...v0.23.7) --- updated-dependencies: - dependency-name: commonmarker dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index b9fbef134..7d979541a 100644 --- a/Gemfile +++ b/Gemfile @@ -9,7 +9,7 @@ gem 'google_drive' gem 'groupdate' gem 'honeybadger', '~> 4.12.1' gem 'html-pipeline', '~> 2.14.1' -gem 'commonmarker', '~> 0.23.4' +gem 'commonmarker', '~> 0.23.7' gem 'net-sftp', '~> 2.1', '>= 2.1.2' gem 'octicons_helper' gem 'omniauth-orcid', '~> 2.1.1' diff --git a/Gemfile.lock b/Gemfile.lock index 730d2cb9a..a3b2ba101 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -91,7 +91,7 @@ GEM xpath (~> 3.2) chartkick (4.2.1) coderay (1.1.3) - commonmarker (0.23.6) + commonmarker (0.23.7) concurrent-ruby (1.1.10) crack (0.4.5) rexml @@ -470,7 +470,7 @@ DEPENDENCIES bootsnap capybara (~> 3.37) chartkick - commonmarker (~> 0.23.4) + commonmarker (~> 0.23.7) dotenv (~> 2.7.6) elasticsearch (< 7.14) factory_bot_rails (~> 6.2.0) From 88fcb42efd0c5af7cf2c370b4adfee48d78852f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 27 Jan 2023 12:09:27 +0100 Subject: [PATCH 497/609] Update reviewers signup links --- app/views/home/about.html.erb | 2 +- app/views/home/index.html.erb | 2 +- public/reviewer-signup.html | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) delete mode 100644 public/reviewer-signup.html diff --git a/app/views/home/about.html.erb b/app/views/home/about.html.erb index fd6859453..979dcc256 100644 --- a/app/views/home/about.html.erb +++ b/app/views/home/about.html.erb @@ -259,7 +259,7 @@ Author information - <%= link_to "🎉 Volunteer to review".html_safe, "/reviewer-signup.html", class: "menu-btn" %> + 🎉 Volunteer to review Reviewer guidelines <%= link_to "✨ Donate to #{setting(:abbreviation)}  ✨".html_safe, "https://numfocus.org/donate-to-joss", class: "menu-btn", target: "_blank" %>
            diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index 59ca4b13f..61dc521e0 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -6,7 +6,7 @@ subscription fees.

            <%= link_to "Submit a paper to #{Rails.application.settings['abbreviation']}".html_safe, new_paper_path, class: "btn" %> - <%= link_to "🎉 Volunteer to review".html_safe, "/reviewer-signup.html", class: "btn" %> + 🎉 Volunteer to review
            diff --git a/public/reviewer-signup.html b/public/reviewer-signup.html deleted file mode 100644 index 48f17e991..000000000 --- a/public/reviewer-signup.html +++ /dev/null @@ -1 +0,0 @@ - Sign up to be a JOSS reviewer \ No newline at end of file From 0247cce5e0c00af15764bf651f79983d13514b57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 27 Jan 2023 12:35:11 +0100 Subject: [PATCH 498/609] Use a global setting --- app/views/home/about.html.erb | 4 ++-- app/views/home/index.html.erb | 2 +- config/settings-development.yml | 1 + config/settings-production.yml | 1 + config/settings-test.yml | 1 + 5 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/views/home/about.html.erb b/app/views/home/about.html.erb index 979dcc256..ef59f4b47 100644 --- a/app/views/home/about.html.erb +++ b/app/views/home/about.html.erb @@ -19,7 +19,7 @@ <%= render partial: "content/about/general" %>
            @@ -259,7 +259,7 @@ Author information - 🎉 Volunteer to review + <%= link_to "🎉 Volunteer to review".html_safe, setting(:reviewers_signup_url), class: "menu-btn" %> Reviewer guidelines <%= link_to "✨ Donate to #{setting(:abbreviation)}  ✨".html_safe, "https://numfocus.org/donate-to-joss", class: "menu-btn", target: "_blank" %>
            diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index 61dc521e0..b123baa26 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -6,7 +6,7 @@ subscription fees.

            <%= link_to "Submit a paper to #{Rails.application.settings['abbreviation']}".html_safe, new_paper_path, class: "btn" %> - 🎉 Volunteer to review + <%= link_to "🎉 Volunteer to review".html_safe, setting(:reviewers_signup_url), class: "btn" %>
            diff --git a/config/settings-development.yml b/config/settings-development.yml index 8787c2176..65432ec99 100644 --- a/config/settings-development.yml +++ b/config/settings-development.yml @@ -14,6 +14,7 @@ github: "openjournals/joss" reviews: "openjournals/joss-reviews-testing" papers_repo: "openjournals/joss-papers-testing" papers_html_url: "https://www.theoj.org/joss-papers" +reviewers_signup_url: "https://reviewers.joss.theoj.org/join" product: "software" # the *thing* being submitted for review reviewers: "https://bit.ly/joss-reviewers" submission_enquiry: |- diff --git a/config/settings-production.yml b/config/settings-production.yml index 9a9438834..f32f0648d 100644 --- a/config/settings-production.yml +++ b/config/settings-production.yml @@ -13,6 +13,7 @@ google_analytics: "UA-47852178-4" github: "openjournals/joss" reviews: "openjournals/joss-reviews" papers_html_url: "https://www.theoj.org/joss-papers" +reviewers_signup_url: "https://reviewers.joss.theoj.org/join" papers_repo: "openjournals/joss-papers" product: "software" # the *thing* being submitted for review reviewers: "https://bit.ly/joss-reviewers" diff --git a/config/settings-test.yml b/config/settings-test.yml index 486537435..ab6d89a8d 100644 --- a/config/settings-test.yml +++ b/config/settings-test.yml @@ -14,6 +14,7 @@ github: "openjournals/joss" reviews: "openjournals/joss-reviews-testing" papers_repo: "openjournals/joss-papers-testing" papers_html_url: "https://www.theoj.org/joss-papers" +reviewers_signup_url: "https://reviewers.joss.theoj.org/join" product: "software" # the *thing* being submitted for review reviewers: "https://bit.ly/joss-reviewers" submission_enquiry: |- From 6061b21cf93200ede92aaf9e0059c836ade81b84 Mon Sep 17 00:00:00 2001 From: Darigov Research <30328618+darigovresearch@users.noreply.github.com> Date: Fri, 27 Jan 2023 22:12:32 +0000 Subject: [PATCH 499/609] Update year to 2023 in docs --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 5ed84e79d..f628e3c3e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -21,7 +21,7 @@ # -- Project information ----------------------------------------------------- project = 'JOSS' -copyright = '2018, Open Journals' +copyright = '2023, Open Journals' author = 'Arfon Smith & Open Journals community' # The short X.Y version From 89ad1f9f5a8e26c87ad58910c7c11f47eddcdf12 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 28 Jan 2023 01:21:22 +0000 Subject: [PATCH 500/609] Bump sanitize from 6.0.0 to 6.0.1 Bumps [sanitize](https://github.com/rgrove/sanitize) from 6.0.0 to 6.0.1. - [Release notes](https://github.com/rgrove/sanitize/releases) - [Changelog](https://github.com/rgrove/sanitize/blob/main/HISTORY.md) - [Commits](https://github.com/rgrove/sanitize/compare/v6.0.0...v6.0.1) --- updated-dependencies: - dependency-name: sanitize dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 7d979541a..4bb3cf528 100644 --- a/Gemfile +++ b/Gemfile @@ -24,7 +24,7 @@ gem "turbo-rails" gem "stimulus-rails" gem 'responders' gem 'newrelic_rpm' -gem 'sanitize', '~> 6.0.0' +gem 'sanitize', '~> 6.0.1' gem 'searchkick' gem 'elasticsearch', '<7.14' gem 'uglifier', '4.2.0' diff --git a/Gemfile.lock b/Gemfile.lock index a3b2ba101..923702b06 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -382,7 +382,7 @@ GEM ruby2_keywords (0.0.5) ruby_dig (0.0.2) rubyzip (2.3.2) - sanitize (6.0.0) + sanitize (6.0.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) sassc (2.4.0) @@ -500,7 +500,7 @@ DEPENDENCIES redis (~> 4.0) responders rspec-rails (~> 5.1.1) - sanitize (~> 6.0.0) + sanitize (~> 6.0.1) sassc-rails searchkick selenium-webdriver From 5f346869b25f482b324b07624b80cae6288482cd Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sat, 18 Feb 2023 14:21:01 +0100 Subject: [PATCH 501/609] Adding labels to AEIC view --- app/helpers/application_helper.rb | 7 +++++++ app/views/aeic_dashboard/index.html.erb | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 8d22a924b..ba9756d3c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -46,6 +46,13 @@ def avatar(username) return "https://github.com/#{username.sub(/^@/, "")}.png" end + def paper_track_label(github_issue) + id = github_issue.number + paper = Paper.where('review_issue_id = ?', id).first + return "" unless paper && paper.track + content_tag(:span, paper.track.label, style: "padding: 3px; margin-right: 3px; border-radius: 2px; background-color: ##{paper.track.label_color}; color: #000000;") + end + def scope_link_for_issue(github_issue) id = github_issue.number paper = Paper.where('review_issue_id = ? OR meta_review_issue_id = ?', id, id).first diff --git a/app/views/aeic_dashboard/index.html.erb b/app/views/aeic_dashboard/index.html.erb index 48ac3ecd9..fda524cb0 100644 --- a/app/views/aeic_dashboard/index.html.erb +++ b/app/views/aeic_dashboard/index.html.erb @@ -30,7 +30,7 @@

            Papers labeled as recommend-accept but still open:

              <% @recommend_accept.each do |accepted_issue| %> -
            • <%= link_to "##{accepted_issue.number}", accepted_issue.html_url, :target => "_blank" %> <%= accepted_issue.title %>
            • +
            • <%= paper_track_label(accepted_issue) %> • <%= link_to "##{accepted_issue.number}", accepted_issue.html_url, :target => "_blank" %> <%= accepted_issue.title %>
            • <% end %>
            <% accepted_link_text = "List of ready to publish submissions at GitHub →".html_safe %> From 5970dd3c8dc9a2e1fc473c043a0f68a60614af4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 28 Feb 2023 12:54:15 +0100 Subject: [PATCH 502/609] Ruby 3.2 --- .github/workflows/tests.yml | 2 +- .ruby-version | 2 +- Gemfile | 2 +- Gemfile.lock | 102 ++++++++++++++++++------------------ 4 files changed, 54 insertions(+), 54 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3c4f20356..69c2bcf5d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,7 +15,7 @@ jobs: - name: Install Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3.1.3 + ruby-version: 3.2.1 bundler-cache: true - name: Install Elasticsearch uses: ankane/setup-elasticsearch@v1 diff --git a/.ruby-version b/.ruby-version index ff365e06b..e4604e3af 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.1.3 +3.2.1 diff --git a/Gemfile b/Gemfile index 4bb3cf528..31ad29300 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ source 'https://rubygems.org' -ruby '3.1.3' +ruby '3.2.1' gem 'aasm', '~> 5.2.0' gem 'chartkick' diff --git a/Gemfile.lock b/Gemfile.lock index 923702b06..47a6f6f93 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -76,7 +76,7 @@ GEM public_suffix (>= 2.0.2, < 6.0) afm (0.2.2) bindex (0.8.1) - bootsnap (1.15.0) + bootsnap (1.16.0) msgpack (~> 1.2) builder (3.2.4) byebug (11.1.3) @@ -89,10 +89,10 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - chartkick (4.2.1) + chartkick (5.0.1) coderay (1.1.3) - commonmarker (0.23.7) - concurrent-ruby (1.1.10) + commonmarker (0.23.8) + concurrent-ruby (1.2.2) crack (0.4.5) rexml crass (1.0.6) @@ -119,7 +119,7 @@ GEM factory_bot_rails (6.2.0) factory_bot (~> 6.2.0) railties (>= 5.0.0) - faraday (1.10.2) + faraday (1.10.3) faraday-em_http (~> 1.0) faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) @@ -144,9 +144,9 @@ GEM faraday-retry (1.0.3) ffi (1.15.5) formatador (1.1.0) - globalid (1.0.1) + globalid (1.1.0) activesupport (>= 5.0) - google-apis-core (0.9.2) + google-apis-core (0.11.0) addressable (~> 2.5, >= 2.5.1) googleauth (>= 0.16.2, < 2.a) httpclient (>= 2.8.1, < 3.a) @@ -155,10 +155,10 @@ GEM retriable (>= 2.0, < 4.a) rexml webrick - google-apis-drive_v3 (0.32.0) - google-apis-core (>= 0.9.1, < 2.a) - google-apis-sheets_v4 (0.20.0) - google-apis-core (>= 0.9.1, < 2.a) + google-apis-drive_v3 (0.36.0) + google-apis-core (>= 0.11.0, < 2.a) + google-apis-sheets_v4 (0.22.0) + google-apis-core (>= 0.11.0, < 2.a) google_drive (3.0.7) google-apis-drive_v3 (>= 0.5.0, < 1.0.0) google-apis-sheets_v4 (>= 0.4.0, < 1.0.0) @@ -171,7 +171,7 @@ GEM multi_json (~> 1.11) os (>= 0.9, < 2.0) signet (~> 0.15) - groupdate (6.1.0) + groupdate (6.2.0) activesupport (>= 5.2) guard (2.18.0) formatador (>= 0.2.4) @@ -208,18 +208,18 @@ GEM jbuilder (2.11.5) actionview (>= 5.0.0) activesupport (>= 5.0.0) - jwt (2.5.0) + jwt (2.7.0) libv8-node (16.10.0.0) libv8-node (16.10.0.0-x86_64-darwin) libv8-node (16.10.0.0-x86_64-linux) - listen (3.7.1) + listen (3.8.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) loofah (2.19.1) crass (~> 1.0.2) nokogiri (>= 1.5.9) lumberjack (1.2.8) - mail (2.8.0.1) + mail (2.8.1) mini_mime (>= 0.1.1) net-imap net-pop @@ -236,7 +236,7 @@ GEM msgpack (1.6.0) multi_json (1.15.0) multi_xml (0.6.0) - multipart-post (2.2.3) + multipart-post (2.3.0) nenv (0.3.0) net-imap (0.3.4) date @@ -250,14 +250,14 @@ GEM net-smtp (0.3.3) net-protocol net-ssh (7.0.1) - newrelic_rpm (8.13.1) + newrelic_rpm (9.0.0) nio4r (2.5.8) - nokogiri (1.14.0) + nokogiri (1.14.2) mini_portile2 (~> 2.8.0) racc (~> 1.4) - nokogiri (1.14.0-x86_64-darwin) + nokogiri (1.14.2-x86_64-darwin) racc (~> 1.4) - nokogiri (1.14.0-x86_64-linux) + nokogiri (1.14.2-x86_64-linux) racc (~> 1.4) notiffany (0.1.3) nenv (~> 0.1) @@ -269,15 +269,15 @@ GEM rack (>= 1.2, < 4) snaky_hash (~> 2.0) version_gem (~> 1.1) - octicons (17.10.0) - octicons_helper (17.10.0) + octicons (17.12.0) + octicons_helper (17.12.0) actionview - octicons (= 17.10.0) + octicons (= 17.12.0) railties octokit (4.25.1) faraday (>= 1, < 3) sawyer (~> 0.9) - omniauth (2.1.0) + omniauth (2.1.1) hashie (>= 3.4.6) rack (>= 2.2.3) rack-protection @@ -290,7 +290,7 @@ GEM omniauth-rails_csrf_protection (1.0.1) actionpack (>= 4.2) omniauth (~> 2.0) - openssl (3.0.1) + openssl (3.1.0) os (1.1.4) pdf-reader (2.9.2) Ascii85 (~> 1.0) @@ -298,21 +298,21 @@ GEM hashery (~> 2.0) ruby-rc4 ttfunk - pg (1.4.5) - pry (0.14.1) + pg (1.4.6) + pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) pry-byebug (3.10.1) byebug (~> 11.0) pry (>= 0.13, < 0.15) public_suffix (5.0.1) - puma (6.0.0) + puma (6.1.1) nio4r (~> 2.0) racc (1.6.2) rack (2.2.6.2) rack-livereload (0.3.17) rack - rack-protection (3.0.4) + rack-protection (3.0.5) rack rack-test (2.0.2) rack (>= 1.3) @@ -337,7 +337,7 @@ GEM rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.4.4) + rails-html-sanitizer (1.5.0) loofah (~> 2.19, >= 2.19.1) railties (7.0.4.1) actionpack (= 7.0.4.1) @@ -350,23 +350,23 @@ GEM rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) - redis (4.8.0) - regexp_parser (2.6.1) + redis (4.8.1) + regexp_parser (2.7.0) representable (3.2.0) declarative (< 0.1.0) trailblazer-option (>= 0.1.1, < 0.2.0) uber (< 0.2.0) - responders (3.0.1) - actionpack (>= 5.0) - railties (>= 5.0) + responders (3.1.0) + actionpack (>= 5.2) + railties (>= 5.2) retriable (3.1.2) rexml (3.2.5) - rspec-core (3.12.0) + rspec-core (3.12.1) rspec-support (~> 3.12.0) - rspec-expectations (3.12.0) + rspec-expectations (3.12.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-mocks (3.12.1) + rspec-mocks (3.12.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-rails (5.1.2) @@ -396,10 +396,10 @@ GEM sawyer (0.9.2) addressable (>= 2.3.5) faraday (>= 0.17.3, < 3) - searchkick (5.1.1) + searchkick (5.2.1) activemodel (>= 5.2) hashie - selenium-webdriver (4.7.1) + selenium-webdriver (4.8.1) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) @@ -412,12 +412,12 @@ GEM snaky_hash (2.0.1) hashie version_gem (~> 1.1, >= 1.1.1) - spring (4.1.0) + spring (4.1.1) spring-commands-rspec (1.0.4) spring (>= 0.9.1) - sprockets (4.1.1) + sprockets (4.2.0) concurrent-ruby (~> 1.0) - rack (> 1, < 3) + rack (>= 2.2.4, < 4) sprockets-rails (3.4.2) actionpack (>= 5.2) activesupport (>= 5.2) @@ -425,15 +425,15 @@ GEM stimulus-rails (1.2.1) railties (>= 6.0.0) thor (1.2.1) - tilt (2.0.11) - timeout (0.3.1) + tilt (2.1.0) + timeout (0.3.2) trailblazer-option (0.1.2) ttfunk (1.7.0) - turbo-rails (1.3.2) + turbo-rails (1.3.3) actionpack (>= 6.0.0) activejob (>= 6.0.0) railties (>= 6.0.0) - tzinfo (2.0.5) + tzinfo (2.0.6) concurrent-ruby (~> 1.0) uber (0.1.0) uglifier (4.2.0) @@ -449,7 +449,7 @@ GEM addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - webrick (1.7.0) + webrick (1.8.1) websocket (1.2.9) websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) @@ -457,7 +457,7 @@ GEM will_paginate (3.3.1) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.6.6) + zeitwerk (2.6.7) PLATFORMS ruby @@ -516,7 +516,7 @@ DEPENDENCIES will_paginate (~> 3.3.1) RUBY VERSION - ruby 3.1.3p185 + ruby 3.2.1p31 BUNDLED WITH - 2.3.12 + 2.4.7 From 8a9fc0c4466275892fd37002a576126b76128d84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 3 Mar 2023 10:39:40 +0100 Subject: [PATCH 503/609] Update Rails --- Gemfile | 2 +- Gemfile.lock | 108 +++++++++++++++++++++++++-------------------------- 2 files changed, 55 insertions(+), 55 deletions(-) diff --git a/Gemfile b/Gemfile index 31ad29300..69aff07a7 100644 --- a/Gemfile +++ b/Gemfile @@ -18,7 +18,7 @@ gem 'octokit', '~> 4.25' gem 'pdf-reader', '~> 2.9.2' gem 'pg', '~> 1.4.5' gem 'will_paginate', '~> 3.3.1' -gem 'rails', '7.0.4.1' +gem 'rails', '7.0.4.2' gem "importmap-rails" gem "turbo-rails" gem "stimulus-rails" diff --git a/Gemfile.lock b/Gemfile.lock index 47a6f6f93..63c8e943a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,47 +4,47 @@ GEM Ascii85 (1.1.0) aasm (5.2.0) concurrent-ruby (~> 1.0) - actioncable (7.0.4.1) - actionpack (= 7.0.4.1) - activesupport (= 7.0.4.1) + actioncable (7.0.4.2) + actionpack (= 7.0.4.2) + activesupport (= 7.0.4.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.4.1) - actionpack (= 7.0.4.1) - activejob (= 7.0.4.1) - activerecord (= 7.0.4.1) - activestorage (= 7.0.4.1) - activesupport (= 7.0.4.1) + actionmailbox (7.0.4.2) + actionpack (= 7.0.4.2) + activejob (= 7.0.4.2) + activerecord (= 7.0.4.2) + activestorage (= 7.0.4.2) + activesupport (= 7.0.4.2) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.4.1) - actionpack (= 7.0.4.1) - actionview (= 7.0.4.1) - activejob (= 7.0.4.1) - activesupport (= 7.0.4.1) + actionmailer (7.0.4.2) + actionpack (= 7.0.4.2) + actionview (= 7.0.4.2) + activejob (= 7.0.4.2) + activesupport (= 7.0.4.2) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.4.1) - actionview (= 7.0.4.1) - activesupport (= 7.0.4.1) + actionpack (7.0.4.2) + actionview (= 7.0.4.2) + activesupport (= 7.0.4.2) rack (~> 2.0, >= 2.2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.4.1) - actionpack (= 7.0.4.1) - activerecord (= 7.0.4.1) - activestorage (= 7.0.4.1) - activesupport (= 7.0.4.1) + actiontext (7.0.4.2) + actionpack (= 7.0.4.2) + activerecord (= 7.0.4.2) + activestorage (= 7.0.4.2) + activesupport (= 7.0.4.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.4.1) - activesupport (= 7.0.4.1) + actionview (7.0.4.2) + activesupport (= 7.0.4.2) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -52,22 +52,22 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (7.0.4.1) - activesupport (= 7.0.4.1) + activejob (7.0.4.2) + activesupport (= 7.0.4.2) globalid (>= 0.3.6) - activemodel (7.0.4.1) - activesupport (= 7.0.4.1) - activerecord (7.0.4.1) - activemodel (= 7.0.4.1) - activesupport (= 7.0.4.1) - activestorage (7.0.4.1) - actionpack (= 7.0.4.1) - activejob (= 7.0.4.1) - activerecord (= 7.0.4.1) - activesupport (= 7.0.4.1) + activemodel (7.0.4.2) + activesupport (= 7.0.4.2) + activerecord (7.0.4.2) + activemodel (= 7.0.4.2) + activesupport (= 7.0.4.2) + activestorage (7.0.4.2) + actionpack (= 7.0.4.2) + activejob (= 7.0.4.2) + activerecord (= 7.0.4.2) + activesupport (= 7.0.4.2) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.4.1) + activesupport (7.0.4.2) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -316,20 +316,20 @@ GEM rack rack-test (2.0.2) rack (>= 1.3) - rails (7.0.4.1) - actioncable (= 7.0.4.1) - actionmailbox (= 7.0.4.1) - actionmailer (= 7.0.4.1) - actionpack (= 7.0.4.1) - actiontext (= 7.0.4.1) - actionview (= 7.0.4.1) - activejob (= 7.0.4.1) - activemodel (= 7.0.4.1) - activerecord (= 7.0.4.1) - activestorage (= 7.0.4.1) - activesupport (= 7.0.4.1) + rails (7.0.4.2) + actioncable (= 7.0.4.2) + actionmailbox (= 7.0.4.2) + actionmailer (= 7.0.4.2) + actionpack (= 7.0.4.2) + actiontext (= 7.0.4.2) + actionview (= 7.0.4.2) + activejob (= 7.0.4.2) + activemodel (= 7.0.4.2) + activerecord (= 7.0.4.2) + activestorage (= 7.0.4.2) + activesupport (= 7.0.4.2) bundler (>= 1.15.0) - railties (= 7.0.4.1) + railties (= 7.0.4.2) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -339,9 +339,9 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.5.0) loofah (~> 2.19, >= 2.19.1) - railties (7.0.4.1) - actionpack (= 7.0.4.1) - activesupport (= 7.0.4.1) + railties (7.0.4.2) + actionpack (= 7.0.4.2) + activesupport (= 7.0.4.2) method_source rake (>= 12.2) thor (~> 1.0) @@ -495,7 +495,7 @@ DEPENDENCIES pry-byebug puma rack-livereload - rails (= 7.0.4.1) + rails (= 7.0.4.2) rails-controller-testing (~> 1.0.5) redis (~> 4.0) responders From f802a4dc77bc2f72f4770e5bb79b19ef7f2df7b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 3 Mar 2023 10:42:26 +0100 Subject: [PATCH 504/609] Update net-sftp --- Gemfile | 2 +- Gemfile.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 69aff07a7..3f706358e 100644 --- a/Gemfile +++ b/Gemfile @@ -10,7 +10,7 @@ gem 'groupdate' gem 'honeybadger', '~> 4.12.1' gem 'html-pipeline', '~> 2.14.1' gem 'commonmarker', '~> 0.23.7' -gem 'net-sftp', '~> 2.1', '>= 2.1.2' +gem 'net-sftp', '~> 4.0' gem 'octicons_helper' gem 'omniauth-orcid', '~> 2.1.1' gem 'omniauth-rails_csrf_protection' diff --git a/Gemfile.lock b/Gemfile.lock index 63c8e943a..68f7b864c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -245,8 +245,8 @@ GEM net-protocol net-protocol (0.2.1) timeout - net-sftp (2.1.2) - net-ssh (>= 2.6.5) + net-sftp (4.0.0) + net-ssh (>= 5.0.0, < 8.0.0) net-smtp (0.3.3) net-protocol net-ssh (7.0.1) @@ -484,7 +484,7 @@ DEPENDENCIES issue jbuilder (~> 2.11) mini_racer - net-sftp (~> 2.1, >= 2.1.2) + net-sftp (~> 4.0) newrelic_rpm octicons_helper octokit (~> 4.25) From 0431502b11f9f24aa9caff1000f78599d54a39d4 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Tue, 7 Mar 2023 07:25:09 +0000 Subject: [PATCH 505/609] Remove option for authors to silently withdraw --- app/views/papers/_actions.html.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/papers/_actions.html.erb b/app/views/papers/_actions.html.erb index 31aef22d8..1c131b480 100644 --- a/app/views/papers/_actions.html.erb +++ b/app/views/papers/_actions.html.erb @@ -91,8 +91,9 @@ <% end %> <% end %> - <% if (current_user == paper.submitting_author) || current_user.aeic? %> + <% if current_user.aeic? %>
            + Note that if you hit this button, you'll still have to manually close the review issue on GitHub. <%= link_to "Withdraw paper", withdraw_paper_path(paper), data: { turbo_method: :post, turbo_confirm: "Withdrawing. Are you sure?" }, form_class: "left", class: "btn btn-danger" %>
            <% end %> From c3395766e8079505aaac3c7b6d5b4e7d768d39d3 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Tue, 7 Mar 2023 07:30:07 +0000 Subject: [PATCH 506/609] Fixing tests --- spec/views/papers/show.html.erb_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/views/papers/show.html.erb_spec.rb b/spec/views/papers/show.html.erb_spec.rb index b856f7ac7..3df49ac49 100644 --- a/spec/views/papers/show.html.erb_spec.rb +++ b/spec/views/papers/show.html.erb_spec.rb @@ -93,7 +93,7 @@ expect(rendered).to have_selector("a[data-turbo-method=post]", text: "Reject paper") end - it "shows only the withdraw to paper owners" do + it "shows does not show the withdraw (or other actions) to paper owners" do user = create(:user) allow(view).to receive_message_chain(:current_user).and_return(user) allow(view).to receive_message_chain(:current_editor).and_return(user) @@ -102,7 +102,7 @@ assign(:paper, paper) render template: "papers/show", formats: :html - expect(rendered).to have_selector("a[data-turbo-method=post]", text: "Withdraw paper") + expect(rendered).to_not have_selector("a[data-turbo-method=post]", text: "Withdraw paper") expect(rendered).to_not have_selector("a[data-turbo-method=post]", text: "Reject paper") expect(rendered).to_not have_selector("input[type=submit][value='Start pre review']") end From af0cd08e70586660dc38052df53870b493c272da Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Tue, 7 Mar 2023 16:20:31 +0000 Subject: [PATCH 507/609] Fixing formatting. --- app/views/papers/_actions.html.erb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/views/papers/_actions.html.erb b/app/views/papers/_actions.html.erb index 1c131b480..edb7ebbb2 100644 --- a/app/views/papers/_actions.html.erb +++ b/app/views/papers/_actions.html.erb @@ -69,7 +69,7 @@ Paper actions
            -

            Available actions for you on this paper

            +

            Available actions for you on this paper (note to editors that if you use these buttons, you'll still have to manually close the review issue on GitHub).

            <% if current_user.aeic? %> @@ -93,7 +93,6 @@ <% if current_user.aeic? %>
            - Note that if you hit this button, you'll still have to manually close the review issue on GitHub. <%= link_to "Withdraw paper", withdraw_paper_path(paper), data: { turbo_method: :post, turbo_confirm: "Withdrawing. Are you sure?" }, form_class: "left", class: "btn btn-danger" %>
            <% end %> From 5717ae3a0d36cf0751060918087184c664b4ad76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 8 Mar 2023 13:42:10 +0100 Subject: [PATCH 508/609] Bundle update --- Gemfile | 22 ++++++++--------- Gemfile.lock | 68 +++++++++++++++++++++++++++------------------------- 2 files changed, 47 insertions(+), 43 deletions(-) diff --git a/Gemfile b/Gemfile index 3f706358e..9026f2748 100644 --- a/Gemfile +++ b/Gemfile @@ -1,22 +1,22 @@ source 'https://rubygems.org' ruby '3.2.1' -gem 'aasm', '~> 5.2.0' +gem 'aasm', '~> 5.5.0' gem 'chartkick' gem 'bootsnap' -gem 'dotenv', '~> 2.7.6' +gem 'dotenv', '~> 2.8.1' gem 'google_drive' gem 'groupdate' -gem 'honeybadger', '~> 4.12.1' -gem 'html-pipeline', '~> 2.14.1' -gem 'commonmarker', '~> 0.23.7' +gem 'honeybadger', '~> 5.2.0' +gem 'html-pipeline', '~> 2.14.3' +gem 'commonmarker', '~> 0.23.8' gem 'net-sftp', '~> 4.0' gem 'octicons_helper' gem 'omniauth-orcid', '~> 2.1.1' gem 'omniauth-rails_csrf_protection' -gem 'octokit', '~> 4.25' -gem 'pdf-reader', '~> 2.9.2' -gem 'pg', '~> 1.4.5' +gem 'octokit', '~> 6.0' +gem 'pdf-reader', '~> 2.11.0' +gem 'pg', '~> 1.4.6' gem 'will_paginate', '~> 3.3.1' gem 'rails', '7.0.4.2' gem "importmap-rails" @@ -43,14 +43,14 @@ gem "sassc-rails" gem 'puma' # Use Redis for Action Cable -gem "redis", "~> 4.0" +gem "redis", "~> 5.0" group :development, :test do # Call 'byebug' anywhere in the code to stop execution and get a debugger console gem 'pry-byebug' - gem 'capybara', '~> 3.37' + gem 'capybara', '~> 3.38' gem 'factory_bot_rails', '~> 6.2.0' - gem 'rspec-rails', '~> 5.1.1' + gem 'rspec-rails', '~> 6.0.1' gem 'rails-controller-testing', '~> 1.0.5' gem 'selenium-webdriver' gem 'webmock' diff --git a/Gemfile.lock b/Gemfile.lock index 68f7b864c..ac43cd7ea 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,7 +2,7 @@ GEM remote: https://rubygems.org/ specs: Ascii85 (1.1.0) - aasm (5.2.0) + aasm (5.5.0) concurrent-ruby (~> 1.0) actioncable (7.0.4.2) actionpack (= 7.0.4.2) @@ -93,13 +93,14 @@ GEM coderay (1.1.3) commonmarker (0.23.8) concurrent-ruby (1.2.2) + connection_pool (2.3.0) crack (0.4.5) rexml crass (1.0.6) date (3.3.3) declarative (0.0.20) diff-lcs (1.5.0) - dotenv (2.7.6) + dotenv (2.8.1) elasticsearch (7.13.3) elasticsearch-api (= 7.13.3) elasticsearch-transport (= 7.13.3) @@ -191,7 +192,7 @@ GEM hashdiff (1.0.1) hashery (2.1.2) hashie (5.0.0) - honeybadger (4.12.2) + honeybadger (5.2.0) html-pipeline (2.14.3) activesupport (>= 2) nokogiri (>= 1.4) @@ -232,8 +233,8 @@ GEM mini_portile2 (2.8.1) mini_racer (0.6.3) libv8-node (~> 16.10.0.0) - minitest (5.17.0) - msgpack (1.6.0) + minitest (5.18.0) + msgpack (1.6.1) multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.3.0) @@ -269,12 +270,12 @@ GEM rack (>= 1.2, < 4) snaky_hash (~> 2.0) version_gem (~> 1.1) - octicons (17.12.0) - octicons_helper (17.12.0) + octicons (18.1.0) + octicons_helper (18.1.0) actionview - octicons (= 17.12.0) + octicons (= 18.1.0) railties - octokit (4.25.1) + octokit (6.0.1) faraday (>= 1, < 3) sawyer (~> 0.9) omniauth (2.1.1) @@ -292,7 +293,7 @@ GEM omniauth (~> 2.0) openssl (3.1.0) os (1.1.4) - pdf-reader (2.9.2) + pdf-reader (2.11.0) Ascii85 (~> 1.0) afm (~> 0.2.1) hashery (~> 2.0) @@ -309,7 +310,7 @@ GEM puma (6.1.1) nio4r (~> 2.0) racc (1.6.2) - rack (2.2.6.2) + rack (2.2.6.3) rack-livereload (0.3.17) rack rack-protection (3.0.5) @@ -350,7 +351,10 @@ GEM rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) - redis (4.8.1) + redis (5.0.6) + redis-client (>= 0.9.0) + redis-client (0.13.0) + connection_pool regexp_parser (2.7.0) representable (3.2.0) declarative (< 0.1.0) @@ -369,14 +373,14 @@ GEM rspec-mocks (3.12.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-rails (5.1.2) - actionpack (>= 5.2) - activesupport (>= 5.2) - railties (>= 5.2) - rspec-core (~> 3.10) - rspec-expectations (~> 3.10) - rspec-mocks (~> 3.10) - rspec-support (~> 3.10) + rspec-rails (6.0.1) + actionpack (>= 6.1) + activesupport (>= 6.1) + railties (>= 6.1) + rspec-core (~> 3.11) + rspec-expectations (~> 3.11) + rspec-mocks (~> 3.11) + rspec-support (~> 3.11) rspec-support (3.12.0) ruby-rc4 (0.1.5) ruby2_keywords (0.0.5) @@ -429,7 +433,7 @@ GEM timeout (0.3.2) trailblazer-option (0.1.2) ttfunk (1.7.0) - turbo-rails (1.3.3) + turbo-rails (1.4.0) actionpack (>= 6.0.0) activejob (>= 6.0.0) railties (>= 6.0.0) @@ -465,21 +469,21 @@ PLATFORMS x86_64-linux DEPENDENCIES - aasm (~> 5.2.0) + aasm (~> 5.5.0) active_link_to bootsnap - capybara (~> 3.37) + capybara (~> 3.38) chartkick - commonmarker (~> 0.23.7) - dotenv (~> 2.7.6) + commonmarker (~> 0.23.8) + dotenv (~> 2.8.1) elasticsearch (< 7.14) factory_bot_rails (~> 6.2.0) google_drive groupdate guard (~> 2.18) guard-livereload - honeybadger (~> 4.12.1) - html-pipeline (~> 2.14.1) + honeybadger (~> 5.2.0) + html-pipeline (~> 2.14.3) importmap-rails issue jbuilder (~> 2.11) @@ -487,19 +491,19 @@ DEPENDENCIES net-sftp (~> 4.0) newrelic_rpm octicons_helper - octokit (~> 4.25) + octokit (~> 6.0) omniauth-orcid (~> 2.1.1) omniauth-rails_csrf_protection - pdf-reader (~> 2.9.2) - pg (~> 1.4.5) + pdf-reader (~> 2.11.0) + pg (~> 1.4.6) pry-byebug puma rack-livereload rails (= 7.0.4.2) rails-controller-testing (~> 1.0.5) - redis (~> 4.0) + redis (~> 5.0) responders - rspec-rails (~> 5.1.1) + rspec-rails (~> 6.0.1) sanitize (~> 6.0.1) sassc-rails searchkick From 72bc7bd48ee54fe07ae33a8ed65bfa727837463a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 9 Mar 2023 12:11:00 +0100 Subject: [PATCH 509/609] Remove NaN when no active editors --- app/models/editor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/editor.rb b/app/models/editor.rb index 3dc8546fe..75863bf10 100644 --- a/app/models/editor.rb +++ b/app/models/editor.rb @@ -45,7 +45,7 @@ def self.global_three_month_average editor_ids = Editor.active.where("created_at <= ?", 3.months.ago).collect {|e| e.id} paper_count = Paper.visible.since(3.months.ago).where(editor_id: editor_ids).count - return sprintf("%.1f", paper_count / (3.0 * editor_ids.size)) + return editor_ids.size > 0 ? sprintf("%.1f", paper_count / (3.0 * editor_ids.size)) : "0.0" end def retired? From 716126ada7f7fbd4280b092275c4c1ac1ae9ce4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 10 Mar 2023 13:51:23 +0100 Subject: [PATCH 510/609] Add policies page to docs' index --- docs/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/index.rst b/docs/index.rst index f88e66685..bc289b2e1 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -38,6 +38,7 @@ JOSS is a proud affiliate of the `Open Source Initiative Date: Fri, 10 Mar 2023 13:58:36 +0100 Subject: [PATCH 511/609] Add the post-review checklist command to the docs --- docs/editorial_bot.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/editorial_bot.md b/docs/editorial_bot.md index 94a6e2f2e..19127e6e4 100644 --- a/docs/editorial_bot.md +++ b/docs/editorial_bot.md @@ -186,6 +186,14 @@ A series of checks can be run on the submitted repository with the command: EditorialBot will report back with an analysis of the source code and list authorship, contributions and file types information. EditorialBot will also detect the languages used in the repository, will count the number of words in the paper file and will look for an Open Source License and for a *Statement of need* section in the paper. +### Post-review checklist + +Editors can get a checklist to remind all steps to do after the reviewers have finished their reviews and recommended the paper for acceptance: + +```text +@editorialbot create post-review checklist +``` + ### Flag a paper with query-scope Editors can flag a paper with query-scope with the command: @@ -294,6 +302,9 @@ JOSS editors-in-chief can withdraw a submission with the following command: # Generates the pdf paper @editorialbot generate pdf +# Creates a post-review checklist with editor and authors tasks +@editorialbot create post-review checklist + # Recommends the submission for acceptance @editorialbot recommend-accept From de85ee9b2441d8cb3abda61a9aef0b8169d873a1 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sat, 11 Mar 2023 08:04:35 +0000 Subject: [PATCH 512/609] Changing reviewers list URL --- docs/editing.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/editing.md b/docs/editing.md index 614674849..82168bfbb 100644 --- a/docs/editing.md +++ b/docs/editing.md @@ -52,10 +52,10 @@ To recruit reviewers, the handling editor can mention them in the `PRE-REVIEW` i Finding reviewers can be challenging, especially if a submission is outside of your immediate area of expertise. Some strategies you can use to identify potential candidates: -- Search the [reviewer spreadsheet](https://bit.ly/joss-reviewers) of volunteer reviewers. +- Search the [reviewer application](https://reviewers.joss.theoj.org) of volunteer reviewers. - When using this spreadsheet, pay attention to the number of reviews this individual is already doing to avoid overloading them. - It can be helpful to use the "Data > Filter Views" capability to temporarily filter the table view to include only people with language or domain expertise matching the paper. -- Ask the author(s): You are free to ask the submitting author to suggest possible reviewers by using the [reviewer spreadsheet](https://bit.ly/joss-reviewers) and also people from their professional network. In this situation, the editor still needs to verify that their suggestions are appropriate. +- Ask the author(s): You are free to ask the submitting author to suggest possible reviewers by using the [reviewer application](https://reviewers.joss.theoj.org) and also people from their professional network. In this situation, the editor still needs to verify that their suggestions are appropriate. - Use your professional network: You're welcome to invite people you know of who might be able to give a good review. - Search Google and GitHub for related work, and write to the authors of that related work. - You might like to try [this tool](https://github.com/dfm/joss-reviewer) from @dfm. From d1820375447005185bab8804905535cdfd371172 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sat, 11 Mar 2023 08:15:11 +0000 Subject: [PATCH 513/609] Cleaning up editorial guide to reflect new processes --- docs/editing.md | 48 +++++++++++++++++++++--------------------------- 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/docs/editing.md b/docs/editing.md index 82168bfbb..d44ef3055 100644 --- a/docs/editing.md +++ b/docs/editing.md @@ -11,7 +11,7 @@ JOSS editors manage the review workflow with the help of our bot, `@editorialbot ## Pre-review -Once a submission comes in, it will be in the queue for a quick check by the Editor-in-chief (EiC). From there, it moves to a `PRE-REVIEW` issue, where the EiC will assign a handling editor, and the author can suggest reviewers. Initial direction to the authors for improving the paper can already happen here, especially if the paper lacks some requested sections. +Once a submission comes in, it will be in the queue for a quick check by the Track Editor-in-chief (TEiC). From there, it moves to a `PRE-REVIEW` issue, where the TEiC will assign a handling editor, and the author can suggest reviewers. Initial direction to the authors for improving the paper can already happen here, especially if the paper lacks some requested sections. ```eval_rst .. important:: If the paper is out-of-scope for JOSS, editors assess this and notify the author in the ``PRE-REVIEW`` issue. @@ -19,23 +19,23 @@ Once a submission comes in, it will be in the queue for a quick check by the Edi Editors can flag submissions of questionable scope using the command `@editorialbot query scope`. -The EiC assigns an editor (or a volunteering editor self-assigns) with the command `@editorialbot assign @username as editor` in a comment. +The TEiC assigns an editor (or a volunteering editor self-assigns) with the command `@editorialbot assign @username as editor` in a comment. ```eval_rst -.. note:: If a paper is submitted without a recommended editor, it will show up in the weekly digest email under the category ‘Papers currently without an editor.’ Please review this weekly email and volunteer to edit papers that look to be in your domain. If you choose to be an editor in the issue thread type the command ``@editorialbot assign @yourhandle as editor`` or simply ``@editorialbot assign me as editor`` +.. note:: Please check in on the [dashboard](https://joss.theoj.org/dashboard/incoming) semi-regularly to see which papers are currently without an editor, and if possible, volunteer to edit papers that look to be in your domain. If you choose to be an editor in the issue thread type the command ``@editorialbot assign @yourhandle as editor`` or simply ``@editorialbot assign me as editor`` ``` ### How papers are assigned to editors -By default, unless an editor volunteers, the Associated Editor-in-chief (AEiC) on duty will attempt to assign an incoming paper to the most suitable handling editor. While AEiCs will make every effort to match a submission with the most appropriate editor, there are a number of situations where an AEiC may assign a paper to an editor that doesn't fit entirely within the editor's research domains: +By default, unless an editor volunteers, the Track Editor-in-chief (TEiC) on duty will attempt to assign an incoming paper to the most suitable handling editor. While TEiC will make every effort to match a submission with the most appropriate editor, there are a number of situations where an TEiC may assign a paper to an editor that doesn't fit entirely within the editor's research domains: - If there's no obvious fit to _any_ of the JOSS editors - If the most suitable editor is already handling a large number of papers - If the chosen editor has a lighter editorial load than other editors -In most cases, an AEiC will ask one or more editors to edit a submission (e.g. `@editor1, @editor 2 - would one of you be willing to edit this submission for JOSS`). If the editor doesn't respond within ~3 working days, the AEiC may assign the paper to the editor regardless. +In most cases, the TEiC will ask one or more editors to edit a submission (e.g. `@editor1, @editor 2 - would one of you be willing to edit this submission for JOSS`). If the editor doesn't respond within ~3 working days, the TEiC may assign the paper to the editor regardless. -Editors may also be invited to edit over email when an AEiC runs the command `@editorialbot invite @editor1 as editor`. +Editors may also be invited to edit over email when an TEiC runs the command `@editorialbot invite @editor1 as editor`. ### Finding reviewers @@ -92,7 +92,7 @@ Sometimes you'll need to add a new reviewer once the main review (i.e. post pre- ## After reviewers recommend acceptance -When a submission is ready to be accepted, we ask that the authors issue a new tagged release of the software (if changed), and archive it (on [Zenodo](https://zenodo.org/), [fig**share**](https://figshare.com/), or other). The authors then post the version number and archive DOI in the `REVIEW` issue. The handling editor executes the pre-publication steps, and pings the EiCs for final processing. +When a submission is ready to be accepted, we ask that the authors issue a new tagged release of the software (if changed), and archive it (on [Zenodo](https://zenodo.org/), [fig**share**](https://figshare.com/), or other). The authors then post the version number and archive DOI in the `REVIEW` issue. The handling editor executes the pre-publication steps, and pings the Track Editor in Chief for final processing. Pre-publication steps: - Get a new proof with the `@editorialbot generate pdf` command. @@ -136,16 +136,16 @@ aas-journal: Astrophysical Journal <- The name of the AAS journal. - Ask the EiC on rotation to publish the paper as normal (by tagging `@openjournals/joss-eics`). -## Processing of rOpenSci-reviewed and accepted submissions +## Processing of rOpenSci-reviewed or pyOpenSci-reviewed and accepted submissions -If a paper has already been reviewed and accepted by rOpenSci, the streamlined JOSS review process is: +If a paper has already been reviewed and accepted by rOpenSci or pyOpenSci, the streamlined JOSS review process is: - Assign yourself as editor and reviewer -- Add a comment in the pre-review issue pointing to the rOpenSci review -- Add the rOpenSci label to the pre-review issue +- Add a comment in the pre-review issue pointing to the rOpenSci or pyOpenSci review +- Add the rOpenSci/pyOpenSci label to the pre-review issue - Start the review issue -- Add a comment in the review issue pointing to the rOpenSci review -- Compile the paper and check it looks ok +- Add a comment in the review issue pointing to the rOpenSci or pyOpenSci review +- Compile the paper and check it looks OK - Go to to the source code repo and grab the Zenodo DOI - Accept and publish the paper @@ -155,12 +155,16 @@ If you believe a submission should be rejected, for example, because it is out o - Ask EditorialBot to flag the submission as potentially out of scope with the command `@editorialbot query scope`. This command adds the `query-scope` label to the issue. - Mention to the author your reasons for flagging the submission as possibly out of scope, and give them an opportunity to defend their submission. -- The EiC on rotation will make a final determination of whether a submission is in scope, taking into account the feedback of other editors. +- The TEiC will make a final determination of whether a submission is in scope, taking into account the feedback of other editors. ### Voting on papers flagged as potentially out of scope Once per week, an email is sent to all JOSS editors with a summary of the papers that are currently flagged as potentially out of scope. Editors are asked to review these submissions and vote on the JOSS website if they have an opinion about a submission. +```eval_rst +.. important:: Your input (vote) on submissions that are undergoing a scope review is incredibly valuable to the EiC team. Please try and vote early, and often! +``` + ## Sample messages for authors and reviewers ### Sample email to potential reviewers @@ -312,14 +316,14 @@ This doesn’t mean that you’re the editor, just that you’ve been suggested ### Responding to editorial assignments -As documented above, usually, papers will be assigned to you by one of the AEiCs. We ask that editors do their best to respond in a timely fashion (~ 3 working days) to invites to edit a new submission. +As documented above, usually, papers will be assigned to you by one of the TEiCs. We ask that editors do their best to respond in a timely fashion (~ 3 working days) to invites to edit a new submission. ### Continued attention to assigned submissions As an editor, part of your role is to ensure that submissions you're responsible for are progressing smoothly through the editorial process. This means that: - During pre-review, and before reviewers have been identified, editors should be checking on their submissions twice per week to ensure reviewers are identified in a timely fashion. -- During review, editors should check on their submissions once or twice per week to see if their input is required. +- During review, editors should check on their submissions once or twice per week (even for just a few minutes) to see if their input is required (e.g., if someone has asked a question that requires your input). Your editorial dashboard (e.g. `https://joss.theoj.org/dashboard/youreditorname`) is the best place to check if there have been any updates to the papers you are editing. @@ -335,17 +339,7 @@ Sometimes reviews go quiet, either because a reviewer has failed to complete the ## Out of office -Sometimes we need time away from our editing duties at JOSS. The [joss-reviews](https://github.com/openjournals/joss-reviews) repository has the [OoO bot](https://github.com/swinton/probot-ooo) installed which means you can mark yourself as out of the office (and unable to respond to reviews) for a period of time e.g.: - -Mark yourself as OoO in one of the reviews you're editing in the [joss-reviews](https://github.com/openjournals/joss-reviews) repository like this: - -``` -/ooo January 18 until February 2 -``` - -Ooo bot will then respond to any mentions in the [joss-reviews](https://github.com/openjournals/joss-reviews) repository to let people know you're away. - -**Note, if you're planning on being out of the office for more than two weeks, please let the JOSS editorial team know.** +Sometimes we need time away from our editing duties at JOSS. If you're planning on being out of the office for more than two weeks, please let the JOSS editorial team know. ## Editorial buddy From 4a26b16ef749d53812757ed8e25d9c75cc07273c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 13 Mar 2023 12:04:13 +0100 Subject: [PATCH 514/609] Update link to reviewers in the pre-review issue template --- app/views/shared/meta_view_body.text.erb | 4 ++-- config/settings-development.yml | 2 +- config/settings-production.yml | 4 ++-- config/settings-test.yml | 2 +- spec/models/paper_spec.rb | 6 ++++-- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app/views/shared/meta_view_body.text.erb b/app/views/shared/meta_view_body.text.erb index 2fe8d2648..38fa71f20 100644 --- a/app/views/shared/meta_view_body.text.erb +++ b/app/views/shared/meta_view_body.text.erb @@ -20,7 +20,7 @@ Markdown: [![status](<%= url %>/papers/<%= paper.sha %>/status.svg)](<%= url %>/ **Author instructions** -<%- abbreviation, reviewers, botname = Rails.application.settings.values_at("abbreviation", "reviewers", "bot_username") %> +<%- abbreviation, reviewers_signup_url, reviewers_url, botname = Rails.application.settings.values_at("abbreviation", "reviewers_signup_url", "reviewers_url", "bot_username") %> <% if suggested_editor == "Pending" %> Thanks for submitting your paper to <%= abbreviation %> <%= paper.submitting_author.github_username %>. **Currently, there isn't a <%= abbreviation %> editor assigned** to your paper. <% else %> @@ -29,7 +29,7 @@ Thanks for submitting your paper to <%= abbreviation %> <%= paper.submitting_aut The AEiC suggestion for the handling editor is <%= suggested_editor %>. <% end %> -<%= paper.submitting_author.github_username %> if you have any suggestions for potential reviewers then please mention them here in this thread (without tagging them with an @). In addition, [this list of people](<%= reviewers %>) have already agreed to review for <%= abbreviation %> and may be suitable for this submission (please start at the bottom of the list). +<%= paper.submitting_author.github_username %> if you have any suggestions for potential reviewers then please mention them here in this thread (without tagging them with an @). In addition if you [volunteer to review for <%= abbreviation %>](<%= reviewers_signup_url %>), you can search [the list of people](<%= reviewers_url %>) that have already agreed to review and may be suitable for this submission. **Editor instructions** diff --git a/config/settings-development.yml b/config/settings-development.yml index 65432ec99..f1b03dc7d 100644 --- a/config/settings-development.yml +++ b/config/settings-development.yml @@ -14,9 +14,9 @@ github: "openjournals/joss" reviews: "openjournals/joss-reviews-testing" papers_repo: "openjournals/joss-papers-testing" papers_html_url: "https://www.theoj.org/joss-papers" +reviewers_url: "https://reviewers.joss.theoj.org" reviewers_signup_url: "https://reviewers.joss.theoj.org/join" product: "software" # the *thing* being submitted for review -reviewers: "https://bit.ly/joss-reviewers" submission_enquiry: |- **Project repository URL:** INSERT YOUR REPOSITORY LINK HERE diff --git a/config/settings-production.yml b/config/settings-production.yml index f32f0648d..4a5e31ab1 100644 --- a/config/settings-production.yml +++ b/config/settings-production.yml @@ -12,11 +12,11 @@ mastodon_url: "https://fosstodon.org/@JOSS" google_analytics: "UA-47852178-4" github: "openjournals/joss" reviews: "openjournals/joss-reviews" +papers_repo: "openjournals/joss-papers" papers_html_url: "https://www.theoj.org/joss-papers" +reviewers_url: "https://reviewers.joss.theoj.org" reviewers_signup_url: "https://reviewers.joss.theoj.org/join" -papers_repo: "openjournals/joss-papers" product: "software" # the *thing* being submitted for review -reviewers: "https://bit.ly/joss-reviewers" submission_enquiry: |- **Project repository URL:** INSERT YOUR REPOSITORY LINK HERE diff --git a/config/settings-test.yml b/config/settings-test.yml index ab6d89a8d..6a8215083 100644 --- a/config/settings-test.yml +++ b/config/settings-test.yml @@ -14,9 +14,9 @@ github: "openjournals/joss" reviews: "openjournals/joss-reviews-testing" papers_repo: "openjournals/joss-papers-testing" papers_html_url: "https://www.theoj.org/joss-papers" +reviewers_url: "https://reviewers.joss.theoj.org" reviewers_signup_url: "https://reviewers.joss.theoj.org/join" product: "software" # the *thing* being submitted for review -reviewers: "https://bit.ly/joss-reviewers" submission_enquiry: |- **Project repository URL:** INSERT YOUR REPOSITORY LINK HERE diff --git a/spec/models/paper_spec.rb b/spec/models/paper_spec.rb index 4ba3bd44a..bafd5e4e4 100644 --- a/spec/models/paper_spec.rb +++ b/spec/models/paper_spec.rb @@ -344,7 +344,8 @@ it "renders text" do is_expected.to match /#{paper.submitting_author.github_username}/ is_expected.to match /#{paper.submitting_author.name}/ - is_expected.to match /#{Rails.application.settings['reviewers']}/ + is_expected.to match /#{Rails.application.settings['reviewers_url']}/ + is_expected.to match /#{Rails.application.settings['reviewers_signup_url']}/ is_expected.to match /Important Editor/ end @@ -357,7 +358,8 @@ it "renders text" do is_expected.to match /#{paper.submitting_author.github_username}/ is_expected.to match /#{paper.submitting_author.name}/ - is_expected.to match /#{Rails.application.settings['reviewers']}/ + is_expected.to match /#{Rails.application.settings['reviewers_url']}/ + is_expected.to match /#{Rails.application.settings['reviewers_signup_url']}/ end it { is_expected.to match "Currently, there isn't a JOSS editor assigned" } From 9324ebb1ed6fb679172e947ed086b2ef0d218f94 Mon Sep 17 00:00:00 2001 From: Rik Huijzer Date: Tue, 14 Mar 2023 11:29:09 +0100 Subject: [PATCH 515/609] Make a paragraph in the README flow better --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bea0017ca..6d914caa8 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ The Journal of Open Source Software (JOSS) is an academic journal with a formal ### Don't we have enough journals already? -Perhaps, and in a perfect world we'd rather papers about software weren't necessary but we recognize that for most researchers, papers and not software are the currency of academic research and that citations are required for a good career. +In a perfect world, papers about software wouldn't be necessary. Unfortunately, for most researchers, academic currency relies on papers rather than software and citations are, thus, crucial for a successful career. We built this journal because we believe that after you've done the hard work of writing great software, it shouldn't take weeks and months to write a paper1 about your work. From b930aa53210e3d7e8cdfef9f103aa3b49d00b285 Mon Sep 17 00:00:00 2001 From: Pietro Monticone <38562595+pitmonticone@users.noreply.github.com> Date: Tue, 14 Mar 2023 12:08:51 +0100 Subject: [PATCH 516/609] Fix a typo --- docs/editing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/editing.md b/docs/editing.md index d44ef3055..92f1e8fa0 100644 --- a/docs/editing.md +++ b/docs/editing.md @@ -345,7 +345,7 @@ Sometimes we need time away from our editing duties at JOSS. If you're planning New editors are assigned an editorial 'buddy' from the existing editorial team. The buddy is there to help the new editor onboard successfully and to provide a dedicated resource for any questions they might have but don't feel comfortable posting to the editor mailing list. -Buddy assignments don't have a fixed term but generally require a committment for 1-2 months. +Buddy assignments don't have a fixed term but generally require a commitment for 1-2 months. Some things you might need to do as a buddy for a new editor: From cf7c061878dae7236581a463abae17d7f5d9bb91 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Thu, 16 Mar 2023 19:17:43 +0000 Subject: [PATCH 517/609] Change language for git branch --- app/views/papers/_form.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/papers/_form.html.erb b/app/views/papers/_form.html.erb index 1fbec2f25..95f717b34 100644 --- a/app/views/papers/_form.html.erb +++ b/app/views/papers/_form.html.erb @@ -26,7 +26,7 @@
            - <%= f.label "Git branch containing the paper" %> + <%= f.label "Name of git branch containing the paper, not the path" %> <%= f.text_field :git_branch, placeholder: "Leave blank if paper.md is in the default branch", class: "form-control" %>
            From ce63f37cc80a884f85305b997e079b78b03f9fde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 17 Mar 2023 12:49:34 +0100 Subject: [PATCH 518/609] Update Rails --- Gemfile | 2 +- Gemfile.lock | 112 +++++++++++++++++++++++++-------------------------- 2 files changed, 57 insertions(+), 57 deletions(-) diff --git a/Gemfile b/Gemfile index 9026f2748..b0992c4ad 100644 --- a/Gemfile +++ b/Gemfile @@ -18,7 +18,7 @@ gem 'octokit', '~> 6.0' gem 'pdf-reader', '~> 2.11.0' gem 'pg', '~> 1.4.6' gem 'will_paginate', '~> 3.3.1' -gem 'rails', '7.0.4.2' +gem 'rails', '7.0.4.3' gem "importmap-rails" gem "turbo-rails" gem "stimulus-rails" diff --git a/Gemfile.lock b/Gemfile.lock index ac43cd7ea..9b9990c4c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,47 +4,47 @@ GEM Ascii85 (1.1.0) aasm (5.5.0) concurrent-ruby (~> 1.0) - actioncable (7.0.4.2) - actionpack (= 7.0.4.2) - activesupport (= 7.0.4.2) + actioncable (7.0.4.3) + actionpack (= 7.0.4.3) + activesupport (= 7.0.4.3) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.4.2) - actionpack (= 7.0.4.2) - activejob (= 7.0.4.2) - activerecord (= 7.0.4.2) - activestorage (= 7.0.4.2) - activesupport (= 7.0.4.2) + actionmailbox (7.0.4.3) + actionpack (= 7.0.4.3) + activejob (= 7.0.4.3) + activerecord (= 7.0.4.3) + activestorage (= 7.0.4.3) + activesupport (= 7.0.4.3) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.4.2) - actionpack (= 7.0.4.2) - actionview (= 7.0.4.2) - activejob (= 7.0.4.2) - activesupport (= 7.0.4.2) + actionmailer (7.0.4.3) + actionpack (= 7.0.4.3) + actionview (= 7.0.4.3) + activejob (= 7.0.4.3) + activesupport (= 7.0.4.3) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.4.2) - actionview (= 7.0.4.2) - activesupport (= 7.0.4.2) + actionpack (7.0.4.3) + actionview (= 7.0.4.3) + activesupport (= 7.0.4.3) rack (~> 2.0, >= 2.2.0) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.4.2) - actionpack (= 7.0.4.2) - activerecord (= 7.0.4.2) - activestorage (= 7.0.4.2) - activesupport (= 7.0.4.2) + actiontext (7.0.4.3) + actionpack (= 7.0.4.3) + activerecord (= 7.0.4.3) + activestorage (= 7.0.4.3) + activesupport (= 7.0.4.3) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.4.2) - activesupport (= 7.0.4.2) + actionview (7.0.4.3) + activesupport (= 7.0.4.3) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -52,22 +52,22 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (7.0.4.2) - activesupport (= 7.0.4.2) + activejob (7.0.4.3) + activesupport (= 7.0.4.3) globalid (>= 0.3.6) - activemodel (7.0.4.2) - activesupport (= 7.0.4.2) - activerecord (7.0.4.2) - activemodel (= 7.0.4.2) - activesupport (= 7.0.4.2) - activestorage (7.0.4.2) - actionpack (= 7.0.4.2) - activejob (= 7.0.4.2) - activerecord (= 7.0.4.2) - activesupport (= 7.0.4.2) + activemodel (7.0.4.3) + activesupport (= 7.0.4.3) + activerecord (7.0.4.3) + activemodel (= 7.0.4.3) + activesupport (= 7.0.4.3) + activestorage (7.0.4.3) + actionpack (= 7.0.4.3) + activejob (= 7.0.4.3) + activerecord (= 7.0.4.3) + activesupport (= 7.0.4.3) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.4.2) + activesupport (7.0.4.3) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -310,27 +310,27 @@ GEM puma (6.1.1) nio4r (~> 2.0) racc (1.6.2) - rack (2.2.6.3) + rack (2.2.6.4) rack-livereload (0.3.17) rack rack-protection (3.0.5) rack - rack-test (2.0.2) + rack-test (2.1.0) rack (>= 1.3) - rails (7.0.4.2) - actioncable (= 7.0.4.2) - actionmailbox (= 7.0.4.2) - actionmailer (= 7.0.4.2) - actionpack (= 7.0.4.2) - actiontext (= 7.0.4.2) - actionview (= 7.0.4.2) - activejob (= 7.0.4.2) - activemodel (= 7.0.4.2) - activerecord (= 7.0.4.2) - activestorage (= 7.0.4.2) - activesupport (= 7.0.4.2) + rails (7.0.4.3) + actioncable (= 7.0.4.3) + actionmailbox (= 7.0.4.3) + actionmailer (= 7.0.4.3) + actionpack (= 7.0.4.3) + actiontext (= 7.0.4.3) + actionview (= 7.0.4.3) + activejob (= 7.0.4.3) + activemodel (= 7.0.4.3) + activerecord (= 7.0.4.3) + activestorage (= 7.0.4.3) + activesupport (= 7.0.4.3) bundler (>= 1.15.0) - railties (= 7.0.4.2) + railties (= 7.0.4.3) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -340,9 +340,9 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.5.0) loofah (~> 2.19, >= 2.19.1) - railties (7.0.4.2) - actionpack (= 7.0.4.2) - activesupport (= 7.0.4.2) + railties (7.0.4.3) + actionpack (= 7.0.4.3) + activesupport (= 7.0.4.3) method_source rake (>= 12.2) thor (~> 1.0) @@ -499,7 +499,7 @@ DEPENDENCIES pry-byebug puma rack-livereload - rails (= 7.0.4.2) + rails (= 7.0.4.3) rails-controller-testing (~> 1.0.5) redis (~> 5.0) responders From 1cb73ff7114e912328d9bc116fe9bc8a1ec695e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 17 Mar 2023 12:51:01 +0100 Subject: [PATCH 519/609] Bundle update --- Gemfile.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9b9990c4c..e15eff7ab 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -156,7 +156,7 @@ GEM retriable (>= 2.0, < 4.a) rexml webrick - google-apis-drive_v3 (0.36.0) + google-apis-drive_v3 (0.37.0) google-apis-core (>= 0.11.0, < 2.a) google-apis-sheets_v4 (0.22.0) google-apis-core (>= 0.11.0, < 2.a) @@ -192,7 +192,7 @@ GEM hashdiff (1.0.1) hashery (2.1.2) hashie (5.0.0) - honeybadger (5.2.0) + honeybadger (5.2.1) html-pipeline (2.14.3) activesupport (>= 2) nokogiri (>= 1.4) @@ -250,7 +250,7 @@ GEM net-ssh (>= 5.0.0, < 8.0.0) net-smtp (0.3.3) net-protocol - net-ssh (7.0.1) + net-ssh (7.1.0) newrelic_rpm (9.0.0) nio4r (2.5.8) nokogiri (1.14.2) @@ -270,12 +270,12 @@ GEM rack (>= 1.2, < 4) snaky_hash (~> 2.0) version_gem (~> 1.1) - octicons (18.1.0) - octicons_helper (18.1.0) + octicons (18.2.0) + octicons_helper (18.2.0) actionview - octicons (= 18.1.0) + octicons (= 18.2.0) railties - octokit (6.0.1) + octokit (6.1.0) faraday (>= 1, < 3) sawyer (~> 0.9) omniauth (2.1.1) @@ -353,7 +353,7 @@ GEM ffi (~> 1.0) redis (5.0.6) redis-client (>= 0.9.0) - redis-client (0.13.0) + redis-client (0.14.0) connection_pool regexp_parser (2.7.0) representable (3.2.0) @@ -370,7 +370,7 @@ GEM rspec-expectations (3.12.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-mocks (3.12.3) + rspec-mocks (3.12.4) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-rails (6.0.1) From ac0a3a816beb0cbd433bb2e96ba46c7f4b1216ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 12 Apr 2023 10:25:56 +0200 Subject: [PATCH 520/609] Bundle update --- Gemfile.lock | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e15eff7ab..a524621e1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -72,7 +72,7 @@ GEM i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - addressable (2.8.1) + addressable (2.8.4) public_suffix (>= 2.0.2, < 6.0) afm (0.2.2) bindex (0.8.1) @@ -80,7 +80,7 @@ GEM msgpack (~> 1.2) builder (3.2.4) byebug (11.1.3) - capybara (3.38.0) + capybara (3.39.0) addressable matrix mini_mime (>= 0.1.3) @@ -91,9 +91,9 @@ GEM xpath (~> 3.2) chartkick (5.0.1) coderay (1.1.3) - commonmarker (0.23.8) + commonmarker (0.23.9) concurrent-ruby (1.2.2) - connection_pool (2.3.0) + connection_pool (2.4.0) crack (0.4.5) rexml crass (1.0.6) @@ -216,7 +216,7 @@ GEM listen (3.8.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.19.1) + loofah (2.20.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) lumberjack (1.2.8) @@ -234,7 +234,7 @@ GEM mini_racer (0.6.3) libv8-node (~> 16.10.0.0) minitest (5.18.0) - msgpack (1.6.1) + msgpack (1.7.0) multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.3.0) @@ -251,14 +251,14 @@ GEM net-smtp (0.3.3) net-protocol net-ssh (7.1.0) - newrelic_rpm (9.0.0) - nio4r (2.5.8) - nokogiri (1.14.2) + newrelic_rpm (9.1.0) + nio4r (2.5.9) + nokogiri (1.14.3) mini_portile2 (~> 2.8.0) racc (~> 1.4) - nokogiri (1.14.2-x86_64-darwin) + nokogiri (1.14.3-x86_64-darwin) racc (~> 1.4) - nokogiri (1.14.2-x86_64-linux) + nokogiri (1.14.3-x86_64-linux) racc (~> 1.4) notiffany (0.1.3) nenv (~> 0.1) @@ -270,12 +270,12 @@ GEM rack (>= 1.2, < 4) snaky_hash (~> 2.0) version_gem (~> 1.1) - octicons (18.2.0) - octicons_helper (18.2.0) + octicons (18.3.0) + octicons_helper (18.3.0) actionview - octicons (= 18.2.0) + octicons (= 18.3.0) railties - octokit (6.1.0) + octokit (6.1.1) faraday (>= 1, < 3) sawyer (~> 0.9) omniauth (2.1.1) @@ -307,13 +307,13 @@ GEM byebug (~> 11.0) pry (>= 0.13, < 0.15) public_suffix (5.0.1) - puma (6.1.1) + puma (6.2.1) nio4r (~> 2.0) racc (1.6.2) rack (2.2.6.4) rack-livereload (0.3.17) rack - rack-protection (3.0.5) + rack-protection (3.0.6) rack rack-test (2.1.0) rack (>= 1.3) @@ -353,7 +353,7 @@ GEM ffi (~> 1.0) redis (5.0.6) redis-client (>= 0.9.0) - redis-client (0.14.0) + redis-client (0.14.1) connection_pool regexp_parser (2.7.0) representable (3.2.0) @@ -370,7 +370,7 @@ GEM rspec-expectations (3.12.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-mocks (3.12.4) + rspec-mocks (3.12.5) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-rails (6.0.1) @@ -400,10 +400,10 @@ GEM sawyer (0.9.2) addressable (>= 2.3.5) faraday (>= 0.17.3, < 3) - searchkick (5.2.1) + searchkick (5.2.2) activemodel (>= 5.2) hashie - selenium-webdriver (4.8.1) + selenium-webdriver (4.8.6) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) @@ -443,7 +443,7 @@ GEM uglifier (4.2.0) execjs (>= 0.3.0, < 3) vcr (6.1.0) - version_gem (1.1.1) + version_gem (1.1.2) web-console (4.2.0) actionview (>= 6.0.0) activemodel (>= 6.0.0) From 2fac840db73ceec1ff52073a193c6448c1c765a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 14 Apr 2023 12:27:18 +0200 Subject: [PATCH 521/609] Add lookup link to reviewers app --- app/views/shared/meta_view_body.text.erb | 4 ++-- config/settings-development.yml | 1 + config/settings-production.yml | 1 + config/settings-test.yml | 1 + spec/models/paper_spec.rb | 6 ++---- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/views/shared/meta_view_body.text.erb b/app/views/shared/meta_view_body.text.erb index 38fa71f20..e9f19e559 100644 --- a/app/views/shared/meta_view_body.text.erb +++ b/app/views/shared/meta_view_body.text.erb @@ -20,7 +20,7 @@ Markdown: [![status](<%= url %>/papers/<%= paper.sha %>/status.svg)](<%= url %>/ **Author instructions** -<%- abbreviation, reviewers_signup_url, reviewers_url, botname = Rails.application.settings.values_at("abbreviation", "reviewers_signup_url", "reviewers_url", "bot_username") %> +<%- abbreviation, reviewers_lookup_url, botname = Rails.application.settings.values_at("abbreviation", "reviewers_lookup_url", "bot_username") %> <% if suggested_editor == "Pending" %> Thanks for submitting your paper to <%= abbreviation %> <%= paper.submitting_author.github_username %>. **Currently, there isn't a <%= abbreviation %> editor assigned** to your paper. <% else %> @@ -29,7 +29,7 @@ Thanks for submitting your paper to <%= abbreviation %> <%= paper.submitting_aut The AEiC suggestion for the handling editor is <%= suggested_editor %>. <% end %> -<%= paper.submitting_author.github_username %> if you have any suggestions for potential reviewers then please mention them here in this thread (without tagging them with an @). In addition if you [volunteer to review for <%= abbreviation %>](<%= reviewers_signup_url %>), you can search [the list of people](<%= reviewers_url %>) that have already agreed to review and may be suitable for this submission. +<%= paper.submitting_author.github_username %> if you have any suggestions for potential reviewers then please mention them here in this thread (without tagging them with an @). You can search [the list of people](<%= reviewers_lookup_url %>) that have already agreed to review and may be suitable for this submission. **Editor instructions** diff --git a/config/settings-development.yml b/config/settings-development.yml index f1b03dc7d..4c8dabc74 100644 --- a/config/settings-development.yml +++ b/config/settings-development.yml @@ -16,6 +16,7 @@ papers_repo: "openjournals/joss-papers-testing" papers_html_url: "https://www.theoj.org/joss-papers" reviewers_url: "https://reviewers.joss.theoj.org" reviewers_signup_url: "https://reviewers.joss.theoj.org/join" +reviewers_lookup_url: "https://reviewers.joss.theoj.org/lookup" product: "software" # the *thing* being submitted for review submission_enquiry: |- **Project repository URL:** INSERT YOUR REPOSITORY LINK HERE diff --git a/config/settings-production.yml b/config/settings-production.yml index 4a5e31ab1..d92713b82 100644 --- a/config/settings-production.yml +++ b/config/settings-production.yml @@ -16,6 +16,7 @@ papers_repo: "openjournals/joss-papers" papers_html_url: "https://www.theoj.org/joss-papers" reviewers_url: "https://reviewers.joss.theoj.org" reviewers_signup_url: "https://reviewers.joss.theoj.org/join" +reviewers_lookup_url: "https://reviewers.joss.theoj.org/lookup" product: "software" # the *thing* being submitted for review submission_enquiry: |- **Project repository URL:** INSERT YOUR REPOSITORY LINK HERE diff --git a/config/settings-test.yml b/config/settings-test.yml index 6a8215083..3de672d4d 100644 --- a/config/settings-test.yml +++ b/config/settings-test.yml @@ -16,6 +16,7 @@ papers_repo: "openjournals/joss-papers-testing" papers_html_url: "https://www.theoj.org/joss-papers" reviewers_url: "https://reviewers.joss.theoj.org" reviewers_signup_url: "https://reviewers.joss.theoj.org/join" +reviewers_lookup_url: "https://reviewers.joss.theoj.org/lookup" product: "software" # the *thing* being submitted for review submission_enquiry: |- **Project repository URL:** INSERT YOUR REPOSITORY LINK HERE diff --git a/spec/models/paper_spec.rb b/spec/models/paper_spec.rb index bafd5e4e4..2ba5d24f4 100644 --- a/spec/models/paper_spec.rb +++ b/spec/models/paper_spec.rb @@ -344,8 +344,7 @@ it "renders text" do is_expected.to match /#{paper.submitting_author.github_username}/ is_expected.to match /#{paper.submitting_author.name}/ - is_expected.to match /#{Rails.application.settings['reviewers_url']}/ - is_expected.to match /#{Rails.application.settings['reviewers_signup_url']}/ + is_expected.to match /#{Rails.application.settings['reviewers_lookup_url']}/ is_expected.to match /Important Editor/ end @@ -358,8 +357,7 @@ it "renders text" do is_expected.to match /#{paper.submitting_author.github_username}/ is_expected.to match /#{paper.submitting_author.name}/ - is_expected.to match /#{Rails.application.settings['reviewers_url']}/ - is_expected.to match /#{Rails.application.settings['reviewers_signup_url']}/ + is_expected.to match /#{Rails.application.settings['reviewers_lookup_url']}/ end it { is_expected.to match "Currently, there isn't a JOSS editor assigned" } From cacba0a2308aa7c9249f9db8839779d3dd50721e Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 16 Apr 2023 16:38:16 +0100 Subject: [PATCH 522/609] Update submitting.md --- docs/submitting.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index 2dae052a2..0f6dc5472 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -54,10 +54,28 @@ Authors wishing to publish software deemed out of scope for JOSS have a few opti While we are happy to review submissions in standalone repositories, we also review submissions that are significant contributions made to existing packages. It is often better to have an integrated library or package of methods than a large number of single-method packages. -### Questions? Open an issue to ask +### Questions? Open an issue to ask. Authors wishing to make a pre-submission enquiry should [open an issue](https://github.com/openjournals/joss/issues/new?title=Pre-submission%20enquiry) on the JOSS repository. +## Conflict of Interest policy for authors + +Conflict of interest (COI) arises when an author has financial, personal, or other interests that may influence their research or the interpretation of its results. In order to maintain the integrity of the work published in JOSS, we require that authors disclose any potential conflicts of interest at submission time. + +### Policy + +**Disclosure:** All authors must disclose any potential conflicts of interest related to the research in their manuscript, including financial, personal, or professional relationships that may affect their objectivity. This includes any financial relationships, such as employment, consultancies, honoraria, stock ownership, or other financial interests that may be relevant to the research. + +**Acknowledgement:** Authors should acknowledge all sources of financial support for the research and include a statement indicating whether or not the sponsor had any involvement in the study design, data collection, analysis, or interpretation of the results. + +**Review process:** Editors and reviewers must be informed of any potential conflicts of interest before reviewing the manuscript to ensure unbiased evaluation of the research. + +**Mitigation of COI:** If a potential conflict of interest is identified, steps will be taken to mitigate the influence of the conflict, including but not limited to, disclosure in the manuscript and adjustment of the author's role in the research or removal of the author from the research entirely. + +**Compliance:** Authors who fail to comply with the COI policy may have their manuscript rejected or retracted if it is discovered after publication. + +**Review and Update:** This COI policy will be reviewed and updated regularly to ensure it remains relevant and effective. + ## Typical paper submission flow Before you submit, you should: From 77cd74f9d46c3b1a2998de563ce46405612a6f94 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 16 Apr 2023 20:38:17 +0100 Subject: [PATCH 523/609] Update docs/submitting.md Co-authored-by: Daniel S. Katz --- docs/submitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index 0f6dc5472..cc4a2c08f 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -60,7 +60,7 @@ Authors wishing to make a pre-submission enquiry should [open an issue](https:// ## Conflict of Interest policy for authors -Conflict of interest (COI) arises when an author has financial, personal, or other interests that may influence their research or the interpretation of its results. In order to maintain the integrity of the work published in JOSS, we require that authors disclose any potential conflicts of interest at submission time. +An author conflict of interest (COI) arises when an author has financial, personal, or other interests that may influence their research or the interpretation of its results. In order to maintain the integrity of the work published in JOSS, we require that authors disclose any potential conflicts of interest at submission time. ### Policy From 7eebf80963dd4e4168cff321ae9d9577da703798 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 16 Apr 2023 20:38:48 +0100 Subject: [PATCH 524/609] Update docs/submitting.md --- docs/submitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index cc4a2c08f..3f73b22c7 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -66,7 +66,7 @@ An author conflict of interest (COI) arises when an author has financial, person **Disclosure:** All authors must disclose any potential conflicts of interest related to the research in their manuscript, including financial, personal, or professional relationships that may affect their objectivity. This includes any financial relationships, such as employment, consultancies, honoraria, stock ownership, or other financial interests that may be relevant to the research. -**Acknowledgement:** Authors should acknowledge all sources of financial support for the research and include a statement indicating whether or not the sponsor had any involvement in the study design, data collection, analysis, or interpretation of the results. +**Acknowledgement:** Authors should acknowledge all sources of financial support for the research and include a statement indicating whether or not the sponsor had any involvement in the study design, data collection, analysis, or interpretation of the work. **Review process:** Editors and reviewers must be informed of any potential conflicts of interest before reviewing the manuscript to ensure unbiased evaluation of the research. From 51c7185c25e72d2fa161925e8877424febd1c1aa Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 16 Apr 2023 20:39:22 +0100 Subject: [PATCH 525/609] Update docs/submitting.md Co-authored-by: Daniel S. Katz --- docs/submitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index 3f73b22c7..7c046a664 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -72,7 +72,7 @@ An author conflict of interest (COI) arises when an author has financial, person **Mitigation of COI:** If a potential conflict of interest is identified, steps will be taken to mitigate the influence of the conflict, including but not limited to, disclosure in the manuscript and adjustment of the author's role in the research or removal of the author from the research entirely. -**Compliance:** Authors who fail to comply with the COI policy may have their manuscript rejected or retracted if it is discovered after publication. +**Compliance:** Authors who fail to comply with the COI policy may have their manuscript rejected or retracted if a conflict is discovered after publication. **Review and Update:** This COI policy will be reviewed and updated regularly to ensure it remains relevant and effective. From f1ecce32f629bbe5e60d17adf263971ef8b2de77 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 16 Apr 2023 20:40:39 +0100 Subject: [PATCH 526/609] Update submitting.md --- docs/submitting.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/submitting.md b/docs/submitting.md index 7c046a664..31d0b603f 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -70,8 +70,6 @@ An author conflict of interest (COI) arises when an author has financial, person **Review process:** Editors and reviewers must be informed of any potential conflicts of interest before reviewing the manuscript to ensure unbiased evaluation of the research. -**Mitigation of COI:** If a potential conflict of interest is identified, steps will be taken to mitigate the influence of the conflict, including but not limited to, disclosure in the manuscript and adjustment of the author's role in the research or removal of the author from the research entirely. - **Compliance:** Authors who fail to comply with the COI policy may have their manuscript rejected or retracted if a conflict is discovered after publication. **Review and Update:** This COI policy will be reviewed and updated regularly to ensure it remains relevant and effective. From 13bfb80bdc1421da170e472072f2ee1504e25512 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 17 Apr 2023 07:46:07 +0100 Subject: [PATCH 527/609] Update docs/submitting.md --- docs/submitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index 31d0b603f..98648363c 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -66,7 +66,7 @@ An author conflict of interest (COI) arises when an author has financial, person **Disclosure:** All authors must disclose any potential conflicts of interest related to the research in their manuscript, including financial, personal, or professional relationships that may affect their objectivity. This includes any financial relationships, such as employment, consultancies, honoraria, stock ownership, or other financial interests that may be relevant to the research. -**Acknowledgement:** Authors should acknowledge all sources of financial support for the research and include a statement indicating whether or not the sponsor had any involvement in the study design, data collection, analysis, or interpretation of the work. +**Acknowledgement:** Authors should acknowledge all sources of financial support for the work and include a statement indicating whether or not the sponsor had any involvement in it. **Review process:** Editors and reviewers must be informed of any potential conflicts of interest before reviewing the manuscript to ensure unbiased evaluation of the research. From d5b31abe5c85b910149b769215bed27dedf49f89 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 24 Apr 2023 09:09:38 +0100 Subject: [PATCH 528/609] Update docs/submitting.md --- docs/submitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index 60f907ed6..be2d60f37 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -334,7 +334,7 @@ After submission: - The handling editor will assign two or more JOSS reviewers, and the review will be carried out in the [JOSS reviews repository](https://github.com/openjournals/joss-reviews). - Authors will respond to reviewer-raised issues (if any are raised) on the submission repository's issue tracker. Reviewer and editor contributions, like any other contributions, should be acknowledged in the repository. - **JOSS reviews are iterative and conversational in nature.** Reviewers are encouraged to post comments/questions/suggestions in the review thread as they arise, and authors expected to respond in a timely fashion. -- Authors and reviewers are asked to be patient when waiting for a response from an editor. Please allow two weeks for an editor to respond to a question before prompting them for further action. +- Authors and reviewers are asked to be patient when waiting for a response from an editor. Please allow a week for an editor to respond to a question before prompting them for further action. - Upon successful completion of the review, authors will make a tagged release of the software, and deposit a copy of the repository with a data-archiving service such as [Zenodo](https://zenodo.org/) or [figshare](https://figshare.com/), get a DOI for the archive, and update the review issue thread with the version number and DOI. - After we assign a DOI for your accepted JOSS paper, its metadata is deposited with CrossRef and listed on the JOSS website. - The review issue will be closed, and an automatic tweet from [@JOSS_TheOJ](https://twitter.com/JOSS_TheOJ) will announce it! From 38bc8d1b173710ee8512e6d80e26ca434e12bfaa Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 24 Apr 2023 09:09:50 +0100 Subject: [PATCH 529/609] Update docs/submitting.md Co-authored-by: Daniel S. Katz --- docs/submitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index be2d60f37..9feb0023a 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -349,4 +349,4 @@ Please write admin@theoj.org with confidential matters such as retraction reques In case of a name change, the DOI will be unchanged and the paper will be updated without publishing a correction notice or notifying co-authors. -JOSS will also update CrosrRef metadata. +JOSS will also update Crossref metadata. From fc70f429fac654685ada376b5814ea7f84dc9691 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 24 Apr 2023 09:11:24 +0100 Subject: [PATCH 530/609] Update submitting.md --- docs/submitting.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/submitting.md b/docs/submitting.md index 9feb0023a..59c7b2df4 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -341,8 +341,6 @@ After submission: If you want to learn more details about the review process, take a look at the [reviewer guidelines](reviewer_guidelines). -### A note about - ## Confidential requests Please write admin@theoj.org with confidential matters such as retraction requests, report of misconduct, and retroactive author name changes. From 067b3f19b76ccefdee6fd50e3486c283a3c0285a Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Tue, 25 Apr 2023 07:01:48 +0100 Subject: [PATCH 531/609] Update docs/submitting.md --- docs/submitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index 59c7b2df4..a364e10a6 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -333,7 +333,7 @@ After submission: - An Associate Editor-in-Chief will carry out an initial check of your submission, and proceed to assign a handling editor. - The handling editor will assign two or more JOSS reviewers, and the review will be carried out in the [JOSS reviews repository](https://github.com/openjournals/joss-reviews). - Authors will respond to reviewer-raised issues (if any are raised) on the submission repository's issue tracker. Reviewer and editor contributions, like any other contributions, should be acknowledged in the repository. -- **JOSS reviews are iterative and conversational in nature.** Reviewers are encouraged to post comments/questions/suggestions in the review thread as they arise, and authors expected to respond in a timely fashion. +- **JOSS reviews are iterative and conversational in nature.** Reviewers are encouraged to post comments/questions/suggestions in the review thread as they arise, and authors are expected to respond in a timely fashion. - Authors and reviewers are asked to be patient when waiting for a response from an editor. Please allow a week for an editor to respond to a question before prompting them for further action. - Upon successful completion of the review, authors will make a tagged release of the software, and deposit a copy of the repository with a data-archiving service such as [Zenodo](https://zenodo.org/) or [figshare](https://figshare.com/), get a DOI for the archive, and update the review issue thread with the version number and DOI. - After we assign a DOI for your accepted JOSS paper, its metadata is deposited with CrossRef and listed on the JOSS website. From 94890ac6504ac4662eeca376f8917ae3d514b56d Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 1 May 2023 09:18:36 +0100 Subject: [PATCH 532/609] Adding example language for scope rejection. --- docs/editing.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/editing.md b/docs/editing.md index 92f1e8fa0..6a749c72d 100644 --- a/docs/editing.md +++ b/docs/editing.md @@ -252,7 +252,13 @@ At this point could you: I can then move forward with recommending acceptance of the submission. ``` -### +### Rejection due to out of scope/failing substantial scholarly effort test + +``` +@authorname - thanks for your submission to JOSS. Unfortunately, after review by the JOSS editorial team we've determined that this submission doesn't meet our [substantial scholarly effort](https://joss.readthedocs.io/en/latest/submitting.html#substantial-scholarly-effort) criterion. + +One possible alternative to JOSS is to follow [GitHub's guide](https://guides.github.com/activities/citable-code/) on how to create a permanent archive and DOI for your software. This DOI can then be used by others to cite your work. +``` ## Overview of editorial process From 0a1f5dac29ce9eef9fd842ffed61a65cea875732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 4 May 2023 11:39:10 +0200 Subject: [PATCH 533/609] Update editorial_bot.md --- docs/editorial_bot.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/editorial_bot.md b/docs/editorial_bot.md index 19127e6e4..3498f7fad 100644 --- a/docs/editorial_bot.md +++ b/docs/editorial_bot.md @@ -186,6 +186,12 @@ A series of checks can be run on the submitted repository with the command: EditorialBot will report back with an analysis of the source code and list authorship, contributions and file types information. EditorialBot will also detect the languages used in the repository, will count the number of words in the paper file and will look for an Open Source License and for a *Statement of need* section in the paper. +It is possible to run the checks on a specific git branch: + +```text +@editorialbot check repository from branch +``` + ### Post-review checklist Editors can get a checklist to remind all steps to do after the reviewers have finished their reviews and recommended the paper for acceptance: @@ -323,4 +329,4 @@ JOSS editors-in-chief can withdraw a submission with the following command: # Ping the EiCs for the current track @editorialbot ping track-eic -``` \ No newline at end of file +``` From e707170a94d8fe6c97e2ddececce8cf994631df1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 5 May 2023 11:16:59 +0200 Subject: [PATCH 534/609] Make alert valid for any journal --- app/views/shared/_profile.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/_profile.html.erb b/app/views/shared/_profile.html.erb index af9f90756..84aa7a8e1 100644 --- a/app/views/shared/_profile.html.erb +++ b/app/views/shared/_profile.html.erb @@ -1,3 +1,3 @@ From e9b38e8ac9fdf69aa8a0aba612be84e4840aa7eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 17 May 2023 16:05:50 +0200 Subject: [PATCH 535/609] Update Ruby to 3.2.2 --- .github/workflows/tests.yml | 2 +- .ruby-version | 2 +- Gemfile | 2 +- Gemfile.lock | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 69c2bcf5d..8402b0c8b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,7 +15,7 @@ jobs: - name: Install Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 3.2.1 + ruby-version: 3.2.2 bundler-cache: true - name: Install Elasticsearch uses: ankane/setup-elasticsearch@v1 diff --git a/.ruby-version b/.ruby-version index e4604e3af..be94e6f53 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.2.1 +3.2.2 diff --git a/Gemfile b/Gemfile index b0992c4ad..1f6cc2855 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,5 @@ source 'https://rubygems.org' -ruby '3.2.1' +ruby '3.2.2' gem 'aasm', '~> 5.5.0' gem 'chartkick' diff --git a/Gemfile.lock b/Gemfile.lock index a524621e1..c41658a2f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -520,7 +520,7 @@ DEPENDENCIES will_paginate (~> 3.3.1) RUBY VERSION - ruby 3.2.1p31 + ruby 3.2.2p53 BUNDLED WITH 2.4.7 From d213dccbd024450a5a4f9ae7b57dc28aa5f0720b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 18 May 2023 14:10:50 +0200 Subject: [PATCH 536/609] Refactor content type selection in new paper form --- app/views/papers/_form.html.erb | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/app/views/papers/_form.html.erb b/app/views/papers/_form.html.erb index 95f717b34..ea3b533d5 100644 --- a/app/views/papers/_form.html.erb +++ b/app/views/papers/_form.html.erb @@ -1,14 +1,21 @@ <%= form_for paper do |f| %>
            <%= render partial: "shared/errors", locals: { object: paper } if paper.errors.any? %> - <%- if paper_types.present? %> -
            -
            <%= f.label :kind, "Type" %>
            -
            <%= f.select :kind, paper_types %>
            -
            - <%- end %>
            +<%- if paper_types.present? %> +
            +
            +
            + <%= f.label :kind, "Type of content" %> + <%= f.select(:kind, paper_types, {}, class: "form-control") %> +
            +
            +
            +
            +
            +<%- end %> +
            From 333d76f8434f8aff57214393b51d13828b369374 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 18 May 2023 14:13:09 +0200 Subject: [PATCH 537/609] Update label --- app/views/papers/_form.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/papers/_form.html.erb b/app/views/papers/_form.html.erb index ea3b533d5..49090a9e5 100644 --- a/app/views/papers/_form.html.erb +++ b/app/views/papers/_form.html.erb @@ -7,7 +7,7 @@
            - <%= f.label :kind, "Type of content" %> + <%= f.label :kind, "Content type" %> <%= f.select(:kind, paper_types, {}, class: "form-control") %>
            From 30e79677080f9b7654e67f8c093cf9b57ec5736f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 19 May 2023 10:55:53 +0200 Subject: [PATCH 538/609] Update task description --- lib/tasks/tracks.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/tracks.rake b/lib/tasks/tracks.rake index d6885d161..7a9f8d2c1 100644 --- a/lib/tasks/tracks.rake +++ b/lib/tasks/tracks.rake @@ -42,7 +42,7 @@ namespace :tracks do end end - desc "Import tracks and subjects from the lib/tracks.yml file" + desc "Print info on what tracks and subjects will be imported when running the import:subjects task" task dry_run: :environment do tracks_info = YAML.load_file(Rails.root + "lib/tracks.yml") tracks_info["tracks"].each_pair do |k, v| From e6fb2631b06fbae19edca0c9e02e9314ed8835ad Mon Sep 17 00:00:00 2001 From: Ilona <111542584+IlonaSilverwood@users.noreply.github.com> Date: Wed, 24 May 2023 05:59:25 -0700 Subject: [PATCH 539/609] Add formatting and Markdown sections to submitting.md --- docs/submitting.md | 291 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 291 insertions(+) diff --git a/docs/submitting.md b/docs/submitting.md index 8a3f7209f..694096961 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -106,6 +106,297 @@ As this short list shows, JOSS papers are only expected to contain a limited set .. important:: Your paper will be reviewed by two or more reviewers in a public GitHub issue. Take a look at the `review checklist `_ and `review criteria `_ to better understand how your submission will be reviewed. ``` +## How should my paper be formatted? + +Submitted articles must use Markdown and must provide a metadata section at the beginning of the article. Format metadata using YAML, a human-friendly data serialization language (The Official YAML Web Site, 2022). The information provided is included in the title and sidebar of the generated PDF. + +### Article metadata + +#### Names + +Providing an author name is straight-forward: just set the `name` attribute. However, sometimes more control over the name is required. + +##### Name parts + +There are many ways to describe the parts of names; we support the following: + +- given names, +- surname, +- dropping particle, +- non-dropping particle, +- and suffix. + +We use a heuristic to parse names into these components. This parsing may produce the wrong result, in which case it is necessary to provide the relevant parts explicitly. + +The respective field names are + +- `given-names` (aliases: `given`, `first`, `firstname`) +- `surname` (aliases: `family`) +- `suffix` + +The full display name will be constructed from these parts, unless the `name` attribute is given as well. + +##### Particles + +It's usually enough to place particles like "van", "von", "della", etc. at the end of the given name or at the beginning of the surname, depending on the details of how the name is used. + +- `dropping-particle` +- `non-dropping-particle` + +##### Literal names + +The automatic construction of the full name from parts is geared towards common Western names. It may therefore be necessary sometimes to provide the display name explicitly. This is possible by setting the `literal` field, e.g., `literal: Tachibana Taki`. This feature should only be used as a last resort. + +##### Example + +```yaml +authors: + - name: John Doe + affiliation: '1' + + - given-names: Ludwig + dropping-particle: van + surname: Beethoven + affiliation: '3' + + # not recommended, but common aliases can be used for name parts. + - given: Louis + non-dropping-particle: de + family: Broglie + affiliation: '4' +``` + +The name parts can also be collected under the author's `name`: + +``` yaml +authors: + - name: + given-names: Kari + surname: Nordmann +``` + + + + + + + +### Internal references + +The goal of Open Journals is to provide authors with a seamless and pleasant writing experience. Since Markdown has no default mechanism to handle document internal references, known as “cross-references”, Open Journals supports a limited set of LaTex commands. In brief, elements that were marked with `\label` and can be referenced with `\ref` and `\autoref`. + +[Open Journals]: https://theoj.org + + ![View of coastal dunes in a nature reserve on Sylt, an island in + the North Sea. Sylt (Danish: *Slid*) is Germany's northernmost + island.](sylt.jpg){#sylt width="100%"} + +#### Tables and figures + +Tables and figures can be referenced if they are given a *label* in the caption. In pure Markdown, this can be done by adding an empty span `[]{label="floatlabel"}` to the caption. LaTeX syntax is supported as well: `\label{floatlabel}`. + +Link to a float element, i.e., a table or figure, with `\ref{identifier}` or `\autoref{identifier}`, where `identifier` must be defined in the float's caption. The former command results in just the float's number, while the latter inserts the type and number of the referenced float. E.g., in this document `\autoref{proglangs}` yields "\autoref{proglangs}", while `\ref{proglangs}` gives "\ref{proglangs}". + +: Comparison of programming languages used in the publishing tool. []{label="proglangs"} + + | Language | Typing | Garbage Collected | Evaluation | Created | + |----------|:---------------:|:-----------------:|------------|---------| + | Haskell | static, strong | yes | non-strict | 1990 | + | Lua | dynamic, strong | yes | strict | 1993 | + | C | static, weak | no | strict | 1972 | + +#### Equations + +Cross-references to equations work similarly to those for floating elements. The difference is that, since captions are not supported for equations, the label must be included in the equation: + + $$a^n + b^n = c^n \label{fermat}$$ + +Referencing, however, is identical, with `\autoref{eq:fermat}` resulting in "\autoref{eq:fermat}". + +$$a^n + b^n = c^n \label{eq:fermat}$$ + +Authors who do not wish to include the label directly in the formula can use a Markdown span to add the label: + + [$$a^n + b^n = c^n$$]{label="eq:fermat"} + +### Behind the scenes + +Readers may wonder about the reasons behind some of the choices made for paper writing. Most often, the decisions were driven by radical pragmatism. For example, Markdown is not only nearly ubiquitous in the realms of software, but it can also be converted into many different output formats. The archiving standard for scientific articles is JATS, and the most popular publishing format is PDF. Open Journals has built its pipeline based on [pandoc](https://pandoc.org), a universal document converter that can produce both of these publishing formats as well as many more. + +A common method for PDF generation is to go via LaTeX. However, support for tagging -- a requirement for accessible PDFs -- is not readily available for LaTeX. The current method used ConTeXt, to produce tagged PDF/A-3, a format suited for archiving [@pdfa3]. + +### Markdown +Markdown is a lightweight markup language used frequently in software development and online environments. Based on email conventions, it was developed in 2004 by John Gruber and Aaron Swartz. + +#### Inline markup + +The markup in Markdown should be semantic, not presentations. The table below has some basic examples. + + +---------------------+-------------------------+-----------------------+ + | Markup | Markdown example | Rendered output | + +:====================+:=======================:+:=====================:+ + | emphasis | `*this*` | *this* | + +---------------------+-------------------------+-----------------------+ + | strong emphasis | `**that**` | **that** | + +---------------------+-------------------------+-----------------------+ + | strikeout | `~~not this~~` | ~~not this~~ | + +---------------------+-------------------------+-----------------------+ + | subscript | `H~2~O` | H~2~O | + +---------------------+-------------------------+-----------------------+ + | superscript | `Ca^2+^` | Ca^2+^ | + +---------------------+-------------------------+-----------------------+ + | underline | `[underline]{.ul}` | [underline]{.ul} | + +---------------------+-------------------------+-----------------------+ + | small caps | `[Small Caps]{.sc}` | [Small Caps]{.sc} | + +---------------------+-------------------------+-----------------------+ + | inline code | `` `return 23` `` | `return 23` | + +---------------------+-------------------------+-----------------------+ + +#### Links + +Link syntax is `[link description](targetURL)`. E.g., this link to the [Journal of Open Source Software](https://joss.theoj.org/) is written as \ +`[Journal of Open Source Software](https://joss.theoj.org/)`. + +Open Journal publications are not limited by the constraints of print publications. We encourage authors to use hyperlinks for websites and other external resources. However, the standard scientific practice of citing the relevant publications should be followed regardless. + +#### Grid Tables + +Grid tables are made up of special characters which form the rows and columns, and also change table and style variables. + +Complex information can be conveyed by using the following features not found in other table styles: + +* spanning columns +* adding footers +* using intra-cellular body elements +* creating multi-row headers + +Grid table syntax uses the characters "-", "=", "|", and "+" to represent the table outline: + +* Hyphens (-) separate horizontal rows. +* Equals signs (=) produce a header when used to create the row under the header text. +* Equals signs (=) create a footer when used to enclose the last row of the table. +* Vertical bars (|) separate columns and also adjusts the depth of a row. +* Plus signs (+) indicates a juncture between horizontal and parallel lines. + +Note: Inserting a colon (:) at the boundaries of the separator line after the header will change text alignment. If there is no header, insert colons into the top line. + +Sample grid table: + + +-------------------+------------+----------+----------+ + | Header 1 | Header 2 | Header 3 | Header 4 | + | | | | | + +:=================:+:==========:+:========:+:========:+ + | row 1, column 1 | column 2 | column 3 | column 4 | + +-------------------+------------+----------+----------+ + | row 2 | cells span columns | + +-------------------+------------+---------------------+ + | row 3 | cells | - body | + +-------------------+ span rows | - elements | + | row 4 | | - here | + +===================+============+=====================+ + | Footer | + +===================+============+=====================+ + +#### Figures + +To create a figure, a captioned image must appear by itself in a paragraph. The Markdown syntax for a figure is a link, preceded by an exclamation point (!) and a description. +Example: +`![This description will be the figure caption](path/to/image.png)` + +In order to create a figure rather than an image, there must be a description included and the figure syntax must be the only element in the paragraph, i.e., it must be surrounded by blank lines. + +Images that are larger than the text area are scaled to fit the page. You can give images an explicit height and/or width, e.g. when adding an image as part of a paragraph. The Markdown `![Nyan cat](nyan-cat.png){height="9pt"}` includes the image "nyan-cat.png" Nyan cat{height="9pt"} while scaling it to a height of 9 pt. + +#### Citations + +Bibliographic data should be collected in a file `paper.bib`; it should be formatted in the BibLaTeX format, although plain BibTeX is acceptable as well. All major citation managers offer to export these formats. + +Cite a bibliography entry by referencing its identifier: `[@upper1974]` will create the reference "[@upper1974]". Omit the brackets when referring to the author as part of a sentence: "For a case study on writers block, see @upper1974." Please refer to the [pandoc manual](https://pandoc.org/MANUAL#extension-citations) for additional features, including page locators, prefixes, suffixes, and suppression of author names in citations. + +#### Mathematical Formulæ + +Mark equations and other math content with dollar signs (`$`). Use a single dollar sign (`$`) for math that will appear directly within the text. Use two dollar signs (`$$`) when the formula is to be presented centered and on a separate line, in "display" style. The formula itself must be given using TeX syntax. + +To give some examples: When discussing a variable $x$ or a short formula like $\sin \frac{\pi}{2}$, we would write `$x$` and `$\sin \frac{\pi}{2}$`, respectively. However, for more complex formulæ, display style is more appropriate. Writing `$$\int_{-\infty}^{+\infty} e^{-x^2} \, dx = \sqrt{\pi}$$` will give us + +$$\int_{-\infty}^{+\infty} e^{-x^2} \, dx = \sqrt{\pi}$$ + +#### Footnotes + +Syntax for footnotes centers around the "caret" character `^`. The symbol is also used as a delimiter for superscript text and thereby mirrors the superscript numbers used to mark a footnote in the final text.[^markers] + +``` markdown +Articles are published under a Creative Commons license[^1]. +Software should use an OSI-approved license. + +[^1]: An open license that allows reuse. +``` + +The above example results in the following output: + +> Articles are published under a Creative Commons license[^1]. Software should use an OSI-approved license. +> +> [^1]: An open license that allows reuse. + +Note: numbers do not have to be sequential, they will be reordered automatically in the publishing step. In fact, the identifier of a note can be any sequence of characters, like `[^marker]`, but may not contain whitespace characters. + +[^markers]: it should be noted that some publishers prefer symbols or letters as footnote markers. + +#### Blocks + +The larger components of a document are called "blocks". + +##### Headings + +Headings are added with `#` followed by a space, where each additional `#` demotes the heading to a level lower in the hierarchy: + +```markdown +# Section + +## Subsection + +### Subsubsection +``` + +Please start headings on the first level. The maximum supported level is 5, but paper authors are encouraged to limit themselves to headings of the first two or three levels. + +###### Deeper nesting + +Fourth- and fifth-level subsections – like this one and the following heading – are supported by the system; however, their use is discouraged. Use lists instead of forth- and fifth-level headings. + + +#### Lists + +Bullet lists and numbered lists, a.k.a. enumerations, offer an additional method to present sequential and hierarchical information. + +``` markdown +- apples +- citrus fruits + - lemons + - oranges +``` + +- apples +- citrus fruits + - lemons + - oranges + +Enumerations start with the number of the first item. Using the the first two [laws of thermodynamics](https://en.wikipedia.org/wiki/Laws_of_thermodynamics) as example, + +``` markdown +0. If two systems are each in thermal equilibrium with a third, they are + also in thermal equilibrium with each other. +1. In a process without transfer of matter, the change in internal + energy, $\Delta U$, of a thermodynamic system is equal to the energy + gained as heat, $Q$, less the thermodynamic work, $W$, done by the + system on its surroundings. $$\Delta U = Q - W$$ +``` + +Rendered: + +0. If two systems are each in thermal equilibrium with a third, they are also in thermal equilibrium with each other. +1. In a process without transfer of matter, the change in internal energy, $\Delta U$, of a thermodynamic system is equal to the energy gained as heat, $Q$, less the thermodynamic work, $W$, done by the system on its surroundings. $$\Delta U = Q - W$$ + ## Example paper and bibliography This example `paper.md` is adapted from _Gala: A Python package for galactic dynamics_ by Adrian M. Price-Whelan [http://doi.org/10.21105/joss.00388](http://doi.org/10.21105/joss.00388): From 8a9fbc9accb9b13814af528b9d9a0bb83a64ad82 Mon Sep 17 00:00:00 2001 From: Ilona <111542584+IlonaSilverwood@users.noreply.github.com> Date: Wed, 24 May 2023 06:18:42 -0700 Subject: [PATCH 540/609] Change Inline markup table --- docs/submitting.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/submitting.md b/docs/submitting.md index 694096961..aebb4bd10 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -232,25 +232,25 @@ Markdown is a lightweight markup language used frequently in software developmen The markup in Markdown should be semantic, not presentations. The table below has some basic examples. - +---------------------+-------------------------+-----------------------+ - | Markup | Markdown example | Rendered output | - +:====================+:=======================:+:=====================:+ - | emphasis | `*this*` | *this* | - +---------------------+-------------------------+-----------------------+ - | strong emphasis | `**that**` | **that** | - +---------------------+-------------------------+-----------------------+ - | strikeout | `~~not this~~` | ~~not this~~ | - +---------------------+-------------------------+-----------------------+ - | subscript | `H~2~O` | H~2~O | - +---------------------+-------------------------+-----------------------+ - | superscript | `Ca^2+^` | Ca^2+^ | - +---------------------+-------------------------+-----------------------+ - | underline | `[underline]{.ul}` | [underline]{.ul} | - +---------------------+-------------------------+-----------------------+ - | small caps | `[Small Caps]{.sc}` | [Small Caps]{.sc} | - +---------------------+-------------------------+-----------------------+ - | inline code | `` `return 23` `` | `return 23` | - +---------------------+-------------------------+-----------------------+ ++---------------------+-------------------------+-----------------------+ +| Markup | Markdown example | Rendered output | ++:====================+:=======================:+:=====================:+ +| emphasis | `*this*` | *this* | ++---------------------+-------------------------+-----------------------+ +| strong emphasis | `**that**` | **that** | ++---------------------+-------------------------+-----------------------+ +| strikeout | `~~not this~~` | ~~not this~~ | ++---------------------+-------------------------+-----------------------+ +| subscript | `H~2~O` | H~2~O | ++---------------------+-------------------------+-----------------------+ +| superscript | `Ca^2+^` | Ca^2+^ | ++---------------------+-------------------------+-----------------------+ +| underline | `[underline]{.ul}` | [underline]{.ul} | ++---------------------+-------------------------+-----------------------+ +| small caps | `[Small Caps]{.sc}` | [Small Caps]{.sc} | ++---------------------+-------------------------+-----------------------+ +| inline code | `` `return 23` `` | `return 23` | ++---------------------+-------------------------+-----------------------+ #### Links From c18c8394050b4aba928ca04e9d26db5bd36b047e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 25 May 2023 11:48:45 +0200 Subject: [PATCH 541/609] Update Rails --- Gemfile | 2 +- Gemfile.lock | 132 +++++++++++++++++++++++++-------------------------- 2 files changed, 67 insertions(+), 67 deletions(-) diff --git a/Gemfile b/Gemfile index 1f6cc2855..1b4cdce29 100644 --- a/Gemfile +++ b/Gemfile @@ -18,7 +18,7 @@ gem 'octokit', '~> 6.0' gem 'pdf-reader', '~> 2.11.0' gem 'pg', '~> 1.4.6' gem 'will_paginate', '~> 3.3.1' -gem 'rails', '7.0.4.3' +gem 'rails', '7.0.5' gem "importmap-rails" gem "turbo-rails" gem "stimulus-rails" diff --git a/Gemfile.lock b/Gemfile.lock index c41658a2f..2182c5f65 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,47 +4,47 @@ GEM Ascii85 (1.1.0) aasm (5.5.0) concurrent-ruby (~> 1.0) - actioncable (7.0.4.3) - actionpack (= 7.0.4.3) - activesupport (= 7.0.4.3) + actioncable (7.0.5) + actionpack (= 7.0.5) + activesupport (= 7.0.5) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.4.3) - actionpack (= 7.0.4.3) - activejob (= 7.0.4.3) - activerecord (= 7.0.4.3) - activestorage (= 7.0.4.3) - activesupport (= 7.0.4.3) + actionmailbox (7.0.5) + actionpack (= 7.0.5) + activejob (= 7.0.5) + activerecord (= 7.0.5) + activestorage (= 7.0.5) + activesupport (= 7.0.5) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.4.3) - actionpack (= 7.0.4.3) - actionview (= 7.0.4.3) - activejob (= 7.0.4.3) - activesupport (= 7.0.4.3) + actionmailer (7.0.5) + actionpack (= 7.0.5) + actionview (= 7.0.5) + activejob (= 7.0.5) + activesupport (= 7.0.5) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.4.3) - actionview (= 7.0.4.3) - activesupport (= 7.0.4.3) - rack (~> 2.0, >= 2.2.0) + actionpack (7.0.5) + actionview (= 7.0.5) + activesupport (= 7.0.5) + rack (~> 2.0, >= 2.2.4) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.4.3) - actionpack (= 7.0.4.3) - activerecord (= 7.0.4.3) - activestorage (= 7.0.4.3) - activesupport (= 7.0.4.3) + actiontext (7.0.5) + actionpack (= 7.0.5) + activerecord (= 7.0.5) + activestorage (= 7.0.5) + activesupport (= 7.0.5) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.4.3) - activesupport (= 7.0.4.3) + actionview (7.0.5) + activesupport (= 7.0.5) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -52,22 +52,22 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (7.0.4.3) - activesupport (= 7.0.4.3) + activejob (7.0.5) + activesupport (= 7.0.5) globalid (>= 0.3.6) - activemodel (7.0.4.3) - activesupport (= 7.0.4.3) - activerecord (7.0.4.3) - activemodel (= 7.0.4.3) - activesupport (= 7.0.4.3) - activestorage (7.0.4.3) - actionpack (= 7.0.4.3) - activejob (= 7.0.4.3) - activerecord (= 7.0.4.3) - activesupport (= 7.0.4.3) + activemodel (7.0.5) + activesupport (= 7.0.5) + activerecord (7.0.5) + activemodel (= 7.0.5) + activesupport (= 7.0.5) + activestorage (7.0.5) + actionpack (= 7.0.5) + activejob (= 7.0.5) + activerecord (= 7.0.5) + activesupport (= 7.0.5) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.4.3) + activesupport (7.0.5) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -198,7 +198,7 @@ GEM nokogiri (>= 1.4) http_parser.rb (0.8.0) httpclient (2.8.3) - i18n (1.12.0) + i18n (1.13.0) concurrent-ruby (~> 1.0) importmap-rails (1.1.5) actionpack (>= 6.0.0) @@ -216,9 +216,9 @@ GEM listen (3.8.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.20.0) + loofah (2.21.3) crass (~> 1.0.2) - nokogiri (>= 1.5.9) + nokogiri (>= 1.12.0) lumberjack (1.2.8) mail (2.8.1) mini_mime (>= 0.1.1) @@ -230,7 +230,7 @@ GEM memoist (0.16.2) method_source (1.0.0) mini_mime (1.1.2) - mini_portile2 (2.8.1) + mini_portile2 (2.8.2) mini_racer (0.6.3) libv8-node (~> 16.10.0.0) minitest (5.18.0) @@ -253,12 +253,12 @@ GEM net-ssh (7.1.0) newrelic_rpm (9.1.0) nio4r (2.5.9) - nokogiri (1.14.3) - mini_portile2 (~> 2.8.0) + nokogiri (1.15.2) + mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.14.3-x86_64-darwin) + nokogiri (1.15.2-x86_64-darwin) racc (~> 1.4) - nokogiri (1.14.3-x86_64-linux) + nokogiri (1.15.2-x86_64-linux) racc (~> 1.4) notiffany (0.1.3) nenv (~> 0.1) @@ -310,27 +310,27 @@ GEM puma (6.2.1) nio4r (~> 2.0) racc (1.6.2) - rack (2.2.6.4) + rack (2.2.7) rack-livereload (0.3.17) rack rack-protection (3.0.6) rack rack-test (2.1.0) rack (>= 1.3) - rails (7.0.4.3) - actioncable (= 7.0.4.3) - actionmailbox (= 7.0.4.3) - actionmailer (= 7.0.4.3) - actionpack (= 7.0.4.3) - actiontext (= 7.0.4.3) - actionview (= 7.0.4.3) - activejob (= 7.0.4.3) - activemodel (= 7.0.4.3) - activerecord (= 7.0.4.3) - activestorage (= 7.0.4.3) - activesupport (= 7.0.4.3) + rails (7.0.5) + actioncable (= 7.0.5) + actionmailbox (= 7.0.5) + actionmailer (= 7.0.5) + actionpack (= 7.0.5) + actiontext (= 7.0.5) + actionview (= 7.0.5) + activejob (= 7.0.5) + activemodel (= 7.0.5) + activerecord (= 7.0.5) + activestorage (= 7.0.5) + activesupport (= 7.0.5) bundler (>= 1.15.0) - railties (= 7.0.4.3) + railties (= 7.0.5) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -340,9 +340,9 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.5.0) loofah (~> 2.19, >= 2.19.1) - railties (7.0.4.3) - actionpack (= 7.0.4.3) - activesupport (= 7.0.4.3) + railties (7.0.5) + actionpack (= 7.0.5) + activesupport (= 7.0.5) method_source rake (>= 12.2) thor (~> 1.0) @@ -428,7 +428,7 @@ GEM sprockets (>= 3.0.0) stimulus-rails (1.2.1) railties (>= 6.0.0) - thor (1.2.1) + thor (1.2.2) tilt (2.1.0) timeout (0.3.2) trailblazer-option (0.1.2) @@ -461,7 +461,7 @@ GEM will_paginate (3.3.1) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.6.7) + zeitwerk (2.6.8) PLATFORMS ruby @@ -499,7 +499,7 @@ DEPENDENCIES pry-byebug puma rack-livereload - rails (= 7.0.4.3) + rails (= 7.0.5) rails-controller-testing (~> 1.0.5) redis (~> 5.0) responders From 32240e98eff5a742a07fe985dcec5b088bb48bfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 25 May 2023 11:51:49 +0200 Subject: [PATCH 542/609] Bundle update --- Gemfile.lock | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 2182c5f65..970e1303e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -80,7 +80,7 @@ GEM msgpack (~> 1.2) builder (3.2.4) byebug (11.1.3) - capybara (3.39.0) + capybara (3.39.1) addressable matrix mini_mime (>= 0.1.3) @@ -89,11 +89,11 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - chartkick (5.0.1) + chartkick (5.0.2) coderay (1.1.3) commonmarker (0.23.9) concurrent-ruby (1.2.2) - connection_pool (2.4.0) + connection_pool (2.4.1) crack (0.4.5) rexml crass (1.0.6) @@ -156,7 +156,7 @@ GEM retriable (>= 2.0, < 4.a) rexml webrick - google-apis-drive_v3 (0.37.0) + google-apis-drive_v3 (0.39.0) google-apis-core (>= 0.11.0, < 2.a) google-apis-sheets_v4 (0.22.0) google-apis-core (>= 0.11.0, < 2.a) @@ -172,7 +172,7 @@ GEM multi_json (~> 1.11) os (>= 0.9, < 2.0) signet (~> 0.15) - groupdate (6.2.0) + groupdate (6.2.1) activesupport (>= 5.2) guard (2.18.0) formatador (>= 0.2.4) @@ -200,7 +200,7 @@ GEM httpclient (2.8.3) i18n (1.13.0) concurrent-ruby (~> 1.0) - importmap-rails (1.1.5) + importmap-rails (1.1.6) actionpack (>= 6.0.0) railties (>= 6.0.0) issue (1.0.0) @@ -234,7 +234,7 @@ GEM mini_racer (0.6.3) libv8-node (~> 16.10.0.0) minitest (5.18.0) - msgpack (1.7.0) + msgpack (1.7.1) multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.3.0) @@ -251,7 +251,7 @@ GEM net-smtp (0.3.3) net-protocol net-ssh (7.1.0) - newrelic_rpm (9.1.0) + newrelic_rpm (9.2.2) nio4r (2.5.9) nokogiri (1.15.2) mini_portile2 (~> 2.8.2) @@ -270,10 +270,10 @@ GEM rack (>= 1.2, < 4) snaky_hash (~> 2.0) version_gem (~> 1.1) - octicons (18.3.0) - octicons_helper (18.3.0) + octicons (19.1.0) + octicons_helper (19.1.0) actionview - octicons (= 18.3.0) + octicons (= 19.1.0) railties octokit (6.1.1) faraday (>= 1, < 3) @@ -307,11 +307,11 @@ GEM byebug (~> 11.0) pry (>= 0.13, < 0.15) public_suffix (5.0.1) - puma (6.2.1) + puma (6.2.2) nio4r (~> 2.0) racc (1.6.2) rack (2.2.7) - rack-livereload (0.3.17) + rack-livereload (0.5.1) rack rack-protection (3.0.6) rack @@ -355,7 +355,7 @@ GEM redis-client (>= 0.9.0) redis-client (0.14.1) connection_pool - regexp_parser (2.7.0) + regexp_parser (2.8.0) representable (3.2.0) declarative (< 0.1.0) trailblazer-option (>= 0.1.1, < 0.2.0) @@ -365,22 +365,22 @@ GEM railties (>= 5.2) retriable (3.1.2) rexml (3.2.5) - rspec-core (3.12.1) + rspec-core (3.12.2) rspec-support (~> 3.12.0) - rspec-expectations (3.12.2) + rspec-expectations (3.12.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-mocks (3.12.5) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-rails (6.0.1) + rspec-rails (6.0.2) actionpack (>= 6.1) activesupport (>= 6.1) railties (>= 6.1) - rspec-core (~> 3.11) - rspec-expectations (~> 3.11) - rspec-mocks (~> 3.11) - rspec-support (~> 3.11) + rspec-core (~> 3.12) + rspec-expectations (~> 3.12) + rspec-mocks (~> 3.12) + rspec-support (~> 3.12) rspec-support (3.12.0) ruby-rc4 (0.1.5) ruby2_keywords (0.0.5) @@ -400,10 +400,10 @@ GEM sawyer (0.9.2) addressable (>= 2.3.5) faraday (>= 0.17.3, < 3) - searchkick (5.2.2) + searchkick (5.2.4) activemodel (>= 5.2) hashie - selenium-webdriver (4.8.6) + selenium-webdriver (4.9.1) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) From 3f4385c574fe4bd8ba0877dfa753e4807d29198c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 29 May 2023 12:09:33 +0200 Subject: [PATCH 543/609] Change default label color --- app/models/track.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/track.rb b/app/models/track.rb index 99c8bbf1b..4ebf44d58 100644 --- a/app/models/track.rb +++ b/app/models/track.rb @@ -50,7 +50,7 @@ def label_color when "sbcs" "e374fc" else - "3c3c3c" + "E7E7E7" end end From a1cb3ab1045b9b4153e7f93b1a5363556264898b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 30 May 2023 13:06:44 +0200 Subject: [PATCH 544/609] Add features to settings --- config/settings-development.yml | 2 ++ config/settings-production.yml | 2 ++ config/settings-test.yml | 2 ++ lib/journal_features.rb | 5 +++++ 4 files changed, 11 insertions(+) create mode 100644 lib/journal_features.rb diff --git a/config/settings-development.yml b/config/settings-development.yml index 4c8dabc74..221c144cb 100644 --- a/config/settings-development.yml +++ b/config/settings-development.yml @@ -24,3 +24,5 @@ submission_enquiry: |- Briefly describe your software, its research application and any questions you have about the JOSS submission criteria. paper_types: [] bot_username: editorialbot +features: + tracks: true diff --git a/config/settings-production.yml b/config/settings-production.yml index d92713b82..2a3027e68 100644 --- a/config/settings-production.yml +++ b/config/settings-production.yml @@ -24,3 +24,5 @@ submission_enquiry: |- Briefly describe your software, its research application and any questions you have about the JOSS submission criteria. paper_types: [] bot_username: editorialbot +features: + tracks: true diff --git a/config/settings-test.yml b/config/settings-test.yml index 3de672d4d..e07dd1e37 100644 --- a/config/settings-test.yml +++ b/config/settings-test.yml @@ -24,3 +24,5 @@ submission_enquiry: |- Briefly describe your software, its research application and any questions you have about the JOSS submission criteria. paper_types: [] bot_username: editorialbot +features: + tracks: true diff --git a/lib/journal_features.rb b/lib/journal_features.rb new file mode 100644 index 000000000..50e72bf15 --- /dev/null +++ b/lib/journal_features.rb @@ -0,0 +1,5 @@ +module JournalFeatures + def self.tracks? + return !!Rails.application.settings.dig(:features, :tracks) + end +end \ No newline at end of file From a94d165c1402a733d9202ebedc834ead6ed6639d Mon Sep 17 00:00:00 2001 From: Ilona <111542584+IlonaSilverwood@users.noreply.github.com> Date: Tue, 30 May 2023 14:48:34 -0700 Subject: [PATCH 545/609] Add Albert's corrections to submitting.md --- docs/submitting.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/submitting.md b/docs/submitting.md index aebb4bd10..cc588b15a 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -195,9 +195,9 @@ The goal of Open Journals is to provide authors with a seamless and pleasant wri Tables and figures can be referenced if they are given a *label* in the caption. In pure Markdown, this can be done by adding an empty span `[]{label="floatlabel"}` to the caption. LaTeX syntax is supported as well: `\label{floatlabel}`. -Link to a float element, i.e., a table or figure, with `\ref{identifier}` or `\autoref{identifier}`, where `identifier` must be defined in the float's caption. The former command results in just the float's number, while the latter inserts the type and number of the referenced float. E.g., in this document `\autoref{proglangs}` yields "\autoref{proglangs}", while `\ref{proglangs}` gives "\ref{proglangs}". +Link to a float element, i.e., a table or figure, with `\ref{identifier}` or `\autoref{identifier}`, where `identifier` must be defined in the float's caption. The former command results in just the float's number, while the latter inserts the type and number of the referenced float. E.g., in this document `\autoref{proglangs}` yields "Table 1", while `\ref{proglangs}` gives "1". -: Comparison of programming languages used in the publishing tool. []{label="proglangs"} + : Comparison of programming languages used in the publishing tool. []{label="proglangs"} | Language | Typing | Garbage Collected | Evaluation | Created | |----------|:---------------:|:-----------------:|------------|---------| @@ -211,9 +211,7 @@ Cross-references to equations work similarly to those for floating elements. The $$a^n + b^n = c^n \label{fermat}$$ -Referencing, however, is identical, with `\autoref{eq:fermat}` resulting in "\autoref{eq:fermat}". - -$$a^n + b^n = c^n \label{eq:fermat}$$ +Referencing, however, is identical, with `\autoref{eq:fermat}` resulting in "Equation 1". Authors who do not wish to include the label directly in the formula can use a Markdown span to add the label: From 3ba30d02c7016278d1aa57b818cee39bc09580f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 31 May 2023 14:18:12 +0200 Subject: [PATCH 546/609] Add support to test enabled/disabled features --- lib/journal_features.rb | 2 +- spec/support/common_actions.rb | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/lib/journal_features.rb b/lib/journal_features.rb index 50e72bf15..331d91676 100644 --- a/lib/journal_features.rb +++ b/lib/journal_features.rb @@ -2,4 +2,4 @@ module JournalFeatures def self.tracks? return !!Rails.application.settings.dig(:features, :tracks) end -end \ No newline at end of file +end diff --git a/spec/support/common_actions.rb b/spec/support/common_actions.rb index d578ad755..a6bda32b7 100644 --- a/spec/support/common_actions.rb +++ b/spec/support/common_actions.rb @@ -20,4 +20,22 @@ def skip_paper_repo_url_check allow(Open3).to receive(:capture3).with("git ls-remote https://github.com/openjournals/joss").and_return(["", "", ok ]) allow(Open3).to receive(:capture3).with("git ls-remote https://github.com/openjournals/joss-reviews").and_return(["", "", ok ]) end + + def disable_feature(feat, &block) + previous_value = Rails.application.settings.dig(:features, feat.to_sym) + Rails.application.settings[:features][feat.to_sym] = false + if block_given? + yield + Rails.application.settings[:features][feat.to_sym] = previous_value + end + end + + def enable_feature(feat, &block) + previous_value = Rails.application.settings.dig(:features, feat.to_sym) + Rails.application.settings[:features][feat.to_sym] = true + if block_given? + yield + Rails.application.settings[:features][feat.to_sym] = previous_value + end + end end From 73861164fd9d3461fb348f6ab993fa22eb031ca3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 31 May 2023 15:03:09 +0200 Subject: [PATCH 547/609] Tracks as a configurable feature --- app/controllers/onboardings_controller.rb | 7 +- app/mailers/notifications.rb | 13 +- app/models/editor.rb | 2 +- app/models/paper.rb | 5 +- app/views/aeic_dashboard/_menu.html.erb | 2 +- app/views/editors/_form.html.erb | 2 + app/views/editors/profile.html.erb | 2 + app/views/home/_menu.html.erb | 2 +- .../notifications/notify_new_aeic.html.erb | 2 +- .../notifications/notify_new_aeic.text.erb | 2 +- app/views/onboardings/editor.html.erb | 2 + app/views/papers/_actions.html.erb | 2 +- spec/factories/editors.rb | 2 +- spec/models/paper_spec.rb | 89 +++++-- spec/system/dashboard_spec.rb | 29 ++- spec/system/editors/profile_spec.rb | 48 +++- spec/system/onboarding_spec.rb | 143 ++++++++--- spec/system/papers/track_info_spec.rb | 239 ++++++++++-------- spec/views/editors/edit.html.erb_spec.rb | 59 +++-- spec/views/editors/new.html.erb_spec.rb | 53 +++- 20 files changed, 477 insertions(+), 228 deletions(-) diff --git a/app/controllers/onboardings_controller.rb b/app/controllers/onboardings_controller.rb index 6ff732afa..43fdcd9c1 100644 --- a/app/controllers/onboardings_controller.rb +++ b/app/controllers/onboardings_controller.rb @@ -13,7 +13,12 @@ def add_editor flash[:notice] = "Thanks! An editor in chief will review your info soon" redirect_to root_path else - flash[:error] = "Error saving your data: Name, Email, GitHub username and Tracks are mandatory" + if JournalFeatures.tracks? + flash[:error] = "Error saving your data: Name, Email, GitHub username and Tracks are mandatory" + else + flash[:error] = "Error saving your data: Name, Email and GitHub username are mandatory" + end + redirect_to editor_onboardings_path(@onboarding.token) end end diff --git a/app/mailers/notifications.rb b/app/mailers/notifications.rb index d1519c3ec..90a6a1a7c 100644 --- a/app/mailers/notifications.rb +++ b/app/mailers/notifications.rb @@ -2,18 +2,22 @@ class Notifications < ApplicationMailer EDITOR_EMAILS = [Rails.application.settings["editor_email"]] def submission_email(paper) - aeic_emails = paper.track.aeic_emails + aeic_emails = paper.track.aeic_emails if paper.track.present? @url = "#{Rails.application.settings["url"]}/papers/#{paper.sha}" @paper = paper - mail(to: aeic_emails, cc: EDITOR_EMAILS, subject: "New submission: #{paper.title}") + if aeic_emails.present? + mail(to: aeic_emails, cc: EDITOR_EMAILS, subject: "New submission: #{paper.title}") + else + mail(to: EDITOR_EMAILS, subject: "New submission: #{paper.title}") + end end def notify_new_aeic(paper, old_track, new_track) aeic_emails = new_track.aeic_emails @url = "#{Rails.application.settings["url"]}/papers/#{paper.sha}" @paper = paper - @old_track = old_track - @new_track = new_track + @from_track_info = old_track.present? ? "from the #{old_track.name} track." : "" + @new_track_name = new_track.name mail(to: aeic_emails, cc: EDITOR_EMAILS, subject: "Track move for submission: #{paper.title}") end @@ -46,4 +50,5 @@ def onboarding_invitation_email(onboarding_invitation) @onboarding_invitation = onboarding_invitation mail(to: onboarding_invitation.email, subject: "Invitation to join the #{Rails.application.settings["abbreviation"]} editorial board") end + end diff --git a/app/models/editor.rb b/app/models/editor.rb index 75863bf10..be745acb1 100644 --- a/app/models/editor.rb +++ b/app/models/editor.rb @@ -4,7 +4,7 @@ class Editor < ApplicationRecord validates :last_name, presence: true validates :email, presence: true, unless: Proc.new { |editor| editor.kind == "emeritus" } validates :login, presence: true, unless: Proc.new { |editor| editor.kind == "emeritus" } - validates :tracks, presence: true, unless: Proc.new { |editor| ["board", "emeritus"].include?(editor.kind) } + validates :tracks, presence: true, unless: Proc.new { |editor| ["board", "emeritus"].include?(editor.kind) || !JournalFeatures.tracks? } belongs_to :user, optional: true has_many :papers diff --git a/app/models/paper.rb b/app/models/paper.rb index 98c074ace..b1ec2cd75 100644 --- a/app/models/paper.rb +++ b/app/models/paper.rb @@ -125,7 +125,7 @@ class Paper < ApplicationRecord validates_presence_of :repository_url, message: "Repository address can't be blank" validates_presence_of :software_version, message: "Version can't be blank" validates_presence_of :body, message: "Description can't be blank" - validates_presence_of :track_id, on: :create, message: "You must select a valid subject for the paper" + validates_presence_of :track_id, on: :create, message: "You must select a valid subject for the paper", if: Proc.new { JournalFeatures.tracks? } validates :kind, inclusion: { in: Rails.application.settings["paper_types"] }, allow_nil: true validates :submission_kind, inclusion: { in: SUBMISSION_KINDS, message: "You must select a submission type" }, allow_nil: false validate :check_repository_address, on: :create @@ -403,7 +403,8 @@ def create_meta_review_issue(editor_handle, eic, new_track_id=nil) return false if meta_review_issue_id set_track_id(new_track_id) if new_track_id.present? - new_labels = ["pre-review", self.track.label] + new_labels = ["pre-review"] + new_labels << self.track.label if self.track && JournalFeatures.tracks? issue = GITHUB.create_issue(Rails.application.settings["reviews"], "[PRE REVIEW]: #{self.title}", diff --git a/app/views/aeic_dashboard/_menu.html.erb b/app/views/aeic_dashboard/_menu.html.erb index 1f5db730e..e39c10e24 100644 --- a/app/views/aeic_dashboard/_menu.html.erb +++ b/app/views/aeic_dashboard/_menu.html.erb @@ -6,7 +6,7 @@ <%= link_to "Onboarding", onboardings_path, class: current_class?(onboardings_path) %>
            - <% if [aeic_dashboard_path, editors_path, invitations_path].include?(request.path) %> + <% if [aeic_dashboard_path, editors_path, invitations_path].include?(request.path) && JournalFeatures.tracks? %>
            <%= select_tag :track_id, options_from_collection_for_select(Track.all, "id", "name", params[:track_id].presence), include_blank: "All tracks", class: "form-control left", style: "font-size:81%", onchange: "top.location.href='?track_id=' + this.options[this.selectedIndex].value;" %>
            diff --git a/app/views/editors/_form.html.erb b/app/views/editors/_form.html.erb index d1af1f0fe..59cce7c5f 100644 --- a/app/views/editors/_form.html.erb +++ b/app/views/editors/_form.html.erb @@ -89,6 +89,7 @@ <%= f.text_field :url, class: "form-control" %>
            +<% if JournalFeatures.tracks? %>
            <%= f.label :tracks %>
            @@ -99,6 +100,7 @@
            +<% end %>
            <%= f.label :description %> diff --git a/app/views/editors/profile.html.erb b/app/views/editors/profile.html.erb index 4e9720993..f9970d95c 100644 --- a/app/views/editors/profile.html.erb +++ b/app/views/editors/profile.html.erb @@ -78,6 +78,7 @@
            + <% if JournalFeatures.tracks? %>
            <%= f.label :tracks %>
            @@ -88,6 +89,7 @@
            + <% end %>
            <%= f.label :description %> diff --git a/app/views/home/_menu.html.erb b/app/views/home/_menu.html.erb index cd101f1bf..8afd54f5d 100644 --- a/app/views/home/_menu.html.erb +++ b/app/views/home/_menu.html.erb @@ -21,7 +21,7 @@ <% end %>
            - <% if [dashboard_incoming_path, dashboard_in_progress_path, dashboard_all_path].include?(request.path) %> + <% if [dashboard_incoming_path, dashboard_in_progress_path, dashboard_all_path].include?(request.path) && JournalFeatures.tracks? %>
            <%= select_tag :track_id, options_from_collection_for_select(Track.all, "id", "name", params[:track_id].presence), include_blank: "All tracks", class: "form-control left", style: "font-size:81%", onchange: "top.location.href='?track_id=' + this.options[this.selectedIndex].value;" %>
            diff --git a/app/views/notifications/notify_new_aeic.html.erb b/app/views/notifications/notify_new_aeic.html.erb index 7a99f95dd..93ab95d7a 100644 --- a/app/views/notifications/notify_new_aeic.html.erb +++ b/app/views/notifications/notify_new_aeic.html.erb @@ -1,4 +1,4 @@ -A paper has just been moved to your track (<%= @new_track.name %>) from the <%= @old_track.name %> track.
            +A paper has just been moved to your track (<%= @new_track_name %>) <%= @from_track_info %>

            Title: <%= @paper.title %>
            Repo: <%= @paper.repository_url %>
            diff --git a/app/views/notifications/notify_new_aeic.text.erb b/app/views/notifications/notify_new_aeic.text.erb index 2488f4e84..f4a2760ce 100644 --- a/app/views/notifications/notify_new_aeic.text.erb +++ b/app/views/notifications/notify_new_aeic.text.erb @@ -1,4 +1,4 @@ -A paper has just been moved to your track (<%= @new_track.name %>) from the <%= @old_track.name %> track. +A paper has just been moved to your track (<%= @new_track_name %>) <%= @from_track_info %> Title: <%= @paper.title %> Repo: <%= @paper.repository_url %> diff --git a/app/views/onboardings/editor.html.erb b/app/views/onboardings/editor.html.erb index 420142120..50ec4181f 100644 --- a/app/views/onboardings/editor.html.erb +++ b/app/views/onboardings/editor.html.erb @@ -62,6 +62,7 @@
            + <% if JournalFeatures.tracks? %>
            <%= f.label :tracks %>
            @@ -72,6 +73,7 @@
            + <% end %>
            <%= f.label :description %> diff --git a/app/views/papers/_actions.html.erb b/app/views/papers/_actions.html.erb index edb7ebbb2..60db434f4 100644 --- a/app/views/papers/_actions.html.erb +++ b/app/views/papers/_actions.html.erb @@ -1,4 +1,4 @@ -<% if current_user.aeic? %> +<% if current_user.aeic? && JournalFeatures.tracks? %>
            Track
            diff --git a/spec/factories/editors.rb b/spec/factories/editors.rb index 099d52c7b..6563cb4f0 100644 --- a/spec/factories/editors.rb +++ b/spec/factories/editors.rb @@ -10,7 +10,7 @@ url { "http://placekitten.com" } description { "Person McEditor is an editor" } availability_comment { "OOO until March 1" } - track_ids { ["board", "emeritus"].include?(kind) ? [] : [create(:track).id]} + track_ids { (["board", "emeritus"].include?(kind) ? [] : [create(:track).id]) if JournalFeatures.tracks? } factory :board_editor do kind { "board" } diff --git a/spec/models/paper_spec.rb b/spec/models/paper_spec.rb index 2ba5d24f4..f99cb9cbc 100644 --- a/spec/models/paper_spec.rb +++ b/spec/models/paper_spec.rb @@ -39,22 +39,38 @@ expect(paper.submitting_author).to eq(user) end - it "must have a track assigned on creation" do - no_track_params = { title: 'Test paper', - body: 'A test paper description', - repository_url: 'http://github.com/arfon/fidgit', - software_version: 'v1.0.0', - submitting_author: create(:user), - submission_kind: 'new' } - - valid_params = no_track_params.merge track: create(:track) - - paper = Paper.create(no_track_params) - expect(paper).to_not be_valid - expect(paper.errors.full_messages.first).to eq("Track You must select a valid subject for the paper") - - paper = Paper.create(valid_params) - expect(paper).to be_valid + it "must have a track assigned on creation if tracks are enabled" do + enable_feature(:tracks) do + no_track_params = { title: 'Test paper', + body: 'A test paper description', + repository_url: 'http://github.com/arfon/fidgit', + software_version: 'v1.0.0', + submitting_author: create(:user), + submission_kind: 'new' } + + valid_params = no_track_params.merge track: create(:track) + + paper = Paper.create(no_track_params) + expect(paper).to_not be_valid + expect(paper.errors.full_messages.first).to eq("Track You must select a valid subject for the paper") + + paper = Paper.create(valid_params) + expect(paper).to be_valid + end + end + + it "does not have a track assigned on creation if tracks are disabled" do + disable_feature(:tracks) do + no_track_params = { title: 'Test paper', + body: 'A test paper description', + repository_url: 'http://github.com/arfon/fidgit', + software_version: 'v1.0.0', + submitting_author: create(:user), + submission_kind: 'new' } + + paper = Paper.create(no_track_params) + expect(paper).to be_valid + end end # Scopes @@ -265,20 +281,39 @@ expect(paper.reload.track).to eq(track2) end - it "should label GH issue with track label" do - editor = create(:editor, login: "arfon") - user = create(:user, editor: editor) - submitting_author = create(:user) + it "should label GH issue with track label if tracks are enabled" do + enable_feature(:tracks) do + editor = create(:editor, login: "arfon") + user = create(:user, editor: editor) + submitting_author = create(:user) - paper = create(:submitted_paper_with_sha, submitting_author: submitting_author) - fake_issue = Object.new - allow(fake_issue).to receive(:number).and_return(1) + paper = create(:submitted_paper_with_sha, submitting_author: submitting_author) + fake_issue = Object.new + allow(fake_issue).to receive(:number).and_return(1) + + track = create(:track) + expected_labels = { labels: "pre-review,#{track.label}" } + expect(GITHUB).to receive(:create_issue).with(anything, anything, anything, expected_labels).and_return(fake_issue) + + paper.start_meta_review!('arfon', editor, track.id) + end + end + + it "should not label GH issue with track label if tracks are disabled" do + disable_feature(:tracks) do + editor = create(:editor, login: "arfon") + user = create(:user, editor: editor) + submitting_author = create(:user) - track = create(:track) - expected_labels = { labels: "pre-review,#{track.label}" } - expect(GITHUB).to receive(:create_issue).with(anything, anything, anything, expected_labels).and_return(fake_issue) + paper = create(:submitted_paper_with_sha, submitting_author: submitting_author) + fake_issue = Object.new + allow(fake_issue).to receive(:number).and_return(1) - paper.start_meta_review!('arfon', editor, track.id) + expected_labels = { labels: "pre-review" } + expect(GITHUB).to receive(:create_issue).with(anything, anything, anything, expected_labels).and_return(fake_issue) + + paper.start_meta_review!('arfon', editor) + end end end diff --git a/spec/system/dashboard_spec.rb b/spec/system/dashboard_spec.rb index 5ca85cb4f..5fa5198a7 100644 --- a/spec/system/dashboard_spec.rb +++ b/spec/system/dashboard_spec.rb @@ -84,7 +84,34 @@ expect(page).to have_content("Paper Rejected") end - feature "Filter by track" do + scenario "Dropdown is not visible if tracks are disabled" do + disable_feature(:tracks) do + expect(page).to_not have_css("select#track_id") + + visit dashboard_incoming_path + expect(page).to_not have_css("select#track_id") + + visit "/dashboard/#{Editor.last.login}" + expect(page).to_not have_css("select#track_id") + + visit dashboard_in_progress_path + expect(page).to_not have_css("select#track_id") + + visit "/dashboard" + expect(page).to_not have_css("select#track_id") + + visit dashboard_all_path + expect(page).to_not have_css("select#track_id") + end + end + + feature "Filter by track, if tracks are enabled" do + around(:example) do |ex| + enable_feature(:tracks) do + ex.run + end + end + scenario "Dropdown is visible only in incoming/in_progress/all_papers tabs" do expect(page).to_not have_css("select#track_id") diff --git a/spec/system/editors/profile_spec.rb b/spec/system/editors/profile_spec.rb index a7d23e25d..0ea3f2aba 100644 --- a/spec/system/editors/profile_spec.rb +++ b/spec/system/editors/profile_spec.rb @@ -17,24 +17,46 @@ expect(page).to_not have_content('Editor profile') end - scenario "Show editor's data" do - login_as(user_editor) - visit root_path - click_on 'My Profile' - click_on 'Editor profile' - expect(page.status_code).to eq(200) + scenario "Show editor's data, including tracks if tracks are enabled" do + enable_feature(:tracks) do + login_as(user_editor) + visit root_path + click_on 'My Profile' + click_on 'Editor profile' + expect(page.status_code).to eq(200) - first_name = find_field('First name').value - description = find_field('Description').value + first_name = find_field('First name').value + description = find_field('Description').value - expect(first_name).to eq('Lorena') - expect(description).to eq('Science testing editor') - expect(user_editor.editor.track_ids.size > 0).to be true - user_editor.editor.track_ids.each do |track_id| - expect(page).to have_checked_field("editor_track_ids_#{track_id}") + expect(first_name).to eq('Lorena') + expect(description).to eq('Science testing editor') + + expect(user_editor.editor.track_ids.size > 0).to be true + expect(page).to have_content("Tracks") + user_editor.editor.track_ids.each do |track_id| + expect(page).to have_checked_field("editor_track_ids_#{track_id}") + end end end + scenario "Show editor's data, without tracks if tracks are disabled" do + disable_feature(:tracks) do + login_as(user_editor) + visit root_path + click_on 'My Profile' + click_on 'Editor profile' + expect(page.status_code).to eq(200) + + first_name = find_field('First name').value + description = find_field('Description').value + + expect(first_name).to eq('Lorena') + expect(description).to eq('Science testing editor') + + expect(user_editor.editor.track_ids.size == 0).to be true + expect(page).to_not have_content("Tracks") + end + end scenario "Update editor's data" do login_as(user_editor) diff --git a/spec/system/onboarding_spec.rb b/spec/system/onboarding_spec.rb index 2a0e20aaf..72ffc4635 100644 --- a/spec/system/onboarding_spec.rb +++ b/spec/system/onboarding_spec.rb @@ -220,24 +220,45 @@ expect(page).to have_content("Please complete your editor information") end - scenario "Accepting invitations create a pending editor" do - track = create(:track) + scenario "Accepting invitations create a pending editor, tracks enabled" do + enable_feature(:tracks) do + track = create(:track) - visit editor_onboardings_path(onboarding_invitation.token) - fill_in :editor_first_name, with: "Eddie" - fill_in :editor_last_name, with: "Tor" - fill_in :editor_email, with: "edi@tor.com" - fill_in :editor_login, with: "@test_editor" - fill_in :editor_url, with: "https://joss.theoj.org" - fill_in :editor_category_list, with: "bioinformatics, open science" - fill_in :editor_description, with: "I'm a great person" - check track.name - click_on "Save editor data" + visit editor_onboardings_path(onboarding_invitation.token) + fill_in :editor_first_name, with: "Eddie" + fill_in :editor_last_name, with: "Tor" + fill_in :editor_email, with: "edi@tor.com" + fill_in :editor_login, with: "@test_editor" + fill_in :editor_url, with: "https://joss.theoj.org" + fill_in :editor_category_list, with: "bioinformatics, open science" + fill_in :editor_description, with: "I'm a great person" + check track.name + click_on "Save editor data" + + expect(page).to have_content("Thanks! An editor in chief will review your info soon") + expect(user.editor).to be_pending + expect(onboarding_invitation.reload).to be_accepted + expect(onboarding_invitation.editor).to eq(user.editor) + end + end + + scenario "Accepting invitations create a pending editor, tracks disabled" do + disable_feature(:tracks) do + visit editor_onboardings_path(onboarding_invitation.token) + fill_in :editor_first_name, with: "Eddie" + fill_in :editor_last_name, with: "Tor" + fill_in :editor_email, with: "edi@tor.com" + fill_in :editor_login, with: "@test_editor" + fill_in :editor_url, with: "https://joss.theoj.org" + fill_in :editor_category_list, with: "bioinformatics, open science" + fill_in :editor_description, with: "I'm a great person" + click_on "Save editor data" - expect(page).to have_content("Thanks! An editor in chief will review your info soon") - expect(user.editor).to be_pending - expect(onboarding_invitation.reload).to be_accepted - expect(onboarding_invitation.editor).to eq(user.editor) + expect(page).to have_content("Thanks! An editor in chief will review your info soon") + expect(user.editor).to be_pending + expect(onboarding_invitation.reload).to be_accepted + expect(onboarding_invitation.editor).to eq(user.editor) + end end scenario "Pending editors can update their info" do @@ -253,41 +274,85 @@ end scenario "Name, Email, GitHub username are mandatory" do - track = create(:track) - data = { editor_first_name: "Eddie", - editor_last_name: "Tor", - editor_email: "edi@tor.com", - editor_login: "@test" } + enable_feature(:tracks) do + track = create(:track) + data = { editor_first_name: "Eddie", + editor_last_name: "Tor", + editor_email: "edi@tor.com", + editor_login: "@test" } + + data.keys.each do |field_name| + visit editor_onboardings_path(onboarding_invitation.token) + fields = data.keys - [field_name] + fields.each do |field| + fill_in field, with: data[field] + end + fill_in field_name, with: nil + check track.name + click_on "Save editor data" + + expect(page).to have_content("Error saving your data: Name, Email, GitHub username and Tracks are mandatory") + end + end + + disable_feature(:tracks) do + data = { editor_first_name: "Eddie", + editor_last_name: "Tor", + editor_email: "edi@tor.com", + editor_login: "@test" } + + data.keys.each do |field_name| + visit editor_onboardings_path(onboarding_invitation.token) + fields = data.keys - [field_name] + fields.each do |field| + fill_in field, with: data[field] + end + fill_in field_name, with: nil + click_on "Save editor data" + + expect(page).to have_content("Error saving your data: Name, Email and GitHub username are mandatory") + end + end + end + + scenario "Tracks are mandatory if tracks are enabled" do + enable_feature(:tracks) do + track = create(:track) + data = { editor_first_name: "Eddie", + editor_last_name: "Tor", + editor_email: "edi@tor.com", + editor_login: "@test" } - data.keys.each do |field_name| visit editor_onboardings_path(onboarding_invitation.token) - fields = data.keys - [field_name] - fields.each do |field| + data.keys.each do |field| fill_in field, with: data[field] end - fill_in field_name, with: nil - check track.name + uncheck track.name click_on "Save editor data" expect(page).to have_content("Error saving your data: Name, Email, GitHub username and Tracks are mandatory") end end - scenario "Tracks are mandatory" do - track = create(:track) - data = { editor_first_name: "Eddie", - editor_last_name: "Tor", - editor_email: "edi@tor.com", - editor_login: "@test" } + scenario "Tracks are not mandatory if tracks are disabled" do + disable_feature(:tracks) do + data = { editor_first_name: "Eddie", + editor_last_name: "Tor", + editor_email: "edi@tor.com", + editor_login: "@test" } - visit editor_onboardings_path(onboarding_invitation.token) - data.keys.each do |field| - fill_in field, with: data[field] - end - uncheck track.name - click_on "Save editor data" + visit editor_onboardings_path(onboarding_invitation.token) + data.keys.each do |field| + fill_in field, with: data[field] + end + + expect { + click_on "Save editor data" + }.to change { OnboardingInvitation.pending_acceptance.count }.by(-1) - expect(page).to have_content("Error saving your data: Name, Email, GitHub username and Tracks are mandatory") + expect(page).to have_content("Thanks! An editor in chief will review your info soon") + expect(page).to_not have_content("Error saving your data") + end end end end diff --git a/spec/system/papers/track_info_spec.rb b/spec/system/papers/track_info_spec.rb index 16a43bca6..58ef1ebe0 100644 --- a/spec/system/papers/track_info_spec.rb +++ b/spec/system/papers/track_info_spec.rb @@ -1,134 +1,165 @@ require "rails_helper" feature "Paper's track info" do - - before do - skip_paper_repo_url_check - @track_1 = create(:track, name: "Astrophysics", short_name: "ASTRO", code: "42") - @track_2 = create(:track, name: "Biology", short_name: "BIO", code: "34") - @paper = create(:paper) - - allow(Repository).to receive(:editors).and_return(["@editor_1", "@editor_2"]) - end - - scenario "Is not public" do - visit paper_path(@paper) - expect(page).to_not have_css("#track-info") - end - - scenario "Is not available to non-eic users" do - login_as create(:user, editor: create(:editor)) - visit paper_path(@paper) - expect(page).to_not have_css("#track-info") - end - - scenario "Is visible to AEiCs" do - login_as create(:admin_user, editor: create(:board_editor)) - visit paper_path(@paper) - expect(page).to have_css("#track-info") - end - - feature "Logged as an admin" do + feature "When tracks feature is enabled" do before do - @aeic = create(:admin_user, editor: create(:board_editor)) - @track = create(:track, name: "Testing track", short_name: "TE", code: "33") - login_as(@aeic) + skip_paper_repo_url_check + allow(Repository).to receive(:editors).and_return(["@editor_1", "@editor_2"]) end - feature "For new submitted papers" do - scenario "Show info for papers with no suggested subject" do - @paper.update(suggested_subject: nil, track_id: nil, meta_review_issue_id: nil) + around do |ex| + enable_feature(:tracks) do + @track_1 = create(:track, name: "Astrophysics", short_name: "ASTRO", code: "42") + @track_2 = create(:track, name: "Biology", short_name: "BIO", code: "34") + @paper = create(:paper) - visit paper_path(@paper) - - within("#track-info"){ - expect(page).to have_content("Author didn't suggest any subject for this paper.") - } - end - - scenario "Show info for papers with suggested subject" do - @paper.update!(suggested_subject: "Solar Astronomy", track_id: @track_1.id, meta_review_issue_id: nil) - - visit paper_path(@paper) - - within("#track-info"){ - expect(page).to_not have_content("Author didn't suggest any subject for this paper.") - - expect(page).to have_content("Author suggested this paper' subject is Solar Astronomy") - expect(page).to have_content("This submission will be assigned to the track: Astrophysics") - } + ex.run end + end - scenario "Show form to change track" do - @paper.update!(suggested_subject: "Solar Astronomy", track_id: @track_1.id, meta_review_issue_id: nil) + scenario "Is not public" do + visit paper_path(@paper) + expect(page).to_not have_css("#track-info") + end - visit paper_path(@paper) + scenario "Is not available to non-eic users" do + login_as create(:user, editor: create(:editor)) + visit paper_path(@paper) + expect(page).to_not have_css("#track-info") + end - within("#track-info"){ - expect(page).to have_css("select#track_id") - expect(page).to have_css("input[type='submit']") - } - end + scenario "Is visible to AEiCs" do + login_as create(:admin_user, editor: create(:board_editor)) + visit paper_path(@paper) + expect(page).to have_css("#track-info") end - feature "For papers with ongoing (meta)review" do + feature "Logged as an admin" do before do - @paper.update(suggested_subject: "Solar astronomy", track_id: @track_1.id, meta_review_issue_id: 3333, state: "review_pending") + @aeic = create(:admin_user, editor: create(:board_editor)) + @track = create(:track, name: "Testing track", short_name: "TE", code: "33") + login_as(@aeic) end - scenario "Show info for papers assigned to a track" do - visit paper_path(@paper) + feature "For new submitted papers" do + scenario "Show info for papers with no suggested subject" do + @paper.update(suggested_subject: nil, track_id: nil, meta_review_issue_id: nil) - within("#track-info"){ - expect(page).to_not have_content("Author didn't suggest any subject for this paper.") - expect(page).to_not have_content("Author suggested this paper' subject is Solar Astronomy") + visit paper_path(@paper) - expect(page).to have_content("This paper is assigned to the track: Astrophysics") - expect(page).to have_content("This track is managed by:") - expect(page).to have_content(@track_1.aeics.first.full_name) - expect(page).to have_content(@track_1.aeics.first.login) - } - end + within("#track-info"){ + expect(page).to have_content("Author didn't suggest any subject for this paper.") + } + end - scenario "Show info for papers without track" do - @paper.update(track_id: nil) - visit paper_path(@paper) + scenario "Show info for papers with suggested subject" do + @paper.update!(suggested_subject: "Solar Astronomy", track_id: @track_1.id, meta_review_issue_id: nil) - within("#track-info"){ - expect(page).to_not have_content("This paper is assigned to the track: Astrophysics") - expect(page).to_not have_content("This track is managed by:") - expect(page).to_not have_content(@track_1.aeics.first.full_name) - expect(page).to_not have_content(@track_1.aeics.first.login) - } - end + visit paper_path(@paper) - scenario "Show form to change track" do - visit paper_path(@paper) + within("#track-info"){ + expect(page).to_not have_content("Author didn't suggest any subject for this paper.") - within("#track-info"){ - expect(page).to have_css("select#track_id") - expect(page).to have_css("input[type='submit'][value=\"Change paper's track\"]") - } - end + expect(page).to have_content("Author suggested this paper' subject is Solar Astronomy") + expect(page).to have_content("This submission will be assigned to the track: Astrophysics") + } + end - scenario "Change paper's track" do - allow_any_instance_of(Octokit::Client).to receive(:remove_label) - allow_any_instance_of(Octokit::Client).to receive(:add_labels_to_an_issue) + scenario "Show form to change track" do + @paper.update!(suggested_subject: "Solar Astronomy", track_id: @track_1.id, meta_review_issue_id: nil) - visit paper_path(@paper) + visit paper_path(@paper) - within("#track-info"){ - select @track_2.name, from: "track_id" - click_on "Change paper's track" - } + within("#track-info"){ + expect(page).to have_css("select#track_id") + expect(page).to have_css("input[type='submit']") + } + end + end - expect(page).to have_content("Track for the paper changed!") - visit paper_path(@paper) + feature "For papers with ongoing (meta)review" do + before do + @paper.update(suggested_subject: "Solar astronomy", track_id: @track_1.id, meta_review_issue_id: 3333, state: "review_pending") + end + + scenario "Show info for papers assigned to a track" do + visit paper_path(@paper) + + within("#track-info"){ + expect(page).to_not have_content("Author didn't suggest any subject for this paper.") + expect(page).to_not have_content("Author suggested this paper' subject is Solar Astronomy") + + expect(page).to have_content("This paper is assigned to the track: Astrophysics") + expect(page).to have_content("This track is managed by:") + expect(page).to have_content(@track_1.aeics.first.full_name) + expect(page).to have_content(@track_1.aeics.first.login) + } + end + + scenario "Show info for papers without track" do + @paper.update(track_id: nil) + visit paper_path(@paper) + + within("#track-info"){ + expect(page).to_not have_content("This paper is assigned to the track: Astrophysics") + expect(page).to_not have_content("This track is managed by:") + expect(page).to_not have_content(@track_1.aeics.first.full_name) + expect(page).to_not have_content(@track_1.aeics.first.login) + } + end + + scenario "Show form to change track" do + visit paper_path(@paper) + + within("#track-info"){ + expect(page).to have_css("select#track_id") + expect(page).to have_css("input[type='submit'][value=\"Change paper's track\"]") + } + end + + scenario "Change paper's track" do + allow_any_instance_of(Octokit::Client).to receive(:remove_label) + allow_any_instance_of(Octokit::Client).to receive(:add_labels_to_an_issue) + + visit paper_path(@paper) + + within("#track-info"){ + select @track_2.name, from: "track_id" + click_on "Change paper's track" + } + + expect(page).to have_content("Track for the paper changed!") + visit paper_path(@paper) + + expect(page).to have_content("This paper is assigned to the track: Biology") + expect(page).to have_content("This track is managed by:") + expect(page).to have_content(@track_2.aeics.first.full_name) + expect(page).to have_content(@track_2.aeics.first.login) + end + end + end + end - expect(page).to have_content("This paper is assigned to the track: Biology") - expect(page).to have_content("This track is managed by:") - expect(page).to have_content(@track_2.aeics.first.full_name) - expect(page).to have_content(@track_2.aeics.first.login) + feature "When tracks feature is disabled" do + scenario "There is no tracks info" do + disable_feature(:tracks) do + allow(Repository).to receive(:editors).and_return(["@editor_1", "@editor_2"]) + skip_paper_repo_url_check + paper = create(:paper) + + visit paper_path(paper) + expect(page).to_not have_css("#track-info") + + login_as create(:user, editor: create(:editor)) + visit paper_path(paper) + expect(page).to_not have_css("#track-info") + + login_as create(:admin_user, editor: create(:board_editor)) + visit paper_path(paper) + expect(page).to_not have_css("#track-info") + expect(page).to_not have_content("Track") + expect(page).to_not have_css("select#track_id") + expect(page).to_not have_css("input[type='submit'][value=\"Change paper's track\"]") end end end diff --git a/spec/views/editors/edit.html.erb_spec.rb b/spec/views/editors/edit.html.erb_spec.rb index 7f15474b1..553c6898c 100644 --- a/spec/views/editors/edit.html.erb_spec.rb +++ b/spec/views/editors/edit.html.erb_spec.rb @@ -6,23 +6,50 @@ allow(Repository).to receive(:editors).and_return %w(@user1 @user2 @user3) end - it "renders the edit editor form" do - render + context "renders the edit editor form" do + it "including tracks if tracks are enabled" do + enable_feature(:tracks) do + render - assert_select "form[action=?][method=?]", editor_path(@editor), "post" do - assert_select "select#editor_kind[name=?]", "editor[kind]" - assert_select "input#editor_max_assignments[name=?]", "editor[max_assignments]" - assert_select "input#editor_availability_comment[name=?]", "editor[availability_comment]" - assert_select "input#editor_title[name=?]", "editor[title]" - assert_select "input#editor_first_name[name=?]", "editor[first_name]" - assert_select "input#editor_last_name[name=?]", "editor[last_name]" - assert_select "select#editor_login[name=?]", "editor[login]" - assert_select "input#editor_email[name=?]", "editor[email]" - assert_select "input#editor_avatar_url[name=?]", "editor[avatar_url]" - assert_select "input#editor_category_list[name=?]", "editor[category_list]" - assert_select "input#editor_url[name=?]", "editor[url]" - assert_select "input[name=?]", "editor[track_ids][]" - assert_select "textarea#editor_description[name=?]", "editor[description]" + assert_select "form[action=?][method=?]", editor_path(@editor), "post" do + assert_select "select#editor_kind[name=?]", "editor[kind]" + assert_select "input#editor_max_assignments[name=?]", "editor[max_assignments]" + assert_select "input#editor_availability_comment[name=?]", "editor[availability_comment]" + assert_select "input#editor_title[name=?]", "editor[title]" + assert_select "input#editor_first_name[name=?]", "editor[first_name]" + assert_select "input#editor_last_name[name=?]", "editor[last_name]" + assert_select "select#editor_login[name=?]", "editor[login]" + assert_select "input#editor_email[name=?]", "editor[email]" + assert_select "input#editor_avatar_url[name=?]", "editor[avatar_url]" + assert_select "input#editor_category_list[name=?]", "editor[category_list]" + assert_select "input#editor_url[name=?]", "editor[url]" + assert_select "input[name=?]", "editor[track_ids][]" + assert_select "textarea#editor_description[name=?]", "editor[description]" + end + end + end + + it "without tracks if tracks are disabled" do + disable_feature(:tracks) do + render + + assert_select "form[action=?][method=?]", editor_path(@editor), "post" do + assert_select "select#editor_kind[name=?]", "editor[kind]" + assert_select "input#editor_max_assignments[name=?]", "editor[max_assignments]" + assert_select "input#editor_availability_comment[name=?]", "editor[availability_comment]" + assert_select "input#editor_title[name=?]", "editor[title]" + assert_select "input#editor_first_name[name=?]", "editor[first_name]" + assert_select "input#editor_last_name[name=?]", "editor[last_name]" + assert_select "select#editor_login[name=?]", "editor[login]" + assert_select "input#editor_email[name=?]", "editor[email]" + assert_select "input#editor_avatar_url[name=?]", "editor[avatar_url]" + assert_select "input#editor_category_list[name=?]", "editor[category_list]" + assert_select "input#editor_url[name=?]", "editor[url]" + assert_select "textarea#editor_description[name=?]", "editor[description]" + + assert_select "input[name=?]", "editor[track_ids][]", count: 0 + end + end end end end diff --git a/spec/views/editors/new.html.erb_spec.rb b/spec/views/editors/new.html.erb_spec.rb index 5c162037b..d80f279ff 100644 --- a/spec/views/editors/new.html.erb_spec.rb +++ b/spec/views/editors/new.html.erb_spec.rb @@ -6,21 +6,46 @@ allow(Repository).to receive(:editors).and_return %w(@user1 @user2 @user3) end - it "renders the new editor form" do - render + context "renders the new editor form" do + it "including tracks if tracks are enabled" do + enable_feature(:tracks) do + render - assert_select "form[action=?][method=?]", editors_path, "post" do - assert_select "select#editor_kind[name=?]", "editor[kind]" - assert_select "input#editor_title[name=?]", "editor[title]" - assert_select "input#editor_first_name[name=?]", "editor[first_name]" - assert_select "input#editor_last_name[name=?]", "editor[last_name]" - assert_select "select#editor_login[name=?]", "editor[login]" - assert_select "input#editor_email[name=?]", "editor[email]" - assert_select "input#editor_avatar_url[name=?]", "editor[avatar_url]" - assert_select "input#editor_category_list[name=?]", "editor[category_list]" - assert_select "input#editor_url[name=?]", "editor[url]" - assert_select "input[name=?]", "editor[track_ids][]" - assert_select "textarea#editor_description[name=?]", "editor[description]" + assert_select "form[action=?][method=?]", editors_path, "post" do + assert_select "select#editor_kind[name=?]", "editor[kind]" + assert_select "input#editor_title[name=?]", "editor[title]" + assert_select "input#editor_first_name[name=?]", "editor[first_name]" + assert_select "input#editor_last_name[name=?]", "editor[last_name]" + assert_select "select#editor_login[name=?]", "editor[login]" + assert_select "input#editor_email[name=?]", "editor[email]" + assert_select "input#editor_avatar_url[name=?]", "editor[avatar_url]" + assert_select "input#editor_category_list[name=?]", "editor[category_list]" + assert_select "input#editor_url[name=?]", "editor[url]" + assert_select "input[name=?]", "editor[track_ids][]" + assert_select "textarea#editor_description[name=?]", "editor[description]" + end + end + end + + it "without tracks if tracks are disabled" do + disable_feature(:tracks) do + render + + assert_select "form[action=?][method=?]", editors_path, "post" do + assert_select "select#editor_kind[name=?]", "editor[kind]" + assert_select "input#editor_title[name=?]", "editor[title]" + assert_select "input#editor_first_name[name=?]", "editor[first_name]" + assert_select "input#editor_last_name[name=?]", "editor[last_name]" + assert_select "select#editor_login[name=?]", "editor[login]" + assert_select "input#editor_email[name=?]", "editor[email]" + assert_select "input#editor_avatar_url[name=?]", "editor[avatar_url]" + assert_select "input#editor_category_list[name=?]", "editor[category_list]" + assert_select "input#editor_url[name=?]", "editor[url]" + assert_select "textarea#editor_description[name=?]", "editor[description]" + + assert_select "input[name=?]", "editor[track_ids][]", count: 0 + end + end end end end From 26012d86472815aca7c7c44d5084ffe3deb50f12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 2 Jun 2023 10:07:16 +0200 Subject: [PATCH 548/609] Update to will_paginate latest major version --- Gemfile | 2 +- Gemfile.lock | 25 +++++++++++++------------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Gemfile b/Gemfile index 1b4cdce29..7479bd313 100644 --- a/Gemfile +++ b/Gemfile @@ -17,7 +17,7 @@ gem 'omniauth-rails_csrf_protection' gem 'octokit', '~> 6.0' gem 'pdf-reader', '~> 2.11.0' gem 'pg', '~> 1.4.6' -gem 'will_paginate', '~> 3.3.1' +gem 'will_paginate', '~> 4.0.0' gem 'rails', '7.0.5' gem "importmap-rails" gem "turbo-rails" diff --git a/Gemfile.lock b/Gemfile.lock index 970e1303e..03a4cf46c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -156,7 +156,7 @@ GEM retriable (>= 2.0, < 4.a) rexml webrick - google-apis-drive_v3 (0.39.0) + google-apis-drive_v3 (0.40.0) google-apis-core (>= 0.11.0, < 2.a) google-apis-sheets_v4 (0.22.0) google-apis-core (>= 0.11.0, < 2.a) @@ -210,9 +210,9 @@ GEM actionview (>= 5.0.0) activesupport (>= 5.0.0) jwt (2.7.0) - libv8-node (16.10.0.0) - libv8-node (16.10.0.0-x86_64-darwin) - libv8-node (16.10.0.0-x86_64-linux) + libv8-node (18.16.0.0) + libv8-node (18.16.0.0-x86_64-darwin) + libv8-node (18.16.0.0-x86_64-linux) listen (3.8.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) @@ -231,8 +231,8 @@ GEM method_source (1.0.0) mini_mime (1.1.2) mini_portile2 (2.8.2) - mini_racer (0.6.3) - libv8-node (~> 16.10.0.0) + mini_racer (0.8.0) + libv8-node (~> 18.16.0.0) minitest (5.18.0) msgpack (1.7.1) multi_json (1.15.0) @@ -307,7 +307,7 @@ GEM byebug (~> 11.0) pry (>= 0.13, < 0.15) public_suffix (5.0.1) - puma (6.2.2) + puma (6.3.0) nio4r (~> 2.0) racc (1.6.2) rack (2.2.7) @@ -338,8 +338,9 @@ GEM rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.5.0) - loofah (~> 2.19, >= 2.19.1) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) railties (7.0.5) actionpack (= 7.0.5) activesupport (= 7.0.5) @@ -373,7 +374,7 @@ GEM rspec-mocks (3.12.5) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-rails (6.0.2) + rspec-rails (6.0.3) actionpack (>= 6.1) activesupport (>= 6.1) railties (>= 6.1) @@ -458,7 +459,7 @@ GEM websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - will_paginate (3.3.1) + will_paginate (4.0.0) xpath (3.2.0) nokogiri (~> 1.8) zeitwerk (2.6.8) @@ -517,7 +518,7 @@ DEPENDENCIES vcr (~> 6.1, >= 6.1.0) web-console (~> 4.2.0) webmock - will_paginate (~> 3.3.1) + will_paginate (~> 4.0.0) RUBY VERSION ruby 3.2.2p53 From 4a7cf8fcbff1e5f52c2fd92acbaeb1a41ade5c3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 2 Jun 2023 11:20:22 +0200 Subject: [PATCH 549/609] Fix counter --- app/views/papers/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/papers/index.html.erb b/app/views/papers/index.html.erb index 6a7417170..f24444030 100644 --- a/app/views/papers/index.html.erb +++ b/app/views/papers/index.html.erb @@ -16,7 +16,7 @@ <%= link_to papers_path, class: "tabnav-tab #{selected_class('index')}" do %> All Papers -
            <%= raw Paper.everything.count %>
            +
            <%= raw Paper.public_everything.count %>
            <% end %> <%= link_to published_papers_path, class: "tabnav-tab #{selected_class('popular')}" do %> Published Papers From 5fb12ca69cf2e6d3c9ef1cfd88ff3791ae35e689 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 2 Jun 2023 11:29:33 +0200 Subject: [PATCH 550/609] Fix active papers counter --- app/views/papers/index.html.erb | 2 +- spec/views/papers/submitted.html.erb_spec.rb | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/views/papers/index.html.erb b/app/views/papers/index.html.erb index f24444030..8f507603a 100644 --- a/app/views/papers/index.html.erb +++ b/app/views/papers/index.html.erb @@ -24,7 +24,7 @@ <% end %> <%= link_to active_papers_path, class: "tabnav-tab #{selected_class('active')}" do %> Active Papers -
            <%= raw Paper.in_progress.count %>
            +
            <%= raw Paper.public_in_progress.count %>
            <% end %>
            diff --git a/spec/views/papers/submitted.html.erb_spec.rb b/spec/views/papers/submitted.html.erb_spec.rb index 9cb125f99..7c5a7d829 100644 --- a/spec/views/papers/submitted.html.erb_spec.rb +++ b/spec/views/papers/submitted.html.erb_spec.rb @@ -3,8 +3,8 @@ describe 'papers/submitted.html.erb' do before { skip_paper_repo_url_check } - context 'for submitted papers' do - it "should show the correct number of papers" do + context 'submitted papers' do + it "should not show" do user = create(:user) 3.times do @@ -18,7 +18,8 @@ render template: "papers/index", formats: :html expect(rendered).to have_selector('.paper-title', count: 0) - expect(rendered).to have_content(:visible, "Active Papers 1", normalize_ws: true) + expect(rendered).to have_content(:visible, "All Papers 3", normalize_ws: true) + expect(rendered).to have_content(:visible, "Active Papers 0", normalize_ws: true) end end end From 5c0f5d68796fe6a36226b770be0a2bbfd30a049e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 5 Jun 2023 10:34:45 +0200 Subject: [PATCH 551/609] Document preprint file generation --- docs/editorial_bot.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/editorial_bot.md b/docs/editorial_bot.md index 3498f7fad..b7bfe1687 100644 --- a/docs/editorial_bot.md +++ b/docs/editorial_bot.md @@ -44,6 +44,14 @@ And then compile the paper normally: @editorialbot generate pdf ``` +#### Compiling preprint files + +If you need a generic paper file suitable for preprint servers (arXiv-like) you can use the following command that will generate a LaTeX file: + +```text +@editorialbot generate preprint +``` + ### Finding reviewers Sometimes submitting authors suggest people the think might be appropriate to review their submission. If you want the link to the current list of JOSS reviewers, type the following in the review thread: @@ -308,6 +316,9 @@ JOSS editors-in-chief can withdraw a submission with the following command: # Generates the pdf paper @editorialbot generate pdf +# Generates a LaTeX preprint file +@editorialbot generate preprint + # Creates a post-review checklist with editor and authors tasks @editorialbot create post-review checklist From c253bd23d93e0edc8d207a13b9af7359634678d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 5 Jun 2023 13:29:31 +0200 Subject: [PATCH 552/609] Pagination: migrate from will_paginate to pagy --- Gemfile | 2 +- Gemfile.lock | 4 +- app/controllers/application_controller.rb | 1 + app/controllers/home_controller.rb | 45 +++--------- app/controllers/invitations_controller.rb | 4 +- app/controllers/papers_controller.rb | 75 +++++++------------- app/helpers/application_helper.rb | 1 + app/views/home/reviews.html.erb | 6 +- app/views/invitations/index.html.erb | 6 +- app/views/papers/index.atom.builder | 10 +-- app/views/papers/index.html.erb | 6 +- config/initializers/pagy.rb | 50 +++++++++++++ config/locales/en.yml | 23 +++++- spec/system/invitations_spec.rb | 2 +- spec/views/papers/recent.html.erb_spec.rb | 3 +- spec/views/papers/submitted.html.erb_spec.rb | 4 +- 16 files changed, 133 insertions(+), 109 deletions(-) create mode 100644 config/initializers/pagy.rb diff --git a/Gemfile b/Gemfile index 7479bd313..b726dc788 100644 --- a/Gemfile +++ b/Gemfile @@ -17,7 +17,7 @@ gem 'omniauth-rails_csrf_protection' gem 'octokit', '~> 6.0' gem 'pdf-reader', '~> 2.11.0' gem 'pg', '~> 1.4.6' -gem 'will_paginate', '~> 4.0.0' +gem 'pagy' gem 'rails', '7.0.5' gem "importmap-rails" gem "turbo-rails" diff --git a/Gemfile.lock b/Gemfile.lock index 03a4cf46c..5b509a02a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -293,6 +293,7 @@ GEM omniauth (~> 2.0) openssl (3.1.0) os (1.1.4) + pagy (6.0.4) pdf-reader (2.11.0) Ascii85 (~> 1.0) afm (~> 0.2.1) @@ -459,7 +460,6 @@ GEM websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) - will_paginate (4.0.0) xpath (3.2.0) nokogiri (~> 1.8) zeitwerk (2.6.8) @@ -495,6 +495,7 @@ DEPENDENCIES octokit (~> 6.0) omniauth-orcid (~> 2.1.1) omniauth-rails_csrf_protection + pagy pdf-reader (~> 2.11.0) pg (~> 1.4.6) pry-byebug @@ -518,7 +519,6 @@ DEPENDENCIES vcr (~> 6.1, >= 6.1.0) web-console (~> 4.2.0) webmock - will_paginate (~> 4.0.0) RUBY VERSION ruby 3.2.2p53 diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 96a8cb6a0..7b7b22f93 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1,4 +1,5 @@ class ApplicationController < ActionController::Base + include Pagy::Backend rescue_from ActiveRecord::RecordNotFound, with: :record_not_found # Prevent CSRF attacks by raising an exception. diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index a88911e34..ad0c04435 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -57,21 +57,12 @@ def reviews @editor = Editor.find_by_login(params[:editor]) if sort == "active" - @papers = Paper.unscoped.in_progress.where(editor: @editor).order(last_activity: @order).paginate( - page: params[:page], - per_page: 20 - ) + @pagy, @papers = pagy(Paper.unscoped.in_progress.where(editor: @editor).order(last_activity: @order)) else - @papers = Paper.unscoped.in_progress.where(editor: @editor).order(created_at: @order).paginate( - page: params[:page], - per_page: 20 - ) + @pagy, @papers = pagy(Paper.unscoped.in_progress.where(editor: @editor).order(created_at: @order)) end else - @papers = Paper.everything.paginate( - page: params[:page], - per_page: 20 - ) + @pagy, @papers = pagy(Paper.everything) end end @@ -82,15 +73,9 @@ def incoming @order = params[:order].to_s.end_with?("-asc") ? "asc" : "desc" if params[:order].to_s.include?("active-") - @papers = incoming_scope.order(last_activity: @order).paginate( - page: params[:page], - per_page: 20 - ) + @pagy, @papers = pagy(incoming_scope.order(last_activity: @order)) else - @papers = incoming_scope.order(created_at: @order).paginate( - page: params[:page], - per_page: 20 - ) + @pagy, @papers = pagy(incoming_scope.order(created_at: @order)) end load_pending_invitations_for_papers(@papers) @@ -108,15 +93,9 @@ def in_progress @order = params[:order].to_s.end_with?("-asc") ? "asc" : "desc" if params[:order].to_s.include?("active-") - @papers = in_progress_scope.order(last_activity: @order).paginate( - page: params[:page], - per_page: 20 - ) + @pagy, @papers = pagy(in_progress_scope.order(last_activity: @order)) else - @papers = in_progress_scope.order(created_at: @order).paginate( - page: params[:page], - per_page: 20 - ) + @pagy, @papers = pagy(in_progress_scope.order(created_at: @order)) end load_pending_invitations_for_papers(@papers) @@ -132,15 +111,9 @@ def all @order = params[:order].to_s.end_with?("-asc") ? "asc" : "desc" if params[:order].to_s.include?("active-") - @papers = all_scope.order(last_activity: @order).paginate( - page: params[:page], - per_page: 20 - ) + @pagy, @papers = pagy(all_scope.order(last_activity: @order)) else - @papers = all_scope.order(created_at: @order).paginate( - page: params[:page], - per_page: 20 - ) + @pagy, @papers = pagy(all_scope.order(created_at: @order)) end load_pending_invitations_for_papers(@papers) diff --git a/app/controllers/invitations_controller.rb b/app/controllers/invitations_controller.rb index 10f1e1b24..590567f19 100644 --- a/app/controllers/invitations_controller.rb +++ b/app/controllers/invitations_controller.rb @@ -5,9 +5,7 @@ class InvitationsController < ApplicationController def index invitations_scope = @track.present? ? Invitation.by_track(@track.id) : Invitation - @invitations = invitations_scope.includes(:editor, :paper). - order(created_at: :desc). - paginate(page: params[:page], per_page: 25) + @pagy, @invitations = pagy(invitations_scope.includes(:editor, :paper).order(created_at: :desc), items: 25) end def expire diff --git a/app/controllers/papers_controller.rb b/app/controllers/papers_controller.rb index 2c84a2c26..936b7561d 100644 --- a/app/controllers/papers_controller.rb +++ b/app/controllers/papers_controller.rb @@ -8,10 +8,7 @@ class PapersController < ApplicationController before_action :require_aeic, only: %w(start_meta_review archive reject change_track) def recent - @papers = Paper.visible.paginate( - page: params[:page], - per_page: 10 - ) + @pagy, @papers = pagy(Paper.visible, items: 10) @selected = "recent" @@ -23,10 +20,7 @@ def recent end def index - @papers = Paper.public_everything.paginate( - page: params[:page], - per_page: 10 - ) + @pagy, @papers = pagy(Paper.public_everything, items: 3) @selected = "all" @@ -39,18 +33,11 @@ def index def popular if params[:since] - @papers = Paper.unscoped.visible.since(params[:since]).order(accepted_at: :desc).paginate( - page: params[:page], - per_page: 10 - ) + @pagy, @papers = pagy(Paper.unscoped.visible.since(params[:since]).order(accepted_at: :desc), items: 10) else - @papers = Paper.unscoped.visible.order(accepted_at: :desc).paginate( - page: params[:page], - per_page: 10 - ) + @pagy, @papers = pagy(Paper.unscoped.visible.order(accepted_at: :desc), items: 10) end - @selected = "popular" respond_to do |format| @@ -61,10 +48,7 @@ def popular end def active - @papers = Paper.public_in_progress.paginate( - page: params[:page], - per_page: 10 - ) + @pagy, @papers = pagy(Paper.public_in_progress, items: 10) @selected = "active" @@ -76,15 +60,16 @@ def active end def search - @papers = Paper.none.page(1) - @term = "results for empty search" - - if params['q'] + if params['q'].present? @papers = Paper.search(params['q'], fields: [:authors, :title, :tags, :languages], page: params[:page], per_page: 10) + @pagy = Pagy.new_from_searchkick(@papers) @term = "search results for '#{params['q']}'" + else + @pagy, @papers = pagy(Paper.none) + @term = "results for empty search" end @filtering = true @@ -97,65 +82,55 @@ def search end def filter - @papers = Paper.none.page(1) - @term = "Empty search term" if params['language'] @papers = Paper.search(params['language'], fields: [languages: :exact], order: { accepted_at: :desc }, page: params[:page], - per_page: 10 - ) + per_page: 10) @term = "in #{params['language']}" - elsif params['author'] @papers = Paper.search(params['author'], fields: [:authors], misspellings: false, order: { accepted_at: :desc }, page: params[:page], - per_page: 10 - ) + per_page: 10) @term = "by #{params['author']}" - elsif params['editor'] @papers = Paper.search(params['editor'], fields: [:editor], misspellings: false, order: { accepted_at: :desc }, page: params[:page], - per_page: 10 - ) + per_page: 10) @term = "edited by #{params['editor']}" - elsif params['reviewer'] @papers = Paper.search(params['reviewer'], fields: [:reviewers], misspellings: false, order: { accepted_at: :desc }, page: params[:page], - per_page: 10 - ) + per_page: 10) @term = "reviewed by #{params['reviewer']}" - elsif params['tag'] @papers = Paper.search(params['tag'], fields: [:tags, :title], order: { accepted_at: :desc }, page: params[:page], - per_page: 10 - ) + per_page: 10) @term = "#{params['tag']}" - elsif params['issue'] @papers = Paper.search(params['issue'], fields: [{issue: :exact}], order: { page: :desc }, page: params[:page], - per_page: 10 - ) + per_page: 10) @term = "in issue #{params['issue']}" - elsif params['volume'] @papers = Paper.search(params['volume'], fields: [{volume: :exact}], order: { page: :desc }, page: params[:page], - per_page: 10 - ) + per_page: 10) @term = "in volume #{params['volume']}" - elsif params['year'] @papers = Paper.search(params['year'], fields: [{year: :exact}], order: { page: :desc }, page: params[:page], - per_page: 10 - ) + per_page: 10) @term = "in #{params['year']}" end + if @papers + @pagy = Pagy.new_from_searchkick(@papers) + else + @pagy, @papers = pagy(Paper.none) + @term = "Empty search term" + end + @filtering = true respond_to do |format| diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index ba9756d3c..567d6affe 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,5 +1,6 @@ module ApplicationHelper include SettingsHelper + include Pagy::Frontend def flash_class_for(flash_level) case flash_level diff --git a/app/views/home/reviews.html.erb b/app/views/home/reviews.html.erb index 547badbc8..2084b3969 100644 --- a/app/views/home/reviews.html.erb +++ b/app/views/home/reviews.html.erb @@ -74,7 +74,9 @@
            -
            <%= page_entries_info(@papers).capitalize.html_safe %>
            - <%= will_paginate @papers, inner_window: 3, outer_window: 0, page_links: false %> +
            + <%== pagy_info(@pagy, i18n_key: "paper") %> +
            + <%== pagy_nav @pagy %>
            diff --git a/app/views/invitations/index.html.erb b/app/views/invitations/index.html.erb index 1ddb58d4e..28358abc2 100644 --- a/app/views/invitations/index.html.erb +++ b/app/views/invitations/index.html.erb @@ -46,8 +46,10 @@
            -
            <%= page_entries_info(@invitations).capitalize.html_safe %>
            - <%= will_paginate @invitations, page_links: false %> +
            + <%== pagy_info(@pagy, i18n_key: "invitation") %> +
            + <%== pagy_nav @pagy %>
            <% end %>
            diff --git a/app/views/papers/index.atom.builder b/app/views/papers/index.atom.builder index 85fdafa9f..519c33ada 100644 --- a/app/views/papers/index.atom.builder +++ b/app/views/papers/index.atom.builder @@ -1,10 +1,10 @@ atom_feed do |feed| - feed.link(rel: 'first', type: "application/atom+xml", href: url_for(format: 'atom', only_path: false)) url_params = {} - [:since, :language].each {|p| url_params.merge!(p => params[p]) if params{p}} - feed.link(rel: 'next', type: "application/atom+xml", href: url_for(params: url_params, format: 'atom', page: @papers.current_page + 1, only_path: false)) unless @papers.current_page == @papers.total_pages - feed.link(rel: 'previous', type: "application/atom+xml", href: url_for(params: url_params, format: 'atom', page: @papers.current_page - 1, only_path: false)) unless @papers.current_page == 1 - feed.link(rel: 'last', type: "application/atom+xml", href: url_for(params: url_params, format: 'atom', page: @papers.total_pages, only_path: false)) + [:q, :since, :language].each {|p| url_params.merge!(p => params[p]) if params{p}} + feed.link(rel: 'first', type: "application/atom+xml", href: url_for(format: 'atom', only_path: false)) + feed.link(rel: 'next', type: "application/atom+xml", href: url_for(params: url_params, format: 'atom', page: @pagy.next, only_path: false)) if @pagy.next + feed.link(rel: 'previous', type: "application/atom+xml", href: url_for(params: url_params, format: 'atom', page: @pagy.prev, only_path: false)) if @pagy.prev + feed.link(rel: 'last', type: "application/atom+xml", href: url_for(params: url_params, format: 'atom', page: @pagy.pages, only_path: false)) feed.title(Rails.application.settings["name"]) feed.updated(@papers[0].accepted_at || @papers[0].created_at) if @papers.length > 0 feed.author do |author| diff --git a/app/views/papers/index.html.erb b/app/views/papers/index.html.erb index 8f507603a..a82a26df5 100644 --- a/app/views/papers/index.html.erb +++ b/app/views/papers/index.html.erb @@ -44,7 +44,9 @@ <%= render partial: "list", locals: { papers: @papers } %>
            -
            <%= page_entries_info(@papers).capitalize.html_safe %>
            - <%= will_paginate @papers, inner_window: 3, outer_window: 0, page_links: false %> +
            + <%== pagy_info(@pagy, i18n_key: "paper") %> +
            + <%== pagy_nav @pagy %>
            diff --git a/config/initializers/pagy.rb b/config/initializers/pagy.rb new file mode 100644 index 000000000..c2f2cac6e --- /dev/null +++ b/config/initializers/pagy.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +# Default page size +Pagy::DEFAULT[:items] = 20 + +# No page links +Pagy::DEFAULT[:size] = [] + +require 'pagy/extras/overflow' +Pagy::DEFAULT[:overflow] = :last_page + + +# Elasticsearch Rails extra: Paginate `ElasticsearchRails::Results` objects +# See https://ddnexus.github.io/pagy/docs/extras/elasticsearch_rails +# Default :pagy_search method: change only if you use also +# the searchkick or meilisearch extra that defines the same +# Pagy::DEFAULT[:elasticsearch_rails_pagy_search] = :pagy_search +# Default original :search method called internally to do the actual search +# Pagy::DEFAULT[:elasticsearch_rails_search] = :search +# require 'pagy/extras/elasticsearch_rails' + + +# Searchkick extra: Paginate `Searchkick::Results` objects +# See https://ddnexus.github.io/pagy/docs/extras/searchkick +# Default :pagy_search method: change only if you use also +# the elasticsearch_rails or meilisearch extra that defines the same +# DEFAULT[:searchkick_pagy_search] = :pagy_search +# Default original :search method called internally to do the actual search +Pagy::DEFAULT[:searchkick_search] = :search +require 'pagy/extras/searchkick' +# uncomment if you are going to use Searchkick.pagy_search +# Searchkick.extend Pagy::Searchkick + +# Rails +# Enable the .js file required by the helpers that use javascript +# (pagy*_nav_js, pagy*_combo_nav_js, and pagy_items_selector_js) +# See https://ddnexus.github.io/pagy/docs/api/javascript + +# With the asset pipeline +# Sprockets need to look into the pagy javascripts dir, so add it to the assets paths +# Rails.application.config.assets.paths << Pagy.root.join('javascripts') + +# I18n +Pagy::I18n.load(locale: "en", filepath: File.join(Rails.root, "config", "locales", "en.yml")) + +# When you are done setting your own default freeze it, so it will not get changed accidentally +Pagy::DEFAULT.freeze + + + diff --git a/config/locales/en.yml b/config/locales/en.yml index 91b92ec06..d7f5d6191 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -30,9 +30,26 @@ # available at https://guides.rubyonrails.org/i18n.html. en: - will_paginate: - previous_label: "← Previous" - next_label: "Next →" + pagy: + item_name: + one: "item" + other: "items" + nav: + prev: "← Previous" + next: "Next →" + gap: "…" + info: + no_items: "No %{item_name} found" + single_page: "Displaying %{count} %{item_name}" + multiple_pages: "Displaying %{item_name} %{from} - %{to} of %{count} in total" + combo_nav_js: "" + items_selector_js: "" + paper: + one: "paper" + other: "papers" + invitation: + one: "invitation" + other: "invitations" activerecord: models: paper: diff --git a/spec/system/invitations_spec.rb b/spec/system/invitations_spec.rb index fcbf2ef1a..627ea7811 100644 --- a/spec/system/invitations_spec.rb +++ b/spec/system/invitations_spec.rb @@ -76,7 +76,7 @@ create_list(:invitation, 10, :expired) visit invitations_path - expect(page).to have_content("Displaying invitation 1 - 25 of 30 in total") + expect(page).to have_content("Displaying invitations 1 - 25 of 30 in total") expect(page).to have_link("Next →", href: invitations_path(page:2)) end diff --git a/spec/views/papers/recent.html.erb_spec.rb b/spec/views/papers/recent.html.erb_spec.rb index 6a9e2515d..b57697e33 100644 --- a/spec/views/papers/recent.html.erb_spec.rb +++ b/spec/views/papers/recent.html.erb_spec.rb @@ -10,7 +10,8 @@ create(:accepted_paper, submitting_author: user) end - assign(:papers, Paper.all.paginate(page: 1, per_page: 10)) + assign(:pagy, Pagy.new({count: Paper.all.count, page: 1})) + assign(:papers, Paper.all) render template: "papers/index", formats: :html diff --git a/spec/views/papers/submitted.html.erb_spec.rb b/spec/views/papers/submitted.html.erb_spec.rb index 7c5a7d829..55adc6ae1 100644 --- a/spec/views/papers/submitted.html.erb_spec.rb +++ b/spec/views/papers/submitted.html.erb_spec.rb @@ -5,6 +5,7 @@ context 'submitted papers' do it "should not show" do + include Pagy::Backend user = create(:user) 3.times do @@ -13,7 +14,8 @@ create(:paper, state: "submitted", submitting_author: user) - assign(:papers, Paper.submitted.paginate(page: 1, per_page: 10)) + assign(:pagy, Pagy.new({count: Paper.submitted.count, page: 1})) + assign(:papers, Paper.submitted) render template: "papers/index", formats: :html From db9e9de0b6396cd9b59d35ad1c6c4dcab5b1952d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 6 Jun 2023 11:58:13 +0200 Subject: [PATCH 553/609] 10 per page --- app/controllers/papers_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/papers_controller.rb b/app/controllers/papers_controller.rb index 936b7561d..ee56d2b3b 100644 --- a/app/controllers/papers_controller.rb +++ b/app/controllers/papers_controller.rb @@ -20,7 +20,7 @@ def recent end def index - @pagy, @papers = pagy(Paper.public_everything, items: 3) + @pagy, @papers = pagy(Paper.public_everything, items: 10) @selected = "all" From d750bc5474a85c1074f1579b96b5bd10b9a5767f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 6 Jun 2023 12:36:14 +0200 Subject: [PATCH 554/609] Customize pagination links --- app/helpers/pagination_helper.rb | 22 ++++++++++++++++++++++ app/views/home/reviews.html.erb | 2 +- app/views/invitations/index.html.erb | 2 +- app/views/papers/index.html.erb | 2 +- 4 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 app/helpers/pagination_helper.rb diff --git a/app/helpers/pagination_helper.rb b/app/helpers/pagination_helper.rb new file mode 100644 index 000000000..d489de5f0 --- /dev/null +++ b/app/helpers/pagination_helper.rb @@ -0,0 +1,22 @@ +module PaginationHelper + def pagy_pagination(pagy) + link = pagy_link_proc(pagy) + pagination_links = "" + + pagination_links.html_safe + end +end diff --git a/app/views/home/reviews.html.erb b/app/views/home/reviews.html.erb index 2084b3969..ad1bbc8d5 100644 --- a/app/views/home/reviews.html.erb +++ b/app/views/home/reviews.html.erb @@ -77,6 +77,6 @@
            <%== pagy_info(@pagy, i18n_key: "paper") %>
            - <%== pagy_nav @pagy %> + <%= pagy_pagination @pagy %>
            diff --git a/app/views/invitations/index.html.erb b/app/views/invitations/index.html.erb index 28358abc2..e2d0ee4aa 100644 --- a/app/views/invitations/index.html.erb +++ b/app/views/invitations/index.html.erb @@ -49,7 +49,7 @@
            <%== pagy_info(@pagy, i18n_key: "invitation") %>
            - <%== pagy_nav @pagy %> + <%= pagy_pagination @pagy %> <% end %> diff --git a/app/views/papers/index.html.erb b/app/views/papers/index.html.erb index a82a26df5..f4e9ac2fc 100644 --- a/app/views/papers/index.html.erb +++ b/app/views/papers/index.html.erb @@ -47,6 +47,6 @@
            <%== pagy_info(@pagy, i18n_key: "paper") %>
            - <%== pagy_nav @pagy %> + <%= pagy_pagination @pagy %> From d36306b9157b6aa0d98a10b7e7837944d4717609 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 6 Jun 2023 13:02:04 +0200 Subject: [PATCH 555/609] Add json template for papers --- app/controllers/papers_controller.rb | 12 ++++++------ app/views/papers/index.json.builder | 27 +++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 6 deletions(-) create mode 100644 app/views/papers/index.json.builder diff --git a/app/controllers/papers_controller.rb b/app/controllers/papers_controller.rb index ee56d2b3b..bf9f2466b 100644 --- a/app/controllers/papers_controller.rb +++ b/app/controllers/papers_controller.rb @@ -14,7 +14,7 @@ def recent respond_to do |format| format.atom { render template: 'papers/index' } - format.json { render json: @papers } + format.json { render template: 'papers/index' } format.html { render template: 'papers/index' } end end @@ -26,7 +26,7 @@ def index respond_to do |format| format.atom { render template: 'papers/index' } - format.json { render json: @papers } + format.json { render template: 'papers/index' } format.html { render template: 'papers/index' } end end @@ -42,7 +42,7 @@ def popular respond_to do |format| format.atom { render template: 'papers/index' } - format.json { render json: @papers } + format.json { render template: 'papers/index' } format.html { render template: 'papers/index' } end end @@ -54,7 +54,7 @@ def active respond_to do |format| format.atom { render template: 'papers/index' } - format.json { render json: @papers } + format.json { render template: 'papers/index' } format.html { render template: 'papers/index' } end end @@ -76,7 +76,7 @@ def search respond_to do |format| format.atom { render template: 'papers/index' } - format.json { render json: @papers } + format.json { render template: 'papers/index' } format.html { render template: 'papers/index' } end end @@ -135,7 +135,7 @@ def filter respond_to do |format| format.atom { render template: 'papers/index' } - format.json { render json: @papers } + format.json { render template: 'papers/index' } format.html { render template: 'papers/index' } end end diff --git a/app/views/papers/index.json.builder b/app/views/papers/index.json.builder new file mode 100644 index 000000000..d59e28eb6 --- /dev/null +++ b/app/views/papers/index.json.builder @@ -0,0 +1,27 @@ +json.array! @papers do |paper| + json.title paper.title + json.state paper.state + json.submitted_at paper.created_at + json.software_repository paper.repository_url + if paper.published? + json.doi paper.doi + json.published_at paper.accepted_at + json.volume paper.volume + json.issue paper.issue + json.year paper.year + json.page paper.page + json.authors paper.metadata_authors + json.editor paper.metadata_editor + if paper.editor + json.editor_name paper.editor.full_name + json.editor_url paper.editor.url if paper.editor.url + json.editor_orcid paper.editor.orcid if paper.editor.orcid + end + json.reviewers paper.metadata_reviewers + json.languages paper.language_tags.join(', ') + json.tags paper.author_tags.join(', ') + json.paper_review paper.review_url + json.pdf_url paper.seo_pdf_url + json.software_archive paper.clean_archive_doi + end +end From 480d570e10d66ee073dde84c746a118393c6d576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 6 Jun 2023 13:04:33 +0200 Subject: [PATCH 556/609] Rename to jbuilder --- app/views/papers/{index.json.builder => index.json.jbuilder} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename app/views/papers/{index.json.builder => index.json.jbuilder} (100%) diff --git a/app/views/papers/index.json.builder b/app/views/papers/index.json.jbuilder similarity index 100% rename from app/views/papers/index.json.builder rename to app/views/papers/index.json.jbuilder From e4c0a29ce8c38ca39627d7f7dace52ba4ebd9552 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 9 Jun 2023 14:01:18 +0200 Subject: [PATCH 557/609] Simplify archive_doi methods --- app/models/paper.rb | 24 ++++------------------- app/views/home/profile.html.erb | 2 +- app/views/papers/_list.html.erb | 2 +- app/views/papers/_show_published.html.erb | 2 +- app/views/papers/index.atom.builder | 2 +- app/views/papers/index.json.jbuilder | 2 +- app/views/papers/show.json.jbuilder | 2 +- spec/models/paper_spec.rb | 14 ++++--------- 8 files changed, 14 insertions(+), 36 deletions(-) diff --git a/app/models/paper.rb b/app/models/paper.rb index b1ec2cd75..88a4dcf64 100644 --- a/app/models/paper.rb +++ b/app/models/paper.rb @@ -268,38 +268,22 @@ def pretty_repository_name end end - def pretty_doi - return "DOI pending" unless archive_doi - - matches = archive_doi.scan(/\b(10[.][0-9]{4,}(?:[.][0-9]+)*\/(?:(?!["&\'<>])\S)+)\b/).flatten - - if matches.any? - return matches.first - else - return archive_doi - end - end - # Make sure that DOIs have a full http URL # e.g. turn 10.6084/m9.figshare.828487 into https://doi.org/10.6084/m9.figshare.828487 - def doi_with_url + def archive_doi_url return "DOI pending" unless archive_doi bare_doi = archive_doi[/\b(10[.][0-9]{4,}(?:[.][0-9]+)*\/(?:(?!["&\'<>])\S)+)\b/] if archive_doi.include?("https://doi.org/") - return archive_doi + return archive_doi.gsub(/\"/, "") elsif bare_doi - return "https://doi.org/#{bare_doi}" + return "https://doi.org/#{bare_doi}".gsub(/\"/, "") else - return archive_doi + return archive_doi.gsub(/\"/, "") end end - def clean_archive_doi - doi_with_url.gsub(/\"/, "") - end - # A 5-figure integer used to produce the JOSS DOI def joss_id id = "%05d" % review_issue_id diff --git a/app/views/home/profile.html.erb b/app/views/home/profile.html.erb index 2f4a407a3..abf19e9d5 100644 --- a/app/views/home/profile.html.erb +++ b/app/views/home/profile.html.erb @@ -47,7 +47,7 @@ <% end %>
            - <% if paper.pretty_doi == "DOI pending" %> + <% if paper.doi.blank? %> <%= image_tag 'doi.svg' %><%= link_to "Pending", paper_path(paper) %> <% else %> <%= image_tag 'doi.svg' %><%= link_to paper.doi, paper_path(paper) %> diff --git a/app/views/papers/_list.html.erb b/app/views/papers/_list.html.erb index 2981826d7..21e199ffa 100644 --- a/app/views/papers/_list.html.erb +++ b/app/views/papers/_list.html.erb @@ -18,7 +18,7 @@ <% end %>
            - <% if paper.pretty_doi == "DOI pending" %> + <% if paper.doi.blank? %> <%= image_tag 'doi.svg' %><%= link_to "Pending", paper_path(paper) %> <% else %> <%= image_tag 'doi.svg' %><%= link_to paper.doi, paper.seo_url %> diff --git a/app/views/papers/_show_published.html.erb b/app/views/papers/_show_published.html.erb index 6e19767c2..17300e489 100644 --- a/app/views/papers/_show_published.html.erb +++ b/app/views/papers/_show_published.html.erb @@ -40,7 +40,7 @@ Download paper <% end %> - <%= link_to @paper.clean_archive_doi, class: 'btn paper-btn' do %> + <%= link_to @paper.archive_doi_url, class: 'btn paper-btn' do %> <%= image_tag "hist-icon.svg" %> Software archive <% end %> diff --git a/app/views/papers/index.atom.builder b/app/views/papers/index.atom.builder index 519c33ada..894f43e92 100644 --- a/app/views/papers/index.atom.builder +++ b/app/views/papers/index.atom.builder @@ -39,7 +39,7 @@ atom_feed do |feed| end end entry.doi(paper.doi) - entry.archive_doi(paper.clean_archive_doi) + entry.archive_doi(paper.archive_doi_url) entry.languages(paper.language_tags.join(', ')) entry.pdf_url(paper.seo_pdf_url) entry.tags(paper.author_tags.join(', ')) diff --git a/app/views/papers/index.json.jbuilder b/app/views/papers/index.json.jbuilder index d59e28eb6..214f59941 100644 --- a/app/views/papers/index.json.jbuilder +++ b/app/views/papers/index.json.jbuilder @@ -22,6 +22,6 @@ json.array! @papers do |paper| json.tags paper.author_tags.join(', ') json.paper_review paper.review_url json.pdf_url paper.seo_pdf_url - json.software_archive paper.clean_archive_doi + json.software_archive paper.archive_doi_url end end diff --git a/app/views/papers/show.json.jbuilder b/app/views/papers/show.json.jbuilder index 4ccd1bc0e..3bd483cd9 100644 --- a/app/views/papers/show.json.jbuilder +++ b/app/views/papers/show.json.jbuilder @@ -21,5 +21,5 @@ if @paper.published? json.tags @paper.author_tags.join(', ') json.paper_review @paper.review_url json.pdf_url @paper.seo_pdf_url - json.software_archive @paper.clean_archive_doi + json.software_archive @paper.archive_doi_url end diff --git a/spec/models/paper_spec.rb b/spec/models/paper_spec.rb index f99cb9cbc..9caae45dd 100644 --- a/spec/models/paper_spec.rb +++ b/spec/models/paper_spec.rb @@ -119,22 +119,16 @@ expect(paper.pretty_repository_name).to eq("openjournals / joss-reviews") end - it 'should know how to return a pretty DOI' do - paper = create(:paper, archive_doi: 'https://doi.org/10.6084/m9.figshare.828487') - - expect(paper.pretty_doi).to eq("10.6084/m9.figshare.828487") - end - - it 'should know how to return a DOI with a full URL' do + it 'should know how to return the archive DOI with a full URL' do paper = create(:paper, archive_doi: '10.6084/m9.figshare.828487') - expect(paper.doi_with_url).to eq('https://doi.org/10.6084/m9.figshare.828487') + expect(paper.archive_doi_url).to eq('https://doi.org/10.6084/m9.figshare.828487') end - it "should bail creating a full DOI URL if if can't figure out what to do" do + it "should bail creating a full archive DOI URL if if can't figure out what to do" do paper = create(:paper, archive_doi: "http://foobar.com") - expect(paper.doi_with_url).to eq("http://foobar.com") + expect(paper.archive_doi_url).to eq("http://foobar.com") end it "should know how to generate its review url" do From f5d427025279b3b18395c8eed0d5829c07b0fbd2 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 11 Jun 2023 09:01:19 +0100 Subject: [PATCH 558/609] Reworking auth on papers#show --- app/controllers/papers_controller.rb | 13 ++++++++++++- spec/controllers/papers_controller_spec.rb | 4 ++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/app/controllers/papers_controller.rb b/app/controllers/papers_controller.rb index bf9f2466b..21f23ac35 100644 --- a/app/controllers/papers_controller.rb +++ b/app/controllers/papers_controller.rb @@ -221,7 +221,18 @@ def show # Don't show the paper to anyone other than the submitting author or an # admin. if @paper.invisible? - head 404 and return unless can_see_hidden_paper?(@paper) + # Redirect to login if not logged in + if !current_user + session[:redirect_to] = request.fullpath + redirect_to 'sessions#create', allow_other_host: true and return + end + + # Redirect to root if not an admin or the submitting author + # With notice that the paper is not visible + unless can_see_hidden_paper?(@paper) + flash[:notice] = "You don't have the permissions to view this paper." + redirect_to root_path and return + end end # The behaviour here for PDFs is to make it possible for the PDF to appear diff --git a/spec/controllers/papers_controller_spec.rb b/spec/controllers/papers_controller_spec.rb index 30aa69763..1e7401a3b 100644 --- a/spec/controllers/papers_controller_spec.rb +++ b/spec/controllers/papers_controller_spec.rb @@ -190,13 +190,13 @@ it "should 404 for a paper that has been rejected" do rejected_paper = create(:paper, state: 'rejected') get :show, params: {id: rejected_paper.sha}, format: "html" - expect(response.status).to eq(404) + expect(response.status).to eq(302) end it "should 404 for a paper that has just been submitted" do submitted_paper = create(:paper, state: 'submitted') get :show, params: {id: submitted_paper.sha}, format: "html" - expect(response.status).to eq(404) + expect(response.status).to eq(302) end it "should be visible for a user who owns the paper" do From bb9a948b19c05803977118c4e43f755dac2809b0 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Sun, 11 Jun 2023 19:36:19 +0100 Subject: [PATCH 559/609] Redirect to homepage if not logged in --- app/controllers/papers_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/papers_controller.rb b/app/controllers/papers_controller.rb index 21f23ac35..30746cdee 100644 --- a/app/controllers/papers_controller.rb +++ b/app/controllers/papers_controller.rb @@ -223,8 +223,8 @@ def show if @paper.invisible? # Redirect to login if not logged in if !current_user - session[:redirect_to] = request.fullpath - redirect_to 'sessions#create', allow_other_host: true and return + flash[:notice] = "You need to log in before viewing this paper." + redirect_to root_path and return end # Redirect to root if not an admin or the submitting author From 7c69c65680961443564ea59847246ca6fbfde875 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 12 Jun 2023 10:37:25 +0200 Subject: [PATCH 560/609] Refactor papers controller' specs --- spec/controllers/papers_controller_spec.rb | 96 +++++++++++++--------- 1 file changed, 59 insertions(+), 37 deletions(-) diff --git a/spec/controllers/papers_controller_spec.rb b/spec/controllers/papers_controller_spec.rb index 1e7401a3b..9818ef059 100644 --- a/spec/controllers/papers_controller_spec.rb +++ b/spec/controllers/papers_controller_spec.rb @@ -174,7 +174,7 @@ end end - describe "four oh four" do + describe "Paper visibility" do it "should 404 when passed an invalid sha" do get :show, params: {id: SecureRandom.hex}, format: "html" expect(response.body).to match /404 Not Found/ @@ -187,49 +187,71 @@ expect(response.status).to eq(404) end - it "should 404 for a paper that has been rejected" do - rejected_paper = create(:paper, state: 'rejected') - get :show, params: {id: rejected_paper.sha}, format: "html" - expect(response.status).to eq(302) - end + describe "invisible (submitted/rejected/withdrawn) papers" do + before do + @invisible_papers = [ + rejected_paper = create(:paper, state: 'rejected'), + submitted_paper = create(:paper, state: 'submitted'), + withdrawn_paper = create(:paper, state: 'withdrawn') + ] + end - it "should 404 for a paper that has just been submitted" do - submitted_paper = create(:paper, state: 'submitted') - get :show, params: {id: submitted_paper.sha}, format: "html" - expect(response.status).to eq(302) - end + it "should redirect home for not logged in users" do + @invisible_papers.each do |invisible_paper| + get :show, params: {id: invisible_paper.sha}, format: "html" + expect(response.status).to eq(302) + expect(response).to redirect_to(root_path) + expect(flash[:notice]).to eql "You need to log in before viewing this paper." + end + end - it "should be visible for a user who owns the paper" do - user = create(:user) - allow(controller).to receive_message_chain(:current_user).and_return(user) - submitted_paper = create(:paper, state: 'submitted', submitting_author: user) + it "should redirect home for users with no permissions (not an admin or the submitting author)" do + user = create(:user) + allow(controller).to receive_message_chain(:current_user).and_return(user) - get :show, params: {id: submitted_paper.sha}, format: "html" - expect(response.status).to eq(200) - end + @invisible_papers.each do |invisible_paper| + get :show, params: {id: invisible_paper.sha}, format: "html" + expect(response.status).to eq(302) + expect(response).to redirect_to(root_path) + expect(flash[:notice]).to eql "You don't have the permissions to view this paper." + end + end - it "should be visible for an admin" do - user = create(:user) - admin = create(:user, admin: true) - allow(controller).to receive_message_chain(:current_user).and_return(admin) - submitted_paper = create(:paper, state: 'submitted', submitting_author: user) + it "should be visible for a user who owns the paper" do + user = create(:user) + allow(controller).to receive_message_chain(:current_user).and_return(user) + submitted_paper = create(:paper, state: 'submitted', submitting_author: user) - get :show, params: {id: submitted_paper.sha}, format: "html" - expect(response.status).to eq(200) - end + get :show, params: {id: submitted_paper.sha}, format: "html" + expect(response.status).to eq(200) + end - it "should be visible for an AEiC" do - user = create(:user) - aeic = create(:user, editor: create(:board_editor)) - allow(controller).to receive_message_chain(:current_user).and_return(aeic) - submitted_paper = create(:paper, state: 'submitted', submitting_author: user) + it "should be visible for an admin" do + user = create(:user) + admin = create(:user, admin: true) + allow(controller).to receive_message_chain(:current_user).and_return(admin) + submitted_paper = create(:paper, state: 'submitted', submitting_author: user) + + get :show, params: {id: submitted_paper.sha}, format: "html" + expect(response.status).to eq(200) + end - get :show, params: {id: submitted_paper.sha}, format: "html" - expect(response.status).to eq(200) + it "should be visible for an AEiC" do + user = create(:user) + aeic = create(:user, editor: create(:board_editor)) + allow(controller).to receive_message_chain(:current_user).and_return(aeic) + submitted_paper = create(:paper, state: 'submitted', submitting_author: user) + + get :show, params: {id: submitted_paper.sha}, format: "html" + expect(response.status).to eq(200) + end end + + + end - describe "paper lookup" do + describe "Paper lookup" do it "should return the created_at date for a submitted paper" do submitted_paper = create(:paper, state: 'submitted', created_at: 3.days.ago, meta_review_issue_id: 123) @@ -264,7 +286,7 @@ end end - describe "lookup_track" do + describe "#lookup_track" do it "should return paper's track info" do track = create(:track, name: "Test track", short_name: "Tes Tr", code: 22) create(:paper, track: track, meta_review_issue_id: 123) @@ -287,7 +309,7 @@ end end - describe "accepted papers" do + describe "Accepted papers" do it "should not redirect when accepting any content type" do paper = create(:accepted_paper) request.headers["HTTP_ACCEPT"] = "*/*" @@ -318,7 +340,7 @@ end end - describe "status badges" do + describe "Status badges" do it "should return the correct status badge for a submitted paper" do submitted_paper = create(:paper, state: 'submitted') From 8650e9bdc9b453daa5faef3b17b42fb70cec03d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 15 Jun 2023 14:00:11 +0200 Subject: [PATCH 561/609] Add ToC --- app/assets/stylesheets/home.scss | 2 +- app/controllers/toc_controller.rb | 59 ++++++++++++ app/views/home/about.html.erb | 2 +- app/views/papers/index.html.erb | 16 ++-- app/views/toc/_list.html.erb | 30 +++++++ app/views/toc/current_issue.html.erb | 14 +++ app/views/toc/index.html.erb | 42 +++++++++ app/views/toc/issue.html.erb | 14 +++ app/views/toc/volume.html.erb | 13 +++ app/views/toc/year.html.erb | 13 +++ config/routes.rb | 6 ++ config/settings-development.yml | 1 + config/settings-production.yml | 1 + config/settings-test.yml | 1 + spec/factories/papers_factory.rb | 2 +- spec/system/toc_spec.rb | 128 +++++++++++++++++++++++++++ 16 files changed, 333 insertions(+), 11 deletions(-) create mode 100644 app/controllers/toc_controller.rb create mode 100644 app/views/toc/_list.html.erb create mode 100644 app/views/toc/current_issue.html.erb create mode 100644 app/views/toc/index.html.erb create mode 100644 app/views/toc/issue.html.erb create mode 100644 app/views/toc/volume.html.erb create mode 100644 app/views/toc/year.html.erb create mode 100644 spec/system/toc_spec.rb diff --git a/app/assets/stylesheets/home.scss b/app/assets/stylesheets/home.scss index 6a2099f62..9764e1906 100644 --- a/app/assets/stylesheets/home.scss +++ b/app/assets/stylesheets/home.scss @@ -55,7 +55,7 @@ } } -table.dashboard-table, table.comments-table{ +table.dashboard-table, table.comments-table, table.toc-table{ margin-top: 1em; width: 100%; background-color: white; diff --git a/app/controllers/toc_controller.rb b/app/controllers/toc_controller.rb new file mode 100644 index 000000000..3cc76c785 --- /dev/null +++ b/app/controllers/toc_controller.rb @@ -0,0 +1,59 @@ +class TocController < ApplicationController + include SettingsHelper + + before_action :set_toc_data + + def current_issue + filter_papers(@issues.last, :issue) + end + + def year + filter_papers(params[:year], :year) + end + + def volume + filter_papers(params[:volume], :volume) + @year = @years[params[:volume].to_i - 1] + end + + def issue + filter_papers(params[:issue], :issue) + @volume = volume_for_issue(params[:issue].to_i) + @year = @years[@volume - 1] + end + + private + + def set_toc_data + parsed_launch_date = Time.parse(setting(:launch_date)) + launch_year = parsed_launch_date.year + launch_month = parsed_launch_date.month + + current_volume = Time.new.year - launch_year + 1 + current_issue = 12 * (Time.new.year - launch_year) + Time.new.month - launch_month + 1 + + @years = (launch_year..Time.new.year).to_a + @volumes = (1..current_volume).to_a + @issues = (1..current_issue).to_a + + volumes_as_keys = @volumes.dup + issues_as_values = @issues.dup + @issues_by_volume = { volumes_as_keys.shift => issues_as_values.shift(12 - launch_month + 1)} + @issues_by_volume.merge! Hash[volumes_as_keys.zip(issues_as_values.in_groups_of(12, false))] + end + + def volume_for_issue(i) + @issues_by_volume.each_pair do |volume, issues| + return volume if issues.include?(i) + end + return 0 + end + + def filter_papers(param, field) + redirect_to(action: :index) and return if param.blank? + + @papers = Paper.search(param.to_i, fields: [{field.to_sym => :exact}], order: { page: :asc }, + page: params[:page], per_page: 50) + @pagy = Pagy.new_from_searchkick(@papers) + end +end diff --git a/app/views/home/about.html.erb b/app/views/home/about.html.erb index ef59f4b47..afe14e364 100644 --- a/app/views/home/about.html.erb +++ b/app/views/home/about.html.erb @@ -262,7 +262,7 @@ <%= link_to "🎉 Volunteer to review".html_safe, setting(:reviewers_signup_url), class: "menu-btn" %> Reviewer guidelines <%= link_to "✨ Donate to #{setting(:abbreviation)}  ✨".html_safe, "https://numfocus.org/donate-to-joss", class: "menu-btn", target: "_blank" %> -
            + <%= link_to "Table of contents".html_safe, toc_index_path, class: "menu-btn" %> diff --git a/app/views/papers/index.html.erb b/app/views/papers/index.html.erb index f4e9ac2fc..fb0a59cba 100644 --- a/app/views/papers/index.html.erb +++ b/app/views/papers/index.html.erb @@ -1,13 +1,13 @@
            -
            -
            - <% if @filtering %> - <%= image_tag "icon_papers.svg", height: "32px" %>

            <%= Rails.application.settings['abbreviation'] %> Papers: <%= @term %>

            - <% else %> - <%= image_tag "icon_papers.svg", height: "32px" %>

            <%= Rails.application.settings['abbreviation'] %> Papers

            - <% end %> -
            +
            +
            + <% if @filtering %> + <%= image_tag "icon_papers.svg", height: "32px" %>

            <%= Rails.application.settings['abbreviation'] %> Papers: <%= @term %>

            + <% else %> + <%= image_tag "icon_papers.svg", height: "32px" %>

            <%= Rails.application.settings['abbreviation'] %> Papers

            + <% end %>
            +
            diff --git a/app/views/toc/_list.html.erb b/app/views/toc/_list.html.erb new file mode 100644 index 000000000..694964479 --- /dev/null +++ b/app/views/toc/_list.html.erb @@ -0,0 +1,30 @@ +<% if @papers.any? %> + + + <% @papers.each do |paper| %> + + + + + + <% end %> + +
            + <%= link_to paper.title, paper.seo_url, title: paper.title, class: "d-inline-block text-truncate", style: "max-width: 450px;" %> + +
            Published <%= paper.created_at.strftime("%d-%m-%Y") %>
            +
            + <%= image_tag 'doi.svg' %><%= link_to paper.doi, paper.seo_url %> +
            + +
            +
            + <%== pagy_info(@pagy, i18n_key: "paper") %> +
            + <%= pagy_pagination(@pagy) if @pagy.pages > 1%> +
            +<% else %> + + +
            No papers
            +<% end %> diff --git a/app/views/toc/current_issue.html.erb b/app/views/toc/current_issue.html.erb new file mode 100644 index 000000000..a7e0e7e9c --- /dev/null +++ b/app/views/toc/current_issue.html.erb @@ -0,0 +1,14 @@ +
            +
            <%= link_to "Table of Contents", toc_index_path %> Current issue
            +
            +
            + <%= image_tag "icon_papers.svg", height: "32px" %> +

            Year <%= @years.last %> Volume <%= @volumes.last %> Issue <%= @issues.last %>

            +
            +
            +
            + + +
            + <%= render partial: "list" %> +
            diff --git a/app/views/toc/index.html.erb b/app/views/toc/index.html.erb new file mode 100644 index 000000000..8beddba2f --- /dev/null +++ b/app/views/toc/index.html.erb @@ -0,0 +1,42 @@ +
            +
            All volumes and issues
            +
            +
            + <%= image_tag "icon_papers.svg", height: "32px" %> +

            Table of Contents

            +
            +
            +
            + +
            + + + + + + + <% @issues_by_volume.each_pair do |v, issues_in_v| %> + <% if issues_in_v.present? %> + + + + + + <% end %> + <% end %> + +
            +
            + <%= image_tag "icon_papers.svg", height: "16px" %> + <%= link_to "Current issue", toc_current_issue_path, title: "Papers in current issue", style: "max-width: 450px;" %> +
            +
            +
            + <%= link_to "Volume #{v}", toc_volume_path(volume: v), title: "Papers from volume #{v}", class: "d-inline-block text-truncate", style: "max-width: 450px;" %> + + <% issues_in_v.each do |i| %> + <%= link_to "Issue #{i}".html_safe, toc_issue_path(issue: i), title: "Papers in issue #{i}", class: "d-inline-block text-truncate px-2", style: "max-width: 450px;" %> + <% end %> + +
            +
            diff --git a/app/views/toc/issue.html.erb b/app/views/toc/issue.html.erb new file mode 100644 index 000000000..6f4592db1 --- /dev/null +++ b/app/views/toc/issue.html.erb @@ -0,0 +1,14 @@ +
            +
            <%= link_to "Table of Contents", toc_index_path %> Year <%= @year %> Volume <%= @volume %>
            +
            +
            + <%= image_tag "icon_papers.svg", height: "32px" %> +

            Issue <%= params[:issue] %>

            + +
            +
            +
            + +
            + <%= render partial: "list" %> +
            diff --git a/app/views/toc/volume.html.erb b/app/views/toc/volume.html.erb new file mode 100644 index 000000000..46647dbc4 --- /dev/null +++ b/app/views/toc/volume.html.erb @@ -0,0 +1,13 @@ +
            +
            <%= link_to "Table of Contents", toc_index_path %> <%= "Year " + @year.to_s if @year %>
            +
            +
            + <%= image_tag "icon_papers.svg", height: "32px" %> +

            Volume <%= params[:volume] %>

            +
            +
            +
            + +
            + <%= render partial: "list" %> +
            diff --git a/app/views/toc/year.html.erb b/app/views/toc/year.html.erb new file mode 100644 index 000000000..286ed65dd --- /dev/null +++ b/app/views/toc/year.html.erb @@ -0,0 +1,13 @@ +
            +
            <%= link_to "Table of Contents", toc_index_path %>
            +
            +
            + <%= image_tag "icon_papers.svg", height: "32px" %> +

            Year <%= params[:year] %>

            +
            +
            +
            + +
            + <%= render partial: "list" %> +
            diff --git a/config/routes.rb b/config/routes.rb index ae17f5323..4be6d66cc 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -47,6 +47,12 @@ end end + get '/toc', to: "toc#index", as: :toc_index + get '/toc/current-issue', to: "toc#current_issue", as: :toc_current_issue + get '/toc/year/:year', to: "toc#year", as: :toc_year + get '/toc/volume/:volume', to: "toc#volume", as: :toc_volume + get '/toc/issue/:issue', to: "toc#issue", as: :toc_issue + get '/aeic/', to: "aeic_dashboard#index", as: "aeic_dashboard" get '/editors/lookup/:login', to: "editors#lookup" get '/papers/lookup/:id', to: "papers#lookup" diff --git a/config/settings-development.yml b/config/settings-development.yml index 221c144cb..36c83f4f5 100644 --- a/config/settings-development.yml +++ b/config/settings-development.yml @@ -7,6 +7,7 @@ logo_url: "https://joss.theoj.org/logo_large.png" url: "http://0.0.0.0:3000" editor_email: "joss.theoj@gmail.com" noreply_email: "noreply@joss.theoj.org" +launch_date: "2016-05-05" twitter: "@JOSS_TheOJ" mastodon_url: "https://fosstodon.org/@JOSS" google_analytics: "UA-47852178-4" diff --git a/config/settings-production.yml b/config/settings-production.yml index 2a3027e68..eaa245a56 100644 --- a/config/settings-production.yml +++ b/config/settings-production.yml @@ -7,6 +7,7 @@ logo_url: "https://joss.theoj.org/logo_large.jpg" url: "https://joss.theoj.org" editor_email: "admin@theoj.org" noreply_email: "admin@theoj.org" +launch_date: "2016-05-05" twitter: "@JOSS_TheOJ" mastodon_url: "https://fosstodon.org/@JOSS" google_analytics: "UA-47852178-4" diff --git a/config/settings-test.yml b/config/settings-test.yml index e07dd1e37..f33cdb35b 100644 --- a/config/settings-test.yml +++ b/config/settings-test.yml @@ -7,6 +7,7 @@ logo_url: "http://joss.theoj.org/logo_large.png" url: "http://joss.theoj.org" editor_email: "joss.theoj@gmail.com" noreply_email: "noreply@joss.theoj.org" +launch_date: "2016-05-05" twitter: "@JOSS_TheOJ" mastodon_url: "https://fosstodon.org/@JOSS" google_analytics: "UA-47852178-4" diff --git a/spec/factories/papers_factory.rb b/spec/factories/papers_factory.rb index c0abe9dff..b9dc458b2 100644 --- a/spec/factories/papers_factory.rb +++ b/spec/factories/papers_factory.rb @@ -47,7 +47,7 @@ state { 'retracted' } accepted_at { Time.now } review_issue_id { 0 } - doi { '10.21105/joss.00000' } + sequence(:doi) {|n| "10.21105/joss.0000#{n}" } end factory :submitted_paper_with_sha do diff --git a/spec/system/toc_spec.rb b/spec/system/toc_spec.rb new file mode 100644 index 000000000..521edbf42 --- /dev/null +++ b/spec/system/toc_spec.rb @@ -0,0 +1,128 @@ +require "rails_helper" + +feature "Table of Contents" do + before do + parsed_launch_date = Time.parse(Rails.application.settings[:launch_date]) + @launch_year = parsed_launch_date.year + @launch_month = parsed_launch_date.month + + now = Time.now + + @current_volume = now.year - @launch_year + 1 + @current_issue = 12 * (now.year - @launch_year) + now.month - @launch_month + 1 + + @years = (@launch_year..now.year).to_a + @volumes = (1..@current_volume).to_a + @issues = (1..@current_issue).to_a + + + @first_accepted_paper = create(:accepted_paper, title: "Paper number 1", accepted_at: parsed_launch_date) + @retracted_paper = create(:retracted_paper, title: "Bad paper", accepted_at: now) + @last_accepted_paper = create(:accepted_paper, title: "Research paper 2", accepted_at: now) + + @first_accepted_paper.metadata["paper"]["year"] = @launch_year + @first_accepted_paper.metadata["paper"]["volume"] = 1 + @first_accepted_paper.metadata["paper"]["issue"] = 1 + @first_accepted_paper.metadata["paper"]["page"] = 1 + @first_accepted_paper.save! + + @retracted_paper.metadata["paper"]["year"] = now.year + @retracted_paper.metadata["paper"]["volume"] = @current_volume + @retracted_paper.metadata["paper"]["issue"] = @current_issue + @retracted_paper.metadata["paper"]["page"] = 2 + @retracted_paper.save! + + @last_accepted_paper.metadata["paper"]["year"] = now.year + @last_accepted_paper.metadata["paper"]["volume"] = @current_volume + @last_accepted_paper.metadata["paper"]["issue"] = @current_issue + @last_accepted_paper.metadata["paper"]["page"] = 3 + @last_accepted_paper.save! + + Paper.reindex + end + + scenario "index" do + visit toc_index_path + + expect(page).to have_content("Table of Contents") + expect(page).to_not have_link("Table of Contents") + + @volumes.each do |volume| + expect(page).to have_link(volume.to_s, href: toc_volume_path(volume: volume)) + end + + @issues.each do |issue| + expect(page).to have_link(issue.to_s, href: toc_issue_path(issue: issue)) + end + + expect(page).to have_link("Current issue", href: toc_current_issue_path) + end + + scenario "by year" do + visit toc_year_path(year: @years.first) + expect(page).to have_content("Year #{@years.first}") + expect(page).to have_link("Table of Contents") + expect(page).to have_link(@first_accepted_paper.title, href: @first_accepted_paper.seo_url) + expect(page).to_not have_link(@retracted_paper.title) + expect(page).to_not have_link(@last_accepted_paper.title) + + visit toc_year_path(year: @years.last) + expect(page).to have_content("Year #{@years.last}") + expect(page).to have_link("Table of Contents") + expect(page).to have_link(@retracted_paper.title, href: @retracted_paper.seo_url) + expect(page).to have_link(@last_accepted_paper.title, href: @last_accepted_paper.seo_url) + expect(page).to_not have_link(@first_accepted_paper.title) + end + + scenario "by volume" do + visit toc_volume_path(volume: 1) + expect(page).to have_content("Year #{@years.first}") + expect(page).to have_content("Volume 1") + expect(page).to have_link("Table of Contents") + expect(page).to have_link(@first_accepted_paper.title, href: @first_accepted_paper.seo_url) + expect(page).to_not have_link(@retracted_paper.title) + expect(page).to_not have_link(@last_accepted_paper.title) + + visit toc_volume_path(volume: @volumes.last) + expect(page).to have_content("Year #{@years.last}") + expect(page).to have_content("Volume #{@volumes.last}") + expect(page).to have_link("Table of Contents") + expect(page).to have_link(@retracted_paper.title, href: @retracted_paper.seo_url) + expect(page).to have_link(@last_accepted_paper.title, href: @last_accepted_paper.seo_url) + expect(page).to_not have_link(@first_accepted_paper.title) + end + + scenario "by issue" do + visit toc_issue_path(issue: 1) + expect(page).to have_content("Year #{@years.first} Volume 1") + expect(page).to have_content("Issue 1") + expect(page).to have_link("Table of Contents") + expect(page).to have_link(@first_accepted_paper.title, href: @first_accepted_paper.seo_url) + expect(page).to_not have_link(@retracted_paper.title) + expect(page).to_not have_link(@last_accepted_paper.title) + + visit toc_issue_path(issue: @issues.last) + expect(page).to have_content("Year #{@years.last} Volume #{@volumes.last}") + expect(page).to have_content("Issue #{@issues.last}") + expect(page).to have_link("Table of Contents") + expect(page).to have_link(@retracted_paper.title, href: @retracted_paper.seo_url) + expect(page).to have_link(@last_accepted_paper.title, href: @last_accepted_paper.seo_url) + expect(page).to_not have_link(@first_accepted_paper.title) + + visit toc_issue_path(issue: @issues[2]) + + expect(page).to_not have_link(@first_accepted_paper.title) + expect(page).to_not have_link(@retracted_paper.title) + expect(page).to_not have_link(@last_accepted_paper.title) + end + + scenario "current issue" do + visit toc_current_issue_path + expect(page).to have_content("Current issue") + expect(page).to have_content("Year #{@years.last} Volume #{@volumes.last} Issue #{@issues.last}") + expect(page).to have_link("Table of Contents") + expect(page).to have_link(@retracted_paper.title, href: @retracted_paper.seo_url) + expect(page).to have_link(@last_accepted_paper.title, href: @last_accepted_paper.seo_url) + expect(page).to_not have_link(@first_accepted_paper.title) + end +end From 7d3d442b5bd3b37a6ce6a030b4ebdc733766dc0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 16 Jun 2023 12:06:23 +0200 Subject: [PATCH 562/609] Change pagination overflow policy --- config/initializers/pagy.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/pagy.rb b/config/initializers/pagy.rb index c2f2cac6e..ee41e2bda 100644 --- a/config/initializers/pagy.rb +++ b/config/initializers/pagy.rb @@ -7,7 +7,7 @@ Pagy::DEFAULT[:size] = [] require 'pagy/extras/overflow' -Pagy::DEFAULT[:overflow] = :last_page +Pagy::DEFAULT[:overflow] = :empty_page # Elasticsearch Rails extra: Paginate `ElasticsearchRails::Results` objects From 22c588dda600346a515191a254045248864946e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 16 Jun 2023 13:11:14 +0200 Subject: [PATCH 563/609] Add year and month info to ToC and issue pages --- app/controllers/toc_controller.rb | 14 ++++++++------ app/views/toc/index.html.erb | 4 ++-- app/views/toc/issue.html.erb | 2 +- spec/system/toc_spec.rb | 24 ++++++++++++------------ 4 files changed, 23 insertions(+), 21 deletions(-) diff --git a/app/controllers/toc_controller.rb b/app/controllers/toc_controller.rb index 3cc76c785..131d464d7 100644 --- a/app/controllers/toc_controller.rb +++ b/app/controllers/toc_controller.rb @@ -20,25 +20,27 @@ def issue filter_papers(params[:issue], :issue) @volume = volume_for_issue(params[:issue].to_i) @year = @years[@volume - 1] + @month = (params[:issue].to_i - 1 + @launch_month) % 12 + @month = 12 if @month == 0 end private def set_toc_data parsed_launch_date = Time.parse(setting(:launch_date)) - launch_year = parsed_launch_date.year - launch_month = parsed_launch_date.month + @launch_year = parsed_launch_date.year + @launch_month = parsed_launch_date.month - current_volume = Time.new.year - launch_year + 1 - current_issue = 12 * (Time.new.year - launch_year) + Time.new.month - launch_month + 1 + current_volume = Time.new.year - @launch_year + 1 + current_issue = 12 * (Time.new.year - @launch_year) + Time.new.month - @launch_month + 1 - @years = (launch_year..Time.new.year).to_a + @years = (@launch_year..Time.new.year).to_a @volumes = (1..current_volume).to_a @issues = (1..current_issue).to_a volumes_as_keys = @volumes.dup issues_as_values = @issues.dup - @issues_by_volume = { volumes_as_keys.shift => issues_as_values.shift(12 - launch_month + 1)} + @issues_by_volume = { volumes_as_keys.shift => issues_as_values.shift(12 - @launch_month + 1)} @issues_by_volume.merge! Hash[volumes_as_keys.zip(issues_as_values.in_groups_of(12, false))] end diff --git a/app/views/toc/index.html.erb b/app/views/toc/index.html.erb index 8beddba2f..06d731fca 100644 --- a/app/views/toc/index.html.erb +++ b/app/views/toc/index.html.erb @@ -25,11 +25,11 @@ <% if issues_in_v.present? %> - <%= link_to "Volume #{v}", toc_volume_path(volume: v), title: "Papers from volume #{v}", class: "d-inline-block text-truncate", style: "max-width: 450px;" %> + <%= link_to "Volume #{v} (#{@years[@volumes.index(v)]})", toc_volume_path(volume: v), title: "Papers from volume #{v}", class: "d-inline-block text-truncate", style: "max-width: 450px;" %> <% issues_in_v.each do |i| %> - <%= link_to "Issue #{i}".html_safe, toc_issue_path(issue: i), title: "Papers in issue #{i}", class: "d-inline-block text-truncate px-2", style: "max-width: 450px;" %> + <%= link_to("Issue #{i}".html_safe, toc_issue_path(issue: i), title: "Papers in issue #{i}", class: "d-inline-block text-truncate px-2", style: "max-width: 450px;") if i.present? %> <% end %> diff --git a/app/views/toc/issue.html.erb b/app/views/toc/issue.html.erb index 6f4592db1..71f3bad94 100644 --- a/app/views/toc/issue.html.erb +++ b/app/views/toc/issue.html.erb @@ -1,5 +1,5 @@
            -
            <%= link_to "Table of Contents", toc_index_path %> Year <%= @year %> Volume <%= @volume %>
            +
            <%= link_to "Table of Contents", toc_index_path %> <%= Date::MONTHNAMES[@month] %> <%= @year %> Volume <%= @volume %>
            <%= image_tag "icon_papers.svg", height: "32px" %> diff --git a/spec/system/toc_spec.rb b/spec/system/toc_spec.rb index 521edbf42..7c886fe21 100644 --- a/spec/system/toc_spec.rb +++ b/spec/system/toc_spec.rb @@ -6,19 +6,19 @@ @launch_year = parsed_launch_date.year @launch_month = parsed_launch_date.month - now = Time.now + @now = Time.now - @current_volume = now.year - @launch_year + 1 - @current_issue = 12 * (now.year - @launch_year) + now.month - @launch_month + 1 + @current_volume = @now.year - @launch_year + 1 + @current_issue = 12 * (@now.year - @launch_year) + @now.month - @launch_month + 1 - @years = (@launch_year..now.year).to_a + @years = (@launch_year..@now.year).to_a @volumes = (1..@current_volume).to_a @issues = (1..@current_issue).to_a @first_accepted_paper = create(:accepted_paper, title: "Paper number 1", accepted_at: parsed_launch_date) - @retracted_paper = create(:retracted_paper, title: "Bad paper", accepted_at: now) - @last_accepted_paper = create(:accepted_paper, title: "Research paper 2", accepted_at: now) + @retracted_paper = create(:retracted_paper, title: "Bad paper", accepted_at: @now) + @last_accepted_paper = create(:accepted_paper, title: "Research paper 2", accepted_at: @now) @first_accepted_paper.metadata["paper"]["year"] = @launch_year @first_accepted_paper.metadata["paper"]["volume"] = 1 @@ -26,13 +26,13 @@ @first_accepted_paper.metadata["paper"]["page"] = 1 @first_accepted_paper.save! - @retracted_paper.metadata["paper"]["year"] = now.year + @retracted_paper.metadata["paper"]["year"] = @now.year @retracted_paper.metadata["paper"]["volume"] = @current_volume @retracted_paper.metadata["paper"]["issue"] = @current_issue @retracted_paper.metadata["paper"]["page"] = 2 @retracted_paper.save! - @last_accepted_paper.metadata["paper"]["year"] = now.year + @last_accepted_paper.metadata["paper"]["year"] = @now.year @last_accepted_paper.metadata["paper"]["volume"] = @current_volume @last_accepted_paper.metadata["paper"]["issue"] = @current_issue @last_accepted_paper.metadata["paper"]["page"] = 3 @@ -48,11 +48,11 @@ expect(page).to_not have_link("Table of Contents") @volumes.each do |volume| - expect(page).to have_link(volume.to_s, href: toc_volume_path(volume: volume)) + expect(page).to have_link("Volume #{volume} (#{@years[@volumes.index(volume)]})", href: toc_volume_path(volume: volume)) end @issues.each do |issue| - expect(page).to have_link(issue.to_s, href: toc_issue_path(issue: issue)) + expect(page).to have_link("Issue #{issue}", href: toc_issue_path(issue: issue)) end expect(page).to have_link("Current issue", href: toc_current_issue_path) @@ -94,7 +94,7 @@ scenario "by issue" do visit toc_issue_path(issue: 1) - expect(page).to have_content("Year #{@years.first} Volume 1") + expect(page).to have_content("#{Date::MONTHNAMES[@launch_month]} #{@years.first} Volume 1") expect(page).to have_content("Issue 1") expect(page).to have_link("Table of Contents") expect(page).to have_link(@first_accepted_paper.title, href: @first_accepted_paper.seo_url) @@ -102,7 +102,7 @@ expect(page).to_not have_link(@last_accepted_paper.title) visit toc_issue_path(issue: @issues.last) - expect(page).to have_content("Year #{@years.last} Volume #{@volumes.last}") + expect(page).to have_content("#{Date::MONTHNAMES[@now.month]} #{@years.last} Volume #{@volumes.last}") expect(page).to have_content("Issue #{@issues.last}") expect(page).to have_link("Table of Contents") expect(page).to have_link(@retracted_paper.title, href: @retracted_paper.seo_url) From da081c99515bb5bb8a1fe81c969e94c0312791dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 16 Jun 2023 14:41:16 +0200 Subject: [PATCH 564/609] Link ToC from footer --- app/views/content/layout/_footer.html.erb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/views/content/layout/_footer.html.erb b/app/views/content/layout/_footer.html.erb index 3cb516670..3b4985e11 100644 --- a/app/views/content/layout/_footer.html.erb +++ b/app/views/content/layout/_footer.html.erb @@ -12,5 +12,9 @@
            <%= image_tag "cc-logo.svg", height: "48px" %> -

            Public user content licensed <%= link_to "CC BY 4.0", "https://creativecommons.org/licenses/by/4.0/" %> unless otherwise specified.
            ISSN <%= Rails.application.settings['issn'] %>

            +

            + <%= link_to "Table of Contents", toc_index_path %> +
            Public user content licensed <%= link_to "CC BY 4.0", "https://creativecommons.org/licenses/by/4.0/" %> unless otherwise specified. +
            ISSN <%= Rails.application.settings['issn'] %> +

            From e816c38e7aeb3139e58df6353e5aaa93143e7895 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 16 Jun 2023 14:49:16 +0200 Subject: [PATCH 565/609] Refactor ToC specs --- app/views/toc/current_issue.html.erb | 2 +- app/views/toc/index.html.erb | 2 +- app/views/toc/issue.html.erb | 2 +- app/views/toc/volume.html.erb | 2 +- app/views/toc/year.html.erb | 2 +- spec/system/toc_spec.rb | 58 ++++++++++++++++++---------- 6 files changed, 42 insertions(+), 26 deletions(-) diff --git a/app/views/toc/current_issue.html.erb b/app/views/toc/current_issue.html.erb index a7e0e7e9c..9623201e6 100644 --- a/app/views/toc/current_issue.html.erb +++ b/app/views/toc/current_issue.html.erb @@ -1,4 +1,4 @@ -
            +
            <%= link_to "Table of Contents", toc_index_path %> Current issue
            diff --git a/app/views/toc/index.html.erb b/app/views/toc/index.html.erb index 06d731fca..fd61ee712 100644 --- a/app/views/toc/index.html.erb +++ b/app/views/toc/index.html.erb @@ -1,4 +1,4 @@ -
            +
            All volumes and issues
            diff --git a/app/views/toc/issue.html.erb b/app/views/toc/issue.html.erb index 71f3bad94..911d7b510 100644 --- a/app/views/toc/issue.html.erb +++ b/app/views/toc/issue.html.erb @@ -1,4 +1,4 @@ -
            +
            <%= link_to "Table of Contents", toc_index_path %> <%= Date::MONTHNAMES[@month] %> <%= @year %> Volume <%= @volume %>
            diff --git a/app/views/toc/volume.html.erb b/app/views/toc/volume.html.erb index 46647dbc4..f348125d0 100644 --- a/app/views/toc/volume.html.erb +++ b/app/views/toc/volume.html.erb @@ -1,4 +1,4 @@ -
            +
            <%= link_to "Table of Contents", toc_index_path %> <%= "Year " + @year.to_s if @year %>
            diff --git a/app/views/toc/year.html.erb b/app/views/toc/year.html.erb index 286ed65dd..e2e2cbbd9 100644 --- a/app/views/toc/year.html.erb +++ b/app/views/toc/year.html.erb @@ -1,4 +1,4 @@ -
            +
            <%= link_to "Table of Contents", toc_index_path %>
            diff --git a/spec/system/toc_spec.rb b/spec/system/toc_spec.rb index 7c886fe21..081f59281 100644 --- a/spec/system/toc_spec.rb +++ b/spec/system/toc_spec.rb @@ -44,8 +44,10 @@ scenario "index" do visit toc_index_path - expect(page).to have_content("Table of Contents") - expect(page).to_not have_link("Table of Contents") + within("#toc-header") do + expect(page).to have_content("Table of Contents") + expect(page).to_not have_link("Table of Contents") + end @volumes.each do |volume| expect(page).to have_link("Volume #{volume} (#{@years[@volumes.index(volume)]})", href: toc_volume_path(volume: volume)) @@ -60,15 +62,19 @@ scenario "by year" do visit toc_year_path(year: @years.first) - expect(page).to have_content("Year #{@years.first}") - expect(page).to have_link("Table of Contents") + within("#toc-header") do + expect(page).to have_content("Year #{@years.first}") + expect(page).to have_link("Table of Contents") + end expect(page).to have_link(@first_accepted_paper.title, href: @first_accepted_paper.seo_url) expect(page).to_not have_link(@retracted_paper.title) expect(page).to_not have_link(@last_accepted_paper.title) visit toc_year_path(year: @years.last) - expect(page).to have_content("Year #{@years.last}") - expect(page).to have_link("Table of Contents") + within("#toc-header") do + expect(page).to have_content("Year #{@years.last}") + expect(page).to have_link("Table of Contents") + end expect(page).to have_link(@retracted_paper.title, href: @retracted_paper.seo_url) expect(page).to have_link(@last_accepted_paper.title, href: @last_accepted_paper.seo_url) expect(page).to_not have_link(@first_accepted_paper.title) @@ -76,17 +82,21 @@ scenario "by volume" do visit toc_volume_path(volume: 1) - expect(page).to have_content("Year #{@years.first}") - expect(page).to have_content("Volume 1") - expect(page).to have_link("Table of Contents") + within("#toc-header") do + expect(page).to have_content("Year #{@years.first}") + expect(page).to have_content("Volume 1") + expect(page).to have_link("Table of Contents") + end expect(page).to have_link(@first_accepted_paper.title, href: @first_accepted_paper.seo_url) expect(page).to_not have_link(@retracted_paper.title) expect(page).to_not have_link(@last_accepted_paper.title) visit toc_volume_path(volume: @volumes.last) - expect(page).to have_content("Year #{@years.last}") - expect(page).to have_content("Volume #{@volumes.last}") - expect(page).to have_link("Table of Contents") + within("#toc-header") do + expect(page).to have_content("Year #{@years.last}") + expect(page).to have_content("Volume #{@volumes.last}") + expect(page).to have_link("Table of Contents") + end expect(page).to have_link(@retracted_paper.title, href: @retracted_paper.seo_url) expect(page).to have_link(@last_accepted_paper.title, href: @last_accepted_paper.seo_url) expect(page).to_not have_link(@first_accepted_paper.title) @@ -94,17 +104,21 @@ scenario "by issue" do visit toc_issue_path(issue: 1) - expect(page).to have_content("#{Date::MONTHNAMES[@launch_month]} #{@years.first} Volume 1") - expect(page).to have_content("Issue 1") - expect(page).to have_link("Table of Contents") + within("#toc-header") do + expect(page).to have_content("#{Date::MONTHNAMES[@launch_month]} #{@years.first} Volume 1") + expect(page).to have_content("Issue 1") + expect(page).to have_link("Table of Contents") + end expect(page).to have_link(@first_accepted_paper.title, href: @first_accepted_paper.seo_url) expect(page).to_not have_link(@retracted_paper.title) expect(page).to_not have_link(@last_accepted_paper.title) visit toc_issue_path(issue: @issues.last) - expect(page).to have_content("#{Date::MONTHNAMES[@now.month]} #{@years.last} Volume #{@volumes.last}") - expect(page).to have_content("Issue #{@issues.last}") - expect(page).to have_link("Table of Contents") + within("#toc-header") do + expect(page).to have_content("#{Date::MONTHNAMES[@now.month]} #{@years.last} Volume #{@volumes.last}") + expect(page).to have_content("Issue #{@issues.last}") + expect(page).to have_link("Table of Contents") + end expect(page).to have_link(@retracted_paper.title, href: @retracted_paper.seo_url) expect(page).to have_link(@last_accepted_paper.title, href: @last_accepted_paper.seo_url) expect(page).to_not have_link(@first_accepted_paper.title) @@ -118,9 +132,11 @@ scenario "current issue" do visit toc_current_issue_path - expect(page).to have_content("Current issue") - expect(page).to have_content("Year #{@years.last} Volume #{@volumes.last} Issue #{@issues.last}") - expect(page).to have_link("Table of Contents") + within("#toc-header") do + expect(page).to have_content("Current issue") + expect(page).to have_content("Year #{@years.last} Volume #{@volumes.last} Issue #{@issues.last}") + expect(page).to have_link("Table of Contents") + end expect(page).to have_link(@retracted_paper.title, href: @retracted_paper.seo_url) expect(page).to have_link(@last_accepted_paper.title, href: @last_accepted_paper.seo_url) expect(page).to_not have_link(@first_accepted_paper.title) From ea841be6f162c2311a03e269a2cd695b4b222bce Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Thu, 22 Jun 2023 17:32:53 -0400 Subject: [PATCH 566/609] Fixing timestamp on TOC --- app/views/toc/_list.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/toc/_list.html.erb b/app/views/toc/_list.html.erb index 694964479..bec7e1203 100644 --- a/app/views/toc/_list.html.erb +++ b/app/views/toc/_list.html.erb @@ -7,7 +7,7 @@ <%= link_to paper.title, paper.seo_url, title: paper.title, class: "d-inline-block text-truncate", style: "max-width: 450px;" %> -
            Published <%= paper.created_at.strftime("%d-%m-%Y") %>
            +
            Published <%= paper.accepted_at.strftime("%d-%m-%Y") %>
            <%= image_tag 'doi.svg' %><%= link_to paper.doi, paper.seo_url %> From dd60c08c4aa77747e31b85b6ea23891d8a349612 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Thu, 22 Jun 2023 23:14:54 -0400 Subject: [PATCH 567/609] Order by accepted_at --- app/controllers/toc_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/toc_controller.rb b/app/controllers/toc_controller.rb index 131d464d7..faae11d1b 100644 --- a/app/controllers/toc_controller.rb +++ b/app/controllers/toc_controller.rb @@ -54,7 +54,7 @@ def volume_for_issue(i) def filter_papers(param, field) redirect_to(action: :index) and return if param.blank? - @papers = Paper.search(param.to_i, fields: [{field.to_sym => :exact}], order: { page: :asc }, + @papers = Paper.search(param.to_i, fields: [{field.to_sym => :exact}], order: { accepted_at: :desc }, page: params[:page], per_page: 50) @pagy = Pagy.new_from_searchkick(@papers) end From e116853bd9115d3d8337f3a03bcd4bade2fdf1a8 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Thu, 22 Jun 2023 23:17:52 -0400 Subject: [PATCH 568/609] Order asc! --- app/controllers/toc_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/toc_controller.rb b/app/controllers/toc_controller.rb index faae11d1b..5309a3a70 100644 --- a/app/controllers/toc_controller.rb +++ b/app/controllers/toc_controller.rb @@ -54,7 +54,7 @@ def volume_for_issue(i) def filter_papers(param, field) redirect_to(action: :index) and return if param.blank? - @papers = Paper.search(param.to_i, fields: [{field.to_sym => :exact}], order: { accepted_at: :desc }, + @papers = Paper.search(param.to_i, fields: [{field.to_sym => :exact}], order: { accepted_at: :asc }, page: params[:page], per_page: 50) @pagy = Pagy.new_from_searchkick(@papers) end From 7edc087e0dab006a444a06248898a185f6720ff0 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Thu, 22 Jun 2023 23:24:32 -0400 Subject: [PATCH 569/609] Add style to issue td --- app/views/toc/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/toc/index.html.erb b/app/views/toc/index.html.erb index fd61ee712..c6ce3b5b1 100644 --- a/app/views/toc/index.html.erb +++ b/app/views/toc/index.html.erb @@ -27,7 +27,7 @@ <%= link_to "Volume #{v} (#{@years[@volumes.index(v)]})", toc_volume_path(volume: v), title: "Papers from volume #{v}", class: "d-inline-block text-truncate", style: "max-width: 450px;" %> - + <% issues_in_v.each do |i| %> <%= link_to("Issue #{i}".html_safe, toc_issue_path(issue: i), title: "Papers in issue #{i}", class: "d-inline-block text-truncate px-2", style: "max-width: 450px;") if i.present? %> <% end %> From f88220c362695224da2cd91570ba87f1d672cbd4 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Thu, 22 Jun 2023 23:28:39 -0400 Subject: [PATCH 570/609] String justification --- app/views/toc/index.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/toc/index.html.erb b/app/views/toc/index.html.erb index c6ce3b5b1..886d6e0f1 100644 --- a/app/views/toc/index.html.erb +++ b/app/views/toc/index.html.erb @@ -29,7 +29,7 @@ <% issues_in_v.each do |i| %> - <%= link_to("Issue #{i}".html_safe, toc_issue_path(issue: i), title: "Papers in issue #{i}", class: "d-inline-block text-truncate px-2", style: "max-width: 450px;") if i.present? %> + <%= link_to("Issue #{i.to_s.rjust(3, "0")}".html_safe, toc_issue_path(issue: i), title: "Papers in issue #{i}", class: "d-inline-block text-truncate px-2", style: "max-width: 450px;") if i.present? %> <% end %> From 6737fd270b2dde5d57dbc2562631a3d8fa5422bf Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Thu, 22 Jun 2023 23:33:06 -0400 Subject: [PATCH 571/609] Fixing specs --- spec/system/toc_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/system/toc_spec.rb b/spec/system/toc_spec.rb index 081f59281..3be912355 100644 --- a/spec/system/toc_spec.rb +++ b/spec/system/toc_spec.rb @@ -54,7 +54,7 @@ end @issues.each do |issue| - expect(page).to have_link("Issue #{issue}", href: toc_issue_path(issue: issue)) + expect(page).to have_link("Issue #{issue.to_s.rjust(3, "0")}", href: toc_issue_path(issue: issue)) end expect(page).to have_link("Current issue", href: toc_current_issue_path) From ad240f3349503e76363f8937b1e57bbce6eb36f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 23 Jun 2023 12:37:22 +0200 Subject: [PATCH 572/609] Update bundler --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 5b509a02a..95eca853a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -524,4 +524,4 @@ RUBY VERSION ruby 3.2.2p53 BUNDLED WITH - 2.4.7 + 2.4.14 From 606c657ee2bdbf66b1e7d8c2815896fe73d86bc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 23 Jun 2023 12:47:02 +0200 Subject: [PATCH 573/609] Update Gemfile.lock --- Gemfile.lock | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 95eca853a..02582afa3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -80,7 +80,7 @@ GEM msgpack (~> 1.2) builder (3.2.4) byebug (11.1.3) - capybara (3.39.1) + capybara (3.39.2) addressable matrix mini_mime (>= 0.1.3) @@ -156,9 +156,9 @@ GEM retriable (>= 2.0, < 4.a) rexml webrick - google-apis-drive_v3 (0.40.0) + google-apis-drive_v3 (0.42.0) google-apis-core (>= 0.11.0, < 2.a) - google-apis-sheets_v4 (0.22.0) + google-apis-sheets_v4 (0.23.0) google-apis-core (>= 0.11.0, < 2.a) google_drive (3.0.7) google-apis-drive_v3 (>= 0.5.0, < 1.0.0) @@ -198,9 +198,9 @@ GEM nokogiri (>= 1.4) http_parser.rb (0.8.0) httpclient (2.8.3) - i18n (1.13.0) + i18n (1.14.1) concurrent-ruby (~> 1.0) - importmap-rails (1.1.6) + importmap-rails (1.2.1) actionpack (>= 6.0.0) railties (>= 6.0.0) issue (1.0.0) @@ -209,7 +209,7 @@ GEM jbuilder (2.11.5) actionview (>= 5.0.0) activesupport (>= 5.0.0) - jwt (2.7.0) + jwt (2.7.1) libv8-node (18.16.0.0) libv8-node (18.16.0.0-x86_64-darwin) libv8-node (18.16.0.0-x86_64-linux) @@ -233,13 +233,13 @@ GEM mini_portile2 (2.8.2) mini_racer (0.8.0) libv8-node (~> 18.16.0.0) - minitest (5.18.0) + minitest (5.18.1) msgpack (1.7.1) multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.3.0) nenv (0.3.0) - net-imap (0.3.4) + net-imap (0.3.6) date net-protocol net-pop (0.1.2) @@ -270,10 +270,10 @@ GEM rack (>= 1.2, < 4) snaky_hash (~> 2.0) version_gem (~> 1.1) - octicons (19.1.0) - octicons_helper (19.1.0) + octicons (19.4.0) + octicons_helper (19.4.0) actionview - octicons (= 19.1.0) + octicons (= 19.4.0) railties octokit (6.1.1) faraday (>= 1, < 3) @@ -310,7 +310,7 @@ GEM public_suffix (5.0.1) puma (6.3.0) nio4r (~> 2.0) - racc (1.6.2) + racc (1.7.1) rack (2.2.7) rack-livereload (0.5.1) rack @@ -357,7 +357,7 @@ GEM redis-client (>= 0.9.0) redis-client (0.14.1) connection_pool - regexp_parser (2.8.0) + regexp_parser (2.8.1) representable (3.2.0) declarative (< 0.1.0) trailblazer-option (>= 0.1.1, < 0.2.0) @@ -405,7 +405,7 @@ GEM searchkick (5.2.4) activemodel (>= 5.2) hashie - selenium-webdriver (4.9.1) + selenium-webdriver (4.10.0) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) @@ -431,8 +431,8 @@ GEM stimulus-rails (1.2.1) railties (>= 6.0.0) thor (1.2.2) - tilt (2.1.0) - timeout (0.3.2) + tilt (2.2.0) + timeout (0.4.0) trailblazer-option (0.1.2) ttfunk (1.7.0) turbo-rails (1.4.0) @@ -445,7 +445,7 @@ GEM uglifier (4.2.0) execjs (>= 0.3.0, < 3) vcr (6.1.0) - version_gem (1.1.2) + version_gem (1.1.3) web-console (4.2.0) actionview (>= 6.0.0) activemodel (>= 6.0.0) From d86fb7f986f57f584dae05a27b18403515c7652c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 29 Jun 2023 11:50:37 +0200 Subject: [PATCH 574/609] Update Rails --- Gemfile | 2 +- Gemfile.lock | 108 +++++++++++++++++++++++++-------------------------- 2 files changed, 55 insertions(+), 55 deletions(-) diff --git a/Gemfile b/Gemfile index b726dc788..37ff6c2c6 100644 --- a/Gemfile +++ b/Gemfile @@ -18,7 +18,7 @@ gem 'octokit', '~> 6.0' gem 'pdf-reader', '~> 2.11.0' gem 'pg', '~> 1.4.6' gem 'pagy' -gem 'rails', '7.0.5' +gem 'rails', '7.0.5.1' gem "importmap-rails" gem "turbo-rails" gem "stimulus-rails" diff --git a/Gemfile.lock b/Gemfile.lock index 02582afa3..a34bc485a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,47 +4,47 @@ GEM Ascii85 (1.1.0) aasm (5.5.0) concurrent-ruby (~> 1.0) - actioncable (7.0.5) - actionpack (= 7.0.5) - activesupport (= 7.0.5) + actioncable (7.0.5.1) + actionpack (= 7.0.5.1) + activesupport (= 7.0.5.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.5) - actionpack (= 7.0.5) - activejob (= 7.0.5) - activerecord (= 7.0.5) - activestorage (= 7.0.5) - activesupport (= 7.0.5) + actionmailbox (7.0.5.1) + actionpack (= 7.0.5.1) + activejob (= 7.0.5.1) + activerecord (= 7.0.5.1) + activestorage (= 7.0.5.1) + activesupport (= 7.0.5.1) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.5) - actionpack (= 7.0.5) - actionview (= 7.0.5) - activejob (= 7.0.5) - activesupport (= 7.0.5) + actionmailer (7.0.5.1) + actionpack (= 7.0.5.1) + actionview (= 7.0.5.1) + activejob (= 7.0.5.1) + activesupport (= 7.0.5.1) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.5) - actionview (= 7.0.5) - activesupport (= 7.0.5) + actionpack (7.0.5.1) + actionview (= 7.0.5.1) + activesupport (= 7.0.5.1) rack (~> 2.0, >= 2.2.4) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.5) - actionpack (= 7.0.5) - activerecord (= 7.0.5) - activestorage (= 7.0.5) - activesupport (= 7.0.5) + actiontext (7.0.5.1) + actionpack (= 7.0.5.1) + activerecord (= 7.0.5.1) + activestorage (= 7.0.5.1) + activesupport (= 7.0.5.1) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.5) - activesupport (= 7.0.5) + actionview (7.0.5.1) + activesupport (= 7.0.5.1) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -52,22 +52,22 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (7.0.5) - activesupport (= 7.0.5) + activejob (7.0.5.1) + activesupport (= 7.0.5.1) globalid (>= 0.3.6) - activemodel (7.0.5) - activesupport (= 7.0.5) - activerecord (7.0.5) - activemodel (= 7.0.5) - activesupport (= 7.0.5) - activestorage (7.0.5) - actionpack (= 7.0.5) - activejob (= 7.0.5) - activerecord (= 7.0.5) - activesupport (= 7.0.5) + activemodel (7.0.5.1) + activesupport (= 7.0.5.1) + activerecord (7.0.5.1) + activemodel (= 7.0.5.1) + activesupport (= 7.0.5.1) + activestorage (7.0.5.1) + actionpack (= 7.0.5.1) + activejob (= 7.0.5.1) + activerecord (= 7.0.5.1) + activesupport (= 7.0.5.1) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.5) + activesupport (7.0.5.1) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -318,20 +318,20 @@ GEM rack rack-test (2.1.0) rack (>= 1.3) - rails (7.0.5) - actioncable (= 7.0.5) - actionmailbox (= 7.0.5) - actionmailer (= 7.0.5) - actionpack (= 7.0.5) - actiontext (= 7.0.5) - actionview (= 7.0.5) - activejob (= 7.0.5) - activemodel (= 7.0.5) - activerecord (= 7.0.5) - activestorage (= 7.0.5) - activesupport (= 7.0.5) + rails (7.0.5.1) + actioncable (= 7.0.5.1) + actionmailbox (= 7.0.5.1) + actionmailer (= 7.0.5.1) + actionpack (= 7.0.5.1) + actiontext (= 7.0.5.1) + actionview (= 7.0.5.1) + activejob (= 7.0.5.1) + activemodel (= 7.0.5.1) + activerecord (= 7.0.5.1) + activestorage (= 7.0.5.1) + activesupport (= 7.0.5.1) bundler (>= 1.15.0) - railties (= 7.0.5) + railties (= 7.0.5.1) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -342,9 +342,9 @@ GEM rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (7.0.5) - actionpack (= 7.0.5) - activesupport (= 7.0.5) + railties (7.0.5.1) + actionpack (= 7.0.5.1) + activesupport (= 7.0.5.1) method_source rake (>= 12.2) thor (~> 1.0) @@ -501,7 +501,7 @@ DEPENDENCIES pry-byebug puma rack-livereload - rails (= 7.0.5) + rails (= 7.0.5.1) rails-controller-testing (~> 1.0.5) redis (~> 5.0) responders From a747a30c4f550842fae907f15abb2cecb3d8a295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 30 Jun 2023 11:50:26 +0200 Subject: [PATCH 575/609] Rails version up --- Gemfile | 2 +- Gemfile.lock | 108 +++++++++++++++++++++++++-------------------------- 2 files changed, 55 insertions(+), 55 deletions(-) diff --git a/Gemfile b/Gemfile index 37ff6c2c6..cc19c292d 100644 --- a/Gemfile +++ b/Gemfile @@ -18,7 +18,7 @@ gem 'octokit', '~> 6.0' gem 'pdf-reader', '~> 2.11.0' gem 'pg', '~> 1.4.6' gem 'pagy' -gem 'rails', '7.0.5.1' +gem 'rails', '7.0.6' gem "importmap-rails" gem "turbo-rails" gem "stimulus-rails" diff --git a/Gemfile.lock b/Gemfile.lock index a34bc485a..2639754bd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,47 +4,47 @@ GEM Ascii85 (1.1.0) aasm (5.5.0) concurrent-ruby (~> 1.0) - actioncable (7.0.5.1) - actionpack (= 7.0.5.1) - activesupport (= 7.0.5.1) + actioncable (7.0.6) + actionpack (= 7.0.6) + activesupport (= 7.0.6) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.5.1) - actionpack (= 7.0.5.1) - activejob (= 7.0.5.1) - activerecord (= 7.0.5.1) - activestorage (= 7.0.5.1) - activesupport (= 7.0.5.1) + actionmailbox (7.0.6) + actionpack (= 7.0.6) + activejob (= 7.0.6) + activerecord (= 7.0.6) + activestorage (= 7.0.6) + activesupport (= 7.0.6) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.5.1) - actionpack (= 7.0.5.1) - actionview (= 7.0.5.1) - activejob (= 7.0.5.1) - activesupport (= 7.0.5.1) + actionmailer (7.0.6) + actionpack (= 7.0.6) + actionview (= 7.0.6) + activejob (= 7.0.6) + activesupport (= 7.0.6) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.5.1) - actionview (= 7.0.5.1) - activesupport (= 7.0.5.1) + actionpack (7.0.6) + actionview (= 7.0.6) + activesupport (= 7.0.6) rack (~> 2.0, >= 2.2.4) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.5.1) - actionpack (= 7.0.5.1) - activerecord (= 7.0.5.1) - activestorage (= 7.0.5.1) - activesupport (= 7.0.5.1) + actiontext (7.0.6) + actionpack (= 7.0.6) + activerecord (= 7.0.6) + activestorage (= 7.0.6) + activesupport (= 7.0.6) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.5.1) - activesupport (= 7.0.5.1) + actionview (7.0.6) + activesupport (= 7.0.6) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -52,22 +52,22 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (7.0.5.1) - activesupport (= 7.0.5.1) + activejob (7.0.6) + activesupport (= 7.0.6) globalid (>= 0.3.6) - activemodel (7.0.5.1) - activesupport (= 7.0.5.1) - activerecord (7.0.5.1) - activemodel (= 7.0.5.1) - activesupport (= 7.0.5.1) - activestorage (7.0.5.1) - actionpack (= 7.0.5.1) - activejob (= 7.0.5.1) - activerecord (= 7.0.5.1) - activesupport (= 7.0.5.1) + activemodel (7.0.6) + activesupport (= 7.0.6) + activerecord (7.0.6) + activemodel (= 7.0.6) + activesupport (= 7.0.6) + activestorage (7.0.6) + actionpack (= 7.0.6) + activejob (= 7.0.6) + activerecord (= 7.0.6) + activesupport (= 7.0.6) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.5.1) + activesupport (7.0.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -318,20 +318,20 @@ GEM rack rack-test (2.1.0) rack (>= 1.3) - rails (7.0.5.1) - actioncable (= 7.0.5.1) - actionmailbox (= 7.0.5.1) - actionmailer (= 7.0.5.1) - actionpack (= 7.0.5.1) - actiontext (= 7.0.5.1) - actionview (= 7.0.5.1) - activejob (= 7.0.5.1) - activemodel (= 7.0.5.1) - activerecord (= 7.0.5.1) - activestorage (= 7.0.5.1) - activesupport (= 7.0.5.1) + rails (7.0.6) + actioncable (= 7.0.6) + actionmailbox (= 7.0.6) + actionmailer (= 7.0.6) + actionpack (= 7.0.6) + actiontext (= 7.0.6) + actionview (= 7.0.6) + activejob (= 7.0.6) + activemodel (= 7.0.6) + activerecord (= 7.0.6) + activestorage (= 7.0.6) + activesupport (= 7.0.6) bundler (>= 1.15.0) - railties (= 7.0.5.1) + railties (= 7.0.6) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -342,9 +342,9 @@ GEM rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (7.0.5.1) - actionpack (= 7.0.5.1) - activesupport (= 7.0.5.1) + railties (7.0.6) + actionpack (= 7.0.6) + activesupport (= 7.0.6) method_source rake (>= 12.2) thor (~> 1.0) @@ -501,7 +501,7 @@ DEPENDENCIES pry-byebug puma rack-livereload - rails (= 7.0.5.1) + rails (= 7.0.6) rails-controller-testing (~> 1.0.5) redis (~> 5.0) responders From 7c95ab593647433359f8e02233038f9dc4ffd032 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 30 Jun 2023 12:01:33 +0200 Subject: [PATCH 576/609] Add meta_review_issue_id to JSON views --- app/views/papers/index.json.jbuilder | 1 + app/views/papers/show.json.jbuilder | 1 + 2 files changed, 2 insertions(+) diff --git a/app/views/papers/index.json.jbuilder b/app/views/papers/index.json.jbuilder index 214f59941..0a4bb41fe 100644 --- a/app/views/papers/index.json.jbuilder +++ b/app/views/papers/index.json.jbuilder @@ -21,6 +21,7 @@ json.array! @papers do |paper| json.languages paper.language_tags.join(', ') json.tags paper.author_tags.join(', ') json.paper_review paper.review_url + json.meta_review_issue_id paper.meta_review_issue_id json.pdf_url paper.seo_pdf_url json.software_archive paper.archive_doi_url end diff --git a/app/views/papers/show.json.jbuilder b/app/views/papers/show.json.jbuilder index 3bd483cd9..d216c1fb6 100644 --- a/app/views/papers/show.json.jbuilder +++ b/app/views/papers/show.json.jbuilder @@ -20,6 +20,7 @@ if @paper.published? json.languages @paper.language_tags.join(', ') json.tags @paper.author_tags.join(', ') json.paper_review @paper.review_url + json.meta_review_issue_id @paper.meta_review_issue_id json.pdf_url @paper.seo_pdf_url json.software_archive @paper.archive_doi_url end From bde5a228007b764f99f43a7737f9340bcc6b109c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 3 Jul 2023 20:54:44 +0200 Subject: [PATCH 577/609] Make the paper page resilient to nil tags --- app/views/papers/_show_published.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/papers/_show_published.html.erb b/app/views/papers/_show_published.html.erb index 17300e489..c400bcff5 100644 --- a/app/views/papers/_show_published.html.erb +++ b/app/views/papers/_show_published.html.erb @@ -5,7 +5,7 @@

            <%= @paper.title %>

            - <% @paper.language_tags.each do |tag| %> + <% @paper.language_tags.compact.each do |tag| %> <%= link_to tag, papers_by_language_path(language: tag) %> <% end %> Submitted <%= @paper.created_at.strftime('%d %B %Y') %> @@ -60,7 +60,7 @@
            Tags

            - <% @paper.author_tags.each do |tag| %> + <% @paper.author_tags.compact.each do |tag| %> <%= link_to tag, papers_by_tag_path(tag: tag) %> <% end %>

            From 2f7c722e195fb12a77d2526987da15a1c81a3263 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Tue, 4 Jul 2023 13:29:44 +0200 Subject: [PATCH 578/609] Bundle update --- Gemfile.lock | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 2639754bd..f68dbbaca 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -158,7 +158,7 @@ GEM webrick google-apis-drive_v3 (0.42.0) google-apis-core (>= 0.11.0, < 2.a) - google-apis-sheets_v4 (0.23.0) + google-apis-sheets_v4 (0.24.0) google-apis-core (>= 0.11.0, < 2.a) google_drive (3.0.7) google-apis-drive_v3 (>= 0.5.0, < 1.0.0) @@ -172,8 +172,8 @@ GEM multi_json (~> 1.11) os (>= 0.9, < 2.0) signet (~> 0.15) - groupdate (6.2.1) - activesupport (>= 5.2) + groupdate (6.3.0) + activesupport (>= 6.1) guard (2.18.0) formatador (>= 0.2.4) listen (>= 2.7, < 4.0) @@ -251,7 +251,7 @@ GEM net-smtp (0.3.3) net-protocol net-ssh (7.1.0) - newrelic_rpm (9.2.2) + newrelic_rpm (9.3.0) nio4r (2.5.9) nokogiri (1.15.2) mini_portile2 (~> 2.8.2) @@ -336,8 +336,9 @@ GEM actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) activesupport (>= 5.0.1.rc1) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) + rails-dom-testing (2.1.1) + activesupport (>= 5.0.0) + minitest nokogiri (>= 1.6) rails-html-sanitizer (1.6.0) loofah (~> 2.21) @@ -383,7 +384,7 @@ GEM rspec-expectations (~> 3.12) rspec-mocks (~> 3.12) rspec-support (~> 3.12) - rspec-support (3.12.0) + rspec-support (3.12.1) ruby-rc4 (0.1.5) ruby2_keywords (0.0.5) ruby_dig (0.0.2) @@ -402,8 +403,8 @@ GEM sawyer (0.9.2) addressable (>= 2.3.5) faraday (>= 0.17.3, < 3) - searchkick (5.2.4) - activemodel (>= 5.2) + searchkick (5.3.0) + activemodel (>= 6.1) hashie selenium-webdriver (4.10.0) rexml (~> 3.2, >= 3.2.5) @@ -444,7 +445,7 @@ GEM uber (0.1.0) uglifier (4.2.0) execjs (>= 0.3.0, < 3) - vcr (6.1.0) + vcr (6.2.0) version_gem (1.1.3) web-console (4.2.0) actionview (>= 6.0.0) From 036ee3429880f51eaba0548861a9aab396e66032 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 6 Jul 2023 12:15:40 +0200 Subject: [PATCH 579/609] Update nokogiri --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index f68dbbaca..e53830754 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -253,12 +253,12 @@ GEM net-ssh (7.1.0) newrelic_rpm (9.3.0) nio4r (2.5.9) - nokogiri (1.15.2) + nokogiri (1.15.3) mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.15.2-x86_64-darwin) + nokogiri (1.15.3-x86_64-darwin) racc (~> 1.4) - nokogiri (1.15.2-x86_64-linux) + nokogiri (1.15.3-x86_64-linux) racc (~> 1.4) notiffany (0.1.3) nenv (~> 0.1) From 378442b2b34e802bf3916c7efd28744d220c4685 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 6 Jul 2023 17:10:33 -0400 Subject: [PATCH 580/609] On submission form - inform user to start typing In my case, having seeing no options given (just an editbox), I just quickly typed "neuroimaging" and no alert was given but I failed to submit since error said that I should choose a valid subject. So I removed "neuroimaging" but no choices has come about. I searched the internet on what subjects it could be -- no hint was given. Only when I started to type slowly "neu" choices start to come up. Hence, I think for the sake of people smoother experience, I think the hint there should be extended --- app/views/papers/_form.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/papers/_form.html.erb b/app/views/papers/_form.html.erb index 49090a9e5..58ba5be7d 100644 --- a/app/views/papers/_form.html.erb +++ b/app/views/papers/_form.html.erb @@ -51,7 +51,7 @@
            <%= f.label "Main subject of the paper" %> - <%= f.text_field :suggested_subject, placeholder: "Select the subject that best applies to your paper", class: "form-control", style: "margin-right: 12px;", data: {"autocomplete-target" => "input"} %> + <%= f.text_field :suggested_subject, placeholder: "Start typing and select the subject that best applies to your paper", class: "form-control", style: "margin-right: 12px;", data: {"autocomplete-target" => "input"} %> <%= f.hidden_field :track_id, data: {"autocomplete-target" => "hidden"} %>
              From 0a7a585daefb90b5cbb98bb1fbc8cd7d09b41dcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Sun, 16 Jul 2023 13:37:43 +0200 Subject: [PATCH 581/609] Fix atom feed for paper search results page --- app/views/content/layout/_navbar.html.erb | 2 +- app/views/papers/index.html.erb | 2 +- spec/controllers/papers_controller_spec.rb | 3 - spec/system/papers/search_papers_spec.rb | 75 ++++++++++++++++++++++ 4 files changed, 77 insertions(+), 5 deletions(-) create mode 100644 spec/system/papers/search_papers_spec.rb diff --git a/app/views/content/layout/_navbar.html.erb b/app/views/content/layout/_navbar.html.erb index 0fc48eed3..468ba9886 100644 --- a/app/views/content/layout/_navbar.html.erb +++ b/app/views/content/layout/_navbar.html.erb @@ -42,7 +42,7 @@ <%= link_to image_tag("rss-sm.svg"), "#", class: "dropdown-toggle", size: "48", id: "dropdownMenuLink", "data-toggle": "dropdown", "aria-haspopup": "true", "aria-expanded": "false" %> diff --git a/app/views/papers/index.html.erb b/app/views/papers/index.html.erb index fb0a59cba..e634ebef2 100644 --- a/app/views/papers/index.html.erb +++ b/app/views/papers/index.html.erb @@ -33,7 +33,7 @@ <%- placeholder_text = params[:q].nil? ? "Search by title, tag, author, or language":params[:q]%> <%= f.text_field :q, placeholder:placeholder_text , class: "form-control", size: "35" %>
              - <%= button_tag(type: 'submit', class: "btn btn-outline-secondary", name: "") do %> + <%= button_tag(type: 'submit', class: "btn btn-outline-secondary", name: "search_button") do %> <%= octicon "search" %> <% end %>
              diff --git a/spec/controllers/papers_controller_spec.rb b/spec/controllers/papers_controller_spec.rb index 9818ef059..2a74725ee 100644 --- a/spec/controllers/papers_controller_spec.rb +++ b/spec/controllers/papers_controller_spec.rb @@ -246,9 +246,6 @@ expect(response.status).to eq(200) end end - - - end describe "Paper lookup" do diff --git a/spec/system/papers/search_papers_spec.rb b/spec/system/papers/search_papers_spec.rb new file mode 100644 index 000000000..12920d1e0 --- /dev/null +++ b/spec/system/papers/search_papers_spec.rb @@ -0,0 +1,75 @@ +require "rails_helper" + +feature "Paper search" do + before do + paper_1 = create(:accepted_paper, title: "Astronomy paper") + paper_1.metadata['paper']['title'] = "Astronomy paper" + paper_1.metadata['paper']['authors'] = [{'given_name' => "Vera", 'last_name' => "Rubin"}] + paper_1.metadata['paper']['tags'] = ["Galaxy rotation curves"] + paper_1.save! + + paper_2 = create(:accepted_paper, title: "Biodiversity study") + paper_2.metadata['paper']['title'] = "Biodiversity study" + paper_2.metadata['paper']['authors'] = [{'given_name' => "Jane", 'last_name' => "Goodall"}] + paper_2.metadata['paper']['tags'] = ["Wild chimpanzees"] + paper_2.save! + + Paper.reindex + end + + scenario "by title" do + visit published_papers_path + fill_in :q, with: "Astronomy" + click_button "search_button" + + expect(page).to have_content("Astronomy paper") + expect(page).to_not have_content("Biodiversity") + + fill_in :q, with: "Biodiversity" + click_button "search_button" + + expect(page).to_not have_content("Astronomy") + expect(page).to have_content("Biodiversity study") + end + + scenario "by author" do + visit published_papers_path + fill_in :q, with: "Vera Rubin" + click_button "search_button" + + expect(page).to have_content("Astronomy paper") + expect(page).to_not have_content("Biodiversity") + + fill_in :q, with: "Jane Goodall" + click_button "search_button" + + expect(page).to_not have_content("Astronomy paper") + expect(page).to have_content("Biodiversity") + end + + scenario "by tag" do + visit published_papers_path + fill_in :q, with: "rotation curves" + click_button "search_button" + + expect(page).to have_content("Astronomy paper") + expect(page).to_not have_content("Biodiversity") + + fill_in :q, with: "chimpanzees" + click_button "search_button" + + expect(page).to_not have_content("Astronomy paper") + expect(page).to have_content("Biodiversity") + end + + feature "Atom feed" do + scenario "keeps the query param" do + visit search_papers_path(q: "Vera Rubin") + click_link "This Search" + + expect(page).to have_current_path(search_papers_path(q: "Vera Rubin", format: :atom)) + expect(page).to have_content("Astronomy") + expect(page).to_not have_content("Biodiversity study") + end + end +end From 7629fa29fbadb6e0e439f0dfda32e474d3f19ba7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 17 Jul 2023 13:05:39 +0200 Subject: [PATCH 582/609] Update Gemfile.lock --- Gemfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index e53830754..9b586a756 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -251,7 +251,7 @@ GEM net-smtp (0.3.3) net-protocol net-ssh (7.1.0) - newrelic_rpm (9.3.0) + newrelic_rpm (9.3.1) nio4r (2.5.9) nokogiri (1.15.3) mini_portile2 (~> 2.8.2) @@ -307,7 +307,7 @@ GEM pry-byebug (3.10.1) byebug (~> 11.0) pry (>= 0.13, < 0.15) - public_suffix (5.0.1) + public_suffix (5.0.3) puma (6.3.0) nio4r (~> 2.0) racc (1.7.1) @@ -373,7 +373,7 @@ GEM rspec-expectations (3.12.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) - rspec-mocks (3.12.5) + rspec-mocks (3.12.6) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-rails (6.0.3) @@ -389,7 +389,7 @@ GEM ruby2_keywords (0.0.5) ruby_dig (0.0.2) rubyzip (2.3.2) - sanitize (6.0.1) + sanitize (6.0.2) crass (~> 1.0.2) nokogiri (>= 1.12.0) sassc (2.4.0) From 3ace45d21aefb9e12b1de11f43cdc65aa8faef55 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Mon, 17 Jul 2023 21:29:33 -0400 Subject: [PATCH 583/609] Revert "Add formatting and Markdown sections to submitting.md" --- docs/submitting.md | 289 --------------------------------------------- 1 file changed, 289 deletions(-) diff --git a/docs/submitting.md b/docs/submitting.md index cc588b15a..8a3f7209f 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -106,295 +106,6 @@ As this short list shows, JOSS papers are only expected to contain a limited set .. important:: Your paper will be reviewed by two or more reviewers in a public GitHub issue. Take a look at the `review checklist `_ and `review criteria `_ to better understand how your submission will be reviewed. ``` -## How should my paper be formatted? - -Submitted articles must use Markdown and must provide a metadata section at the beginning of the article. Format metadata using YAML, a human-friendly data serialization language (The Official YAML Web Site, 2022). The information provided is included in the title and sidebar of the generated PDF. - -### Article metadata - -#### Names - -Providing an author name is straight-forward: just set the `name` attribute. However, sometimes more control over the name is required. - -##### Name parts - -There are many ways to describe the parts of names; we support the following: - -- given names, -- surname, -- dropping particle, -- non-dropping particle, -- and suffix. - -We use a heuristic to parse names into these components. This parsing may produce the wrong result, in which case it is necessary to provide the relevant parts explicitly. - -The respective field names are - -- `given-names` (aliases: `given`, `first`, `firstname`) -- `surname` (aliases: `family`) -- `suffix` - -The full display name will be constructed from these parts, unless the `name` attribute is given as well. - -##### Particles - -It's usually enough to place particles like "van", "von", "della", etc. at the end of the given name or at the beginning of the surname, depending on the details of how the name is used. - -- `dropping-particle` -- `non-dropping-particle` - -##### Literal names - -The automatic construction of the full name from parts is geared towards common Western names. It may therefore be necessary sometimes to provide the display name explicitly. This is possible by setting the `literal` field, e.g., `literal: Tachibana Taki`. This feature should only be used as a last resort. - -##### Example - -```yaml -authors: - - name: John Doe - affiliation: '1' - - - given-names: Ludwig - dropping-particle: van - surname: Beethoven - affiliation: '3' - - # not recommended, but common aliases can be used for name parts. - - given: Louis - non-dropping-particle: de - family: Broglie - affiliation: '4' -``` - -The name parts can also be collected under the author's `name`: - -``` yaml -authors: - - name: - given-names: Kari - surname: Nordmann -``` - - - - - - - -### Internal references - -The goal of Open Journals is to provide authors with a seamless and pleasant writing experience. Since Markdown has no default mechanism to handle document internal references, known as “cross-references”, Open Journals supports a limited set of LaTex commands. In brief, elements that were marked with `\label` and can be referenced with `\ref` and `\autoref`. - -[Open Journals]: https://theoj.org - - ![View of coastal dunes in a nature reserve on Sylt, an island in - the North Sea. Sylt (Danish: *Slid*) is Germany's northernmost - island.](sylt.jpg){#sylt width="100%"} - -#### Tables and figures - -Tables and figures can be referenced if they are given a *label* in the caption. In pure Markdown, this can be done by adding an empty span `[]{label="floatlabel"}` to the caption. LaTeX syntax is supported as well: `\label{floatlabel}`. - -Link to a float element, i.e., a table or figure, with `\ref{identifier}` or `\autoref{identifier}`, where `identifier` must be defined in the float's caption. The former command results in just the float's number, while the latter inserts the type and number of the referenced float. E.g., in this document `\autoref{proglangs}` yields "Table 1", while `\ref{proglangs}` gives "1". - - : Comparison of programming languages used in the publishing tool. []{label="proglangs"} - - | Language | Typing | Garbage Collected | Evaluation | Created | - |----------|:---------------:|:-----------------:|------------|---------| - | Haskell | static, strong | yes | non-strict | 1990 | - | Lua | dynamic, strong | yes | strict | 1993 | - | C | static, weak | no | strict | 1972 | - -#### Equations - -Cross-references to equations work similarly to those for floating elements. The difference is that, since captions are not supported for equations, the label must be included in the equation: - - $$a^n + b^n = c^n \label{fermat}$$ - -Referencing, however, is identical, with `\autoref{eq:fermat}` resulting in "Equation 1". - -Authors who do not wish to include the label directly in the formula can use a Markdown span to add the label: - - [$$a^n + b^n = c^n$$]{label="eq:fermat"} - -### Behind the scenes - -Readers may wonder about the reasons behind some of the choices made for paper writing. Most often, the decisions were driven by radical pragmatism. For example, Markdown is not only nearly ubiquitous in the realms of software, but it can also be converted into many different output formats. The archiving standard for scientific articles is JATS, and the most popular publishing format is PDF. Open Journals has built its pipeline based on [pandoc](https://pandoc.org), a universal document converter that can produce both of these publishing formats as well as many more. - -A common method for PDF generation is to go via LaTeX. However, support for tagging -- a requirement for accessible PDFs -- is not readily available for LaTeX. The current method used ConTeXt, to produce tagged PDF/A-3, a format suited for archiving [@pdfa3]. - -### Markdown -Markdown is a lightweight markup language used frequently in software development and online environments. Based on email conventions, it was developed in 2004 by John Gruber and Aaron Swartz. - -#### Inline markup - -The markup in Markdown should be semantic, not presentations. The table below has some basic examples. - -+---------------------+-------------------------+-----------------------+ -| Markup | Markdown example | Rendered output | -+:====================+:=======================:+:=====================:+ -| emphasis | `*this*` | *this* | -+---------------------+-------------------------+-----------------------+ -| strong emphasis | `**that**` | **that** | -+---------------------+-------------------------+-----------------------+ -| strikeout | `~~not this~~` | ~~not this~~ | -+---------------------+-------------------------+-----------------------+ -| subscript | `H~2~O` | H~2~O | -+---------------------+-------------------------+-----------------------+ -| superscript | `Ca^2+^` | Ca^2+^ | -+---------------------+-------------------------+-----------------------+ -| underline | `[underline]{.ul}` | [underline]{.ul} | -+---------------------+-------------------------+-----------------------+ -| small caps | `[Small Caps]{.sc}` | [Small Caps]{.sc} | -+---------------------+-------------------------+-----------------------+ -| inline code | `` `return 23` `` | `return 23` | -+---------------------+-------------------------+-----------------------+ - -#### Links - -Link syntax is `[link description](targetURL)`. E.g., this link to the [Journal of Open Source Software](https://joss.theoj.org/) is written as \ -`[Journal of Open Source Software](https://joss.theoj.org/)`. - -Open Journal publications are not limited by the constraints of print publications. We encourage authors to use hyperlinks for websites and other external resources. However, the standard scientific practice of citing the relevant publications should be followed regardless. - -#### Grid Tables - -Grid tables are made up of special characters which form the rows and columns, and also change table and style variables. - -Complex information can be conveyed by using the following features not found in other table styles: - -* spanning columns -* adding footers -* using intra-cellular body elements -* creating multi-row headers - -Grid table syntax uses the characters "-", "=", "|", and "+" to represent the table outline: - -* Hyphens (-) separate horizontal rows. -* Equals signs (=) produce a header when used to create the row under the header text. -* Equals signs (=) create a footer when used to enclose the last row of the table. -* Vertical bars (|) separate columns and also adjusts the depth of a row. -* Plus signs (+) indicates a juncture between horizontal and parallel lines. - -Note: Inserting a colon (:) at the boundaries of the separator line after the header will change text alignment. If there is no header, insert colons into the top line. - -Sample grid table: - - +-------------------+------------+----------+----------+ - | Header 1 | Header 2 | Header 3 | Header 4 | - | | | | | - +:=================:+:==========:+:========:+:========:+ - | row 1, column 1 | column 2 | column 3 | column 4 | - +-------------------+------------+----------+----------+ - | row 2 | cells span columns | - +-------------------+------------+---------------------+ - | row 3 | cells | - body | - +-------------------+ span rows | - elements | - | row 4 | | - here | - +===================+============+=====================+ - | Footer | - +===================+============+=====================+ - -#### Figures - -To create a figure, a captioned image must appear by itself in a paragraph. The Markdown syntax for a figure is a link, preceded by an exclamation point (!) and a description. -Example: -`![This description will be the figure caption](path/to/image.png)` - -In order to create a figure rather than an image, there must be a description included and the figure syntax must be the only element in the paragraph, i.e., it must be surrounded by blank lines. - -Images that are larger than the text area are scaled to fit the page. You can give images an explicit height and/or width, e.g. when adding an image as part of a paragraph. The Markdown `![Nyan cat](nyan-cat.png){height="9pt"}` includes the image "nyan-cat.png" Nyan cat{height="9pt"} while scaling it to a height of 9 pt. - -#### Citations - -Bibliographic data should be collected in a file `paper.bib`; it should be formatted in the BibLaTeX format, although plain BibTeX is acceptable as well. All major citation managers offer to export these formats. - -Cite a bibliography entry by referencing its identifier: `[@upper1974]` will create the reference "[@upper1974]". Omit the brackets when referring to the author as part of a sentence: "For a case study on writers block, see @upper1974." Please refer to the [pandoc manual](https://pandoc.org/MANUAL#extension-citations) for additional features, including page locators, prefixes, suffixes, and suppression of author names in citations. - -#### Mathematical Formulæ - -Mark equations and other math content with dollar signs (`$`). Use a single dollar sign (`$`) for math that will appear directly within the text. Use two dollar signs (`$$`) when the formula is to be presented centered and on a separate line, in "display" style. The formula itself must be given using TeX syntax. - -To give some examples: When discussing a variable $x$ or a short formula like $\sin \frac{\pi}{2}$, we would write `$x$` and `$\sin \frac{\pi}{2}$`, respectively. However, for more complex formulæ, display style is more appropriate. Writing `$$\int_{-\infty}^{+\infty} e^{-x^2} \, dx = \sqrt{\pi}$$` will give us - -$$\int_{-\infty}^{+\infty} e^{-x^2} \, dx = \sqrt{\pi}$$ - -#### Footnotes - -Syntax for footnotes centers around the "caret" character `^`. The symbol is also used as a delimiter for superscript text and thereby mirrors the superscript numbers used to mark a footnote in the final text.[^markers] - -``` markdown -Articles are published under a Creative Commons license[^1]. -Software should use an OSI-approved license. - -[^1]: An open license that allows reuse. -``` - -The above example results in the following output: - -> Articles are published under a Creative Commons license[^1]. Software should use an OSI-approved license. -> -> [^1]: An open license that allows reuse. - -Note: numbers do not have to be sequential, they will be reordered automatically in the publishing step. In fact, the identifier of a note can be any sequence of characters, like `[^marker]`, but may not contain whitespace characters. - -[^markers]: it should be noted that some publishers prefer symbols or letters as footnote markers. - -#### Blocks - -The larger components of a document are called "blocks". - -##### Headings - -Headings are added with `#` followed by a space, where each additional `#` demotes the heading to a level lower in the hierarchy: - -```markdown -# Section - -## Subsection - -### Subsubsection -``` - -Please start headings on the first level. The maximum supported level is 5, but paper authors are encouraged to limit themselves to headings of the first two or three levels. - -###### Deeper nesting - -Fourth- and fifth-level subsections – like this one and the following heading – are supported by the system; however, their use is discouraged. Use lists instead of forth- and fifth-level headings. - - -#### Lists - -Bullet lists and numbered lists, a.k.a. enumerations, offer an additional method to present sequential and hierarchical information. - -``` markdown -- apples -- citrus fruits - - lemons - - oranges -``` - -- apples -- citrus fruits - - lemons - - oranges - -Enumerations start with the number of the first item. Using the the first two [laws of thermodynamics](https://en.wikipedia.org/wiki/Laws_of_thermodynamics) as example, - -``` markdown -0. If two systems are each in thermal equilibrium with a third, they are - also in thermal equilibrium with each other. -1. In a process without transfer of matter, the change in internal - energy, $\Delta U$, of a thermodynamic system is equal to the energy - gained as heat, $Q$, less the thermodynamic work, $W$, done by the - system on its surroundings. $$\Delta U = Q - W$$ -``` - -Rendered: - -0. If two systems are each in thermal equilibrium with a third, they are also in thermal equilibrium with each other. -1. In a process without transfer of matter, the change in internal energy, $\Delta U$, of a thermodynamic system is equal to the energy gained as heat, $Q$, less the thermodynamic work, $W$, done by the system on its surroundings. $$\Delta U = Q - W$$ - ## Example paper and bibliography This example `paper.md` is adapted from _Gala: A Python package for galactic dynamics_ by Adrian M. Price-Whelan [http://doi.org/10.21105/joss.00388](http://doi.org/10.21105/joss.00388): From e742fb7401e243a49844c2614d86fcccd6f1adf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 19 Jul 2023 13:22:30 +0200 Subject: [PATCH 584/609] Fix typos thanks to @yarikoptic (#1241) --- app/views/content/about/_partnerships.html.erb | 2 +- app/views/home/about.html.erb | 2 +- db/seeds.rb | 2 +- spec/helpers/editors_helper_spec.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/content/about/_partnerships.html.erb b/app/views/content/about/_partnerships.html.erb index e8bd60873..46a27834c 100644 --- a/app/views/content/about/_partnerships.html.erb +++ b/app/views/content/about/_partnerships.html.erb @@ -7,7 +7,7 @@ JOSS is a proud affiliate of the Open Source Initiative. As such we are committed to public support for open source software and the role OSI plays - therein. You can read more about the OSI's affilate program + therein. You can read more about the OSI's affiliate program here.

              diff --git a/app/views/home/about.html.erb b/app/views/home/about.html.erb index afe14e364..8d6d47e4c 100644 --- a/app/views/home/about.html.erb +++ b/app/views/home/about.html.erb @@ -107,7 +107,7 @@ Allegations of misconduct

              Allegations of research misconduct associated with a <%= setting(:abbreviation) %> submission (either during review, or post-publication) are handled by the Open Journals ethics team. Reports should be sent privately to <%= mail_to "admin@theoj.org", "our editorial team" %> at which point the report will be triaged by the Open Journals ethics officer to determine the nature and severity of the case. Options available to the Open Journals ethics officer range from recommending no action to instigating a full investigation by the Open Journals ethics team which may result in researchers' institutions and funders being notified and the <%= setting(:abbreviation) %> being retracted.

              -

              Although <%= setting(:abbreviation) %> is not yet a member of <%= link_to "COPE", "https://publicationethics.org" %> (application pending), our processes are modeled on the <%= link_to "COPE guideline proceedures for ethics complaints", "https://publicationethics.org/files/publication-ethics-editorial-office-cope-flowchart.pdf" %>.

              +

              Although <%= setting(:abbreviation) %> is not yet a member of <%= link_to "COPE", "https://publicationethics.org" %> (application pending), our processes are modeled on the <%= link_to "COPE guideline procedures for ethics complaints", "https://publicationethics.org/files/publication-ethics-editorial-office-cope-flowchart.pdf" %>.

              Complaints process

              Complaints about the conduct or decision making of the <%= setting(:abbreviation) %> editorial team can be sent to the <%= mail_to "admin@theoj.org", "Open Journals governance team" %>.

              diff --git a/db/seeds.rb b/db/seeds.rb index 8057effbc..6720afe62 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -151,7 +151,7 @@ categories: ["Computer Science"], url: "http://danielskatz.org/", description: <<-STR.strip_heredoc() - Works on computer, computational, and data reseach at + Works on computer, computational, and data research at NCSA, GSLIS, and ECE at diff --git a/spec/helpers/editors_helper_spec.rb b/spec/helpers/editors_helper_spec.rb index e3513a369..53bb7d32c 100644 --- a/spec/helpers/editors_helper_spec.rb +++ b/spec/helpers/editors_helper_spec.rb @@ -75,7 +75,7 @@ expect(availability_class(@editor)).to eq("") end - it "takes current assigments into account" do + it "takes current assignments into account" do @assignment_by_editor = { @editor.id => 4 } @paused_by_editor = { @editor.id => 1 } From 17b6fe3d8d112413ee53532a54f6d2f7ba4ab10a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 19 Jul 2023 13:25:06 +0200 Subject: [PATCH 585/609] Styling --- app/assets/stylesheets/application.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index e936d2d7b..139a4bbfd 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -866,7 +866,7 @@ $btn-primary-border: darken($btn-primary-bg, 5%) !default; /* animated menu icon */ -/* remove navbar button stying */ +/* remove navbar button styling */ .navbar-toggler { border: none; From 0f34d56f9adcd419ae26f1c7025605f621fb4f38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 20 Jul 2023 12:17:16 +0200 Subject: [PATCH 586/609] Update Gemfile.lock --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9b586a756..27c95eee7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -219,7 +219,7 @@ GEM loofah (2.21.3) crass (~> 1.0.2) nokogiri (>= 1.12.0) - lumberjack (1.2.8) + lumberjack (1.2.9) mail (2.8.1) mini_mime (>= 0.1.1) net-imap @@ -230,11 +230,11 @@ GEM memoist (0.16.2) method_source (1.0.0) mini_mime (1.1.2) - mini_portile2 (2.8.2) + mini_portile2 (2.8.4) mini_racer (0.8.0) libv8-node (~> 18.16.0.0) minitest (5.18.1) - msgpack (1.7.1) + msgpack (1.7.2) multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.3.0) From dbbd68feeccad31d31ae382b851ea2115ec8dce3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 24 Jul 2023 13:31:50 +0200 Subject: [PATCH 587/609] Remove guard --- Gemfile | 3 --- Gemfile.lock | 38 ------------------------------------ Guardfile | 54 ---------------------------------------------------- README.md | 6 +++--- 4 files changed, 3 insertions(+), 98 deletions(-) delete mode 100644 Guardfile diff --git a/Gemfile b/Gemfile index cc19c292d..1883d68ce 100644 --- a/Gemfile +++ b/Gemfile @@ -66,7 +66,4 @@ group :development do # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring gem 'spring' gem 'spring-commands-rspec', group: :development - gem 'guard', '~> 2.18' - gem 'guard-livereload', require: false - gem 'rack-livereload' end diff --git a/Gemfile.lock b/Gemfile.lock index 27c95eee7..2f2259f4c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -109,11 +109,7 @@ GEM elasticsearch-transport (7.13.3) faraday (~> 1) multi_json - em-websocket (0.5.3) - eventmachine (>= 0.12.9) - http_parser.rb (~> 0) erubi (1.12.0) - eventmachine (1.2.7) execjs (2.8.1) factory_bot (6.2.1) activesupport (>= 5.0.0) @@ -144,7 +140,6 @@ GEM faraday-rack (1.0.0) faraday-retry (1.0.3) ffi (1.15.5) - formatador (1.1.0) globalid (1.1.0) activesupport (>= 5.0) google-apis-core (0.11.0) @@ -174,21 +169,6 @@ GEM signet (~> 0.15) groupdate (6.3.0) activesupport (>= 6.1) - guard (2.18.0) - formatador (>= 0.2.4) - listen (>= 2.7, < 4.0) - lumberjack (>= 1.0.12, < 2.0) - nenv (~> 0.1) - notiffany (~> 0.0) - pry (>= 0.13.0) - shellany (~> 0.0) - thor (>= 0.18.1) - guard-compat (1.2.1) - guard-livereload (2.5.2) - em-websocket (~> 0.5) - guard (~> 2.8) - guard-compat (~> 1.0) - multi_json (~> 1.8) hashdiff (1.0.1) hashery (2.1.2) hashie (5.0.0) @@ -196,7 +176,6 @@ GEM html-pipeline (2.14.3) activesupport (>= 2) nokogiri (>= 1.4) - http_parser.rb (0.8.0) httpclient (2.8.3) i18n (1.14.1) concurrent-ruby (~> 1.0) @@ -213,13 +192,9 @@ GEM libv8-node (18.16.0.0) libv8-node (18.16.0.0-x86_64-darwin) libv8-node (18.16.0.0-x86_64-linux) - listen (3.8.0) - rb-fsevent (~> 0.10, >= 0.10.3) - rb-inotify (~> 0.9, >= 0.9.10) loofah (2.21.3) crass (~> 1.0.2) nokogiri (>= 1.12.0) - lumberjack (1.2.9) mail (2.8.1) mini_mime (>= 0.1.1) net-imap @@ -238,7 +213,6 @@ GEM multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.3.0) - nenv (0.3.0) net-imap (0.3.6) date net-protocol @@ -260,9 +234,6 @@ GEM racc (~> 1.4) nokogiri (1.15.3-x86_64-linux) racc (~> 1.4) - notiffany (0.1.3) - nenv (~> 0.1) - shellany (~> 0.0) oauth2 (2.0.9) faraday (>= 0.17.3, < 3.0) jwt (>= 1.0, < 3.0) @@ -312,8 +283,6 @@ GEM nio4r (~> 2.0) racc (1.7.1) rack (2.2.7) - rack-livereload (0.5.1) - rack rack-protection (3.0.6) rack rack-test (2.1.0) @@ -351,9 +320,6 @@ GEM thor (~> 1.0) zeitwerk (~> 2.5) rake (13.0.6) - rb-fsevent (0.11.2) - rb-inotify (0.10.1) - ffi (~> 1.0) redis (5.0.6) redis-client (>= 0.9.0) redis-client (0.14.1) @@ -410,7 +376,6 @@ GEM rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) - shellany (0.0.1) signet (0.17.0) addressable (~> 2.8) faraday (>= 0.17.5, < 3.a) @@ -482,8 +447,6 @@ DEPENDENCIES factory_bot_rails (~> 6.2.0) google_drive groupdate - guard (~> 2.18) - guard-livereload honeybadger (~> 5.2.0) html-pipeline (~> 2.14.3) importmap-rails @@ -501,7 +464,6 @@ DEPENDENCIES pg (~> 1.4.6) pry-byebug puma - rack-livereload rails (= 7.0.6) rails-controller-testing (~> 1.0.5) redis (~> 5.0) diff --git a/Guardfile b/Guardfile deleted file mode 100644 index fb3ddf2a4..000000000 --- a/Guardfile +++ /dev/null @@ -1,54 +0,0 @@ -# A sample Guardfile -# More info at https://github.com/guard/guard#readme - -## Uncomment and set this to only include directories you want to watch -# directories %w(app lib config test spec features) \ -# .select{|d| Dir.exist?(d) ? d : UI.warning("Directory #{d} does not exist")} - -## Note: if you are using the `directories` clause above and you are not -## watching the project directory ('.'), then you will want to move -## the Guardfile to a watched dir and symlink it back, e.g. -# -# $ mkdir config -# $ mv Guardfile config/ -# $ ln -s config/Guardfile . -# -# and, you'll have to watch "config/Guardfile" instead of "Guardfile" - -guard 'livereload' do - extensions = { - css: :css, - scss: :css, - sass: :css, - js: :js, - html: :html, - png: :png, - gif: :gif, - jpg: :jpg, - jpeg: :jpeg, - # less: :less, # uncomment if you want LESS stylesheets done in browser - } - - rails_view_exts = %w(erb haml slim) - - # file types LiveReload may optimize refresh for - compiled_exts = extensions.values.uniq - watch(%r{public/.+\.(#{compiled_exts * '|'})}) - - extensions.each do |ext, type| - watch(%r{ - (?:app|vendor) - (?:/assets/\w+/(?[^.]+) # path+base without extension - (?\.#{ext})) # matching extension (must be first encountered) - (?:\.\w+|$) # other extensions - }x) do |m| - path = m[1] - "/assets/#{path}.#{type}" - end - end - - # file needing a full reload of the page anyway - watch(%r{app/views/.+\.(#{rails_view_exts * '|'})$}) - watch(%r{app/helpers/.+\.rb}) - watch(%r{config/locales/.+\.yml}) -end diff --git a/README.md b/README.md index 6d914caa8..47e70d1a1 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Please adhere to this code of conduct in any interactions you have in the JOSS c ## ⚙️ Development -[LiveReload](https://github.com/guard/guard-livereload) enables the browser to automatically refresh on change during development. +[PostgreSQL](https://www.postgresql.org/) and [Elasticsearch](https://www.elastic.co/elasticsearch/) should be installed and running locally for JOSS to work -1. Download the [LiveReload Chrome plugin](https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei/) -2. Run `bundle exec guard` +1. Create the database with `bin/rails db:create` +2. Run `bin/rails s` From 1ff5be3cc182594a8f20356ba6ca88feaacc3d76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 28 Jul 2023 12:44:36 +0200 Subject: [PATCH 588/609] Add fields to paper lookup --- app/controllers/papers_controller.rb | 8 +++++++- spec/controllers/papers_controller_spec.rb | 15 +++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/app/controllers/papers_controller.rb b/app/controllers/papers_controller.rb index 30746cdee..c8096418e 100644 --- a/app/controllers/papers_controller.rb +++ b/app/controllers/papers_controller.rb @@ -253,7 +253,13 @@ def show def lookup paper = Paper.where('review_issue_id = ? OR meta_review_issue_id = ?', params[:id], params[:id]).first! accepted_at = paper.accepted_at ? paper.accepted_at.strftime('%d %B %Y') : nil - response = { submitted: paper.created_at.strftime('%d %B %Y'), + response = { title: paper.title, + doi: paper.doi, + state: paper.state, + review_issue_id: paper.review_issue_id, + software_version: paper.software_version, + repository_url: paper.repository_url, + submitted: paper.created_at.strftime('%d %B %Y'), accepted: accepted_at, track: paper.track&.short_name } render json: response.to_json diff --git a/spec/controllers/papers_controller_spec.rb b/spec/controllers/papers_controller_spec.rb index 2a74725ee..6ff5f8bb5 100644 --- a/spec/controllers/papers_controller_spec.rb +++ b/spec/controllers/papers_controller_spec.rb @@ -256,6 +256,7 @@ parsed_response = JSON.parse(response.body) expect(parsed_response['submitted']).to eq(3.days.ago.strftime('%d %B %Y')) expect(parsed_response['accepted']).to eq(nil) + expect(parsed_response['doi']).to eq(nil) end it "should return the created_at and accepted_at dates for a published paper" do @@ -265,6 +266,7 @@ parsed_response = JSON.parse(response.body) expect(parsed_response['submitted']).to eq(3.days.ago.strftime('%d %B %Y')) expect(parsed_response['accepted']).to eq(2.days.ago.strftime('%d %B %Y')) + expect(parsed_response['doi']).to eq('10.21105/joss.00000') end it "should return paper's track short name" do @@ -275,6 +277,19 @@ expect(JSON.parse(response.body)['track']).to eq("Testtr") end + it "should return paper's info" do + track = create(:track, name: "Test track", short_name: "Testtr") + paper = create(:under_review_paper, title: "Testing paper lookup", software_version: "3.3", track: track, meta_review_issue_id: 123) + + get :lookup, params: {id: 123} + expect(JSON.parse(response.body)['title']).to eq("Testing paper lookup") + expect(JSON.parse(response.body)['doi']).to eq(nil) + expect(JSON.parse(response.body)['state']).to eq("under_review") + expect(JSON.parse(response.body)['review_issue_id']).to eq(101) + expect(JSON.parse(response.body)['software_version']).to eq("3.3") + expect(JSON.parse(response.body)['repository_url']).to eq("http://github.com/arfon/fidgit") + end + it "should 404 when passed an invalid id" do get :lookup, params: {id: 12345} From a486906c1c74de2704537ba460e144e13357e193 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 9 Jun 2023 13:22:01 +0200 Subject: [PATCH 589/609] Add retraction notice <--> retracted paper relationship --- app/models/paper.rb | 14 +++ ...9104144_add_retraction_for_id_to_papers.rb | 5 ++ db/schema.rb | 5 +- spec/models/paper_spec.rb | 87 ++++++++++++------- 4 files changed, 80 insertions(+), 31 deletions(-) create mode 100644 db/migrate/20230609104144_add_retraction_for_id_to_papers.rb diff --git a/app/models/paper.rb b/app/models/paper.rb index 88a4dcf64..c34343132 100644 --- a/app/models/paper.rb +++ b/app/models/paper.rb @@ -19,6 +19,16 @@ class Paper < ApplicationRecord optional: true, foreign_key: "eic_id" + belongs_to :retracted_paper, + class_name: 'Paper', + optional: true, + foreign_key: "retraction_for_id" + + has_one :retraction_paper, + class_name: 'Paper', + foreign_key: "retraction_for_id", + inverse_of: :retracted_paper + has_many :invitations has_many :notes has_many :votes @@ -172,6 +182,10 @@ def published? accepted? || retracted? end + def is_a_retraction_notice? + retraction_for_id.present? + end + def invite_editor(editor_handle) return false unless editor = Editor.find_by_login(editor_handle) Notifications.editor_invite_email(self, editor).deliver_now diff --git a/db/migrate/20230609104144_add_retraction_for_id_to_papers.rb b/db/migrate/20230609104144_add_retraction_for_id_to_papers.rb new file mode 100644 index 000000000..af60e6b4b --- /dev/null +++ b/db/migrate/20230609104144_add_retraction_for_id_to_papers.rb @@ -0,0 +1,5 @@ +class AddRetractionForIdToPapers < ActiveRecord::Migration[7.0] + def change + add_reference :papers, :retraction_for, foreign_key: { to_table: :papers }, null: true + end +end diff --git a/db/schema.rb b/db/schema.rb index fc27cbd69..2df47d9d8 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.0].define(version: 2022_06_16_085520) do +ActiveRecord::Schema[7.0].define(version: 2023_06_09_104144) do # These are extensions that must be enabled in order to support this database enable_extension "hstore" enable_extension "plpgsql" @@ -110,10 +110,12 @@ t.string "git_branch" t.bigint "track_id" t.string "suggested_subject" + t.bigint "retraction_for_id" t.index ["editor_id"], name: "index_papers_on_editor_id" t.index ["eic_id"], name: "index_papers_on_eic_id" t.index ["labels"], name: "index_papers_on_labels", using: :gin t.index ["last_activity"], name: "index_papers_on_last_activity" + t.index ["retraction_for_id"], name: "index_papers_on_retraction_for_id" t.index ["reviewers"], name: "index_papers_on_reviewers", using: :gin t.index ["sha"], name: "index_papers_on_sha" t.index ["track_id"], name: "index_papers_on_track_id" @@ -178,4 +180,5 @@ t.index ["paper_id"], name: "index_votes_on_paper_id" end + add_foreign_key "papers", "papers", column: "retraction_for_id" end diff --git a/spec/models/paper_spec.rb b/spec/models/paper_spec.rb index 9caae45dd..b53972833 100644 --- a/spec/models/paper_spec.rb +++ b/spec/models/paper_spec.rb @@ -21,6 +21,14 @@ expect(association.macro).to eq(:belongs_to) end + it "retraction paper belongs to a retracted paper" do + association = Paper.reflect_on_association(:retracted_paper) + expect(association.macro).to eq(:belongs_to) + + association = Paper.reflect_on_association(:retraction_paper) + expect(association.macro).to eq(:has_one) + end + it "has many invitations" do association = Paper.reflect_on_association(:invitations) expect(association.macro).to eq(:has_many) @@ -73,43 +81,43 @@ end end - # Scopes - - it "should return recent" do - old_paper = create(:paper, created_at: 2.weeks.ago) - new_paper = create(:paper) + describe "Scopes" do + it "should return recent" do + old_paper = create(:paper, created_at: 2.weeks.ago) + new_paper = create(:paper) - expect(Paper.recent).to eq([new_paper]) - end + expect(Paper.recent).to eq([new_paper]) + end - it "should return only visible papers" do - hidden_paper = create(:paper, state: "submitted") - visible_paper_1 = create(:accepted_paper) - visible_paper_2 = create(:paper, state: "superceded") + it "should return only visible papers" do + hidden_paper = create(:paper, state: "submitted") + visible_paper_1 = create(:accepted_paper) + visible_paper_2 = create(:paper, state: "superceded") - expect(Paper.visible).to contain_exactly(visible_paper_1, visible_paper_2) - assert hidden_paper.invisible? - end + expect(Paper.visible).to contain_exactly(visible_paper_1, visible_paper_2) + assert hidden_paper.invisible? + end - it "should exclude withdrawn and rejected papers" do - rejected_paper = create(:paper, state: "rejected") - withdrawn_paper = create(:paper, state: "withdrawn") - paper = create(:accepted_paper) + it "should exclude withdrawn and rejected papers" do + rejected_paper = create(:paper, state: "rejected") + withdrawn_paper = create(:paper, state: "withdrawn") + paper = create(:accepted_paper) - expect(Paper.everything).to contain_exactly(paper) - expect(Paper.invisible).to contain_exactly(rejected_paper, withdrawn_paper) - end + expect(Paper.everything).to contain_exactly(paper) + expect(Paper.invisible).to contain_exactly(rejected_paper, withdrawn_paper) + end - it "should filter by track" do - track_A, track_B = create_list(:track, 2) - paper_A1, paper_A2 = create_list(:paper, 2, track: track_A) - paper_B1, paper_B2 = create_list(:paper, 2, track: track_B) - paper_C = create(:paper) + it "should filter by track" do + track_A, track_B = create_list(:track, 2) + paper_A1, paper_A2 = create_list(:paper, 2, track: track_A) + paper_B1, paper_B2 = create_list(:paper, 2, track: track_B) + paper_C = create(:paper) - track_A_papers = Paper.by_track(track_A.id) - expect(track_A_papers.size).to eq(2) - expect(track_A_papers.include?(paper_A1)).to be true - expect(track_A_papers.include?(paper_A2)).to be true + track_A_papers = Paper.by_track(track_A.id) + expect(track_A_papers.size).to eq(2) + expect(track_A_papers.include?(paper_A1)).to be true + expect(track_A_papers.include?(paper_A2)).to be true + end end # GitHub stuff @@ -201,6 +209,25 @@ end end + describe "#is_a_retraction_notice?" do + it "should return true if paper is a retraction notice for another paper" do + retracted_paper = create(:paper) + paper = create(:paper, retracted_paper: retracted_paper) + + expect(paper.retraction_for_id).to eq(retracted_paper.id) + expect(paper.retracted_paper).to eq(retracted_paper) + expect(paper.is_a_retraction_notice?).to be true + end + + it "should return false oherwise" do + paper = create(:paper) + + expect(paper.retraction_for_id).to be_nil + expect(paper.retracted_paper).to be_nil + expect(paper.is_a_retraction_notice?).to be false + end + end + context "when accepted" do it "should know how to generate a PDF URL for Google Scholar" do paper = create(:accepted_paper) From 57fa2eed51c4ba66e8fdd5ce394ceaa06ad9fa6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 12 Jun 2023 13:02:13 +0200 Subject: [PATCH 590/609] Refactor retracion info partial --- app/views/papers/_show_published.html.erb | 2 +- app/views/shared/_retraction_info.html.erb | 17 +++++++++++++++++ app/views/shared/_retraction_notice.html.erb | 3 --- spec/factories/papers_factory.rb | 6 +++--- 4 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 app/views/shared/_retraction_info.html.erb delete mode 100644 app/views/shared/_retraction_notice.html.erb diff --git a/app/views/papers/_show_published.html.erb b/app/views/papers/_show_published.html.erb index c400bcff5..e68d57efc 100644 --- a/app/views/papers/_show_published.html.erb +++ b/app/views/papers/_show_published.html.erb @@ -1,5 +1,5 @@
              - <%= render partial: "shared/retraction_notice" if @paper.retracted? %> + <%= render partial: "shared/retraction_info" %>
              diff --git a/app/views/shared/_retraction_info.html.erb b/app/views/shared/_retraction_info.html.erb new file mode 100644 index 000000000..4363e73ca --- /dev/null +++ b/app/views/shared/_retraction_info.html.erb @@ -0,0 +1,17 @@ +<% if @paper.retracted? %> +
              + <% if @paper.retraction_notice.present? %> + <%= @paper.retraction_notice.html_safe %> + <% elsif @paper.retraction_paper.present? %> + This paper has been retracted, <%= link_to "read details here", @paper.retraction_paper.seo_url %> + <% else %> + This paper has been retracted + <% end %> +
              +<% end %> + +<% if @paper.is_a_retraction_notice? %> +
              + This paper is a retraction notice for: <%= link_to @paper.retracted_paper.title, @paper.retracted_paper.seo_url %> +
              +<% end %> diff --git a/app/views/shared/_retraction_notice.html.erb b/app/views/shared/_retraction_notice.html.erb deleted file mode 100644 index e0c3f1f37..000000000 --- a/app/views/shared/_retraction_notice.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -
              - <%= @paper.retraction_notice.html_safe %> -
              diff --git a/spec/factories/papers_factory.rb b/spec/factories/papers_factory.rb index b9dc458b2..8eb03e49c 100644 --- a/spec/factories/papers_factory.rb +++ b/spec/factories/papers_factory.rb @@ -9,8 +9,8 @@ submission_kind { 'new' } track { create(:track) } - created_at { Time.now } - updated_at { Time.now } + created_at { Time.now } + updated_at { Time.now } factory :paper_with_sha do sha { '48d24b0158528e85ac7706aecd8cddc4' } @@ -35,7 +35,7 @@ end factory :resubmission_paper do - submission_kind { 'resubmission' } + submission_kind { 'resubmission' } end factory :rejected_paper do From e9f36171215ad8649cef4cb31814bf9b1e276da6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 12 Jun 2023 13:03:04 +0200 Subject: [PATCH 591/609] Draft retraction via API --- app/controllers/dispatch_controller.rb | 25 +++++++++++++++++++++++++ app/models/paper.rb | 11 ++++++++--- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/app/controllers/dispatch_controller.rb b/app/controllers/dispatch_controller.rb index 03a72980e..693cbeca4 100644 --- a/app/controllers/dispatch_controller.rb +++ b/app/controllers/dispatch_controller.rb @@ -145,4 +145,29 @@ def api_deposit head :forbidden end end + + def api_retract + if params[:secret] == ENV['BOT_SECRET'] + @paper = Paper.find_by_review_issue_id!(params[:id]) + + retraction_paper = Paper.new + retraction_paper.doi = @paper.doi + "RN" + retraction_paper.retraction_for_id = @paper.id + retraction_paper.title = "Retraction paper for #{@paper.title}" + retraction_paper.body = "Retraction paper for #{@paper.title}" + retraction_paper.repository_url = @paper.repository_url + retraction_paper.software_version = @paper.software_version + retraction_paper.track_id = @paper.track_id + retraction_paper.submission_kind = "new" + retraction_paper.state = "accepted" + + if retraction_paper.save! + @paper.update(retraction_notice: params[:retraction_notice]) if params[:retraction_notice].present? + @paper.retract! + end + else + head :forbidden + end + end + end diff --git a/app/models/paper.rb b/app/models/paper.rb index c34343132..0bc609c69 100644 --- a/app/models/paper.rb +++ b/app/models/paper.rb @@ -72,6 +72,10 @@ class Paper < ApplicationRecord event :withdraw do transitions to: :withdrawn end + + event :retract do + transitions to: :retracted + end end VISIBLE_STATES = [ @@ -138,14 +142,14 @@ class Paper < ApplicationRecord validates_presence_of :track_id, on: :create, message: "You must select a valid subject for the paper", if: Proc.new { JournalFeatures.tracks? } validates :kind, inclusion: { in: Rails.application.settings["paper_types"] }, allow_nil: true validates :submission_kind, inclusion: { in: SUBMISSION_KINDS, message: "You must select a submission type" }, allow_nil: false - validate :check_repository_address, on: :create + validate :check_repository_address, on: :create, unless: Proc.new {|paper| paper.is_a_retraction_notice?} def notify_editors - Notifications.submission_email(self).deliver_now + Notifications.submission_email(self).deliver_now unless self.is_a_retraction_notice? end def notify_author - Notifications.author_submission_email(self).deliver_now + Notifications.author_submission_email(self).deliver_now unless self.is_a_retraction_notice? end # Only index papers that are visible @@ -301,6 +305,7 @@ def archive_doi_url # A 5-figure integer used to produce the JOSS DOI def joss_id id = "%05d" % review_issue_id + id += "RN" if self.is_a_retraction_notice? "#{setting(:abbreviation).downcase}.#{id}" end From 8a76cc9e725449a1d2bf64efb77a60c12b1ddc05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 19 Jul 2023 13:38:28 +0200 Subject: [PATCH 592/609] Change DOI for retraction notices --- app/controllers/dispatch_controller.rb | 2 +- app/models/paper.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/dispatch_controller.rb b/app/controllers/dispatch_controller.rb index 693cbeca4..51019c050 100644 --- a/app/controllers/dispatch_controller.rb +++ b/app/controllers/dispatch_controller.rb @@ -151,7 +151,7 @@ def api_retract @paper = Paper.find_by_review_issue_id!(params[:id]) retraction_paper = Paper.new - retraction_paper.doi = @paper.doi + "RN" + retraction_paper.doi = @paper.doi + "R" retraction_paper.retraction_for_id = @paper.id retraction_paper.title = "Retraction paper for #{@paper.title}" retraction_paper.body = "Retraction paper for #{@paper.title}" diff --git a/app/models/paper.rb b/app/models/paper.rb index 0bc609c69..944ccda3f 100644 --- a/app/models/paper.rb +++ b/app/models/paper.rb @@ -305,7 +305,7 @@ def archive_doi_url # A 5-figure integer used to produce the JOSS DOI def joss_id id = "%05d" % review_issue_id - id += "RN" if self.is_a_retraction_notice? + id += "R" if self.is_a_retraction_notice? "#{setting(:abbreviation).downcase}.#{id}" end From a8e9150c4af3cac6c30d31602a181c758d3e2789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 19 Jul 2023 13:38:45 +0200 Subject: [PATCH 593/609] Add authors and metadata to retraction papers --- app/controllers/dispatch_controller.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/controllers/dispatch_controller.rb b/app/controllers/dispatch_controller.rb index 51019c050..42169c15b 100644 --- a/app/controllers/dispatch_controller.rb +++ b/app/controllers/dispatch_controller.rb @@ -150,16 +150,24 @@ def api_retract if params[:secret] == ENV['BOT_SECRET'] @paper = Paper.find_by_review_issue_id!(params[:id]) + if params[:metadata] + metadata = JSON.parse(Base64.decode64(params[:metadata])) + else + metadata = nil + end + retraction_paper = Paper.new retraction_paper.doi = @paper.doi + "R" retraction_paper.retraction_for_id = @paper.id retraction_paper.title = "Retraction paper for #{@paper.title}" retraction_paper.body = "Retraction paper for #{@paper.title}" + retraction_paper.authors = "Editorial Board" retraction_paper.repository_url = @paper.repository_url retraction_paper.software_version = @paper.software_version retraction_paper.track_id = @paper.track_id retraction_paper.submission_kind = "new" retraction_paper.state = "accepted" + retraction_paper.metadata = metadata if retraction_paper.save! @paper.update(retraction_notice: params[:retraction_notice]) if params[:retraction_notice].present? From 0a6379adee03c7a6477e9f17524cbef1f3cb4782 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 28 Jul 2023 13:24:16 +0200 Subject: [PATCH 594/609] Change placeholder if no autocomplete --- app/views/papers/_form.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/papers/_form.html.erb b/app/views/papers/_form.html.erb index 58ba5be7d..4e79cdb0b 100644 --- a/app/views/papers/_form.html.erb +++ b/app/views/papers/_form.html.erb @@ -51,7 +51,7 @@
              <%= f.label "Main subject of the paper" %> - <%= f.text_field :suggested_subject, placeholder: "Start typing and select the subject that best applies to your paper", class: "form-control", style: "margin-right: 12px;", data: {"autocomplete-target" => "input"} %> + <%= f.text_field :suggested_subject, placeholder: (JournalFeatures.tracks? ? "Start typing and select the subject that best applies to your paper" : "The subject that best applies to your paper"), class: "form-control", style: "margin-right: 12px;", data: {"autocomplete-target" => "input"} %> <%= f.hidden_field :track_id, data: {"autocomplete-target" => "hidden"} %>
                From fea500fbd15c96a806e101a1652e7b25a6c36cc9 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Fri, 4 Aug 2023 17:13:14 +0100 Subject: [PATCH 595/609] Performance improvements for weekly email --- lib/tasks/editorials.rake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tasks/editorials.rake b/lib/tasks/editorials.rake index 8eee38051..561f7264a 100644 --- a/lib/tasks/editorials.rake +++ b/lib/tasks/editorials.rake @@ -10,9 +10,9 @@ namespace :editorials do pending_issues = review_issues.select { |i| i.editor == "Pending" } - closed_issues = ReviewIssue.download_completed_reviews(reviews_repo) + # closed_issues = ReviewIssue.download_completed_reviews(reviews_repo) - recently_closed_issues = closed_issues.select { |i| i.closed_at > 1.week.ago } + recently_closed_issues = [] # closed_issues.select { |i| i.closed_at > 1.week.ago } # Loop through editors and send them their weekly email :-) Editor.active.each do |editor| From d3bc713c0483751f8063d55275820e230edc75b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 7 Aug 2023 11:44:53 +0200 Subject: [PATCH 596/609] Post-review checklist command --- docs/editing.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/editing.md b/docs/editing.md index 6a749c72d..8a89c90b2 100644 --- a/docs/editing.md +++ b/docs/editing.md @@ -94,6 +94,8 @@ Sometimes you'll need to add a new reviewer once the main review (i.e. post pre- When a submission is ready to be accepted, we ask that the authors issue a new tagged release of the software (if changed), and archive it (on [Zenodo](https://zenodo.org/), [fig**share**](https://figshare.com/), or other). The authors then post the version number and archive DOI in the `REVIEW` issue. The handling editor executes the pre-publication steps, and pings the Track Editor in Chief for final processing. +Optionally you can ask EditorialBot to generate a checklist with all the post-review steps running the command: `@editorialbot create post-review checklist` + Pre-publication steps: - Get a new proof with the `@editorialbot generate pdf` command. - Download the proof, check all references have DOIs, follow the links and check the references. From d690b2e5739b6187f3df970ecd1b003253da4824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 11 Aug 2023 13:05:37 +0200 Subject: [PATCH 597/609] Show tags as array --- app/views/papers/show.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/papers/show.json.jbuilder b/app/views/papers/show.json.jbuilder index d216c1fb6..36128504f 100644 --- a/app/views/papers/show.json.jbuilder +++ b/app/views/papers/show.json.jbuilder @@ -18,7 +18,7 @@ if @paper.published? end json.reviewers @paper.metadata_reviewers json.languages @paper.language_tags.join(', ') - json.tags @paper.author_tags.join(', ') + json.tags @paper.author_tags json.paper_review @paper.review_url json.meta_review_issue_id @paper.meta_review_issue_id json.pdf_url @paper.seo_pdf_url From 5035e5860d4722a761939210fd1ef40974071caa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 11 Aug 2023 13:06:58 +0200 Subject: [PATCH 598/609] Show languages as Array --- app/views/papers/show.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/papers/show.json.jbuilder b/app/views/papers/show.json.jbuilder index 36128504f..23403bf31 100644 --- a/app/views/papers/show.json.jbuilder +++ b/app/views/papers/show.json.jbuilder @@ -17,7 +17,7 @@ if @paper.published? json.editor_orcid @paper.editor.orcid if @paper.editor.orcid end json.reviewers @paper.metadata_reviewers - json.languages @paper.language_tags.join(', ') + json.languages @paper.language_tags json.tags @paper.author_tags json.paper_review @paper.review_url json.meta_review_issue_id @paper.meta_review_issue_id From d92d4c9579c3fee6df293e73f9d1bb54d0b14e1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 11 Aug 2023 14:35:52 +0200 Subject: [PATCH 599/609] API retract --- app/controllers/dispatch_controller.rb | 40 +++++++++---- app/models/paper.rb | 9 ++- config/routes.rb | 7 ++- spec/controllers/dispatch_controller_spec.rb | 61 ++++++++++++++++++++ spec/factories/papers_factory.rb | 1 + 5 files changed, 100 insertions(+), 18 deletions(-) diff --git a/app/controllers/dispatch_controller.rb b/app/controllers/dispatch_controller.rb index 42169c15b..c11d49289 100644 --- a/app/controllers/dispatch_controller.rb +++ b/app/controllers/dispatch_controller.rb @@ -148,30 +148,46 @@ def api_deposit def api_retract if params[:secret] == ENV['BOT_SECRET'] - @paper = Paper.find_by_review_issue_id!(params[:id]) + paper = Paper.find_by_doi!(params[:doi]) + return head :unprocessable_entity if paper.retracted? if params[:metadata] metadata = JSON.parse(Base64.decode64(params[:metadata])) else - metadata = nil + metadata = {} end retraction_paper = Paper.new - retraction_paper.doi = @paper.doi + "R" - retraction_paper.retraction_for_id = @paper.id - retraction_paper.title = "Retraction paper for #{@paper.title}" - retraction_paper.body = "Retraction paper for #{@paper.title}" + retraction_paper.doi = metadata[:doi] || "#{paper.doi}R" + retraction_paper.retraction_for_id = paper.id + retraction_paper.title = metadata[:title] || "Retraction notice for: #{paper.title}" + retraction_paper.body = "Retraction notice for: #{paper.title}" retraction_paper.authors = "Editorial Board" - retraction_paper.repository_url = @paper.repository_url - retraction_paper.software_version = @paper.software_version - retraction_paper.track_id = @paper.track_id + retraction_paper.repository_url = paper.repository_url + retraction_paper.software_version = paper.software_version + retraction_paper.track_id = paper.track_id + retraction_paper.citation_string = params[:citation_string] retraction_paper.submission_kind = "new" retraction_paper.state = "accepted" retraction_paper.metadata = metadata + retraction_paper.accepted_at = Time.now + retraction_paper.review_issue_id = paper.review_issue_id + + if paper.track.nil? + submitting_author = Editor.includes(:user).board.select {|e| e.user.present? }.first.user + else + submitting_author = paper.track.aeics.select {|e| e.user.present? }.first.user + end + submitting_author = User.where(admin: true).first if submitting_author.nil? - if retraction_paper.save! - @paper.update(retraction_notice: params[:retraction_notice]) if params[:retraction_notice].present? - @paper.retract! + retraction_paper.submitting_author = submitting_author + + if retraction_paper.save! && retraction_paper.accept! + paper.update(retraction_notice: params[:retraction_notice]) if params[:retraction_notice].present? + paper.retract! + render json: retraction_paper.to_json, status: '201' + else + head :unprocessable_entity end else head :forbidden diff --git a/app/models/paper.rb b/app/models/paper.rb index 944ccda3f..0f7f74690 100644 --- a/app/models/paper.rb +++ b/app/models/paper.rb @@ -304,9 +304,12 @@ def archive_doi_url # A 5-figure integer used to produce the JOSS DOI def joss_id - id = "%05d" % review_issue_id - id += "R" if self.is_a_retraction_notice? - "#{setting(:abbreviation).downcase}.#{id}" + if self.is_a_retraction_notice? + return retracted_paper.joss_id + "R" + else + id = "%05d" % review_issue_id + return "#{setting(:abbreviation).downcase}.#{id}" + end end # This URL returns the 'DOI optimized' representation of a URL for a paper diff --git a/config/routes.rb b/config/routes.rb index 4be6d66cc..d96cd891e 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -68,9 +68,9 @@ doi_prefix_name = Rails.application.settings[:abbreviation].downcase || "joss" - get '/papers/:doi/status.svg', to: "papers#status", format: "svg", constraints: { doi: /10.21105\/#{doi_prefix_name}\.\d{5}/} - get '/papers/:doi', to: "papers#show", constraints: { doi: /10.21105\/#{doi_prefix_name}\.\d{5}/} - get '/papers/:doi.:format', to: "papers#show", constraints: { doi: /10.21105\/#{doi_prefix_name}\.\d{5}/} + get '/papers/:doi/status.svg', to: "papers#status", format: "svg", constraints: { doi: /10.21105\/#{doi_prefix_name}\.\d{5}R?/} + get '/papers/:doi', to: "papers#show", constraints: { doi: /10.21105\/#{doi_prefix_name}\.\d{5}R?/} + get '/papers/:doi.:format', to: "papers#show", constraints: { doi: /10.21105\/#{doi_prefix_name}\.\d{5}R?/} get '/editor_profile', to: 'editors#profile', as: 'editor_profile' patch '/update_editor_profile', to: 'editors#update_profile', as: 'update_editor_profile' @@ -95,6 +95,7 @@ post '/papers/api_editor_invite', to: 'dispatch#api_editor_invite' post '/papers/api_start_review', to: 'dispatch#api_start_review' post '/papers/api_deposit', to: 'dispatch#api_deposit' + post '/papers/api_retract', to: 'dispatch#api_retract' post '/papers/api_assign_editor', to: 'dispatch#api_assign_editor' post '/papers/api_update_paper_info', to: 'dispatch#api_update_paper_info' post '/papers/api_assign_reviewers', to: 'dispatch#api_assign_reviewers' diff --git a/spec/controllers/dispatch_controller_spec.rb b/spec/controllers/dispatch_controller_spec.rb index ee00d1d60..81dd6f1a5 100644 --- a/spec/controllers/dispatch_controller_spec.rb +++ b/spec/controllers/dispatch_controller_spec.rb @@ -522,4 +522,65 @@ def headers(event, payload) expect(paper.accepted_at).to eql(initial_accepted_at) end end + + describe "POST #api_retract" do + + it "with no API key" do + post :api_retract + expect(response).to be_forbidden + end + + it "with the correct API key" do + user = create(:user) + paper = create(:accepted_paper, title: "Bad paper", review_issue_id: 1234, doi: "10.21105/test.00042") + track_editor = paper.track.aeics.first + track_editor.update(user: user) + + expect(paper.accepted_at).to be_present + expect(paper.state).to eql('accepted') + encoded_metadata = "eyJwYXBlciI6eyJ0aXRsZSI6IkZpZGdpdDogQW4gdW5nb2RseSB1bmlvbiBv\nZiBHaXRIdWIgYW5kIGZpZ3NoYXJlIiwidGFncyI6WyJleGFtcGxlIiwidGFn\ncyIsImZvciB0aGUgcGFwZXIiXSwibGFuZ3VhZ2VzIjpbIlB5dGhvbiIsIlJ1\nc3QiLCJQZXJsIl0sImF1dGhvcnMiOlt7ImdpdmVuX25hbWUiOiJBcmZvbiIs\nIm1pZGRsZV9uYW1lIjoiTS4iLCJsYXN0X25hbWUiOiJTbWl0aCIsIm9yY2lk\nIjoiMDAwMC0wMDAyLTM5NTctMjQ3NCIsImFmZmlsaWF0aW9uIjoiR2l0SHVi\nIEluYy4sIERpc25leSBJbmMuIn0seyJnaXZlbl9uYW1lIjoiSmFtZXMiLCJt\naWRkbGVfbmFtZSI6IlAuIiwibGFzdF9uYW1lIjoidmFuIERpc2hvZWNrIiwi\nb3JjaWQiOiIwMDAwLTAwMDItMzk1Ny0yNDc0IiwiYWZmaWxpYXRpb24iOiJE\naXNuZXkgSW5jLiJ9XSwiZG9pIjoiMTAuMjExMDUvam9zcy4wMDAxNyIsImFy\nY2hpdmVfZG9pIjoiaHR0cDovL2R4LmRvaS5vcmcvMTAuNTI4MS96ZW5vZG8u\nMTM3NTAiLCJyZXBvc2l0b3J5X2FkZHJlc3MiOiJodHRwczovL2dpdGh1Yi5j\nb20vYXBwbGljYXRpb25za2VsZXRvbi9Ta2VsZXRvbiIsImVkaXRvciI6ImFy\nZm9uIiwicmV2aWV3ZXJzIjpbIkBqaW0iLCJAYm9iIl19fQ==\n" + + post :api_retract, params: {secret: "testBOTsecret", + doi: "10.21105/test.00042", + citation_string: "Editorial Board, 2023, JOSS, Retraction etc.", + metadata: encoded_metadata + } + + expect(response).to be_successful + expect(paper.reload.state).to eql("retracted") + expect(paper.retraction_paper).to be_present + + retraction_notice = paper.retraction_paper + + expect(retraction_notice.state).to eql("accepted") + expect(retraction_notice.retracted_paper).to eql(paper) + expect(retraction_notice.submitting_author).to eql(user) + expect(retraction_notice.doi).to eql("10.21105/test.00042R") + expect(retraction_notice.track_id).to eql(paper.track_id) + expect(Base64.encode64(retraction_notice.metadata.to_json)).to eql(encoded_metadata) + expect(retraction_notice.review_issue_id).to eql(paper.review_issue_id) + expect(retraction_notice.citation_string).to eql("Editorial Board, 2023, JOSS, Retraction etc.") + expect(retraction_notice.title).to eql("Retraction notice for: Bad paper") + end + + it "should not retract papers twice" do + paper = create(:retracted_paper, title: "Bad paper", review_issue_id: 1234, doi: "10.21105/test.00042") + retraction_notice = paper.retraction_paper + expect(paper.accepted_at).to be_present + expect(paper.state).to eql('retracted') + encoded_metadata = "eyJwYXBlciI6eyJ0aXRsZSI6IkZpZGdpdDogQW4gdW5nb2RseSB1bmlvbiBv\nZiBHaXRIdWIgYW5kIGZpZ3NoYXJlIiwidGFncyI6WyJleGFtcGxlIiwidGFn\ncyIsImZvciB0aGUgcGFwZXIiXSwibGFuZ3VhZ2VzIjpbIlB5dGhvbiIsIlJ1\nc3QiLCJQZXJsIl0sImF1dGhvcnMiOlt7ImdpdmVuX25hbWUiOiJBcmZvbiIs\nIm1pZGRsZV9uYW1lIjoiTS4iLCJsYXN0X25hbWUiOiJTbWl0aCIsIm9yY2lk\nIjoiMDAwMC0wMDAyLTM5NTctMjQ3NCIsImFmZmlsaWF0aW9uIjoiR2l0SHVi\nIEluYy4sIERpc25leSBJbmMuIn0seyJnaXZlbl9uYW1lIjoiSmFtZXMiLCJt\naWRkbGVfbmFtZSI6IlAuIiwibGFzdF9uYW1lIjoidmFuIERpc2hvZWNrIiwi\nb3JjaWQiOiIwMDAwLTAwMDItMzk1Ny0yNDc0IiwiYWZmaWxpYXRpb24iOiJE\naXNuZXkgSW5jLiJ9XSwiZG9pIjoiMTAuMjExMDUvam9zcy4wMDAxNyIsImFy\nY2hpdmVfZG9pIjoiaHR0cDovL2R4LmRvaS5vcmcvMTAuNTI4MS96ZW5vZG8u\nMTM3NTAiLCJyZXBvc2l0b3J5X2FkZHJlc3MiOiJodHRwczovL2dpdGh1Yi5j\nb20vYXBwbGljYXRpb25za2VsZXRvbi9Ta2VsZXRvbiIsImVkaXRvciI6ImFy\nZm9uIiwicmV2aWV3ZXJzIjpbIkBqaW0iLCJAYm9iIl19fQ==\n" + total_papers = Paper.count + + post :api_retract, params: {secret: "testBOTsecret", + doi: "10.21105/test.00042", + citation_string: "Editorial Board, 2023, JOSS, Retraction etc.", + metadata: encoded_metadata + } + + expect(response.status).to eql(422) + expect(paper.reload.state).to eql("retracted") + expect(paper.reload.retraction_paper).to eql(retraction_notice) + expect(Paper.count).to eql(total_papers) + end + end end diff --git a/spec/factories/papers_factory.rb b/spec/factories/papers_factory.rb index 8eb03e49c..45f70ef9b 100644 --- a/spec/factories/papers_factory.rb +++ b/spec/factories/papers_factory.rb @@ -47,6 +47,7 @@ state { 'retracted' } accepted_at { Time.now } review_issue_id { 0 } + retraction_paper { create(:paper) } sequence(:doi) {|n| "10.21105/joss.0000#{n}" } end From ed22eb56705ba14a843bea8c0a07fbcd0b4a957e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 11 Aug 2023 15:49:55 +0200 Subject: [PATCH 600/609] Change show page for retracted/retraction papers --- app/views/papers/_show_published.html.erb | 54 +-------------- app/views/papers/_sidebar_published.html.erb | 73 ++++++++++++++++++++ spec/factories/papers_factory.rb | 3 +- spec/system/papers/show_published_spec.rb | 73 ++++++++++++++++++++ 4 files changed, 148 insertions(+), 55 deletions(-) create mode 100644 app/views/papers/_sidebar_published.html.erb create mode 100644 spec/system/papers/show_published_spec.rb diff --git a/app/views/papers/_show_published.html.erb b/app/views/papers/_show_published.html.erb index e68d57efc..fd89188f5 100644 --- a/app/views/papers/_show_published.html.erb +++ b/app/views/papers/_show_published.html.erb @@ -22,58 +22,6 @@
                - -
                -
                - <%= link_to @paper.repository_url, class: 'btn paper-btn' do %> - <%= image_tag "gh-icon.svg" %> - Software repository - <% end %> - - <%= link_to @paper.review_url, class: 'btn paper-btn' do %> - <%= image_tag "icon_docs.svg" %> - Paper review - <% end %> - - <%= link_to @paper.pdf_url, class: 'btn paper-btn' do %> - <%= image_tag "dl-icon.svg" %> - Download paper - <% end %> - - <%= link_to @paper.archive_doi_url, class: 'btn paper-btn' do %> - <%= image_tag "hist-icon.svg" %> - Software archive - <% end %> -
                - -
                Review
                -

                Editor: <%= github_link @paper.metadata_editor %> (<%= link_to "all papers", papers_by_editor_path(@paper.metadata_editor) %>)
                Reviewers: <%= pretty_reviewers(@paper.metadata_reviewers) %>

                - -
                Authors
                -

                <%= pretty_authors(@paper.metadata_authors) %>

                - -
                Citation
                -

                <%= @paper.citation_string %>

                - -
                <%= render partial: "bibtex", locals: { paper: @paper } %>
                -
                <%= link_to "Copy citation string".html_safe, "#", class: "clipboard-btn", "data-clipboard-action": "copy", "data-clipboard-target": "#citationstring" %> · <%= link_to "Copy BibTeX".html_safe, "#", class: "clipboard-btn", "data-clipboard-action": "copy", "data-clipboard-target": "#bibtex" %>  <%= octicon "paste", height: 16, class: "", "aria-label": "Copy" %>
                - -
                Tags
                -

                - <% @paper.author_tags.compact.each do |tag| %> - <%= link_to tag, papers_by_tag_path(tag: tag) %> - <% end %> -

                -
                Altmetrics
                -
                - -
                Markdown badge
                -

                <%= image_tag @paper.status_badge_url %>   <%= octicon "paste", height: 16, class: "", "aria-label": "Copy" %>

                - -
                License
                -

                Authors of <%= Rails.application.settings['abbreviation'] %> papers retain copyright.

                -

                This work is licensed under a Creative Commons Attribution 4.0 International License.

                -

                Creative Commons License

                -
                + <%= render partial: "sidebar_published" %>
                diff --git a/app/views/papers/_sidebar_published.html.erb b/app/views/papers/_sidebar_published.html.erb new file mode 100644 index 000000000..900732a1d --- /dev/null +++ b/app/views/papers/_sidebar_published.html.erb @@ -0,0 +1,73 @@ +
                +
                + <% if @paper.is_a_retraction_notice? %> + <%= link_to @paper.pdf_url, class: 'btn paper-btn' do %> + <%= image_tag "dl-icon.svg" %> + Download Retraction Notice + <% end %> + + <%= link_to @paper.retracted_paper.seo_url, class: 'btn paper-btn danger' do %> + <%= image_tag "icon_docs.svg" %> + Retracted Paper + <% end %> + <% else %> + + <% if @paper.retracted? && @paper.retraction_paper.present? %> + <%= link_to @paper.retraction_paper.seo_url, class: 'btn paper-btn' do %> + <%= image_tag "icon_docs.svg" %> + Retraction notice + <% end %> + <% end %> + <%= link_to @paper.repository_url, class: 'btn paper-btn' do %> + <%= image_tag "gh-icon.svg" %> + Software repository + <% end %> + + <%= link_to @paper.review_url, class: 'btn paper-btn' do %> + <%= image_tag "icon_docs.svg" %> + Paper review + <% end %> + + <%= link_to @paper.pdf_url, class: 'btn paper-btn' do %> + <%= image_tag "dl-icon.svg" %> + Download paper + <% end %> + + <%= link_to @paper.archive_doi_url, class: 'btn paper-btn' do %> + <%= image_tag "hist-icon.svg" %> + Software archive + <% end %> + <% end %> +
                + + <% unless @paper.is_a_retraction_notice? %> +
                Review
                +

                Editor: <%= github_link @paper.metadata_editor %> (<%= link_to "all papers", papers_by_editor_path(@paper.metadata_editor) %>)
                Reviewers: <%= pretty_reviewers(@paper.metadata_reviewers) %>

                + <% end %> + +
                Authors
                +

                <%= pretty_authors(@paper.metadata_authors) %>

                + +
                Citation
                +

                <%= @paper.citation_string %>

                + +
                <%= render partial: "bibtex", locals: { paper: @paper } %>
                +
                <%= link_to "Copy citation string".html_safe, "#", class: "clipboard-btn", "data-clipboard-action": "copy", "data-clipboard-target": "#citationstring" %> · <%= link_to "Copy BibTeX".html_safe, "#", class: "clipboard-btn", "data-clipboard-action": "copy", "data-clipboard-target": "#bibtex" %>  <%= octicon "paste", height: 16, class: "", "aria-label": "Copy" %>
                + +
                Tags
                +

                + <% @paper.author_tags.compact.each do |tag| %> + <%= link_to tag, papers_by_tag_path(tag: tag) %> + <% end %> +

                +
                Altmetrics
                +
                + +
                Markdown badge
                +

                <%= image_tag @paper.status_badge_url %>   <%= octicon "paste", height: 16, class: "", "aria-label": "Copy" %>

                + +
                License
                +

                Authors of <%= Rails.application.settings['abbreviation'] %> papers retain copyright.

                +

                This work is licensed under a Creative Commons Attribution 4.0 International License.

                +

                Creative Commons License

                +
                diff --git a/spec/factories/papers_factory.rb b/spec/factories/papers_factory.rb index 45f70ef9b..0abf896b9 100644 --- a/spec/factories/papers_factory.rb +++ b/spec/factories/papers_factory.rb @@ -47,8 +47,7 @@ state { 'retracted' } accepted_at { Time.now } review_issue_id { 0 } - retraction_paper { create(:paper) } - sequence(:doi) {|n| "10.21105/joss.0000#{n}" } + sequence(:doi) {|n| "10.21105/joss.4000#{n}" } end factory :submitted_paper_with_sha do diff --git a/spec/system/papers/show_published_spec.rb b/spec/system/papers/show_published_spec.rb new file mode 100644 index 000000000..d0d92f683 --- /dev/null +++ b/spec/system/papers/show_published_spec.rb @@ -0,0 +1,73 @@ +require "rails_helper" + +feature "Published paper's show page" do + before do + @accepted_paper = create(:accepted_paper, title: "Astronomy paper", doi: "10.21105/joss.00001", review_issue_id: 1) + @accepted_paper.metadata['paper']['title'] = "Astronomy paper" + @accepted_paper.metadata['paper']['authors'] = [{'given_name' => "Vera", 'last_name' => "Rubin"}] + @accepted_paper.metadata['paper']['tags'] = ["Galaxy rotation curves"] + @accepted_paper.save! + + @retracted_paper = create(:retracted_paper, title: "Bad paper", doi: "10.21105/joss.00002", review_issue_id: 2) + @retracted_paper.metadata['paper']['title'] = "Bad paper" + @retracted_paper.save! + + @retraction_notice = create(:accepted_paper, title: "Retraction notice for: Bad paper", doi: "10.21105/joss.00002R") + @retraction_notice.update(retracted_paper: @retracted_paper) + end + + scenario "Accepted paper" do + visit paper_path(@accepted_paper) + + expect(page).to have_content("Astronomy paper") + expect(page).to_not have_content("This paper has been retracted") + expect(page).to_not have_content("This paper is a retraction notice") + + expect(page).to have_link("Software repository") + expect(page).to have_link("Paper review") + expect(page).to have_link("Download paper") + expect(page).to have_link("Software archive") + + expect(page).to_not have_link("Retraction notice") + expect(page).to_not have_link("Retracted Paper") + expect(page).to_not have_link("Download Retraction Notice") + end + + scenario "Retracted paper" do + visit paper_path(@retracted_paper) + + expect(page).to have_content("Bad paper") + expect(page).to have_content("This paper has been retracted") + expect(page).to_not have_content("This paper is a retraction notice") + + expect(page).to have_link("Software repository") + expect(page).to have_link("Paper review") + expect(page).to have_link("Download paper") + expect(page).to have_link("Software archive") + + expect(page).to have_link("Retraction notice") + expect(page).to have_link("read details here") + + expect(page).to_not have_link("Retracted Paper") + expect(page).to_not have_link("Download Retraction Notice") + end + + scenario "Retraction notice" do + visit paper_path(@retraction_notice) + + expect(page).to have_content("Retraction notice for: Bad paper") + expect(page).to have_content("This paper is a retraction notice for: Bad paper") + expect(page).to_not have_content("This paper has been retracted") + + expect(page).to_not have_link("Software repository") + expect(page).to_not have_link("Paper review") + expect(page).to_not have_link("Download paper") + expect(page).to_not have_link("Software archive") + + expect(page).to_not have_link("Retraction notice") + expect(page).to_not have_link("read details here") + + expect(page).to have_link("Retracted Paper") + expect(page).to have_link("Download Retraction Notice") + end +end From fb21294bf2375f92898d363d8d243a37e2e01db6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 17 Aug 2023 13:49:08 +0200 Subject: [PATCH 601/609] Update Rails version to 7.0.7 --- Gemfile | 2 +- Gemfile.lock | 128 +++++++++++++++++++++++++-------------------------- 2 files changed, 65 insertions(+), 65 deletions(-) diff --git a/Gemfile b/Gemfile index 1883d68ce..ef533e37e 100644 --- a/Gemfile +++ b/Gemfile @@ -18,7 +18,7 @@ gem 'octokit', '~> 6.0' gem 'pdf-reader', '~> 2.11.0' gem 'pg', '~> 1.4.6' gem 'pagy' -gem 'rails', '7.0.6' +gem 'rails', '7.0.7' gem "importmap-rails" gem "turbo-rails" gem "stimulus-rails" diff --git a/Gemfile.lock b/Gemfile.lock index 2f2259f4c..6483bc057 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,47 +4,47 @@ GEM Ascii85 (1.1.0) aasm (5.5.0) concurrent-ruby (~> 1.0) - actioncable (7.0.6) - actionpack (= 7.0.6) - activesupport (= 7.0.6) + actioncable (7.0.7) + actionpack (= 7.0.7) + activesupport (= 7.0.7) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.6) - actionpack (= 7.0.6) - activejob (= 7.0.6) - activerecord (= 7.0.6) - activestorage (= 7.0.6) - activesupport (= 7.0.6) + actionmailbox (7.0.7) + actionpack (= 7.0.7) + activejob (= 7.0.7) + activerecord (= 7.0.7) + activestorage (= 7.0.7) + activesupport (= 7.0.7) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.6) - actionpack (= 7.0.6) - actionview (= 7.0.6) - activejob (= 7.0.6) - activesupport (= 7.0.6) + actionmailer (7.0.7) + actionpack (= 7.0.7) + actionview (= 7.0.7) + activejob (= 7.0.7) + activesupport (= 7.0.7) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.6) - actionview (= 7.0.6) - activesupport (= 7.0.6) + actionpack (7.0.7) + actionview (= 7.0.7) + activesupport (= 7.0.7) rack (~> 2.0, >= 2.2.4) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.6) - actionpack (= 7.0.6) - activerecord (= 7.0.6) - activestorage (= 7.0.6) - activesupport (= 7.0.6) + actiontext (7.0.7) + actionpack (= 7.0.7) + activerecord (= 7.0.7) + activestorage (= 7.0.7) + activesupport (= 7.0.7) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.6) - activesupport (= 7.0.6) + actionview (7.0.7) + activesupport (= 7.0.7) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -52,22 +52,22 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (7.0.6) - activesupport (= 7.0.6) + activejob (7.0.7) + activesupport (= 7.0.7) globalid (>= 0.3.6) - activemodel (7.0.6) - activesupport (= 7.0.6) - activerecord (7.0.6) - activemodel (= 7.0.6) - activesupport (= 7.0.6) - activestorage (7.0.6) - actionpack (= 7.0.6) - activejob (= 7.0.6) - activerecord (= 7.0.6) - activesupport (= 7.0.6) + activemodel (7.0.7) + activesupport (= 7.0.7) + activerecord (7.0.7) + activemodel (= 7.0.7) + activesupport (= 7.0.7) + activestorage (7.0.7) + actionpack (= 7.0.7) + activejob (= 7.0.7) + activerecord (= 7.0.7) + activesupport (= 7.0.7) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.6) + activesupport (7.0.7) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -204,16 +204,16 @@ GEM matrix (0.4.2) memoist (0.16.2) method_source (1.0.0) - mini_mime (1.1.2) + mini_mime (1.1.5) mini_portile2 (2.8.4) mini_racer (0.8.0) libv8-node (~> 18.16.0.0) - minitest (5.18.1) + minitest (5.19.0) msgpack (1.7.2) multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.3.0) - net-imap (0.3.6) + net-imap (0.3.7) date net-protocol net-pop (0.1.2) @@ -227,12 +227,12 @@ GEM net-ssh (7.1.0) newrelic_rpm (9.3.1) nio4r (2.5.9) - nokogiri (1.15.3) + nokogiri (1.15.4) mini_portile2 (~> 2.8.2) racc (~> 1.4) - nokogiri (1.15.3-x86_64-darwin) + nokogiri (1.15.4-x86_64-darwin) racc (~> 1.4) - nokogiri (1.15.3-x86_64-linux) + nokogiri (1.15.4-x86_64-linux) racc (~> 1.4) oauth2 (2.0.9) faraday (>= 0.17.3, < 3.0) @@ -282,39 +282,39 @@ GEM puma (6.3.0) nio4r (~> 2.0) racc (1.7.1) - rack (2.2.7) + rack (2.2.8) rack-protection (3.0.6) rack rack-test (2.1.0) rack (>= 1.3) - rails (7.0.6) - actioncable (= 7.0.6) - actionmailbox (= 7.0.6) - actionmailer (= 7.0.6) - actionpack (= 7.0.6) - actiontext (= 7.0.6) - actionview (= 7.0.6) - activejob (= 7.0.6) - activemodel (= 7.0.6) - activerecord (= 7.0.6) - activestorage (= 7.0.6) - activesupport (= 7.0.6) + rails (7.0.7) + actioncable (= 7.0.7) + actionmailbox (= 7.0.7) + actionmailer (= 7.0.7) + actionpack (= 7.0.7) + actiontext (= 7.0.7) + actionview (= 7.0.7) + activejob (= 7.0.7) + activemodel (= 7.0.7) + activerecord (= 7.0.7) + activestorage (= 7.0.7) + activesupport (= 7.0.7) bundler (>= 1.15.0) - railties (= 7.0.6) + railties (= 7.0.7) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) activesupport (>= 5.0.1.rc1) - rails-dom-testing (2.1.1) + rails-dom-testing (2.2.0) activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (7.0.6) - actionpack (= 7.0.6) - activesupport (= 7.0.6) + railties (7.0.7) + actionpack (= 7.0.7) + activesupport (= 7.0.7) method_source rake (>= 12.2) thor (~> 1.0) @@ -423,12 +423,12 @@ GEM hashdiff (>= 0.4.0, < 2.0.0) webrick (1.8.1) websocket (1.2.9) - websocket-driver (0.7.5) + websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.6.8) + zeitwerk (2.6.11) PLATFORMS ruby @@ -464,7 +464,7 @@ DEPENDENCIES pg (~> 1.4.6) pry-byebug puma - rails (= 7.0.6) + rails (= 7.0.7) rails-controller-testing (~> 1.0.5) redis (~> 5.0) responders From 00cd7e1e47021fc131489684ca1933a9b1369f20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Thu, 17 Aug 2023 13:58:47 +0200 Subject: [PATCH 602/609] Update example to link to Inara names docs --- docs/submitting.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index 8a3f7209f..8d8954e87 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -108,7 +108,9 @@ As this short list shows, JOSS papers are only expected to contain a limited set ## Example paper and bibliography -This example `paper.md` is adapted from _Gala: A Python package for galactic dynamics_ by Adrian M. Price-Whelan [http://doi.org/10.21105/joss.00388](http://doi.org/10.21105/joss.00388): +This example `paper.md` is adapted from _Gala: A Python package for galactic dynamics_ by Adrian M. Price-Whelan [http://doi.org/10.21105/joss.00388](http://doi.org/10.21105/joss.00388). + +For a complete description of available options to describe author names [see here](https://github.com/openjournals/inara/blob/main/docs/names.md). ``` --- @@ -130,6 +132,10 @@ authors: - name: Author with no affiliation corresponding: true # (This is how to denote the corresponding author) affiliation: 3 + - given-names: Ludwig + dropping-particle: van + surname: Beethoven + affiliation: 3 affiliations: - name: Lyman Spitzer, Jr. Fellow, Princeton University, USA index: 1 From 1a49c24a7870d9b1007fbea31dc48426ea1160ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 18 Aug 2023 12:09:27 +0200 Subject: [PATCH 603/609] [Sec] Update Commonmarker Ref: https://github.com/github/cmark-gfm/security/advisories/GHSA-w4qg-3vf7-m9x5 --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index ef533e37e..b83703353 100644 --- a/Gemfile +++ b/Gemfile @@ -9,7 +9,7 @@ gem 'google_drive' gem 'groupdate' gem 'honeybadger', '~> 5.2.0' gem 'html-pipeline', '~> 2.14.3' -gem 'commonmarker', '~> 0.23.8' +gem 'commonmarker', '~> 0.23.10' gem 'net-sftp', '~> 4.0' gem 'octicons_helper' gem 'omniauth-orcid', '~> 2.1.1' diff --git a/Gemfile.lock b/Gemfile.lock index 6483bc057..dc4f83a20 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -91,7 +91,7 @@ GEM xpath (~> 3.2) chartkick (5.0.2) coderay (1.1.3) - commonmarker (0.23.9) + commonmarker (0.23.10) concurrent-ruby (1.2.2) connection_pool (2.4.1) crack (0.4.5) @@ -441,7 +441,7 @@ DEPENDENCIES bootsnap capybara (~> 3.38) chartkick - commonmarker (~> 0.23.8) + commonmarker (~> 0.23.10) dotenv (~> 2.8.1) elasticsearch (< 7.14) factory_bot_rails (~> 6.2.0) From 08970466154bddd3e3f60014d6a11531ad975658 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Mon, 21 Aug 2023 09:45:00 +0200 Subject: [PATCH 604/609] Not new anymore --- app/views/notifications/editor_weekly_email.html.erb | 2 +- app/views/notifications/editor_weekly_email.text.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/notifications/editor_weekly_email.html.erb b/app/views/notifications/editor_weekly_email.html.erb index b676644b5..fa70c6320 100644 --- a/app/views/notifications/editor_weekly_email.html.erb +++ b/app/views/notifications/editor_weekly_email.html.erb @@ -1,4 +1,4 @@ -

                New: Your custom dashboard

                +

                Your custom dashboard

                http://joss.theoj.org/dashboard/<%= @editor %>

                <% if @assigned_issues.any? %> diff --git a/app/views/notifications/editor_weekly_email.text.erb b/app/views/notifications/editor_weekly_email.text.erb index 765b8400c..d576ac4cc 100644 --- a/app/views/notifications/editor_weekly_email.text.erb +++ b/app/views/notifications/editor_weekly_email.text.erb @@ -1,4 +1,4 @@ -** New: Your custom dashboard: ** +** Your custom dashboard: ** View here: http://joss.theoj.org/dashboard/<%= @editor %> <% if @assigned_issues.any? %> From c71eb28634e9c5422d896b7d18c324f986603f72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Wed, 23 Aug 2023 11:08:24 +0200 Subject: [PATCH 605/609] Rails 7.0.7.2 security release --- Gemfile | 2 +- Gemfile.lock | 108 +++++++++++++++++++++++++-------------------------- 2 files changed, 55 insertions(+), 55 deletions(-) diff --git a/Gemfile b/Gemfile index b83703353..0eb3d9926 100644 --- a/Gemfile +++ b/Gemfile @@ -18,7 +18,7 @@ gem 'octokit', '~> 6.0' gem 'pdf-reader', '~> 2.11.0' gem 'pg', '~> 1.4.6' gem 'pagy' -gem 'rails', '7.0.7' +gem 'rails', '7.0.7.2' gem "importmap-rails" gem "turbo-rails" gem "stimulus-rails" diff --git a/Gemfile.lock b/Gemfile.lock index dc4f83a20..430fbfb5f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,47 +4,47 @@ GEM Ascii85 (1.1.0) aasm (5.5.0) concurrent-ruby (~> 1.0) - actioncable (7.0.7) - actionpack (= 7.0.7) - activesupport (= 7.0.7) + actioncable (7.0.7.2) + actionpack (= 7.0.7.2) + activesupport (= 7.0.7.2) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (7.0.7) - actionpack (= 7.0.7) - activejob (= 7.0.7) - activerecord (= 7.0.7) - activestorage (= 7.0.7) - activesupport (= 7.0.7) + actionmailbox (7.0.7.2) + actionpack (= 7.0.7.2) + activejob (= 7.0.7.2) + activerecord (= 7.0.7.2) + activestorage (= 7.0.7.2) + activesupport (= 7.0.7.2) mail (>= 2.7.1) net-imap net-pop net-smtp - actionmailer (7.0.7) - actionpack (= 7.0.7) - actionview (= 7.0.7) - activejob (= 7.0.7) - activesupport (= 7.0.7) + actionmailer (7.0.7.2) + actionpack (= 7.0.7.2) + actionview (= 7.0.7.2) + activejob (= 7.0.7.2) + activesupport (= 7.0.7.2) mail (~> 2.5, >= 2.5.4) net-imap net-pop net-smtp rails-dom-testing (~> 2.0) - actionpack (7.0.7) - actionview (= 7.0.7) - activesupport (= 7.0.7) + actionpack (7.0.7.2) + actionview (= 7.0.7.2) + activesupport (= 7.0.7.2) rack (~> 2.0, >= 2.2.4) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (7.0.7) - actionpack (= 7.0.7) - activerecord (= 7.0.7) - activestorage (= 7.0.7) - activesupport (= 7.0.7) + actiontext (7.0.7.2) + actionpack (= 7.0.7.2) + activerecord (= 7.0.7.2) + activestorage (= 7.0.7.2) + activesupport (= 7.0.7.2) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.0.7) - activesupport (= 7.0.7) + actionview (7.0.7.2) + activesupport (= 7.0.7.2) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) @@ -52,22 +52,22 @@ GEM active_link_to (1.0.5) actionpack addressable - activejob (7.0.7) - activesupport (= 7.0.7) + activejob (7.0.7.2) + activesupport (= 7.0.7.2) globalid (>= 0.3.6) - activemodel (7.0.7) - activesupport (= 7.0.7) - activerecord (7.0.7) - activemodel (= 7.0.7) - activesupport (= 7.0.7) - activestorage (7.0.7) - actionpack (= 7.0.7) - activejob (= 7.0.7) - activerecord (= 7.0.7) - activesupport (= 7.0.7) + activemodel (7.0.7.2) + activesupport (= 7.0.7.2) + activerecord (7.0.7.2) + activemodel (= 7.0.7.2) + activesupport (= 7.0.7.2) + activestorage (7.0.7.2) + actionpack (= 7.0.7.2) + activejob (= 7.0.7.2) + activerecord (= 7.0.7.2) + activesupport (= 7.0.7.2) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.7) + activesupport (7.0.7.2) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -287,20 +287,20 @@ GEM rack rack-test (2.1.0) rack (>= 1.3) - rails (7.0.7) - actioncable (= 7.0.7) - actionmailbox (= 7.0.7) - actionmailer (= 7.0.7) - actionpack (= 7.0.7) - actiontext (= 7.0.7) - actionview (= 7.0.7) - activejob (= 7.0.7) - activemodel (= 7.0.7) - activerecord (= 7.0.7) - activestorage (= 7.0.7) - activesupport (= 7.0.7) + rails (7.0.7.2) + actioncable (= 7.0.7.2) + actionmailbox (= 7.0.7.2) + actionmailer (= 7.0.7.2) + actionpack (= 7.0.7.2) + actiontext (= 7.0.7.2) + actionview (= 7.0.7.2) + activejob (= 7.0.7.2) + activemodel (= 7.0.7.2) + activerecord (= 7.0.7.2) + activestorage (= 7.0.7.2) + activesupport (= 7.0.7.2) bundler (>= 1.15.0) - railties (= 7.0.7) + railties (= 7.0.7.2) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -312,9 +312,9 @@ GEM rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (7.0.7) - actionpack (= 7.0.7) - activesupport (= 7.0.7) + railties (7.0.7.2) + actionpack (= 7.0.7.2) + activesupport (= 7.0.7.2) method_source rake (>= 12.2) thor (~> 1.0) @@ -464,7 +464,7 @@ DEPENDENCIES pg (~> 1.4.6) pry-byebug puma - rails (= 7.0.7) + rails (= 7.0.7.2) rails-controller-testing (~> 1.0.5) redis (~> 5.0) responders From ef06275d114d5ed3a5ce0583004166743368cc7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Fri, 25 Aug 2023 12:15:37 +0200 Subject: [PATCH 606/609] Update submitting.md --- docs/submitting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/submitting.md b/docs/submitting.md index 8d8954e87..e6a83bbf9 100644 --- a/docs/submitting.md +++ b/docs/submitting.md @@ -110,7 +110,7 @@ As this short list shows, JOSS papers are only expected to contain a limited set This example `paper.md` is adapted from _Gala: A Python package for galactic dynamics_ by Adrian M. Price-Whelan [http://doi.org/10.21105/joss.00388](http://doi.org/10.21105/joss.00388). -For a complete description of available options to describe author names [see here](https://github.com/openjournals/inara/blob/main/docs/names.md). +For a complete description of available options to describe author names [see here](https://github.com/openjournals/inara/blob/main/docs/names\.md). ``` --- From 8af6d083d4331116dde27427a3a5cf8d56623638 Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Wed, 30 Aug 2023 07:54:06 +0100 Subject: [PATCH 607/609] Wait times --- app/views/notifications/author_submission_email.html.erb | 2 +- app/views/notifications/author_submission_email.text.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/notifications/author_submission_email.html.erb b/app/views/notifications/author_submission_email.html.erb index 3da371d8d..9e66fd3e3 100644 --- a/app/views/notifications/author_submission_email.html.erb +++ b/app/views/notifications/author_submission_email.html.erb @@ -1,6 +1,6 @@ Hello there, thanks for your submission to <%= Rails.application.settings['abbreviation'] %>.
                -Your paper, '<%= @paper.title %>', is currently awaiting triage by our managing editor. This generally takes up to a week and until then, your paper won't show up in the https://github.com/<%= Rails.application.settings['reviews'] %> repository. +Your paper, '<%= @paper.title %>', is currently awaiting triage by our managing editor. This generally takes up to a week, but during busy times can take a number of weeks. Until then, your paper won't show up in the https://github.com/<%= Rails.application.settings['reviews'] %> repository.
                You can view the latest status of your paper here: <%= @url %> diff --git a/app/views/notifications/author_submission_email.text.erb b/app/views/notifications/author_submission_email.text.erb index 29cc513fe..6522e893b 100644 --- a/app/views/notifications/author_submission_email.text.erb +++ b/app/views/notifications/author_submission_email.text.erb @@ -1,6 +1,6 @@ Hello there, thanks for your submission to <%= Rails.application.settings['abbreviation'] %>. -Your paper, '<%= @paper.title %>', is currently awaiting triage by our managing editor. This generally takes up to a week and until then, your paper won't show up in the https://github.com/<%= Rails.application.settings['reviews'] %> repository. +Your paper, '<%= @paper.title %>', is currently awaiting triage by our managing editor. This generally takes up to a week, but during busy times can take a number of weeks. until then, your paper won't show up in the https://github.com/<%= Rails.application.settings['reviews'] %> repository. You can view the latest status of your paper here: <%= @url %> From 66c3cd585cbdf34f00de02714538893693344541 Mon Sep 17 00:00:00 2001 From: lucaferranti Date: Fri, 8 Sep 2023 10:42:53 +0300 Subject: [PATCH 608/609] update settings-test.yml --- config/settings-test.yml | 42 ++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/config/settings-test.yml b/config/settings-test.yml index f33cdb35b..47d23493e 100644 --- a/config/settings-test.yml +++ b/config/settings-test.yml @@ -1,29 +1,29 @@ # Changing this file necessitates a server restart -name: "The Journal of Open Source Software" -abbreviation: "JOSS" -issn: "2475-9066" -tagline: "a developer friendly journal for research software packages." -logo_url: "http://joss.theoj.org/logo_large.png" -url: "http://joss.theoj.org" -editor_email: "joss.theoj@gmail.com" -noreply_email: "noreply@joss.theoj.org" -launch_date: "2016-05-05" -twitter: "@JOSS_TheOJ" -mastodon_url: "https://fosstodon.org/@JOSS" -google_analytics: "UA-47852178-4" +name: "Proceedings of the JuliaCon Conferences" +abbreviation: "JCON" +issn: "2642-4029" +tagline: "an open-access journal published in cooperation with the the Open Journals." +logo_url: "http://proceedings.juliacon.org/logo_large.jpg" +url: "https://proceedings.juliacon.org" +editor_email: "admin@theoj.org" +noreply_email: "admin@theoj.org" +launch_date: "FIXME" +twitter: "@juliaconorg" +mastodon_url: "FIXME" +google_analytics: "UA-47852178-9" github: "openjournals/joss" -reviews: "openjournals/joss-reviews-testing" -papers_repo: "openjournals/joss-papers-testing" -papers_html_url: "https://www.theoj.org/joss-papers" -reviewers_url: "https://reviewers.joss.theoj.org" -reviewers_signup_url: "https://reviewers.joss.theoj.org/join" -reviewers_lookup_url: "https://reviewers.joss.theoj.org/lookup" -product: "software" # the *thing* being submitted for review +reviews: "JuliaCon/proceedings-review" +papers_repo: "JuliaCon/proceedings-paper" +papers_html_url: "https://juliacon.github.io/proceedings-papers" +reviewers_url: "FIXME" +reviewers_signup_url: "FIXME" +reviewers_lookup_url: "FIXME" +product: "paper" # the *thing* being submitted for review submission_enquiry: |- **Project repository URL:** INSERT YOUR REPOSITORY LINK HERE - Briefly describe your software, its research application and any questions you have about the JOSS submission criteria. -paper_types: [] + Briefly describe your software, its research application and any questions you have about the JulianCon submission criteria. +paper_types: ["full paper", "extended abstract"] bot_username: editorialbot features: tracks: true From 28bd29ab8599b428af5b46543a6b2e9109d44a93 Mon Sep 17 00:00:00 2001 From: lucaferranti Date: Fri, 8 Sep 2023 10:56:08 +0300 Subject: [PATCH 609/609] of course I would miss one --- Gemfile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Gemfile b/Gemfile index e44a83dbf..0eb3d9926 100644 --- a/Gemfile +++ b/Gemfile @@ -1,9 +1,5 @@ source 'https://rubygems.org' -<<<<<<< HEAD -ruby "2.7.2" -======= ruby '3.2.2' ->>>>>>> origin/main gem 'aasm', '~> 5.5.0' gem 'chartkick'