More than I like, I’ve run into situations where I had to post to services from ruby using WSDLs via SOAP requests. While there are some gems out there that help with it, writing your own solution is actually pretty … Read more
This is the second part following this post: Creating a Service (Gateway) in CF
This post will summarize:
– how to deploy a custom service
– how to deploy the gateway that brokers that service
– how to deploy and … Read more
One of the exciting things in Cloud Foundry is the possibility to connect your app to different services.
The interesting aspect about services is actually not the service itself. That can just be a regular CF app that provides some … Read more
The best way for Google and friends to crawl and index a page is by finding static content. With applications that make heavy use of libraries like Backbone, Sproutcore or ember.js a lot of the content can be rendered in … Read more
Recently, I've been using a nice way to test if the correct arguments have been passed to a method. This uses a neat property of jasmine where you set up the method you want to test as a mock and have an expectation inside the mock.
The only caveat is you have to set an expectation that your mock get's called, otherwise if it never gets executed the test will also never fail.
- anybody seen old content showing up on heroku at various points in time (especially at night)?
- crickets ...
- rake execute takes a hash, rake invoke takes an ordered list
- http://join.me is a cool tool for interactive screen sharing
- don't use anonymous iframes for ajax file upload, use a class or id,
- we saw weird issues with a chat provider who uses an anonymous iframe which was getting all our file upload info
jquery plugins tend to mess with your markup and force it into a specific layout which can break your behaviour
acceptance vs. non acceptance rspec
When running regular rspec tests and acceptance test combined slow build time were observed, breaking them out into different builds resulted in a 25% speed up (combined 21 min, only rspec 5min, acceptance 10min)
- possible help: leave transactional_fixtures as true for acceptance supported by forcing one db connection as described here: http://blog.plataformatec.com.br/2011/12/three-tips-to-improve-the-performance-of-your-test-suite/
- reopening the rspec config block in the acceptance helper can have unintended side effects, if you are running units specs and acceptance specs together
Another entry for memory's sake. In case you are running into problems with IE loosing cookies. You might have to set the psp response headers. See here for details.
It is actually not that hard and there are resources all over the inter tubes, you just have to find them. For the sake of saving myself and some fellow programmers some time I will summarize the process we followed.
First, you need to make sure to have the fixture_builder, database_cleaner and while we're at it headless gems installed. Then the bulk of the work happens in acceptance_helper.rb, spec_helper.rb and fixture_builder.rb.
Details on what is in them are below. There are some notable things which I mention in context with the code.