This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RuoteMigrator | |
attr_reader :process_status | |
def initialize process_status | |
@process_status = process_status | |
end | |
def === other | |
other = other.pdef if other.respond_to?(:pdef) | |
process_status.root_expression.tree == other | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Blue Component</key> | |
<real>0.19370138645172119</real> | |
<key>Green Component</key> | |
<real>0.15575926005840302</real> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " We're running Vim, not Vi! | |
set hidden | |
set title | |
set list | |
set listchars=tab:»·,trail:· | |
"set ai sw=2 sts=2 et | |
set t_Co=256 " lots of colors | |
set incsearch | |
syntax on | |
set scrolloff=2 " make it scroll before I hit the edge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby -e "Gem.configuration.rubygems_api_key = nil" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var require = (function(){ | |
var requires = {}; | |
return function(filename, callback){ | |
if(typeof(requires[filename]) === "undefined"){ | |
requires[filename] = { | |
callbacks: [], | |
state: "initializing", | |
}; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ruby -rrubygems test/unit/storage.rb -ntest_get_many_schedules -- --redis | |
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-linux] | |
Fri Nov 12 14:26:32 -0800 2010 | |
Loaded suite test/unit/storage | |
Started | |
F | |
Finished in 0.042717 seconds. | |
1) Failure: | |
test_get_many_schedules(UtStorage) [test/unit/storage.rb:191]: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/home/ian/.rvm/gems/ruby-1.8.7-p174/gems/ruote-2.1.10/lib/ruote/storage/base.rb:280:in `[]': can't convert String into Integer (TypeError) | |
from /home/ian/.rvm/gems/ruby-1.8.7-p174/gems/ruote-2.1.10/lib/ruote/storage/base.rb:280:in `filter_schedules' | |
from /home/ian/.rvm/gems/ruby-1.8.7-p174/gems/ruote-2.1.10/lib/ruote/storage/base.rb:280:in `select' | |
from /home/ian/.rvm/gems/ruby-1.8.7-p174/gems/ruote-2.1.10/lib/ruote/storage/base.rb:280:in `filter_schedules' | |
from /home/ian/.rvm/gems/ruby-1.8.7-p174/gems/ruote-2.1.10/lib/ruote/storage/base.rb:143:in `get_schedules' | |
from /home/ian/.rvm/gems/ruby-1.8.7-p174/gems/ruote-2.1.10/lib/ruote/storage/composite_storage.rb:123:in `send' | |
from /home/ian/.rvm/gems/ruby-1.8.7-p174/gems/ruote-2.1.10/lib/ruote/storage/composite_storage.rb:123:in `get_schedules' | |
from /home/ian/.rvm/gems/ruby-1.8.7-p174/gems/ruote-2.1.10/lib/ruote/worker.rb:141:in `step' | |
from /home/ian/.rvm/gems/ruby-1.8.7-p174/gems/ruote-2.1.10/lib/r |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# db/migrations/2010-11-12_10_54_copy_data_to_new_storage_backend.rb | |
couch = Workflow::Engine.build_couch_storage | |
redis = Workflow::Engine.build_redis_storage | |
# based on http://groups.google.com/group/openwferu-users/browse_thread/thread/8d32d3052eacfba6/423f33bb4b44189f and | |
# Ruote::StorageBase#copy_to | |
# | |
# just limits the types of data that are copied over as compared to copy_to | |
%w( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'user-agent' | |
require 'rational' | |
require 'yaml' | |
parsed = nil | |
File.open(ARGV[0], 'r') do |f| | |
parsed = f.each_line.map{|l|Agent.new(l.strip)} | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You should kill the Ruby process in between runs to flush out the memory | |
# entirely. | |
puts "memory usage: #{MemoryUsage.get}" | |
n = 5 | |
Benchmark.bm do |r| | |
r.report do | |
n.times do | |
Workflow.engine.context.history.by_process("20100826-behobijunu") | |
end | |
end |