From 6fe26e3e468ae0b79e2e05b4d4dd608cd9bbcd94 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Tue, 31 Mar 2015 17:49:19 +0100 Subject: Removed help link from sidebar --- app/views/layouts/nav/_dashboard.html.haml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/views/layouts/nav/_dashboard.html.haml b/app/views/layouts/nav/_dashboard.html.haml index e4f630c6a18..511c0694b8a 100644 --- a/app/views/layouts/nav/_dashboard.html.haml +++ b/app/views/layouts/nav/_dashboard.html.haml @@ -31,8 +31,3 @@ %span Merge Requests %span.count= current_user.assigned_merge_requests.opened.count - = nav_link(controller: :help) do - = link_to help_path, title: 'Help' do - %i.fa.fa-question-circle - %span - Help -- cgit v1.2.1 From 2a06bec3a3b3f43ca9abd96c285b880fb113d530 Mon Sep 17 00:00:00 2001 From: Igor Kostenko Date: Tue, 7 Apr 2015 16:49:15 +0100 Subject: gitlab 7.9.2 --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index f0a8b9f53df..bb25bb677ca 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -11,7 +11,7 @@ RUN apt-get update -q \ # If the Omnibus package version below is outdated please contribute a merge request to update it. # If you run GitLab Enterprise Edition point it to a location where you have downloaded it. RUN TMP_FILE=$(mktemp); \ - wget -q -O $TMP_FILE https://downloads-packages.s3.amazonaws.com/ubuntu-14.04/gitlab_7.9.1-omnibus.1-1_amd64.deb \ + wget -q -O $TMP_FILE https://downloads-packages.s3.amazonaws.com/ubuntu-14.04/gitlab_7.9.2-omnibus-1_amd64.deb \ && dpkg -i $TMP_FILE \ && rm -f $TMP_FILE -- cgit v1.2.1 From 8e9fbd847d8ad44edd7346428276b055c765e252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20Rosen=C3=B6gger?= <123haynes@gmail.com> Date: Mon, 13 Apr 2015 12:32:04 +0200 Subject: Revert "Merge branch 'fix_email_images' into 'master'" This reverts commit d66148ef393f1748c669c934eec4e928d92ef36a, reversing changes made to cdb64a81a8ca96961033b8ab06d5191ef5449634. This change needed to be reverted, because not enough email clients support inline images. --- app/helpers/emails_helper.rb | 25 ------- app/views/notify/_note_message.html.haml | 2 +- app/views/notify/new_issue_email.html.haml | 2 +- app/views/notify/new_merge_request_email.html.haml | 2 +- spec/mailers/notify_spec.rb | 82 +--------------------- 5 files changed, 6 insertions(+), 107 deletions(-) diff --git a/app/helpers/emails_helper.rb b/app/helpers/emails_helper.rb index 6c253213c3b..0df3ecc90b7 100644 --- a/app/helpers/emails_helper.rb +++ b/app/helpers/emails_helper.rb @@ -1,6 +1,3 @@ -require 'html/pipeline' -require 'html/pipeline/gitlab' - module EmailsHelper # Google Actions @@ -38,26 +35,4 @@ module EmailsHelper lexer = Rugments::Lexers::Diff.new raw formatter.format(lexer.lex(diffcontent)) end - - def replace_image_links_with_base64(text, project) - # Used pipelines in GitLab: - # GitlabEmailImageFilter - replaces images that have been uploaded as attachments with inline images in emails. - # - # see https://gitlab.com/gitlab-org/html-pipeline-gitlab for more filters - filters = [ - HTML::Pipeline::Gitlab::GitlabEmailImageFilter - ] - - context = { - base_url: File.join(Gitlab.config.gitlab.url, project.path_with_namespace, 'uploads'), - upload_path: File.join(Rails.root, 'public', 'uploads', project.path_with_namespace), - } - - pipeline = HTML::Pipeline::Gitlab.new(filters).pipeline - - result = pipeline.call(text, context) - text = result[:output].to_html(save_with: 0) - - text.html_safe - end end diff --git a/app/views/notify/_note_message.html.haml b/app/views/notify/_note_message.html.haml index e796353cec4..3fd4b04ac84 100644 --- a/app/views/notify/_note_message.html.haml +++ b/app/views/notify/_note_message.html.haml @@ -1,2 +1,2 @@ %div - = replace_image_links_with_base64(markdown(@note.note, reference_only_path: false), @note.project) + = markdown(@note.note, reference_only_path: false) diff --git a/app/views/notify/new_issue_email.html.haml b/app/views/notify/new_issue_email.html.haml index d4d413b5b44..53a068be52e 100644 --- a/app/views/notify/new_issue_email.html.haml +++ b/app/views/notify/new_issue_email.html.haml @@ -1,5 +1,5 @@ -if @issue.description - = replace_image_links_with_base64(markdown(@issue.description, reference_only_path: false), @issue.project) + = markdown(@issue.description, reference_only_path: false) - if @issue.assignee_id.present? %p diff --git a/app/views/notify/new_merge_request_email.html.haml b/app/views/notify/new_merge_request_email.html.haml index 60e33227e01..5b7dd117c16 100644 --- a/app/views/notify/new_merge_request_email.html.haml +++ b/app/views/notify/new_merge_request_email.html.haml @@ -6,4 +6,4 @@ Assignee: #{@merge_request.author_name} → #{@merge_request.assignee_name} -if @merge_request.description - = replace_image_links_with_base64(markdown(@merge_request.description, reference_only_path: false), @merge_request.project) + = markdown(@merge_request.description, reference_only_path: false) diff --git a/spec/mailers/notify_spec.rb b/spec/mailers/notify_spec.rb index 7c4235ab379..6bea0321cb9 100644 --- a/spec/mailers/notify_spec.rb +++ b/spec/mailers/notify_spec.rb @@ -191,13 +191,6 @@ describe Notify do context 'for issues' do let(:issue) { create(:issue, author: current_user, assignee: assignee, project: project) } let(:issue_with_description) { create(:issue, author: current_user, assignee: assignee, project: project, description: Faker::Lorem.sentence) } - let(:issue_with_image) do - create(:issue, - author: current_user, - assignee: assignee, - project: project, - description: "![test](#{Gitlab.config.gitlab.url}/#{project.path_with_namespace}/uploads/12345/test.jpg)") - end describe 'that are new' do subject { Notify.new_issue_email(issue.assignee_id, issue.id) } @@ -222,22 +215,6 @@ describe Notify do end end - describe 'that contain images' do - let(:png) { File.read("#{Rails.root}/spec/fixtures/dk.png") } - let(:png_encoded) { Base64::encode64(png) } - - before :each do - file_path = File.join(Rails.root, 'public', 'uploads', issue_with_image.project.path_with_namespace, '12345/test.jpg') - allow(File).to receive(:file?).with(file_path).and_return(true) - allow(File).to receive(:read).with(file_path).and_return(png) - end - - subject { Notify.new_issue_email(issue_with_image.assignee_id, issue_with_image.id) } - it 'replaces attached images with inline images' do - is_expected.to have_body_text URI.encode(png_encoded) - end - end - describe 'that have been reassigned' do subject { Notify.reassigned_issue_email(recipient.id, issue.id, previous_assignee.id, current_user) } @@ -302,14 +279,6 @@ describe Notify do let(:merge_author) { create(:user) } let(:merge_request) { create(:merge_request, author: current_user, assignee: assignee, source_project: project, target_project: project) } let(:merge_request_with_description) { create(:merge_request, author: current_user, assignee: assignee, source_project: project, target_project: project, description: Faker::Lorem.sentence) } - let(:merge_request_with_image) do - create(:merge_request, - author: current_user, - assignee: assignee, - source_project: project, - target_project: project, - description: "![test](#{Gitlab.config.gitlab.url}/#{project.path_with_namespace}/uploads/12345/test.jpg)") - end describe 'that are new' do subject { Notify.new_merge_request_email(merge_request.assignee_id, merge_request.id) } @@ -346,22 +315,6 @@ describe Notify do end end - describe 'that are new and contain contain images in the description' do - let(:png) {File.read("#{Rails.root}/spec/fixtures/dk.png")} - let(:png_encoded) { Base64::encode64(png) } - - before :each do - file_path = File.join(Rails.root, 'public', 'uploads', merge_request_with_image.project.path_with_namespace, '/12345/test.jpg') - allow(File).to receive(:file?).with(file_path).and_return(true) - allow(File).to receive(:read).with(file_path).and_return(png) - end - - subject { Notify.new_merge_request_email(merge_request_with_image.assignee_id, merge_request_with_image.id) } - it 'replaces attached images with inline images' do - is_expected.to have_body_text URI.encode(png_encoded) - end - end - describe 'that are reassigned' do subject { Notify.reassigned_merge_request_email(recipient.id, merge_request.id, previous_assignee.id, current_user.id) } @@ -470,12 +423,9 @@ describe Notify do describe 'project access changed' do let(:project) { create(:project) } let(:user) { create(:user) } - let(:project_member) do - create(:project_member, - project: project, - user: user) - end - + let(:project_member) { create(:project_member, + project: project, + user: user) } subject { Notify.project_access_granted_email(project_member.id) } it_behaves_like 'an email sent from GitLab' @@ -515,32 +465,6 @@ describe Notify do end end - describe 'on a commit that contains an image' do - let(:commit) { project.repository.commit } - let(:note_with_image) do - create(:note, - project: project, - author: note_author, - note: "![test](#{Gitlab.config.gitlab.url}/#{project.path_with_namespace}/uploads/12345/test.jpg)") - end - - let(:png) {File.read("#{Rails.root}/spec/fixtures/dk.png")} - let(:png_encoded) { Base64::encode64(png) } - - before :each do - file_path = File.join(Rails.root, 'public', 'uploads', note_with_image.project.path_with_namespace, '12345/test.jpg') - allow(File).to receive(:file?).with(file_path).and_return(true) - allow(File).to receive(:read).with(file_path).and_return(png) - allow(Note).to receive(:find).with(note_with_image.id).and_return(note_with_image) - allow(note_with_image).to receive(:noteable).and_return(commit) - end - - subject { Notify.note_commit_email(recipient.id, note_with_image.id) } - it 'replaces attached images with inline images' do - is_expected.to have_body_text URI.encode(png_encoded) - end - end - describe 'on a commit' do let(:commit) { project.repository.commit } -- cgit v1.2.1 From 1265dccb6b8eaa0b51b1368e92655328514df1d5 Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Mon, 13 Apr 2015 20:01:43 +0200 Subject: Fix wrong merged changelog entries --- CHANGELOG | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index eab4ff4e6ad..9982a32f28b 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -73,16 +73,15 @@ v 7.10.0 (unreleased) - Fix git over ssh errors 'fatal: protocol error: bad line length character' - Automatically setup GitLab CI project for forks if origin project has GitLab CI enabled - Bust group page project list cache when namespace name or path changes. - -v 7.9.3 - - Contains no changes - Add icons to Add dropdown items. - Allow admin to create public deploy keys that are accessible to any project. - Warn when gitlab-shell version doesn't match requirement. - Skip email confirmation when set by admin or via LDAP. - - Only allow users to reference groups, projects, issues, MRs, commits they have access to. +v 7.9.3 + - Contains no changes + v 7.9.2 - Contains no changes -- cgit v1.2.1 From 5fa7be3ab40de4cb411bf47e1afd417023e54bc9 Mon Sep 17 00:00:00 2001 From: Robert Schilling Date: Mon, 13 Apr 2015 20:35:50 +0200 Subject: Remove superseeded changelog entry for commit calendar --- CHANGELOG | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 9982a32f28b..fa88ce3d8a1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -19,7 +19,6 @@ v 7.10.0 (unreleased) - Disable reference creation for comments surrounded by code/preformatted blocks (Stan Hu) - Reduce Rack Attack false positives causing 403 errors during HTTP authentication (Stan Hu) - enable line wrapping per default and remove the checkbox to toggle it (Hannes Rosenögger) - - extend the commit calendar to show the actual commits made on a date (Hannes Rosenögger) - Fix a link in the patch update guide - Add a service to support external wikis (Hannes Rosenögger) - Omit the "email patches" link and fix plain diff view for merge commits -- cgit v1.2.1 From 57c2a9f03d9896d6b9358b8530f2e70f15cbdad3 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Wed, 8 Apr 2015 13:31:36 +0200 Subject: Explicitly set image alt to prevent graphical glitches Rails image_tag sets the alt-attribute to the filename which causes graphical glitches if the file could not be loaded. Fixes https://github.com/gitlabhq/gitlabhq/issues/6036. Signed-off-by: Sven Strickroth --- CHANGELOG | 1 + app/views/groups/group_members/_group_member.html.haml | 2 +- app/views/groups/milestones/_issue.html.haml | 2 +- app/views/groups/milestones/_merge_request.html.haml | 2 +- app/views/projects/milestones/_issue.html.haml | 2 +- app/views/projects/milestones/_merge_request.html.haml | 2 +- app/views/projects/notes/_note.html.haml | 4 ++-- app/views/projects/project_members/_project_member.html.haml | 2 +- app/views/snippets/show.html.haml | 2 +- 9 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index d176ee3fa6f..f25e65265e2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -63,6 +63,7 @@ v 7.10.0 (unreleased) - Fixed link paths for HTTP and SSH on the admin project view (Jeremy Maziarz) - Fix and improve help rendering (Sullivan Sénéchal) - Fix final line in EmailsOnPush email diff being rendered as error. + - Explicitly set image alt-attribute to prevent graphical glitches if gravatars could not be loaded - Add icons to Add dropdown items. diff --git a/app/views/groups/group_members/_group_member.html.haml b/app/views/groups/group_members/_group_member.html.haml index 30e5faf822e..2462c952090 100644 --- a/app/views/groups/group_members/_group_member.html.haml +++ b/app/views/groups/group_members/_group_member.html.haml @@ -4,7 +4,7 @@ %li{class: "#{dom_class(member)} js-toggle-container", id: dom_id(member)} %span{class: ("list-item-name" if show_controls)} - = image_tag avatar_icon(user.email, 16), class: "avatar s16" + = image_tag avatar_icon(user.email, 16), class: "avatar s16", alt: '' %strong= user.name %span.cgray= user.username - if user == current_user diff --git a/app/views/groups/milestones/_issue.html.haml b/app/views/groups/milestones/_issue.html.haml index 27d0c62df8c..09f9b4b8969 100644 --- a/app/views/groups/milestones/_issue.html.haml +++ b/app/views/groups/milestones/_issue.html.haml @@ -7,4 +7,4 @@ = link_to_gfm issue.title, [project.namespace.becomes(Namespace), project, issue], title: issue.title .pull-right.assignee-icon - if issue.assignee - = image_tag avatar_icon(issue.assignee.email, 16), class: "avatar s16" + = image_tag avatar_icon(issue.assignee.email, 16), class: "avatar s16", alt: '' diff --git a/app/views/groups/milestones/_merge_request.html.haml b/app/views/groups/milestones/_merge_request.html.haml index b2d2097dfab..d0d1426762b 100644 --- a/app/views/groups/milestones/_merge_request.html.haml +++ b/app/views/groups/milestones/_merge_request.html.haml @@ -7,4 +7,4 @@ = link_to_gfm merge_request.title, [project.namespace.becomes(Namespace), project, merge_request], title: merge_request.title .pull-right.assignee-icon - if merge_request.assignee - = image_tag avatar_icon(merge_request.assignee.email, 16), class: "avatar s16" + = image_tag avatar_icon(merge_request.assignee.email, 16), class: "avatar s16", alt: '' diff --git a/app/views/projects/milestones/_issue.html.haml b/app/views/projects/milestones/_issue.html.haml index 26c83841a22..9f164d44f26 100644 --- a/app/views/projects/milestones/_issue.html.haml +++ b/app/views/projects/milestones/_issue.html.haml @@ -5,5 +5,5 @@ = link_to_gfm issue.title, [@project.namespace.becomes(Namespace), @project, issue], title: issue.title .pull-right.assignee-icon - if issue.assignee - = image_tag avatar_icon(issue.assignee.email, 16), class: "avatar s16" + = image_tag avatar_icon(issue.assignee.email, 16), class: "avatar s16", alt: '' diff --git a/app/views/projects/milestones/_merge_request.html.haml b/app/views/projects/milestones/_merge_request.html.haml index 42fbd0cd2ca..0d7a118569a 100644 --- a/app/views/projects/milestones/_merge_request.html.haml +++ b/app/views/projects/milestones/_merge_request.html.haml @@ -5,4 +5,4 @@ = link_to_gfm merge_request.title, [@project.namespace.becomes(Namespace), @project, merge_request], title: merge_request.title .pull-right.assignee-icon - if merge_request.assignee - = image_tag avatar_icon(merge_request.assignee.email, 16), class: "avatar s16" + = image_tag avatar_icon(merge_request.assignee.email, 16), class: "avatar s16", alt: '' diff --git a/app/views/projects/notes/_note.html.haml b/app/views/projects/notes/_note.html.haml index 71bdf5c8f2a..0728f8fa42b 100644 --- a/app/views/projects/notes/_note.html.haml +++ b/app/views/projects/notes/_note.html.haml @@ -5,7 +5,7 @@ %span.fa.fa-circle - else = link_to user_path(note.author) do - = image_tag avatar_icon(note.author_email), class: "avatar s40" + = image_tag avatar_icon(note.author_email), class: "avatar s40", alt: '' .timeline-content .note-header .note-actions @@ -23,7 +23,7 @@ Remove - if note.system = link_to user_path(note.author) do - = image_tag avatar_icon(note.author_email), class: "avatar s16" + = image_tag avatar_icon(note.author_email), class: "avatar s16", alt: '' = link_to_member(@project, note.author, avatar: false) %span.author-username = '@' + note.author.username diff --git a/app/views/projects/project_members/_project_member.html.haml b/app/views/projects/project_members/_project_member.html.haml index a07d0762334..4f053977215 100644 --- a/app/views/projects/project_members/_project_member.html.haml +++ b/app/views/projects/project_members/_project_member.html.haml @@ -3,7 +3,7 @@ %li{class: "#{dom_class(member)} js-toggle-container project_member_row access-#{member.human_access.downcase}", id: dom_id(member)} %span.list-item-name - = image_tag avatar_icon(user.email, 16), class: "avatar s16" + = image_tag avatar_icon(user.email, 16), class: "avatar s16", alt: '' %strong= user.name %span.cgray= user.username - if user == current_user diff --git a/app/views/snippets/show.html.haml b/app/views/snippets/show.html.haml index 55a990c94ed..5204fb9a907 100644 --- a/app/views/snippets/show.html.haml +++ b/app/views/snippets/show.html.haml @@ -17,7 +17,7 @@ %span.light by = link_to user_snippets_path(@snippet.author) do - = image_tag avatar_icon(@snippet.author_email), class: "avatar avatar-inline s16" + = image_tag avatar_icon(@snippet.author_email), class: "avatar avatar-inline s16", alt: '' = @snippet.author_name .back-link -- cgit v1.2.1 From a9306613f6502611d6f1eae268e82ed53943fa6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20Rosen=C3=B6gger?= <123haynes@gmail.com> Date: Mon, 13 Apr 2015 22:09:44 +0200 Subject: The help link has been removed. The commit removes the test for it. --- features/dashboard/active_tab.feature | 6 ------ features/steps/dashboard/active_tab.rb | 9 --------- features/steps/shared/paths.rb | 4 ---- 3 files changed, 19 deletions(-) delete mode 100644 features/steps/dashboard/active_tab.rb diff --git a/features/dashboard/active_tab.feature b/features/dashboard/active_tab.feature index 08b87808f33..803f9b33838 100644 --- a/features/dashboard/active_tab.feature +++ b/features/dashboard/active_tab.feature @@ -1,5 +1,4 @@ @dashboard -Feature: Dashboard Active Tab Background: Given I sign in as a user @@ -17,8 +16,3 @@ Feature: Dashboard Active Tab Given I visit dashboard merge requests page Then the active main tab should be Merge Requests And no other main tabs should be active - - Scenario: On Dashboard Help - Given I visit dashboard help page - Then the active main tab should be Help - And no other main tabs should be active diff --git a/features/steps/dashboard/active_tab.rb b/features/steps/dashboard/active_tab.rb deleted file mode 100644 index 0e2c04fb299..00000000000 --- a/features/steps/dashboard/active_tab.rb +++ /dev/null @@ -1,9 +0,0 @@ -class Spinach::Features::DashboardActiveTab < Spinach::FeatureSteps - include SharedAuthentication - include SharedPaths - include SharedActiveTab - - step 'the active main tab should be Help' do - ensure_active_main_tab('Help') - end -end diff --git a/features/steps/shared/paths.rb b/features/steps/shared/paths.rb index e3cf1b92cda..8ce17b94142 100644 --- a/features/steps/shared/paths.rb +++ b/features/steps/shared/paths.rb @@ -83,10 +83,6 @@ module SharedPaths visit search_path end - step 'I visit dashboard help page' do - visit help_path - end - step 'I visit dashboard groups page' do visit dashboard_groups_path end -- cgit v1.2.1 From a62dbd11cb14e6e96e89cc7e9f944072a0e9ed1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20Rosen=C3=B6gger?= <123haynes@gmail.com> Date: Mon, 13 Apr 2015 23:19:04 +0200 Subject: fix failing test --- features/dashboard/active_tab.feature | 1 + features/steps/dashboard/active_tab.rb | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 features/steps/dashboard/active_tab.rb diff --git a/features/dashboard/active_tab.feature b/features/dashboard/active_tab.feature index 803f9b33838..c17dfd07063 100644 --- a/features/dashboard/active_tab.feature +++ b/features/dashboard/active_tab.feature @@ -1,4 +1,5 @@ @dashboard +Feature: Dashboard Active Tab Background: Given I sign in as a user diff --git a/features/steps/dashboard/active_tab.rb b/features/steps/dashboard/active_tab.rb new file mode 100644 index 00000000000..19ff77b9fe6 --- /dev/null +++ b/features/steps/dashboard/active_tab.rb @@ -0,0 +1,6 @@ +class Spinach::Features::DashboardActiveTab < Spinach::FeatureSteps + include SharedAuthentication + include SharedPaths + include SharedActiveTab + +end -- cgit v1.2.1 From fb1cd0a842a71903bf54e32aed84ed43254be552 Mon Sep 17 00:00:00 2001 From: Ben Bodenmiller Date: Tue, 14 Apr 2015 00:15:34 -0700 Subject: fix stuck MR fixes #348. related to 6487419364fa9c179e24028d85b2be10d574067f. --- CHANGELOG | 1 + app/models/merge_request.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index eab4ff4e6ad..d079c04406c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -73,6 +73,7 @@ v 7.10.0 (unreleased) - Fix git over ssh errors 'fatal: protocol error: bad line length character' - Automatically setup GitLab CI project for forks if origin project has GitLab CI enabled - Bust group page project list cache when namespace name or path changes. + - Fix stuck Merge Request merging events from old installations (Ben Bodenmiller) v 7.9.3 - Contains no changes diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 35cb920d8bc..92026356b62 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -361,6 +361,6 @@ class MergeRequest < ActiveRecord::Base end def locked_long_ago? - locked_at && locked_at < (Time.now - 1.day) + locked_at.nil? || locked_at < (Time.now - 1.day) end end -- cgit v1.2.1