...Geordi: cuc features/focus_issues.feature features/flickering_tests.feature Be careful not to use a line number in the call. Tests will not run in parallel when a line number is used. Observe how each...

...if you are using Geordi support for headless Selenium with VNC you need to call cuc-show to see the Firefoxes). Make sure that the window opened by focus_issues.feature stays...

makandra dev

...code, you will need to run multiple threads. Unfortunately, when you use blocking system calls (e.g. locks on the database), Ruby 1.8 threads won't work because system calls will...

makandra dev
innig.net

...entities? "return" returns from closure True closure? or declaring context...? Arity check? --------------- ----------------------------- ------------------- 1. block (called with yield) N declaring no 2. block (&b => f(&b) => yield) N declaring no...

...semantically identical -- that is, they're different syntaxes for the same thing: 1. block (called with yield) 2. block (&b => f(&b) => yield) ------- 3. block (&b => b.call) 4. Proc.new...

...that run without Rails. When you work on a production Rails console, you can call Rails.logger.flush to write log output...

...it if that is the case. You can use the following trait and always call send_file_inside with the parent directory of the files as the first parameter, like...

...lib/rack/cookie_stripper.rb. module Rack class CookieStripper ENABLED = false def initialize(app) @app = app end def call(env) Request.new(env).cookies.clear if ENABLED @app.call(env) end end end Next, configure your application...

class AuthenticatingResqueServer < Resque::Server class ClearanceAuthentication def initialize(app) @app = app end def call(env) @request = ActionDispatch::Request.new(env) remember_token = @request.cookies["remember_token"] if skip_authentication? or (remember_token.present...

original_hash # => { foo: { bar: "original value" } How it works: #deep_dup simply calls itself recursively for arrays and hashes and calls #dup for all other Objects where #duplicable...

task :bar, :roles => :something do # do crazy stuff end end Whenever we call foo.bar in our recipe, Capistrano will fail if you deploy to a stage where none...

...avoid the above error message.\ Now, when Capistrano enters a hook and tries to call a method that is only available for that group of servers, you'll get another...

...the client finally. While this is possible, I'd recommend to use what AWS calls "Query String Authentication". If you're using Paperclip you can chose between two storage adapters...

...your_model.document.expiring_url => "http://s3-eu-west-1.amazonaws.com/your-bucket/files/foo/bar/123/456/ab/cd/1/2/3/original/Attachment.pdf?AWSAccessKeyId=ABSJASHJK232JAHBS&Signature=V6aJhal2kaB4bxKal23lSMV%2F9w%3D&Expires=1347889426" The expiring_url method carries out a web service call to S3 to gain the data for AWSAccessKeyId and Signature being used within the URL...

github.com

...cargo gives your API a new /batch route that lets clients perform multiple API calls with a single request. The batched calls are resolved internally and are then returned as...

stackoverflow.com

...work: Dig really deep In any case, Rails usually breaks on the blame_file! call where it tries to show you the source of the error. You can (temporarily) hack...

...Rails' require call in .../gems/activesupport-2.3.12/lib/active_support/dependencies.rb and show the error before Rails gets it into its hands: def require(file, *extras) if Dependencies.load? Dependencies.new_constants_in(Object) { super } else super

scope.parentFn(arg1: 'first', arg2: 'second') In this dumb example, the panel directive will call its scope's parentFn() function with two arguments, which proxies to parent.someFunction('first', 'second'). But...

@app.directive 'panel', -> restrict: 'E' scope: parentFn: '&proxy' link: (scope) -> scope.parentFn(arg: 'the argument') ... calls parent.someFunction('fixed argument', 'the argument'). Tested in Angular 1.3. Also see Angular directive scope binding...

...Move your current Sass file into a partial. Let's assume it was called screen.sass. Rename it _screen.sass. Step 2 Create two new Sass files: Call this one screen.sass:

@import screen Call this one screen_for_ie.sass: $ie = true @import screen Step 3 Change your page head to something like this: <%= stylesheet_link_tag 'screen', :media => 'screen' %>

If others on a call (Skype, SIP, ...) can not hear you loud enough, your volume levels are probably too low. Also, Skype may be changing your mixer levels.

...you have more than one recording device, find the correct one. Make a test call to a colleague that can tell you if it's too loud or too quiet...

...than it sounds. First, prepare your certificate store. Note that it is essential to call set_default_paths to include your system's default certificate store which contains root CAs...

...migration, you might find this to be harder than you thought. While you can call ActiveRecord::Base.connection.execute(sql) to execute arbitrary SQL commands, the MySQL connection is configured to only...

...around this by opening a second MySQL connection that does accept multiple statements per call. Below is an example for a migration that loads a dump from db/production_structure.sql: class LoadDump...

makandra dev

...Capybara API is somewhat hard for parse for a list of methods you can call on a Capybara node. Below you can find such a list. It's all copied...

...whatever you scoped to by saying within(selector) {...

...}. You can select child notes by calling page.find(selector) or page.all(selector). You can call the same list of methods on child...

...code with dozens of debug messages, it can be hard to find all those calls to puts and p. This note describes a hack that lets you trace those messages...

...foobar' at /home/henning/projects/notes/features/step_definitions/web_steps.rb:280:in `puts' When you're done, remember to remove that call to Undebug.trace_message because it will slow down your application...

...process the specified version or all versions, if none is passed as an argument. Call recreate_versions! on a mounted uploader. A common usecase User.all.each { |user| user.avatar.recreate_versions! if user.avatar...

...uploader dynamically generates the filename (e.g. by incorporating a user's name), you must call save afterwards, because recreate_versions! doesn't update the stored filename...

...repeat the last macro. This does not work instantly after recording, you need explicitly call the macro once. You can combine the above: 42@@ calls the last run macro...

def bar; end end module B end When you want to call methods from A inside B you would normally just include A into B:

...a module's method accessible from the outside. You could put the module_function calls into A but it would remain unclear to people looking at B's code.

Call with the server's hostname (and user if you have no SSH agent), e.g. install-gems-remotely my.server.com # or without agent: install-gems-remotely me@my.server.com When you call it...

...though that class inherits from Hash and often behaves like one, you can not call slice on it to select only a subset of cookies. Why? Because Hash#slice calls...