module Kibutsu
Main module containing the public API of Kibutsu
Public Class Methods
dont_care(type)
click to toggle source
# File lib/kibutsu.rb, line 20 def self.dont_care(type) case type when :string "don't care about this string" when :number 0 when :boolean false end end
fixture_name_to_id(fixture_name)
click to toggle source
# File lib/kibutsu.rb, line 12 def self.fixture_name_to_id(fixture_name) # hash algorithm based on djb2 (see http://www.cse.yorku.ca/~oz/hash.html) # scaled to signed int range for postgres int compatibility hash = 5381 fixture_name.to_s.each_char { |c| hash = ((hash << 5) + hash) + c.ord } (hash % 4_294_967_295) - 2_147_483_648 end
load_fixtures!(database_connection_url, fixtures_path)
click to toggle source
# File lib/kibutsu.rb, line 7 def self.load_fixtures!(database_connection_url, fixtures_path) fixture_world = FixtureWorld.instance fixture_world.load(database_connection_url, fixtures_path) end