From 191b528ad735f372ba1bedfb7e1ddafbe040f269 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Sun, 4 Oct 2020 05:13:39 -0400 Subject: [PATCH 1/2] Ensure files end in newlines (POSIX compliance) --- app/javascript/vendor/pixiv-ugoira-player.js | 2 +- app/views/artists/update.js.erb | 2 +- app/views/counts/posts.json.erb | 2 +- app/views/counts/posts.xml.erb | 2 +- app/views/moderator/ip_addrs/_ip_listing.json.erb | 2 +- app/views/moderator/ip_addrs/_user_listing.json.erb | 2 +- app/views/note_versions/index.html.erb | 2 +- app/views/posts/partials/show/_ugoira.html.erb | 2 +- script/install/postgresql_hba_conf | 2 +- test/unit/sources/nico_seiga_test.rb | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app/javascript/vendor/pixiv-ugoira-player.js b/app/javascript/vendor/pixiv-ugoira-player.js index 0b2a19526..2831f4ef1 100644 --- a/app/javascript/vendor/pixiv-ugoira-player.js +++ b/app/javascript/vendor/pixiv-ugoira-player.js @@ -522,4 +522,4 @@ ZipImagePlayer.prototype = { // added -export { ZipImagePlayer }; \ No newline at end of file +export { ZipImagePlayer }; diff --git a/app/views/artists/update.js.erb b/app/views/artists/update.js.erb index bcebe9d37..345366b9b 100644 --- a/app/views/artists/update.js.erb +++ b/app/views/artists/update.js.erb @@ -1 +1 @@ -location.reload(); \ No newline at end of file +location.reload(); diff --git a/app/views/counts/posts.json.erb b/app/views/counts/posts.json.erb index 002fead90..7c68802cb 100644 --- a/app/views/counts/posts.json.erb +++ b/app/views/counts/posts.json.erb @@ -1 +1 @@ -{"counts": {"posts": <%= @count %>}} \ No newline at end of file +{"counts": {"posts": <%= @count %>}} diff --git a/app/views/counts/posts.xml.erb b/app/views/counts/posts.xml.erb index e89efa3a7..9ae07f67d 100644 --- a/app/views/counts/posts.xml.erb +++ b/app/views/counts/posts.xml.erb @@ -3,4 +3,4 @@ <%= @count %> - \ No newline at end of file + diff --git a/app/views/moderator/ip_addrs/_ip_listing.json.erb b/app/views/moderator/ip_addrs/_ip_listing.json.erb index bb9f4c563..45801c1ba 100644 --- a/app/views/moderator/ip_addrs/_ip_listing.json.erb +++ b/app/views/moderator/ip_addrs/_ip_listing.json.erb @@ -1 +1 @@ -<%= raw @results.map {|ip_addr, count| {ip_addr: ip_addr.to_s, count: count}}.to_json %> \ No newline at end of file +<%= raw @results.map {|ip_addr, count| {ip_addr: ip_addr.to_s, count: count}}.to_json %> diff --git a/app/views/moderator/ip_addrs/_user_listing.json.erb b/app/views/moderator/ip_addrs/_user_listing.json.erb index e08079c16..a8df6882f 100644 --- a/app/views/moderator/ip_addrs/_user_listing.json.erb +++ b/app/views/moderator/ip_addrs/_user_listing.json.erb @@ -1 +1 @@ -<%= raw @results.map {|user, count| {user_id: user.id, count: count}}.to_json %> \ No newline at end of file +<%= raw @results.map {|user, count| {user_id: user.id, count: count}}.to_json %> diff --git a/app/views/note_versions/index.html.erb b/app/views/note_versions/index.html.erb index 5dc24c69e..314d9cf04 100644 --- a/app/views/note_versions/index.html.erb +++ b/app/views/note_versions/index.html.erb @@ -11,4 +11,4 @@ -<%= render "notes/secondary_links" %> \ No newline at end of file +<%= render "notes/secondary_links" %> diff --git a/app/views/posts/partials/show/_ugoira.html.erb b/app/views/posts/partials/show/_ugoira.html.erb index 3b18dfa49..e08516c0b 100644 --- a/app/views/posts/partials/show/_ugoira.html.erb +++ b/app/views/posts/partials/show/_ugoira.html.erb @@ -2,4 +2,4 @@ <%= render "posts/partials/show/ugoira_webm", :post => post %> <% else %> <%= render "posts/partials/show/ugoira_original", :post => post %> -<% end %> \ No newline at end of file +<% end %> diff --git a/script/install/postgresql_hba_conf b/script/install/postgresql_hba_conf index 0f7c5bc2d..442069177 100644 --- a/script/install/postgresql_hba_conf +++ b/script/install/postgresql_hba_conf @@ -1,2 +1,2 @@ local all postgres,danbooru trust -host all postgres,danbooru 127.0.0.1/32 trust \ No newline at end of file +host all postgres,danbooru 127.0.0.1/32 trust diff --git a/test/unit/sources/nico_seiga_test.rb b/test/unit/sources/nico_seiga_test.rb index ff2645d9a..906ba09b0 100644 --- a/test/unit/sources/nico_seiga_test.rb +++ b/test/unit/sources/nico_seiga_test.rb @@ -1,4 +1,4 @@ -require 'test_helper' +require 'test_helper' module Sources class NicoSeigaTest < ActiveSupport::TestCase From 6cdafdf136499b41ff78325bf06a86c7c8b5d0d9 Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Sun, 4 Oct 2020 05:15:02 -0400 Subject: [PATCH 2/2] Remove trailing space characters Trailing space characters do nothing except take up disk space, they should be removed --- .env | 2 +- LICENSE | 8 ++++---- README.md | 10 +++++----- app/views/comments/partials/show/_comment.html.erb | 2 +- app/views/forum_post_votes/_list.html.erb | 4 ++-- app/views/forum_posts/_forum_post.html.erb | 2 +- app/views/forum_topics/_secondary_links.html.erb | 4 ++-- app/views/forum_topics/index.html.erb | 2 +- app/views/layouts/default.html.erb | 4 ++-- app/views/modqueue/_desc.html.erb | 2 +- app/views/post_disapprovals/_counts.html.erb | 2 +- app/views/posts/partials/index/_related.html.erb | 2 +- app/views/posts/partials/show/_edit.html.erb | 2 +- app/views/users/_statistics.html.erb | 6 +++--- app/views/users/edit.html.erb | 8 ++++---- db/scripts.sql | 8 ++++---- db/structure.sql | 2 +- test/unit/bulk_update_request_test.rb | 4 ++-- test/unit/sources/deviant_art_test.rb | 8 ++++---- 19 files changed, 41 insertions(+), 41 deletions(-) diff --git a/.env b/.env index 08f7601dc..2c7731b6b 100644 --- a/.env +++ b/.env @@ -35,7 +35,7 @@ # Put these in .env.production or .env.development to define your dev/prod # databases. Do not define it in .env or .env.local! It will be taken as your # test database too, and rails will wipe it if you run the test suite. -# +# # If you are connecting to PostgreSQL via socket, omit the hostname (e.g. # postgresql:///danbooru2) # export DATABASE_URL="postgresql://localhost/danbooru2" diff --git a/LICENSE b/LICENSE index e090d82d2..c2f0eac0b 100644 --- a/LICENSE +++ b/LICENSE @@ -2,13 +2,13 @@ Copyright (c) 2013, Danbooru Project All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. + list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. + and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED @@ -22,5 +22,5 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The views and conclusions contained in the software and documentation are those -of the authors and should not be interpreted as representing official policies, +of the authors and should not be interpreted as representing official policies, either expressed or implied, of the FreeBSD Project. diff --git a/README.md b/README.md index b6834fdff..9eb9c9540 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ simple to adapt for other platforms. For best performance, you will need at least 256MB of RAM for PostgreSQL and Rails. The memory requirement will grow as your -database gets bigger. +database gets bigger. On production Danbooru uses PostgreSQL 9.4, but any 9.x release should work. @@ -41,7 +41,7 @@ debug your Nginx configuration file. ## Services -Danbooru employs numerous external services to delegate some +Danbooru employs numerous external services to delegate some functionality. For development purposes, you can just run mocked version of these @@ -50,7 +50,7 @@ automatically using Foreman and the provided Procfile. ### Amazon Web Services -In order to enable the following features, you will need an AWS SQS +In order to enable the following features, you will need an AWS SQS account: * Pool versions @@ -68,11 +68,11 @@ The following features requires a Google API account: ### IQDB Service -IQDB integration is delegated to the [IQDBS service](https://github.com/r888888888/iqdbs). +IQDB integration is delegated to the [IQDBS service](https://github.com/r888888888/iqdbs). ### Archive Service -In order to access versioned data for pools and posts you will +In order to access versioned data for pools and posts you will need to install and configure the [Archives service](https://github.com/r888888888/archives). ### Reportbooru Service diff --git a/app/views/comments/partials/show/_comment.html.erb b/app/views/comments/partials/show/_comment.html.erb index 0dea551d8..b3b52b712 100644 --- a/app/views/comments/partials/show/_comment.html.erb +++ b/app/views/comments/partials/show/_comment.html.erb @@ -30,7 +30,7 @@ <%= format_text(comment.body, data: dtext_data) %> <%= render "application/update_notice", record: comment %> - + <% if policy(comment).create? %> <% if context == :index_by_comment %> diff --git a/app/views/forum_post_votes/_list.html.erb b/app/views/forum_post_votes/_list.html.erb index 75653e2ed..90a9c6297 100644 --- a/app/views/forum_post_votes/_list.html.erb +++ b/app/views/forum_post_votes/_list.html.erb @@ -1,5 +1,5 @@ -<%- -# votes +<%- +# votes # forum_post %> diff --git a/app/views/forum_posts/_forum_post.html.erb b/app/views/forum_posts/_forum_post.html.erb index 4f08f5fa9..3904f112a 100644 --- a/app/views/forum_posts/_forum_post.html.erb +++ b/app/views/forum_posts/_forum_post.html.erb @@ -1,5 +1,5 @@ <% if policy(forum_post).show_deleted? %> -
data-is-reported="<%= moderation_reports.pluck(:model_id).include?(forum_post.id) %>" diff --git a/app/views/forum_topics/_secondary_links.html.erb b/app/views/forum_topics/_secondary_links.html.erb index 2aabcb132..9ce1011e7 100644 --- a/app/views/forum_topics/_secondary_links.html.erb +++ b/app/views/forum_topics/_secondary_links.html.erb @@ -1,7 +1,7 @@ <% content_for(:secondary_links) do %> <%= quick_search_form_for(:body_matches, forum_posts_path, "forum posts") %> <%= subnav_link_to "Listing", forum_topics_path %> - + <% if policy(ForumTopic).create? %> <%= subnav_link_to "New", new_forum_topic_path %> <% end %> @@ -14,7 +14,7 @@ <% else %> <%= subnav_link_to "Request alias/implication", new_bulk_update_request_path %> <% end %> - + <%= subnav_link_to "Search", search_forum_posts_path %> <%= subnav_link_to "Help", wiki_page_path("help:forum") %> <% if CurrentUser.is_member? && @forum_topic && !@forum_topic.new_record? %> diff --git a/app/views/forum_topics/index.html.erb b/app/views/forum_topics/index.html.erb index eeb50a9b8..70c9af84f 100644 --- a/app/views/forum_topics/index.html.erb +++ b/app/views/forum_topics/index.html.erb @@ -9,7 +9,7 @@

Categories: - <%= link_to "All", forum_topics_path %>, + <%= link_to "All", forum_topics_path %>, <%= link_to "New", forum_topics_path(search: { is_read: false }) %>, <% if policy(ForumTopic).moderate? %> <%= link_to "Private", forum_topics_path(search: { is_private: true }) %>, diff --git a/app/views/layouts/default.html.erb b/app/views/layouts/default.html.erb index f36a0f833..97174b523 100644 --- a/app/views/layouts/default.html.erb +++ b/app/views/layouts/default.html.erb @@ -51,12 +51,12 @@

<%= link_to Danbooru.config.app_name, root_path, id: "app-name-header", class: "heading" %> - +
- +