multi_sync 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +6 -8
  3. data/Gemfile +0 -1
  4. data/README.md +79 -51
  5. data/Rakefile +0 -22
  6. data/lib/multi_sync.rb +27 -5
  7. data/lib/multi_sync/attributes/pathname.rb +1 -1
  8. data/lib/multi_sync/client.rb +124 -112
  9. data/lib/multi_sync/configuration.rb +4 -1
  10. data/lib/multi_sync/extensions/jekyll.rb +24 -0
  11. data/lib/multi_sync/extensions/middleman.rb +1 -7
  12. data/lib/multi_sync/extensions/rails.rb +0 -2
  13. data/lib/multi_sync/{mixins/pluralize_helper.rb → helpers/pluralize.rb} +2 -2
  14. data/lib/multi_sync/logging.rb +7 -0
  15. data/lib/multi_sync/resource.rb +0 -2
  16. data/lib/multi_sync/resources/local_resource.rb +0 -1
  17. data/lib/multi_sync/source.rb +0 -2
  18. data/lib/multi_sync/sources/local_source.rb +3 -1
  19. data/lib/multi_sync/sources/manifest_source.rb +14 -16
  20. data/lib/multi_sync/target.rb +3 -3
  21. data/lib/multi_sync/targets/aws_target.rb +6 -10
  22. data/lib/multi_sync/targets/local_target.rb +7 -15
  23. data/lib/multi_sync/version.rb +1 -1
  24. data/lib/tasks/multi_sync_rails.rake +4 -4
  25. data/multi_sync.gemspec +3 -2
  26. data/spec/support/fog.rb +0 -1
  27. data/spec/support/timecop.rb +7 -1
  28. data/spec/support/tmpdir.rb +18 -0
  29. data/spec/unit/multi_sync/client_spec.rb +51 -74
  30. data/spec/unit/multi_sync/configuration_spec.rb +54 -83
  31. data/spec/unit/multi_sync/resources/local_resource_spec.rb +9 -7
  32. data/spec/unit/multi_sync/sources/local_source_spec.rb +14 -14
  33. data/spec/unit/multi_sync/sources/manifest_source_spec.rb +16 -18
  34. data/spec/unit/multi_sync/targets/aws_target_spec.rb +8 -8
  35. data/spec/unit/multi_sync/targets/local_target_spec.rb +9 -9
  36. data/spec/unit/multi_sync_spec.rb +44 -31
  37. metadata +102 -91
  38. data/gemfiles/middleman-3.1.x.gemfile +0 -5
  39. data/gemfiles/rails-3.2.x.gemfile +0 -5
  40. data/gemfiles/rails-4.0.x.gemfile +0 -5
  41. data/lib/multi_sync/mixins/log_helper.rb +0 -9
  42. data/spec/support/fakefs.rb +0 -7
@@ -0,0 +1,18 @@
1
+ require 'tmpdir'
2
+ require 'pathname'
3
+ require 'fileutils'
4
+ RSpec.configure do |config|
5
+ config.around do |ex|
6
+ tmpdir = Dir.mktmpdir('multi_sync')
7
+ tmp = Pathname.new File.join(tmpdir, ex.__id__.to_s)
8
+ pwd = Dir.pwd
9
+ FileUtils.mkdir(tmp)
10
+ begin
11
+ Dir.chdir(tmp)
12
+ ex.run
13
+ Dir.chdir(pwd)
14
+ ensure
15
+ FileUtils.remove_entry_secure tmp
16
+ end
17
+ end
18
+ end
@@ -1,29 +1,29 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe MultiSync::Client, fakefs: true do
4
-
3
+ describe MultiSync::Client do
5
4
  before do
6
- FileUtils.mkdir_p('/tmp/simple')
7
- File.open('/tmp/simple/foo.txt', 'w') do |f| f.write('foo') end
8
- File.open('/tmp/simple/bar.txt', 'w') do |f| f.write('bar') end
9
- FileUtils.mkdir_p('/tmp/simple/in-a-dir')
10
- File.open('/tmp/simple/in-a-dir/baz.html', 'w') do |f| f.write('baz') end
5
+ FileUtils.mkdir_p('tmp/simple')
6
+ File.open('tmp/simple/foo.txt', File::CREAT | File::RDWR) do |f| f.write('foo') end
7
+ File.open('tmp/simple/bar.txt', File::CREAT | File::RDWR) do |f| f.write('bar') end
8
+
9
+ FileUtils.mkdir_p('tmp/simple/in-a-dir')
10
+ File.open('tmp/simple/in-a-dir/baz.html', File::CREAT | File::RDWR) do |f| f.write('baz') end
11
11
 
12
- FileUtils.cp_r('/tmp/simple', '/tmp/simple-with-missing-file')
13
- FileUtils.rm_r('/tmp/simple-with-missing-file/foo.txt')
12
+ FileUtils.cp_r('tmp/simple', 'tmp/simple-with-missing-file')
13
+ FileUtils.rm_r('tmp/simple-with-missing-file/foo.txt')
14
14
 
15
- FileUtils.cp_r('/tmp/simple', '/tmp/simple-with-abandoned-file')
16
- File.open('/tmp/simple-with-abandoned-file/baz.txt', 'w') do |f| f.write('baz') end
15
+ FileUtils.cp_r('tmp/simple', 'tmp/simple-with-abandoned-file')
16
+ File.open('tmp/simple-with-abandoned-file/baz.txt', File::CREAT | File::RDWR) do |f| f.write('baz') end
17
17
 
18
- FileUtils.cp_r('/tmp/simple', '/tmp/simple-with-outdated-file')
19
- File.open('/tmp/simple-with-outdated-file/foo.txt', 'w') do |f| f.write('not-foo') end
18
+ FileUtils.cp_r('tmp/simple', 'tmp/simple-with-outdated-file')
19
+ File.open('tmp/simple-with-outdated-file/foo.txt', File::CREAT | File::RDWR) do |f| f.write('not-foo') end
20
20
 
21
- FileUtils.mkdir_p('/tmp/complex')
22
- 50.times do
23
- File.open("/tmp/complex/#{SecureRandom.urlsafe_base64}.txt", 'w') do |f| f.write(SecureRandom.random_bytes) end
21
+ FileUtils.mkdir_p('tmp/complex')
22
+ 1_000.times do |i|
23
+ File.open("tmp/complex/#{i.to_s.rjust(4, '0')}.txt", File::CREAT | File::RDWR) do |f| f.write('foo') end
24
24
  end
25
25
 
26
- FileUtils.mkdir_p('/tmp/complex-empty')
26
+ FileUtils.mkdir_p('tmp/complex-empty')
27
27
  end
28
28
 
29
29
  context :sync do
@@ -31,36 +31,30 @@ describe MultiSync::Client, fakefs: true do
31
31
  context 'simple' do
32
32
  it 'should work' do
33
33
  missing_files_target_options = {
34
- type: :local,
35
- target_dir: '/tmp',
34
+ target_dir: 'tmp',
36
35
  destination_dir: 'simple-with-missing-file',
37
36
  credentials: {
38
- local_root: '/tmp'
37
+ local_root: 'tmp'
39
38
  }
40
39
  }
41
40
 
42
41
  abandoned_files_target_options = {
43
- type: :local,
44
- target_dir: '/tmp',
42
+ target_dir: 'tmp',
45
43
  destination_dir: 'simple-with-abandoned-file',
46
44
  credentials: {
47
- local_root: '/tmp'
45
+ local_root: 'tmp'
48
46
  }
49
47
  }
50
48
 
51
49
  outdated_files_target_options = {
52
- type: :local,
53
- target_dir: '/tmp',
50
+ target_dir: 'tmp',
54
51
  destination_dir: 'simple-with-outdated-file',
55
52
  credentials: {
56
- local_root: '/tmp'
53
+ local_root: 'tmp'
57
54
  }
58
55
  }
59
56
 
60
- local_source_options = {
61
- type: :local,
62
- source_dir: '/tmp/simple'
63
- }
57
+ local_source_options = { source_dir: 'tmp/simple' }
64
58
 
65
59
  missing_files_target = MultiSync::LocalTarget.new(missing_files_target_options)
66
60
  abandoned_files_target = MultiSync::LocalTarget.new(abandoned_files_target_options)
@@ -76,10 +70,10 @@ describe MultiSync::Client, fakefs: true do
76
70
  expect(outdated_files_target.files[1].body).to eq 'not-foo'
77
71
 
78
72
  MultiSync.run do
79
- target :missing_files_target, missing_files_target_options
80
- target :abandoned_files_target, abandoned_files_target_options
81
- target :outdated_files_target, outdated_files_target_options
82
- source :simple, local_source_options.merge(targets: [:missing_files_target, :abandoned_files_target, :outdated_files_target])
73
+ local_target(missing_files_target_options)
74
+ local_target(abandoned_files_target_options)
75
+ local_target(outdated_files_target_options)
76
+ local_source(local_source_options)
83
77
  end
84
78
 
85
79
  expect(missing_files_target).to have(3).files
@@ -92,31 +86,27 @@ describe MultiSync::Client, fakefs: true do
92
86
  context 'complex' do
93
87
  it 'should work' do
94
88
  complex_empty_target_options = {
95
- type: :local,
96
- target_dir: '/tmp',
89
+ target_dir: 'tmp',
97
90
  destination_dir: 'complex-empty',
98
91
  credentials: {
99
- local_root: '/tmp'
92
+ local_root: 'tmp'
100
93
  }
101
94
  }
102
95
 
103
- local_source_options = {
104
- type: :local,
105
- source_dir: '/tmp/complex'
106
- }
96
+ local_source_options = { source_dir: 'tmp/complex' }
107
97
 
108
98
  complex_empty_target = MultiSync::LocalTarget.new(complex_empty_target_options)
109
99
  expect(complex_empty_target).to have(0).files
110
100
 
111
101
  local_source = MultiSync::LocalSource.new(local_source_options)
112
- expect(local_source).to have(50).files
102
+ expect(local_source).to have(1_000).files
113
103
 
114
104
  MultiSync.run do
115
- target :complex_empty_target, complex_empty_target_options
116
- source :complex, local_source_options.merge(targets: [:complex_empty_target])
105
+ local_source(local_source_options)
106
+ local_target(complex_empty_target_options)
117
107
  end
118
108
 
119
- expect(complex_empty_target).to have(50).files
109
+ expect(complex_empty_target).to have(1_000).files
120
110
  end
121
111
  end
122
112
  end
@@ -134,9 +124,9 @@ describe MultiSync::Client, fakefs: true do
134
124
  directory = connection.directories.create(key: 'multi_sync', public: true)
135
125
 
136
126
  %w(simple simple-with-missing-file simple-with-abandoned-file simple-with-outdated-file).each do |fixture_name|
137
- Dir.glob("/tmp/#{fixture_name}/**/*").reject { |path| File.directory?(path) }.each do |path|
127
+ Dir.glob("tmp/#{fixture_name}/**/*").reject { |path| File.directory?(path) }.each do |path|
138
128
  directory.files.create(
139
- key: path.gsub('/tmp/', ''),
129
+ key: path.gsub('tmp/', ''),
140
130
  body: File.open(path, 'r'),
141
131
  public: true
142
132
  )
@@ -146,7 +136,6 @@ describe MultiSync::Client, fakefs: true do
146
136
 
147
137
  it 'should work' do
148
138
  missing_files_target_options = {
149
- type: :aws,
150
139
  target_dir: 'multi_sync',
151
140
  destination_dir: 'simple-with-missing-file',
152
141
  credentials: {
@@ -157,7 +146,6 @@ describe MultiSync::Client, fakefs: true do
157
146
  }
158
147
 
159
148
  abandoned_files_target_options = {
160
- type: :aws,
161
149
  target_dir: 'multi_sync',
162
150
  destination_dir: 'simple-with-abandoned-file',
163
151
  credentials: {
@@ -168,7 +156,6 @@ describe MultiSync::Client, fakefs: true do
168
156
  }
169
157
 
170
158
  outdated_files_target_options = {
171
- type: :aws,
172
159
  target_dir: 'multi_sync',
173
160
  destination_dir: 'simple-with-outdated-file',
174
161
  credentials: {
@@ -178,10 +165,7 @@ describe MultiSync::Client, fakefs: true do
178
165
  }
179
166
  }
180
167
 
181
- local_source_options = {
182
- type: :local,
183
- source_dir: '/tmp/simple'
184
- }
168
+ local_source_options = { source_dir: 'tmp/simple' }
185
169
 
186
170
  missing_files_target = MultiSync::AwsTarget.new(missing_files_target_options)
187
171
  abandoned_files_target = MultiSync::AwsTarget.new(abandoned_files_target_options)
@@ -197,10 +181,10 @@ describe MultiSync::Client, fakefs: true do
197
181
  expect(outdated_files_target.files[1].body).to eq 'not-foo'
198
182
 
199
183
  MultiSync.run do
200
- target :missing_files_target, missing_files_target_options
201
- target :abandoned_files_target, abandoned_files_target_options
202
- target :outdated_files_target, outdated_files_target_options
203
- source :simple, local_source_options.merge(targets: [:missing_files_target, :abandoned_files_target, :outdated_files_target])
184
+ local_source(local_source_options)
185
+ aws_target(missing_files_target_options)
186
+ aws_target(abandoned_files_target_options)
187
+ aws_target(outdated_files_target_options)
204
188
  end
205
189
 
206
190
  expect(missing_files_target).to have(3).files
@@ -224,7 +208,6 @@ describe MultiSync::Client, fakefs: true do
224
208
 
225
209
  it 'should work' do
226
210
  complex_empty_target_options = {
227
- type: :aws,
228
211
  target_dir: 'multi_sync',
229
212
  destination_dir: 'complex-empty',
230
213
  credentials: {
@@ -234,23 +217,20 @@ describe MultiSync::Client, fakefs: true do
234
217
  }
235
218
  }
236
219
 
237
- local_source_options = {
238
- type: :local,
239
- source_dir: '/tmp/complex'
240
- }
220
+ local_source_options = { source_dir: 'tmp/complex' }
241
221
 
242
222
  complex_empty_target = MultiSync::AwsTarget.new(complex_empty_target_options)
243
223
  expect(complex_empty_target).to have(0).files
244
224
 
245
225
  local_source = MultiSync::LocalSource.new(local_source_options)
246
- expect(local_source).to have(50).files
226
+ expect(local_source).to have(1_000).files
247
227
 
248
228
  MultiSync.run do
249
- target :complex_empty_target, complex_empty_target_options
250
- source :complex, local_source_options.merge(targets: [:complex_empty_target])
229
+ local_source(local_source_options)
230
+ aws_target(complex_empty_target_options)
251
231
  end
252
232
 
253
- expect(complex_empty_target).to have(50).files
233
+ expect(complex_empty_target).to have(1_000).files
254
234
  end
255
235
  end
256
236
 
@@ -268,7 +248,6 @@ describe MultiSync::Client, fakefs: true do
268
248
 
269
249
  it 'should work' do
270
250
  without_destination_dir_target_options = {
271
- type: :aws,
272
251
  target_dir: 'without_destination_dir',
273
252
  credentials: {
274
253
  region: 'us-east-1',
@@ -277,10 +256,7 @@ describe MultiSync::Client, fakefs: true do
277
256
  }
278
257
  }
279
258
 
280
- local_source_options = {
281
- type: :local,
282
- source_dir: '/tmp/simple'
283
- }
259
+ local_source_options = { source_dir: 'tmp/simple' }
284
260
 
285
261
  without_destination_dir_target = MultiSync::AwsTarget.new(without_destination_dir_target_options)
286
262
  expect(without_destination_dir_target).to have(0).files
@@ -289,8 +265,8 @@ describe MultiSync::Client, fakefs: true do
289
265
  expect(local_source).to have(3).files
290
266
 
291
267
  MultiSync.run do
292
- target :without_destination_dir_target, without_destination_dir_target_options
293
- source :local, local_source_options.merge(targets: :without_destination_dir_target)
268
+ local_source(local_source_options)
269
+ aws_target(without_destination_dir_target_options)
294
270
  end
295
271
 
296
272
  expect(without_destination_dir_target).to have(3).files
@@ -298,6 +274,7 @@ describe MultiSync::Client, fakefs: true do
298
274
  end
299
275
 
300
276
  context 'with resource_options' do
277
+ # TODO: tests...
301
278
  end
302
279
  end
303
280
  end
@@ -1,91 +1,62 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe MultiSync::Configuration, fakefs: true do
4
-
5
- before do
6
- FileUtils.mkdir_p('/tmp/fog')
7
- File.open('/tmp/fog/.fog', 'w') do |f|
8
- f << "default:\n"
9
- f << " aws_access_key_id: AWS_ACCESS_KEY_ID_DEFAULT\n"
10
- f << " aws_secret_access_key: AWS_SECRET_ACCESS_KEY_DEFAULT\n"
11
- f << "alt:\n"
12
- f << " aws_access_key_id: AWS_ACCESS_KEY_ID_ALT\n"
13
- f << ' aws_secret_access_key: AWS_SECRET_ACCESS_KEY_ALT'
14
- end
15
- end
16
-
3
+ describe MultiSync::Configuration do
17
4
  let(:configuration) { MultiSync::Configuration.new }
18
-
19
- context :target_pool_size do
20
- context :defaults do
21
- describe :size do
22
- subject { configuration.target_pool_size }
23
- it { should > 1 }
5
+ context :configuration do
6
+ describe :target_pool_size do
7
+ it 'should default to celluloid_cores' do
8
+ expect(configuration.target_pool_size).to eq Celluloid.cores
24
9
  end
25
- end
26
-
27
- context :custom do
28
- before do
10
+ it 'should be settable' do
29
11
  configuration.target_pool_size = 3
30
- end
31
-
32
- describe :size do
33
- subject { configuration.target_pool_size }
34
- it { should eq 3 }
35
- end
36
- end
37
- end
38
-
39
- context :credentials do
40
- before do
41
- Fog.instance_variable_set('@credential_path', nil)
42
- Fog.instance_variable_set('@credentials', nil)
43
- Fog.instance_variable_set('@credential', nil)
44
- end
45
-
46
- after do
47
- ENV['FOG_RC'] = nil
48
- ENV['FOG_CREDENTIAL'] = 'default'
49
- Fog.instance_variable_set('@credential_path', nil)
50
- Fog.instance_variable_set('@credentials', nil)
51
- Fog.instance_variable_set('@credential', nil)
52
- end
53
-
54
- context 'with default fog credentials' do
55
- before do
56
- ENV['FOG_RC'] = nil
57
- ENV['FOG_CREDENTIAL'] = 'default'
58
- end
59
-
60
- describe :credentials do
61
- subject { configuration.credentials }
62
- it { should be_empty }
63
- end
64
- end
65
-
66
- context 'with custom .fog path set' do
67
- before do
68
- ENV['FOG_RC'] = '/tmp/fog/.fog'
69
- ENV['FOG_CREDENTIAL'] = 'default'
70
- end
71
-
72
- describe :credentials do
73
- subject { configuration.credentials }
74
- its([:aws_access_key_id]) { should eq 'AWS_ACCESS_KEY_ID_DEFAULT' }
75
- its([:aws_secret_access_key]) { should eq 'AWS_SECRET_ACCESS_KEY_DEFAULT' }
76
- end
77
- end
78
-
79
- context "with 'alt' credential set" do
80
- before do
81
- ENV['FOG_RC'] = '/tmp/fog/.fog'
82
- ENV['FOG_CREDENTIAL'] = 'alt'
83
- end
84
-
85
- describe :credentials do
86
- subject { configuration.credentials }
87
- its([:aws_access_key_id]) { should eq 'AWS_ACCESS_KEY_ID_ALT' }
88
- its([:aws_secret_access_key]) { should eq 'AWS_SECRET_ACCESS_KEY_ALT' }
12
+ expect(configuration.target_pool_size).to be 3
13
+ end
14
+ end
15
+ describe :credentials do
16
+ it 'should be settable' do
17
+ configuration.credentials = { foo: 'bar' }
18
+ expect(configuration.credentials).to eq foo: 'bar'
19
+ end
20
+ context 'fog environment variables' do
21
+ before do
22
+ FileUtils.mkdir_p('/tmp/fog')
23
+ File.open('/tmp/fog/.fog', 'w') do |f|
24
+ f << "default:\n"
25
+ f << " aws_access_key_id: AWS_ACCESS_KEY_ID_DEFAULT\n"
26
+ f << " aws_secret_access_key: AWS_SECRET_ACCESS_KEY_DEFAULT\n"
27
+ f << "alt:\n"
28
+ f << " aws_access_key_id: AWS_ACCESS_KEY_ID_ALT\n"
29
+ f << ' aws_secret_access_key: AWS_SECRET_ACCESS_KEY_ALT'
30
+ end
31
+ Fog.instance_variable_set('@credential_path', nil)
32
+ Fog.instance_variable_set('@credentials', nil)
33
+ Fog.instance_variable_set('@credential', nil)
34
+ end
35
+ after do
36
+ ENV['FOG_RC'] = nil
37
+ ENV['FOG_CREDENTIAL'] = 'default'
38
+ Fog.instance_variable_set('@credential_path', nil)
39
+ Fog.instance_variable_set('@credentials', nil)
40
+ Fog.instance_variable_set('@credential', nil)
41
+ end
42
+ it 'should default to fog credentials' do
43
+ ENV['FOG_RC'] = nil
44
+ ENV['FOG_CREDENTIAL'] = 'default'
45
+ expect(configuration.credentials).to eq Fog.credentials
46
+ end
47
+ it 'should use fog credentials' do
48
+ ENV['FOG_RC'] = '/tmp/fog/.fog'
49
+ ENV['FOG_CREDENTIAL'] = 'default'
50
+ expect(configuration.credentials).to eq(aws_access_key_id: 'AWS_ACCESS_KEY_ID_DEFAULT', aws_secret_access_key: 'AWS_SECRET_ACCESS_KEY_DEFAULT')
51
+ end
52
+ it 'should use fog \'alt\' credentials' do
53
+ ENV['FOG_RC'] = '/tmp/fog/.fog'
54
+ ENV['FOG_CREDENTIAL'] = 'alt'
55
+ expect(configuration.credentials).to eq(
56
+ aws_access_key_id: 'AWS_ACCESS_KEY_ID_ALT',
57
+ aws_secret_access_key: 'AWS_SECRET_ACCESS_KEY_ALT'
58
+ )
59
+ end
89
60
  end
90
61
  end
91
62
  end
@@ -2,19 +2,21 @@ require 'spec_helper'
2
2
 
3
3
  describe MultiSync::LocalResource, fakefs: true do
4
4
  before do
5
- FileUtils.mkdir_p('/tmp/local-resource')
6
- File.open('/tmp/local-resource/foo.txt', 'w') do |f| f.write('foo') end
5
+ FileUtils.mkdir_p('tmp/local-resource')
6
+ File.open('tmp/local-resource/foo.txt', 'w') do |f| f.write('foo') end
7
7
  end
8
8
 
9
9
  describe :local do
10
10
  context :valid do
11
11
  it 'should return correct file details' do
12
- # binding.pry
13
- resource = MultiSync::LocalResource.new(path_with_root: Pathname.new('/tmp/local-resource/foo.txt'), path_without_root: Pathname.new('foo.txt'))
12
+ resource = MultiSync::LocalResource.new(
13
+ path_with_root: Pathname.new('tmp/local-resource/foo.txt'),
14
+ path_without_root: Pathname.new('foo.txt')
15
+ )
14
16
  expect(resource.body).to eq 'foo'
15
17
  expect(resource.content_length).to eq 3
16
18
  expect(resource.content_type).to eq 'text/plain'
17
- expect(resource.mtime).to eq Time.now
19
+ expect(resource.mtime).to be_within(1).of(Time.now)
18
20
  expect(resource.etag).to eq 'acbd18db4cc2f85cedef654fccc4a4d8'
19
21
  end
20
22
  end
@@ -22,7 +24,7 @@ describe MultiSync::LocalResource, fakefs: true do
22
24
  context :known do
23
25
  it 'should return correct file details (with overwritten info)' do
24
26
  resource = MultiSync::LocalResource.new(
25
- path_with_root: Pathname.new('/tmp/local-resource/foo.txt'),
27
+ path_with_root: Pathname.new('tmp/local-resource/foo.txt'),
26
28
  path_without_root: Pathname.new('foo.txt'),
27
29
  content_length: 42,
28
30
  mtime: Time.now - 1,
@@ -39,7 +41,7 @@ describe MultiSync::LocalResource, fakefs: true do
39
41
  context :unknown do
40
42
  it 'should return default file details' do
41
43
  resource = MultiSync::LocalResource.new(
42
- path_with_root: Pathname.new('/tmp/local-resource/missing.txt'),
44
+ path_with_root: Pathname.new('tmp/local-resource/missing.txt'),
43
45
  path_without_root: Pathname.new('missing.txt')
44
46
  )
45
47
  expect(resource.body).to eq nil