Skip to content

Instantly share code, notes, and snippets.

View benjohnson77's full-sized avatar

Ben Johnson benjohnson77

View GitHub Profile
set :stages, %w(qa staging production)
require 'capistrano/ext/multistage'
require 'config/sitemap_tasks'
require 'cap_recipes/tasks/passenger'
namespace :deploy do
set(:scm_username) { Capistrano::CLI.ui.ask("SVN User name: ") }
set(:scm_password) { Capistrano::CLI.password_prompt("SVN Password: ") }
set(:scm_release_path) { Capistrano::CLI.ui.ask("svn release ex tags/letsgo_2.x.x: ") }
set :repository, "https://svn.traveladnetwork.com/letsgo/#{scm_release_path}"
<div class="ls-nav">
<ul>
<?php if($this->session->userdata('user_type_id') == 1 && $this->session->userdata('is_admin') != 1) { ?>
<li><a href="<?=base_url()?>dashboard" <?=($this->uri->segment(1) == 'dashboard'?'class="active"':NULL)?>><span class="icon-dashboard"></span>Dashboard</a></li>
<li><a href="<?=base_url()?>mail" <?=($this->uri->segment(1) == 'mail'?'class="active"':NULL)?>><span class="icon-mail"></span>Mail</a></li>
<li><a href="<?=base_url()?>client" <?=($this->uri->segment(1) == 'client'?'class="active"':NULL)?>><span class="icon-client"></span>Clients</a></li>
<li><a href="<?=base_url()?>company" <?=($this->uri->segment(1) == 'company'?'class="active"':NULL)?>><span class="icon-company"></span>Companies</a></li>
<li><a href="<?=base_url()?>user" <?=($this->uri->segment(1) == 'user'?'class="active"':NULL)?>><span class="icon-user"></span>Users</a></li>
<li><a href="<?=base_url()?>agent" <?=($this->uri->segment(1) == 'agent'?'class="active"':N
describe 'product' do
before(:each) do
visit '/login'
fill_in 'user_name', :with => 'admin'
fill_in 'password', :with => 'Legalinc2015'
click_on 'Sign in'
click_on 'Products'
end
describe 'stats' do
expect(page).to have_select("input[name='client_status_id']", selected: 'All')
expect(page).to have_select("input[name='client_type_id']", selected: 'All')
expect(page).to have_select("input[name='distributor_id']', selected: 'All')
expect(page).to have_select('input[name='state']', selected: 'All')
expect(page).to have_field('client_name', with: '')
expect(page).to have_field('client_email', with: '')
expect(page).to have_field('client_phone', with: '')
function alcGetUrlWithProtocol(url)
{
var useSSL = 'https:' == document.location.protocol;
if (useSSL == true){
var new_url = url.replace(/http:/,'https:');
}else{
var new_url = url ;
}
@benjohnson77
benjohnson77 / gist:5385f119efff85894247
Created July 23, 2014 23:08
refactor of the process_items vs process file
def self.process_file(uploaded_file)
items = []
CSV.foreach(uploaded_file, headers: false) do |row|
items.push(row[0].to_i)
end
process_items(items)
end
def self.process_items(items)
clearancing_status = create_clearancing_status
@benjohnson77
benjohnson77 / gist:8695801
Last active August 29, 2015 13:55
Quick script for mashing up pipedrive and contacturally
namespace :pipedrive do
desc "Look into match up pipedrive with contactually"
require 'httparty'
require 'json'
task :import => :environment do
require 'csv'
filename = Rails.root + "lib/tasks/meetingplanners.csv"