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.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.erb2
-rw-r--r--app/views/api/hub/lignes.hub.erb2
-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/transporteurs.hub.erb2
11 files changed, 11 insertions, 11 deletions
diff --git a/app/views/api/hub/arrets_generiques.hub.erb b/app/views/api/hub/arrets_generiques.hub.erb
index 00f041552..ba28d3fff 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.encode(Encoding::ISO_8859_1) if @stop_area.name %>;<%= @stop_area.nearest_topic_name.encode(Encoding::ISO_8859_1) 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.encode(Encoding::ISO_8859_1) if @stop_area.city_name %>;<%= @stop_area.zip_code if @stop_area.zip_code %>;<%= @stop_area.comment.encode(Encoding::ISO_8859_1) if @stop_area.comment %>;<%= "\u000D\u000A" %> \ No newline at end of file
+<%= @stop_area.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @stop_area.objectid %>;<%= @stop_area.name.encode(Encoding::Windows_1252) if @stop_area.name %>;<%= @stop_area.nearest_topic_name.encode(Encoding::Windows_1252) 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.encode(Encoding::Windows_1252) if @stop_area.city_name %>;<%= @stop_area.zip_code if @stop_area.zip_code %>;<%= @stop_area.comment.encode(Encoding::Windows_1252) 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 02cb11238..626ee6454 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.encode(Encoding::ISO_8859_1) if @stop_area.name %>;<%= @stop_area.nearest_topic_name.encode(Encoding::ISO_8859_1) 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.encode(Encoding::ISO_8859_1) if @stop_area.city_name %>;<%= @stop_area.zip_code if @stop_area.zip_code %>;<%= @stop_area.comment.encode(Encoding::ISO_8859_1) if @stop_area.comment %>;<%= @stop_area.registration_number %><%= "\u000D\u000A" %> \ No newline at end of file
+<%= @stop_area.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @stop_area.objectid %>;<%= @stop_area.name.encode(Encoding::Windows_1252) if @stop_area.name %>;<%= @stop_area.nearest_topic_name.encode(Encoding::Windows_1252) 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.encode(Encoding::Windows_1252) if @stop_area.city_name %>;<%= @stop_area.zip_code if @stop_area.zip_code %>;<%= @stop_area.comment.encode(Encoding::Windows_1252) 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 f5408c51f..38ea4e562 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.encode(Encoding::ISO_8859_1) 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
+<%= @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.encode(Encoding::Windows_1252) 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
index 265271c54..cb981b0d2 100644
--- a/app/views/api/hub/communes.hub.erb
+++ b/app/views/api/hub/communes.hub.erb
@@ -1 +1 @@
-<%= @city_code %>;<%= @city_name.encode(Encoding::ISO_8859_1) if @city_name %><%= "\u000D\u000A" %> \ No newline at end of file
+<%= @city_code %>;<%= @city_name.encode(Encoding::Windows_1252) if @city_name %><%= "\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 dd069968d..031c38d7b 100644
--- a/app/views/api/hub/directions.hub.erb
+++ b/app/views/api/hub/directions.hub.erb
@@ -1 +1 @@
-<%= @journey_pattern.name.encode(Encoding::ISO_8859_1) if @journey_pattern.name %>;<%= @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
+<%= @journey_pattern.name.encode(Encoding::Windows_1252) if @journey_pattern.name %>;<%= @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 2547c1e11..fe4f6d849 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.encode(Encoding::ISO_8859_1) if @group_of_lines.name %>;<%= @group_of_lines.id %><%= "\u000D\u000A" %> \ No newline at end of file
+<%= @group_of_lines.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') %>;<%= @group_of_lines.name.encode(Encoding::Windows_1252) if @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 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
diff --git a/app/views/api/hub/lignes.hub.erb b/app/views/api/hub/lignes.hub.erb
index 921eb7056..604d52812 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.encode(Encoding::ISO_8859_1) if @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
+<%= @line.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') if @line.objectid %>;<%= @line.number %>;<%= @line.name.encode(Encoding::Windows_1252) if @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/periodes.hub.erb b/app/views/api/hub/periodes.hub.erb
index 2bb3e8368..64737c17d 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.encode(Encoding::ISO_8859_1) if @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
+<%= @code %>;<%= @comment %>;<%= @start_date %>;<%= @end_date %>;<%= @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 95ab8d547..f8894f9cd 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.encode(Encoding::ISO_8859_1) if @network.name %>;<%= @network.id %><%= "\u000D\u000A" %> \ No newline at end of file
+<%= @network.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') %>;<%= @network.name.encode(Encoding::Windows_1252) if @network.name %>;<%= @network.id %><%= "\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 595d3b5fb..8ee7aa5ce 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.encode(Encoding::ISO_8859_1) if @company.name %>;<%= @company.id %><%= "\u000D\u000A" %> \ No newline at end of file
+<%= @company.objectid.sub(/(\w*\:\w*\:)(\w*)/, '\2') %>;<%= @company.name.encode(Encoding::Windows_1252) if @company.name %>;<%= @company.id %><%= "\u000D\u000A" %> \ No newline at end of file