ruby

A 2-post collection

Is This Code Safe?

A Recent code example I found online got me thinking about how explicit should our security procedures be, or in other words that one should still use best security practices even when the framework provides these tests automatically. Below you'll find the example and my reasoning. As always would love to hear your opinion too. The Code This time we're dealing with ruby and this following snippet shows how to handle file upload in Sinatra: post '/save_image' do @filename = params[:file][:filename] file = params[

Read more

Automated Testing Setup Using Capybara and Selenium

So you finally decided you want to add automated tests to your web applications. That's great, because automated tests will increase the quality of your product and hopefully find regressions before your users will. Below is a really simple setup you can start using today on your development machine and improve as your tests grow. The Tools An automated test is a script that will automatically open a browser, perform some tasks in the web page and report a result. My setup uses the following tools:

Read more