bump rubocop and apply autofixes for new cops

pull/11478/head
ulferts 2 years ago
parent e66c727954
commit 4a94e03b04
No known key found for this signature in database
GPG Key ID: A205708DE1284017
  1. 4
      Gemfile.lock
  2. 8
      app/mailers/interceptors/default_headers.rb
  3. 6
      app/mailers/interceptors/do_not_send_mails_without_recipient.rb
  4. 8
      app/models/custom_actions/actions/serializer.rb
  5. 2
      app/models/repository/subversion.rb
  6. 8
      app/models/serializers/indifferent_hash_serializer.rb
  7. 10
      app/services/authorization.rb
  8. 6
      app/services/work_packages/shared/days.rb
  9. 6
      db/migrate/migration_utils/permission_adder.rb
  10. 4
      db/migrate/tables/base.rb
  11. 12
      lib/api/utilities/payload_representer.rb
  12. 16
      lib/api/utilities/query_filters_name_converter.rb
  13. 2
      lib/api/utilities/resource_link_parser.rb
  14. 16
      lib/api/utilities/wp_property_name_converter.rb
  15. 14
      lib/api/v3/principals/principal_representer_factory.rb
  16. 6
      lib/api/v3/principals/principal_type.rb
  17. 18
      lib/api/v3/utilities/date_time_formatter.rb
  18. 6
      lib/constraints/enterprise.rb
  19. 8
      lib/instance_finder.rb
  20. 6
      lib/open_project/custom_styles/color_themes.rb
  21. 14
      lib/open_project/custom_styles/design.rb
  22. 6
      lib/open_project/logging/thread_pool_context_builder.rb
  23. 12
      lib/open_project/plugins/module_handler.rb
  24. 28
      lib/open_project/text_formatting/renderer.rb
  25. 6
      lib/redmine/about.rb
  26. 14
      lib/tasks/parallel_testing.rake
  27. 6
      modules/auth_saml/lib/open_project/auth_saml/inspector.rb
  28. 16
      modules/bim/lib/api/bim/utilities/path_helper.rb
  29. 2
      spec/controllers/application_controller_spec.rb
  30. 8
      spec/features/notifications/reminder_mail_spec.rb
  31. 8
      spec/features/notifications/settings/immediate_reminder_spec.rb
  32. 2
      spec/features/wiki/wiki_unicode_spec.rb
  33. 6
      spec/lib/api/v3/work_packages/eager_loading/eager_loading_mock_wrapper.rb
  34. 18
      spec/lib/custom_field_form_builder_spec.rb
  35. 2
      spec/lib/open_project/text_formatting/markdown/embedded_table_macro_spec.rb
  36. 2
      spec/lib/redmine/unified_diff_spec.rb
  37. 8
      spec/support/parallel_helper.rb
  38. 6
      spec/support/selenium_hub_waiter.rb

@ -849,14 +849,14 @@ GEM
rspec-retry (0.6.2)
rspec-core (> 3.3)
rspec-support (3.11.1)
rubocop (1.36.0)
rubocop (1.37.0)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.1.2.1)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.20.1, < 2.0)
rubocop-ast (>= 1.22.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.22.0)

@ -1,10 +1,12 @@
module Interceptors
class DefaultHeaders
def self.delivering_email(mail)
module DefaultHeaders
module_function
def delivering_email(mail)
mail.headers(default_headers)
end
def self.default_headers
def default_headers
{
'X-Mailer' => 'OpenProject',
'X-OpenProject-Host' => Setting.host_name,

@ -1,6 +1,8 @@
module Interceptors
class DoNotSendMailsWithoutRecipient
def self.delivering_email(mail)
module DoNotSendMailsWithoutRecipient
module_function
def delivering_email(mail)
receivers = [mail.to, mail.cc, mail.bcc]
# the above fields might be empty arrays (if entries have been removed
# by another interceptor) or nil, therefore checking for blank?

@ -26,8 +26,10 @@
# See COPYRIGHT and LICENSE files for more details.
#++
class CustomActions::Actions::Serializer
def self.load(value)
module CustomActions::Actions::Serializer
module_function
def load(value)
return [] unless value
YAML
@ -47,7 +49,7 @@ class CustomActions::Actions::Serializer
end.compact
end
def self.dump(actions)
def dump(actions)
YAML::dump(actions.map { |a| [a.key, a.values.map(&:to_s)] })
end
end

@ -87,7 +87,7 @@ class Repository::Subversion < Repository
# Returns a path relative to the url of the repository
def relative_path(path)
path.gsub(Regexp.new("^\/?#{Regexp.escape(relative_url)}\/"), '')
path.gsub(Regexp.new("^/?#{Regexp.escape(relative_url)}/"), '')
end
def fetch_changesets

@ -26,12 +26,14 @@
# See COPYRIGHT and LICENSE files for more details.
#++
module Serializers
class IndifferentHashSerializer
def self.dump(hash)
module IndifferentHashSerializer
module_function
def dump(hash)
hash
end
def self.load(value)
def load(value)
hash = value.is_a?(Hash) ? value : {}
hash.with_indifferent_access
end

@ -26,19 +26,21 @@
# See COPYRIGHT and LICENSE files for more details.
#++
class Authorization
module Authorization
module_function
# Returns all users having a certain permission within a project
def self.users(action, project)
def users(action, project)
Authorization::UserAllowedQuery.query(action, project)
end
# Returns all projects a user has a certain permission in
def self.projects(action, user)
def projects(action, user)
Authorization::ProjectQuery.query(user, action)
end
# Returns all roles a user has in a certain project or globally
def self.roles(user, project = nil)
def roles(user, project = nil)
if project
Authorization::UserProjectRolesQuery.query(user, project)
else

@ -28,9 +28,11 @@
module WorkPackages
module Shared
class Days
module Days
module_function
# Returns the right day computation instance for the given instance.
def self.for(work_package)
def for(work_package)
work_package.ignore_non_working_days ? AllDays.new : WorkingDays.new
end
end

@ -28,8 +28,10 @@
module Migration
module MigrationUtils
class PermissionAdder
def self.add(having, add)
module PermissionAdder
module_function
def add(having, add)
Role
.joins(:role_permissions)
.where(role_permissions: { permission: having.to_s })

@ -41,8 +41,8 @@ class Tables::Base
{ id: :integer }
end
def self.create_table(migration, &block)
migration.create_table table_name, **id_options.merge(bulk: true), &block
def self.create_table(migration, &)
migration.create_table table_name, **id_options.merge(bulk: true), &
end
def self.table(_migration)

@ -62,8 +62,10 @@ module API
end
end
class UnwritablePropertyFilter
def self.call(input, options)
module UnwritablePropertyFilter
module_function
def call(input, options)
writable_attr = options[:decorator].writable_attributes
as = options[:binding][:as].()
@ -75,8 +77,10 @@ module API
end
end
class LinkRenderBlock
def self.call(input, options)
module LinkRenderBlock
module_function
def call(input, options)
writable_attr = options[:decorator].writable_attributes
input.reject do |link|

@ -31,15 +31,15 @@ require 'api/utilities/query_filters_name_converter_context'
module API
module Utilities
class QueryFiltersNameConverter
class << self
def to_ar_name(attribute, refer_to_ids: false)
conversion_wp = ::API::Utilities::QueryFiltersNameConverterContext.new
module QueryFiltersNameConverter
module_function
::API::Utilities::PropertyNameConverter.to_ar_name(attribute,
context: conversion_wp,
refer_to_ids:)
end
def to_ar_name(attribute, refer_to_ids: false)
conversion_wp = ::API::Utilities::QueryFiltersNameConverterContext.new
::API::Utilities::PropertyNameConverter.to_ar_name(attribute,
context: conversion_wp,
refer_to_ids:)
end
end
end

@ -33,7 +33,7 @@ module API
# http://tools.ietf.org/html/rfc3986#section-3.3
SEGMENT_CHARACTER = '(\w|[-~!$&\'\(\)*+\.,:;=@]|%[0-9A-Fa-f]{2})'.freeze
RESOURCE_REGEX =
"/api/v(?<version>\\d)/(?<namespace>[\\w\/]+)/(?<id>#{SEGMENT_CHARACTER}+)\\z".freeze
"/api/v(?<version>\\d)/(?<namespace>[\\w/]+)/(?<id>#{SEGMENT_CHARACTER}+)\\z".freeze
class << self
def parse(resource_link)

@ -31,15 +31,15 @@ require 'api/utilities/property_name_converter_work_package_dummy'
module API
module Utilities
class WpPropertyNameConverter
class << self
def to_ar_name(attribute, refer_to_ids: false)
conversion_wp = ::API::Utilities::PropertyNameConverterWorkPackageDummy.new
module WpPropertyNameConverter
module_function
::API::Utilities::PropertyNameConverter.to_ar_name(attribute,
context: conversion_wp,
refer_to_ids:)
end
def to_ar_name(attribute, refer_to_ids: false)
conversion_wp = ::API::Utilities::PropertyNameConverterWorkPackageDummy.new
::API::Utilities::PropertyNameConverter.to_ar_name(attribute,
context: conversion_wp,
refer_to_ids:)
end
end
end

@ -29,16 +29,18 @@
module API
module V3
module Principals
class PrincipalRepresenterFactory
module PrincipalRepresenterFactory
module_function
##
# Create the appropriate subclass representer
# for each principal entity
def self.create(model, **args)
def create(model, **args)
representer_class(model)
.create(model, **args)
end
def self.representer_class(model)
def representer_class(model)
case model
when User
::API::V3::Users::UserRepresenter
@ -51,7 +53,7 @@ module API
end
end
def self.create_link_lambda(name, getter: "#{name}_id")
def create_link_lambda(name, getter: "#{name}_id")
->(*) {
v3_path = API::V3::Principals::PrincipalType.for(represented.send(name))
@ -63,7 +65,7 @@ module API
}
end
def self.create_setter_lambda(name, property_name: name, namespaces: %i(groups users placeholder_users))
def create_setter_lambda(name, property_name: name, namespaces: %i(groups users placeholder_users))
->(fragment:, **) {
::API::Decorators::LinkObject
.new(represented,
@ -75,7 +77,7 @@ module API
}
end
def self.create_getter_lambda(name)
def create_getter_lambda(name)
->(*) {
next unless embed_links

@ -29,11 +29,13 @@
module API
module V3
module Principals
class PrincipalType
module PrincipalType
module_function
##
# Return the appropriate API level type
# that depend on the AR type of the principal passed in.
def self.for(principal)
def for(principal)
case principal
when User
:user

@ -29,14 +29,16 @@
module API
module V3
module Utilities
class DateTimeFormatter
def self.format_date(date, allow_nil: false)
module DateTimeFormatter
module_function
def format_date(date, allow_nil: false)
return nil if date.nil? && allow_nil
date.to_date.iso8601
end
def self.parse_date(value, property_name, allow_nil: false)
def parse_date(value, property_name, allow_nil: false)
return nil if value.nil? && allow_nil
begin
@ -60,7 +62,7 @@ module API
date_only
end
def self.parse_datetime(value, property_name, allow_nil: false)
def parse_datetime(value, property_name, allow_nil: false)
return nil if value.nil? && allow_nil
begin
@ -74,19 +76,19 @@ module API
date_and_time
end
def self.format_datetime(datetime, allow_nil: false)
def format_datetime(datetime, allow_nil: false)
return nil if datetime.nil? && allow_nil
datetime.to_datetime.utc.iso8601
end
def self.format_duration_from_hours(hours, allow_nil: false)
def format_duration_from_hours(hours, allow_nil: false)
return nil if hours.nil? && allow_nil
Duration.new(seconds: hours * 3600).iso8601
end
def self.parse_duration_to_hours(duration, property_name, allow_nil: false)
def parse_duration_to_hours(duration, property_name, allow_nil: false)
return nil if duration.nil? && allow_nil
begin
@ -99,7 +101,7 @@ module API
end
end
def self.parse_duration_to_days(duration, property_name, allow_nil: false)
def parse_duration_to_days(duration, property_name, allow_nil: false)
return nil if duration.nil? && allow_nil
parse_duration_to_hours(duration, property_name).to_i / 24

@ -26,8 +26,10 @@
# See COPYRIGHT and LICENSE files for more details.
#++
class Enterprise
def self.matches?(_request)
module Enterprise
module_function
def matches?(_request)
OpenProject::Configuration.ee_manager_visible?
end
end

@ -26,14 +26,16 @@
# See COPYRIGHT and LICENSE files for more details.
#++
class InstanceFinder
def self.register(model, method)
module InstanceFinder
module_function
def register(model, method)
@model_method_map ||= {}
@model_method_map[model] = method
end
def self.find(model, identifier)
def find(model, identifier)
if @model_method_map[model].nil?
raise "#{model} is not registered with InstanceFinder"
end

@ -27,7 +27,9 @@
#++
module OpenProject::CustomStyles
class ColorThemes
module ColorThemes
module_function
OpenProject::CustomStyles::ColorThemes::DEFAULT_THEME_NAME = 'OpenProject'.freeze
THEMES = [
@ -97,7 +99,7 @@ module OpenProject::CustomStyles
}
].freeze
def self.themes
def themes
THEMES
end
end

@ -27,31 +27,33 @@
#++
module OpenProject::CustomStyles
class Design
module Design
module_function
##
# Returns the name of the color scheme.
# To be overridden by a plugin
def self.name
def name
'OpenProject Theme'
end
def self.identifier
def identifier
:core_design
end
def self.overridden?
def overridden?
identifier == :core_design
end
##
# Path the favicon
def self.favicon_asset_path
def favicon_asset_path
'favicon.ico'.freeze
end
##
# Returns the keys of variables that are customizable through the design
def self.customizable_variables
def customizable_variables
%w( primary-color
primary-color-dark
alternative-color

@ -1,10 +1,12 @@
module OpenProject
module Logging
class ThreadPoolContextBuilder
module ThreadPoolContextBuilder
module_function
##
# Build an object informing about current Rails connection pool
# and active thread usage and their traces
def self.build!
def build!
thread_info = {}
Thread.list.each_with_index do |t, i|
thread_info[i] = {

@ -27,14 +27,14 @@
#++project_module
module OpenProject::Plugins
class ModuleHandler
module ModuleHandler
module_function
@@disabled_modules = []
class << self
def disable_modules!(module_names)
@@disabled_modules += Array(module_names).map(&:to_sym).each do |module_name|
OpenProject::AccessControl.remove_modules_permissions(module_name)
end
def disable_modules!(module_names)
@@disabled_modules += Array(module_names).map(&:to_sym).each do |module_name|
OpenProject::AccessControl.remove_modules_permissions(module_name)
end
end
end

@ -27,22 +27,22 @@
#++
module OpenProject::TextFormatting
class Renderer
class << self
def format_text(text, options = {})
return '' if text.blank?
module Renderer
module_function
formatter(plain: options.delete(:plain))
.new(options)
.to_html(text)
end
def format_text(text, options = {})
return '' if text.blank?
formatter(plain: options.delete(:plain))
.new(options)
.to_html(text)
end
def formatter(plain: false)
if plain
OpenProject::TextFormatting::Formats.plain_formatter
else
OpenProject::TextFormatting::Formats.rich_formatter
end
def formatter(plain: false)
if plain
OpenProject::TextFormatting::Formats.plain_formatter
else
OpenProject::TextFormatting::Formats.rich_formatter
end
end
end

@ -27,8 +27,10 @@
#++
module Redmine
class About
def self.print_plugin_info
module About
module_function
def print_plugin_info
plugins = Redmine::Plugin.registered_plugins
if !plugins.empty?

@ -45,8 +45,10 @@ def check_for_pending_migrations
end
namespace :parallel do
class ParallelParser
def self.with_args(args, allow_seed = true)
module ParallelParser
module_function
def with_args(args, allow_seed = true)
options = {}
parseable_args = args[2..-1]
if parseable_args
@ -128,7 +130,7 @@ namespace :parallel do
desc 'Run plugin unit specs in parallel'
task units: [:environment] do
pattern = "--pattern 'spec/(?!features\/)'"
pattern = "--pattern 'spec/(?!features/)'"
ParallelParser.with_args(ARGV) do |options|
ARGV.each { |a| task(a.to_sym) {} }
@ -139,7 +141,7 @@ namespace :parallel do
desc 'Run plugin feature specs in parallel'
task features: [:environment] do
pattern = "--pattern 'spec\/features'"
pattern = "--pattern 'spec/features'"
ParallelParser.with_args(ARGV) do |options|
ARGV.each { |a| task(a.to_sym) {} }
@ -160,7 +162,7 @@ namespace :parallel do
desc 'Run feature specs in parallel'
task features: [:environment] do
pattern = "--pattern 'spec\/features\/'"
pattern = "--pattern 'spec/features/'"
ParallelParser.with_args(ARGV) do |options|
ARGV.each { |a| task(a.to_sym) {} }
@ -171,7 +173,7 @@ namespace :parallel do
desc 'Run unit specs in parallel'
task units: [:environment] do
pattern = "--pattern 'spec/(?!features\/)'"
pattern = "--pattern 'spec/(?!features/)'"
ParallelParser.with_args(ARGV) do |options|
ARGV.each { |a| task(a.to_sym) {} }

@ -1,7 +1,9 @@
module OpenProject
module AuthSaml
class Inspector
def self.inspect_response(auth_hash)
module Inspector
module_function
def inspect_response(auth_hash)
response = auth_hash.dig(:extra, :response_object)
if response
code = response.status_code ? "(CODE #{response.status_code})" : nil

@ -33,34 +33,36 @@ module API
include API::Utilities::UrlHelper
# rubocop:disable Naming/ClassAndModuleCamelCase
class BCF2_1Path
module BCF2_1Path
module_function
# rubocop:enable Naming/ClassAndModuleCamelCase
extend API::Utilities::UrlHelper
# Determining the root_path on every url we want to render is
# expensive. As the root_path will not change within a
# request, we can cache the first response on each request.
def self.root_path
def root_path
RequestStore.store[:cached_root_path] ||= super
end
def self.root
def root
"#{root_path}api/bcf/2.1/"
end
def self.project(identifier)
def project(identifier)
"#{root}projects/#{identifier}"
end
def self.topics(project_identifier)
def topics(project_identifier)
"#{project(project_identifier)}/topics"
end
def self.topic(project_identifier, uuid)
def topic(project_identifier, uuid)
"#{topics(project_identifier)}/#{uuid}"
end
def self.viewpoint(project_identifier, topic_uuid, viewpoint_topic)
def viewpoint(project_identifier, topic_uuid, viewpoint_topic)
"#{topic(project_identifier, topic_uuid)}/viewpoints/#{viewpoint_topic}"
end
end

@ -41,7 +41,7 @@ describe ApplicationController, type: :controller do
describe 'logging requesting users' do
let(:user_message) do
"OpenProject User: #{user.firstname} Crazy! Name with \#\# " +
"OpenProject User: #{user.firstname} Crazy! Name with ## " +
"Newline (#{user.login} ID: #{user.id} <#{user.mail}>)"
end

@ -67,10 +67,10 @@ describe "Reminder email sending", type: :feature, js: true do
# Perform some actions the user listens to
User.execute_as other_user do
note = <<~NOTE
Hey <mention class=\"mention\"
data-id=\"#{current_user.id}\"
data-type=\"user\"
data-text=\"@#{current_user.name}\">
Hey <mention class="mention"
data-id="#{current_user.id}"
data-type="user"
data-text="@#{current_user.name}">
@#{current_user.name}
</mention>
NOTE

@ -78,10 +78,10 @@ describe "Immediate reminder settings", type: :feature, js: true do
it 'sends a mail to the mentioned user immediately' do
perform_enqueued_jobs do
note = <<~NOTE
Hey <mention class=\"mention\"
data-id=\"#{receiver.id}\"
data-type=\"user\"
data-text=\"@#{receiver.name}\">
Hey <mention class="mention"
data-id="#{receiver.id}"
data-type="user"
data-text="@#{receiver.name}">
@#{receiver.name}
</mention>
NOTE

@ -102,7 +102,7 @@ describe 'Wiki unicode title spec', type: :feature, js: true do
target_link = all('div.wiki-content a.wiki-page')[i]
expect(target_link.text).to eq(title)
expect(target_link[:href]).to match("\/wiki\/#{expected_slugs[i]}")
expect(target_link[:href]).to match("/wiki/#{expected_slugs[i]}")
target_link.click
expect(page).to have_selector('.title-container h2', text: title)

@ -26,8 +26,10 @@
# See COPYRIGHT and LICENSE files for more details.
#++
class EagerLoadingMockWrapper
def self.wrap(klass, work_packages)
module EagerLoadingMockWrapper
module_function
def wrap(klass, work_packages)
klass_module = klass.module
delegator_class = Class.new(SimpleDelegator) do

@ -205,8 +205,8 @@ describe CustomFieldFormBuilder do
id="user#{custom_field.id}"
name="user[#{custom_field.id}]"
no_label="true"><option
value=\"\" label=\" \"></option>
<option value=\"#{custom_option.id}\">my_option</option></select>
value="" label=" "></option>
<option value="#{custom_option.id}">my_option</option></select>
}).at_path('select')
end
@ -220,9 +220,9 @@ describe CustomFieldFormBuilder do
<select class="custom-class form--select"
id="user#{custom_field.id}"
name="user[#{custom_field.id}]"
no_label="true"><option value=\"\">---
no_label="true"><option value="">---
Please select ---</option>
<option value=\"#{custom_option.id}\">my_option</option></select>
<option value="#{custom_option.id}">my_option</option></select>
}).at_path('select')
end
end
@ -239,7 +239,7 @@ describe CustomFieldFormBuilder do
id="user#{custom_field.id}"
name="user[#{custom_field.id}]"
no_label="true"><option
value=\"#{custom_option.id}\">my_option</option></select>
value="#{custom_option.id}">my_option</option></select>
}).at_path('select')
end
end
@ -274,7 +274,7 @@ describe CustomFieldFormBuilder do
id="user#{custom_field.id}"
name="user[#{custom_field.id}]"
no_label="true">
<option value=\"\" label=\" \"></option>
<option value="" label=" "></option>
<option value="#{user1.id}">#{user1.name}</option>
<option value="#{user2.id}">#{user2.name}</option>
</select>
@ -292,7 +292,7 @@ describe CustomFieldFormBuilder do
id="user#{custom_field.id}"
name="user[#{custom_field.id}]"
no_label="true">
<option value=\"\">--- Please select ---</option>
<option value="">--- Please select ---</option>
<option value="#{user1.id}">#{user1.name}</option>
<option value="#{user2.id}">#{user2.name}</option>
</select>
@ -329,7 +329,7 @@ describe CustomFieldFormBuilder do
id="user#{custom_field.id}"
name="user[#{custom_field.id}]"
no_label="true">
<option value=\"\" label=\" \"></option>
<option value="" label=" "></option>
<option value="#{version1.id}">#{version1.name}</option>
<option value="#{version2.id}">#{version2.name}</option>
</select>
@ -347,7 +347,7 @@ describe CustomFieldFormBuilder do
id="user#{custom_field.id}"
name="user[#{custom_field.id}]"
no_label="true">
<option value=\"\">--- Please select ---</option>
<option value="">--- Please select ---</option>
<option value="#{version1.id}">#{version1.name}</option>
<option value="#{version2.id}">#{version2.name}</option>
</select>

@ -37,7 +37,7 @@ describe OpenProject::TextFormatting,
let(:raw) do
<<~RAW
<macro class="embedded-table op-uc-placeholder"
data-query-props="{&quot;columns[]&quot;:[&quot;id&quot;,&quot;subject&quot;,&quot;type&quot;,&quot;status&quot;,&quot;assignee&quot;,&quot;updatedAt&quot;],&quot;showSums&quot;:false,&quot;timelineVisible&quot;:false,&quot;highlightingMode&quot;:&quot;inline&quot;,&quot;highlightedAttributes[]&quot;:[&quot;/api/v3/queries/columns/status&quot;,&quot;/api/v3/queries/columns/priority&quot;,&quot;/api/v3/queries/columns/dueDate&quot;],&quot;showHierarchies&quot;:true,&quot;groupBy&quot;:&quot;&quot;,&quot;filters&quot;:&quot;[{\&quot;status\&quot;:{\&quot;operator\&quot;:\&quot;o\&quot;,\&quot;values\&quot;:[]}}]&quot;,&quot;sortBy&quot;:&quot;[[\&quot;id\&quot;,\&quot;asc\&quot;]]&quot;}">
data-query-props="{&quot;columns[]&quot;:[&quot;id&quot;,&quot;subject&quot;,&quot;type&quot;,&quot;status&quot;,&quot;assignee&quot;,&quot;updatedAt&quot;],&quot;showSums&quot;:false,&quot;timelineVisible&quot;:false,&quot;highlightingMode&quot;:&quot;inline&quot;,&quot;highlightedAttributes[]&quot;:[&quot;/api/v3/queries/columns/status&quot;,&quot;/api/v3/queries/columns/priority&quot;,&quot;/api/v3/queries/columns/dueDate&quot;],&quot;showHierarchies&quot;:true,&quot;groupBy&quot;:&quot;&quot;,&quot;filters&quot;:&quot;[{&quot;status&quot;:{&quot;operator&quot;:&quot;o&quot;,&quot;values&quot;:[]}}]&quot;,&quot;sortBy&quot;:&quot;[[&quot;id&quot;,&quot;asc&quot;]]&quot;}">
</macro>
RAW
end

@ -145,7 +145,7 @@ describe Redmine::UnifiedDiff do
+ @truncated = false
diff_table = DiffTable.new(diff_type)
diff.each do |line|
if line =~ /^(---|\+\+\+) (.*)$/
if line =~ /^(---|+++) (.*)$/
@@ -28,10 +31,17 @@
diff_table = DiffTable.new(diff_type)
end

@ -1,9 +1,11 @@
class ParallelHelper
def self.port_for_ldap
module ParallelHelper
module_function
def port_for_ldap
ENV.fetch('TEST_ENV_NUMBER', '1').to_i + 12389
end
def self.port_for_app
def port_for_app
ENV.fetch('TEST_ENV_NUMBER', '1').to_i + 3000
end
end

@ -1,7 +1,9 @@
class SeleniumHubWaiter
module SeleniumHubWaiter
module_function
# frontend not fast enough to bind click handlers on buttons?
# only happens when using the Selenium Hub
def self.wait
def wait
sleep 1 if ENV.fetch("SELENIUM_GRID_URL", "").present?
end
end

Loading…
Cancel
Save