Skip to content

Commit

Permalink
Remove deprecated methods for versions < 4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bricesanchez committed Sep 20, 2017
1 parent eb8aef2 commit 124e560
Show file tree
Hide file tree
Showing 11 changed files with 1 addition and 90 deletions.
19 changes: 0 additions & 19 deletions core/app/helpers/refinery/menu_helper.rb

This file was deleted.

1 change: 0 additions & 1 deletion core/lib/refinery/crud.rb
Expand Up @@ -49,7 +49,6 @@ module ClassMethods

def crudify(model_name, options = {})
options = ::Refinery::Crud.default_options(model_name).merge(options)
Refinery.deprecate :xhr_paging, when: '3.1' if options[:xhr_paging]
class_name = options[:class_name]
singular_name = options[:singular_name]
plural_name = options[:plural_name]
Expand Down
9 changes: 0 additions & 9 deletions core/lib/refinery/plugin.rb
Expand Up @@ -29,15 +29,6 @@ def description
::I18n.translate(['refinery', 'plugins', name, 'description'].join('.'))
end

# Stores information that can be used to retrieve the latest activities of this plugin
def activity=(_)
Refinery.deprecate('Refinery::Plugin#activity=', when: '3.1')
end

def dashboard=(_)
Refinery.deprecate('Refinery::Plugin#dashboard=', when: '3.1')
end

# Used to highlight the current tab in the admin interface
def highlighted?(params)
!!(params[:controller].try(:gsub, "admin/", "") =~ menu_match)
Expand Down
8 changes: 0 additions & 8 deletions pages/app/helpers/refinery/admin/pages_helper.rb
Expand Up @@ -54,14 +54,6 @@ def page_meta_information(page)

meta_information
end

# We show the title from the next available locale
# if there is no title for the current locale
def page_title_with_translations(page)
Refinery.deprecate('page_title_with_translations', when: '3.1', replacement: 'translated_field')
page.title.presence || page.translations.detect { |t| t.title.present?}.title
end

end
end
end
5 changes: 0 additions & 5 deletions pages/app/models/refinery/page.rb
Expand Up @@ -326,11 +326,6 @@ def part_with_slug(part_slug)
end
end

def part_with_title(part_title)
Refinery.deprecate("Refinery::Page#part_with_title", when: "3.1", replacement: "part_with_slug")
part_with_slug(part_title.to_s.parameterize.underscore)
end

# Protects generated slugs from title if they are in the list of reserved words
# This applies mostly to plugin-generated pages.
# This only kicks in when Refinery::Pages.marketable_urls is enabled.
Expand Down
5 changes: 0 additions & 5 deletions pages/app/models/refinery/page_part.rb
Expand Up @@ -30,11 +30,6 @@ def slug_matches?(other_slug)
)
end

def title_matches?(other_title)
Refinery.deprecate("Refinery::PagePart#title_matches?", when: "3.1", replacement: "slug_matches?")
slug_matches?(other_title.to_s.parameterize.underscore)
end

protected

def normalise_text_fields
Expand Down
5 changes: 0 additions & 5 deletions pages/app/presenters/refinery/pages/menu_presenter.rb
Expand Up @@ -77,11 +77,6 @@ def descendant_item_selected?(item)
item.has_children? && item.descendants.any?(&method(:selected_item?))
end

def selected_item_or_descendant_item_selected?(item)
Refinery.deprecate('Refinery::Pages::MenuPresenter#selected_item_or_descendant_item_selected?', when: '3.1')
selected_item?(item) || descendant_item_selected?(item)
end

# Determine whether the supplied item is the currently open item according to Refinery.
def selected_item?(item)
# Ensure we match the path without the locale, if present.
Expand Down
16 changes: 1 addition & 15 deletions pages/lib/refinery/pages/configuration.rb
Expand Up @@ -39,22 +39,8 @@ def whitelist_attributes
def layout_template_whitelist
Array(config.layout_template_whitelist).map(&:to_s)
end

def default_parts
if config.default_parts.all? { |v| v.is_a? String }
new_syntax = config.default_parts.map do |part|
{ title: part, slug: part.downcase.gsub(" ", "_") }
end
Refinery.deprecate(
"Change Refinery::Pages.default_parts= from #{config.default_parts.inspect} to #{new_syntax.inspect}",
when: "3.2.0"
)
new_syntax
else
config.default_parts
end
end
end

self.use_layout_templates = false
self.page_title = {
:chain_page_title => false,
Expand Down
8 changes: 0 additions & 8 deletions resources/lib/refinery/resources/configuration.rb
Expand Up @@ -22,14 +22,6 @@ module Resources
# We have to configure these settings after Rails is available.
# But a non-nil custom option can still be provided
class << self
def dragonfly_url_format
if config.dragonfly_url_format.include?(':format')
config.dragonfly_url_format.gsub!(':format', ':ext')
Refinery.deprecate(':format option in Refinery::Resources dragonfly_url_format config', when: '3.1', replacement: ':ext option')
end
config.dragonfly_url_format
end

def datastore_root_path
config.datastore_root_path || (Rails.root.join('public', 'system', 'refinery', 'resources').to_s if Rails.root)
end
Expand Down
10 changes: 0 additions & 10 deletions testing/lib/refinery/testing/controller_macros/authentication.rb
Expand Up @@ -3,16 +3,6 @@ module Testing
module ControllerMacros
module Authentication

def refinery_login_with(*roles)
Refinery.deprecate('refinery_login_with', when: '3.1', replacement: 'refinery_login')
refinery_login
end

def refinery_login_with_factory(factory)
Refinery.deprecate('refinery_login_with_factory', when: '3.1', replacement: 'refinery_login')
refinery_login
end

def refinery_login
let(:logged_in_user) { Refinery::Core::NilUser.new }
end
Expand Down
5 changes: 0 additions & 5 deletions testing/lib/refinery/testing/feature_macros/authentication.rb
Expand Up @@ -7,11 +7,6 @@ def refinery_login
# NO-OP, Overwrite this in an extension.
end

def refinery_login_with(factory)
Refinery.deprecate('refinery_login_with', when: '3.1', replacement: 'refinery_login')
refinery_login
end

end
end
end
Expand Down

0 comments on commit 124e560

Please sign in to comment.