diff --git a/CHANGELOG.md b/CHANGELOG.md index 900434aa..5be13f90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ Reverse Chronological Order: https://github.com/capistrano/capistrano/compare/v3.6.1...HEAD * Your contribution here! +* `remote_file` feature has been removed and is no longer available to use @SaiVardhan ## `3.6.1` (2016-08-23) diff --git a/features/remote_file_task.feature b/features/remote_file_task.feature deleted file mode 100644 index 6c2ac640..00000000 --- a/features/remote_file_task.feature +++ /dev/null @@ -1,14 +0,0 @@ -Feature: Remote file task - - Background: - Given a test app with the default configuration - And a custom task to generate a file - And servers with the roles app and web - - Scenario: Where the file does not exist - When I run cap "deploy:check:linked_files" - Then it creates the file with the remote_task prerequisite - - Scenario: Where the file already exists - When I run cap "deploy:check:linked_files" - Then it will not recreate the file diff --git a/lib/capistrano/dsl/task_enhancements.rb b/lib/capistrano/dsl/task_enhancements.rb index 9a217311..f3497c9c 100644 --- a/lib/capistrano/dsl/task_enhancements.rb +++ b/lib/capistrano/dsl/task_enhancements.rb @@ -17,14 +17,6 @@ module Capistrano end end - def remote_file(task) - warn("[Deprecation Warning] `remote_file` is deprecated and will be "\ - "removed in Capistrano 3.7.0") - - target_roles = task.delete(:roles) { :all } - define_remote_file_task(task, target_roles) - end - def define_remote_file_task(task, target_roles) Capistrano::UploadTask.define_task(task) do |t| prerequisite_file = t.prerequisites.first diff --git a/spec/lib/capistrano/dsl/task_enhancements_spec.rb b/spec/lib/capistrano/dsl/task_enhancements_spec.rb index 33e5669d..bb41fc3c 100644 --- a/spec/lib/capistrano/dsl/task_enhancements_spec.rb +++ b/spec/lib/capistrano/dsl/task_enhancements_spec.rb @@ -104,20 +104,5 @@ module Capistrano expect { Rake::Task["task"].invoke order }.to raise_error(ArgumentError, 'Task "non_existent_task" not found') end end - - describe "remote_file" do - subject(:remote_file) { task_enhancements.remote_file("source" => "destination") } - - it { expect(remote_file.name).to eq("source") } - it { is_expected.to be_a(Capistrano::UploadTask) } - - describe "namespaced" do - let(:app) { Rake.application } - around { |ex| app.in_namespace("namespace", &ex) } - - it { expect(remote_file.name).to eq("source") } - it { is_expected.to be_a(Capistrano::UploadTask) } - end - end end end