Skip to content

Commit

Permalink
New suspenders Rails app
Browse files Browse the repository at this point in the history
  • Loading branch information
gabebw committed May 1, 2015
1 parent f5ef291 commit 39037dc
Show file tree
Hide file tree
Showing 90 changed files with 1,384 additions and 11 deletions.
19 changes: 13 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
.DS_Store
.env
!.keep
*.DS_Store
*.swo
*.swp
/.bundle
/.sass-cache
/build
/tmp
tags
/.env
/.foreman
/coverage/*
/db/*.sqlite3
/log/*
/public/system
/public/assets
/tags
/tmp/*
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.0
2.2.1
6 changes: 5 additions & 1 deletion .sample.env
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
EVENTBRITE_ACCESS_TOKEN=changeme
# http://ddollar.github.com/foreman/
ASSET_HOST=localhost:3000
HOST=localhost:3000
RACK_ENV=development
SECRET_KEY_BASE=development_secret
21 changes: 18 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
language: ruby
rvm:
- 2.1.0
before_install:
- "echo '--colour' > ~/.rspec"
- "echo 'gem: --no-document' > ~/.gemrc"
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
install:
- bin/setup
branches:
only:
- master
cache:
- bundler
language:
- ruby
notifications:
email: false
rvm:
- 2.2.1
addons:
postgresql: "9.3"
sudo: false
57 changes: 57 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
source "https://rubygems.org"

ruby "2.2.1"

gem "airbrake"
gem "autoprefixer-rails"
gem "bourbon", "~> 4.2.0"
gem "coffee-rails", "~> 4.1.0"
gem "delayed_job_active_record"
gem "email_validator"
gem "flutie"
gem "high_voltage"
gem "i18n-tasks"
gem "jquery-rails"
gem "neat", "~> 1.7.0"
gem "newrelic_rpm", ">= 3.9.8"
gem "normalize-rails", "~> 3.0.0"
gem "pg"
gem "rails", "4.2.1"
gem "recipient_interceptor"
gem "refills"
gem "sass-rails", "~> 5.0"
gem "simple_form"
gem "title"
gem "uglifier"
gem "unicorn"

group :development do
gem "spring"
gem "spring-commands-rspec"
gem "web-console"
end

group :development, :test do
gem "awesome_print"
gem "bundler-audit", require: false
gem "byebug"
gem "dotenv-rails"
gem "factory_girl_rails"
gem "pry-rails"
gem "rspec-rails", "~> 3.1.0"
end

group :test do
gem "capybara-webkit", ">= 1.2.0"
gem "database_cleaner"
gem "formulaic"
gem "launchy"
gem "shoulda-matchers", require: false
gem "simplecov", require: false
gem "timecop"
gem "webmock"
end

group :staging, :production do
gem "rack-timeout"
end
2 changes: 2 additions & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb
worker: bundle exec rake jobs:work
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Railsbridgeboston dot org

## Getting Started

After you have cloned this repo, run this setup script to set up your machine
with the necessary dependencies to run and test this app:

% ./bin/setup

It assumes you have a machine equipped with Ruby, Postgres, etc. If not, set up
your machine with [this script].

[this script]: https://github.com/thoughtbot/laptop

After setting up, you can run the application using [foreman]:

% foreman start

If you don't have `foreman`, see [Foreman's install instructions][foreman]. It
is [purposefully excluded from the project's `Gemfile`][exclude].

[foreman]: https://github.com/ddollar/foreman
[exclude]: https://github.com/ddollar/foreman/pull/437#issuecomment-41110407

## Guidelines

Use the following guides for getting things done, programming well, and
programming in style.

* [Protocol](http://github.com/thoughtbot/guides/blob/master/protocol)
* [Best Practices](http://github.com/thoughtbot/guides/blob/master/best-practices)
* [Style](http://github.com/thoughtbot/guides/blob/master/style)
17 changes: 17 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.

require File.expand_path('../config/application', __FILE__)

Rails.application.load_tasks
task(:default).clear
task default: [:spec]

if defined? RSpec
task(:spec).clear
RSpec::Core::RakeTask.new(:spec) do |t|
t.verbose = false
end
end

task default: "bundler:audit"
Empty file added app/assets/images/.keep
Empty file.
15 changes: 15 additions & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
// about supported directives.
//
//= require jquery
//= require jquery_ujs
//= require_tree .
8 changes: 8 additions & 0 deletions app/assets/stylesheets/application.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@charset "utf-8";

@import "normalize-rails";
@import "bourbon";
@import "base/grid-settings";
@import "neat";
@import "base/base";
@import "refills/flashes";
15 changes: 15 additions & 0 deletions app/assets/stylesheets/base/_base.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Bitters 1.0.0
// http://bitters.bourbon.io
// Copyright 2013-2015 thoughtbot, inc.
// MIT License

@import "variables";

// Neat Settings -- uncomment if using Neat -- must be imported before Neat
// @import "grid-settings";

@import "buttons";
@import "forms";
@import "lists";
@import "tables";
@import "typography";
31 changes: 31 additions & 0 deletions app/assets/stylesheets/base/_buttons.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#{$all-button-inputs},
button {
@include appearance(none);
-webkit-font-smoothing: antialiased;
background-color: $action-color;
border-radius: $base-border-radius;
border: none;
color: #fff;
cursor: pointer;
display: inline-block;
font-family: $base-font-family;
font-size: $base-font-size;
font-weight: 600;
line-height: 1;
padding: 0.75em 1em;
text-decoration: none;
user-select: none;
vertical-align: middle;
white-space: nowrap;

&:hover,
&:focus {
background-color: darken($action-color, 15%);
color: #fff;
}

&:disabled {
cursor: not-allowed;
opacity: 0.5;
}
}
78 changes: 78 additions & 0 deletions app/assets/stylesheets/base/_forms.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
fieldset {
background-color: lighten($base-border-color, 10%);
border: $base-border;
margin: 0 0 $small-spacing;
padding: $base-spacing;
}

input,
label,
select {
display: block;
font-family: $base-font-family;
font-size: $base-font-size;
}

label {
font-weight: 600;
margin-bottom: $small-spacing / 2;

&.required::after {
content: "*";
}

abbr {
display: none;
}
}

#{$all-text-inputs},
select[multiple=multiple],
textarea {
background-color: $base-background-color;
border: $base-border;
border-radius: $base-border-radius;
box-shadow: $form-box-shadow;
box-sizing: border-box;
font-family: $base-font-family;
font-size: $base-font-size;
margin-bottom: $base-spacing / 2;
padding: $base-spacing / 3;
transition: border-color;
width: 100%;

&:hover {
border-color: darken($base-border-color, 10%);
}

&:focus {
border-color: $action-color;
box-shadow: $form-box-shadow-focus;
outline: none;
}
}

textarea {
resize: vertical;
}

input[type="search"] {
@include appearance(none);
}

input[type="checkbox"],
input[type="radio"] {
display: inline;
margin-right: $small-spacing / 2;
}

input[type="file"] {
padding-bottom: $small-spacing;
width: 100%;
}

select {
margin-bottom: $base-spacing;
max-width: 100%;
width: auto;
}
14 changes: 14 additions & 0 deletions app/assets/stylesheets/base/_grid-settings.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@import "neat-helpers"; // or "../neat/neat-helpers" when not in Rails

// Neat Overrides
// $column: 90px;
// $gutter: 30px;
// $grid-columns: 12;
// $max-width: em(1088);

// Neat Breakpoints
$medium-screen: em(640);
$large-screen: em(860);

$medium-screen-up: new-breakpoint(min-width $medium-screen 4);
$large-screen-up: new-breakpoint(min-width $large-screen 8);
31 changes: 31 additions & 0 deletions app/assets/stylesheets/base/_lists.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
ul,
ol {
list-style-type: none;
margin: 0;
padding: 0;

&%default-ul {
list-style-type: disc;
margin-bottom: $small-spacing;
padding-left: $base-spacing;
}

&%default-ol {
list-style-type: decimal;
margin-bottom: $small-spacing;
padding-left: $base-spacing;
}
}

dl {
margin-bottom: $small-spacing;

dt {
font-weight: bold;
margin-top: $small-spacing;
}

dd {
margin: 0;
}
}
25 changes: 25 additions & 0 deletions app/assets/stylesheets/base/_tables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
table {
@include font-feature-settings("kern", "liga", "tnum");
border-collapse: collapse;
margin: $small-spacing 0;
table-layout: fixed;
width: 100%;
}

th {
border-bottom: 1px solid darken($base-border-color, 15%);
font-weight: 600;
padding: $small-spacing 0;
text-align: left;
}

td {
border-bottom: $base-border;
padding: $small-spacing 0;
}

tr,
td,
th {
vertical-align: middle;
}
Loading

0 comments on commit 39037dc

Please sign in to comment.