Temporary commit
Rodrigo Alvarez
committed Dec 24, 2012
commit d8188df64c38920896d08b785d89bfa9bddcf282
Showing 5
changed files with
337 additions
and 106 deletions
locomotive/builder/server.rb b/lib/locomotive/builder/server.rb
+2
-0
| @@ | @@ -1,5 +1,6 @@ |
| require "locomotive/builder/server/middleware" | |
| require "locomotive/builder/server/index" | |
| + | require "locomotive/builder/server/pages" |
| require "locomotive/builder/server/not_found" | |
| module Locomotive::Builder | |
| @@ | @@ -9,6 +10,7 @@ module Locomotive::Builder |
| @app = Rack::Builder.new do | |
| use Rack::Lint | |
| use Index | |
| + | use Pages |
| run NotFound.new | |
| end | |
| end | |
locomotive/builder/server/pages.rb b/lib/locomotive/builder/server/pages.rb
+14
-0
| @@ | @@ -0,0 +1,14 @@ |
| + | module Locomotive::Builder |
| + | class Server |
| + | class Pages < Middleware |
| + | def call(env) |
| + | requested = env['PATH_INFO'].gsub(/^\//, '') |
| + | if env["steam.mounting_point"].pages.has_key?(requested) |
| + | [200, {'Content-Type' => 'text/html'}, [env["steam.mounting_point"].pages[requested].source]] |
| + | else |
| + | super |
| + | end |
| + | end |
| + | end |
| + | end |
| + | end |
| \ No newline at end of file | |
spec/integration/cassettes/import.yml
+310
-103
| @@ | @@ -23,25 +23,25 @@ http_interactions: |
| Cache-Control: | |
| - max-age=0, private, must-revalidate | |
| X-Request-Id: | |
| - | - beaa9b82d1d629d15de3811005e77336 |
| + | - 9eaf4d680ec33ddfa4fb1ef279403bd0 |
| X-Runtime: | |
| - | - '0.015989' |
| + | - '0.010445' |
| Content-Length: | |
| - '32' | |
| Server: | |
| - WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10) | |
| Date: | |
| - | - Thu, 13 Dec 2012 12:53:25 GMT |
| + | - Fri, 21 Dec 2012 09:41:34 GMT |
| Connection: | |
| - Keep-Alive | |
| Set-Cookie: | |
| - | - _dummy_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWM3NmE5NGI2MjU0ZDFjMzRlZGIzZWMzMThhYzk5ZmVmBjsAVEkiCmZsYXNoBjsARm86JUFjdGlvbkRpc3BhdGNoOjpGbGFzaDo6Rmxhc2hIYXNoCToKQHVzZWRvOghTZXQGOgpAaGFzaHsAOgxAY2xvc2VkRjoNQGZsYXNoZXN7BjoLbm90aWNlSUM6HkFjdGl2ZVN1cHBvcnQ6OlNhZmVCdWZmZXIiI0hhc2ggd2FzIHN1Y2Nlc3NmdWxseSBjcmVhdGVkLgc7AFQ6D0BodG1sX3NhZmVUOglAbm93MA%3D%3D--988209950608fa27ccfa45c5edd3b38f28bd76a0; |
| + | - _dummy_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWNlZDEwM2JkYjNmNTUzOTAyYTc1YzNmZTM5OTFlOTA2BjsAVEkiCmZsYXNoBjsARm86JUFjdGlvbkRpc3BhdGNoOjpGbGFzaDo6Rmxhc2hIYXNoCToKQHVzZWRvOghTZXQGOgpAaGFzaHsAOgxAY2xvc2VkRjoNQGZsYXNoZXN7BjoLbm90aWNlSUM6HkFjdGl2ZVN1cHBvcnQ6OlNhZmVCdWZmZXIiI0hhc2ggd2FzIHN1Y2Nlc3NmdWxseSBjcmVhdGVkLgc7AFQ6D0BodG1sX3NhZmVUOglAbm93MA%3D%3D--bec5cca861b4907891aace19d643c7bb51b39e37; |
| domain=.engine.dev; path=/; HttpOnly | |
| body: | |
| encoding: US-ASCII | |
| string: ! '{"token":"C3NNrE3RCZgGwiYoyJeQ"}' | |
| http_version: | |
| - | recorded_at: Thu, 13 Dec 2012 12:53:25 GMT |
| + | recorded_at: Fri, 21 Dec 2012 09:41:34 GMT |
| - request: | |
| method: get | |
| uri: http://locomotive.engine.dev:3000/locomotive/api/current_site.json?auth_token=C3NNrE3RCZgGwiYoyJeQ | |
| @@ | @@ -59,29 +59,69 @@ http_interactions: |
| X-Ua-Compatible: | |
| - IE=Edge | |
| Etag: | |
| - | - ! '"fce084a1bb09548212b111d21485000f"' |
| + | - ! '"389645a4f7238ecca42ee350dfd75e54"' |
| Cache-Control: | |
| - max-age=0, private, must-revalidate | |
| X-Request-Id: | |
| - | - 43b08a978feb173070685bc3d7ba5fb1 |
| + | - 4ce4b88551eebd55a22e5c3ed63cc0de |
| X-Runtime: | |
| - | - '0.013959' |
| + | - '0.012107' |
| Content-Length: | |
| - | - '678' |
| + | - '683' |
| Server: | |
| - WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10) | |
| Date: | |
| - | - Thu, 13 Dec 2012 12:53:25 GMT |
| + | - Fri, 21 Dec 2012 09:41:34 GMT |
| Connection: | |
| - Keep-Alive | |
| Set-Cookie: | |
| - | - _dummy_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTRhMGE1Yzk2MTJhYTI4MmNiYTBlZDY1ZDU5YmNjNWUyBjsAVEkiJ3dhcmRlbi51c2VyLmxvY29tb3RpdmVfYWNjb3VudC5rZXkGOwBUWwhJIhhMb2NvbW90aXZlOjpBY2NvdW50BjsARlsGbzoTQlNPTjo6T2JqZWN0SWQGOgpAZGF0YVsRaVVpAclpAZ1pfWkByGkxaQHRaQBpAdNpAGkAaQhJIhlDcWlUSzJLRE5iQnlXWnVoYWJpTAY7AFQ%3D--0a9a0199a84a99546b796bafa46771adab868c4e; |
| + | - _dummy_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTM3ZTQ2MGRhODQyNTgyYjBjZDMyNzk0NjEyMWEzYjFlBjsAVEkiJ3dhcmRlbi51c2VyLmxvY29tb3RpdmVfYWNjb3VudC5rZXkGOwBUWwhJIhhMb2NvbW90aXZlOjpBY2NvdW50BjsARlsGbzoTQlNPTjo6T2JqZWN0SWQGOgpAZGF0YVsRaVVpAclpAZ1pfWkByGkxaQHRaQBpAdNpAGkAaQhJIhlDcWlUSzJLRE5iQnlXWnVoYWJpTAY7AFQ%3D--3e820435f23608be610138a831c8b51c864ff53a; |
| domain=.engine.dev; path=/; HttpOnly | |
| body: | |
| encoding: US-ASCII | |
| - | string: ! '{"id":"50c99d81c82cd100d3000005","_id":"50c99d81c82cd100d3000005","created_at":"2012-12-13T10:18:57+01:00","updated_at":"2012-12-13T10:18:57+01:00","name":"locomotive","locales":["en"],"domain_name":"engine.dev","subdomain":"locomotive","domains":["locomotive.engine.dev"],"robots_txt":null,"seo_title":null,"meta_keywords":null,"meta_description":null,"domains_without_subdomain":[],"memberships":[{"id":"50c99d81c82cd100d3000006","_id":"50c99d81c82cd100d3000006","created_at":null,"updated_at":null,"account_id":"50c99d78c82cd100d3000003","name":"Locomotive","email":"admin@locomotivecms.com","role":"admin","role_name":"Administrator","can_update":false,"grant_admin":true}]}' |
| + | string: ! '{"id":"50c99d81c82cd100d3000005","_id":"50c99d81c82cd100d3000005","created_at":"2012-12-13T10:18:57+01:00","updated_at":"2012-12-19T13:16:51+01:00","name":"locomotive","locales":["en","es"],"domain_name":"engine.dev","subdomain":"locomotive","domains":["locomotive.engine.dev"],"robots_txt":null,"seo_title":null,"meta_keywords":null,"meta_description":null,"domains_without_subdomain":[],"memberships":[{"id":"50c99d81c82cd100d3000006","_id":"50c99d81c82cd100d3000006","created_at":null,"updated_at":null,"account_id":"50c99d78c82cd100d3000003","name":"Locomotive","email":"admin@locomotivecms.com","role":"admin","role_name":"Administrator","can_update":false,"grant_admin":true}]}' |
| http_version: | |
| - | recorded_at: Thu, 13 Dec 2012 12:53:25 GMT |
| + | recorded_at: Fri, 21 Dec 2012 09:41:34 GMT |
| + | - request: |
| + | method: get |
| + | uri: http://locomotive.engine.dev:3000/locomotive/api/current_site.json?auth_token=C3NNrE3RCZgGwiYoyJeQ&locale=es |
| + | body: |
| + | encoding: US-ASCII |
| + | string: '' |
| + | headers: {} |
| + | response: |
| + | status: |
| + | code: 200 |
| + | message: ! 'OK ' |
| + | headers: |
| + | Content-Type: |
| + | - application/json; charset=utf-8 |
| + | X-Ua-Compatible: |
| + | - IE=Edge |
| + | Etag: |
| + | - ! '"f11061da9e0505a8ed16223deff23ca7"' |
| + | Cache-Control: |
| + | - max-age=0, private, must-revalidate |
| + | X-Request-Id: |
| + | - a81a779b463148859879cd1da696feb3 |
| + | X-Runtime: |
| + | - '0.011159' |
| + | Content-Length: |
| + | - '683' |
| + | Server: |
| + | - WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10) |
| + | Date: |
| + | - Fri, 21 Dec 2012 09:41:34 GMT |
| + | Connection: |
| + | - Keep-Alive |
| + | Set-Cookie: |
| + | - _dummy_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWRlODA4MjVhMjBiNWQ1N2UwOWU3MGE3NmIxY2RmYjM2BjsAVEkiJ3dhcmRlbi51c2VyLmxvY29tb3RpdmVfYWNjb3VudC5rZXkGOwBUWwhJIhhMb2NvbW90aXZlOjpBY2NvdW50BjsARlsGbzoTQlNPTjo6T2JqZWN0SWQGOgpAZGF0YVsRaVVpAclpAZ1pfWkByGkxaQHRaQBpAdNpAGkAaQhJIhlDcWlUSzJLRE5iQnlXWnVoYWJpTAY7AFQ%3D--17a6d345ec246df61b86976270a2836ea08fe676; |
| + | domain=.engine.dev; path=/; HttpOnly |
| + | body: |
| + | encoding: US-ASCII |
| + | string: ! '{"id":"50c99d81c82cd100d3000005","_id":"50c99d81c82cd100d3000005","created_at":"2012-12-13T10:18:57+01:00","updated_at":"2012-12-19T13:16:51+01:00","name":"locomotive","locales":["en","es"],"domain_name":"engine.dev","subdomain":"locomotive","domains":["locomotive.engine.dev"],"robots_txt":null,"seo_title":null,"meta_keywords":null,"meta_description":null,"domains_without_subdomain":[],"memberships":[{"id":"50c99d81c82cd100d3000006","_id":"50c99d81c82cd100d3000006","created_at":null,"updated_at":null,"account_id":"50c99d78c82cd100d3000003","name":"Locomotive","email":"admin@locomotivecms.com","role":"admin","role_name":"Administrador","can_update":false,"grant_admin":true}]}' |
| + | http_version: |
| + | recorded_at: Fri, 21 Dec 2012 09:41:34 GMT |
| - request: | |
| method: get | |
| uri: http://locomotive.engine.dev:3000/locomotive/api/snippets.json?auth_token=C3NNrE3RCZgGwiYoyJeQ | |
| @@ | @@ -103,25 +143,25 @@ http_interactions: |
| Cache-Control: | |
| - max-age=0, private, must-revalidate | |
| X-Request-Id: | |
| - | - 7cd2ac6df57168f9cf5dfcd2ce2fa7d8 |
| + | - 434ebe6606af11f1ee244d44085e0fd4 |
| X-Runtime: | |
| - | - '0.018109' |
| + | - '0.014709' |
| Content-Length: | |
| - '2' | |
| Server: | |
| - WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10) | |
| Date: | |
| - | - Thu, 13 Dec 2012 12:53:25 GMT |
| + | - Fri, 21 Dec 2012 09:41:34 GMT |
| Connection: | |
| - Keep-Alive | |
| Set-Cookie: | |
| - | - _dummy_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTljZjFhNmJiZTc5MzQ0NzE0ZjVmYjZmN2ZhZmIzMmM4BjsAVEkiJ3dhcmRlbi51c2VyLmxvY29tb3RpdmVfYWNjb3VudC5rZXkGOwBUWwhJIhhMb2NvbW90aXZlOjpBY2NvdW50BjsARlsGbzoTQlNPTjo6T2JqZWN0SWQGOgpAZGF0YVsRaVVpAclpAZ1pfWkByGkxaQHRaQBpAdNpAGkAaQhJIhlDcWlUSzJLRE5iQnlXWnVoYWJpTAY7AFQ%3D--9b4bc7145449e302aee8e915ab145c1b68fb1749; |
| + | - _dummy_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTU5ODA4OTYwYjk4Y2I2Nzg4NmU4NjFjYTk2NWQwN2NiBjsAVEkiJ3dhcmRlbi51c2VyLmxvY29tb3RpdmVfYWNjb3VudC5rZXkGOwBUWwhJIhhMb2NvbW90aXZlOjpBY2NvdW50BjsARlsGbzoTQlNPTjo6T2JqZWN0SWQGOgpAZGF0YVsRaVVpAclpAZ1pfWkByGkxaQHRaQBpAdNpAGkAaQhJIhlDcWlUSzJLRE5iQnlXWnVoYWJpTAY7AFQ%3D--ae67be00e5938e38f058c61f71b8020224ec32b5; |
| domain=.engine.dev; path=/; HttpOnly | |
| body: | |
| encoding: US-ASCII | |
| string: ! '[]' | |
| http_version: | |
| - | recorded_at: Thu, 13 Dec 2012 12:53:25 GMT |
| + | recorded_at: Fri, 21 Dec 2012 09:41:34 GMT |
| - request: | |
| method: get | |
| uri: http://locomotive.engine.dev:3000/locomotive/api/content_types.json?auth_token=C3NNrE3RCZgGwiYoyJeQ | |
| @@ | @@ -139,29 +179,153 @@ http_interactions: |
| X-Ua-Compatible: | |
| - IE=Edge | |
| Etag: | |
| - | - ! '"d751713988987e9331980363e24189ce"' |
| + | - ! '"3d75b159ec848dee626d4a0a1af71528"' |
| Cache-Control: | |
| - max-age=0, private, must-revalidate | |
| X-Request-Id: | |
| - | - c56341c0196eb389b412215f9820212b |
| + | - 406ec05ab28d8a2705799ca232118841 |
| X-Runtime: | |
| - | - '0.020533' |
| + | - '0.017921' |
| Content-Length: | |
| - | - '2' |
| + | - '1056' |
| Server: | |
| - WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10) | |
| Date: | |
| - | - Thu, 13 Dec 2012 12:53:26 GMT |
| + | - Fri, 21 Dec 2012 09:41:34 GMT |
| Connection: | |
| - Keep-Alive | |
| Set-Cookie: | |
| - | - _dummy_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWZhZGIxZGRkM2U3NzU3ZTc2MTNjNTk3YWNkOWI0ZjJkBjsAVEkiJ3dhcmRlbi51c2VyLmxvY29tb3RpdmVfYWNjb3VudC5rZXkGOwBUWwhJIhhMb2NvbW90aXZlOjpBY2NvdW50BjsARlsGbzoTQlNPTjo6T2JqZWN0SWQGOgpAZGF0YVsRaVVpAclpAZ1pfWkByGkxaQHRaQBpAdNpAGkAaQhJIhlDcWlUSzJLRE5iQnlXWnVoYWJpTAY7AFQ%3D--22b273378229c2edcdc51ec777da024ef8519d44; |
| + | - _dummy_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWM0OWRkZjI3MGVjZDg1YmEwYTI4OGI4NzQ3ZmY3YjZiBjsAVEkiJ3dhcmRlbi51c2VyLmxvY29tb3RpdmVfYWNjb3VudC5rZXkGOwBUWwhJIhhMb2NvbW90aXZlOjpBY2NvdW50BjsARlsGbzoTQlNPTjo6T2JqZWN0SWQGOgpAZGF0YVsRaVVpAclpAZ1pfWkByGkxaQHRaQBpAdNpAGkAaQhJIhlDcWlUSzJLRE5iQnlXWnVoYWJpTAY7AFQ%3D--4d3ca9dc9c19a2df118adcbfc543748563b2664f; |
| domain=.engine.dev; path=/; HttpOnly | |
| body: | |
| encoding: US-ASCII | |
| - | string: ! '[]' |
| + | string: ! '[{"id":"50d1afe2c82cd100d3000015","_id":"50d1afe2c82cd100d3000015","created_at":"2012-12-19T13:15:30+01:00","updated_at":"2012-12-19T15:06:18+01:00","name":"Products","description":"My |
| + | products collection","slug":"products","order_by":"created_at","order_direction":"asc","label_field_name":"name","group_by_field_id":null,"public_submission_accounts":null,"entries_custom_fields":[{"_id":"50d1afe2c82cd100d3000016","class_name":null,"created_at":null,"hint":null,"inverse_of":null,"label":"name","localized":true,"name":"name","order_by":null,"position":0,"required":true,"text_formatting":"html","type":"string","ui_enabled":true,"updated_at":null,"id":"50d1afe2c82cd100d3000016"},{"_id":"50d1afe2c82cd100d3000017","class_name":null,"created_at":null,"hint":null,"inverse_of":null,"label":"available","localized":false,"name":"available","order_by":null,"position":1,"required":false,"text_formatting":"html","type":"boolean","ui_enabled":true,"updated_at":null,"id":"50d1afe2c82cd100d3000017"}],"klass_name":"Locomotive::Entry50d1afe2c82cd100d3000015"}]' |
| http_version: | |
| - | recorded_at: Thu, 13 Dec 2012 12:53:26 GMT |
| + | recorded_at: Fri, 21 Dec 2012 09:41:34 GMT |
| + | - request: |
| + | method: get |
| + | uri: http://locomotive.engine.dev:3000/locomotive/api/content_types/products/entries.json?auth_token=C3NNrE3RCZgGwiYoyJeQ |
| + | body: |
| + | encoding: US-ASCII |
| + | string: '' |
| + | headers: {} |
| + | response: |
| + | status: |
| + | code: 200 |
| + | message: ! 'OK ' |
| + | headers: |
| + | Content-Type: |
| + | - application/json; charset=utf-8 |
| + | X-Ua-Compatible: |
| + | - IE=Edge |
| + | Etag: |
| + | - ! '"05849b072f5e7363f3023cdce91a94a7"' |
| + | Cache-Control: |
| + | - max-age=0, private, must-revalidate |
| + | X-Request-Id: |
| + | - 3eb1dade5b17d2d91b2dd0f307ee26c6 |
| + | X-Runtime: |
| + | - '0.014517' |
| + | Content-Length: |
| + | - '527' |
| + | Server: |
| + | - WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10) |
| + | Date: |
| + | - Fri, 21 Dec 2012 09:41:34 GMT |
| + | Connection: |
| + | - Keep-Alive |
| + | Set-Cookie: |
| + | - _dummy_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTA3YWYzNTMyYjhlM2Y4YWVmOGU1Y2I3ZGE3NmQwNjg1BjsAVEkiJ3dhcmRlbi51c2VyLmxvY29tb3RpdmVfYWNjb3VudC5rZXkGOwBUWwhJIhhMb2NvbW90aXZlOjpBY2NvdW50BjsARlsGbzoTQlNPTjo6T2JqZWN0SWQGOgpAZGF0YVsRaVVpAclpAZ1pfWkByGkxaQHRaQBpAdNpAGkAaQhJIhlDcWlUSzJLRE5iQnlXWnVoYWJpTAY7AFQ%3D--e00939aaf1994cdba0f8b27471740effc7f4cd20; |
| + | domain=.engine.dev; path=/; HttpOnly |
| + | body: |
| + | encoding: US-ASCII |
| + | string: ! '[{"id":"50d1c0bfc82cd100d300001a","_id":"50d1c0bfc82cd100d300001a","created_at":"2012-12-19T14:27:27+01:00","updated_at":"2012-12-19T14:28:21+01:00","name":"Useless |
| + | stuff","available":true,"_label":"Useless stuff","_slug":"useless-stuff","_position":1,"content_type_slug":"products","select_custom_fields":[],"file_custom_fields":[],"has_many_custom_fields":[],"many_to_many_custom_fields":[],"translated_in":["en","es"],"safe_attributes":["name","available","_slug","seo_title","meta_keywords","meta_description","_destroy"]}]' |
| + | http_version: |
| + | recorded_at: Fri, 21 Dec 2012 09:41:34 GMT |
| + | - request: |
| + | method: get |
| + | uri: http://locomotive.engine.dev:3000/locomotive/api/content_types/products/entries/50d1c0bfc82cd100d300001a.json?auth_token=C3NNrE3RCZgGwiYoyJeQ&locale=en |
| + | body: |
| + | encoding: US-ASCII |
| + | string: '' |
| + | headers: {} |
| + | response: |
| + | status: |
| + | code: 200 |
| + | message: ! 'OK ' |
| + | headers: |
| + | Content-Type: |
| + | - application/json; charset=utf-8 |
| + | X-Ua-Compatible: |
| + | - IE=Edge |
| + | Etag: |
| + | - ! '"1dc548e9f4281cb37e55f6677e1fc5a1"' |
| + | Cache-Control: |
| + | - max-age=0, private, must-revalidate |
| + | X-Request-Id: |
| + | - 055b2da959a4244282e643ff2e756b97 |
| + | X-Runtime: |
| + | - '0.014378' |
| + | Content-Length: |
| + | - '525' |
| + | Server: |
| + | - WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10) |
| + | Date: |
| + | - Fri, 21 Dec 2012 09:41:34 GMT |
| + | Connection: |
| + | - Keep-Alive |
| + | Set-Cookie: |
| + | - _dummy_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTIxMjIzODUxZGEzNTFhYTk2NjZhZDlkMDhmMjg0MjA2BjsAVEkiJ3dhcmRlbi51c2VyLmxvY29tb3RpdmVfYWNjb3VudC5rZXkGOwBUWwhJIhhMb2NvbW90aXZlOjpBY2NvdW50BjsARlsGbzoTQlNPTjo6T2JqZWN0SWQGOgpAZGF0YVsRaVVpAclpAZ1pfWkByGkxaQHRaQBpAdNpAGkAaQhJIhlDcWlUSzJLRE5iQnlXWnVoYWJpTAY7AFQ%3D--7873cf92c949d0673d992ea9def5baa44c37f6bd; |
| + | domain=.engine.dev; path=/; HttpOnly |
| + | body: |
| + | encoding: US-ASCII |
| + | string: ! '{"id":"50d1c0bfc82cd100d300001a","_id":"50d1c0bfc82cd100d300001a","created_at":"2012-12-19T14:27:27+01:00","updated_at":"2012-12-19T14:28:21+01:00","name":"Useless |
| + | stuff","available":true,"_label":"Useless stuff","_slug":"useless-stuff","_position":1,"content_type_slug":"products","select_custom_fields":[],"file_custom_fields":[],"has_many_custom_fields":[],"many_to_many_custom_fields":[],"translated_in":["en","es"],"safe_attributes":["name","available","_slug","seo_title","meta_keywords","meta_description","_destroy"]}' |
| + | http_version: |
| + | recorded_at: Fri, 21 Dec 2012 09:41:34 GMT |
| + | - request: |
| + | method: get |
| + | uri: http://locomotive.engine.dev:3000/locomotive/api/content_types/products/entries/50d1c0bfc82cd100d300001a.json?auth_token=C3NNrE3RCZgGwiYoyJeQ&locale=es |
| + | body: |
| + | encoding: US-ASCII |
| + | string: '' |
| + | headers: {} |
| + | response: |
| + | status: |
| + | code: 200 |
| + | message: ! 'OK ' |
| + | headers: |
| + | Content-Type: |
| + | - application/json; charset=utf-8 |
| + | X-Ua-Compatible: |
| + | - IE=Edge |
| + | Etag: |
| + | - ! '"1d8801346f446ac3837350d86c10c458"' |
| + | Cache-Control: |
| + | - max-age=0, private, must-revalidate |
| + | X-Request-Id: |
| + | - 2218266fbc2519097d2f684b890647c3 |
| + | X-Runtime: |
| + | - '0.014097' |
| + | Content-Length: |
| + | - '537' |
| + | Server: |
| + | - WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10) |
| + | Date: |
| + | - Fri, 21 Dec 2012 09:41:34 GMT |
| + | Connection: |
| + | - Keep-Alive |
| + | Set-Cookie: |
| + | - _dummy_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTk1ZWYxMzBjYThlMjQwNDlkM2NmNDIyOTU5ZTE3ZTIwBjsAVEkiJ3dhcmRlbi51c2VyLmxvY29tb3RpdmVfYWNjb3VudC5rZXkGOwBUWwhJIhhMb2NvbW90aXZlOjpBY2NvdW50BjsARlsGbzoTQlNPTjo6T2JqZWN0SWQGOgpAZGF0YVsRaVVpAclpAZ1pfWkByGkxaQHRaQBpAdNpAGkAaQhJIhlDcWlUSzJLRE5iQnlXWnVoYWJpTAY7AFQ%3D--fb5fc1e06de705031e802f5057238988db52d297; |
| + | domain=.engine.dev; path=/; HttpOnly |
| + | body: |
| + | encoding: US-ASCII |
| + | string: ! '{"id":"50d1c0bfc82cd100d300001a","_id":"50d1c0bfc82cd100d300001a","created_at":"2012-12-19T14:27:27+01:00","updated_at":"2012-12-19T14:28:21+01:00","name":"Cosas |
| + | in\u00fatiles","available":true,"_label":"Cosas in\u00fatiles","_slug":"useless-stuff","_position":1,"content_type_slug":"products","select_custom_fields":[],"file_custom_fields":[],"has_many_custom_fields":[],"many_to_many_custom_fields":[],"translated_in":["en","es"],"safe_attributes":["name","available","_slug","seo_title","meta_keywords","meta_description","_destroy"]}' |
| + | http_version: |
| + | recorded_at: Fri, 21 Dec 2012 09:41:34 GMT |
| - request: | |
| method: get | |
| uri: http://locomotive.engine.dev:3000/locomotive/api/content_assets.json?auth_token=C3NNrE3RCZgGwiYoyJeQ | |
| @@ | @@ -183,25 +347,25 @@ http_interactions: |
| Cache-Control: | |
| - max-age=0, private, must-revalidate | |
| X-Request-Id: | |
| - | - cea3fd2de247f129863cbcdfc37c8447 |
| + | - d78bbbc37e88b5a0b8a0510efbf3563e |
| X-Runtime: | |
| - | - '0.022965' |
| + | - '0.015717' |
| Content-Length: | |
| - '2' | |
| Server: | |
| - WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10) | |
| Date: | |
| - | - Thu, 13 Dec 2012 12:53:26 GMT |
| + | - Fri, 21 Dec 2012 09:41:34 GMT |
| Connection: | |
| - Keep-Alive | |
| Set-Cookie: | |
| - | - _dummy_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWU4NDU1NjBhZWU1NDZiZjM5MWUwM2NkMzYzYTg2MzNmBjsAVEkiJ3dhcmRlbi51c2VyLmxvY29tb3RpdmVfYWNjb3VudC5rZXkGOwBUWwhJIhhMb2NvbW90aXZlOjpBY2NvdW50BjsARlsGbzoTQlNPTjo6T2JqZWN0SWQGOgpAZGF0YVsRaVVpAclpAZ1pfWkByGkxaQHRaQBpAdNpAGkAaQhJIhlDcWlUSzJLRE5iQnlXWnVoYWJpTAY7AFQ%3D--e12338ab76b72d794ab2c1ac4cdd9325dfafe3ee; |
| + | - _dummy_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTMzYzA1NjdjN2ZhZTBhODNmMmJmMWI2YjM4YmIyZGQzBjsAVEkiJ3dhcmRlbi51c2VyLmxvY29tb3RpdmVfYWNjb3VudC5rZXkGOwBUWwhJIhhMb2NvbW90aXZlOjpBY2NvdW50BjsARlsGbzoTQlNPTjo6T2JqZWN0SWQGOgpAZGF0YVsRaVVpAclpAZ1pfWkByGkxaQHRaQBpAdNpAGkAaQhJIhlDcWlUSzJLRE5iQnlXWnVoYWJpTAY7AFQ%3D--616c5daaddefa675eda6e5868696b26822c14f0b; |
| domain=.engine.dev; path=/; HttpOnly | |
| body: | |
| encoding: US-ASCII | |
| string: ! '[]' | |
| http_version: | |
| - | recorded_at: Thu, 13 Dec 2012 12:53:26 GMT |
| + | recorded_at: Fri, 21 Dec 2012 09:41:34 GMT |
| - request: | |
| method: get | |
| uri: http://locomotive.engine.dev:3000/locomotive/api/pages.json?auth_token=C3NNrE3RCZgGwiYoyJeQ | |
| @@ | @@ -219,36 +383,39 @@ http_interactions: |
| X-Ua-Compatible: | |
| - IE=Edge | |
| Etag: | |
| - | - ! '"6f9bd6c4bbc30d10a87403d1a83e9a6d"' |
| + | - ! '"c0f0a294fb3dbaf195badd76be7e611f"' |
| Cache-Control: | |
| - max-age=0, private, must-revalidate | |
| X-Request-Id: | |
| - | - 92e948333a4d900322e35f66a00bc390 |
| + | - 797efca12eede773f0cde7fca7bd9221 |
| X-Runtime: | |
| - | - '0.025513' |
| + | - '0.018131' |
| Content-Length: | |
| - | - '1146' |
| + | - '2546' |
| Server: | |
| - WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10) | |
| Date: | |
| - | - Thu, 13 Dec 2012 12:53:26 GMT |
| + | - Fri, 21 Dec 2012 09:41:34 GMT |
| Connection: | |
| - Keep-Alive | |
| Set-Cookie: | |
| - | - _dummy_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWE4YzNhY2RiMjA2MjJjOGY1ZDdlMTQ4MTdkMzVjODU1BjsAVEkiJ3dhcmRlbi51c2VyLmxvY29tb3RpdmVfYWNjb3VudC5rZXkGOwBUWwhJIhhMb2NvbW90aXZlOjpBY2NvdW50BjsARlsGbzoTQlNPTjo6T2JqZWN0SWQGOgpAZGF0YVsRaVVpAclpAZ1pfWkByGkxaQHRaQBpAdNpAGkAaQhJIhlDcWlUSzJLRE5iQnlXWnVoYWJpTAY7AFQ%3D--78a0dc5781bf7be362cde68816e5ef530c461693; |
| + | - _dummy_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTE0YzA2ZWFmY2I5MDk2MGQyMWRkMWYxMTFiZDNjM2U2BjsAVEkiJ3dhcmRlbi51c2VyLmxvY29tb3RpdmVfYWNjb3VudC5rZXkGOwBUWwhJIhhMb2NvbW90aXZlOjpBY2NvdW50BjsARlsGbzoTQlNPTjo6T2JqZWN0SWQGOgpAZGF0YVsRaVVpAclpAZ1pfWkByGkxaQHRaQBpAdNpAGkAaQhJIhlDcWlUSzJLRE5iQnlXWnVoYWJpTAY7AFQ%3D--56065701feac6474321c05235728160a90c7b78d; |
| domain=.engine.dev; path=/; HttpOnly | |
| body: | |
| encoding: US-ASCII | |
| - | string: ! '[{"id":"50c99d81c82cd100d3000007","_id":"50c99d81c82cd100d3000007","created_at":"2012-12-13T10:18:58+01:00","updated_at":"2012-12-13T10:18:58+01:00","title":"Home |
| - | page","slug":"index","fullpath":"index","handle":null,"position":0,"raw_template":"Content |
| - | of the home page","published":true,"listed":true,"templatized":false,"templatized_from_parent":false,"target_klass_slug":null,"redirect":false,"redirect_url":null,"cache_strategy":"none","response_type":"text/html","template_changed":null,"editable_elements":[],"localized_fullpaths":{"en":""},"translated_in":["en"]},{"id":"50c99d82c82cd100d3000008","_id":"50c99d82c82cd100d3000008","created_at":"2012-12-13T10:18:58+01:00","updated_at":"2012-12-13T10:18:58+01:00","title":"Page |
| + | string: ! '[{"id":"50c99d81c82cd100d3000007","_id":"50c99d81c82cd100d3000007","created_at":"2012-12-13T10:18:58+01:00","updated_at":"2012-12-21T10:08:41+01:00","title":"Home |
| + | page","slug":"index","fullpath":"index","handle":null,"position":0,"raw_template":"Content of the home page\r\n","published":true,"listed":true,"templatized":false,"templatized_from_parent":false,"target_klass_slug":null,"redirect":false,"redirect_url":null,"cache_strategy":"none","response_type":"text/html","template_changed":null,"editable_elements":[],"localized_fullpaths":{"en":"","es":"es"},"translated_in":["en","es"]},{"id":"50d42e85c82cd100d3000042","_id":"50d42e85c82cd100d3000042","created_at":"2012-12-21T10:40:21+01:00","updated_at":"2012-12-21T10:40:21+01:00","title":"Products","slug":"products","fullpath":"products","handle":null,"position":0,"raw_template":"{% |
| + | extends ''parent'' %}\r\n{% block content %}\r\n{% endblock %}","published":false,"listed":true,"templatized":false,"templatized_from_parent":false,"target_klass_slug":null,"redirect":false,"redirect_url":null,"cache_strategy":"none","response_type":"text/html","template_changed":null,"editable_elements":[],"localized_fullpaths":{"en":"products","es":"es/products"},"translated_in":["en"]},{"id":"50d1c707c82cd100d3000028","_id":"50d1c707c82cd100d3000028","created_at":"2012-12-19T14:54:15+01:00","updated_at":"2012-12-21T10:41:12+01:00","title":"Latest |
| + | product","slug":"latest","fullpath":"products/latest","handle":null,"position":0,"raw_template":"{% |
| + | block content %}\r\n The name of the first product is: {{ contents.products.first.name |
| + | }}\r\n{% endblock %}","published":true,"listed":true,"templatized":false,"templatized_from_parent":false,"target_klass_slug":null,"redirect":false,"redirect_url":null,"cache_strategy":"none","response_type":"text/html","template_changed":null,"editable_elements":[],"localized_fullpaths":{"en":"products/latest","es":"es/products/latest"},"translated_in":["en"]},{"id":"50c99d82c82cd100d3000008","_id":"50c99d82c82cd100d3000008","created_at":"2012-12-13T10:18:58+01:00","updated_at":"2012-12-19T17:25:35+01:00","title":"Page |
| not found","slug":"404","fullpath":"404","handle":null,"position":1,"raw_template":"Content | |
| - | of the 404 page","published":true,"listed":true,"templatized":false,"templatized_from_parent":false,"target_klass_slug":null,"redirect":false,"redirect_url":null,"cache_strategy":"none","response_type":"text/html","template_changed":null,"editable_elements":[],"localized_fullpaths":{"en":"404"},"translated_in":["en"]}]' |
| + | of the 404 page","published":true,"listed":true,"templatized":false,"templatized_from_parent":false,"target_klass_slug":null,"redirect":false,"redirect_url":null,"cache_strategy":"none","response_type":"text/html","template_changed":null,"editable_elements":[],"localized_fullpaths":{"en":"404","es":"es/404"},"translated_in":["en","es"]}]' |
| http_version: | |
| - | recorded_at: Thu, 13 Dec 2012 12:53:26 GMT |
| + | recorded_at: Fri, 21 Dec 2012 09:41:34 GMT |
| - request: | |
| method: get | |
| - | uri: http://locomotive.engine.dev:3000/locomotive/api/theme_assets.json?auth_token=C3NNrE3RCZgGwiYoyJeQ |
| + | uri: http://locomotive.engine.dev:3000/locomotive/api/pages/50c99d81c82cd100d3000007.json?auth_token=C3NNrE3RCZgGwiYoyJeQ&locale=es |
| body: | |
| encoding: US-ASCII | |
| string: '' | |
| @@ | @@ -263,74 +430,76 @@ http_interactions: |
| X-Ua-Compatible: | |
| - IE=Edge | |
| Etag: | |
| - | - ! '"d751713988987e9331980363e24189ce"' |
| + | - ! '"baf016bca239f7b42bbbc61a7fc3cedd"' |
| Cache-Control: | |
| - max-age=0, private, must-revalidate | |
| X-Request-Id: | |
| - | - 34b486c9978cf5f5450903810c132bc7 |
| + | - 73f72d4d082b906bc447c1efa5ef14ba |
| X-Runtime: | |
| - | - '0.023942' |
| + | - '0.015552' |
| Content-Length: | |
| - | - '2' |
| + | - '603' |
| Server: | |
| - WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10) | |
| Date: | |
| - | - Thu, 13 Dec 2012 12:53:26 GMT |
| + | - Fri, 21 Dec 2012 09:41:34 GMT |
| Connection: | |
| - Keep-Alive | |
| Set-Cookie: | |
| - | - _dummy_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWQxOTQyYjk1YWE5YTliZDRiMWYzYzhkMDk3ZTUzMjZhBjsAVEkiJ3dhcmRlbi51c2VyLmxvY29tb3RpdmVfYWNjb3VudC5rZXkGOwBUWwhJIhhMb2NvbW90aXZlOjpBY2NvdW50BjsARlsGbzoTQlNPTjo6T2JqZWN0SWQGOgpAZGF0YVsRaVVpAclpAZ1pfWkByGkxaQHRaQBpAdNpAGkAaQhJIhlDcWlUSzJLRE5iQnlXWnVoYWJpTAY7AFQ%3D--1aa8aa75bf5957efb7103d8586dcc8bb9763b12e; |
| + | - _dummy_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTBhNWI0Nzg5YTY1NmQyZTFlOWEwYmRlZTRjZjk5OGI0BjsAVEkiJ3dhcmRlbi51c2VyLmxvY29tb3RpdmVfYWNjb3VudC5rZXkGOwBUWwhJIhhMb2NvbW90aXZlOjpBY2NvdW50BjsARlsGbzoTQlNPTjo6T2JqZWN0SWQGOgpAZGF0YVsRaVVpAclpAZ1pfWkByGkxaQHRaQBpAdNpAGkAaQhJIhlDcWlUSzJLRE5iQnlXWnVoYWJpTAY7AFQ%3D--11fef6c40536fb427fa1192bef18a1324b7079c1; |
| domain=.engine.dev; path=/; HttpOnly | |
| body: | |
| encoding: US-ASCII | |
| - | string: ! '[]' |
| + | string: ! '{"id":"50c99d81c82cd100d3000007","_id":"50c99d81c82cd100d3000007","created_at":"2012-12-13T10:18:58+01:00","updated_at":"2012-12-21T10:08:41+01:00","title":"P\u00e1gina |
| + | de inicio","slug":"index","fullpath":"index","handle":null,"position":0,"raw_template":"New |
| + | content of the home page\n","published":true,"listed":true,"templatized":false,"templatized_from_parent":false,"target_klass_slug":null,"redirect":false,"redirect_url":null,"cache_strategy":"none","response_type":"text/html","template_changed":null,"editable_elements":[],"localized_fullpaths":{"en":"","es":"es"},"translated_in":["en","es"]}' |
| http_version: | |
| - | recorded_at: Thu, 13 Dec 2012 12:53:26 GMT |
| + | recorded_at: Fri, 21 Dec 2012 09:41:34 GMT |
| - request: | |
| - | method: post |
| - | uri: http://locomotive.engine.dev:3000/locomotive/api/tokens.json?auth_token=C3NNrE3RCZgGwiYoyJeQ |
| + | method: get |
| + | uri: http://locomotive.engine.dev:3000/locomotive/api/pages/50c99d82c82cd100d3000008.json?auth_token=C3NNrE3RCZgGwiYoyJeQ&locale=es |
| body: | |
| encoding: US-ASCII | |
| - | string: email=admin%40locomotivecms.com&password=locomotive |
| + | string: '' |
| headers: {} | |
| response: | |
| status: | |
| code: 200 | |
| message: ! 'OK ' | |
| headers: | |
| - | location: |
| - | - http://locomotive.engine.dev:3000/locomotive/ |
| - | content-type: |
| + | Content-Type: |
| - application/json; charset=utf-8 | |
| - | x-ua-compatible: |
| + | X-Ua-Compatible: |
| - IE=Edge | |
| - | etag: |
| - | - ! '"4f7e33d0d4bfa634c36913dd6b5c2881"' |
| - | cache-control: |
| + | Etag: |
| + | - ! '"eab3c218dd6fabd531adaa8187117e1b"' |
| + | Cache-Control: |
| - max-age=0, private, must-revalidate | |
| - | x-request-id: |
| - | - 51c26dd05019c37ca3c2911bbc8454fc |
| - | x-runtime: |
| - | - '0.130599' |
| - | content-length: |
| - | - '32' |
| - | server: |
| + | X-Request-Id: |
| + | - 9440f95abebf84de17be22c1aa266934 |
| + | X-Runtime: |
| + | - '0.015355' |
| + | Content-Length: |
| + | - '603' |
| + | Server: |
| - WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10) | |
| - | date: |
| - | - Thu, 13 Dec 2012 17:49:07 GMT |
| - | connection: |
| - | - close |
| - | set-cookie: |
| - | - _dummy_session=BAh7CEkiD3Nlc3Npb25faWQGOgZFRkkiJTQwZTE3Y2QzNjYwZjVkNzE0MzM1YTY4ZDAzMTRlOGZmBjsAVEkiJ3dhcmRlbi51c2VyLmxvY29tb3RpdmVfYWNjb3VudC5rZXkGOwBUWwhJIhhMb2NvbW90aXZlOjpBY2NvdW50BjsARlsGbzoTQlNPTjo6T2JqZWN0SWQGOgpAZGF0YVsRaVVpAclpAZ1pfWkByGkxaQHRaQBpAdNpAGkAaQhJIhlDcWlUSzJLRE5iQnlXWnVoYWJpTAY7AFRJIgpmbGFzaAY7AEZvOiVBY3Rpb25EaXNwYXRjaDo6Rmxhc2g6OkZsYXNoSGFzaAk6CkB1c2VkbzoIU2V0BjoKQGhhc2h7ADoMQGNsb3NlZEY6DUBmbGFzaGVzewY6C25vdGljZUlDOh5BY3RpdmVTdXBwb3J0OjpTYWZlQnVmZmVyIiNIYXNoIHdhcyBzdWNjZXNzZnVsbHkgY3JlYXRlZC4HOwBUOg9AaHRtbF9zYWZlVDoJQG5vdzA%3D--9a091aee8f3e8944add26972c4c92b436680b266; |
| + | Date: |
| + | - Fri, 21 Dec 2012 09:41:34 GMT |
| + | Connection: |
| + | - Keep-Alive |
| + | Set-Cookie: |
| + | - _dummy_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWUwZTBkZWQ2Mzg4OGNjMTZhMjNmY2E1NmZhZTk2MWI3BjsAVEkiJ3dhcmRlbi51c2VyLmxvY29tb3RpdmVfYWNjb3VudC5rZXkGOwBUWwhJIhhMb2NvbW90aXZlOjpBY2NvdW50BjsARlsGbzoTQlNPTjo6T2JqZWN0SWQGOgpAZGF0YVsRaVVpAclpAZ1pfWkByGkxaQHRaQBpAdNpAGkAaQhJIhlDcWlUSzJLRE5iQnlXWnVoYWJpTAY7AFQ%3D--58d57154ff18c252915504de75d589d1d3740f8c; |
| domain=.engine.dev; path=/; HttpOnly | |
| body: | |
| encoding: US-ASCII | |
| - | string: ! '{"token":"C3NNrE3RCZgGwiYoyJeQ"}' |
| - | http_version: '1.1' |
| - | recorded_at: Thu, 13 Dec 2012 17:49:07 GMT |
| + | string: ! '{"id":"50c99d82c82cd100d3000008","_id":"50c99d82c82cd100d3000008","created_at":"2012-12-13T10:18:58+01:00","updated_at":"2012-12-19T17:25:35+01:00","title":"P\u00e1gina |
| + | no encontrada","slug":"404","fullpath":"404","handle":null,"position":1,"raw_template":"Content |
| + | of the 404 page","published":true,"listed":true,"templatized":false,"templatized_from_parent":false,"target_klass_slug":null,"redirect":false,"redirect_url":null,"cache_strategy":"none","response_type":"text/html","template_changed":null,"editable_elements":[],"localized_fullpaths":{"en":"404","es":"es/404"},"translated_in":["en","es"]}' |
| + | http_version: |
| + | recorded_at: Fri, 21 Dec 2012 09:41:34 GMT |
| - request: | |
| method: get | |
| - | uri: http://locomotive.engine.dev:3000/locomotive/api/pages.json?auth_token=C3NNrE3RCZgGwiYoyJeQ |
| + | uri: http://locomotive.engine.dev:3000/locomotive/api/theme_assets.json?auth_token=C3NNrE3RCZgGwiYoyJeQ |
| body: | |
| encoding: US-ASCII | |
| string: '' | |
| @@ | @@ -340,36 +509,74 @@ http_interactions: |
| code: 200 | |
| message: ! 'OK ' | |
| headers: | |
| - | content-type: |
| + | Content-Type: |
| + | - application/json; charset=utf-8 |
| + | X-Ua-Compatible: |
| + | - IE=Edge |
| + | Etag: |
| + | - ! '"d751713988987e9331980363e24189ce"' |
| + | Cache-Control: |
| + | - max-age=0, private, must-revalidate |
| + | X-Request-Id: |
| + | - 12df33db4e52ff46db5592eb12ccdf8d |
| + | X-Runtime: |
| + | - '0.014286' |
| + | Content-Length: |
| + | - '2' |
| + | Server: |
| + | - WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10) |
| + | Date: |
| + | - Fri, 21 Dec 2012 09:41:34 GMT |
| + | Connection: |
| + | - Keep-Alive |
| + | Set-Cookie: |
| + | - _dummy_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTNhMmM0M2FjMDE4ZTc3ZjY3ZmI5ZDFlN2MyZGM2NWIxBjsAVEkiJ3dhcmRlbi51c2VyLmxvY29tb3RpdmVfYWNjb3VudC5rZXkGOwBUWwhJIhhMb2NvbW90aXZlOjpBY2NvdW50BjsARlsGbzoTQlNPTjo6T2JqZWN0SWQGOgpAZGF0YVsRaVVpAclpAZ1pfWkByGkxaQHRaQBpAdNpAGkAaQhJIhlDcWlUSzJLRE5iQnlXWnVoYWJpTAY7AFQ%3D--4d959c57627b8a4a338a840a8dfb3b4c2a33194b; |
| + | domain=.engine.dev; path=/; HttpOnly |
| + | body: |
| + | encoding: US-ASCII |
| + | string: ! '[]' |
| + | http_version: |
| + | recorded_at: Fri, 21 Dec 2012 09:41:34 GMT |
| + | - request: |
| + | method: post |
| + | uri: http://locomotive.engine.dev:3000/locomotive/api/tokens.json?auth_token=C3NNrE3RCZgGwiYoyJeQ |
| + | body: |
| + | encoding: US-ASCII |
| + | string: email=admin%40locomotivecms.com&password=locomotive |
| + | headers: {} |
| + | response: |
| + | status: |
| + | code: 200 |
| + | message: ! 'OK ' |
| + | headers: |
| + | Location: |
| + | - http://locomotive.engine.dev:3000/locomotive/ |
| + | Content-Type: |
| - application/json; charset=utf-8 | |
| - | x-ua-compatible: |
| + | X-Ua-Compatible: |
| - IE=Edge | |
| - | etag: |
| - | - ! '"409817111469d412c7934730dc8a5a3d"' |
| - | cache-control: |
| + | Etag: |
| + | - ! '"4f7e33d0d4bfa634c36913dd6b5c2881"' |
| + | Cache-Control: |
| - max-age=0, private, must-revalidate | |
| - | x-request-id: |
| - | - 2b48d7f47c49b4abc5fb70e3b61abbf0 |
| - | x-runtime: |
| - | - '0.107125' |
| - | content-length: |
| - | - '1146' |
| - | server: |
| + | X-Request-Id: |
| + | - 207c6017812a9983847c2ade11c1a481 |
| + | X-Runtime: |
| + | - '0.012227' |
| + | Content-Length: |
| + | - '32' |
| + | Server: |
| - WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10) | |
| - | date: |
| - | - Mon, 17 Dec 2012 08:22:07 GMT |
| - | connection: |
| - | - close |
| - | set-cookie: |
| - | - _dummy_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTc0OGNlYzRkODI4OWRlYjA1ZDgxYTc1OTE4MGI5ODM4BjsAVEkiJ3dhcmRlbi51c2VyLmxvY29tb3RpdmVfYWNjb3VudC5rZXkGOwBUWwhJIhhMb2NvbW90aXZlOjpBY2NvdW50BjsARlsGbzoTQlNPTjo6T2JqZWN0SWQGOgpAZGF0YVsRaVVpAclpAZ1pfWkByGkxaQHRaQBpAdNpAGkAaQhJIhlDcWlUSzJLRE5iQnlXWnVoYWJpTAY7AFQ%3D--764b326635f5102181499b4917a36250142c8a05; |
| + | Date: |
| + | - Fri, 21 Dec 2012 09:41:34 GMT |
| + | Connection: |
| + | - Keep-Alive |
| + | Set-Cookie: |
| + | - _dummy_session=BAh7CEkiD3Nlc3Npb25faWQGOgZFRkkiJTVhMWZlMTQ0NWFlZDk5MGJmODgxMzQwNjc4MjVkNGFjBjsAVEkiJ3dhcmRlbi51c2VyLmxvY29tb3RpdmVfYWNjb3VudC5rZXkGOwBUWwhJIhhMb2NvbW90aXZlOjpBY2NvdW50BjsARlsGbzoTQlNPTjo6T2JqZWN0SWQGOgpAZGF0YVsRaVVpAclpAZ1pfWkByGkxaQHRaQBpAdNpAGkAaQhJIhlDcWlUSzJLRE5iQnlXWnVoYWJpTAY7AFRJIgpmbGFzaAY7AEZvOiVBY3Rpb25EaXNwYXRjaDo6Rmxhc2g6OkZsYXNoSGFzaAk6CkB1c2VkbzoIU2V0BjoKQGhhc2h7ADoMQGNsb3NlZEY6DUBmbGFzaGVzewY6C25vdGljZUlDOh5BY3RpdmVTdXBwb3J0OjpTYWZlQnVmZmVyIiNIYXNoIHdhcyBzdWNjZXNzZnVsbHkgY3JlYXRlZC4HOwBUOg9AaHRtbF9zYWZlVDoJQG5vdzA%3D--d057a61b48d4aae8516cff3ae43046eb0e13fb97; |
| domain=.engine.dev; path=/; HttpOnly | |
| body: | |
| encoding: US-ASCII | |
| - | string: ! '[{"id":"50c99d81c82cd100d3000007","_id":"50c99d81c82cd100d3000007","created_at":"2012-12-13T10:18:58+01:00","updated_at":"2012-12-14T12:22:51+01:00","title":"Home |
| - | page","slug":"index","fullpath":"index","handle":null,"position":0,"raw_template":"Content |
| - | of the home page","published":true,"listed":true,"templatized":false,"templatized_from_parent":false,"target_klass_slug":null,"redirect":false,"redirect_url":null,"cache_strategy":"none","response_type":"text/html","template_changed":null,"editable_elements":[],"localized_fullpaths":{"en":""},"translated_in":["en"]},{"id":"50c99d82c82cd100d3000008","_id":"50c99d82c82cd100d3000008","created_at":"2012-12-13T10:18:58+01:00","updated_at":"2012-12-13T10:18:58+01:00","title":"Page |
| - | not found","slug":"404","fullpath":"404","handle":null,"position":1,"raw_template":"Content |
| - | of the 404 page","published":true,"listed":true,"templatized":false,"templatized_from_parent":false,"target_klass_slug":null,"redirect":false,"redirect_url":null,"cache_strategy":"none","response_type":"text/html","template_changed":null,"editable_elements":[],"localized_fullpaths":{"en":"404"},"translated_in":["en"]}]' |
| - | http_version: '1.1' |
| - | recorded_at: Mon, 17 Dec 2012 08:22:07 GMT |
| + | string: ! '{"token":"C3NNrE3RCZgGwiYoyJeQ"}' |
| + | http_version: |
| + | recorded_at: Fri, 21 Dec 2012 09:41:34 GMT |
| recorded_with: VCR 2.3.0 | |
spec/integration/server_spec.rb
+5
-0
| @@ | @@ -21,4 +21,9 @@ describe Locomotive::Builder::Server do |
| get '/void' | |
| last_response.body.should =~ /Content of the 404 page/ | |
| end | |
| + | |
| + | it "shows content" do |
| + | get '/products/latest' |
| + | last_response.body.should =~ /The name of the first product is: Useless stuff/ |
| + | end |
| end | |
| \ No newline at end of file | |
spec/integration/sites_spec.rb
+6
-3
| @@ | @@ -6,9 +6,12 @@ describe Locomotive::Builder do |
| import_site | |
| YAML.load_file("site/config/site.yml").should == { | |
| "name"=>"locomotive", | |
| - | "locales"=>["en"], |
| + | "locales"=>["en", "es"], |
| "subdomain"=>"locomotive", | |
| - | "domains"=>["locomotive.engine.dev"] |
| + | "domains"=>["locomotive.engine.dev"], |
| + | "seo_title"=>{"en"=>nil, "es"=>nil}, |
| + | "meta_keywords"=>{"en"=>nil, "es"=>nil}, |
| + | "meta_description"=>{"en"=>nil, "es"=>nil} |
| } | |
| end | |
| @@ | @@ -22,6 +25,6 @@ describe Locomotive::Builder do |
| Locomotive::Builder.push("site", "http://locomotive.engine.dev:3000", "admin@locomotivecms.com", "locomotive") | |
| end | |
| - | WebMock.should have_requested(:put, "http://locomotive.engine.dev:3000/locomotive/api/pages/50c99d81c82cd100d3000007.json?auth_token=C3NNrE3RCZgGwiYoyJeQ").with(:body => "page[listed]=true&page[published]=true&page[cache_strategy]=none&page[response_type]=text%2Fhtml&page[raw_template]=New%20content%20of%20the%20home%20page%0A&locale=en").once |
| + | WebMock.should have_requested(:put, /pages\/.+.json\?auth_token=.+/).with(:body => "page[listed]=true&page[published]=true&page[cache_strategy]=none&page[response_type]=text%2Fhtml&page[raw_template]=New%20content%20of%20the%20home%20page%0A&locale=en").once |
| end | |
| end | |
| \ No newline at end of file | |