Skip to content

Instantly share code, notes, and snippets.

Scenario: Convert current word to uppercase # plugins/edit_tab/features/editing.feature:68
When I type "Some Text" # plugins/edit_tab/features/step_definitions/edit_tab_steps.rb:22
And I press "Ctrl+A" # vendor/gutkumber/lib/gutkumber/steps/keypress_steps.rb:52
And I press "Ctrl+U" # vendor/gutkumber/lib/gutkumber/steps/keypress_steps.rb:52
Then I should see "<s>SOME<c> Text" in the EditTab # plugins/core/features/step_definitions/tab_steps.rb:14
expected "<c>SOME Text" to include "<s>SOME<c> Text" (Spec::Expectations::ExpectationNotMetError)
./plugins/redcar/features/../../core/features/step_definitions/tab_steps.rb:17:in `/^I should see (?-mix:"((?:[^"]|\")+)") in the (\w+)(?: "([^"]+)")?$/'
plugins/edit_tab/features/editing.feature:72:in `Then I should see "<s>SOME<c> Text" in the EditTab'
Scenario: Convert selected text to lowercase # plugins/edit_tab/features/editing.fe
$ /opt/ruby-1.9.1-p129/bin/ruby -Ilib test/*
user system total real
store 1000 objects 3.470000 0.720000 4.190000 ( 4.920075)
commit one object 0.190000 0.030000 0.220000 ( 0.225264)
load 1000 objects /opt/ruby-1.9.1-p129/lib/ruby/gems/1.9.1/gems/georgi-git_store-0.3/lib/git_store.rb:294:in `get_object': not a loose object: 8717b89b4e102a5eedc57ee74582f320b6e7feb4 (RuntimeError)
from /opt/ruby-1.9.1-p129/lib/ruby/gems/1.9.1/gems/georgi-git_store-0.3/lib/git_store.rb:270:in `get'
from /opt/ruby-1.9.1-p129/lib/ruby/gems/1.9.1/gems/georgi-git_store-0.3/lib/git_store.rb:149:in `load'
from /opt/ruby-1.9.1-p129/lib/ruby/gems/1.9.1/gems/georgi-git_store-0.3/lib/git_store.rb:69:in `initialize'
from test/benchmark.rb:24:in `new'
from test/benchmark.rb:24:in `block (2 levels) in <main>'
if ARGV[0] == "rubyredis"
require 'rubyredis'
redis = RedisClient.new(:timeout => nil)
else
require 'rubygems'
require 'redis'
redis = Redis.new(:timeout => nil)
end
redis-rb:
25 May 17:14:14 * WARNING overcommit_memory is set to 0! Background save may fail under low condition memory. To fix this issue add 'echo 1 > /proc/sys/vm/overcommit_memory' in your init scripts.
25 May 17:14:14 * Warning: no config file specified, using the default config. In order to specify a config file use 'redis-server /path/to/redis.conf'
25 May 17:14:14 - Server started, Redis version 0.100
25 May 17:14:14 - The server is now ready to accept connections on port 6379
25 May 17:14:15 . 0 clients connected (0 slaves), 2517 bytes in use
25 May 17:14:18 . Accepted 127.0.0.1:36449
25 May 17:14:18 . Client closed connection
25 May 17:14:20 . DB 0: 1000 keys (0 volatile) in 0 slots HT.
25 May 17:14:20 . 0 clients connected (0 slaves), 90429 bytes in use
if ARGV[0] == "rubyredis"
require 'rubyredis'
def redis
RedisClient.new(:timeout => nil)
end
else
require 'rubygems'
require 'redis'
require 'rubygems'
require 'mq'
trap("INT") do
puts "int"
## what goes here? ##
end
module Messaging
def self.thread
require 'rubygems'
require 'mq'
module Messaging
trap("INT") do
puts "Received interrupt"
EM.stop
end
$.getJSON("http://localhost:3000/api/3.0/events.json?start_date=2009-05-28&end_date=2009-05-28&apikey=mykey&jsoncallback=?",
function(data){
alert(data["resultsPage"]["totalEntries"]);
});
import java.io.UnsupportedEncodingException;
import org.joni.Config;
import org.joni.Matcher;
import org.joni.Option;
import org.joni.Regex;
import org.joni.Region;
import org.joni.Syntax;
import org.jcodings.Encoding;
module Songkick
module Retryable
# A simple helper to allow a block to be retried a given
# number of times, but only if the correct type of error was
# raised.
#
# @param [Integer] the number of times to retry. The block will never be run more times than this.
# @param [Class] the type of errors to retry on.