gares 2.0.0.pre.dev2 → 2.0.0.pre.dev3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,367 @@
1
+ HTTP/1.1 200 OK
2
+ Content-Type: text/html;charset=UTF-8
3
+ X-UA-Compatible: IE=edge
4
+ Date: Sun, 26 Apr 2015 20:19:40 GMT
5
+ Content-Length: 22174
6
+ Connection: keep-alive
7
+ Set-Cookie: SNC_city=SDN_PRD6; path=/; domain=.sncf.com
8
+
9
+
10
+
11
+
12
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
13
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
14
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr" data-placeholder-focus="false">
15
+
16
+ <head>
17
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
18
+ <title>List of trains - Traffic &amp; timetable updates | SNCF</title>
19
+ <link rel="canonical" href="http://www.sncf.com/en/horaires-info-trafic/train/resultats" />
20
+ <meta name="revisit-after" content="1 day" />
21
+ <link rel="shortcut icon" href="/theme/favicon.ico" type="image/x-icon" />
22
+ <link href="http://www.sncf.com/fr/info-trafic" rel="canonical" />
23
+ <meta http-equiv="Content-Language" content="en" /> <link type="text/css" rel="stylesheet" media="all" href="/ressources/menu_icons/menu_icons_en.css?1" />
24
+ <link type="text/css" rel="stylesheet" media="all" href="/ressources/css/css_fa8eef945cc8331059f2b2fe01e8b03b.css" />
25
+ <link type="text/css" rel="stylesheet" media="all" href="/ressources/css/css_ec8154e529f1ae274507ee7da445a16c.css" />
26
+ <link type="text/css" rel="stylesheet" media="print" href="/ressources/css/css_37cfb2f93b571bec4cf2ecfe43124557.css" />
27
+ <!--[if IE 6]>
28
+ <link type="text/css" rel="stylesheet" media="all" href="/sites/all/themes/sncfninesixty/styles/ie6.css?1" />
29
+ <![endif]-->
30
+ <!--[if lte IE 7]>
31
+ <link type="text/css" rel="stylesheet" media="all" href="/sites/all/themes/sncfninesixty/styles/ie7-and-below.css?1" />
32
+ <![endif]-->
33
+ <!--[if IE 8]>
34
+ <link type="text/css" rel="stylesheet" media="all" href="/sites/all/themes/sncfninesixty/styles/ie8.css?1" />
35
+ <![endif]-->
36
+ <!--[if gte IE 9]>
37
+ <link type="text/css" rel="stylesheet" media="all" href="/sites/all/themes/sncfninesixty/styles/ie9-and-above.css?1" />
38
+ <![endif]-->
39
+ <link href="/css/Generic-transac.css" media="all" type="text/css" rel="stylesheet" />
40
+ <link href="/css/itineraries.css" media="all" type="text/css" rel="stylesheet" /><link href="/css/train.css" media="all" type="text/css" rel="stylesheet" />
41
+ <script type="text/javascript" src="/ressources/js/js_89f43c3221c41b67e6924fff9b6a7908.js"></script>
42
+ <script type="text/javascript">
43
+ <!--//--><![CDATA[//><!--
44
+ jQuery.extend(Drupal.settings, { "basePath": "/", "googleanalytics": { "trackOutgoing": 1, "trackMailto": 1, "trackDownload": 1, "trackDownloadExtensions": "7z|aac|arc|arj|asf|asx|avi|bin|csv|doc|exe|flv|gif|gz|gzip|hqx|jar|jpe?g|js|mp(2|3|4|e?g)|mov(ie)?|msi|msp|pdf|phps|png|ppt|qtm?|ra(m|r)?|sea|sit|tar|tgz|torrent|txt|wav|wma|wmv|wpd|xls|xml|z|zip" }, "sncfcom_search_hours": { "list": { "form_start": "1", "form_end": "3" }, "calendar": { "form_start": "1", "form_end": "90" } }, "user_connected": false, "user_rights": { "1": "anonymous user" }, "user_valid": false, "site_language": "en", "site_country": null, "sncfcom_feature_id_chartes": { "nid": "32510" }, "radio": { "height": "400", "width": "632" }, "sncfcom_satisfaction": { "campaigns": [ { "sid": "1", "page": "/fr/contacts/foire-aux-questions", "height_delta": "0", "width_delta": "0", "campaign_url": "", "count_url": "" }, { "sid": "2", "page": "/fr/promotions-billets-train", "height_delta": "317", "width_delta": "25", "campaign_url": "http://www.monavis.sncf.com/website/4v0voyconet0BChH0/form/86/100?responsive=0\x26toolbar=0", "count_url": "http://jcvd.myfeelback.com/indicator/monavis_feedback_dircom?campaign=86\x26formsubmissiontag=Like" }, { "sid": "3", "page": "/fr/gare-", "height_delta": "230", "width_delta": "17", "campaign_url": "http://www.monavis.sncf.com/website/4v0vosh9h4RHM3cUM/form/85/99?responsive=0\x26toolbar=0", "count_url": "http://jcvd.myfeelback.com/indicator/monavis_feedback_dircom?campaign=85\x26formsubmissiontag=Like" }, { "sid": "4", "page": "/fr/itineraire/resultats", "height_delta": "318", "width_delta": "10", "campaign_url": "http://www.monavis.sncf.com/website/4v0voobke4qGav23I/form/84/98?responsive=0\x26toolbar=0", "count_url": "http://jcvd.myfeelback.com/indicator/monavis_feedback_dircom?campaign=84\x26formsubmissiontag=Like" } ] }, "sncfcom_tagcarrier_widget": "", "addthis": { "config_default": { "services_compact": "email,facebook,twitter,google_plusone_share,linkedin,viadeo,more", "ui_language": "en", "ui_click": true, "ui_508_compliant": false, "ui_use_css": true, "data_ga_tracker": "UA-1308810-1", "data_track_clickback": true, "pubid": "xa-4e2cfd1147868c4e" }, "share_default": null, "localize": { "share_caption": "Share with friends" } }, "campaigns_tracking": { "ttl": 90, "cname": "snc_links_id" } });
45
+ //--><!]]>
46
+ </script>
47
+ <script type="text/javascript">
48
+ <!--//--><![CDATA[//><!--
49
+ var popupradio_autoplay = true;
50
+ //--><!]]>
51
+ </script>
52
+ <script src="/js/Generic-transac.js" type="text/javascript"></script>
53
+ <script src="/js/itineraries.js" type="text/javascript"></script>
54
+ <script src="/js/ga_dynamic.js" type="text/javascript"></script>
55
+ <script src="/js/map-links.js" type="text/javascript"></script>
56
+ </head>
57
+
58
+ <body class="not-front not-logged-in page-node node-type-transac-page no-sidebars sncfcom-b2c sncfcom-colors-cb0044 i18n-en not-js">
59
+
60
+
61
+ <ul id="skip-links"><li><a href="#navbar-wrapper">Go to main menu</a></li><li><a href="#left-menu">Go to secondary menu</a></li><li><a href="#content">Go to content</a></li><li><a href="#footer">Go to footer</a></li></ul>
62
+
63
+ <div id='bubble_print' class='out'>Print this page</div><div id='bubble_share' class='out'>Share this page</div>
64
+
65
+ <div id="navbar-wrapper">
66
+ <div id="navbar">
67
+ <div id="sncf-barre-galactique" class="grid_d">
68
+
69
+ <div id="primary-menu">
70
+ <ul class="links"><li class="menu-12124 active-trail first"><a href="/en/passengers" title=" (Active section)"><span><span>Passengers</span></span></a></li>
71
+ <li class="menu-12126"><a href="/en/businesses-communities"><span><span>Businesses & Communities</span></span></a></li>
72
+ <li class="menu-15545 last"><a href="/en/group"><span><span>SNCF Group</span></span></a></li>
73
+ </ul> </div>
74
+
75
+ <div class="barre_right">
76
+
77
+ <div id="radio-menu">
78
+ <a href="#" class="open_radio"><span class="bold">SNCF</span> LA RADIO</a>
79
+ </div>
80
+
81
+
82
+ <div id="menu-langue">
83
+ <div><span>en</span></div><ul class="links" title="Change language"><li class="menu-1521 first"><a href="/voyageurs"><span class="js">Français</span><span class="no-js">Fr</span></a></li>
84
+ <li class="menu-1522"><a href="/en/passengers"><span class="js">English</span><span class="no-js">En</span></a></li>
85
+ <li class="menu-1523 last"><a href="/de/fahrgaste"><span class="js">Deutsch</span><span class="no-js">De</span></a></li>
86
+ </ul> </div>
87
+
88
+ </div>
89
+
90
+ </div> </div>
91
+ </div>
92
+ <div id="navbar-spacer"></div>
93
+
94
+ <div class="container_d">
95
+
96
+
97
+ <div class="grid_a" id="sidebar-left">
98
+ <div id="left-menu">
99
+ <div class="telecommand"><div class="arrow"></div><div class="content"><div class="logo"><a href="/en/passengers" title="Logo SNCF"><img src="/theme/images/logo-sncf.png" alt="Logo SNCF" title="Logo SNCF" width="131" height="76" /></a></div><ul><li class="menu-17388 active "><div class="text"><span><span>Tickets &amp; <span class="sncfcom-colors-automatic">train status</span></span></span></div><div class="submenu"><ul class="tc-content-2"><li class="menu-17393 no-icon first "><a href="http://en.voyages-sncf.com/en/" class=" " title="" target=""><span><span>Reservations</span></span></a></li><li class="menu-17389 active no-icon last "><a href="/en/sub-home/17389" class="sub-panel-form sub-form_infos_trafic has_sub-home sub-home-mlid-17389 " title="Open &quot;Timetables &amp; real-time traffic updates&quot; in a floating panel" target=""><span><span class='double_line'>Timetables &amp; real-time <br /><span class="sncfcom-colors-automatic">traffic updates</span></span></span></a></li></ul></div></li><li class="menu-58934 "><div class="text"><span><span>Passenger services</span></span></div><div class="submenu"><ul class="tc-content-2"><li class="menu-58935 first "><a href="/en/sub-home/58935" class=" has_sub-home sub-home-mlid-58935 " title="" target=""><span><span>All <span class="sncfcom-colors-automatic">passengers</span></span></span></a></li><li class="menu-58942 "><a href="/en/sub-home/58942" class=" has_sub-home sub-home-mlid-58942 " title="" target=""><span><span>Business <span class="sncfcom-colors-automatic">travel</span></span></span></a></li><li class="menu-58943 "><a href="/en/sub-home/58943" class=" has_sub-home sub-home-mlid-58943 " title="" target=""><span><span>Disability <span class="sncfcom-colors-automatic">access</span></span></span></a></li><li class="menu-58944 last "><a href="/en/sub-home/58944" class=" has_sub-home sub-home-mlid-58944 " title="" target=""><span><span>Group <span class="sncfcom-colors-automatic">travel</span></span></span></a></li></ul></div></li><li class="menu-58939 "><div class="text"><span><span>Trains &amp; coaches</span></span></div><div class="submenu"><ul class="tc-content-2"><li class="menu-58945 first "><a href="/en/sub-home/58945" class=" has_sub-home sub-home-mlid-58945 " title="" target=""><span><span>French <span class="sncfcom-colors-automatic">regions</span></span></span></a></li><li class="menu-58946 "><a href="/en/trains/transilien" class=" " title="" target=""><span><span>Paris <span class="sncfcom-colors-automatic">region</span></span></span></a></li><li class="menu-58947 "><a href="/en/sub-home/58947" class=" has_sub-home sub-home-mlid-58947 " title="" target=""><span><span>France</span></span></a></li><li class="menu-58948 last "><a href="/en/sub-home/58948" class=" has_sub-home sub-home-mlid-58948 " title="" target=""><span><span>Europe</span></span></a></li></ul></div></li><li class="menu-58940 "><div class="text"><span><span>Fares &amp; cards</span></span></div><div class="submenu"><ul class="tc-content-2"><li class="menu-17377 first "><a href="/en/special-deals" class=" " title="" target=""><span><span>Special Deals</span></span></a></li><li class="menu-58949 "><a href="/en/sub-home/58949" class=" has_sub-home sub-home-mlid-58949 " title="" target=""><span><span>Cards &amp; <span class="sncfcom-colors-automatic">discounts</span></span></span></a></li><li class="menu-58950 "><a href="/en/sub-home/58950" class=" has_sub-home sub-home-mlid-58950 " title="" target=""><span><span>Special <span class="sncfcom-colors-automatic">fares</span></span></span></a></li><li class="menu-58951 last "><a href="/en/sub-home/58951" class=" has_sub-home sub-home-mlid-58951 " title="" target=""><span><span>Loyalty <span class="sncfcom-colors-automatic">programmes</span></span></span></a></li></ul></div></li><li class="menu-58941 "><div class="text"><span><span>Customer relations</span></span></div><div class="submenu"><ul class="tc-content-2"><li class="menu-58990 first "><a href="/en/sub-home/58990" class=" has_sub-home sub-home-mlid-58990 " title="" target=""><span><span>Talk to us <span class="sncfcom-colors-automatic">on line</span></span></span></a></li><li class="menu-58952 "><a href="/en/sub-home/58952" class=" has_sub-home sub-home-mlid-58952 " title="" target=""><span><span>Contact <span class="sncfcom-colors-automatic">us</span></span></span></a></li><li class="menu-58953 "><a href="/en/sub-home/58953" class=" has_sub-home sub-home-mlid-58953 " title="" target=""><span><span>Our <span class="sncfcom-colors-automatic">commitments</span></span></span></a></li><li class="menu-58954 last "><a href="/en/sub-home/58954" class=" has_sub-home sub-home-mlid-58954 " title="" target=""><span><span class='double_line'>After-sales service <br /><span class="sncfcom-colors-automatic">&amp; Ombudsman</span></span></span></a></li></ul></div></li></ul></div></div>
100
+ </div>
101
+ </div>
102
+
103
+
104
+ <div class="grid_c container_content_12" id="content">
105
+
106
+ <div id="sncf-logo-print" class="grid_12"><img src="/theme/images/logo.png" alt ="" /></div>
107
+
108
+
109
+ <div class="content_text">
110
+ <div class="breadcrumb grid_10"><ul><li>Passengers</li> / <li>Tickets & train status</li> / <li>Timetables & real-time traffic updates</li> / <li title="Active page" class="last">Résultat de recherche : fiche train (en)</li></ul></div><div class="action-links grid_2">&nbsp;<span>&nbsp; <a class="print" target="_blank" href="/en/jprint/train/resultats">
111
+ </a>
112
+ <a role="button" class="addthis_button share" href="/en/horaires-info-trafic/train/resultats#">Share this page</a></span></div><div id="node-32510" class=" node clear-block">
113
+
114
+
115
+
116
+ <div class="content">
117
+ <div id="block-itineraires" class="transac-block transac-header">
118
+
119
+ <div class="container_12">
120
+ <h1 class="grid_9">
121
+ Timetables & real-time <br/><span class="sncfcom-colors-automatic">traffic updates</span>
122
+ </h1>
123
+ <div id="description" class="grid_8">
124
+ <h2>
125
+ Your <span class="sncfcom-colors-automatic">
126
+ search </span>
127
+ </h2>
128
+
129
+ <p class="search_summary">
130
+ Train no. : <strong>6815</strong><br/>
131
+ Travel date :
132
+ <strong> Saturday 25 April </strong>
133
+ </p>
134
+
135
+ <div class="search_modify">
136
+ <a href="/sncf/train/displayForm" id="lien-modifiere" class="sncfcom-colors-action-automatic">
137
+ Modify your search </a>
138
+ </div>
139
+
140
+ </div>
141
+ </div>
142
+
143
+
144
+ <div class="clear"></div>
145
+ <div id="detailed-results">
146
+ <div id="has_results">
147
+ <div id="result-container">
148
+ <ul class="itinerary-details">
149
+
150
+ <li class="itinerary-abstract">
151
+ <div class="cell duration">Duration <strong>0h45</strong></div>
152
+ <div class="cell connection">
153
+ Direct journey </div>
154
+ <div class="cell itinerary-message ">
155
+ <span class="middle"></span>
156
+ </div>
157
+ <div class="cell emissions">
158
+ <div class="co2-value">n.a. </div>
159
+ </div>
160
+ <hr class="clear" />
161
+ </li>
162
+
163
+ <li class="itinerary-train">
164
+ <ul>
165
+ <li class="train-details">
166
+ <table>
167
+ <tr>
168
+ <td class="train TRN">
169
+ <div class="middle">
170
+ INTERCITÉS no.
171
+ <strong class="map-links-loc-train">
172
+ <a href="/sncf/train?numeroTrain=6815&date=25/04/2015&heure=&fromRedirect=true">6815</a>
173
+ </strong>
174
+ <br/>
175
+ Destination : Zweisimmen
176
+ </td>
177
+ <td class="booking ">
178
+ <div class="middle">
179
+ </div>
180
+ </td>
181
+ <td class="services-on-board ">
182
+ </td>
183
+ </tr>
184
+ </table>
185
+ </li>
186
+
187
+ <li class="train-info ">
188
+ <a href="/en/geolocation?data-map-livemap-infotexts=RT|6815&data-map-livemap-unmatched=true&data-map-zoom=13&data-map-livemap-unmatched=true" class="real-time link-maps train_6815" target="_blank"><div class="picto"></div>Track this train in real time</a>
189
+ <div class="train-punctuality-details ajax-error-ponctuality hide">
190
+ <div class="info_txt">This service is temporarily unavailable. Please come back later.</div>
191
+ <a href="#" class="close">X</a>
192
+ </div>
193
+ </li>
194
+
195
+ </ul>
196
+ <hr class="clear" />
197
+ </li>
198
+
199
+ <li class="row itinerary-stations">
200
+ <table class="timetable ">
201
+ <tr class="itinerary-space">
202
+ <td class="one"></td>
203
+ <td class="two new-schedule"></td>
204
+ <td class="three"></td>
205
+ <td class="four"></td>
206
+ <td class="five"></td>
207
+ <td class="six"></td>
208
+ </tr>
209
+ <tr class="itinerary-header">
210
+ <th class="duration">Timetables</th>
211
+ <th class="duration new-schedule"></th>
212
+ <th class="line"><div class="vertical-hr"></div></th>
213
+ <th class="stations">Stops</th>
214
+ <th class="track">Platform</th>
215
+ <th class="info">Information</th>
216
+ </tr>
217
+ <tr class="itinerary-hr first">
218
+ <td colspan="6"><hr /></td>
219
+ </tr>
220
+
221
+
222
+
223
+
224
+
225
+ <tr class=" itinerary-start first left ">
226
+ <td class="time">
227
+ 09H12
228
+ </td>
229
+ <td class="time new-schedule">
230
+
231
+ </td>
232
+ <td class="line"><hr class="min-height" /></td>
233
+ <td class="stations">
234
+ <div class="station">SPIEZ</div>
235
+
236
+ </td>
237
+ <td class="track">
238
+ --
239
+ </td>
240
+ <td class="info ">
241
+ <div class="titre">On time</div>
242
+ </td>
243
+ </tr>
244
+
245
+
246
+
247
+
248
+
249
+
250
+ <tr class=" itinerary-stop left ">
251
+ <td class="time">
252
+ 09H22<br/>09H23
253
+ </td>
254
+ <td class="time new-schedule">
255
+
256
+ </td>
257
+ <td class="line"><hr class="min-height" /></td>
258
+ <td class="stations">
259
+ <div class="station">OEY-DIEMTIGEN</div>
260
+ <div class="stop-duration">(1-minute stop)</div>
261
+ </td>
262
+ <td class="track">
263
+ --
264
+ </td>
265
+ <td class="info ">
266
+ <div class="titre">On time</div>
267
+ </td>
268
+ </tr>
269
+
270
+
271
+
272
+
273
+
274
+
275
+ <tr class=" itinerary-end last left ">
276
+ <td class="time">
277
+ 09H57
278
+ </td>
279
+ <td class="time new-schedule">
280
+
281
+ </td>
282
+ <td class="line"><hr class="min-height" /></td>
283
+ <td class="stations">
284
+ <div class="station">ZWEISIMMEN</div>
285
+
286
+ </td>
287
+ <td class="track">
288
+ --
289
+ </td>
290
+ <td class="info ">
291
+ <div class="titre">On time</div>
292
+ </td>
293
+ </tr>
294
+
295
+ <tr class="itinerary-hr last">
296
+ <td colspan="6"> </td>
297
+ </tr>
298
+ </table>
299
+ </li>
300
+ </ul>
301
+ </div>
302
+ </div>
303
+ </div>
304
+ <hr class="clear" />
305
+ </div>
306
+ </div>
307
+
308
+ </div>
309
+ </div>
310
+
311
+
312
+ <div class="grid_c alpha omega" id="footer">
313
+ <div class="footer_content">
314
+
315
+ <div id="forgotten_password_block">
316
+ <a id="lb-close" tabindex="2">Fermer la popin</a>
317
+ <div class="forgotten_password identity">
318
+ <h3>Mot de passe oublié ?</h3>
319
+ <hr class="clear-border" />
320
+ <span class="identity-message">Indiquez l'adresse électronique utilisée lors de la création<br /> de votre compte. Un courriel vous sera envoyé pour définir<br /> votre mot de passe.</span>
321
+ <div class="form-item mail">
322
+ <label for="forgotten_password_email">Adresse électronique :</label>
323
+ <div class="message_fpw sncfcom-colors-error-automatic sncfcom-colors-automatic"></div>
324
+ <input type="text" maxlength="60" size="60" name="email_link" id="forgotten_password_email" value="" />
325
+ </div>
326
+ <div class="form-item">
327
+ <input type="submit" name="op" id="edit-send-mail-retrieve-password" value="Envoyer" class="form-submit sncfcom-colors-action-automatic sncfcom-colors-internal-caps-automatic" />
328
+ </div>
329
+ <div class="response-forgotten-password sncfcom-colors-automatic"></div>
330
+ </div>
331
+ </div>
332
+ <div id="block-sncfcom_navigation-footer" class="block block-sncfcom_navigation">
333
+
334
+ <div class="content">
335
+
336
+ <h2 class="grid_3 omega">Quick access : </h2>
337
+ <div id="quick-access" class="grid_10 alpha omega"><ul class="menu"><li class="leaf first"><a href="/en/education/schools">Teachers</a></li>
338
+ <li class="leaf last"><a href="/en/meet-sncf/finance/news">Finance</a></li>
339
+ </ul></div>
340
+
341
+ <hr class="clear border grid_12 no-margin" />
342
+
343
+ <div id="universes" class="grid_12"><ul class="menu"><li class="grid_4 first "><span><span>Passengers</span></span><ul class="menu"><li><a href="/en/reductions/lowest-fares">Travel at the lowest fares</a></li><li><a href="/en/services/mobile-apps-old">Mobile apps</a></li><li><a href="/en/services/after-sales-services">After-sales service</a></li></ul></li><li class="grid_4 "><span><span>Business and local communities</span></span><ul class="menu"><li><a href="/en/sub-home/15515">For business</a></li><li><a href="/en/sub-home/15518">For local communities</a></li><li><a href="/en/railway-companies">Railway Companies</a></li></ul></li><li class="grid_4 last "><span><span>SNCF Group</span></span><ul class="menu"><li><a href="/en/businesses/global-presence">Our global presence</a></li><li><a href="/en/our-commitments/sncf-foundation">SNCF Foundation</a></li></ul></li></ul></div>
344
+
345
+ <div id="radio-link" class="grid_4"><a href="http://laradio.sncf.com" target="_blank"><span class="bold">SNCF</span> LA RADIO</a></div>
346
+ <div id="about" class="grid_8"><ul class="menu"><li class="leaf first"><a href="/en/footer/legal-notice">Legal notice</a></li>
347
+ <li class="leaf last"><a href="http://sncf.com/cil/registre/">Contact for IT &amp; civil liberties issues</a></li>
348
+ </ul></div>
349
+
350
+ <hr class="clear" /> </div>
351
+ </div>
352
+ </div>
353
+ </div>
354
+
355
+ </div>
356
+ <div class="clear"></div>
357
+
358
+ </div>
359
+ <script type="text/javascript">
360
+ <!--//--><![CDATA[//><!--
361
+ var _gaq = _gaq || [];_gaq.push(["_setAccount", "UA-1308810-17"]);_gaq.push(["b._setAccount", "UA-1308810-1"]);(function() {var ga = document.createElement("script");ga.type = "text/javascript";ga.async = true;ga.src = ("https:" == document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js";var s = document.getElementsByTagName("script")[0];s.parentNode.insertBefore(ga, s);})();
362
+ //--><!]]>
363
+ </script>
364
+
365
+ </body>
366
+ </html>
367
+
Binary file
@@ -79,6 +79,12 @@ describe Gares::Search do
79
79
  @stations = Gares::Station.search('MONTPELLIER SAINT-ROCH')
80
80
  expect(@stations.first.sncf_id.downcase).to eql('frmpl')
81
81
  end
82
+
83
+ it 'should return the gare sncf_id.downcase correctly' do
84
+ @stations = Gares::Station.search('CHALON SUR SAONE')
85
+ expect(@stations.first.sncf_id.downcase).to eql('frxcd')
86
+ end
87
+
82
88
  end
83
89
  end
84
90
  end
@@ -93,4 +93,24 @@ describe Gares::Train do
93
93
  expect(subject.arrival.platform).to eq('--')
94
94
  end
95
95
  end
96
+
97
+ describe 'a multi-itinerary train' do
98
+ let (:train_number) { 6815 }
99
+ let (:date) { Time.parse("2015-04-25") }
100
+
101
+ before do
102
+ # See tasks/fixtures.rake to change dataset
103
+ fake_response_for_train(train_number)
104
+ end
105
+
106
+ subject do
107
+ Gares::Train.new(train_number, date)
108
+ end
109
+
110
+ it "selects always the first itinerary", focus: true do
111
+ expect(subject.departure.station.name).to eq("Dijon Ville")
112
+ expect(subject.stops.first.station.name).to eq("Chalon-sur-Saône")
113
+ expect(subject.arrival.station.name).to eq("Nice Ville")
114
+ end
115
+ end
96
116
  end
data/spec/spec_helper.rb CHANGED
@@ -41,7 +41,11 @@ TRAINS_SAMPLES = [
41
41
  { 17709 => 'train-17709' },
42
42
  { 11641 => 'train-11641' },
43
43
  { 17495 => 'train-17495' },
44
- { 6815 => 'train-6815' }, # Multi-itinerary
44
+ { 6815 => 'train-6815' }, # Multi-itinerary see MULTI_TRAINS_SAMPLES
45
+ ]
46
+
47
+ MULTI_TRAINS_SAMPLES = [
48
+ { 6815 => ['train-6815-0', 'train-6815-1'] },
45
49
  ]
46
50
 
47
51
  unless ENV['LIVE_TEST']
@@ -63,10 +67,18 @@ def fake_response_for_train(number)
63
67
  unless ENV['LIVE_TEST']
64
68
  begin
65
69
  response = TRAINS_SAMPLES.find { |sample| sample.keys.first == number }.values.first
70
+ multi_responses = MULTI_TRAINS_SAMPLES.find { |sample| sample.keys.first == number }
71
+ multi_responses = multi_responses.nil? ? [] : multi_responses.values.first
66
72
  sncf_result_url = 'http://www.sncf.com/en/horaires-info-trafic/train/resultats'
67
73
  FakeWeb.register_uri(:get, sncf_result_url, response: read_fixture("get-#{response}"))
68
74
  sncf_post_url = 'http://www.sncf.com/sncf/train'
69
75
  FakeWeb.register_uri(:post, sncf_post_url, response: read_fixture("post-#{response}"))
76
+ multi_responses.each_with_index do |multi_response, idx|
77
+ sncf_get_multi_url = "http://www.sncf.com/sncf/train/displayDetailTrain?idItineraire=#{idx}"
78
+ FakeWeb.register_uri(:get, sncf_get_multi_url, response: read_fixture("get-#{multi_response}"))
79
+ sncf_get_data_url = "http://www.sncf.com/en/horaires-info-trafic/train/resultats?#{idx}"
80
+ FakeWeb.register_uri(:get, sncf_get_data_url, response: read_fixture("get-#{multi_response}-data"))
81
+ end
70
82
  rescue LoadError
71
83
  puts 'Could not load FakeWeb, these tests will hit gares-en-mouvement.com'
72
84
  puts 'You can run `gem install fakeweb` to stub out the responses.'
data/tasks/fixtures.rake CHANGED
@@ -34,6 +34,23 @@ namespace :fixtures do
34
34
  File.open(File.expand_path(File.dirname(__FILE__) + "/../spec/fixtures/#{get_fixture}"), 'w') do |f|
35
35
  f.write(page)
36
36
  end
37
+
38
+ MULTI_TRAINS_SAMPLES.find { |one| one.keys.first == train_number }.values.first.each_with_index do |fixture, idx|
39
+ get_fixture = "get-#{fixture}"
40
+ get_fixture_data = "#{get_fixture}-data"
41
+ page = `curl -is 'http://www.sncf.com/sncf/train/displayDetailTrain?idItineraire=#{idx}' -H 'Cookie: #{cookies.join(";")}'`
42
+
43
+ File.open(File.expand_path(File.dirname(__FILE__) + "/../spec/fixtures/#{get_fixture}"), 'w') do |f|
44
+ f.write(page)
45
+ end
46
+
47
+ page = `curl -is 'http://www.sncf.com/en/horaires-info-trafic/train/resultats?#{idx}' -H 'Cookie: #{cookies.join(";")}'`
48
+
49
+ File.open(File.expand_path(File.dirname(__FILE__) + "/../spec/fixtures/#{get_fixture_data}"), 'w') do |f|
50
+ f.write(page)
51
+ end
52
+
53
+ end
37
54
  end
38
55
  end
39
56
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gares
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre.dev2
4
+ version: 2.0.0.pre.dev3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Bonaud
@@ -234,6 +234,10 @@ files:
234
234
  - spec/fixtures/get-train-17495
235
235
  - spec/fixtures/get-train-17709
236
236
  - spec/fixtures/get-train-6815
237
+ - spec/fixtures/get-train-6815-0
238
+ - spec/fixtures/get-train-6815-0-data
239
+ - spec/fixtures/get-train-6815-1
240
+ - spec/fixtures/get-train-6815-1-data
237
241
  - spec/fixtures/post-train-11641
238
242
  - spec/fixtures/post-train-17495
239
243
  - spec/fixtures/post-train-17709