Remove unloadable from lib code

Signed-off-by: Alex Coles <alex@alexbcoles.com>
pull/3210/head
Alex Coles 9 years ago
parent fea5478893
commit 3abb8c7fa4
  1. 2
      lib/open_project/journal_formatter/attachment.rb
  2. 2
      lib/open_project/journal_formatter/custom_field.rb
  3. 2
      lib/open_project/journal_formatter/diff.rb
  4. 2
      lib/open_project/wiki_formatting/macros/timelines_wiki_macro.rb
  5. 2
      lib/pagination/controller.rb
  6. 2
      lib/plugins/acts_as_journalized/lib/acts/journalized/journal_object_cache.rb
  7. 1
      lib/plugins/acts_as_journalized/lib/journal_deprecated.rb
  8. 1
      lib/plugins/acts_as_journalized/lib/journal_formatter.rb
  9. 2
      lib/plugins/acts_as_journalized/lib/journal_formatter/attribute.rb
  10. 2
      lib/plugins/acts_as_journalized/lib/journal_formatter/base.rb
  11. 2
      lib/plugins/acts_as_journalized/lib/journal_formatter/datetime.rb
  12. 2
      lib/plugins/acts_as_journalized/lib/journal_formatter/decimal.rb
  13. 2
      lib/plugins/acts_as_journalized/lib/journal_formatter/fraction.rb
  14. 2
      lib/plugins/acts_as_journalized/lib/journal_formatter/id.rb
  15. 2
      lib/plugins/acts_as_journalized/lib/journal_formatter/named_association.rb
  16. 2
      lib/plugins/acts_as_journalized/lib/journal_formatter/plaintext.rb
  17. 2
      lib/plugins/acts_as_journalized/lib/journal_formatter/proc.rb

@ -27,8 +27,6 @@
#++
class OpenProject::JournalFormatter::Attachment < ::JournalFormatter::Base
# unloadable
include ApplicationHelper
include OpenProject::StaticRouting::UrlHelpers

@ -27,8 +27,6 @@
#++
class OpenProject::JournalFormatter::CustomField < ::JournalFormatter::Base
# unloadable
include CustomFieldsHelper
private

@ -29,8 +29,6 @@
require_dependency 'journal_formatter/base'
class OpenProject::JournalFormatter::Diff < JournalFormatter::Base
# unloadable
def render(key, values, options = {})
merge_options = { only_path: true,
no_html: false }.merge(options)

@ -30,8 +30,6 @@ module OpenProject
module WikiFormatting
module Macros
class TimelinesWikiMacro
unloadable
def apply(_content, args, options = {})
timeline = Timeline.find_by(id: args[0])

@ -228,8 +228,6 @@ module Pagination::Controller
def self.extended(base)
base.instance_eval do
unloadable
def paginate_models(*args)
args.each do |arg|
paginate_model(arg)

@ -29,8 +29,6 @@
module Acts
module Journalized
class JournalObjectCache
# unloadable
def fetch(klass, id, &_block)
@cache ||= Hash.new do |klass_hash, klass_key|
klass_hash[klass_key] = Hash.new do |id_hash, id_key|

@ -50,7 +50,6 @@
# It provides the hooks to apply different formatting to the details
# of a specific journal.
module JournalDeprecated
# unloadable
# Old timestamps. created_at is what t.timestamps creates in recent Rails journals
def created_on
created_at

@ -51,7 +51,6 @@
# of a specific journal.
module JournalFormatter
# unloadable
mattr_accessor :formatters, :registered_fields
def self.register(hash)

@ -27,8 +27,6 @@
#++
class JournalFormatter::Attribute < JournalFormatter::Base
# unloadable
private
def format_details(key, values)

@ -27,8 +27,6 @@
#++
class JournalFormatter::Base
# unloadable
include Redmine::I18n
include ActionView::Helpers::TagHelper
include ActionView::Helpers::UrlHelper

@ -27,8 +27,6 @@
#++
class JournalFormatter::Datetime < JournalFormatter::Attribute
# unloadable
def format_values(values)
values.map do |v|
v.nil? ?

@ -27,8 +27,6 @@
#++
class JournalFormatter::Decimal < JournalFormatter::Attribute
# unloadable
def format_values(values)
values.map { |v| v.to_i.to_s }
end

@ -27,8 +27,6 @@
#++
class JournalFormatter::Fraction < JournalFormatter::Attribute
# unloadable
def format_values(values)
values.map do |v|
v.nil? ?

@ -27,8 +27,6 @@
#++
class JournalFormatter::Id < JournalFormatter::Attribute
# unloadable
def format_values(values)
values.map { |v| "##{v}" }
end

@ -27,8 +27,6 @@
#++
class JournalFormatter::NamedAssociation < JournalFormatter::Attribute
# unloadable
def render(key, values, options = { no_html: false })
label, old_value, value = format_details(key, values, options)

@ -27,8 +27,6 @@
#++
class JournalFormatter::Plaintext < JournalFormatter::Attribute
# unloadable
def format_values(values)
values.map { |v| v.try(:to_s) }
end

@ -27,8 +27,6 @@
#++
class JournalFormatter::Proc < JournalFormatter::Attribute
# unloadable
class << self
attr_accessor :proc
end

Loading…
Cancel
Save