diff options
| author | Robert | 2017-12-07 11:01:43 +0100 | 
|---|---|---|
| committer | Robert | 2017-12-14 15:34:46 +0100 | 
| commit | 16d66dd5df93a11604ba29ea563fb7005b61367b (patch) | |
| tree | 412ca07f0d4b4efb73c8043a67c8d9bfb7606ac6 /app | |
| parent | d157011c12b20cedbe4501c4d228ebcdac3647bc (diff) | |
| download | chouette-core-16d66dd5df93a11604ba29ea563fb7005b61367b.tar.bz2 | |
Refs #5006; CR pass I
Diffstat (limited to 'app')
| -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 | 
3 files changed, 4 insertions, 4 deletions
| 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 | 
