aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/exporters/chouette/hub/commercial_stop_area_exporter.rb4
-rw-r--r--app/exporters/chouette/hub/physical_stop_area_exporter.rb3
-rw-r--r--app/exporters/chouette/hub/vehicle_journey_at_stop_exporter.rb2
-rw-r--r--app/exporters/chouette/hub/vehicle_journey_exporter.rb12
-rw-r--r--app/views/api/hub/horaires.hub.erb2
5 files changed, 14 insertions, 9 deletions
diff --git a/app/exporters/chouette/hub/commercial_stop_area_exporter.rb b/app/exporters/chouette/hub/commercial_stop_area_exporter.rb
index be4b667e5..2eee169fc 100644
--- a/app/exporters/chouette/hub/commercial_stop_area_exporter.rb
+++ b/app/exporters/chouette/hub/commercial_stop_area_exporter.rb
@@ -7,7 +7,9 @@ class Chouette::Hub::CommercialStopAreaExporter
@directory = directory
@template = File.open('app/views/api/hub/arrets_generiques.hub.erb' ){ |f| f.read }
@type = "ONNNNNNNNNNNNNNNNN"
-
+ if @stop_area.mobility_restricted_suitability
+ @type = "ONNNNNNNNNNNNONNNN"
+ end
@stop_area.referential.projection_type = "27562"
wgs84 = '+proj=lonlat +datum=WGS84 +ellps=WGS84'
diff --git a/app/exporters/chouette/hub/physical_stop_area_exporter.rb b/app/exporters/chouette/hub/physical_stop_area_exporter.rb
index a8d992735..9ed23e5bb 100644
--- a/app/exporters/chouette/hub/physical_stop_area_exporter.rb
+++ b/app/exporters/chouette/hub/physical_stop_area_exporter.rb
@@ -7,6 +7,9 @@ class Chouette::Hub::PhysicalStopAreaExporter
@directory = directory
@template = File.open('app/views/api/hub/arrets_physiques.hub.erb' ){ |f| f.read }
@type = "NNNNNNNNNNNNNNNNNN"
+ if @stop_area.mobility_restricted_suitability
+ @type = "NNNNNNNNNNNNNONNNN"
+ end
if @stop_area.parent_id
@parent = Chouette::StopArea.find(@stop_area.parent_id)
end
diff --git a/app/exporters/chouette/hub/vehicle_journey_at_stop_exporter.rb b/app/exporters/chouette/hub/vehicle_journey_at_stop_exporter.rb
index 1c4b4c620..2cc999ac7 100644
--- a/app/exporters/chouette/hub/vehicle_journey_at_stop_exporter.rb
+++ b/app/exporters/chouette/hub/vehicle_journey_at_stop_exporter.rb
@@ -6,7 +6,7 @@ class Chouette::Hub::VehicleJourneyAtStopExporter
@vehicle_journey_at_stop = vehicle_journey_at_stop
@directory = directory
@vehicle_journey_num = index
- @vehicle_journey_id = id
+ @id = id
@template = File.open('app/views/api/hub/horaires.hub.erb' ) { |f| f.read }
stop_point = @vehicle_journey_at_stop.stop_point
stop_area = stop_point.stop_area
diff --git a/app/exporters/chouette/hub/vehicle_journey_exporter.rb b/app/exporters/chouette/hub/vehicle_journey_exporter.rb
index fb854566b..99d23e32b 100644
--- a/app/exporters/chouette/hub/vehicle_journey_exporter.rb
+++ b/app/exporters/chouette/hub/vehicle_journey_exporter.rb
@@ -38,13 +38,13 @@ class Chouette::Hub::VehicleJourneyExporter
end
# USE @renvoi for PMR and TAD and create RENVOI.TXT File
@renvoi = ""
- if @vehicle_journey.mobility_restricted_suitability
+ if @vehicle_journey.mobility_restricted_suitability || @line.mobility_restricted_suitability
@renvoi = "1"
- end
- File.open(directory + "/RENVOI.TXT" , "a:ISO_8859_1") do |f|
- if f.size == 0
- f.write("RENVOI\u000D\u000A")
- f.write("a;PMR;1\u000D\u000A")
+ File.open(directory + "/RENVOI.TXT" , "a:ISO_8859_1") do |f|
+ if f.size == 0
+ f.write("RENVOI\u000D\u000A")
+ f.write("a;PMR;1\u000D\u000A")
+ end
end
end
end
diff --git a/app/views/api/hub/horaires.hub.erb b/app/views/api/hub/horaires.hub.erb
index 1497588af..6c5b9d04b 100644
--- a/app/views/api/hub/horaires.hub.erb
+++ b/app/views/api/hub/horaires.hub.erb
@@ -1 +1 @@
-<%= @stop_area_code %>;<%= @arrival_time %>;<%= @arrival_type %>;<%= @vehicle_journey_num %>;<%= @vehicle_journey_at_stop.vehicle_journey.journey_pattern_id %>;<%= @stop_area_id %>;<%= 2 * @vehicle_journey_id - 1 %><%= "\u000D\u000A" %><%= @stop_area_code %>;<%= @departure_time %>;<%= @departure_type %>;<%= @vehicle_journey_num %>;<%= @vehicle_journey_at_stop.vehicle_journey.journey_pattern_id %>;<%= @stop_area_id %>;<%= 2 * @vehicle_journey_id %><%= "\u000D\u000A" %> \ No newline at end of file
+<%= @stop_area_code %>;<%= @arrival_time %>;<%= @arrival_type %>;<%= @vehicle_journey_num %>;<%= @vehicle_journey_at_stop.vehicle_journey.journey_pattern_id %>;<%= @stop_area_id %>;<%= 2 * @id - 1 %><%= "\u000D\u000A" %><%= @stop_area_code %>;<%= @departure_time %>;<%= @departure_type %>;<%= @vehicle_journey_num %>;<%= @vehicle_journey_at_stop.vehicle_journey.journey_pattern_id %>;<%= @stop_area_id %>;<%= 2 * @id %><%= "\u000D\u000A" %> \ No newline at end of file