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
Failure/Error: response.should have_selector('title', :content => "About") | |
expected following output to contain a <title>About</title> tag: | |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> | |
# ./spec/requests/layout_links_spec.rb:33:in `block (2 levels) in <top (required)>' |
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 SessionsController < ApplicationController | |
include ApiInfusionsoft | |
def new | |
end | |
def numeric?(object) | |
true if Float(object) rescue false | |
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
require "xmlrpc/client" | |
class InfusionsoftApiConnection | |
attr_accessor :api_url, :api_key, :retry_count | |
def initialize(url, key) | |
@api_url = url | |
@api_key = key | |
@retry_count = 1 | |
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
/tmp/temp_textmate.RRepHN:13: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n' | |
/tmp/temp_textmate.RRepHN:15: syntax error, unexpected keyword_when, expecting keyword_end | |
when %r{http://www.(amazon.(?:com... | |
^ | |
/tmp/temp_textmate.RRepHN:15: syntax error, unexpected ':', expecting keyword_end | |
/tmp/temp_textmate.RRepHN:17: syntax error, unexpected keyword_when, expecting keyword_end | |
when %r{\A[a-zA-Z][a-zA-Z0-9.+-]*://.*\z}: | |
^ | |
/tmp/temp_textmate.RRepHN:17: syntax error, unexpected ':', expecting keyword_end | |
/tmp/temp_textmate.RRepHN:19: syntax error, unexpected keyword_when, expecting keyword_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
class ApplicationController < ActionController::Base | |
protect_from_forgery | |
before_filter :set_api_connection | |
def set_api_connection | |
ApiInfusionsoft.set_account_apiconn("nimacus.infusionsoft.com", "MY_API_KEY") | |
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
api_data_authenticate_user looks like... | |
def api_data_authenticate_user(username, password) | |
# Authenticates a user account in Infusionsoft | |
Thread.current[:api_conn].api_perform('DataService', 'authenticateUser', username, password) | |
end | |
and [the relevant lines from] api_perform look like... | |
def api_perform(class_type, method, *args) |
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
%body | |
.container | |
- flash.each do |key, value| | |
= content_tag(:div, value, :class => "flash #{key}") | |
= yield | |
= debug(params) if Rails.env.development? |