Author: admin

  • What is Cucumber?

    Cucumber is a framework for writing and executing high-level descriptions of your software’s functionality. It supports Behavior Driven Development (BDD). It offers a way to write tests that anybody can understand, regardless of their technical knowledge. The language that Cucumber understands is called Gherkin. Cucumber itself is written in Ruby, but it can be used to “test” code written in Ruby…

  • What is Capybara?

    On Capybara’s official page it is described as follows: “Capybara is a library written in the Ruby programming language which makes it easy to simulate how a user interacts with your application. Capybara can talk with many different drivers who execute your tests through the same clean and simple interface. You can seamlessly choose between Selenium, Webkit, or pure Ruby drivers. Capybara automatically waits for your…

  • Setting the Road

    Now that we know the basics of Cuba, we’re ready to make our twitter clone. In this chapter, we’ll set the road to start coding theapplication and have a look at how Cuba applications looks in the wild.After reading this chapter, you will know:The general layout of a Cuba application.How to properly manage project dependencies.How…

  • Rack & Roll!

    As we mentioned earlier, Cuba is built on top of Rack … but what is Rack?Rack deals with HTTP requests. It provides a minimal interface between web servers supporting Ruby and Ruby frameworks. WithoutRack, Cuba would have to implement its own handler for each web server.You didn’t notice yet but we already used Rack. We…

  • Breaking Down the Syntax

    Now that we know how to build a minimal Cuba application, let’s take a deeper look at the syntax. We can split this example into threeparts:First, we require Cuba to load the gem and get access to its functionality. require “cuba” Then we can identify four methods that appear in most Cuba applications: define , on…

  • Hello Cuba!

    Before getting started, we have to install Cuba. Use the gem  command: Now that Cuba is installed, it’s easy to create a Cuba application. Open your text editor of preference and create a file called with the following code: You already have a functional Cuba application! To see it in action, type  in the command…

  • What’s Cuba?

    To begin, let’s take a moment to answer “what is Cuba?” .Cuba is a web application micro-framework written in Ruby byMichel Martens. It rides onRack so we have the benefits of middleware,Rack libraries, and a variety of web servers for free.Cuba is minimalist by design (203 lines of code) which makes itfaster compared to other web frameworks. Also,…

  • Welcome Aboard

    This first chapter focuses on the bare minimum you need to know to work with Cuba. We’ll learn some of the core concepts walkingthrough the creation of a simple application. After reading this, you will know:How to install Cuba.Create a “Hello world!”  application.The basic principles behind Cuba.The basics of Rack.

  • The Guide to Cuba

    The Guide to Cuba Learn how to make Ruby web applications by following a minimalistic approach. This book will teach you the basics ofCuba, the Rubymicroframework, and a set of micro libraries.This book is a work in progress. The content may change at any time.All content is licensed under theCreative Commons Attribution Non Commercial Share…

  • Padrino Cache

    This component enables caching of an application’s response contents on both page- and fragment-levels. Output cached in this manner is persisted, until it expires or is actively expired, in a configurable store of your choosing. Most popular key/value stores work out of the box. Take a look at the Moneta documentation for a list of all supported…