Compare commits

...

10 Commits

Author SHA1 Message Date
Tyrel Souza
5f3840dfde more 2024-07-05 01:10:21 +00:00
Tyrel Souza
15a17936e8 fix database defaults 2015-01-07 10:57:52 -05:00
Tyrel Souza
21e920079f slack: 2015-01-06 14:51:02 -05:00
Tyrel Souza
644856b1dd add rake task 2014-12-17 10:26:46 -05:00
Tyrel Souza
b81101aa16 json formatting no html 2014-11-07 16:42:16 -05:00
Tyrel Souza
292b58180d lessen db calls 2014-11-07 16:20:02 -05:00
Tyrel Souza
22f913e389 tables galore 2014-11-07 15:56:49 -05:00
Tyrel Souza
1a64fe46e2 colors 2014-11-07 15:44:39 -05:00
Tyrel Souza
1e066555fe better tables 2014-11-07 15:37:59 -05:00
Tyrel Souza
2a567232b7 transparency 2014-11-07 15:16:59 -05:00
112 changed files with 858 additions and 325 deletions

0
.gitignore vendored Normal file → Executable file
View File

6
Gemfile Normal file → Executable file
View File

@ -4,7 +4,10 @@ source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.7' gem 'rails', '4.1.7'
# Use postgresql as the database for Active Record # Use postgresql as the database for Active Record
gem 'pg' gem 'pg', group: :production
gem 'sqlite3', group: :development
# Use SCSS for stylesheets # Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3' gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets # Use Uglifier as compressor for JavaScript assets
@ -26,3 +29,4 @@ gem 'sdoc', '~> 0.4.0', group: :doc
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring', group: :development gem 'spring', group: :development
gem 'devise'

13
Gemfile.lock Normal file → Executable file
View File

@ -28,6 +28,7 @@ GEM
thread_safe (~> 0.1) thread_safe (~> 0.1)
tzinfo (~> 1.1) tzinfo (~> 1.1)
arel (5.0.1.20140414130214) arel (5.0.1.20140414130214)
bcrypt (3.1.7)
builder (3.2.2) builder (3.2.2)
coffee-rails (4.0.1) coffee-rails (4.0.1)
coffee-script (>= 2.2.0) coffee-script (>= 2.2.0)
@ -36,6 +37,12 @@ GEM
coffee-script-source coffee-script-source
execjs execjs
coffee-script-source (1.8.0) coffee-script-source (1.8.0)
devise (3.2.4)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5)
thread_safe (~> 0.1)
warden (~> 1.2.3)
erubis (2.7.0) erubis (2.7.0)
execjs (2.2.2) execjs (2.2.2)
hike (1.2.3) hike (1.2.3)
@ -52,6 +59,7 @@ GEM
mime-types (2.4.3) mime-types (2.4.3)
minitest (5.4.2) minitest (5.4.2)
multi_json (1.10.1) multi_json (1.10.1)
orm_adapter (0.5.0)
pg (0.17.1) pg (0.17.1)
rack (1.5.2) rack (1.5.2)
rack-test (0.6.2) rack-test (0.6.2)
@ -93,6 +101,7 @@ GEM
actionpack (>= 3.0) actionpack (>= 3.0)
activesupport (>= 3.0) activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0) sprockets (>= 2.8, < 4.0)
sqlite3 (1.3.9)
thor (0.19.1) thor (0.19.1)
thread_safe (0.3.4) thread_safe (0.3.4)
tilt (1.4.1) tilt (1.4.1)
@ -103,12 +112,15 @@ GEM
uglifier (2.5.3) uglifier (2.5.3)
execjs (>= 0.3.0) execjs (>= 0.3.0)
json (>= 1.8.0) json (>= 1.8.0)
warden (1.2.3)
rack (>= 1.0)
PLATFORMS PLATFORMS
ruby ruby
DEPENDENCIES DEPENDENCIES
coffee-rails (~> 4.0.0) coffee-rails (~> 4.0.0)
devise
jbuilder (~> 2.0) jbuilder (~> 2.0)
jquery-rails jquery-rails
pg pg
@ -116,5 +128,6 @@ DEPENDENCIES
sass-rails (~> 4.0.3) sass-rails (~> 4.0.3)
sdoc (~> 0.4.0) sdoc (~> 0.4.0)
spring spring
sqlite3
turbolinks turbolinks
uglifier (>= 1.3.0) uglifier (>= 1.3.0)

0
README.rdoc Normal file → Executable file
View File

0
Rakefile Normal file → Executable file
View File

0
app/assets/images/.keep Normal file → Executable file
View File

0
app/assets/javascripts/application.js Normal file → Executable file
View File

0
app/assets/javascripts/projects.js.coffee Normal file → Executable file
View File

168
app/assets/stylesheets/application.css Normal file → Executable file
View File

@ -10,175 +10,9 @@
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
* file per style scope. * file per style scope.
* *
*= require bootstrap
*= require_tree . *= require_tree .
*= require_self *= require_self
*= require bootstrap
*/ */
/* override bootstrap styles */
@import url('http://fonts.googleapis.com/css?family=Oswald:300,400:latin,latin-ext');
.navbar-form input, .form-inline input {
width:auto;
}
body {
color:#646464;
background-color:#FAFAFA;
}
h1,h2,h3,.highlight,.navbar a,#masthead h4 {
font-family:'Oswald',arial narrow,sans-serif;
}
footer {
margin-top:40px;
padding-top:40px;
padding-bottom:40px;
background-color:#cecece;
}
#masthead {
min-height:311px;
background-color:#1A6BF9;
color:#aaaacc;
background-image: url('/assets/bg_header.png');
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center 0 ;
}
#masthead h1 {
font-size: 55px;
line-height: 1;
color:#fefeff;
margin-top:50px;
}
#masthead .well {
margin-top:31px;
background-color:#1A6BF9;
border:none;
-webkit-box-shadow: none;
-moz-box-shadow: none ;
box-shadow: none;
color:#fff;
min-height:127px;
}
#topPanel {
padding-top:0px;
padding-left:22px;
padding-right:22px;
}
#topPanel .panel-body {
padding-top:0px;
}
.navbar.affix {
position:fixed;
top:0;
width:100%;
}
.top-spacer {
background-color:#ffffff;
height:40px;
}
a,a:hover {
color:#223344;
text-decoration:none;
}
.icon-bar {
background-color:#fff;
}
@media screen and (min-width: 768px) {
#masthead h1 {
font-size: 80px;
}
}
.navbar-bright {
background-color:#111166;
color:#fff;
margin-bottom: 0;
border-width: 0;
}
.navbar-bright a, .navbar-bright .navbar-brand, #masthead h4 {
color:#ccccdd;
font-size:14px;
text-transform: uppercase;
letter-spacing:.08em;
}
.navbar-bright li > a:hover {
background-color:#000044;
}
.dropdown-menu {
min-width: 250px;
}
.caret {
color:#fff;
}
.navbar-toggle {
color:#fff;
border-width:0;
}
.navbar-toggle:hover {
background-color:#fff;
}
.panel {
margin-top: -45px;
background-color: #fff;
border:3px solid #3AB1FE ! important;
border-radius:0;
padding:15px;
}
.thumbnail {
margin-bottom:8px;
}
.img-container {
overflow:hidden;
height:170px;
}
.img-container img {
min-width:280px;
min-height:180px;
max-width:380px;
max-height:280px;
}
.txt-container {
overflow:hidden;
height:100px;
}
.panel .lead {
overflow:hidden;
height:90px;
}
.label-float{
margin:0 auto;
position: absolute;
top: 0;
z-index: 1;
width:100%;
opacity:.9;
padding:6px;
color:#fff;
}

226
app/assets/stylesheets/projects.css.scss Normal file → Executable file
View File

@ -1,3 +1,229 @@
// Place all the styles related to the Projects controller here. // Place all the styles related to the Projects controller here.
// They will automatically be included in application.css. // They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/ // You can use Sass (SCSS) here: http://sass-lang.com/
//colors
$color_storm_dust_approx: #646464;
$alabaster: #fafafa;
$color_celeste_approx: #cecece;
$color_dodger_blue_approx: #1d84fb;
$color_logan_approx: #aaaacc;
$color_white_approx: #fefeff;
$white: #fff;
$color_ebony_clay_approx: #223344;
$color_arapawa_approx: #111166;
$color_mischka_approx: #ccccdd;
$color_stratos_approx: #000044;
$color_picton_blue_approx: #3ab1fe;
//fonts
$font_0: 'Open Sans';
$font_1: 'Open Sans Light';
$font_2: 'Open Sans Bold';
//@extend-elements
//original selectors
//.navbar-bright a, .navbar-bright .navbar-brand, #masthead h4
%extend_1 {
color: $color_mischka_approx;
font-size: 14px;
text-transform: uppercase;
letter-spacing: .08em;
}
@import url('http://fonts.googleapis.com/css?family=Open+Sans:400,300,600');
body {
color: $color_storm_dust_approx;
background-color: #FAFAFA;
}
h1 {
font-family: $font_0, $font_1, $font_2;
}
h2 {
font-family: $font_0, $font_1, $font_2;
}
h3 {
font-family: $font_0, $font_1, $font_2;
}
.highlight {
font-family: $font_0, $font_1, $font_2;
}
.navbar {
a {
font-family: $font_0, $font_1, $font_2;
}
&.affix {
position: fixed;
top: 0;
width: 100%;
}
}
#masthead {
min-height: 311px;
background-color: #1D84FB;
color: $color_logan_approx;
background-image: url('/assets/bg_header.png');
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center 0;
h4 {
font-family: $font_0, $font_1, $font_2;
@extend %extend_1;
}
h1 {
font-size: 55px;
line-height: 1;
color: $color_white_approx;
margin-top: 50px;
}
.well {
clear: both;
background-color: #1D84FB;
border: none;
//Instead of the line below you could use @includebox-shadow($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5, $shadow-6, $shadow-7, $shadow-8, $shadow-9, $shadow-10)
box-shadow: none;
color: $white;
}
}
footer {
margin-top: 40px;
padding-top: 40px;
padding-bottom: 40px;
background-color: $color_celeste_approx;
}
#topPanel {
padding-top: 0;
padding-left: 22px;
padding-right: 22px;
.panel-body {
padding-top: 0;
}
}
.top-spacer {
background-color: $white;
height: 40px;
}
a {
color: $color_ebony_clay_approx;
text-decoration: none;
&:hover {
color: $color_ebony_clay_approx;
text-decoration: none;
}
}
.icon-bar {
background-color: $white;
}
@media screen and (min-width: 768px) {
#masthead h1 {
font-size: 80px;
}
}
.navbar-bright {
background-color: $color_arapawa_approx;
color: $white;
margin-bottom: 0;
border-width: 0;
a {
@extend %extend_1;
}
.navbar-brand {
@extend %extend_1;
}
li > a:hover {
background-color: $color_stratos_approx;
}
}
.dropdown-menu {
min-width: 250px;
}
.caret {
color: $white;
}
.navbar-toggle {
color: $white;
border-width: 0;
&:hover {
background-color: $white;
}
}
.panel {
clear: both;
margin-top: -120px;
background-color: $white;
border-radius: 15;
padding: 15px;
box-shadow: 1px 1px 2px #aaaaaa;
.lead {
overflow: hidden;
height: 90px;
}
}
.thumbnail {
margin-bottom: 8px;
}
.img-container {
overflow: hidden;
height: 170px;
img {
min-width: 280px;
min-height: 180px;
max-width: 380px;
max-height: 280px;
}
}
.txt-container {
overflow: hidden;
height: 100px;
}
.label-float {
margin: 0 auto;
position: absolute;
top: 0;
z-index: 1;
width: 100%;
opacity: .9;
padding: 6px;
color: $white;
}
.navbar-form input {
width: auto;
}
.form-inline input {
width: auto;
}
.checkmark {
font-size:1.5em;
color: #419641;
}
.overdue {
font-weight:bold;
color:#f00;
}

0
app/assets/stylesheets/scaffolds.css.scss Normal file → Executable file
View File

0
app/controllers/application_controller.rb Normal file → Executable file
View File

0
app/controllers/concerns/.keep Normal file → Executable file
View File

9
app/controllers/projects_controller.rb Normal file → Executable file
View File

@ -1,14 +1,15 @@
class ProjectsController < ApplicationController class ProjectsController < ApplicationController
before_action :set_project, only: [:show, :edit, :update, :destroy] before_action :set_project, only: [:show, :edit, :update, :destroy]
before_action :authenticate_user!
# GET /projects # GET /projects
# GET /projects.json # GET /projects.json
def index def index
@projects = Project.all @projects = Project.all
@active_projects = Project.where(status: Project.status_keys[:active]) @active_projects = @projects.where(status: Project.status_keys[:active])
@upcoming_projects = Project.where(status: Project.status_keys[:upcoming]) @upcoming_projects = @projects.where(status: Project.status_keys[:upcoming])
@backlog_projects = Project.where(status: Project.status_keys[:backlog]) @backlog_projects = @projects.where(status: Project.status_keys[:backlog])
@completed_projects = Project.where(status: Project.status_keys[:completed]) @completed_projects = @projects.where(status: Project.status_keys[:completed])
end end
# GET /projects/1 # GET /projects/1

0
app/helpers/application_helper.rb Normal file → Executable file
View File

0
app/helpers/projects_helper.rb Normal file → Executable file
View File

0
app/mailers/.keep Normal file → Executable file
View File

0
app/models/.keep Normal file → Executable file
View File

0
app/models/concerns/.keep Normal file → Executable file
View File

33
app/models/project.rb Normal file → Executable file
View File

@ -3,9 +3,10 @@ class Project < ActiveRecord::Base
def self.status_keys def self.status_keys
{upcoming: 0, active: 1, backlog: 2, completed: 3} {upcoming: 0, active: 1, backlog: 2, completed: 3}
end end
enum status: self.status_keys enum status: self.status_keys
# HTML
def requirements def requirements
check_date_overdue_output requirements_completed?, requirements_due check_date_overdue_output requirements_completed?, requirements_due
end end
@ -22,14 +23,38 @@ class Project < ActiveRecord::Base
check_date_overdue_output qalaunch_completed?, qalaunch_due check_date_overdue_output qalaunch_completed?, qalaunch_due
end end
# JSON
def requirements_json
check_date_overdue_output requirements_completed?, requirements_due, json: true
end
def design_json
check_date_overdue_output design_completed?, design_due, json:true
end
def devops_json
check_date_overdue_output devops_completed?, devops_due, json:true
end
def qalaunch_json
check_date_overdue_output qalaunch_completed?, qalaunch_due, json:true
end
private private
def check_date_overdue_output completed, due def check_date_overdue_output completed, due, options = {}
if completed if completed
"Completed".html_safe if options[:json]
"completed"
else
"<span class='checkmark'>&check;</span>".html_safe
end
elsif Date.today > due elsif Date.today > due
"Overdue" if options[:json]
"overdue"
else
"<span class='overdue'>Overdue</span>".html_safe
end
else else
due due
end end

6
app/models/user.rb Executable file
View File

@ -0,0 +1,6 @@
class User < ActiveRecord::Base
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
end

12
app/views/layouts/application.html.erb Normal file → Executable file
View File

@ -18,12 +18,11 @@
</h1> </h1>
</div> </div>
<div class="col-md-5"> <div class="col-md-5">
<div class="well well-lg">
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
<%= link_to 'New Project', new_project_path %> <a href="<%= url_for new_project_path %>" class="btn btn-info pull-right"><i class="glyphicon glyphicon-search"></i>New Project</a>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -35,6 +34,9 @@
</div> </div>
<p class="notice"><%= notice %></p>
<p class="alert"><%= alert %></p>
<div class="container"> <div class="container">
<div class="row"> <div class="row">
@ -44,12 +46,8 @@
<div class="panel-body"> <div class="panel-body">
<div class="row">
<%= yield %> <%= yield %>
</div>
<!--/stories--> <!--/stories-->

0
app/views/projects/_form.html.erb Normal file → Executable file
View File

5
app/views/projects/edit.html.erb Normal file → Executable file
View File

@ -1,6 +1,11 @@
<div class="row">
<h1>Editing project</h1> <h1>Editing project</h1>
</div>
<div class="row">
<%= render 'form' %> <%= render 'form' %>
<%= link_to 'Show', @project %> | <%= link_to 'Show', @project %> |
<%= link_to 'Back', root_path %> <%= link_to 'Back', root_path %>
</div>

58
app/views/projects/index.html.erb Normal file → Executable file
View File

@ -1,15 +1,22 @@
<br> <div class="row">
<h2>Projects (<%= @projects.count %>)</h2>
</div>
<div class="row">
<% if @active_projects.count > 0 %> <% if @active_projects.count > 0 %>
<h3>Active (<%= @active_projects.count%>)</h3> <h3>Active (<%= @active_projects.count%>)</h3>
<table> <table class="table">
<thead> <thead>
<tr> <tr>
<th>Project</th> <th width="30%">Project</th>
<th>Requirements</th> <th width="17.5%">Requirements</th>
<th>Design</th> <th width="17.5%">Design</th>
<th>Dev & Ops</th> <th width="17.5%">Dev & Ops</th>
<th>QA & Launch</th> <th width="17.5%">QA & Launch</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -28,14 +35,14 @@
<% if @upcoming_projects.count > 0 %> <% if @upcoming_projects.count > 0 %>
<h3>Upcoming (<%= @upcoming_projects.count%>)</h3> <h3>Upcoming (<%= @upcoming_projects.count%>)</h3>
<table> <table class="table">
<thead> <thead>
<tr> <tr>
<th>Project</th> <th width="30%">Project</th>
<th>Requirements</th> <th width="17.5%">Requirements</th>
<th>Design</th> <th width="17.5%">Design</th>
<th>Dev & Ops</th> <th width="17.5%">Dev & Ops</th>
<th>QA & Launch</th> <th width="17.5%">QA & Launch</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -54,14 +61,14 @@
<% if @backlog_projects.count > 0 %> <% if @backlog_projects.count > 0 %>
<h3>Backlog (<%= @backlog_projects.count%>)</h3> <h3>Backlog (<%= @backlog_projects.count%>)</h3>
<table> <table class="table">
<thead> <thead>
<tr> <tr>
<th>Project</th> <th width="30%">Project</th>
<th>Requirements</th> <th width="17.5%">Requirements</th>
<th>Design</th> <th width="17.5%">Design</th>
<th>Dev & Ops</th> <th width="17.5%">Dev & Ops</th>
<th>QA & Launch</th> <th width="17.5%">QA & Launch</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -80,14 +87,14 @@
<% if @completed_projects.count > 0 %> <% if @completed_projects.count > 0 %>
<h3>Completed (<%= @completed_projects.count%>)</h3> <h3>Completed (<%= @completed_projects.count%>)</h3>
<table> <table class="table">
<thead> <thead>
<tr> <tr>
<th>Project</th> <th width="30%">Project</th>
<th>Requirements</th> <th width="17.5%">Requirements</th>
<th>Design</th> <th width="17.5%">Design</th>
<th>Dev & Ops</th> <th width="17.5%">Dev & Ops</th>
<th>QA & Launch</th> <th width="17.5%">QA & Launch</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -104,3 +111,4 @@
</table> </table>
<% end %> <% end %>
</div>

2
app/views/projects/index.json.jbuilder Normal file → Executable file
View File

@ -1,4 +1,4 @@
json.array!(@projects) do |project| json.array!(@projects) do |project|
json.extract! project, :id, :title, :status, :requirements, :design, :devops, :qalaunch json.extract! project, :id, :title, :status, :requirements_json, :design_json, :devops_json, :qalaunch_json
json.url project_url(project, format: :json) json.url project_url(project, format: :json)
end end

4
app/views/projects/new.html.erb Normal file → Executable file
View File

@ -1,5 +1,9 @@
<div class="row">
<h1>New project</h1> <h1>New project</h1>
</div>
<div class="row">
<%= render 'form' %> <%= render 'form' %>
<%= link_to 'Back', root_path %> <%= link_to 'Back', root_path %>
</div>

7
app/views/projects/show.html.erb Normal file → Executable file
View File

@ -1,4 +1,10 @@
<% if notice %>
<div class="row">
<p id="notice"><%= notice %></p> <p id="notice"><%= notice %></p>
</div>
<% end %>
<div class="row">
<p> <p>
<strong>Title:</strong> <strong>Title:</strong>
@ -34,3 +40,4 @@
<%= link_to 'Edit', edit_project_path(@project) %> | <%= link_to 'Edit', edit_project_path(@project) %> |
<%= link_to 'Back', root_path %> <%= link_to 'Back', root_path %>
</div>

0
app/views/projects/show.json.jbuilder Normal file → Executable file
View File

0
config.ru Normal file → Executable file
View File

0
config/application.rb Normal file → Executable file
View File

0
config/boot.rb Normal file → Executable file
View File

92
config/database.yml Normal file → Executable file
View File

@ -1,85 +1,27 @@
# PostgreSQL. Versions 8.2 and up are supported.
#
# Install the pg driver:
# gem install pg
# On OS X with Homebrew:
# gem install pg -- --with-pg-config=/usr/local/bin/pg_config
# On OS X with MacPorts:
# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
# On Windows:
# gem install pg
# Choose the win32 build.
# Install PostgreSQL and put its /bin directory on your path.
#
# Configure Using Gemfile
# gem 'pg'
#
default: &default default: &default
adapter: postgresql adapter: sqlite3
encoding: unicode
# For details on connection pooling, see rails configuration guide
# http://guides.rubyonrails.org/configuring.html#database-pooling
pool: 5 pool: 5
timeout: 5000
development:
<<: *default
database: roadmap_development
# The specified database role being used to connect to postgres.
# To create additional roles in postgres see `$ createuser --help`.
# When left blank, postgres will use the default role. This is
# the same name as the operating system user that initialized the database.
#username: roadmap
# The password associated with the postgres role (username).
#password:
# Connect on a TCP socket. Omitted by default since the client uses a
# domain socket that doesn't need configuration. Windows does not have
# domain sockets, so uncomment these lines.
#host: localhost
# The TCP port the server listens on. Defaults to 5432.
# If your server runs on a different port number, change accordingly.
#port: 5432
# Schema search path. The server defaults to $user,public
#schema_search_path: myapp,sharedapp,public
# Minimum log levels, in increasing order:
# debug5, debug4, debug3, debug2, debug1,
# log, notice, warning, error, fatal, and panic
# Defaults to warning.
#min_messages: notice
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test: test:
<<: *default <<: *default
database: roadmap_test database: db/test.sqlite3
development:
database: db/development.sqlite3
adapter: sqlite3
pool: 5
timeout: 5000
# As with config/secrets.yml, you never want to store sensitive information,
# like your database password, in your source code. If your source code is
# ever seen by anyone, they now have access to your database.
#
# Instead, provide the password as a unix environment variable when you boot
# the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database
# for a full rundown on how to provide these environment variables in a
# production deployment.
#
# On Heroku and other platform providers, you may have a full connection URL
# available as an environment variable. For example:
#
# DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase"
#
# You can use this database configuration with:
#
# production:
# url: <%= ENV['DATABASE_URL'] %>
#
production: production:
<<: *default adapter: postgresql
encoding: unicode
pool: 5
database: roadmap_production database: roadmap_production
username: roadmap username: roadmap
password: <%= ENV['ROADMAP_DATABASE_PASSWORD'] %> password: <%= ENV['ROADMAP_DATABASE_PASSWORD'] %>

0
config/environment.rb Normal file → Executable file
View File

1
config/environments/development.rb Normal file → Executable file
View File

@ -15,6 +15,7 @@ Rails.application.configure do
# Don't care if the mailer can't send. # Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false config.action_mailer.raise_delivery_errors = false
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
# Print deprecation notices to the Rails logger. # Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log config.active_support.deprecation = :log

0
config/environments/production.rb Normal file → Executable file
View File

0
config/environments/test.rb Normal file → Executable file
View File

0
config/initializers/assets.rb Normal file → Executable file
View File

0
config/initializers/backtrace_silencers.rb Normal file → Executable file
View File

0
config/initializers/cookies_serializer.rb Normal file → Executable file
View File

256
config/initializers/devise.rb Executable file
View File

@ -0,0 +1,256 @@
# Use this hook to configure devise mailer, warden hooks and so forth.
# Many of these configuration options can be set straight in your model.
Devise.setup do |config|
# The secret key used by Devise. Devise uses this key to generate
# random tokens. Changing this key will render invalid all existing
# confirmation, reset password and unlock tokens in the database.
# config.secret_key = '8e3ea83ae824e317225d8e01a9044fb5867d4ae57822dc56b1940697edb3665609bec426a58d05f01c683bdc9e82822c898336a637be91bc8d0e3977765122dd'
# ==> Mailer Configuration
# Configure the e-mail address which will be shown in Devise::Mailer,
# note that it will be overwritten if you use your own mailer class
# with default "from" parameter.
config.mailer_sender = 'please-change-me-at-config-initializers-devise@example.com'
# Configure the class responsible to send e-mails.
# config.mailer = 'Devise::Mailer'
# ==> ORM configuration
# Load and configure the ORM. Supports :active_record (default) and
# :mongoid (bson_ext recommended) by default. Other ORMs may be
# available as additional gems.
require 'devise/orm/active_record'
# ==> Configuration for any authentication mechanism
# Configure which keys are used when authenticating a user. The default is
# just :email. You can configure it to use [:username, :subdomain], so for
# authenticating a user, both parameters are required. Remember that those
# parameters are used only when authenticating and not when retrieving from
# session. If you need permissions, you should implement that in a before filter.
# You can also supply a hash where the value is a boolean determining whether
# or not authentication should be aborted when the value is not present.
# config.authentication_keys = [ :email ]
# Configure parameters from the request object used for authentication. Each entry
# given should be a request method and it will automatically be passed to the
# find_for_authentication method and considered in your model lookup. For instance,
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
# The same considerations mentioned for authentication_keys also apply to request_keys.
# config.request_keys = []
# Configure which authentication keys should be case-insensitive.
# These keys will be downcased upon creating or modifying a user and when used
# to authenticate or find a user. Default is :email.
config.case_insensitive_keys = [ :email ]
# Configure which authentication keys should have whitespace stripped.
# These keys will have whitespace before and after removed upon creating or
# modifying a user and when used to authenticate or find a user. Default is :email.
config.strip_whitespace_keys = [ :email ]
# Tell if authentication through request.params is enabled. True by default.
# It can be set to an array that will enable params authentication only for the
# given strategies, for example, `config.params_authenticatable = [:database]` will
# enable it only for database (email + password) authentication.
# config.params_authenticatable = true
# Tell if authentication through HTTP Auth is enabled. False by default.
# It can be set to an array that will enable http authentication only for the
# given strategies, for example, `config.http_authenticatable = [:database]` will
# enable it only for database authentication. The supported strategies are:
# :database = Support basic authentication with authentication key + password
# config.http_authenticatable = false
# If http headers should be returned for AJAX requests. True by default.
# config.http_authenticatable_on_xhr = true
# The realm used in Http Basic Authentication. 'Application' by default.
# config.http_authentication_realm = 'Application'
# It will change confirmation, password recovery and other workflows
# to behave the same regardless if the e-mail provided was right or wrong.
# Does not affect registerable.
# config.paranoid = true
# By default Devise will store the user in session. You can skip storage for
# particular strategies by setting this option.
# Notice that if you are skipping storage for all authentication paths, you
# may want to disable generating routes to Devise's sessions controller by
# passing skip: :sessions to `devise_for` in your config/routes.rb
config.skip_session_storage = [:http_auth]
# By default, Devise cleans up the CSRF token on authentication to
# avoid CSRF token fixation attacks. This means that, when using AJAX
# requests for sign in and sign up, you need to get a new CSRF token
# from the server. You can disable this option at your own risk.
# config.clean_up_csrf_token_on_authentication = true
# ==> Configuration for :database_authenticatable
# For bcrypt, this is the cost for hashing the password and defaults to 10. If
# using other encryptors, it sets how many times you want the password re-encrypted.
#
# Limiting the stretches to just one in testing will increase the performance of
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
# a value less than 10 in other environments. Note that, for bcrypt (the default
# encryptor), the cost increases exponentially with the number of stretches (e.g.
# a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
config.stretches = Rails.env.test? ? 1 : 10
# Setup a pepper to generate the encrypted password.
# config.pepper = 'd8702ede955a53827f0b35be06755165226d71aeb06e60db8c6f94107e4c1ea6ac30edf5c5960bc8ec5944d338837138a21a3eff2bfff7821ed1107699d84b2c'
# ==> Configuration for :confirmable
# A period that the user is allowed to access the website even without
# confirming their account. For instance, if set to 2.days, the user will be
# able to access the website for two days without confirming their account,
# access will be blocked just in the third day. Default is 0.days, meaning
# the user cannot access the website without confirming their account.
# config.allow_unconfirmed_access_for = 2.days
# A period that the user is allowed to confirm their account before their
# token becomes invalid. For example, if set to 3.days, the user can confirm
# their account within 3 days after the mail was sent, but on the fourth day
# their account can't be confirmed with the token any more.
# Default is nil, meaning there is no restriction on how long a user can take
# before confirming their account.
# config.confirm_within = 3.days
# If true, requires any email changes to be confirmed (exactly the same way as
# initial account confirmation) to be applied. Requires additional unconfirmed_email
# db field (see migrations). Until confirmed, new email is stored in
# unconfirmed_email column, and copied to email column on successful confirmation.
config.reconfirmable = true
# Defines which key will be used when confirming an account
# config.confirmation_keys = [ :email ]
# ==> Configuration for :rememberable
# The time the user will be remembered without asking for credentials again.
# config.remember_for = 2.weeks
# If true, extends the user's remember period when remembered via cookie.
# config.extend_remember_period = false
# Options to be passed to the created cookie. For instance, you can set
# secure: true in order to force SSL only cookies.
# config.rememberable_options = {}
# ==> Configuration for :validatable
# Range for password length.
config.password_length = 8..128
# Email regex used to validate email formats. It simply asserts that
# one (and only one) @ exists in the given string. This is mainly
# to give user feedback and not to assert the e-mail validity.
# config.email_regexp = /\A[^@]+@[^@]+\z/
# ==> Configuration for :timeoutable
# The time you want to timeout the user session without activity. After this
# time the user will be asked for credentials again. Default is 30 minutes.
# config.timeout_in = 30.minutes
# If true, expires auth token on session timeout.
# config.expire_auth_token_on_timeout = false
# ==> Configuration for :lockable
# Defines which strategy will be used to lock an account.
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
# :none = No lock strategy. You should handle locking by yourself.
# config.lock_strategy = :failed_attempts
# Defines which key will be used when locking and unlocking an account
# config.unlock_keys = [ :email ]
# Defines which strategy will be used to unlock an account.
# :email = Sends an unlock link to the user email
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
# :both = Enables both strategies
# :none = No unlock strategy. You should handle unlocking by yourself.
# config.unlock_strategy = :both
# Number of authentication tries before locking an account if lock_strategy
# is failed attempts.
# config.maximum_attempts = 20
# Time interval to unlock the account if :time is enabled as unlock_strategy.
# config.unlock_in = 1.hour
# Warn on the last attempt before the account is locked.
# config.last_attempt_warning = false
# ==> Configuration for :recoverable
#
# Defines which key will be used when recovering the password for an account
# config.reset_password_keys = [ :email ]
# Time interval you can reset your password with a reset password key.
# Don't put a too small interval or your users won't have the time to
# change their passwords.
config.reset_password_within = 6.hours
# ==> Configuration for :encryptable
# Allow you to use another encryption algorithm besides bcrypt (default). You can use
# :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
# :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
# and :restful_authentication_sha1 (then you should set stretches to 10, and copy
# REST_AUTH_SITE_KEY to pepper).
#
# Require the `devise-encryptable` gem when using anything other than bcrypt
# config.encryptor = :sha512
# ==> Scopes configuration
# Turn scoped views on. Before rendering "sessions/new", it will first check for
# "users/sessions/new". It's turned off by default because it's slower if you
# are using only default views.
# config.scoped_views = false
# Configure the default scope given to Warden. By default it's the first
# devise role declared in your routes (usually :user).
# config.default_scope = :user
# Set this configuration to false if you want /users/sign_out to sign out
# only the current scope. By default, Devise signs out all scopes.
# config.sign_out_all_scopes = true
# ==> Navigation configuration
# Lists the formats that should be treated as navigational. Formats like
# :html, should redirect to the sign in page when the user does not have
# access, but formats like :xml or :json, should return 401.
#
# If you have any extra navigational formats, like :iphone or :mobile, you
# should add them to the navigational formats lists.
#
# The "*/*" below is required to match Internet Explorer requests.
# config.navigational_formats = ['*/*', :html]
# The default HTTP method used to sign out a resource. Default is :delete.
config.sign_out_via = :delete
# ==> OmniAuth
# Add a new OmniAuth provider. Check the wiki for more information on setting
# up on your models and hooks.
# config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
# ==> Warden configuration
# If you want to use other strategies, that are not supported by Devise, or
# change the failure app, you can configure them inside the config.warden block.
#
# config.warden do |manager|
# manager.intercept_401 = false
# manager.default_strategies(scope: :user).unshift :some_external_strategy
# end
# ==> Mountable engine configurations
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
# is mountable, there are some extra configurations to be taken into account.
# The following options are available, assuming the engine is mounted as:
#
# mount MyEngine, at: '/my_engine'
#
# The router that invoked `devise_for`, in the example above, would be:
# config.router_name = :my_engine
#
# When using omniauth, Devise cannot automatically set Omniauth path,
# so you need to do it manually. For the users scope, it would be:
# config.omniauth_path_prefix = '/my_engine/users/auth'
end

0
config/initializers/filter_parameter_logging.rb Normal file → Executable file
View File

0
config/initializers/inflections.rb Normal file → Executable file
View File

0
config/initializers/mime_types.rb Normal file → Executable file
View File

0
config/initializers/session_store.rb Normal file → Executable file
View File

0
config/initializers/wrap_parameters.rb Normal file → Executable file
View File

59
config/locales/devise.en.yml Executable file
View File

@ -0,0 +1,59 @@
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
en:
devise:
confirmations:
confirmed: "Your account was successfully confirmed."
send_instructions: "You will receive an email with instructions about how to confirm your account in a few minutes."
send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes."
failure:
already_authenticated: "You are already signed in."
inactive: "Your account is not activated yet."
invalid: "Invalid email or password."
locked: "Your account is locked."
last_attempt: "You have one more attempt before your account will be locked."
not_found_in_database: "Invalid email or password."
timeout: "Your session expired. Please sign in again to continue."
unauthenticated: "You need to sign in or sign up before continuing."
unconfirmed: "You have to confirm your account before continuing."
mailer:
confirmation_instructions:
subject: "Confirmation instructions"
reset_password_instructions:
subject: "Reset password instructions"
unlock_instructions:
subject: "Unlock Instructions"
omniauth_callbacks:
failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
success: "Successfully authenticated from %{kind} account."
passwords:
no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes."
send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
updated: "Your password was changed successfully. You are now signed in."
updated_not_active: "Your password was changed successfully."
registrations:
destroyed: "Bye! Your account was successfully cancelled. We hope to see you again soon."
signed_up: "Welcome! You have signed up successfully."
signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please open the link to activate your account."
update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address."
updated: "You updated your account successfully."
sessions:
signed_in: "Signed in successfully."
signed_out: "Signed out successfully."
unlocks:
send_instructions: "You will receive an email with instructions about how to unlock your account in a few minutes."
send_paranoid_instructions: "If your account exists, you will receive an email with instructions about how to unlock it in a few minutes."
unlocked: "Your account has been unlocked successfully. Please sign in to continue."
errors:
messages:
already_confirmed: "was already confirmed, please try signing in"
confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
expired: "has expired, please request a new one"
not_found: "not found"
not_locked: "was not locked"
not_saved:
one: "1 error prohibited this %{resource} from being saved:"
other: "%{count} errors prohibited this %{resource} from being saved:"

0
config/locales/en.yml Normal file → Executable file
View File

1
config/routes.rb Normal file → Executable file
View File

@ -1,4 +1,5 @@
Rails.application.routes.draw do Rails.application.routes.draw do
devise_for :users
root :to => 'projects#index' root :to => 'projects#index'
resources :projects resources :projects

0
db/migrate/20141106205507_create_projects.rb Normal file → Executable file
View File

View File

View File

@ -0,0 +1,42 @@
class DeviseCreateUsers < ActiveRecord::Migration
def change
create_table(:users) do |t|
## Database authenticatable
t.string :email, null: false, default: ""
t.string :encrypted_password, null: false, default: ""
## Recoverable
t.string :reset_password_token
t.datetime :reset_password_sent_at
## Rememberable
t.datetime :remember_created_at
## Trackable
t.integer :sign_in_count, default: 0, null: false
t.datetime :current_sign_in_at
t.datetime :last_sign_in_at
t.string :current_sign_in_ip
t.string :last_sign_in_ip
## Confirmable
# t.string :confirmation_token
# t.datetime :confirmed_at
# t.datetime :confirmation_sent_at
# t.string :unconfirmed_email # Only if using reconfirmable
## Lockable
# t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
# t.string :unlock_token # Only if unlock strategy is :email or :both
# t.datetime :locked_at
t.timestamps
end
add_index :users, :email, unique: true
add_index :users, :reset_password_token, unique: true
# add_index :users, :confirmation_token, unique: true
# add_index :users, :unlock_token, unique: true
end
end

23
db/schema.rb Normal file → Executable file
View File

@ -11,10 +11,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20141106205802) do ActiveRecord::Schema.define(version: 20150107160634) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
create_table "projects", force: true do |t| create_table "projects", force: true do |t|
t.string "title" t.string "title"
@ -31,4 +28,22 @@ ActiveRecord::Schema.define(version: 20141106205802) do
t.datetime "updated_at" t.datetime "updated_at"
end end
create_table "users", force: true do |t|
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.integer "sign_in_count", default: 0, null: false
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "users", ["email"], name: "index_users_on_email", unique: true
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
end end

0
db/seeds.rb Normal file → Executable file
View File

0
lib/assets/.keep Normal file → Executable file
View File

0
lib/tasks/.keep Normal file → Executable file
View File

68
lib/tasks/slack.rake Executable file
View File

@ -0,0 +1,68 @@
require "uri"
require "net/http"
namespace :slack do
desc "TODO"
task webhook: :environment do
time = Time.new
out = {}
out[:text] = "Last updated at #{time.strftime("%Y-%m-%d %Hgg:%M:%S")}"
out[:color] = "#829495"
out[:pretext] = "Roadmap"
out[:fields] = []
column_1 = {}
column_1[:title] = "Active Project(s)"
column_1[:value] = "<http://www.foo.com|Project 1>\n<http://www.foo.com|Project 1>\n<http://www.foo.com|Project 1>\n<http://www.foo.com|Project 1>"
column_1[:short] = true
column_2 = {}
column_2[:title] = "Furthest Status"
column_2[:value] = "Planning\nPlanning\nComplete\nOverdue :warning:"
column_2[:short] = true
out[:fields] << column_1
out[:fields] << column_2
column_1 = {}
column_1[:title] = "Upcoming Project(s)"
column_1[:value] = "<http://www.foo.com|Project 1>\n<http://www.foo.com|Project 1>\n<http://www.foo.com|Project 1>\n<http://www.foo.com|Project 1>"
column_1[:short] = true
column_2 = {}
column_2[:title] = "Furthest Status"
column_2[:value] = "Planning\nPlanning\nComplete\nOverdue :warning:"
column_2[:short] = true
out[:fields] << column_1
out[:fields] << column_2
column_1 = {}
column_1[:title] = "Backlog Project(s)"
column_1[:value] = "<http://www.foo.com|Project 1>\n<http://www.foo.com|Project 1>\n<http://www.foo.com|Project 1>\n<http://www.foo.com|Project 1>"
column_1[:short] = true
column_2 = {}
column_2[:title] = "Furthest Status"
column_2[:value] = "Planning\nPlanning\nComplete\nOverdue :warning:"
column_2[:short] = true
out[:fields] << column_1
out[:fields] << column_2
uri = URI.parse('https://hooks.slack.com/services/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')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri.path, {'Content-Type' =>'application/json'})
request.body = out.to_json
response = http.request(request)
puts response.body
end
end

0
public/404.html Normal file → Executable file
View File

0
public/422.html Normal file → Executable file
View File

0
public/500.html Normal file → Executable file
View File

BIN
public/assets/._bg_header.png Executable file

Binary file not shown.

View File

View File

View File

View File

BIN
public/assets/bg_header.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

0
public/favicon.ico Normal file → Executable file
View File

0
public/javascripts/jquery.js vendored Normal file → Executable file
View File

0
public/javascripts/jquery.min.js vendored Normal file → Executable file
View File

0
public/javascripts/jquery_ujs.js vendored Normal file → Executable file
View File

0
public/robots.txt Normal file → Executable file
View File

0
test/controllers/.keep Normal file → Executable file
View File

0
test/controllers/projects_controller_test.rb Normal file → Executable file
View File

0
test/fixtures/.keep vendored Normal file → Executable file
View File

0
test/fixtures/projects.yml vendored Normal file → Executable file
View File

11
test/fixtures/users.yml vendored Executable file
View File

@ -0,0 +1,11 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
# This model initially had no columns defined. If you add columns to the
# model remove the '{}' from the fixture names and add the columns immediately
# below each fixture, per the syntax in the comments below
#
one: {}
# column: value
#
two: {}
# column: value

0
test/helpers/.keep Normal file → Executable file
View File

0
test/helpers/projects_helper_test.rb Normal file → Executable file
View File

0
test/integration/.keep Normal file → Executable file
View File

0
test/mailers/.keep Normal file → Executable file
View File

0
test/models/.keep Normal file → Executable file
View File

0
test/models/project_test.rb Normal file → Executable file
View File

7
test/models/user_test.rb Executable file
View File

@ -0,0 +1,7 @@
require 'test_helper'
class UserTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end

0
test/test_helper.rb Normal file → Executable file
View File

BIN
vendor/assets/._fonts vendored Executable file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

0
vendor/assets/fonts/glyphicons-halflings-regular.eot vendored Normal file → Executable file
View File

0
vendor/assets/fonts/glyphicons-halflings-regular.svg vendored Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

0
vendor/assets/fonts/glyphicons-halflings-regular.ttf vendored Normal file → Executable file
View File

0
vendor/assets/fonts/glyphicons-halflings-regular.woff vendored Normal file → Executable file
View File

BIN
vendor/assets/javascripts/._bootstrap.js vendored Executable file

Binary file not shown.

BIN
vendor/assets/javascripts/._bootstrap.min.js vendored Executable file

Binary file not shown.

BIN
vendor/assets/javascripts/._npm.js vendored Executable file

Binary file not shown.

0
vendor/assets/javascripts/.keep vendored Normal file → Executable file
View File

0
vendor/assets/javascripts/bootstrap.js vendored Normal file → Executable file
View File

0
vendor/assets/javascripts/bootstrap.min.js vendored Normal file → Executable file
View File

Some files were not shown because too many files have changed in this diff Show More