Merge pull request #4611 from aaronfranke/formatting
Make file formatting comply with POSIX standards and remove trailing space characters
This commit is contained in:
2
.env
2
.env
@@ -35,7 +35,7 @@
|
|||||||
# Put these in .env.production or .env.development to define your dev/prod
|
# 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
|
# 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.
|
# 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.
|
# If you are connecting to PostgreSQL via socket, omit the hostname (e.g.
|
||||||
# postgresql:///danbooru2)
|
# postgresql:///danbooru2)
|
||||||
# export DATABASE_URL="postgresql://localhost/danbooru2"
|
# export DATABASE_URL="postgresql://localhost/danbooru2"
|
||||||
|
|||||||
8
LICENSE
8
LICENSE
@@ -2,13 +2,13 @@ Copyright (c) 2013, Danbooru Project
|
|||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
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
|
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,
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
this list of conditions and the following disclaimer in the documentation
|
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
|
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
|
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.
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
The views and conclusions contained in the software and documentation are those
|
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.
|
either expressed or implied, of the FreeBSD Project.
|
||||||
|
|||||||
10
README.md
10
README.md
@@ -10,7 +10,7 @@ simple to adapt for other platforms.
|
|||||||
|
|
||||||
For best performance, you will need at least 256MB of RAM for
|
For best performance, you will need at least 256MB of RAM for
|
||||||
PostgreSQL and Rails. The memory requirement will grow as your
|
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
|
On production Danbooru uses PostgreSQL 9.4, but any 9.x release should
|
||||||
work.
|
work.
|
||||||
@@ -41,7 +41,7 @@ debug your Nginx configuration file.
|
|||||||
|
|
||||||
## Services
|
## Services
|
||||||
|
|
||||||
Danbooru employs numerous external services to delegate some
|
Danbooru employs numerous external services to delegate some
|
||||||
functionality.
|
functionality.
|
||||||
|
|
||||||
For development purposes, you can just run mocked version of these
|
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
|
### 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:
|
account:
|
||||||
|
|
||||||
* Pool versions
|
* Pool versions
|
||||||
@@ -68,11 +68,11 @@ The following features requires a Google API account:
|
|||||||
|
|
||||||
### IQDB Service
|
### 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
|
### 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).
|
need to install and configure the [Archives service](https://github.com/r888888888/archives).
|
||||||
|
|
||||||
### Reportbooru Service
|
### Reportbooru Service
|
||||||
|
|||||||
2
app/javascript/vendor/pixiv-ugoira-player.js
vendored
2
app/javascript/vendor/pixiv-ugoira-player.js
vendored
@@ -522,4 +522,4 @@ ZipImagePlayer.prototype = {
|
|||||||
|
|
||||||
// added
|
// added
|
||||||
|
|
||||||
export { ZipImagePlayer };
|
export { ZipImagePlayer };
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
location.reload();
|
location.reload();
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
<%= format_text(comment.body, data: dtext_data) %>
|
<%= format_text(comment.body, data: dtext_data) %>
|
||||||
</div>
|
</div>
|
||||||
<%= render "application/update_notice", record: comment %>
|
<%= render "application/update_notice", record: comment %>
|
||||||
|
|
||||||
<% if policy(comment).create? %>
|
<% if policy(comment).create? %>
|
||||||
<menu>
|
<menu>
|
||||||
<% if context == :index_by_comment %>
|
<% if context == :index_by_comment %>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{"counts": {"posts": <%= @count %>}}
|
{"counts": {"posts": <%= @count %>}}
|
||||||
|
|||||||
@@ -3,4 +3,4 @@
|
|||||||
<posts>
|
<posts>
|
||||||
<%= @count %>
|
<%= @count %>
|
||||||
</posts>
|
</posts>
|
||||||
</counts>
|
</counts>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<%-
|
<%-
|
||||||
# votes
|
# votes
|
||||||
# forum_post
|
# forum_post
|
||||||
%>
|
%>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<% if policy(forum_post).show_deleted? %>
|
<% if policy(forum_post).show_deleted? %>
|
||||||
<article class="forum-post message" id="forum_post_<%= forum_post.id %>"
|
<article class="forum-post message" id="forum_post_<%= forum_post.id %>"
|
||||||
data-forum-post-id="<%= forum_post.id %>"
|
data-forum-post-id="<%= forum_post.id %>"
|
||||||
<% if policy(moderation_reports).show? %>
|
<% if policy(moderation_reports).show? %>
|
||||||
data-is-reported="<%= moderation_reports.pluck(:model_id).include?(forum_post.id) %>"
|
data-is-reported="<%= moderation_reports.pluck(:model_id).include?(forum_post.id) %>"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<% content_for(:secondary_links) do %>
|
<% content_for(:secondary_links) do %>
|
||||||
<%= quick_search_form_for(:body_matches, forum_posts_path, "forum posts") %>
|
<%= quick_search_form_for(:body_matches, forum_posts_path, "forum posts") %>
|
||||||
<%= subnav_link_to "Listing", forum_topics_path %>
|
<%= subnav_link_to "Listing", forum_topics_path %>
|
||||||
|
|
||||||
<% if policy(ForumTopic).create? %>
|
<% if policy(ForumTopic).create? %>
|
||||||
<%= subnav_link_to "New", new_forum_topic_path %>
|
<%= subnav_link_to "New", new_forum_topic_path %>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
<% else %>
|
<% else %>
|
||||||
<%= subnav_link_to "Request alias/implication", new_bulk_update_request_path %>
|
<%= subnav_link_to "Request alias/implication", new_bulk_update_request_path %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<%= subnav_link_to "Search", search_forum_posts_path %>
|
<%= subnav_link_to "Search", search_forum_posts_path %>
|
||||||
<%= subnav_link_to "Help", wiki_page_path("help:forum") %>
|
<%= subnav_link_to "Help", wiki_page_path("help:forum") %>
|
||||||
<% if CurrentUser.is_member? && @forum_topic && !@forum_topic.new_record? %>
|
<% if CurrentUser.is_member? && @forum_topic && !@forum_topic.new_record? %>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
Categories:
|
Categories:
|
||||||
<%= link_to "All", forum_topics_path %>,
|
<%= link_to "All", forum_topics_path %>,
|
||||||
<%= link_to "New", forum_topics_path(search: { is_read: false }) %>,
|
<%= link_to "New", forum_topics_path(search: { is_read: false }) %>,
|
||||||
<% if policy(ForumTopic).moderate? %>
|
<% if policy(ForumTopic).moderate? %>
|
||||||
<%= link_to "Private", forum_topics_path(search: { is_private: true }) %>,
|
<%= link_to "Private", forum_topics_path(search: { is_private: true }) %>,
|
||||||
|
|||||||
@@ -51,12 +51,12 @@
|
|||||||
|
|
||||||
<header id="top">
|
<header id="top">
|
||||||
<%= link_to Danbooru.config.app_name, root_path, id: "app-name-header", class: "heading" %>
|
<%= link_to Danbooru.config.app_name, root_path, id: "app-name-header", class: "heading" %>
|
||||||
|
|
||||||
<div id="maintoggle" class="mobile-only">
|
<div id="maintoggle" class="mobile-only">
|
||||||
<a href="#"><i id="maintoggle-on" class="fas fa-bars"></i></a>
|
<a href="#"><i id="maintoggle-on" class="fas fa-bars"></i></a>
|
||||||
<a href="#"><i id="maintoggle-off" class="fas fa-times" style="display: none;"></i></a>
|
<a href="#"><i id="maintoggle-off" class="fas fa-times" style="display: none;"></i></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav id="nav">
|
<nav id="nav">
|
||||||
<%= render "layouts/main_links" %>
|
<%= render "layouts/main_links" %>
|
||||||
<% if content_for(:secondary_links).present? %>
|
<% if content_for(:secondary_links).present? %>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<%= raw @results.map {|ip_addr, count| {ip_addr: ip_addr.to_s, count: count}}.to_json %>
|
<%= raw @results.map {|ip_addr, count| {ip_addr: ip_addr.to_s, count: count}}.to_json %>
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
<%= raw @results.map {|user, count| {user_id: user.id, count: count}}.to_json %>
|
<%= raw @results.map {|user, count| {user_id: user.id, count: count}}.to_json %>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<p>
|
<p>
|
||||||
As a general rule, you should only approve of posts that you personally like. Posts that are not approved in three days will be automatically deleted.
|
As a general rule, you should only approve of posts that you personally like. Posts that are not approved in three days will be automatically deleted.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>The <%= link_to_wikis(*Danbooru.config.modqueue_warning_tags) %> tags are highlighted in red.</p>
|
<p>The <%= link_to_wikis(*Danbooru.config.modqueue_warning_tags) %> tags are highlighted in red.</p>
|
||||||
|
|||||||
@@ -11,4 +11,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= render "notes/secondary_links" %>
|
<%= render "notes/secondary_links" %>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<% if (CurrentUser.can_approve_posts? || post.created_at < Danbooru.config.moderation_period.ago) && disapprovals.length > 0 %>
|
<% if (CurrentUser.can_approve_posts? || post.created_at < Danbooru.config.moderation_period.ago) && disapprovals.length > 0 %>
|
||||||
<p>
|
<p>
|
||||||
It has been reviewed by <%= pluralize disapprovals.length, "approver" %>.
|
It has been reviewed by <%= pluralize disapprovals.length, "approver" %>.
|
||||||
|
|
||||||
<% if disapprovals.map(&:reason).grep("breaks_rules").count > 0 %>
|
<% if disapprovals.map(&:reason).grep("breaks_rules").count > 0 %>
|
||||||
<%= disapprovals.map(&:reason).grep("breaks_rules").count %> believe it breaks the rules.
|
<%= disapprovals.map(&:reason).grep("breaks_rules").count %> believe it breaks the rules.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<section id="related-box">
|
<section id="related-box">
|
||||||
<h2>Related</h2>
|
<h2>Related</h2>
|
||||||
<ul id="related-list">
|
<ul id="related-list">
|
||||||
<% if discover_mode? %>
|
<% if discover_mode? %>
|
||||||
<li id="secondary-links-posts-hot"><%= link_to "Hot", posts_path(:tags => "order:rank") %></li>
|
<li id="secondary-links-posts-hot"><%= link_to "Hot", posts_path(:tags => "order:rank") %></li>
|
||||||
<li id="secondary-links-posts-popular"><%= link_to "Popular", popular_explore_posts_path %></li>
|
<li id="secondary-links-posts-popular"><%= link_to "Popular", popular_explore_posts_path %></li>
|
||||||
<li id="secondary-links-posts-curated"><%= link_to "Curated", curated_explore_posts_path %></li>
|
<li id="secondary-links-posts-curated"><%= link_to "Curated", curated_explore_posts_path %></li>
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
|
|
||||||
<%= render "related_tags/buttons" %>
|
<%= render "related_tags/buttons" %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<%= f.submit "Submit" %>
|
<%= f.submit "Submit" %>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -2,4 +2,4 @@
|
|||||||
<%= render "posts/partials/show/ugoira_webm", :post => post %>
|
<%= render "posts/partials/show/ugoira_webm", :post => post %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= render "posts/partials/show/ugoira_original", :post => post %>
|
<%= render "posts/partials/show/ugoira_original", :post => post %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -109,7 +109,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<%= link_to user.post_votes.count, post_votes_path(search: { user_name: user.name }) %> posts,
|
<%= link_to user.post_votes.count, post_votes_path(search: { user_name: user.name }) %> posts,
|
||||||
<%= link_to user.comment_votes.count, comment_votes_path(search: { user_name: user.name }) %> comments,
|
<%= link_to user.comment_votes.count, comment_votes_path(search: { user_name: user.name }) %> comments,
|
||||||
<%= link_to user.forum_post_votes.count, forum_post_votes_path(search: { creator_name: user.name }) %> forum posts
|
<%= link_to user.forum_post_votes.count, forum_post_votes_path(search: { creator_name: user.name }) %> forum posts
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -123,7 +123,7 @@
|
|||||||
<th>Post Changes</th>
|
<th>Post Changes</th>
|
||||||
<td>
|
<td>
|
||||||
<%= presenter.post_version_count(self) %>
|
<%= presenter.post_version_count(self) %>
|
||||||
<% if CurrentUser.id == user.id %>
|
<% if CurrentUser.id == user.id %>
|
||||||
(<%= link_to "refresh", new_maintenance_user_count_fixes_path %>)
|
(<%= link_to "refresh", new_maintenance_user_count_fixes_path %>)
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
@@ -190,7 +190,7 @@
|
|||||||
<th>Feedback</th>
|
<th>Feedback</th>
|
||||||
<td><%= presenter.feedbacks(self) %></td>
|
<td><%= presenter.feedbacks(self) %></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<% if policy(UserNameChangeRequest.new(user: user)).show? %>
|
<% if policy(UserNameChangeRequest.new(user: user)).show? %>
|
||||||
<% user.user_name_change_requests.visible(CurrentUser.user).tap do |changes| %>
|
<% user.user_name_change_requests.visible(CurrentUser.user).tap do |changes| %>
|
||||||
<% if changes.present? %>
|
<% if changes.present? %>
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
|
|
||||||
<%= edit_form_for @user do |f| %>
|
<%= edit_form_for @user do |f| %>
|
||||||
<h2 id="edit-options">
|
<h2 id="edit-options">
|
||||||
<%= link_to "Basic", "#basic-settings", :class => "active" %>
|
<%= link_to "Basic", "#basic-settings", :class => "active" %>
|
||||||
| <%= link_to "Advanced", "#advanced-settings" %>
|
| <%= link_to "Advanced", "#advanced-settings" %>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<fieldset id="basic-settings-section">
|
<fieldset id="basic-settings-section">
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
<%= f.input :theme, collection: User.themes.keys, include_blank: false, hint: "The site's colorscheme (light mode or dark mode)." %>
|
<%= f.input :theme, collection: User.themes.keys, include_blank: false, hint: "The site's colorscheme (light mode or dark mode)." %>
|
||||||
<%= f.input :enable_safe_mode, label: "Safe mode", hint: "Show only safe images. Hide questionable and explicit images.", as: :select, include_blank: false, collection: [["Yes", "true"], ["No", "false"]] %>
|
<%= f.input :enable_safe_mode, label: "Safe mode", hint: "Show only safe images. Hide questionable and explicit images.", as: :select, include_blank: false, collection: [["Yes", "true"], ["No", "false"]] %>
|
||||||
|
|
||||||
<%= f.input :per_page, label: "Posts per page", as: :select, hint: "Number of thumbnails per page", collection: (1..PostSets::Post::MAX_PER_PAGE), include_blank: false %>
|
<%= f.input :per_page, label: "Posts per page", as: :select, hint: "Number of thumbnails per page", collection: (1..PostSets::Post::MAX_PER_PAGE), include_blank: false %>
|
||||||
<%= f.input :default_image_size, hint: "Show full original images or resized #{Danbooru.config.large_image_width}px width samples.", label: "Default image width", collection: [["850px", "large"], ["original", "original"]], include_blank: false %>
|
<%= f.input :default_image_size, hint: "Show full original images or resized #{Danbooru.config.large_image_width}px width samples.", label: "Default image width", collection: [["850px", "large"], ["original", "original"]], include_blank: false %>
|
||||||
<%= f.input :receive_email_notifications, as: :select, include_blank: false, collection: [["Yes", "true"], ["No", "false"]], hint: "Receive an email when you receive a new dmail." %>
|
<%= f.input :receive_email_notifications, as: :select, include_blank: false, collection: [["Yes", "true"], ["No", "false"]], hint: "Receive an email when you receive a new dmail." %>
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
<%= f.input :comment_threshold, hint: "Comments below this score will be hidden by default" %>
|
<%= f.input :comment_threshold, hint: "Comments below this score will be hidden by default" %>
|
||||||
<%= f.input :blacklisted_tags, hint: "Posts with these tags will be hidden. Put each tag on a separate line. <a href='/wiki_pages/help:blacklists'>View help.</a>".html_safe, :input_html => {:size => "40x5", :data => {:autocomplete => "tag-query"}} %>
|
<%= f.input :blacklisted_tags, hint: "Posts with these tags will be hidden. Put each tag on a separate line. <a href='/wiki_pages/help:blacklists'>View help.</a>".html_safe, :input_html => {:size => "40x5", :data => {:autocomplete => "tag-query"}} %>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset id="advanced-settings-section">
|
<fieldset id="advanced-settings-section">
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<label>Account</label>
|
<label>Account</label>
|
||||||
|
|||||||
@@ -62,8 +62,8 @@ WITH constants AS (
|
|||||||
|
|
||||||
|
|
||||||
-- autovacuum stats
|
-- autovacuum stats
|
||||||
SELECT relname, last_vacuum, last_autovacuum, last_analyze, last_autoanalyze
|
SELECT relname, last_vacuum, last_autovacuum, last_analyze, last_autoanalyze
|
||||||
FROM pg_stat_all_tables
|
FROM pg_stat_all_tables
|
||||||
WHERE schemaname = 'public'
|
WHERE schemaname = 'public'
|
||||||
and relname = 'posts';
|
and relname = 'posts';
|
||||||
|
|
||||||
@@ -135,7 +135,7 @@ SELECT
|
|||||||
WHEN number_of_columns = 1 THEN 0
|
WHEN number_of_columns = 1 THEN 0
|
||||||
ELSE 1
|
ELSE 1
|
||||||
END) AS multi_column
|
END) AS multi_column
|
||||||
FROM pg_namespace
|
FROM pg_namespace
|
||||||
LEFT OUTER JOIN pg_class ON pg_namespace.oid = pg_class.relnamespace
|
LEFT OUTER JOIN pg_class ON pg_namespace.oid = pg_class.relnamespace
|
||||||
LEFT OUTER JOIN
|
LEFT OUTER JOIN
|
||||||
(SELECT indrelid,
|
(SELECT indrelid,
|
||||||
@@ -149,7 +149,7 @@ LEFT OUTER JOIN
|
|||||||
JOIN pg_class ipg ON ipg.oid = x.indexrelid )
|
JOIN pg_class ipg ON ipg.oid = x.indexrelid )
|
||||||
AS foo
|
AS foo
|
||||||
ON pg_class.relname = foo.ctablename
|
ON pg_class.relname = foo.ctablename
|
||||||
WHERE
|
WHERE
|
||||||
pg_namespace.nspname='public'
|
pg_namespace.nspname='public'
|
||||||
AND pg_class.relkind = 'r'
|
AND pg_class.relkind = 'r'
|
||||||
GROUP BY pg_class.relname, pg_class.reltuples, x.is_unique
|
GROUP BY pg_class.relname, pg_class.reltuples, x.is_unique
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ CREATE FUNCTION public.favorites_insert_trigger() RETURNS trigger
|
|||||||
begin
|
begin
|
||||||
if (NEW.user_id % 100 = 0) then
|
if (NEW.user_id % 100 = 0) then
|
||||||
insert into favorites_0 values (NEW.*);
|
insert into favorites_0 values (NEW.*);
|
||||||
|
|
||||||
elsif (NEW.user_id % 100 = 1) then
|
elsif (NEW.user_id % 100 = 1) then
|
||||||
insert into favorites_1 values (NEW.*);
|
insert into favorites_1 values (NEW.*);
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
local all postgres,danbooru trust
|
local all postgres,danbooru trust
|
||||||
host all postgres,danbooru 127.0.0.1/32 trust
|
host all postgres,danbooru 127.0.0.1/32 trust
|
||||||
|
|||||||
@@ -346,9 +346,9 @@ class BulkUpdateRequestTest < ActiveSupport::TestCase
|
|||||||
context "a script with extra whitespace" do
|
context "a script with extra whitespace" do
|
||||||
should "validate" do
|
should "validate" do
|
||||||
@script = %{
|
@script = %{
|
||||||
create alias aaa -> 000
|
create alias aaa -> 000
|
||||||
|
|
||||||
create alias bbb -> 111
|
create alias bbb -> 111
|
||||||
}
|
}
|
||||||
|
|
||||||
@bur = create(:bulk_update_request, script: @script)
|
@bur = create(:bulk_update_request, script: @script)
|
||||||
|
|||||||
@@ -335,17 +335,17 @@ module Sources
|
|||||||
|
|
||||||
[b]blah[/b] [i]blah[/i] [u]blah[/u] [s]blah[/s]
|
[b]blah[/b] [i]blah[/i] [u]blah[/u] [s]blah[/s]
|
||||||
herp derp
|
herp derp
|
||||||
|
|
||||||
[quote]this is a quote[/quote]
|
[quote]this is a quote[/quote]
|
||||||
|
|
||||||
* one
|
* one
|
||||||
* two
|
* two
|
||||||
* three
|
* three
|
||||||
|
|
||||||
* one
|
* one
|
||||||
* two
|
* two
|
||||||
* three
|
* three
|
||||||
|
|
||||||
"Heart":[https://e.deviantart.net/emoticons/h/heart.gif]
|
"Heart":[https://e.deviantart.net/emoticons/h/heart.gif]
|
||||||
EOS
|
EOS
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
module Sources
|
module Sources
|
||||||
class NicoSeigaTest < ActiveSupport::TestCase
|
class NicoSeigaTest < ActiveSupport::TestCase
|
||||||
|
|||||||
Reference in New Issue
Block a user