Hi everyone!
I’ve just pushed my simple application for working with pomodoro.
based on backbonejs, jquerymobile, sinatra, rack-offline.
We have already made fork for capybara-webkit and now we can test localStorage features using cucumber/capybara-webkit.
But for enabling properly this feature you should use the next following snippet in the env.rb:
Capybara.default_host = "lvh.me"
Capybara.app_host = "http://lvh.me:3003"
Capybara.server_port = 3003
Before('@html5') do
if [:webkit, :webkit_debug].include? Capybara.current_driver
page.driver.browser.set_attribute("LocalStorageEnabled")
# Single localStorage per scenario by generating subdomain
part = (1000 * rand()).to_i.to_s
Capybara.default_host = "subdomain#{part}.lvh.me"
Capybara.app_host = "http://subdomain#{part}.lvh.me:3003"
end
end
Some days ago I’ve got task to test our offline application with cucumber scenarios.
It was very difficult to do it because in our project we are using capybara-webkit and unfortunately it doesn’t support html5 a lot of features in this webkit server implementation. After digging into forks of capybara-webkit I found one fork with html5 support features via custom ‘set_attribute’ for browser:
page.driver.browser.set_attribute("LocalStorageEnabled", true)
I’ve made merge with master of capybara-webkit in my own fork and then we’ve started to use this fork. But then I found another problem connecting with routing through the application using backbone routers concept with ‘#’ in the routes.
It looks like:
http://localhost/#/posts http://localhost/#/posts/new
When I tried to visit this links webkit_server was always hanging without throwing messages by timeout. It makes me upset and I’ve decided to replace capybara-webkit driver at all.
I am trying to use poltergeist
Continue…
Hi everyone!
I have just published very small library for backbone.
May be it will helps someone.
2 days ago I’ve lost my internet connection at home. But I had very important emails for me on the gmail. But I thought I have offline application for gmail developed by google.
I’ve installed this chrome app just for checking possible implementation for offline apps. because on my current work we are working on the creation with the same functionnality application. Offline gmail is using web sqlite storage for saving cached / synced data.
it looks like

Time to completely client side applications. Yeah, it’s really awesome. But for less complex applications it’s pretty simple to use localStorage for saving synced data.
Also as I see guys in google added syncing process on the background and refresh button for manually syncing by user action.
For opening application they are using html5 application manifest for caching resources like css/js/images. In Rails we are using rack-offline for generating same manifest file choosing files for caching.