middleman-core 4.3.11 → 4.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/features/asset_hash.feature +64 -62
  3. data/features/data.feature +20 -0
  4. data/features/front-matter-neighbor.feature +33 -27
  5. data/features/front-matter.feature +11 -5
  6. data/features/i18n_preview.feature +238 -238
  7. data/features/support/env.rb +0 -3
  8. data/features/unicode_filenames.feature +3 -3
  9. data/fixtures/basic-data-app/data/test3.toml +7 -0
  10. data/fixtures/basic-data-app/source/data4.html.erb +5 -0
  11. data/fixtures/frontmatter-app/source/raw-front-matter-toml.html +6 -0
  12. data/fixtures/frontmatter-app/source/raw-front-matter.html +1 -1
  13. data/fixtures/frontmatter-neighbor-app/source/raw-front-matter-toml.html +1 -0
  14. data/fixtures/frontmatter-neighbor-app/source/raw-front-matter-toml.html.frontmatter +4 -0
  15. data/lib/middleman-core/builder.rb +1 -1
  16. data/lib/middleman-core/core_extensions/data.rb +4 -2
  17. data/lib/middleman-core/core_extensions/default_helpers.rb +1 -0
  18. data/lib/middleman-core/core_extensions/front_matter.rb +1 -0
  19. data/lib/middleman-core/core_extensions/rendering.rb +0 -6
  20. data/lib/middleman-core/dns_resolver.rb +2 -4
  21. data/lib/middleman-core/dns_resolver/basic_network_resolver.rb +0 -2
  22. data/lib/middleman-core/extensions/asset_hash.rb +1 -1
  23. data/lib/middleman-core/preview_server/server_ip_address.rb +5 -14
  24. data/lib/middleman-core/step_definitions/commandline_steps.rb +0 -4
  25. data/lib/middleman-core/step_definitions/middleman_steps.rb +1 -1
  26. data/lib/middleman-core/template_context.rb +3 -3
  27. data/lib/middleman-core/util/data.rb +28 -0
  28. data/lib/middleman-core/version.rb +1 -1
  29. data/middleman-core.gemspec +8 -6
  30. data/spec/middleman-core/dns_resolver_spec.rb +8 -24
  31. data/spec/spec_helper.rb +0 -3
  32. metadata +51 -20
  33. data/features/stylus.feature +0 -54
  34. data/lib/middleman-core/renderers/stylus.rb +0 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a6c24e6aadd1825d0b97243b66abcfc1e1e55bd2614d2bb38d16e090eacf93d
4
- data.tar.gz: 508ed84f8d68b46a4a8216d5faec3ca534e9c2e26afb8ce5bc0e7caa99bb21d1
3
+ metadata.gz: b1f4f69e1bba1d983065346cf36c173aab0860d69a999957d22daeb0e61bd289
4
+ data.tar.gz: 2922b799bac4d66fa1831d5a67edcdeff0ae108493b1f1477bc629576a23337b
5
5
  SHA512:
6
- metadata.gz: 5ee86cb278396a0db2d9d7355cfcc4b48407499f3f24a41c0ab71d8776a89118311a5014ca194ea45dd4bdc0374e67341ac1e25aa8075758fc13d4776a56027f
7
- data.tar.gz: 7cc9c4fbc9e0489aab97a206d9687bd5edca75f3e199b9e1d08e547d532e0d8c3abf1983b6abeaa52bb82826a28d632ebfe318571c73c6a52db602c1d0704f93
6
+ metadata.gz: a5d44855c0bf8fca98176cab82fdce08052d6bfb3af9175ecaa8c839381756e66686dcef108aaf2a32a29d6f577f337d1fb3524f98ae3f7378b15d8b084dbb9c
7
+ data.tar.gz: 585c2f1d9f4c2577bccd312663746f801349ec245f8e8c6b395087159eb7215401cf21c2ab2f7dd9ff1d8dfdc6c2b69ca9e6d97d986329a08011be3e604ef143
@@ -3,27 +3,27 @@ Feature: Assets get file hashes appended to them and references to them are upda
3
3
  Given a successfully built app at "asset-hash-app"
4
4
  When I cd to "build"
5
5
  Then the following files should exist:
6
- | index.html |
7
- | apple-touch-icon.png |
8
- | favicon.ico |
9
- | images/100px-1242c368.png |
10
- | images/100px-5fd6fb90.jpg |
11
- | images/200px-c11eb203.jpg |
12
- | images/300px-59adce76.jpg |
13
- | images/100px-5fd6fb90.gif |
6
+ | index.html |
7
+ | apple-touch-icon.png |
8
+ | favicon.ico |
9
+ | images/100px-1242c368.png |
10
+ | images/100px-5fd6fb90.jpg |
11
+ | images/200px-c11eb203.jpg |
12
+ | images/300px-59adce76.jpg |
13
+ | images/100px-5fd6fb90.gif |
14
14
  | javascripts/application-1d8d5276.js |
15
- | stylesheets/site-8bc55985.css |
16
- | index.html |
17
- | subdir/index.html |
18
- | other/index.html |
19
- | api.json |
20
- | subdir/api.json |
15
+ | stylesheets/site-8bc55985.css |
16
+ | index.html |
17
+ | subdir/index.html |
18
+ | other/index.html |
19
+ | api.json |
20
+ | subdir/api.json |
21
21
  And the following files should not exist:
22
- | images/100px.png |
23
- | images/100px.jpg |
24
- | images/100px.gif |
22
+ | images/100px.png |
23
+ | images/100px.jpg |
24
+ | images/100px.gif |
25
25
  | javascripts/application.js |
26
- | stylesheets/site.css |
26
+ | stylesheets/site.css |
27
27
 
28
28
  And the file "javascripts/application-1d8d5276.js" should contain "img.src = '/images/100px-5fd6fb90.jpg'"
29
29
  And the file "stylesheets/site-8bc55985.css" should contain:
@@ -54,7 +54,7 @@ Feature: Assets get file hashes appended to them and references to them are upda
54
54
  Given a successfully built app at "asset-hash-app"
55
55
  When I cd to "build"
56
56
  Then the following files should exist:
57
- | fonts/fontawesome-webfont-56ce13e7.woff |
57
+ | fonts/fontawesome-webfont-56ce13e7.woff |
58
58
  | fonts/fontawesome-webfont-10752316.woff2 |
59
59
  And the file "stylesheets/uses_fonts-88aa3e2b.css" should contain "src: url('../fonts/fontawesome-webfont-10752316.woff2')"
60
60
  And the file "stylesheets/uses_fonts-88aa3e2b.css" should contain "url('../fonts/fontawesome-webfont-56ce13e7.woff')"
@@ -171,23 +171,25 @@ Feature: Assets get file hashes appended to them and references to them are upda
171
171
  And I should see 'url("http://middlemanapp.com/images/100px-5fd6fb90.jpg?#test")'
172
172
  And I should see 'url("http://middlemanapp.com/images/100px-5fd6fb90.jpg#test")'
173
173
 
174
+ @wip
174
175
  Scenario: The asset hash should change when a SASS partial changes
175
176
  Given the Server is running at "asset-hash-app"
176
177
  And the file "source/stylesheets/_partial.sass" has the contents
177
178
  """
178
179
  body
179
- font-size: 14px
180
+ font-size: 14px
180
181
  """
181
182
  When I go to "/partials/"
182
183
  Then I should see 'href="../stylesheets/uses_partials-a3c8302b.css'
183
184
  And the file "source/stylesheets/_partial.sass" has the contents
184
185
  """
185
186
  body
186
- font-size: 18px !important
187
+ font-size: 18px !important
187
188
  """
188
189
  When I go to "/partials/"
189
190
  Then I should see 'href="../stylesheets/uses_partials-08ee47a7.css'
190
191
 
192
+ @wip
191
193
  Scenario: The asset hash should change when a Rack-based filter changes
192
194
  Given a fixture app "asset-hash-app"
193
195
  And a file named "config.rb" with:
@@ -211,9 +213,9 @@ Feature: Assets get file hashes appended to them and references to them are upda
211
213
  """
212
214
  is_stylesheet = proc { |path| path.start_with? 'stylesheets' }
213
215
  activate :asset_hash, ignore: [
214
- %r(javascripts/*),
215
- 'images/*',
216
- is_stylesheet
216
+ %r(javascripts/*),
217
+ 'images/*',
218
+ is_stylesheet
217
219
  ]
218
220
  activate :relative_assets
219
221
  activate :directory_indexes
@@ -221,25 +223,25 @@ Feature: Assets get file hashes appended to them and references to them are upda
221
223
  And a successfully built app at "asset-hash-app"
222
224
  When I cd to "build"
223
225
  Then the following files should exist:
224
- | index.html |
225
- | apple-touch-icon.png |
226
- | favicon.ico |
227
- | images/100px.png |
228
- | images/100px.jpg |
229
- | images/100px.gif |
226
+ | index.html |
227
+ | apple-touch-icon.png |
228
+ | favicon.ico |
229
+ | images/100px.png |
230
+ | images/100px.jpg |
231
+ | images/100px.gif |
230
232
  | javascripts/application.js |
231
- | stylesheets/site.css |
232
- | index.html |
233
- | subdir/index.html |
234
- | other/index.html |
235
- | api.json |
236
- | subdir/api.json |
233
+ | stylesheets/site.css |
234
+ | index.html |
235
+ | subdir/index.html |
236
+ | other/index.html |
237
+ | api.json |
238
+ | subdir/api.json |
237
239
  And the following files should not exist:
238
- | images/100px-1242c368.png |
239
- | images/100px-5fd6fb90.jpg |
240
- | images/100px-5fd6fb90.gif |
240
+ | images/100px-1242c368.png |
241
+ | images/100px-5fd6fb90.jpg |
242
+ | images/100px-5fd6fb90.gif |
241
243
  | javascripts/application-1d8d5276.js |
242
- | stylesheets/site-7474cadd.css |
244
+ | stylesheets/site-7474cadd.css |
243
245
 
244
246
  Scenario: Hashed-asset files are not replaced for rewrite ignored paths
245
247
  Given a fixture app "asset-hash-app"
@@ -247,9 +249,9 @@ Feature: Assets get file hashes appended to them and references to them are upda
247
249
  """
248
250
  is_stylesheet = proc { |path| path.start_with? '/stylesheets' }
249
251
  activate :asset_hash, rewrite_ignore: [
250
- %r(javascripts/*),
251
- '/subdir/*',
252
- is_stylesheet
252
+ %r(javascripts/*),
253
+ '/subdir/*',
254
+ is_stylesheet
253
255
  ]
254
256
  activate :relative_assets
255
257
  activate :directory_indexes
@@ -257,15 +259,15 @@ Feature: Assets get file hashes appended to them and references to them are upda
257
259
  And a successfully built app at "asset-hash-app"
258
260
  When I cd to "build"
259
261
  Then the following files should exist:
260
- | index.html |
261
- | subdir/index.html |
262
- | images/100px-5fd6fb90.jpg |
262
+ | index.html |
263
+ | subdir/index.html |
264
+ | images/100px-5fd6fb90.jpg |
263
265
  | javascripts/application-1d8d5276.js |
264
- | stylesheets/site-8bc55985.css |
266
+ | stylesheets/site-8bc55985.css |
265
267
  And the following files should not exist:
266
- | images/100px.jpg |
268
+ | images/100px.jpg |
267
269
  | javascripts/application.js |
268
- | stylesheets/site.css |
270
+ | stylesheets/site.css |
269
271
  And the file "javascripts/application-1d8d5276.js" should contain "img.src = '/images/100px.jpg'"
270
272
  And the file "stylesheets/site-8bc55985.css" should contain:
271
273
  """
@@ -285,7 +287,7 @@ Feature: Assets get file hashes appended to them and references to them are upda
285
287
  When I cd to "build"
286
288
  Then the following files should exist:
287
289
  | javascripts/jquery.min-276c87ff.js |
288
- | stylesheets/test-7de2ad06.css |
290
+ | stylesheets/test-7de2ad06.css |
289
291
  And the following files should not exist:
290
292
  | javascripts/jquery.min.js |
291
293
  And the file "stylesheets/test-7de2ad06.css" should contain:
@@ -299,12 +301,12 @@ Feature: Assets get file hashes appended to them and references to them are upda
299
301
  Given a successfully built app at "asset-hash-source-map"
300
302
  When I cd to "build"
301
303
  Then the following files should exist:
302
- | index.html |
303
- | javascripts/application-4553338c.js |
304
+ | index.html |
305
+ | javascripts/application-4553338c.js |
304
306
  | javascripts/application.js-22cc2b5f.map |
305
- | index.html |
307
+ | index.html |
306
308
  And the following files should not exist:
307
- | javascripts/application.js |
309
+ | javascripts/application.js |
308
310
  | javascripts/application.js.map |
309
311
 
310
312
  And the file "javascripts/application-4553338c.js" should contain "//# sourceMappingURL=application.js-22cc2b5f.map"
@@ -313,12 +315,12 @@ Feature: Assets get file hashes appended to them and references to them are upda
313
315
  Given a successfully built app at "asset-hash-prefix"
314
316
  When I cd to "build"
315
317
  Then the following files should exist:
316
- | index.html |
317
- | javascripts/application-myprefix-4553338c.js |
318
+ | index.html |
319
+ | javascripts/application-myprefix-4553338c.js |
318
320
  | javascripts/application.js-myprefix-22cc2b5f.map |
319
- | index.html |
321
+ | index.html |
320
322
  And the following files should not exist:
321
- | javascripts/application.js |
323
+ | javascripts/application.js |
322
324
  | javascripts/application.js.map |
323
325
 
324
326
  And the file "javascripts/application-myprefix-4553338c.js" should contain "//# sourceMappingURL=application.js-myprefix-22cc2b5f.map"
@@ -327,12 +329,12 @@ Feature: Assets get file hashes appended to them and references to them are upda
327
329
  Given a successfully built app at "asset-hash-remove-filename"
328
330
  When I cd to "build"
329
331
  Then the following files should exist:
330
- | index.html |
331
- | javascripts/4553338c.js |
332
+ | index.html |
333
+ | javascripts/4553338c.js |
332
334
  | javascripts/22cc2b5f.map |
333
- | index.html |
335
+ | index.html |
334
336
  And the following files should not exist:
335
- | javascripts/application.js |
337
+ | javascripts/application.js |
336
338
  | javascripts/application.js.map |
337
339
 
338
340
  And the file "javascripts/4553338c.js" should contain "//# sourceMappingURL=22cc2b5f.map"
@@ -89,3 +89,23 @@ Feature: Local Data API
89
89
  Then I should see "<h1>With Content</h1>"
90
90
  Then I should see '<h2 id="header-2">Header 2</h2>'
91
91
  Then I should see "<p>Paragraph 1</p>"
92
+
93
+ Scenario: Rendering toml
94
+ Given the Server is running at "basic-data-app"
95
+ When I go to "/data4.html"
96
+ Then I should see "One:Two"
97
+ When the file "data/test3.toml" has the contents
98
+ """
99
+ [titles]
100
+
101
+ [titles.first]
102
+ title = "Three"
103
+
104
+ [titles.second]
105
+ title = "Four"
106
+ """
107
+ When I go to "/data4.html"
108
+ Then I should see "Three:Four"
109
+ When the file "data/test3.toml" is removed
110
+ When I go to "/data4.html"
111
+ Then I should see "No Test Data"
@@ -23,6 +23,12 @@ Feature: Neighboring YAML Front Matter
23
23
  When I go to "/raw-front-matter.php.frontmatter"
24
24
  Then I should see "File Not Found"
25
25
 
26
+ Scenario: Rendering raw (template-less) (toml)
27
+ Given the Server is running at "frontmatter-neighbor-app"
28
+ When I go to "/raw-front-matter-toml.html"
29
+ Then I should see "<h1><%= current_page.data.title %></h1>"
30
+ Then I should not see "---"
31
+
26
32
  Scenario: YAML not on first line, with encoding
27
33
  Given the Server is running at "frontmatter-neighbor-app"
28
34
  When I go to "/front-matter-encoding.html"
@@ -65,10 +71,10 @@ Feature: Neighboring YAML Front Matter
65
71
  Scenario: A template should handle an empty YAML feed
66
72
  Given the Server is running at "frontmatter-neighbor-app"
67
73
  And the file "source/front-matter-change.html.erb.frontmatter" has the contents
68
- """
69
- ---
70
- ---
71
- """
74
+ """
75
+ ---
76
+ ---
77
+ """
72
78
  When I go to "/front-matter-change.html"
73
79
  Then I should not see "Hello World"
74
80
  Then I should not see "Hola Mundo"
@@ -78,14 +84,14 @@ Feature: Neighboring YAML Front Matter
78
84
  Scenario: Setting layout, ignoring, and disabling directory indexes through frontmatter (build)
79
85
  Given a successfully built app at "frontmatter-settings-neighbor-app"
80
86
  Then the following files should exist:
81
- | build/proxied.html |
87
+ | build/proxied.html |
82
88
  And the file "build/alternate_layout.html" should contain "Alternate layout"
83
89
  And the following files should not exist:
84
- | build/ignored.html |
85
- | build/alternate_layout.html.erb.frontmatter |
86
- | build/ignored.html.erb.frontmatter |
90
+ | build/ignored.html |
91
+ | build/alternate_layout.html.erb.frontmatter |
92
+ | build/ignored.html.erb.frontmatter |
87
93
  | build/override_layout.html.erb.frontmatter |
88
- | build/page_mentioned.html.erb.frontmatter |
94
+ | build/page_mentioned.html.erb.frontmatter |
89
95
 
90
96
  Scenario: Setting layout, ignoring, and disabling directory indexes through frontmatter (preview)
91
97
  Given the Server is running at "frontmatter-settings-neighbor-app"
@@ -130,22 +136,22 @@ Feature: Neighboring YAML Front Matter
130
136
  When I go to "/page_mentioned.html.erb.frontmatter"
131
137
  Then I should see "File Not Found"
132
138
 
133
- # Scenario: Neighbor frontmatter for destination of proxy resources
134
- # Given the Server is running at "frontmatter-settings-neighbor-app"
135
- # And the file "source/proxied_with_frontmatter.html.frontmatter" has the contents
136
- # """
137
- # ---
138
- # title: Proxied title
139
- # ---
140
- # """
141
- # And the file "source/ignored.html.erb" has the contents
142
- # """
143
- # ---
144
- # ignored: true
145
- # ---
139
+ # Scenario: Neighbor frontmatter for destination of proxy resources
140
+ # Given the Server is running at "frontmatter-settings-neighbor-app"
141
+ # And the file "source/proxied_with_frontmatter.html.frontmatter" has the contents
142
+ # """
143
+ # ---
144
+ # title: Proxied title
145
+ # ---
146
+ # """
147
+ # And the file "source/ignored.html.erb" has the contents
148
+ # """
149
+ # ---
150
+ # ignored: true
151
+ # ---
146
152
 
147
- # <%= current_resource.data.inspect %>
148
- # <%= current_resource.data.title %>
149
- # """
150
- # When I go to "/proxied_with_frontmatter.html"
151
- # Then I should see "Proxied title"
153
+ # <%= current_resource.data.inspect %>
154
+ # <%= current_resource.data.title %>
155
+ # """
156
+ # When I go to "/proxied_with_frontmatter.html"
157
+ # Then I should see "Proxied title"
@@ -72,10 +72,16 @@ Feature: YAML Front Matter
72
72
  Scenario: A template should handle an empty YAML feed
73
73
  Given the Server is running at "frontmatter-app"
74
74
  And the file "source/front-matter-change.html.erb" has the contents
75
- """
76
- ---
77
- ---
78
- Hello World
79
- """
75
+ """
76
+ ---
77
+ ---
78
+ Hello World
79
+ """
80
80
  When I go to "/front-matter-change.html"
81
81
  Then I should see "Hello World"
82
+
83
+ Scenario: Rendering raw (template-less) (toml)
84
+ Given the Server is running at "frontmatter-app"
85
+ When I go to "/raw-front-matter-toml.html"
86
+ Then I should see "<h1><%= current_page.data.title %></h1>"
87
+ Then I should not see "---"
@@ -1,252 +1,252 @@
1
- Feature: i18n Preview
2
- In order to preview localized html
1
+ # Feature: i18n Preview
2
+ # In order to preview localized html
3
3
 
4
- Scenario: Running localize with the default config
5
- Given a fixture app "i18n-test-app"
6
- And a file named "config.rb" with:
7
- """
8
- activate :i18n
9
- """
10
- Given the Server is running at "i18n-test-app"
11
- When I go to "/"
12
- Then I should see "Howdy"
13
- When I go to "/hello.html"
14
- Then I should see "Hello World"
15
- When I go to "/morning.html"
16
- Then I should see "Good morning"
17
- When I go to "/one.html"
18
- Then I should see "Only one"
19
- When I go to "/defaults_en/index.html"
20
- Then I should see "File Not Found"
21
- When I go to "/en/index.html"
22
- Then I should see "File Not Found"
23
- When I go to "/en/morning.html"
24
- Then I should see "File Not Found"
25
- When I go to "/defaults_es/index.html"
26
- Then I should see "File Not Found"
27
- When I go to "/es/index.html"
28
- Then I should see "Como Esta?"
29
- When I go to "/es/hola.html"
30
- Then I should see "Hola World"
31
- When I go to "/es/manana.html"
32
- Then I should see "Buenos días"
33
- When I go to "/es/una.html"
34
- Then I should see "Solamente una"
4
+ # Scenario: Running localize with the default config
5
+ # Given a fixture app "i18n-test-app"
6
+ # And a file named "config.rb" with:
7
+ # """
8
+ # activate :i18n
9
+ # """
10
+ # Given the Server is running at "i18n-test-app"
11
+ # When I go to "/"
12
+ # Then I should see "Howdy"
13
+ # When I go to "/hello.html"
14
+ # Then I should see "Hello World"
15
+ # When I go to "/morning.html"
16
+ # Then I should see "Good morning"
17
+ # When I go to "/one.html"
18
+ # Then I should see "Only one"
19
+ # When I go to "/defaults_en/index.html"
20
+ # Then I should see "File Not Found"
21
+ # When I go to "/en/index.html"
22
+ # Then I should see "File Not Found"
23
+ # When I go to "/en/morning.html"
24
+ # Then I should see "File Not Found"
25
+ # When I go to "/defaults_es/index.html"
26
+ # Then I should see "File Not Found"
27
+ # When I go to "/es/index.html"
28
+ # Then I should see "Como Esta?"
29
+ # When I go to "/es/hola.html"
30
+ # Then I should see "Hola World"
31
+ # When I go to "/es/manana.html"
32
+ # Then I should see "Buenos días"
33
+ # When I go to "/es/una.html"
34
+ # Then I should see "Solamente una"
35
35
 
36
- Scenario: A template changes i18n during preview
37
- Given a fixture app "i18n-test-app"
38
- And a file named "config.rb" with:
39
- """
40
- activate :i18n
41
- """
42
- Given the Server is running at "i18n-test-app"
43
- And the file "locales/en.yml" has the contents
44
- """
45
- ---
46
- en:
47
- greetings: "Howdy"
48
- hi: "Hello"
49
- """
50
- When I go to "/"
51
- Then I should see "Howdy"
52
- When I go to "/hello.html"
53
- Then I should see "Hello World"
54
- When the file "locales/en.yml" has the contents
55
- """
56
- ---
57
- en:
58
- greetings: "How You Doin"
59
- hi: "Sup"
60
- """
61
- When I go to "/"
62
- Then I should see "How You Doin"
63
- When I go to "/hello.html"
64
- Then I should see "Sup World"
36
+ # Scenario: A template changes i18n during preview
37
+ # Given a fixture app "i18n-test-app"
38
+ # And a file named "config.rb" with:
39
+ # """
40
+ # activate :i18n
41
+ # """
42
+ # Given the Server is running at "i18n-test-app"
43
+ # And the file "locales/en.yml" has the contents
44
+ # """
45
+ # ---
46
+ # en:
47
+ # greetings: "Howdy"
48
+ # hi: "Hello"
49
+ # """
50
+ # When I go to "/"
51
+ # Then I should see "Howdy"
52
+ # When I go to "/hello.html"
53
+ # Then I should see "Hello World"
54
+ # When the file "locales/en.yml" has the contents
55
+ # """
56
+ # ---
57
+ # en:
58
+ # greetings: "How You Doin"
59
+ # hi: "Sup"
60
+ # """
61
+ # When I go to "/"
62
+ # Then I should see "How You Doin"
63
+ # When I go to "/hello.html"
64
+ # Then I should see "Sup World"
65
65
 
66
- Scenario: Running localize with the alt path config
67
- Given a fixture app "i18n-test-app"
68
- And a file named "config.rb" with:
69
- """
70
- activate :i18n, path: "/lang_:locale/"
71
- """
72
- Given the Server is running at "i18n-test-app"
73
- When I go to "/"
74
- Then I should see "Howdy"
75
- When I go to "/hello.html"
76
- Then I should see "Hello World"
77
- When I go to "/lang_en/index.html"
78
- Then I should see "File Not Found"
79
- When I go to "/lang_es/index.html"
80
- Then I should see "Como Esta?"
81
- When I go to "/lang_es/hola.html"
82
- Then I should see "Hola World"
66
+ # Scenario: Running localize with the alt path config
67
+ # Given a fixture app "i18n-test-app"
68
+ # And a file named "config.rb" with:
69
+ # """
70
+ # activate :i18n, path: "/lang_:locale/"
71
+ # """
72
+ # Given the Server is running at "i18n-test-app"
73
+ # When I go to "/"
74
+ # Then I should see "Howdy"
75
+ # When I go to "/hello.html"
76
+ # Then I should see "Hello World"
77
+ # When I go to "/lang_en/index.html"
78
+ # Then I should see "File Not Found"
79
+ # When I go to "/lang_es/index.html"
80
+ # Then I should see "Como Esta?"
81
+ # When I go to "/lang_es/hola.html"
82
+ # Then I should see "Hola World"
83
83
 
84
84
 
85
- Scenario: Running localize with the alt root config
86
- Given a fixture app "i18n-alt-root-app"
87
- And a file named "config.rb" with:
88
- """
89
- activate :i18n, templates_dir: "lang_data"
90
- """
91
- Given the Server is running at "i18n-alt-root-app"
92
- When I go to "/"
93
- Then I should see "Howdy"
94
- When I go to "/hello.html"
95
- Then I should see "Hello World"
96
- When I go to "/en/index.html"
97
- Then I should see "File Not Found"
98
- When I go to "/es/index.html"
99
- Then I should see "Como Esta?"
100
- When I go to "/es/hola.html"
101
- Then I should see "Hola World"
85
+ # Scenario: Running localize with the alt root config
86
+ # Given a fixture app "i18n-alt-root-app"
87
+ # And a file named "config.rb" with:
88
+ # """
89
+ # activate :i18n, templates_dir: "lang_data"
90
+ # """
91
+ # Given the Server is running at "i18n-alt-root-app"
92
+ # When I go to "/"
93
+ # Then I should see "Howdy"
94
+ # When I go to "/hello.html"
95
+ # Then I should see "Hello World"
96
+ # When I go to "/en/index.html"
97
+ # Then I should see "File Not Found"
98
+ # When I go to "/es/index.html"
99
+ # Then I should see "Como Esta?"
100
+ # When I go to "/es/hola.html"
101
+ # Then I should see "Hola World"
102
102
 
103
- Scenario: Running localize with the lang map config
104
- Given a fixture app "i18n-test-app"
105
- And a file named "config.rb" with:
106
- """
107
- activate :i18n, lang_map: { en: :english, es: :spanish }
108
- """
109
- Given the Server is running at "i18n-test-app"
110
- When I go to "/"
111
- Then I should see "Howdy"
112
- When I go to "/hello.html"
113
- Then I should see "Hello World"
114
- When I go to "/english/index.html"
115
- Then I should see "File Not Found"
116
- When I go to "/spanish/index.html"
117
- Then I should see "Como Esta?"
118
- When I go to "/spanish/hola.html"
119
- Then I should see "Hola World"
103
+ # Scenario: Running localize with the lang map config
104
+ # Given a fixture app "i18n-test-app"
105
+ # And a file named "config.rb" with:
106
+ # """
107
+ # activate :i18n, lang_map: { en: :english, es: :spanish }
108
+ # """
109
+ # Given the Server is running at "i18n-test-app"
110
+ # When I go to "/"
111
+ # Then I should see "Howdy"
112
+ # When I go to "/hello.html"
113
+ # Then I should see "Hello World"
114
+ # When I go to "/english/index.html"
115
+ # Then I should see "File Not Found"
116
+ # When I go to "/spanish/index.html"
117
+ # Then I should see "Como Esta?"
118
+ # When I go to "/spanish/hola.html"
119
+ # Then I should see "Hola World"
120
120
 
121
- Scenario: Running localize with a non-English mount config
122
- Given a fixture app "i18n-test-app"
123
- And a file named "config.rb" with:
124
- """
125
- activate :i18n, mount_at_root: :es
126
- """
127
- Given the Server is running at "i18n-test-app"
128
- When I go to "/en/index.html"
129
- Then I should see "Howdy"
130
- When I go to "/en/hello.html"
131
- Then I should see "Hello World"
132
- When I go to "/"
133
- Then I should see "Como Esta?"
134
- When I go to "/hola.html"
135
- Then I should see "Hola World"
136
- When I go to "/manana.html"
137
- Then I should see "Buenos días"
138
- When I go to "/hello.html"
139
- Then I should see "File Not Found"
140
- When I go to "/en/morning.html"
141
- Then I should see "Good morning"
142
- When I go to "/es/manana.html"
143
- Then I should see "File Not Found"
144
- When I go to "/es/index.html"
145
- Then I should see "File Not Found"
146
- When I go to "/es/hola.html"
147
- Then I should see "File Not Found"
121
+ # Scenario: Running localize with a non-English mount config
122
+ # Given a fixture app "i18n-test-app"
123
+ # And a file named "config.rb" with:
124
+ # """
125
+ # activate :i18n, mount_at_root: :es
126
+ # """
127
+ # Given the Server is running at "i18n-test-app"
128
+ # When I go to "/en/index.html"
129
+ # Then I should see "Howdy"
130
+ # When I go to "/en/hello.html"
131
+ # Then I should see "Hello World"
132
+ # When I go to "/"
133
+ # Then I should see "Como Esta?"
134
+ # When I go to "/hola.html"
135
+ # Then I should see "Hola World"
136
+ # When I go to "/manana.html"
137
+ # Then I should see "Buenos días"
138
+ # When I go to "/hello.html"
139
+ # Then I should see "File Not Found"
140
+ # When I go to "/en/morning.html"
141
+ # Then I should see "Good morning"
142
+ # When I go to "/es/manana.html"
143
+ # Then I should see "File Not Found"
144
+ # When I go to "/es/index.html"
145
+ # Then I should see "File Not Found"
146
+ # When I go to "/es/hola.html"
147
+ # Then I should see "File Not Found"
148
148
 
149
- Scenario: Running localize with a non-English lang subset
150
- Given a fixture app "i18n-test-app"
151
- And a file named "config.rb" with:
152
- """
153
- activate :i18n, langs: :es
154
- """
155
- Given the Server is running at "i18n-test-app"
156
- When I go to "/en/index.html"
157
- Then I should see "File Not Found"
158
- When I go to "/en/hello.html"
159
- Then I should see "File Not Found"
160
- When I go to "/"
161
- Then I should see "Como Esta?"
162
- When I go to "/hola.html"
163
- Then I should see "Hola World"
164
- When I go to "/hello.html"
165
- Then I should see "File Not Found"
166
- When I go to "/es/index.html"
167
- Then I should see "File Not Found"
168
- When I go to "/es/hola.html"
169
- Then I should see "File Not Found"
149
+ # Scenario: Running localize with a non-English lang subset
150
+ # Given a fixture app "i18n-test-app"
151
+ # And a file named "config.rb" with:
152
+ # """
153
+ # activate :i18n, langs: :es
154
+ # """
155
+ # Given the Server is running at "i18n-test-app"
156
+ # When I go to "/en/index.html"
157
+ # Then I should see "File Not Found"
158
+ # When I go to "/en/hello.html"
159
+ # Then I should see "File Not Found"
160
+ # When I go to "/"
161
+ # Then I should see "Como Esta?"
162
+ # When I go to "/hola.html"
163
+ # Then I should see "Hola World"
164
+ # When I go to "/hello.html"
165
+ # Then I should see "File Not Found"
166
+ # When I go to "/es/index.html"
167
+ # Then I should see "File Not Found"
168
+ # When I go to "/es/hola.html"
169
+ # Then I should see "File Not Found"
170
170
 
171
171
 
172
- Scenario: Running localize with the no mount config
173
- Given a fixture app "i18n-test-app"
174
- And a file named "config.rb" with:
175
- """
176
- activate :i18n, mount_at_root: false
177
- """
178
- Given the Server is running at "i18n-test-app"
179
- When I go to "/en/index.html"
180
- Then I should see "Howdy"
181
- When I go to "/en/hello.html"
182
- Then I should see "Hello World"
183
- When I go to "/"
184
- Then I should see "File Not Found"
185
- When I go to "/hello.html"
186
- Then I should see "File Not Found"
187
- When I go to "/es/index.html"
188
- Then I should see "Como Esta?"
189
- When I go to "/es/hola.html"
190
- Then I should see "Hola World"
172
+ # Scenario: Running localize with the no mount config
173
+ # Given a fixture app "i18n-test-app"
174
+ # And a file named "config.rb" with:
175
+ # """
176
+ # activate :i18n, mount_at_root: false
177
+ # """
178
+ # Given the Server is running at "i18n-test-app"
179
+ # When I go to "/en/index.html"
180
+ # Then I should see "Howdy"
181
+ # When I go to "/en/hello.html"
182
+ # Then I should see "Hello World"
183
+ # When I go to "/"
184
+ # Then I should see "File Not Found"
185
+ # When I go to "/hello.html"
186
+ # Then I should see "File Not Found"
187
+ # When I go to "/es/index.html"
188
+ # Then I should see "Como Esta?"
189
+ # When I go to "/es/hola.html"
190
+ # Then I should see "Hola World"
191
191
 
192
- Scenario: Running localize with the subset config
193
- Given a fixture app "i18n-test-app"
194
- And a file named "config.rb" with:
195
- """
196
- activate :i18n, langs: [:en]
197
- """
198
- Given the Server is running at "i18n-test-app"
199
- When I go to "/"
200
- Then I should see "Howdy"
201
- When I go to "/hello.html"
202
- Then I should see "Hello World"
203
- When I go to "/en/index.html"
204
- Then I should see "File Not Found"
205
- When I go to "/es/index.html"
206
- Then I should see "File Not Found"
207
- When I go to "/es/hola.html"
208
- Then I should see "File Not Found"
192
+ # Scenario: Running localize with the subset config
193
+ # Given a fixture app "i18n-test-app"
194
+ # And a file named "config.rb" with:
195
+ # """
196
+ # activate :i18n, langs: [:en]
197
+ # """
198
+ # Given the Server is running at "i18n-test-app"
199
+ # When I go to "/"
200
+ # Then I should see "Howdy"
201
+ # When I go to "/hello.html"
202
+ # Then I should see "Hello World"
203
+ # When I go to "/en/index.html"
204
+ # Then I should see "File Not Found"
205
+ # When I go to "/es/index.html"
206
+ # Then I should see "File Not Found"
207
+ # When I go to "/es/hola.html"
208
+ # Then I should see "File Not Found"
209
209
 
210
- Scenario: Running localize with relative_assets
211
- Given a fixture app "i18n-test-app"
212
- And a file named "config.rb" with:
213
- """
214
- activate :i18n
215
- activate :relative_assets
216
- """
217
- Given the Server is running at "i18n-test-app"
218
- When I go to "/"
219
- Then I should see '"stylesheets/site.css"'
220
- When I go to "/hello.html"
221
- Then I should see '"stylesheets/site.css"'
222
- When I go to "/es/index.html"
223
- Then I should see '"../stylesheets/site.css"'
224
- When I go to "/es/hola.html"
225
- Then I should see '"../stylesheets/site.css"'
210
+ # Scenario: Running localize with relative_assets
211
+ # Given a fixture app "i18n-test-app"
212
+ # And a file named "config.rb" with:
213
+ # """
214
+ # activate :i18n
215
+ # activate :relative_assets
216
+ # """
217
+ # Given the Server is running at "i18n-test-app"
218
+ # When I go to "/"
219
+ # Then I should see '"stylesheets/site.css"'
220
+ # When I go to "/hello.html"
221
+ # Then I should see '"stylesheets/site.css"'
222
+ # When I go to "/es/index.html"
223
+ # Then I should see '"../stylesheets/site.css"'
224
+ # When I go to "/es/hola.html"
225
+ # Then I should see '"../stylesheets/site.css"'
226
226
 
227
- Scenario: Missing translations fall back to the default locale
228
- Given a fixture app "i18n-default-app"
229
- And a file named "config.rb" with:
230
- """
231
- activate :i18n, mount_at_root: :es
232
- """
233
- Given the Server is running at "i18n-default-app"
234
- When I go to "/en/"
235
- Then I should see "Default locale: es"
236
- Then I should see "Current locale: en"
237
- Then I should see "Buenos días"
238
- Then I should see "Howdy"
227
+ # Scenario: Missing translations fall back to the default locale
228
+ # Given a fixture app "i18n-default-app"
229
+ # And a file named "config.rb" with:
230
+ # """
231
+ # activate :i18n, mount_at_root: :es
232
+ # """
233
+ # Given the Server is running at "i18n-default-app"
234
+ # When I go to "/en/"
235
+ # Then I should see "Default locale: es"
236
+ # Then I should see "Current locale: en"
237
+ # Then I should see "Buenos días"
238
+ # Then I should see "Howdy"
239
239
 
240
- Scenario: Nested i18n yaml
241
- Given a fixture app "i18n-nested-app"
242
- And a file named "config.rb" with:
243
- """
244
- activate :i18n
245
- """
246
- Given the Server is running at "i18n-nested-app"
247
- When I go to "/"
248
- Then I should see "Howdy"
249
- Then I should see "More"
250
- When I go to "/es/"
251
- Then I should see "Como Esta?"
252
- Then I should see "Mucho"
240
+ # Scenario: Nested i18n yaml
241
+ # Given a fixture app "i18n-nested-app"
242
+ # And a file named "config.rb" with:
243
+ # """
244
+ # activate :i18n
245
+ # """
246
+ # Given the Server is running at "i18n-nested-app"
247
+ # When I go to "/"
248
+ # Then I should see "Howdy"
249
+ # Then I should see "More"
250
+ # When I go to "/es/"
251
+ # Then I should see "Como Esta?"
252
+ # Then I should see "Mucho"