From 83c377e4c7e5919ee395ed2875e84c3f2bf87418 Mon Sep 17 00:00:00 2001 From: eelco Date: Mon, 7 Sep 2026 21:51:21 +0200 Subject: [PATCH] Deprecate deploy feature --- lib/perron/configuration.rb | 2 ++ lib/perron/deprecator.rb | 2 +- lib/perron/install.rb | 3 --- lib/perron/tasks/deploy.rake | 4 ++++ 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/perron/configuration.rb b/lib/perron/configuration.rb index 5bb7f57..4080624 100644 --- a/lib/perron/configuration.rb +++ b/lib/perron/configuration.rb @@ -71,6 +71,8 @@ def additional_routes end def deploy + Perron.deprecator.deprecation_warning(:deploy, "Perron.configuration.deploy is deprecated and its behavior will change in a future 1.x release (target: 1.3.0).") + @deploy ||= ActiveSupport::OrderedOptions.new.tap do |config| def config.method_missing(method_name, *args, &block) if method_name.to_s.end_with?("=") diff --git a/lib/perron/deprecator.rb b/lib/perron/deprecator.rb index 89609d0..d4d95eb 100644 --- a/lib/perron/deprecator.rb +++ b/lib/perron/deprecator.rb @@ -2,6 +2,6 @@ module Perron def self.deprecator - @deprecator ||= ActiveSupport::Deprecation.new("1.0", "Perron") + @deprecator ||= ActiveSupport::Deprecation.new("1.3.0", "Perron") end end diff --git a/lib/perron/install.rb b/lib/perron/install.rb index 84ba7c9..843d3c3 100644 --- a/lib/perron/install.rb +++ b/lib/perron/install.rb @@ -6,9 +6,6 @@ say "Create content data directory" copy_file "#{__dir__}/install/README.md", "app/content/data/README.md" -say "Create deploy configuration" -copy_file "#{__dir__}/install/deploy.yml.erb", "config/deploy.yml.erb" - say "Add Markdown gem options to Gemfile" append_to_file "Gemfile", <<~RUBY diff --git a/lib/perron/tasks/deploy.rake b/lib/perron/tasks/deploy.rake index cd75ccd..98f8d19 100644 --- a/lib/perron/tasks/deploy.rake +++ b/lib/perron/tasks/deploy.rake @@ -1,6 +1,8 @@ namespace :perron do desc "Deploy static site using Beam Up" task deploy: :environment do + Perron.deprecator.deprecation_warning(:deploy, "The `perron:deploy` task is deprecated and its behavior will change in a future 1.x release (target: 1.3.0). See https://perron.railsdesigner.com/docs/deploy/ for updates.") + begin require "beam_up" rescue LoadError @@ -37,6 +39,8 @@ namespace :perron do namespace :deploy do desc "Initialize deploy configuration with Beam Up" task :init, [:provider] do |task, arguments| + Perron.deprecator.deprecation_warning(:deploy, "The `perron:deploy:init` task is deprecated and its behavior will change in a future 1.x release (target: 1.3.0). See https://perron.railsdesigner.com/docs/deploy/ for updates.") + begin require "beam_up" rescue LoadError