Skip to content

Commit

Permalink
Import bugs.ruby-lang.org configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Jan 31, 2020
1 parent 7a0c668 commit 1adaf5e
Show file tree
Hide file tree
Showing 20 changed files with 834 additions and 8 deletions.
8 changes: 1 addition & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@
/.loadpath
/.powrc
/.rvmrc
/.ruby-version
/config/additional_environment.rb
/config/configuration.yml
/config/database.yml
/config/email.yml
/config/secrets.yml
/config/initializers/session_store.rb
/config/initializers/secret_token.rb
/coverage
/db/*.db
/db/*.sqlite3
Expand Down Expand Up @@ -43,6 +39,4 @@
*.rbc

/.bundle
/Gemfile.lock
/Gemfile.local

/.env
18 changes: 18 additions & 0 deletions Gemfile.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
ruby ENV['CUSTOM_RUBY_VERSION'] || '~> 2.6.5'

gem 'puma'
gem 'pg'
gem 'rack-protection'
gem 'sidekiq'
gem 'hiredis'

group :development do
gem 'pry-rails'
gem 'dotenv-rails'
end

group :production do
gem 'newrelic_rpm'
gem 'airbrake'
gem 'sqreen'
end
263 changes: 263 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,263 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (5.2.4.1)
actionpack (= 5.2.4.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.4.1)
actionpack (= 5.2.4.1)
actionview (= 5.2.4.1)
activejob (= 5.2.4.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.4.1)
actionview (= 5.2.4.1)
activesupport (= 5.2.4.1)
rack (~> 2.0, >= 2.0.8)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionpack-xml_parser (2.0.1)
actionpack (>= 5.0)
railties (>= 5.0)
actionview (5.2.4.1)
activesupport (= 5.2.4.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.2.4.1)
activesupport (= 5.2.4.1)
globalid (>= 0.3.6)
activemodel (5.2.4.1)
activesupport (= 5.2.4.1)
activerecord (5.2.4.1)
activemodel (= 5.2.4.1)
activesupport (= 5.2.4.1)
arel (>= 9.0)
activestorage (5.2.4.1)
actionpack (= 5.2.4.1)
activerecord (= 5.2.4.1)
marcel (~> 0.3.1)
activesupport (5.2.4.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
airbrake (10.0.0)
airbrake-ruby (~> 4.12)
airbrake-ruby (4.12.0)
rbtree3 (~> 0.5)
arel (9.0.0)
aws-eventstream (1.0.3)
aws-partitions (1.266.0)
aws-sdk-core (3.89.1)
aws-eventstream (~> 1.0, >= 1.0.2)
aws-partitions (~> 1, >= 1.239.0)
aws-sigv4 (~> 1.1)
jmespath (~> 1.0)
aws-sdk-kms (1.27.0)
aws-sdk-core (~> 3, >= 3.71.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.60.1)
aws-sdk-core (~> 3, >= 3.83.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.1.0)
aws-eventstream (~> 1.0, >= 1.0.2)
builder (3.2.4)
capybara (2.18.0)
addressable
mini_mime (>= 0.1.3)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (>= 2.0, < 4.0)
childprocess (3.0.0)
coderay (1.1.2)
concurrent-ruby (1.1.5)
connection_pool (2.2.2)
crass (1.0.6)
css_parser (1.7.1)
addressable
docile (1.1.5)
dotenv (2.7.5)
dotenv-rails (2.7.5)
dotenv (= 2.7.5)
railties (>= 3.2, < 6.1)
erubi (1.9.0)
globalid (0.4.2)
activesupport (>= 4.2.0)
hiredis (0.6.3)
htmlentities (4.3.4)
i18n (0.7.0)
jmespath (1.4.0)
json (2.3.0)
libsqreen (0.3.0.0.3)
liquid (2.6.3)
loofah (2.4.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (0.3.3)
mimemagic (~> 0.3.2)
method_source (0.9.2)
mimemagic (0.3.3)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.14.0)
mocha (1.11.2)
net-ldap (0.16.2)
newrelic_rpm (6.8.0.360)
nio4r (2.5.2)
nokogiri (1.10.7)
mini_portile2 (~> 2.4.0)
pg (1.2.2)
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
pry-rails (0.3.9)
pry (>= 0.10.4)
public_suffix (4.0.3)
puma (4.3.1)
nio4r (~> 2.0)
rack (2.1.1)
rack-openid (1.4.2)
rack (>= 1.1.0)
ruby-openid (>= 2.1.8)
rack-protection (2.0.8.1)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.4.1)
actioncable (= 5.2.4.1)
actionmailer (= 5.2.4.1)
actionpack (= 5.2.4.1)
actionview (= 5.2.4.1)
activejob (= 5.2.4.1)
activemodel (= 5.2.4.1)
activerecord (= 5.2.4.1)
activestorage (= 5.2.4.1)
activesupport (= 5.2.4.1)
bundler (>= 1.3.0)
railties (= 5.2.4.1)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
railties (5.2.4.1)
actionpack (= 5.2.4.1)
activesupport (= 5.2.4.1)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rake (13.0.1)
rbpdf (1.19.8)
htmlentities
rbpdf-font (~> 1.19.0)
rbpdf-font (1.19.1)
rbtree3 (0.5.0)
redcarpet (3.4.0)
redis (4.1.3)
redmine_crm (0.0.52)
liquid (< 2.6.4)
rails
request_store (1.0.5)
rmagick (2.16.0)
roadie (3.5.1)
css_parser (~> 1.4)
nokogiri (~> 1.8)
roadie-rails (1.3.0)
railties (>= 3.0, < 5.3)
roadie (~> 3.1)
rouge (3.3.0)
ruby-openid (2.9.2)
rubyzip (2.0.0)
selenium-webdriver (3.142.7)
childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2)
sidekiq (6.0.4)
connection_pool (>= 2.2.2)
rack (>= 2.0.0)
rack-protection (>= 2.0.0)
redis (>= 4.1.0)
simplecov (0.14.1)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sq_mini_racer (0.2.5.0.1.beta2)
sqreen (1.18.3)
libsqreen (~> 0.3.0.0)
sq_mini_racer (~> 0.2.4.sqreen2)
thor (1.0.1)
thread_safe (0.3.6)
tzinfo (1.2.6)
thread_safe (~> 0.1)
websocket-driver (0.7.1)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.4)
xpath (3.2.0)
nokogiri (~> 1.8)
yard (0.9.24)

PLATFORMS
ruby

DEPENDENCIES
actionpack-xml_parser
airbrake
aws-sdk-s3
bundler (>= 1.5.0)
capybara (~> 2.13)
dotenv-rails
hiredis
i18n (~> 0.7.0)
mail (~> 2.7.1)
mimemagic
mini_mime (~> 1.0.1)
mocha (>= 1.4.0)
net-ldap (~> 0.16.0)
newrelic_rpm
nokogiri (~> 1.10.0)
pg
pry-rails
puma
rack-openid
rack-protection
rails (= 5.2.4.1)
rails-dom-testing
rbpdf (~> 1.19.6)
redcarpet (~> 3.4.0)
redmine_crm
request_store (= 1.0.5)
rmagick (~> 2.16.0)
roadie-rails (~> 1.3.0)
rouge (~> 3.3.0)
ruby-openid (~> 2.9.2)
selenium-webdriver
sidekiq
simplecov (~> 0.14.1)
sprockets (~> 3.7.2)
sqreen
tzinfo-data
yard

RUBY VERSION
ruby 2.6.5p114

BUNDLED WITH
2.1.4
3 changes: 3 additions & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
release: bundle exec rake db:migrate redmine:plugins:migrate RAILS_ENV=production
web: bundle exec puma -C config/puma.rb
worker: bundle exec sidekiq -C config/sidekiq.yml
15 changes: 15 additions & 0 deletions app/controllers/repositories_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class RepositoriesController < ApplicationController
before_action :find_changeset, :only => [:revision, :add_related_issue, :remove_related_issue]
before_action :authorize
accept_rss_auth :revisions
accept_api_auth :add_related_issue, :remove_related_issue

rescue_from Redmine::Scm::Adapters::CommandFailed, :with => :show_error_command_failed

Expand Down Expand Up @@ -218,11 +219,25 @@ def add_related_issue
issue_id = params[:issue_id].to_s.sub(/^#/,'')
@issue = @changeset.find_referenced_issue_by_id(issue_id)
if @issue && (!@issue.visible? || @changeset.issues.include?(@issue))
issue = @issue
@issue = nil
end

if @issue
@changeset.issues << @issue
else
end

respond_to do |format|
format.js
format.json do
status =
@issue ? 201 :
!issue.visible? ? 403 :
issue ? 409 : # @changeset.issues.include?(issue)
404
render :plain => %[{"status":#{status}}'], :status => status
end
end
end

Expand Down
2 changes: 1 addition & 1 deletion app/models/issue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Issue < ActiveRecord::Base
:preload => [:project, :status, :tracker],
:scope => lambda {|options| options[:open_issues] ? self.open : self.all}

acts_as_event :title => Proc.new {|o| "#{o.tracker.name} ##{o.id} (#{o.status}): #{o.subject}"},
acts_as_event :title => Proc.new {|o| "#{o.tracker&.name} ##{o.id} (#{o.status}): #{o.subject}"},
:url => Proc.new {|o| {:controller => 'issues', :action => 'show', :id => o.id}},
:type => Proc.new {|o| 'issue' + (o.closed? ? '-closed' : '') }

Expand Down
5 changes: 5 additions & 0 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ class User < Principal
:order => %w(login id),
:setting_order => 8
},
:login_with_fl => {
:string => '#{login} (#{firstname} #{lastname})',
:order => %w(login id),
:setting_order => 9
},
}

MAIL_NOTIFICATION_OPTIONS = [
Expand Down
1 change: 1 addition & 0 deletions app/views/layouts/base.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="description" content="<%= Redmine::Info.app_name %>" />
<meta name="keywords" content="issue,bug,tracker" />
<meta name="robots" content="nofollow">
<%= csrf_meta_tag %>
<%= favicon %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.11.0', 'tribute-3.7.3', 'application', 'responsive', :media => 'all' %>
Expand Down
4 changes: 4 additions & 0 deletions config.ru
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# This file is used by Rack-based servers to start the application.

require ::File.expand_path('../config/environment', __FILE__)

use Rack::Protection::HttpOrigin
use Rack::Protection::FrameOptions

run Rails.application
15 changes: 15 additions & 0 deletions config/additional_environment.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copy this file to additional_environment.rb and add any statements
# that need to be passed to the Rails::Initializer. `config` is
# available in this context.
#
# Example:
#
# config.log_level = :debug
# ...
#

if Rails.env.production?
config.log_level = :info
config.force_ssl = true
config.active_job.queue_adapter = :sidekiq
end
Loading

0 comments on commit 1adaf5e

Please sign in to comment.