Browse Source

Merging with wotk done in PDX

development
Godwin 10 years ago
parent
commit
8caad2a009
  1. 3
      .gitignore
  2. 7
      .openshift/action_hooks/start
  3. 4
      .openshift/action_hooks/stop
  4. 42
      Gemfile
  5. 125
      Gemfile.lock
  6. 7
      README.md
  7. 5
      app/assets/javascripts/application.js.coffee
  8. 3
      app/controllers/pages_controller.rb
  9. 9
      app/helpers/bike_bike_form_helper.rb
  10. 2
      app/views/layouts/fields/_errors_default.html.haml
  11. 6
      app/views/users/_form.html.haml
  12. 1
      config/initializers/drupal_hash.rb
  13. 2929
      config/locales/translation-info.yml
  14. 564
      db/schema.rb
  15. 4
      spec/features/pages/login_spec.rb
  16. 2
      spec/features/pages/organization_registration_spec.rb
  17. 7
      spec/support/delorean.rb
  18. 8
      spec/support/postgresql.rb

3
.gitignore

@ -5,6 +5,7 @@
!.rspec
!.slugignore
!.travis.yml
!.openshift
*~
@ -66,4 +67,4 @@ brakeman.html
# Ignore sensitive data
/config/settings/local.rb
/nbproject/private/
/nbproject/private/

7
.openshift/action_hooks/start

@ -0,0 +1,7 @@
#!/bin/bash
# The logic to start up your application should be put in this
# script. The application will work only if it binds to
# $OPENSHIFT_INTERNAL_IP:8080
export PATH=$OPENSHIFT_RUNTIME_DIR/bin:$PATH
cd $OPENSHIFT_REPO_DIR
rails server -b $OPENSHIFT_INTERNAL_IP -p $OPENSHIFT_INTERNAL_PORT -d

4
.openshift/action_hooks/stop

@ -0,0 +1,4 @@
#!/bin/bash
# The logic to stop your application should be put in this script.
kill -9 `ps -ef | grep "rails server" | grep -v grep | awk '{ print $2 }'` > /dev/null 2>&1
exit 0

42
Gemfile

@ -1,54 +1,21 @@
source 'http://rubygems.org'
ruby '2.0.0'
#ruby '2.0.0'
gem 'rails', '4.0.0'
# Servers
# gem 'puma'
# gem 'unicorn'
# gem 'openssl', '~> 1.1.0'
gem 'eventmachine'
# Multi-environment configuration
# gem 'simpleconfig'
# API
# gem 'rabl'
# ORM
gem 'pg'
# Security
# gem 'secure_headers'
#gem 'dotenv-rails', :groups => [:development, :test]
# Miscellanea
# gem 'google-analytics-rails'
gem 'haml'
# gem 'http_accept_language'
gem 'jquery-rails'
gem 'jquery-ui-rails'
# gem 'resque', require: 'resque/server' # Resque web interface
# Assets
gem 'coffee-rails', '~> 4.0.0'
gem 'haml_assets'
gem 'handlebars_assets'
gem 'i18n-js'
gem 'i18n-active_record',
:git => 'git://github.com/svenfuchs/i18n-active_record.git',
:require => 'i18n/active_record'
gem 'jquery-turbolinks'
gem 'sass-rails', '~> 4.0.0'
gem "compass-rails", "~> 1.1.3"
gem 'foundation-rails'
#gem 'turbolinks' # This would be great to have working, right now lets focus on gettting it working without it.
gem 'uglifier', '>= 1.3.0'
gem 'sorcery', '>= 0.8.1'
gem 'oauth2', '~> 0.8.0'
gem 'ruby-drupal-hash'
gem 'redis'
gem 'carrierwave'
gem 'carrierwave-imageoptimizer'
gem 'mini_magick'
@ -56,21 +23,16 @@ gem 'carmen', :path => '../carmen/' if File.directory?('../carmen/') && RbConfig
gem 'carmen-rails'
gem 'nested_form'
gem 'acts_as_list'
gem 'geocoder'
gem 'forgery'
gem 'paper_trail'
# gem 'panoramio-rb' # make it easier to let users get nice backdrops for their conferences etc
group :development, :test do
gem 'debugger'
gem 'delorean'
gem 'rspec'
gem 'rspec-rails'
end
group :development do
gem 'bullet'
gem 'better_errors'
gem 'binding_of_caller'
gem 'meta_request'
@ -84,8 +46,6 @@ group :test do
gem 'guard-rspec'
gem 'factory_girl_rails'
gem 'coveralls', require: false
gem 'database_cleaner'
gem 'email_spec'
gem 'launchy'
gem 'selenium-webdriver'
gem 'simplecov', require: false

125
Gemfile.lock

@ -1,22 +1,17 @@
GIT
remote: git://github.com/josevalim/rails-footnotes.git
revision: 8411b4cec668b133ec3f7d3be6d39e77ee3abe9e
revision: 961015b3a73c2a0fc6b9501fc001e6eb082b7025
specs:
rails-footnotes (4.0.0)
rails-footnotes (4.0.1)
rails (>= 3.2)
GIT
remote: git://github.com/svenfuchs/i18n-active_record.git
revision: 55507cf59f8f2173d38e07e18df0e90d25b1f0f6
revision: 2d9a22b6a4e5d809782cdbfa65b14d9e47aa27fc
specs:
i18n-active_record (0.0.2)
i18n (>= 0.5.0)
PATH
remote: ../carmen/
specs:
carmen (1.0.1)
GEM
remote: http://rubygems.org/
specs:
@ -49,10 +44,7 @@ GEM
addressable (2.3.6)
arel (4.0.2)
awesome_print (1.2.0)
bcrypt (3.1.7)
bcrypt (3.1.7-x86-mingw32)
bcrypt-ruby (3.1.5)
bcrypt (>= 3.1.3)
bcrypt-ruby (3.1.5-x86-mingw32)
bcrypt (>= 3.1.3)
better_errors (1.1.0)
@ -61,9 +53,6 @@ GEM
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
builder (3.1.4)
bullet (4.8.0)
activesupport
uniform_notifier (>= 1.4.0)
callsite (0.0.11)
capybara (2.2.1)
mime-types (>= 1.16)
@ -71,6 +60,8 @@ GEM
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
carmen (1.0.1)
unicode_utils (~> 1.4.0)
carmen-rails (1.0.1)
carmen (~> 1.0.0)
rails
@ -84,13 +75,9 @@ GEM
image_optimizer (~> 1.2)
celluloid (0.15.2)
timers (~> 1.1.0)
celluloid-io (0.15.0)
celluloid (>= 0.15.0)
nio4r (>= 0.5.0)
childprocess (0.5.2)
childprocess (0.5.3)
ffi (~> 1.0, >= 1.0.11)
chronic (0.10.2)
chunky_png (1.3.0)
chunky_png (1.3.1)
coderay (1.1.0)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
@ -99,8 +86,7 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.7.0)
columnize (0.3.6)
compass (0.12.5)
compass (0.12.6)
chunky_png (~> 1.2)
fssm (>= 0.2.7)
sass (~> 3.2.19)
@ -115,24 +101,10 @@ GEM
thor
crack (0.4.2)
safe_yaml (~> 1.0.0)
database_cleaner (1.2.0)
debug_inspector (0.0.2)
debugger (1.6.6)
columnize (>= 0.3.1)
debugger-linecache (~> 1.2.0)
debugger-ruby_core_source (~> 1.3.2)
debugger-linecache (1.2.0)
debugger-ruby_core_source (1.3.2)
delorean (2.1.0)
chronic
diff-lcs (1.2.5)
docile (1.1.3)
email_spec (1.5.0)
launchy (~> 2.1)
mail (~> 2.2)
erubis (2.7.0)
eventmachine (1.0.3)
eventmachine (1.0.3-x86-mingw32)
execjs (2.0.2)
factory_girl (4.4.0)
activesupport (>= 3.0.0)
@ -141,22 +113,21 @@ GEM
railties (>= 3.0.0)
faraday (0.9.0)
multipart-post (>= 1.2, < 3)
ffi (1.9.3)
ffi (1.9.3-x86-mingw32)
forgery (0.5.0)
forgery (0.6.0)
formatador (0.2.4)
foundation-rails (5.2.2.0)
railties (>= 3.1.0)
sass (>= 3.2.0)
fssm (0.2.10)
geocoder (1.1.9)
guard (2.6.0)
geocoder (1.2.1)
guard (2.6.1)
formatador (>= 0.2.4)
listen (~> 2.7)
lumberjack (~> 1.0)
pry (>= 0.9.12)
thor (>= 0.18.1)
guard-rspec (4.2.8)
guard-rspec (4.2.9)
guard (~> 2.1)
rspec (>= 2.14, < 4.0)
haml (4.0.5)
@ -166,43 +137,29 @@ GEM
activesupport (~> 4.0.0)
haml (>= 3.1, < 5.0)
railties (~> 4.0.0)
haml_assets (0.2.2)
haml
tilt
handlebars_assets (0.15)
execjs (>= 1.2.9)
multi_json
sprockets (>= 2.0.3)
tilt
hike (1.2.3)
httpauth (0.2.1)
i18n (0.6.9)
i18n-js (2.1.2)
i18n
image_optimizer (1.2.1)
jquery-rails (3.1.0)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
jquery-turbolinks (2.0.2)
railties (>= 3.1.0)
turbolinks
jquery-ui-rails (4.2.0)
jquery-ui-rails (4.2.1)
railties (>= 3.2.16)
json (1.8.1)
jwt (0.1.11)
jwt (0.1.13)
multi_json (>= 1.5)
launchy (2.4.2)
addressable (~> 2.3)
listen (2.7.1)
listen (2.7.5)
celluloid (>= 0.15.2)
celluloid-io (>= 0.15.0)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
lumberjack (1.0.5)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
meta_request (0.2.9)
meta_request (0.3.0)
callsite
rack-contrib
railties
@ -210,16 +167,13 @@ GEM
mime-types (1.25.1)
mini_magick (3.7.0)
subexec (~> 0.2.1)
mini_portile (0.5.3)
mini_portile (0.6.0)
minitest (4.7.5)
multi_json (1.9.2)
multi_json (1.10.0)
multipart-post (2.0.0)
nested_form (0.3.2)
nio4r (1.0.0)
nokogiri (1.6.1)
mini_portile (~> 0.5.0)
nokogiri (1.6.1-x86-mingw32)
mini_portile (~> 0.5.0)
nokogiri (1.6.2.1-x86-mingw32)
mini_portile (= 0.6.0)
oauth (0.4.7)
oauth2 (0.8.1)
faraday (~> 0.8)
@ -227,16 +181,11 @@ GEM
jwt (~> 0.1.4)
multi_json (~> 1.0)
rack (~> 1.2)
paper_trail (3.0.1)
paper_trail (3.0.2)
activerecord (>= 3.0, < 5.0)
activesupport (>= 3.0, < 5.0)
pg (0.17.1)
pg (0.17.1-x86-mingw32)
polyglot (0.3.4)
pry (0.9.12.6)
coderay (~> 1.0)
method_source (~> 0.8)
slop (~> 3.4)
pry (0.9.12.6-x86-mingw32)
coderay (~> 1.0)
method_source (~> 0.8)
@ -265,11 +214,10 @@ GEM
activesupport (= 4.0.0)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.2.2)
rake (10.3.2)
rb-fsevent (0.9.4)
rb-inotify (0.9.3)
rb-inotify (0.9.4)
ffi (>= 0.5.0)
redis (3.0.7)
rest-client (1.6.7)
mime-types (>= 1.16)
rspec (2.14.1)
@ -288,9 +236,8 @@ GEM
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
ruby-drupal-hash (0.0.3)
rubyzip (1.1.3)
safe_yaml (1.0.2)
safe_yaml (1.0.3)
sass (3.2.19)
sass-rails (4.0.3)
railties (>= 4.0.0, < 5.0)
@ -328,20 +275,18 @@ GEM
thread_safe (0.3.3)
tilt (1.4.1)
timers (1.1.0)
tins (1.1.0)
tins (1.3.0)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
turbolinks (2.2.2)
coffee-rails
tzinfo (0.3.39)
uglifier (2.5.0)
execjs (>= 0.3.0)
json (>= 1.8.0)
uniform_notifier (1.4.0)
unicode_utils (1.4.0)
wdm (0.1.0)
webmock (1.17.4)
addressable (>= 2.2.7)
webmock (1.18.0)
addressable (>= 2.3.6)
crack (>= 0.3.2)
websocket (1.0.7)
win32console (1.3.2-x86-mingw32)
@ -349,7 +294,6 @@ GEM
nokogiri (~> 1.3)
PLATFORMS
ruby
x86-mingw32
DEPENDENCIES
@ -357,20 +301,13 @@ DEPENDENCIES
awesome_print
better_errors
binding_of_caller
bullet
capybara
carmen!
carmen-rails
carrierwave
carrierwave-imageoptimizer
coffee-rails (~> 4.0.0)
compass-rails (~> 1.1.3)
coveralls
database_cleaner
debugger
delorean
email_spec
eventmachine
factory_girl_rails
forgery
foundation-rails
@ -378,12 +315,8 @@ DEPENDENCIES
guard-rspec
haml
haml-rails
haml_assets
handlebars_assets
i18n-active_record!
i18n-js
jquery-rails
jquery-turbolinks
jquery-ui-rails
launchy
meta_request
@ -395,10 +328,8 @@ DEPENDENCIES
rails (= 4.0.0)
rails-footnotes!
rails_12factor
redis
rspec
rspec-rails
ruby-drupal-hash
sass-rails (~> 4.0.0)
selenium-webdriver
simplecov

7
README.md

@ -96,8 +96,6 @@ The method can be used as follows:
_ 'basename.my_key', :paragraph
_ 'basename.my_key' do
<input type="text" placeholder="_!" />
end
If the key does not exist, the previos lines will produce the following respectively:
@ -109,10 +107,9 @@ If the key does not exist, the previos lines will produce the following respecti
tellus. Proin eget tortor risus. Donec sollicitudin molestie
malesuada. Donec rutrum congue leo eget malesuada.'
<input type="text" placeholder="my_key" />
If the user has sufficient rights, these blocks will also be surrounded by the necessary markup to allow them to be selected and edited by the user.
Translations are recorded during testing and committed to the repository when pushing to github. After pulling down the latest version from github you should always run `rake translations:migrate` to put the latest migrations into your database.
### Style Guide ###
@ -121,4 +118,4 @@ On hold until our design team determines a director for our identity.
## Testing Practices ##
Once tests are set up, we will ensure 100% code coverage. This higher than normal amount is due to the fact that the application will capture all translations, on which pages they occur, and which keys are missing languages in each available language.
Our focus will be on integration testing using Capybara. While testing the app records all translations that it finds, whether or not they exist, and which pages that they were found on.

5
app/assets/javascripts/application.js.coffee

@ -12,14 +12,9 @@
# require jquery_nested_form
# I18n
#= require i18n
#= require i18n/translations
'use strict'
I18n.defaultLocale = '<%= I18n.default_locale %>'
I18n.locale = $('html').attr 'lang'
try Typekit.load() catch
startSpinner = ->

3
app/controllers/pages_controller.rb

@ -1,6 +1,3 @@
require 'rubygems'
require 'ruby_drupal_hash'
include ApplicationHelper
class PagesController < ApplicationController

9
app/helpers/bike_bike_form_helper.rb

@ -194,17 +194,14 @@ module BikeBikeFormHelper
render_field(method, options = get_options(method, options), super(object_name, method, options), get_value(method, options))
end
#def fields_for
def form_for(*args, &block)
@record = args.first
template = 'errors_' + @record.class.name.underscore
template = 'errors_default' unless lookup_context.exists?(template, [TEMPLATE_DIR], true)
( render (TEMPLATE_DIR + '/' + template) ) + super(args, &block)
( render (TEMPLATE_DIR + '/' + template) ) + super(*args, &block)
end
#def label
def collection_check_boxes(object, method, collection, value_method, text_method, options = {}, html_options = {}, &block)
render_field(method, options = get_options(method, options), super(object, method, collection, value_method, text_method, options, html_options, &block), get_value(method, options))
@ -384,7 +381,9 @@ module BikeBikeFormHelper
private
def custom_field(method, value, options, type)
options[:_controller] = params[:controller]
if defined? params
options[:_controller] = params[:controller]
end
options[:_record] = object
options = BikeBikeFormHelper.get_options(method, options, type)
html = BikeBikeFormHelper.send(type + '_tag', method, value, options, self)

2
app/views/layouts/fields/_errors_default.html.haml

@ -1,5 +1,5 @@
- # we should render errors here
- if @record.errors.any?
- if @record && @record.errors.any?
.form-errors
%ul
- @record.errors.full_messages.each do |msg|

6
app/views/users/_form.html.haml

@ -1,10 +1,10 @@
= form_for @user, :html => (@user.id ? {:multipart => true} : {}) do |f|
= form_for @user, :html => (@user && @user.id ? {:multipart => true} : {}) do |f|
%div{:class => (@user.id ? 'columns medium-6' : '')}
= f.text_field :username
= f.email_field :email
- if !@user.id
= f.password_field, :password
= f.password_field, :password_confirmation
= f.password_field :password
= f.password_field :password_confirmation
= f.actions :register
- if @user.id
.columns.medium-6

1
config/initializers/drupal_hash.rb

@ -109,7 +109,6 @@ module Sorcery
end
end
puts "\nHASH:\t#{output}\n"
return output
end
end

2929
config/locales/translation-info.yml

File diff suppressed because it is too large

564
db/schema.rb

@ -1,282 +1,282 @@
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20140315183241) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
create_table "authentications", force: true do |t|
t.integer "user_id", null: false
t.string "provider", null: false
t.string "uid", null: false
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "conference_admins", force: true do |t|
t.integer "conference_id"
t.integer "user_id"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "conference_host_organizations", force: true do |t|
t.integer "conference_id"
t.integer "organization_id"
t.integer "order"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "conference_registration_form_fields", force: true do |t|
t.integer "conference_id"
t.integer "registration_form_field_id"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "position"
end
create_table "conference_registration_responses", force: true do |t|
t.integer "conference_registration_id"
t.integer "registration_form_field_id"
t.text "data"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "conference_registrations", force: true do |t|
t.integer "conference_id"
t.integer "user_id"
t.string "is_attending"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "conference_types", force: true do |t|
t.string "title"
t.string "info"
t.datetime "created_at"
t.datetime "updated_at"
t.string "slug"
end
create_table "conferences", force: true do |t|
t.string "title"
t.string "slug"
t.datetime "start_date"
t.datetime "end_date"
t.text "info"
t.string "poster"
t.string "cover"
t.boolean "workshop_schedule_published"
t.boolean "registration_open"
t.boolean "meals_provided"
t.text "meal_info"
t.text "travel_info"
t.integer "conference_type_id"
t.datetime "created_at"
t.datetime "updated_at"
t.text "preregistration_info"
t.text "registration_info"
t.text "postregistration_info"
end
create_table "event_types", force: true do |t|
t.string "slug"
t.text "info"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "events", force: true do |t|
t.string "title"
t.string "slug"
t.integer "event_type_id"
t.integer "conference_id"
t.text "info"
t.integer "location_id"
t.datetime "start_time"
t.datetime "end_time"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "locations", force: true do |t|
t.string "title"
t.float "latitude"
t.float "longitude"
t.datetime "created_at"
t.datetime "updated_at"
t.string "country"
t.string "territory"
t.string "city"
t.string "street"
t.string "postal_code"
end
add_index "locations", ["latitude", "longitude"], name: "index_locations_on_latitude_and_longitude", using: :btree
create_table "locations_organizations", id: false, force: true do |t|
t.integer "organization_id"
t.integer "location_id"
end
add_index "locations_organizations", ["organization_id", "location_id"], name: "loc_org_index", using: :btree
create_table "organization_statuses", force: true do |t|
t.string "name"
t.string "slug"
t.string "info"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "organizations", force: true do |t|
t.string "name"
t.string "slug"
t.string "email_address"
t.string "url"
t.integer "year_founded"
t.text "info"
t.string "logo"
t.string "avatar"
t.boolean "requires_approval"
t.string "secret_question"
t.string "secret_answer"
t.integer "user_organization_replationship_id"
t.datetime "created_at"
t.datetime "updated_at"
t.string "cover"
end
create_table "registration_form_fields", force: true do |t|
t.string "title"
t.text "help"
t.boolean "required"
t.string "field_type"
t.string "options"
t.boolean "is_retired"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "translations", force: true do |t|
t.string "locale"
t.string "key"
t.text "value"
t.text "interpolations"
t.boolean "is_proc", default: false
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "user_organization_relationships", force: true do |t|
t.integer "user_id", null: false
t.integer "organization_id", null: false
t.string "relationship"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "users", force: true do |t|
t.string "username", null: false
t.string "email"
t.string "crypted_password"
t.string "salt"
t.datetime "created_at"
t.datetime "updated_at"
t.string "remember_me_token"
t.datetime "remember_me_token_expires_at"
t.string "reset_password_token"
t.datetime "reset_password_token_expires_at"
t.datetime "reset_password_email_sent_at"
t.string "activation_state"
t.string "activation_token"
t.datetime "activation_token_expires_at"
t.integer "failed_logins_count", default: 0
t.datetime "lock_expires_at"
t.string "unlock_token"
t.string "avatar"
end
add_index "users", ["activation_token"], name: "index_users_on_activation_token", using: :btree
add_index "users", ["remember_me_token"], name: "index_users_on_remember_me_token", using: :btree
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", using: :btree
create_table "versions", force: true do |t|
t.string "item_type"
t.integer "item_id"
t.string "event"
t.string "whodunnit"
t.text "object"
t.datetime "created_at"
t.text "value"
end
create_table "workshop_facilitators", force: true do |t|
t.integer "user_id"
t.integer "workshop_id"
t.string "role"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "workshop_presentation_styles", force: true do |t|
t.string "name"
t.string "slug"
t.string "info"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "workshop_requested_resources", force: true do |t|
t.integer "workshop_id"
t.integer "workshop_resource_id"
t.string "status"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "workshop_resources", force: true do |t|
t.string "name"
t.string "slug"
t.string "info"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "workshop_streams", force: true do |t|
t.string "name"
t.string "slug"
t.string "info"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "workshops", force: true do |t|
t.string "title"
t.string "slug"
t.text "info"
t.integer "conference_id"
t.integer "workshop_stream_id"
t.integer "workshop_presentation_style"
t.integer "min_facilitators"
t.integer "location_id"
t.datetime "start_time"
t.datetime "end_time"
t.datetime "created_at"
t.datetime "updated_at"
end
end
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20140315183241) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
create_table "authentications", force: true do |t|
t.integer "user_id", null: false
t.string "provider", null: false
t.string "uid", null: false
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "conference_admins", force: true do |t|
t.integer "conference_id"
t.integer "user_id"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "conference_host_organizations", force: true do |t|
t.integer "conference_id"
t.integer "organization_id"
t.integer "order"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "conference_registration_form_fields", force: true do |t|
t.integer "conference_id"
t.integer "registration_form_field_id"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "position"
end
create_table "conference_registration_responses", force: true do |t|
t.integer "conference_registration_id"
t.integer "registration_form_field_id"
t.text "data"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "conference_registrations", force: true do |t|
t.integer "conference_id"
t.integer "user_id"
t.string "is_attending"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "conference_types", force: true do |t|
t.string "title"
t.string "info"
t.datetime "created_at"
t.datetime "updated_at"
t.string "slug"
end
create_table "conferences", force: true do |t|
t.string "title"
t.string "slug"
t.datetime "start_date"
t.datetime "end_date"
t.text "info"
t.string "poster"
t.string "cover"
t.boolean "workshop_schedule_published"
t.boolean "registration_open"
t.boolean "meals_provided"
t.text "meal_info"
t.text "travel_info"
t.integer "conference_type_id"
t.datetime "created_at"
t.datetime "updated_at"
t.text "preregistration_info"
t.text "registration_info"
t.text "postregistration_info"
end
create_table "event_types", force: true do |t|
t.string "slug"
t.text "info"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "events", force: true do |t|
t.string "title"
t.string "slug"
t.integer "event_type_id"
t.integer "conference_id"
t.text "info"
t.integer "location_id"
t.datetime "start_time"
t.datetime "end_time"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "locations", force: true do |t|
t.string "title"
t.float "latitude"
t.float "longitude"
t.datetime "created_at"
t.datetime "updated_at"
t.string "country"
t.string "territory"
t.string "city"
t.string "street"
t.string "postal_code"
end
add_index "locations", ["latitude", "longitude"], name: "index_locations_on_latitude_and_longitude", using: :btree
create_table "locations_organizations", id: false, force: true do |t|
t.integer "organization_id"
t.integer "location_id"
end
add_index "locations_organizations", ["organization_id", "location_id"], name: "loc_org_index", using: :btree
create_table "organization_statuses", force: true do |t|
t.string "name"
t.string "slug"
t.string "info"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "organizations", force: true do |t|
t.string "name"
t.string "slug"
t.string "email_address"
t.string "url"
t.integer "year_founded"
t.text "info"
t.string "logo"
t.string "avatar"
t.boolean "requires_approval"
t.string "secret_question"
t.string "secret_answer"
t.integer "user_organization_replationship_id"
t.datetime "created_at"
t.datetime "updated_at"
t.string "cover"
end
create_table "registration_form_fields", force: true do |t|
t.string "title"
t.text "help"
t.boolean "required"
t.string "field_type"
t.string "options"
t.boolean "is_retired"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "translations", force: true do |t|
t.string "locale"
t.string "key"
t.text "value"
t.text "interpolations"
t.boolean "is_proc", default: false
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "user_organization_relationships", force: true do |t|
t.integer "user_id"
t.integer "organization_id"
t.string "relationship"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "users", force: true do |t|
t.string "username", null: false
t.string "email"
t.string "crypted_password"
t.string "salt"
t.datetime "created_at"
t.datetime "updated_at"
t.string "remember_me_token"
t.datetime "remember_me_token_expires_at"
t.string "reset_password_token"
t.datetime "reset_password_token_expires_at"
t.datetime "reset_password_email_sent_at"
t.string "activation_state"
t.string "activation_token"
t.datetime "activation_token_expires_at"
t.integer "failed_logins_count", default: 0
t.datetime "lock_expires_at"
t.string "unlock_token"
t.string "avatar"
end
add_index "users", ["activation_token"], name: "index_users_on_activation_token", using: :btree
add_index "users", ["remember_me_token"], name: "index_users_on_remember_me_token", using: :btree
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", using: :btree
create_table "versions", force: true do |t|
t.string "item_type"
t.integer "item_id"
t.string "event"
t.string "whodunnit"
t.text "object"
t.datetime "created_at"
t.string "value"
end
create_table "workshop_facilitators", force: true do |t|
t.integer "user_id"
t.integer "workshop_id"
t.string "role"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "workshop_presentation_styles", force: true do |t|
t.string "name"
t.string "slug"
t.string "info"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "workshop_requested_resources", force: true do |t|
t.integer "workshop_id"
t.integer "workshop_resource_id"
t.string "status"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "workshop_resources", force: true do |t|
t.string "name"
t.string "slug"
t.string "info"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "workshop_streams", force: true do |t|
t.string "name"
t.string "slug"
t.string "info"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "workshops", force: true do |t|
t.string "title"
t.string "slug"
t.text "info"
t.integer "conference_id"
t.integer "workshop_stream_id"
t.integer "workshop_presentation_style"
t.integer "min_facilitators"
t.integer "location_id"
t.datetime "start_time"
t.datetime "end_time"
t.datetime "created_at"
t.datetime "updated_at"
end
end

4
spec/features/pages/login_spec.rb

@ -31,7 +31,7 @@ describe 'Login' do
visit login_path
form = find 'form[action$="/user_sessions"]'
expect(form).to have_button 'Sign In'
expect(form).to have_field 'email_'
expect(form).to have_field 'email'
expect(form).to have_field 'password'
expect(form).to have_link 'facebook'
end
@ -62,7 +62,7 @@ describe 'Login' do
it "allows you to login" do
visit login_path
form = find 'form[action$="/user_sessions"]'
form.find("#email_").set(user.email)
form.find("#email").set(user.email)
form.find("#password").set('secret')
click_button "Sign_In"
end

2
spec/features/pages/organization_registration_spec.rb

@ -7,7 +7,7 @@ describe 'Organization Registration' do
before(:each) do
visit login_path
form = find 'form[action$="/user_sessions"]'
form.find("#email_").set(user.email)
form.find("#email").set(user.email)
form.find("#password").set('secret')
click_button "Sign_In"
visit new_organization_path

7
spec/support/delorean.rb

@ -1,7 +0,0 @@
RSpec.configure do |config|
config.include Delorean
config.before(:each) do
back_to_the_present
end
end

8
spec/support/postgresql.rb

@ -1,15 +1,15 @@
RSpec.configure do |config|
config.before(:suite) do
DatabaseCleaner.strategy = :transaction
DatabaseCleaner.clean_with(:truncation)
#DatabaseCleaner.strategy = :transaction
#DatabaseCleaner.clean_with(:truncation)
end
config.before(:each) do
DatabaseCleaner.start
#DatabaseCleaner.start
end
config.after(:each) do
DatabaseCleaner.clean
#DatabaseCleaner.clean
end
end

Loading…
Cancel
Save