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
# Read about factories at https://github.com/thoughtbot/factory_girl | |
FactoryGirl.define do | |
factory :user do | |
factory :facilitator, class: Facilitator do | |
sequence(:email) { |n| "facilitator#{n}@example.com" } | |
password "leezlepon" | |
password_confirmation "leezlepon" | |
contact_uri "asdfjkl;" |
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
context "when a valid form is submitted" do | |
before do | |
3.times do |s| | |
FactoryGirl.create(:specialty, urn: "urn-num-#{s}") | |
end | |
end | |
it "adds specialties to an organization" do | |
visit edit_organization_path(organization) | |
specialty_first = Specialty.first |
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
<%= link_to admin_root_path do %> | |
<i class="icon-user"></i> Users Management | |
<% 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
-- Create a new user into the db | |
INSERT INTO `wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) | |
VALUES ('99', 'admin', MD5('admin'), 'Rian Rainey', '[email protected]', '2013-07-07 00:00:00', '', '0', 'Rian Rainey') | |
-- Give the new user administrator capabilities | |
INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) | |
VALUES (NULL, '99', 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}') | |
-- Give the new user the highest level in the system | |
INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) |
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
find . -name '*.php' -exec sed -i "" 's/Old_Text/New_Text/g' "{}" \; |
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
$("a").each(function() { | |
var a; | |
a = new RegExp("/" + window.location.host + "/"); | |
if (!a.test(this.href)) { | |
return $(this).click(function(event) { | |
event.preventDefault(); | |
event.stopPropagation(); | |
return window.open(this.href, "_blank"); | |
}); | |
} |
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
/* @include font-face(SourceSansPro, '/fonts/Source_Sans_Pro/SourceSansPro-Regular'); */ | |
@font-face { | |
font-family: SourceSansPro; | |
font-weight: normal; | |
font-style: normal; | |
src: url(/assets/Source_Sans_Pro/SourceSansPro-Regular.eot); | |
src: url(/assets/Source_Sans_Pro/SourceSansPro-Regular.eot?#iefix) format("embedded-opentype"), | |
url(/assets/Source_Sans_Pro/SourceSansPro-Regular.woff) format("woff"), | |
url(/assets/Source_Sans_Pro/SourceSansPro-Regular.ttf) format("truetype"), |
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
# Ack is a command line tool that is better than Grep, betterthangrep.com | |
# Make sure Ack knows how to search common filetypes used in Rails projects | |
--type-add=css=scss | |
--type-add=js=hbs | |
--type-add=js=coffee |
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
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
uglify: { | |
options: { | |
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n' | |
}, | |
build: { |