diff --git a/README.md b/README.md index 9ec7b3c1..7a1c9742 100644 --- a/README.md +++ b/README.md @@ -22,12 +22,12 @@ TODO: - [x] support set/fetch/role configuration - [x] basic deploy - [x] ask - - [ ] support existing significant configuration variables - [ ] prefer `roles(:all)` over `all_roles` - [ ] support primary servers `on primary(:db)` - [ ] basic rollback - - [ ] add examples to README + - [ ] support existing significant configuration variables - [ ] set configuration defaults, add commented out examples to templates + - [ ] add examples to README ## Installation diff --git a/lib/capistrano/configuration.rb b/lib/capistrano/configuration.rb index cc10cf3f..2ba7e11b 100644 --- a/lib/capistrano/configuration.rb +++ b/lib/capistrano/configuration.rb @@ -103,9 +103,6 @@ module Capistrano @response ||= $stdin.gets.chomp end - def set(key, value) - end - def question I18n.t(:question, key: key, default_value: default, scope: :capistrano) end diff --git a/spec/lib/capistrano/configuration_spec.rb b/spec/lib/capistrano/configuration_spec.rb index ec9d664e..7863b2d2 100644 --- a/spec/lib/capistrano/configuration_spec.rb +++ b/spec/lib/capistrano/configuration_spec.rb @@ -97,7 +97,14 @@ module Capistrano end end - context 'block is passed' do + context 'value is a proc' do + subject { config.fetch(:key, Proc.new { :proc } ) } + it 'calls the proc' do + expect(subject).to eq :proc + end + end + + context 'block is passed to fetch' do subject { config.fetch(:key, :default) { fail 'we need this!' } } it 'returns the block value' do