aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/api
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/api')
-rw-r--r--app/views/api/hub/arrets_generiques.hub.erb2
-rw-r--r--app/views/api/hub/arrets_physiques.hub.erb2
-rw-r--r--app/views/api/hub/chemins.hub.erb2
-rw-r--r--app/views/api/hub/communes.hub.erb1
-rw-r--r--app/views/api/hub/correspondances.hub.erb2
-rw-r--r--app/views/api/hub/courses.hub.erb3
-rw-r--r--app/views/api/hub/courses_operations.hub.erb2
-rw-r--r--app/views/api/hub/directions.hub.erb2
-rw-r--r--app/views/api/hub/groupe_de_lignes.hub.erb2
-rw-r--r--app/views/api/hub/horaires.hub.erb3
-rw-r--r--app/views/api/hub/lignes.hub.erb2
-rw-r--r--app/views/api/hub/modes_transports.hub.erb1
-rw-r--r--app/views/api/hub/periodes.hub.erb2
-rw-r--r--app/views/api/hub/reseaux.hub.erb2
-rw-r--r--app/views/api/hub/schemas.hub.erb2
-rw-r--r--app/views/api/hub/transporteurs.hub.erb2
16 files changed, 16 insertions, 16 deletions
diff --git a/app/views/api/hub/arrets_generiques.hub.erb b/app/views/api/hub/arrets_generiques.hub.erb
index 89fe718a2..b540130f9 100644
--- a/app/views/api/hub/arrets_generiques.hub.erb
+++ b/app/views/api/hub/arrets_generiques.hub.erb
@@ -1 +1 @@
-<%= @stop_area.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @stop_area.objectid %>;<%= @stop_area.name if @stop_area.name %>;<%= @stop_area.nearest_topic_name if @stop_area.nearest_topic_name %>;<%= @type %>;;<%= (@stop_area.latitude && @stop_area.longitude) ? RGeo::CoordSys::Proj4::transform_coords(@from_projection, @to_projection, @stop_area.longitude, @stop_area.latitude)[0] : '' %>;<%= (@stop_area.latitude && @stop_area.longitude) ? RGeo::CoordSys::Proj4::transform_coords(@from_projection, @to_projection, @stop_area.longitude, @stop_area.latitude)[1] : '' %>;<%= @stop_area.city_name if @stop_area.city_name %>;<%= @stop_area.country_code if @stop_area.country_code %>;<%= @stop_area.comment if @stop_area.comment %>;<%= @stop_area.id %>
+<%= @stop_area.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @stop_area.objectid %>;<%= @stop_area.name if @stop_area.name %>;<%= @stop_area.nearest_topic_name if @stop_area.nearest_topic_name %>;<%= @type %>;;<%= (@stop_area.latitude && @stop_area.longitude) ? RGeo::CoordSys::Proj4::transform_coords(@from_projection, @to_projection, @stop_area.longitude, @stop_area.latitude)[0].to_i : '' %>;<%= (@stop_area.latitude && @stop_area.longitude) ? RGeo::CoordSys::Proj4::transform_coords(@from_projection, @to_projection, @stop_area.longitude, @stop_area.latitude)[1].to_i : '' %>;<%= @stop_area.city_name if @stop_area.city_name %>;<%= @stop_area.zip_code if @stop_area.zip_code %>;<%= @stop_area.comment if @stop_area.comment %>;<%= "\u000D\u000A" %> \ No newline at end of file
diff --git a/app/views/api/hub/arrets_physiques.hub.erb b/app/views/api/hub/arrets_physiques.hub.erb
index 8164ae35c..a69047882 100644
--- a/app/views/api/hub/arrets_physiques.hub.erb
+++ b/app/views/api/hub/arrets_physiques.hub.erb
@@ -1 +1 @@
-<%= @stop_area.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @stop_area.objectid %>;<%= @stop_area.name if @stop_area.name %>;<%= @stop_area.nearest_topic_name if @stop_area.nearest_topic_name %>;<%= @type %>;<%= @parent.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @parent %>;<%= (@stop_area.latitude && @stop_area.longitude) ? RGeo::CoordSys::Proj4::transform_coords(@from_projection, @to_projection, @stop_area.longitude, @stop_area.latitude)[0] : -1 %>;<%= (@stop_area.latitude && @stop_area.longitude) ? RGeo::CoordSys::Proj4::transform_coords(@from_projection, @to_projection, @stop_area.longitude, @stop_area.latitude)[1] : -1 %>;<%= @stop_area.city_name if @stop_area.city_name %>;<%= @stop_area.country_code if @stop_area.country_code %>;<%= @stop_area.comment if @stop_area.comment %>;<%= @stop_area.id %>
+<%= @stop_area.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @stop_area.objectid %>;<%= @stop_area.name if @stop_area.name %>;<%= @stop_area.nearest_topic_name if @stop_area.nearest_topic_name %>;<%= @type %>;<%= @parent.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @parent %>;<%= (@stop_area.latitude && @stop_area.longitude) ? RGeo::CoordSys::Proj4::transform_coords(@from_projection, @to_projection, @stop_area.longitude, @stop_area.latitude)[0].to_i : -1 %>;<%= (@stop_area.latitude && @stop_area.longitude) ? RGeo::CoordSys::Proj4::transform_coords(@from_projection, @to_projection, @stop_area.longitude, @stop_area.latitude)[1].to_i : -1 %>;<%= @stop_area.city_name if @stop_area.city_name %>;<%= @stop_area.zip_code if @stop_area.zip_code %>;<%= @stop_area.comment if @stop_area.comment %>;<%= @stop_area.registration_number %><%= "\u000D\u000A" %> \ No newline at end of file
diff --git a/app/views/api/hub/chemins.hub.erb b/app/views/api/hub/chemins.hub.erb
index 9d94cebd0..2a4235db9 100644
--- a/app/views/api/hub/chemins.hub.erb
+++ b/app/views/api/hub/chemins.hub.erb
@@ -1 +1 @@
-<%= @line.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @line %>;<%= @journey_pattern.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @journey_pattern.objectid %>;<%= @journey_pattern.registration_number if @journey_pattern.registration_number %>;<%= @journey_pattern.name if @journey_pattern.name %>;<%= (@journey_pattern.route.wayback == 'A' ? 1 : 2) if @journey_pattern.route %>;<%= @type %>;<% @stop_areas.each do |s| %>;<%= s.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if s.objectid %>;<%= s.id %>;;<% end %>
+<%= @line.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @line %>;<%= @journey_pattern.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @journey_pattern.objectid %>;<%= @journey_pattern.registration_number if @journey_pattern.registration_number %>;<%= @journey_pattern.name if @journey_pattern.name %>;<%= (@journey_pattern.route.wayback == 'A' ? 1 : 2) if @journey_pattern.route %>;<%= @type %>;<% @stop_areas.each do |s| %>;<%= s.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if s.objectid %>;<%= s.registration_number %>;;<% end %><%= "\u000D\u000A" %> \ No newline at end of file
diff --git a/app/views/api/hub/communes.hub.erb b/app/views/api/hub/communes.hub.erb
new file mode 100644
index 000000000..714969301
--- /dev/null
+++ b/app/views/api/hub/communes.hub.erb
@@ -0,0 +1 @@
+<%= @city_code %>;<%= @city_name %><%= "\u000D\u000A" %> \ No newline at end of file
diff --git a/app/views/api/hub/correspondances.hub.erb b/app/views/api/hub/correspondances.hub.erb
index 77c558953..3e2076947 100644
--- a/app/views/api/hub/correspondances.hub.erb
+++ b/app/views/api/hub/correspondances.hub.erb
@@ -1 +1 @@
-<%= @departure.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @departure %>;<%= @connection_link.departure_id %>;<%= @arrival.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') %>;<%= @connection_link.arrival_id %>;<%= @connection_link.link_distance %>;<%= @connection_link.default_duration %>;<%= @connection_link.id %>
+<%= @departure.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @departure %>;<%= @departure.registration_number if @departure %>;<%= @arrival.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @arrival %>;<%= @arrival.registration_number if @arrival %>;<%= @connection_link.link_distance %>;<%= @connection_link.default_duration %>;<%= @count %><%= "\u000D\u000A" %> \ No newline at end of file
diff --git a/app/views/api/hub/courses.hub.erb b/app/views/api/hub/courses.hub.erb
index cf711ca6b..416cd5ec2 100644
--- a/app/views/api/hub/courses.hub.erb
+++ b/app/views/api/hub/courses.hub.erb
@@ -1,2 +1 @@
-<%= @numero %>;;;<%= @departure_stop_area.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @departure_stop_area %>;<%= @departure_time_sec %>;<%= @line.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @line %>;<%= @journey_pattern.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @journey_pattern %>;<%= "D" %>;<%= (@route.wayback == "R") ? 2 : 1 %>;<%= @validity %>;;<%= @departure_stop_area.id if @departure_stop_area %>;<%= @renvoi %>;<%= @periods %>;<%= 1 %>;<%= @vehicle_journey.id %>
-<%= @numero %>;;;<%= @arrival_stop_area.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @arrival_stop_area %>;<%= @arrival_time_sec %>;<%= @line.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @line %>;<%= @journey_pattern.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @journey_pattern %>;<%= "A" %>;<%= (@route.wayback == "R") ? 2 : 1 %>;<%= @validity %>;;<%= @arrival_stop_area.id if @arrival_stop_area %>;<%= @renvoi %>;<%= @periods %>;<%= 1 %>;<%= @vehicle_journey.id %>
+<%= @numero %>;;;<%= @departure_stop_area.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @departure_stop_area %>;<%= @departure_time_sec %>;<%= @line.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @line %>;<%= @journey_pattern.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @journey_pattern %>;<%= "D" %>;<%= (@route.wayback == "R") ? 2 : 1 %>;<%= @validity %>;;<%= @departure_stop_area.registration_number if @departure_stop_area %>;<%= @renvoi %>;<%= @periods %>;<%= 1 %>;<%= @vehicle_journey.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') %><%= "\u000D\u000A" %><%= @numero %>;;;<%= @arrival_stop_area.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @arrival_stop_area %>;<%= @arrival_time_sec %>;<%= @line.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @line %>;<%= @journey_pattern.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @journey_pattern %>;<%= "A" %>;<%= (@route.wayback == "R") ? 2 : 1 %>;<%= @validity %>;;<%= @arrival_stop_area.registration_number if @arrival_stop_area %>;<%= @renvoi %>;<%= @periods %>;<%= 1 %>;<%= @vehicle_journey.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') %><%= "\u000D\u000A" %> \ No newline at end of file
diff --git a/app/views/api/hub/courses_operations.hub.erb b/app/views/api/hub/courses_operations.hub.erb
index 503018825..5c293a2ad 100644
--- a/app/views/api/hub/courses_operations.hub.erb
+++ b/app/views/api/hub/courses_operations.hub.erb
@@ -1 +1 @@
-<%= @number %>;<%= @vehicle_journey.published_journey_identifier %>;;;<%= @transport_mode %>;;
+<%= @number %>;<%= @vehicle_journey.published_journey_identifier %>;;;<%= @transport_mode %>;;<%= "\u000D\u000A" %> \ No newline at end of file
diff --git a/app/views/api/hub/directions.hub.erb b/app/views/api/hub/directions.hub.erb
index bce4b0a9c..f7ae19781 100644
--- a/app/views/api/hub/directions.hub.erb
+++ b/app/views/api/hub/directions.hub.erb
@@ -1 +1 @@
-<%= @direction.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @direction %>;<%= @line.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @line %>;<%= (@journey_pattern.route.wayback == 'A' ? 1 : 2) if @journey_pattern.route %>;<%= @journey_pattern.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @journey_pattern.objectid %>
+<%= @direction.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @direction %>;<%= @line.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @line %>;<%= (@journey_pattern.route.wayback == 'A' ? 1 : 2) if @journey_pattern.route %>;<%= @journey_pattern.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @journey_pattern.objectid %><%= "\u000D\u000A" %> \ No newline at end of file
diff --git a/app/views/api/hub/groupe_de_lignes.hub.erb b/app/views/api/hub/groupe_de_lignes.hub.erb
index f098b7a5e..7f7e24abc 100644
--- a/app/views/api/hub/groupe_de_lignes.hub.erb
+++ b/app/views/api/hub/groupe_de_lignes.hub.erb
@@ -1 +1 @@
-<%= @group_of_lines.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') %>;<%= @group_of_lines.name %>;<%= @group_of_lines.id %>
+<%= @group_of_lines.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') %>;<%= @group_of_lines.name %>;<%= @group_of_lines.id %><%= "\u000D\u000A" %> \ No newline at end of file
diff --git a/app/views/api/hub/horaires.hub.erb b/app/views/api/hub/horaires.hub.erb
index c9d170be8..1497588af 100644
--- a/app/views/api/hub/horaires.hub.erb
+++ b/app/views/api/hub/horaires.hub.erb
@@ -1,2 +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 %>
-<%= @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 %>
+<%= @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
diff --git a/app/views/api/hub/lignes.hub.erb b/app/views/api/hub/lignes.hub.erb
index 7fb7d24a8..312d45e1c 100644
--- a/app/views/api/hub/lignes.hub.erb
+++ b/app/views/api/hub/lignes.hub.erb
@@ -1 +1 @@
-<%= @line.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @line.objectid %>;<%= @line.number %>;<%= @line.name %>;<%= @line.registration_number %>;;<%= @ompany.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @ompany %>;<%= @network.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @network %>;<%= @group_of_line %>;<%= @line.id %>
+<%= @line.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @line.objectid %>;<%= @line.number %>;<%= @line.name %>;;;<%= @company.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @company %>;<%= @network.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @network %>;<%= @group_of_line %>;<%= @line.id %><%= "\u000D\u000A" %> \ No newline at end of file
diff --git a/app/views/api/hub/modes_transports.hub.erb b/app/views/api/hub/modes_transports.hub.erb
new file mode 100644
index 000000000..742f8033e
--- /dev/null
+++ b/app/views/api/hub/modes_transports.hub.erb
@@ -0,0 +1 @@
+<%= @transport_mode %>;;<%= @transport_lines %><%= "\u000D\u000A" %> \ No newline at end of file
diff --git a/app/views/api/hub/periodes.hub.erb b/app/views/api/hub/periodes.hub.erb
index dc3e475df..38b2d3db9 100644
--- a/app/views/api/hub/periodes.hub.erb
+++ b/app/views/api/hub/periodes.hub.erb
@@ -1 +1 @@
-<%= Chouette::TimeTable.find(@time_table.id).objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') %>;<%= @time_table.comment %>;<%= @time_table.start_date %>;<%= @time_table.end_date %>;<%= @calendar %>
+<%= Chouette::TimeTable.find(@time_table.id).objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') %>;<%= @time_table.comment %>;<%= @time_table.start_date.strftime("%d/%m/%Y") %>;<%= @time_table.end_date.strftime("%d/%m/%Y") %>;<%= @calendar %>;<%= @identifier %><%= "\u000D\u000A" %> \ No newline at end of file
diff --git a/app/views/api/hub/reseaux.hub.erb b/app/views/api/hub/reseaux.hub.erb
index 634b10b30..1f12a7017 100644
--- a/app/views/api/hub/reseaux.hub.erb
+++ b/app/views/api/hub/reseaux.hub.erb
@@ -1 +1 @@
-<%= @network.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') %>;<%= @network.name %>;<%= @network.id %>
+<%= @network.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') %>;<%= @network.name %>;<%= @network.id %><%= "\u000D\u000A" %> \ No newline at end of file
diff --git a/app/views/api/hub/schemas.hub.erb b/app/views/api/hub/schemas.hub.erb
index 3a93294f8..f2759a871 100644
--- a/app/views/api/hub/schemas.hub.erb
+++ b/app/views/api/hub/schemas.hub.erb
@@ -1 +1 @@
-<%= @line.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @line %>;<%= @route.wayback == 'A' ? 1 : 2 %><% @stop_areas.each do |s| %>;<%= s.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if s.objectid %>;<%= s.id %><% end %>
+<%= @line.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @line %>;<%= @route.wayback == 'A' ? 1 : 2 %>;<%= @route.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') %><% @stop_areas.each do |s| %>;<%= s.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if s.objectid %>;<%= s.registration_number if s.registration_number %><% end %><%= "\u000D\u000A" %> \ No newline at end of file
diff --git a/app/views/api/hub/transporteurs.hub.erb b/app/views/api/hub/transporteurs.hub.erb
index fdabda5b1..7d153ad7c 100644
--- a/app/views/api/hub/transporteurs.hub.erb
+++ b/app/views/api/hub/transporteurs.hub.erb
@@ -1 +1 @@
-<%= @company.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') %>;<%= @company.name %>;<%= @company.id %>
+<%= @company.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') %>;<%= @company.name %>;<%= @company.id %><%= "\u000D\u000A" %> \ No newline at end of file