mirror of
https://github.com/capistrano/capistrano
synced 2023-03-27 23:21:18 -04:00
Issue #1710 remove remote_file method
This commit is contained in:
parent
0625186409
commit
bbed11e80d
4 changed files with 6 additions and 37 deletions
|
@ -8,6 +8,12 @@ https://github.com/capistrano/capistrano/compare/v3.6.0...HEAD
|
|||
|
||||
* Your contribution here!
|
||||
|
||||
## `3.7.0`
|
||||
|
||||
### Deprecations
|
||||
|
||||
* `remote_file` feature is removed in Capistrano 3.7.0 and is no longer available to use
|
||||
|
||||
## `3.6.0` (2016-07-26)
|
||||
|
||||
https://github.com/capistrano/capistrano/compare/v3.5.0...v3.6.0
|
||||
|
|
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue