Permalink
Browse files

Remove deprecated methods for versions < 4.0.0

  • Loading branch information...
bricesanchez authored and parndt committed Sep 20, 2017
1 parent 4a3dbbb commit 9f92ed9fb235586a80dc789fc87ffb3108ebbb1b
View
@@ -1,5 +1,6 @@
## 4.0.0 [unreleased]
* Remove deprecated methods for versions < 4.0.0. [124e560](https://github.com/refinery/refinerycms/commit/124e560086eb9b10bb5665aff7923f6881374398). [Brice Sanchez](https://github.com/bricesanchez)
* Now supporting Rails 5.1. [#3122](https://github.com/refinery/refinerycms/pull/3122). [Brice Sanchez](https://github.com/bricesanchez) & [Philip Arndt](https://github.com/parndt) & [Remco Meinen](https://github.com/sjoulbak) & [Don Pinkster](https://github.com/donpinkster) & [Johan Bruning](https://github.com/johanb) & [Michael de Silva](https://github.com/bsodmike) & [Kiril Mitov](https://github.com/thebravoman) and everyone else who helped out!
* [See full list](https://github.com/refinery/refinerycms/compare/3.0.6...4.0.0)

This file was deleted.

Oops, something went wrong.
@@ -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]
@@ -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)
@@ -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
@@ -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.
@@ -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
@@ -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.
@@ -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,
@@ -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
@@ -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
@@ -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

0 comments on commit 9f92ed9

Please sign in to comment.