Browse Source

Updates from the past fortnight

development
Godwin 9 years ago
parent
commit
14205f4586
  1. BIN
      app/assets/images/403.jpg
  2. BIN
      app/assets/images/columbus_group.jpg
  3. 12
      app/assets/javascripts/buoy-settings.json
  4. 7
      app/assets/stylesheets/_settings.scss
  5. 444
      app/assets/stylesheets/application.scss
  6. 18
      app/controllers/application_controller.rb
  7. 4
      app/mailers/user_mailer.rb
  8. 36
      app/models/email_confirmation.rb
  9. 4
      app/models/user.rb
  10. 21
      app/views/application/_translator_login.html.haml
  11. 8
      app/views/application/about.html.haml
  12. 2
      app/views/application/home.html.haml
  13. 22
      app/views/application/permission_denied.html.haml
  14. 2
      app/views/layouts/application.html.haml
  15. 14
      app/views/shared/_footer.html.haml
  16. 1
      app/views/user_mailer/test_email.text.haml
  17. 8
      config/environments/development.rb
  18. 1
      config/locales/data/html_records/1.html
  19. 1
      config/locales/data/html_records/2.html
  20. 0
      config/locales/data/translation-cache.yml
  21. 4
      config/routes.rb
  22. 12
      db/migrate/20150412203317_create_email_confirmations.rb
  23. 5
      db/migrate/20150412203357_add_is_translator_to_users.rb
  24. 12
      db/schema.rb
  25. 27
      lib/tasks/sample_data/conferences.yml
  26. 13
      lib/tasks/sample_data/organization_statuses.yml
  27. 50
      lib/tasks/sample_data/organizations.yml
  28. 23
      lib/tasks/sample_data/users.yml

BIN
app/assets/images/403.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 677 KiB

BIN
app/assets/images/columbus_group.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 750 KiB

After

Width:  |  Height:  |  Size: 494 KiB

12
app/assets/javascripts/buoy-settings.json

@ -0,0 +1,12 @@
{
"breakpoints": {
"small": 0,
"medium": 320,
"large": 1024,
"small-only": [0, 320],
},
"breakpoint-unit": "px",
"fallback-range": [320, 1024],
"browser_exceptions": {
}
}

7
app/assets/stylesheets/_settings.scss

@ -6,7 +6,7 @@ $colour-3: #E6C229;
$colour-4: #F17105;
$colour-5: #8EA604;
@mixin default-box-shadow($direction: top, $distance: 1, $inset: false) {
@mixin default-box-shadow($direction: top, $distance: 1, $inset: false, $additional-shadow: false) {
@if capable_of(box-shadow) {
$offset: 0.2em;
@if $direction == right or $direction == bottom {
@ -20,7 +20,10 @@ $colour-5: #8EA604;
@if $inset {
$offset: 'inset #{$offset}';
}
@include _(box-shadow, #{$offset} 0.8em #{-0.2em * $distance} #000);
@if $additional-shadow {
$additional-shadow: ', #{$additional-shadow}';
}
@include _(box-shadow, #{$offset} 0.8em #{-0.2em * $distance} #000#{$additional-shadow});
}
}

444
app/assets/stylesheets/application.scss

@ -1,4 +1,3 @@
//@import "bumbleberry";
@import "settings";
body {
@ -50,6 +49,173 @@ a {
}
}
button {
position: relative;
color: #FFF;
background-color: $colour-1;
border: 0;
padding: 0.5em 1em;
font-size: 1.25em;
outline: 0;
border-bottom: 0.125em solid rgba(0, 0, 0, 0.15);
@include _(border-radius, 0.15em);
@include default-box-shadow(top, 2);
overflow: hidden;
cursor: pointer;
@include before-and-after {
content: '';
position: absolute;
display: block;
top: 0;
right: 100%;
font-size: 1.15em;
background-color: rgba(0, 0, 0, 0);
border-color: transparent;
@include _(transition, all 250ms ease-in-out);
}
@include before {
height: 100%;
width: 100%;
margin-right: 1em;
}
@include after {
border-style: solid;
border-width: 1em 0 1em 1em;
}
&:hover,
&:focus,
&:hover,
&:focus {
@include before-and-after {
right: -1em;
border-left-color: rgba(0, 0, 0, 0.15);
}
}
&:hover,
&:focus {
@include before {
background-color: rgba(0, 0, 0, 0.15);
}
}
&:active {
@include _(transform, scale(0.95));
@include after {
left: 120%;
}
}
&:disabled {
@include _(opacity, 0.5);
cursor: inherit;
@include before-and-after {
display: none;
}
}
#main &[type="submit"] {
background-color: $colour-5;
}
}
textarea {
$line-height: 2em;
display: block;
width: 100%;
min-height: $line-height * 4;
font-size: 1.25em;
margin: 1em 0;
padding: 0 0.5em;
line-height: $line-height;
border: 0.1rem solid #E8E8E8;
outline: 0;
background: linear-gradient(
to bottom,
transparent,
transparent ($line-height - 0.05em),
rgba($colour-1, 0.33) 0.05em,
rgba($colour-1, 0.33)
);
background-size: 100% $line-height;
border-radius: 0 0 1em 0;
color: #000;
font-weight: bold;
@include default-box-shadow(top, 2);
@include _(transition, box-shadow 100ms ease-in-out);
&:hover, &:focus, &:active {
@include default-box-shadow(top, 1);
}
}
input {
&[type="text"], &[type="password"], &[type="telephone"], &[type="search"], &[type="email"], &[type="url"] {
display: block;
font-size: 1.25em;
outline: 0;
border: 0;
margin: 1em 0;
width: 100%;
padding: 0.25em 0.5em;
border-bottom: 0.15em solid transparent;
//@include default-box-shadow(top, 2, false, 0 0.05em 0 0 #666);
//@include _(transition, box-shadow 100ms ease-in-out);
&:hover, &:focus, &:active {
//@include default-box-shadow(top, 2, false, 0 0.15em 0 0 $colour-1);
}
}
}
.email-field {
position: relative;
overflow: hidden;
@include default-box-shadow(top, 2, false, 0 0.05em 0 0 #666);
@include _(transition, box-shadow 100ms ease-in-out);
label {
//position: absolute;
font-size: 1em;
float: left;
//@include font-family(primary);
//font-weight: bold;
//left: 0;
//top: 0;
padding: 0.25em 0.667em;
width: auto;
background-color: #333;
color: #FFF;
//@include _(transition, transform 250ms ease-in-out);
//@include _(transform-origin, left center);
//@include _(transform, scale(1) translateY(0));
}
&:hover, &:focus, &:active {
@include default-box-shadow(top, 2, false, 0 0.15em 0 0 $colour-1);
label {
background-color: $colour-1;
}
}
/*input {
&:focus, &:active, &:not([value=""]) {
+ label {
@include _(transform, scale(0.75) translateY(-20%));
top: -0.5em;
}
}
}*/
}
::-webkit-resizer {
visibility: hidden;
cursor: nw-resize;
}
@include selection {
background-color: rgba($colour-2, 0.75);
color: rgba(#FFF, 0.75);
@ -316,7 +482,7 @@ $header-tilt: 8deg;
}
}
.facebook {
.facebook, .locale {
float: left;
a {
@ -342,6 +508,7 @@ $header-tilt: 8deg;
vertical-align: middle;
}
}
.github {
position: relative;
background-color: #FFF;
@ -363,6 +530,131 @@ $header-tilt: 8deg;
position: absolute;
left: 0.5em;
top: 0.45em;
@include _(transition, 150ms fill ease-in-out);
}
&:hover .icons {
fill: #4183C4;
}
}
.locale {
@if capable_of(css3_selectors) {
margin: 0 0.5em;
#select-language {
position: absolute;
visibility: hidden;
}
.launch {
display: block;
height: 1.5em;
padding: 0 0.125em;
border-radius: 0.1em;
background-color: #888;
color: #E7E7E7;
text-align: center;
line-height: 1.5em;
@include font-family(secondary);
@include _(transition, 150ms background-color ease-in-out);
cursor: pointer;
&:hover {
background-color: #333;
}
@include after {
content: '×';
display: block;
position: fixed;
top: 0.5em;
left: -1em;
z-index: 11;
color: #333;
font-size: 2em;
opacity: 0;
@include _(transition, 250ms left ease-in-out);
}
}
.selector {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
padding: 1em 4em;
overflow: auto;
background-color: #FFF;
z-index: 10;
@include _(transform, scale(0));
@include _(transform-origin, 6.25em _calc('100% - 2em', 98%));
@include _(transition, 250ms all ease-in-out);
}
ul {
list-style: none;
padding: 0;
margin: 0;
text-align: center;
}
li {
position: relative;
display: inline-block;
min-width: 6em;
margin: 1em;
text-align: center;
border-radius: 0.33em;
overflow: hidden;
@include default-box-shadow;
@include _(transform, scale(1));
@include _(transition, 100ms transform ease-in-out);
a {
display: block;
position: static;
background-color: $colour-1;
@include font-family(secondary);
line-height: 1.5em;
color: #FFF;
@include before {
content: '';
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
}
}
span {
padding: 1em;
height: 3.25em;
display: block;
}
&:hover {
@include _(transform, scale(1.25));
}
}
#select-language:checked ~ label {
@include after {
display: block;
left: 0.25em;
opacity: 1;
}
}
#select-language:checked ~ .selector {
@include _(transform, scale(1));
}
} @else {
display: none;
}
}
}
@ -423,10 +715,10 @@ $header-tilt: 8deg;
left: 0;
width: 0;
margin: 0 auto;
opacity: 1;
opacity: 0;
border-bottom: 0.15em solid;
@include _(box-shadow, 0 0.075em 0.15em #888);
@include _(transition, width 250ms ease-in-out);
@include _(transition, all 250ms ease-in-out);
@include _(transform, none);
}
@ -434,6 +726,7 @@ $header-tilt: 8deg;
&:active,
&:focus {
@include after {
opacity: 1;
width: 100%;
}
}
@ -511,13 +804,17 @@ $header-tilt: 8deg;
#footer {
.github {
bottom: 0.5em;
left: 2em;
left: 4em;
float: left;
}
.facebook {
position: absolute;
left: 0.5em;
}
.locale {
position: absolute;
left: 2em;
}
}
}
@ -550,48 +847,7 @@ $header-tilt: 8deg;
a {
font-size: 1.6em;
margin: 0.75em 1em;
display: block;
@include after {
display: none;
@include _(transition, none);
position: absolute;
font-size: 0.25em;
top: 1.5em;
right: -1em;
bottom: 0;
left: auto;
margin: auto;
width: 0;
height: 0;
border-style: solid;
border-width: 1em 0 1em 1.5em;
border-color: transparent transparent transparent rgba(#000, 0.25);
max-width: 0;
@include _(box-shadow, none);
}
@include before {
content: '';
position: absolute;
top: -0.5em;
right: -1em;
left: -1em;
height: 2em;
z-index: -1;
@include _(transform, skewY(3.3deg) translate3d(0, 0, 0));
@include _(opacity, 0.5)
}
&.current {
color: #333;
@include before {
@include _(opacity, 0.75);
}
@include after {
display: block;
}
}
@include _(transition, color 250ms ease-in-out);
&:hover, &:active, &:focus {
color: #333;
@ -655,29 +911,27 @@ $header-tilt: 8deg;
max-width: 2.25em;
height: 2.25em;
left: 0.5em;
bottom: 0.333em;
overflow: hidden;
color: transparent;
padding: 0.333em;
line-height: 1.5em;
@include _(transition, all 250ms ease-in-out);
&:hover {
@if capable_of(calc) {
max-width: calc(100% - 1em);
} @else {
max-width: 100%;
}
max-width: _calc('100% - 1em', 100%);
color: #333;
border-color: #DDD;
@include default-box-shadow(top, 2, true);
}
.icons {
left: 0.5em;
top: 0.45em;
float: left;
width: 1.5em;
height: 1.5em;
fill: #333;
vertical-align: middle;
position: absolute;
position: static;
}
a {
@ -685,9 +939,18 @@ $header-tilt: 8deg;
font-size: 0.8em;
font-weight: bold;
color: inherit;
position: static;
&:hover {
text-decoration: underline;
@include after {
display: none;
}
}
}
}
.facebook {
.facebook, .locale {
position: relative;
left: 2.5em;
bottom: 0.25em;
@ -695,75 +958,6 @@ $header-tilt: 8deg;
}
}
button {
position: relative;
color: #FFF;
background-color: $colour-1;
border: 0;
padding: 0.5em 1em;
font-size: 1.25em;
outline: 0;
border-bottom: 0.125em solid rgba(0, 0, 0, 0.15);
@include _(border-radius, 0.15em);
@include default-box-shadow(top, 2);
overflow: hidden;
cursor: pointer;
@include before-and-after {
content: '';
position: absolute;
display: block;
top: 0;
right: 100%;
font-size: 1.15em;
background-color: rgba(0, 0, 0, 0);
border-color: transparent;
@include _(transition, all 250ms ease-in-out);
}
@include before {
height: 100%;
width: 100%;
margin-right: 1em;
}
@include after {
border-style: solid;
border-width: 1em 0 1em 1em;
}
&:hover,
&:focus,
&:hover,
&:focus {
@include before-and-after {
right: -1em;
border-left-color: rgba(0, 0, 0, 0.15);
}
}
&:hover,
&:focus {
@include before {
background-color: rgba(0, 0, 0, 0.15);
}
}
&:active {
@include _(transform, scale(0.95));
@include after {
left: 120%;
}
}
&:disabled {
@include _(opacity, 0.5);
cursor: inherit;
@include before-and-after {
display: none;
}
}
}
@mixin header-colour($page, $colour) {
body.#{$page} {
#header-title {

18
app/controllers/application_controller.rb

@ -3,12 +3,6 @@ module ActiveRecord
end
end
class Translator
def can_translate?
true
end
end
class ApplicationController < LinguaFrancaApplicationController
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
@ -24,7 +18,10 @@ class ApplicationController < LinguaFrancaApplicationController
@@test_location
def capture_page_info
I18n.config.translator = Translator.new
#u = User.find_by_email('goodgodwin@hotmail.com')
#auto_login(u)
#logout()
I18n.config.translator = current_user
@conference = Conference.order("start_date DESC").first
@stylesheets ||= Array.new
@stylesheets << params[:controller] if params[:controller] == 'translations'
@ -63,7 +60,8 @@ class ApplicationController < LinguaFrancaApplicationController
render 'application/404', status: 404
end
def do_403
def do_403(template = nil)
@template = template
render 'application/permission_denied', status: 403
end
@ -74,4 +72,8 @@ class ApplicationController < LinguaFrancaApplicationController
rescue_from ActiveRecord::PremissionDenied do |exception|
do_403
end
rescue_from AbstractController::ActionNotFound do |exception|
do_403 'translator_login'
end
end

4
app/mailers/user_mailer.rb

@ -23,6 +23,10 @@ class UserMailer < ActionMailer::Base
mail to: "to@example.org"
end
def test_email
mail to: 'goodgodwin@hotmail.com', subject: 'This is a test'
end
def conference_registration_email(conference, data, conference_registration)
@data = data
@conference = conference

36
app/models/email_confirmation.rb

@ -0,0 +1,36 @@
class EmailConfirmation < ActiveRecord::Base
belongs_to :user
before_create :prepare
def prepare
# clean up any expired records
EmailConfirmation.delete_all(['expiry < ?', Time.now])
# fill in defaults
self.expiry ||= Time.now + 1.day
while self.token.nil? do
# create a token based on the user id and current time
self.token = generate_token
# conflicts should be extremely rare, but let's just be sure
if EmailConfirmation.exists?(:token => self.token)
self.token = nil # keep the loop going
# because we generate the token based on the time, just make sure
# some time has passed
sleep 0.1
end
end
end
def valid_for_user?(user)
user.id == user_id && expiry < Time.now
end
protected
def generate_token
Digest::SHA256.hexdigest(user_id.to_s + (Time.now.to_f * 1000000).to_i.to_s)
end
end

4
app/models/user.rb

@ -21,4 +21,8 @@ class User < ActiveRecord::Base
has_many :authentications, :dependent => :destroy
accepts_nested_attributes_for :authentications
def can_translate?
is_translator
end
end

21
app/views/application/_translator_login.html.haml

@ -0,0 +1,21 @@
= row do
- if current_user
= columns(medium: 12) do
%h2=_'articles.permission_denied.headings.not_a_translator','Sorry you must be a translator to view this page'
= columns(medium: 6) do
%p=_'articles.permission_denied.paragraphs.translator_request', :p
= columns(medium: 6) do
= form_tag :translator_request do
=text_area_tag :comment, nil, placeholder: true
=button_tag :translator_request
- else
= columns(medium: 12) do
%h2=_'articles.permission_denied.headings.login_required','Sorry you must be logged in to view this page'
= columns(medium: 6) do
%p=_'articles.permission_denied.paragraphs.translator_not_logged_in', :p
= columns(medium: 6) do
= form_tag :do_confirm do
.email-field
=email_field_tag :email, nil, required: true
=label_tag :email
=button_tag :login

8
app/views/application/about.html.haml

@ -6,9 +6,9 @@
%h1=_'page_titles.About_BikeBike'
%article
%h2=_'page_titles.About_BikeBike', :t
%p=_'static_text.about.paragraph_1', :p
%h2=_'articles.about_bikebike.headings.About_BikeBike', :t
%p=_'articles.about_bikebike.paragraphs.paragraph_1', :p
%h2=_'page_titles.About_BikeBike_2', :t
%h2=_'articles.about_bikebike.headings.About_BikeBike_2', :t
%figure{style: "background-image: url(#{image_url('columbus_people.jpg')})"}
%p=_'static_text.about.paragraph_2', :p
%p=_'articles.about_bikebike.paragraphs.paragraph_2', :p

2
app/views/application/home.html.haml

@ -1,3 +1,5 @@
-# EmailConfirmation.create(user: User.find_by_email('goodgodwin@hotmail.com'), url: '/')
- this_is_the_front_page
- if @conference
= render 'conferences/header'

22
app/views/application/permission_denied.html.haml

@ -1,9 +1,15 @@
- page_title = _'error.403.page_title.Permission_Denied'
- title page_title
- banner_title page_title
- content_for :banner do
- image = image_url('403.jpg')
#header-title.short{style: capable_of(:svg) ? nil : "background-image: url(#{image})"}
- if capable_of(:svg)
= render 'application/banner_image.svg', {:image => image}
%h1=_'page_titles.Permission_Denied'
.row
%h1
=_'error.403.title','This page is inaccessible to you'
%p
=_'error.403.description', :p
%article
- if @template
=render @template
- else
%h2
=_'articles.permission_denied.headings.main','Sorry, you currently don\'t have access to this page'
%p
=_'articles.permission_denied.paragraphs.main', :p

2
app/views/layouts/application.html.haml

@ -3,7 +3,7 @@
%head
%meta{ charset: 'utf-8' }
%meta{ name: 'viewport', content: 'width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0' }
%title= (yield :title) + (content_for?(:title) ? _!' | ' : '') + _!'Bike!Bike!'
%title= (yield :title) + (content_for?(:title) ? (_!' | ') : '') + (_!'Bike!Bike!')
%meta{ name: 'description', content: (yield_or_default :description, I18n.t('page_descriptions.home')) }
= csrf_meta_tags
= inject_css!

14
app/views/shared/_footer.html.haml

@ -9,7 +9,19 @@
=_'links.footer.help_text.facebook', 'Join our facebook group' do |title|
%a{href: 'https://www.facebook.com/groups/648758205249998/', target: :_blank, title: title}
=svg_sprite 'icons', 'bb-icon-fb', 'facebook logo'
.locale
=_'links.footer.help_text.select_language', 'Select your language' do |title|
%input{type: :checkbox, id: 'select-language'}
%label.launch{title: title, for: 'select-language'}
=I18n.locale.upcase
.selector
%ul
-I18n.backend.available_locales.each do |locale|
%li
%a{href: request.original_url.gsub(/^(https?:\/\/)(..\.)?(.*)$/, '\1' + locale + '.\3')}
=_! locale.upcase
%span=I18n.t("languages.#{locale}", locale: locale, context: I18n.t("languages.#{locale}"))
.copy
=_'links.footer.help_text.contributors', 'Who contributed to building this website' do |title|
=link_to :humans_txt, {title: title} do
=_!"&copy;#{Date.today.strftime("%Y")} Bike!Bike!"
=(_!"&copy;#{Date.today.strftime("%Y")} Bike!Bike!").html_safe

1
app/views/user_mailer/test_email.text.haml

@ -0,0 +1 @@
Hi, this is a test. Did you get it?

8
config/environments/development.rb

@ -35,13 +35,13 @@ BikeBike::Application.configure do
config.action_mailer.smtp_settings = {
:enable_starttls_auto => true,
:address => 'mail.bikebike.org',
:domain => 'bikebike.org',
:port => 25,
:domain => 'preview.bikebike.org',
:port => 587,
:authentication => :plain,
:enable_starttls_auto => true,
:openssl_verify_mode => 'none',
:user_name => 'info@bikebike.org',
:password => '!NF)'
:user_name => 'info@preview.bikebike.org',
:password => 'test'
}
config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_deliveries = true

1
config/locales/data/html_records/1.html

@ -0,0 +1 @@
<html><head></head><body></body></html>

1
config/locales/data/html_records/2.html

@ -0,0 +1 @@
<html><head></head><body></body></html>

0
config/locales/data/translation-cache.yml

4
config/routes.rb

@ -75,6 +75,10 @@ BikeBike::Application.routes.draw do
get '/robots.txt' => 'application#robots', :as => :robots_txt
get '/humans.txt' => 'application#humans', :as => :humans_txt
# get 'resources' => 'pages#resources'
#
get '/confirm/:token' => 'application#confirm', :as => :confirm
post '/doconfirm' => 'application#do_confirm', :as => :do_confirm
post '/translator-request' => 'application#translator_request', :as => :translator_request
get '/about' => 'application#about', :as => :about
get '/policy' => 'application#policy', :as => :policy

12
db/migrate/20150412203317_create_email_confirmations.rb

@ -0,0 +1,12 @@
class CreateEmailConfirmations < ActiveRecord::Migration
def change
create_table :email_confirmations do |t|
t.string :token
t.integer :user_id
t.datetime :expiry
t.string :url
t.timestamps null: false
end
end
end

5
db/migrate/20150412203357_add_is_translator_to_users.rb

@ -0,0 +1,5 @@
class AddIsTranslatorToUsers < ActiveRecord::Migration
def change
add_column :users, :is_translator, :boolean
end
end

12
db/schema.rb

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20150315225844) do
ActiveRecord::Schema.define(version: 20150412203357) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -120,6 +120,15 @@ ActiveRecord::Schema.define(version: 20150315225844) do
t.date "created_at"
end
create_table "email_confirmations", force: :cascade do |t|
t.string "token"
t.integer "user_id"
t.datetime "expiry"
t.string "url"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end
create_table "event_types", force: :cascade do |t|
t.string "slug", limit: 255
t.text "info"
@ -264,6 +273,7 @@ ActiveRecord::Schema.define(version: 20150315225844) do
t.string "role", limit: 255
t.string "firstname", limit: 255
t.string "lastname", limit: 255
t.boolean "is_translator"
end
add_index "users", ["activation_token"], name: "index_users_on_activation_token", using: :btree

27
lib/tasks/sample_data/conferences.yml

@ -0,0 +1,27 @@
---
new_orleans:
id: 1
title: New Orleans 2013
slug: new_orleans
start_date:
end_date:
info: This was an awesome conference
poster:
cover:
workshop_schedule_published:
registration_open:
meals_provided:
meal_info:
travel_info:
conference_type_id:
created_at:
updated_at:
preregistration_info:
registration_info:
postregistration_info:
cover_attribution_id:
cover_attribution_name:
cover_attribution_src:
cover_attribution_user_id:
organizations:
- plan_b

13
lib/tasks/sample_data/organization_statuses.yml

@ -0,0 +1,13 @@
---
unknown:
id: 1
slug: unknown
new:
id: 2
slug: new
open:
id: 3
slug: open
closed:
id: 4
slug: closed

50
lib/tasks/sample_data/organizations.yml

@ -0,0 +1,50 @@
---
adelaide_bike_kitchen:
id: 1
name: Adelaide Bike Kitchen
slug: adelaide_bike_kitchen
email_address: adelaide_bike_kitchen@bikebike.org
url: http://adelaidebikekitchen.org
year_founded: 2000
info: Whatever
logo:
avatar:
requires_approval:
secret_question:
secret_answer:
created_at:
updated_at:
cover:
cover_attribution_id:
cover_attribution_name:
cover_attribution_src:
phone:
organization_status: open
cover_attribution_user_id:
users:
bob: administrator
vienna_bike_kitchen:
id: 2
name: Vienna Bike Kitchen
slug: vienna_bike_kitchen
email_address: vienna_bike_kitchen@bikebike.org
url: http://viennabikekitchen.org
year_founded: 2000
info: Whatever
logo:
avatar:
requires_approval:
secret_question:
secret_answer:
user_organization_replationship_id:
created_at:
updated_at:
cover:
cover_attribution_id:
cover_attribution_name:
cover_attribution_src:
phone:
organization_status: open
cover_attribution_user_id:
users:
alice: administrator

23
lib/tasks/sample_data/users.yml

@ -0,0 +1,23 @@
---
bob:
id: 1
username: bob
email: bob@bikebike.org
crypted_password: bobspassword
activation_state:
avatar:
about_me: I am Bob
role:
firstname: Bob
lastname: MacDonald
alice:
id: 2
username: alice
email: alice@bikebike.org
crypted_password: alicespassword
activation_state:
avatar:
about_me: I am Alice
role:
firstname: Alice
lastname: Smith
Loading…
Cancel
Save