This file contains 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
AGP::call_agp("VerifyAccountAvailabilityService", { | |
:username => username, | |
:email => "test@test.org", | |
:password => "abc123", | |
:confirmPassword => "abc123" | |
}) |
This file contains 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
import java.io.*; | |
import com.lowagie.text.DocumentException; | |
import org.xhtmlrenderer.pdf.ITextRenderer; | |
import org.xhtmlrenderer.pdf.ITextFontResolver; | |
import com.lowagie.text.pdf.BaseFont; | |
public class FSTest { | |
public static void main(String[] args) | |
throws IOException, DocumentException { |
This file contains 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 ThingsController < ApplicationController | |
def index | |
puts defined?(@something) | |
puts @something | |
@something = "test" | |
render :text => 'done' | |
end | |
end |
This file contains 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 -KU | |
require 'rubygems' | |
require 'do_sqlite3' | |
require 'dm-core' | |
require 'pp' | |
DataMapper.logger = DataMapper::Logger.new($stderr, :debug) | |
DataMapper.setup(:default, 'sqlite3://memory') |
This file contains 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
require 'rubygems' | |
require 'graphviz' | |
path, output = ARGV | |
regex = /render\W+:partial\W+=>\W+"([\w\/]+)"/ | |
@nodes = {} | |
@graph = GraphViz.new( :structs, :type => :digraph ) |
This file contains 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
<<<<<<< HEAD | |
======= | |
>>>>>>> master |
This file contains 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
[ :title, | |
:first_name, :last_name, | |
:country_id, :address1, | |
:address3, :postcode, | |
:username, :email, | |
:password, :password_confirmation, | |
:currency_id, | |
:security_question_id1, | |
:security_question_answer1].each do |field| | |
it "should fail if #{field} is missing" do |
This file contains 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
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') | |
# Not a fan of this spec | |
# Should really test behavior, not implementation. | |
# So should have controller/integration specs which make sure the right templates are rendered | |
# We can have those once we have some templates setup which should make this redundant | |
describe "view_paths" do | |
before(:each) do |
This file contains 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
# how to test that this works? | |
# or would you even bother? | |
... | |
begin | |
require 'system_timer' | |
rescue LoadError | |
require 'timeout' | |
SystemTimer = Timeout |
This file contains 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
hyphens = 0 | |
underscores = 0 | |
nothing = 0 | |
total = 0 | |
# gem list --remote > remote.txt | |
File.read("remote.txt").each do |gem_details| | |
name, version = gem_details.split | |
if name.include?("_") # also consumes ones with *both* _ and - as per github username-gem_name style gems |