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
<link href="/stylesheets/css/screen.css?1283700934" media="screen, projection" rel="stylesheet" type="text/css" /> | |
<link href="/stylesheets/css/print.css?1283700933" media="print" rel="stylesheet" type="text/css" /> | |
<!--[if lt IE 8]> | |
<link href="/stylesheets/css/ie.css?1283700930" media="screen, projection" rel="stylesheet" type="text/css" /> | |
<![endif]--> | |
<link href="/stylesheets/css/styles.css?1289494654" media="screen" rel="stylesheet" type="text/css" /> |
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
def create | |
@user = User.new(params[:user]) | |
@partner_id= params[:partner_id] | |
if @user.save | |
# it should add an activation code | |
@activation_code= Digest::SHA1.hexdigest(@user.login+Time.now.to_s) | |
@user.update_attributes({:code => @activation_code}) | |
# it should add birthdate to partner | |
if params[:year] |
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
def create | |
@user = User.new(params[:user]) | |
if @user.save | |
# it should save/update birthdate | |
if params[:year] | |
birthdate= params[:year] | |
month= params[:month]||'' | |
if month.strip =~ /^\d{2}$/ | |
day= params[:day]||'' | |
if day.strip =~ /^\d{2}$/ |
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
def score | |
resp = [] | |
begin | |
current_partner.nsbg.update({:need_id => params[:need_id], :score => params[:score]}) | |
rescue => e | |
resp = {:error => e.message} | |
end | |
respond_to do |format| | |
format.json { render :json => resp } | |
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
def questions | |
state= step_cyn_questions(session[:partner_id]) | |
@questions= state.delete :questions | |
@questionnaire = state.delete :questionnaire | |
@first_time = @questionnaire.length > 0 ? false : true | |
@partner_wylayp= state.delete :wylayp | |
@partner_keywords= state.delete :keywords | |
@info_domain = "/Cyn/Questionnaire" | |
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
def update | |
wylayps= JSON.parse(params[:wylayps]) | |
wylayps.each do |w| | |
Wylayp.update(w.delete :id, w) | |
end | |
respond_to do |format| | |
format.json { render :json => [] } | |
end | |
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
# Edit at your own peril - it's recommended to regenerate this file | |
# in the future when you upgrade to a newer version of Cucumber. | |
# IMPORTANT: Setting config.cache_classes to false is known to | |
# break Cucumber's use_transactional_fixtures method. | |
# For more information see https://rspec.lighthouseapp.com/projects/16211/tickets/165 | |
config.cache_classes = true | |
# Log error messages when you accidentally call methods on nil. | |
config.whiny_nils = true |
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
def fake_login(user=nil, partner=nil, roles=[]) | |
user= mock("user") unless user | |
partner= Factory.stub(:partner) unless partner | |
user.stub(:roles).and_return(roles) | |
user.stub(:partner).and_return(partner) | |
controller.stub(:current_user).and_return(user) | |
controller.stub(:current_partner).and_return(partner) | |
end | |
def it_should_require_a_logged_in_user(partner=nil, &block) |
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
#include <iostream> | |
#include <sys/types.h> | |
#include <sys/event.h> | |
#include <sys/time.h> | |
int main() { | |
std::cout << "Hello World\n"; | |
} |
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 FFI = require("node-ffi"); | |
var CUSTOM_USER_DIRECTORY= "/Users/santiago/tmp"; | |
var Purple = new FFI.Library("/Users/santiago/tmp/lib/libpurple", { "purple_util_set_user_dir": [ "void", [ "pointer" ] ] }); | |
Purple.purple_util_set_user_dir(CUSTOM_USER_DIRECTORY); |