1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

Merge pull request #1745 from SaiVardhan/Issue#1710_remove_remote_file

Issue #1710 remove remote_file method
This commit is contained in:
Matt Brictson 2016-08-26 09:48:25 -07:00 committed by GitHub
commit 781f294690
4 changed files with 1 additions and 37 deletions

View file

@ -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)

View file

@ -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

View file

@ -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

View file

@ -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