makandra dev

Trick: Do not use convert but mogrify: mogrify -resize 50% * This overwrites the original image file. In contrast, convert writes...

Note: Modern Rails has two build pipelines, the asset pipeline (or "Sprockets") and Webpacker. The principles below apply for both...

The step definition below allows you to write: Then I should see an HTML redirect to "http://www.makandracards.com" in the...

funtoo.org

Keychain helps you to manage ssh and GPG keys in a convenient and secure manner. It acts as a frontend...

If you have an html_safe string, you won't be able to call gsub with a block and match...

In a nutshell: return statements inside blocks cause a method's return value to change. This is by design (and...

A print stylesheet is easy to create. Choose a font suited for paper, hide some elements, done. Unfortunately print stylesheets...

This works in modern RSpecs (RSpec >= 2.x) and Cucumbers: rspec spec/models/node_spec.rb:294:322 cucumber features/nodes.feature:543:563:579

Every now and then, Java is subject to security issues where code can break out of Java's sandbox and...

Sometimes you need to look at the filter chain in specs. You can do it like that on Rails 2...

Never name your shared example group *_spec.rb. Otherwise rspec will try to load your example group as a spec and...

github.com

Internet Explorer until version 9 has some limitations when parsing CSS files Summarized, these are: Up to 31 CSS files...

github.com

In Selenium features the server and client are running in separate processes. Therefore, when mocking time with a tool like...

Be careful when stubbing out attributes on records that are defined by associations. Nothing is as it seems to be...

github.com

No one wants to cry over regression issues in views; does testing HTML and CSS have to be such a...

Our rspec_candy gem now gives you three matchers: be_same_number_as Tests if the given number is the...

When you develop a gem and you have a Gemfile in your project directory, you might be surprised that your...

makandra dev

Consul 0.4.0 comes with some new features. Dependencies Consul no longer requires assignable_values, it's optional for when you...

Don't say is_a?(ActiveRecord::NamedScope::Scope) because that is no longer true in Rails 3 and also doesn...

github.com

paper_trail is an excellent gem to track record versions and changes. You almost never want to reimplement something like...

makandracards.com

When we looked at this card together a year ago, we were no longer sure if unquote is actually useful...

The will_paginate gem will show a default of 30 records per page. If you want to test pagination in...

api.jquery.com

The $.cssHooks object provides a way to define functions for getting and setting particular CSS values. It can also be...

makandracards.com

The step we used in the past (Then "foo" should not be visibile) doesn't reliably work in Selenium features...