aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Florisson2013-07-24 17:09:11 +0200
committerMarc Florisson2013-07-24 17:09:11 +0200
commit3992628a224bdbdfe2286f57e050dd252b56f8c1 (patch)
tree1ec3e9b21f0b73a0d1230245301796ce02ea0aed
parent9aae98be82465f5fce4eac9edaf7f62b46becdc1 (diff)
downloadchouette-core-3992628a224bdbdfe2286f57e050dd252b56f8c1.tar.bz2
export KML: fix quay selection
-rw-r--r--app/exporters/chouette/kml/exporter.rb2
-rw-r--r--spec/exporters/chouette/kml/exporter_spec.rb3
2 files changed, 1 insertions, 4 deletions
diff --git a/app/exporters/chouette/kml/exporter.rb b/app/exporters/chouette/kml/exporter.rb
index a7adfab79..06af4bc2f 100644
--- a/app/exporters/chouette/kml/exporter.rb
+++ b/app/exporters/chouette/kml/exporter.rb
@@ -78,7 +78,7 @@ class Chouette::Kml::Exporter
# if too many lines
# there may be too many stop_areas
if lines_exportable?
- stop_areas = Chouette::StopArea.joins(:children => [:stop_points => [:route => :line] ]).where(:lines => {:id => lines.map(&:id)}).uniq.order(:name)
+ stop_areas = Chouette::StopArea.joins( :stop_points => [:route => :line]).where(:lines => {:id => lines.map(&:id)}).uniq.order(:name)
Chouette::Kml::StopAreaExporter.save( stop_areas, temp_dir, kml_export, "Quay")
commercial_stop_areas = Chouette::StopArea.where( :id => stop_areas.map(&:parent_id).compact.uniq).order(:name)
diff --git a/spec/exporters/chouette/kml/exporter_spec.rb b/spec/exporters/chouette/kml/exporter_spec.rb
index a1d33613d..2135c0b91 100644
--- a/spec/exporters/chouette/kml/exporter_spec.rb
+++ b/spec/exporters/chouette/kml/exporter_spec.rb
@@ -28,9 +28,6 @@ describe Chouette::Kml::Exporter do
it "should return a zip file with nothing inside with no objects in arguments" do
subject.export(zip_file_path, {:export_id => 1, :o => "line"} )
File.exists?(zip_file_path).should be_true
- ::Zip::ZipFile.open(zip_file_path) do |f|
- puts "f = #{f.inspect}"
- end
::Zip::ZipFile.open(zip_file_path).size.should == 6
end