diff --git a/lib/producer/core.rb b/lib/producer/core.rb index 44810d5..9af9571 100644 --- a/lib/producer/core.rb +++ b/lib/producer/core.rb @@ -17,6 +17,7 @@ require 'producer/core/recipe' require 'producer/core/recipe/dsl' require 'producer/core/remote' require 'producer/core/remote/environment' +require 'producer/core/remote/fs' require 'producer/core/task' require 'producer/core/task/dsl' require 'producer/core/version' diff --git a/lib/producer/core/remote/fs.rb b/lib/producer/core/remote/fs.rb new file mode 100644 index 0000000..19fec4f --- /dev/null +++ b/lib/producer/core/remote/fs.rb @@ -0,0 +1,13 @@ +module Producer + module Core + class Remote + class FS + require 'net/sftp' + + def initialize(remote) + @remote = remote + end + end + end + end +end diff --git a/spec/producer/core/remote/fs_spec.rb b/spec/producer/core/remote/fs_spec.rb new file mode 100644 index 0000000..609b841 --- /dev/null +++ b/spec/producer/core/remote/fs_spec.rb @@ -0,0 +1,14 @@ +require 'spec_helper' + +module Producer::Core + describe Remote::FS do + let(:remote) { Remote.new('some_host.example') } + subject(:fs) { Remote::FS.new(remote) } + + describe '#new' do + it 'assigns the remote given as argument' do + expect(fs.instance_eval { @remote }).to be remote + end + end + end +end