diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | app/models/organisation.rb | 2 | ||||
| -rw-r--r-- | app/services/zip_service.rb | 4 | ||||
| -rw-r--r-- | app/workers/workbench_import_worker.rb | 2 | ||||
| -rw-r--r-- | lib/stif/codifligne_line_id.rb (renamed from lib/stif/codif_line_id.rb) | 2 |
5 files changed, 5 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore index 0fe0d5e6c..ddd5fdda3 100644 --- a/.gitignore +++ b/.gitignore @@ -47,6 +47,5 @@ coverage /bin/rails /bin/rspec /bin/spring -/spec/fixtures/zip/* spec/fixtures/target_* diff --git a/app/models/organisation.rb b/app/models/organisation.rb index 0dab1fc16..4343c87af 100644 --- a/app/models/organisation.rb +++ b/app/models/organisation.rb @@ -72,7 +72,7 @@ class Organisation < ActiveRecord::Base end def lines_set - STIF::CodifLineId.lines_set_from_functional_scope( functional_scope ) + STIF::CodifligneLineId.lines_set_from_functional_scope( functional_scope ) end end diff --git a/app/services/zip_service.rb b/app/services/zip_service.rb index 6596f6961..a34dd97cc 100644 --- a/app/services/zip_service.rb +++ b/app/services/zip_service.rb @@ -39,8 +39,8 @@ class ZipService end def add_to_current_output entry - return if is_spurious! entry.name - return if is_foreign_line! entry.name + return if is_spurious!(entry.name) || is_foreign_line!(entry.name) + current_output.put_next_entry entry.name write_to_current_output entry.get_input_stream end diff --git a/app/workers/workbench_import_worker.rb b/app/workers/workbench_import_worker.rb index 6a3eda2f9..35a9eff0b 100644 --- a/app/workers/workbench_import_worker.rb +++ b/app/workers/workbench_import_worker.rb @@ -55,7 +55,7 @@ class WorkbenchImportWorker def upload_entry_group_stream eg_name, eg_stream FileUtils.mkdir_p(Rails.root.join('tmp', 'imports')) - File.new(Rails.root.join('tmp', 'imports', "WorkbenchImport_#{eg_name}_#{$$}.zip"), 'wb').tap do |file| + File.open(Rails.root.join('tmp', 'imports', "WorkbenchImport_#{eg_name}_#{$$}.zip"), 'wb') do |file| eg_stream.rewind file.write eg_stream.read file.close diff --git a/lib/stif/codif_line_id.rb b/lib/stif/codifligne_line_id.rb index b7f3c8bd5..4021996a7 100644 --- a/lib/stif/codif_line_id.rb +++ b/lib/stif/codifligne_line_id.rb @@ -1,5 +1,5 @@ module STIF - module CodifLineId extend self + module CodifligneLineId extend self LINE_OBJECT_ID_SEPERATOR = ':' |
