diff options
| -rw-r--r-- | app/services/file_service.rb | 24 | ||||
| -rw-r--r-- | spec/services/file_service_spec.rb | 17 | 
2 files changed, 0 insertions, 41 deletions
| diff --git a/app/services/file_service.rb b/app/services/file_service.rb deleted file mode 100644 index 3b3ff3561..000000000 --- a/app/services/file_service.rb +++ /dev/null @@ -1,24 +0,0 @@ -# TODO: Delete me after stable implementation of #1726 -# module FileService extend self - -#   def unique_filename( path, enum_with: with_ints ) -#     file_names = enum_with.map( &file_name_maker(path) ) -#     file_names -#       .drop_while( &File.method(:exists?) ) -#       .next -#   end - -#   def with_ints(format='%d') -#     (0..Float::INFINITY) -#       .lazy -#       .map{ |n| format % n } -#   end -   - -#   private - -#   def file_name_maker path -#     ->(n){ [path, n].join('_') } -#   end - -# end diff --git a/spec/services/file_service_spec.rb b/spec/services/file_service_spec.rb deleted file mode 100644 index 4426ee145..000000000 --- a/spec/services/file_service_spec.rb +++ /dev/null @@ -1,17 +0,0 @@ -# TODO: Delete me after stable implementation of #1726 -# RSpec.describe FileService do - -#   it 'computes a unique filename' do -#     expect( File ).to receive(:exists?).with('xxx/yyy_0').and_return( false ) - -#     expect(described_class.unique_filename('xxx/yyy')).to eq('xxx/yyy_0') -#   end - -#   it 'handles duplicate names by means of a counter' do -#     expect( File ).to receive(:exists?).with('xxx/yyy_0').and_return( true ) -#     expect( File ).to receive(:exists?).with('xxx/yyy_1').and_return( true ) -#     expect( File ).to receive(:exists?).with('xxx/yyy_2').and_return( false ) - -#     expect(described_class.unique_filename('xxx/yyy')).to eq('xxx/yyy_2') -#   end -# end | 
