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 'rails_helper' | |
describe Members::Charters::JoinedUpForm, type: :model do | |
context 'validations' do | |
let(:charter) { create(:charter) } | |
let(:charter_two) do | |
create(:charter, progression_to_service_evidence: true) | |
end | |
let(:charter_three) do | |
create(:charter, past_current_partnerships_evidence: true) |
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
# frozen_string_literal: true | |
# Members module | |
module Members | |
# Charters module | |
module Charters | |
# JoinedUpForm class | |
class JoinedUpForm < CharterFormBase | |
ATTRS = %i[ | |
progression_to_service progression_to_service_evidence |
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
# rake media:staging_to_production | |
# eg. rake media:staging_to_production | |
namespace :media do | |
desc 'Pull media from specified staging to production' | |
task :staging_to_production do | |
ssh_staging = Rails.application.credentials[:staging][:ssh] | |
ssh_staging_port = Rails.application.credentials[:staging][:ssh_port] | |
media_staging_remote = Rails.application.credentials[:staging][:media_remote] | |
media_production_remote = Rails.application.credentials[:production][:media_remote] |
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
# rake media:pull[<environment to pull from>] | |
# eg. rake media:pull[staging] | |
namespace :media do | |
desc 'Pull media from specified environment to development' | |
task :pull, :environment do |_t, args| | |
environment = args[:environment].to_sym | |
ssh = Rails.application.credentials[environment][:ssh] | |
ssh_port = Rails.application.credentials[environment][:ssh_port] | |
media_remote = Rails.application.credentials[environment.to_sym][:media_remote] |
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
# rake db:staging_to_production | |
# eg. rake db:staging_to_production | |
namespace :db do | |
desc 'Pull specified db to development, move to production' | |
task :staging_to_production do | |
dumpfile = "#{Rails.root}/tmp/latest.dump" | |
ssh = Rails.application.credentials[:staging][:ssh] | |
ssh_port = Rails.application.credentials[:staging][:ssh_port] |
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
# rake db:pull[<environment to pull from>,<your local db username>] | |
# eg. rake db:pull[staging,postgres] | |
namespace :db do | |
desc 'Pull specified db to development' | |
task :pull, :environment, :dev_db_user do |_t, args| | |
environment = args[:environment].to_sym | |
dev_db_user = args[:dev_db_user] | |
dev = Rails.application.config.database_configuration['development'] | |
dumpfile = "#{Rails.root}/tmp/latest.dump" |
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
#!/bin/bash | |
# | |
# Go to ec2-user home directory | |
cd /home/ec2-user | |
# Update libpng first | |
curl -L http://sourceforge.net/projects/libpng/files/libpng15/1.5.27/libpng-1.5.27.tar.xz/download -o libpng.tar.xz | |
tar -Jxf libpng.tar.xz | |
cd libpng-1.5.27/ |
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
#!/bin/bash | |
# | |
# Script to setup a Elastic Beanstalk AMI with geospatial libraries and postGIS | |
# | |
# sh aws_ami_prep.sh > aws_ami_prep.log 2>&1 & | |
# See orig here: https://gist.github.com/whyvez/8d19096712ea44ba66b0 | |
# Go to ec2-user home directory | |
cd /home/ec2-user |
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
--- | |
layout: default | |
--- | |
<section class="posts postindex wrapper"> | |
{% for post in site.posts %} | |
{% capture month %}{{ post.date | date: '%m%Y' }}{% endcapture %} | |
{% capture nmonth %}{{ post.next.date | date: '%m%Y' }}{% endcapture %} | |
{% if month != nmonth %} | |
{% if forloop.index != 1 %}</ul>{% endif %} |
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 NotesController < ApplicationController | |
def index | |
load_notes | |
end | |
def show | |
load_note | |
end | |
def new |
NewerOlder