├── public
├── favicon.ico
├── robots.txt
├── 500.html
├── 422.html
└── 404.html
├── app
├── views
│ ├── conferences
│ │ ├── show.html.erb
│ │ ├── new.html.erb
│ │ └── index.html.erb
│ ├── calls
│ │ └── new.html.erb
│ └── layouts
│ │ └── application.html.erb
├── helpers
│ └── application_helper.rb
├── models
│ ├── call.rb
│ ├── conference.rb
│ └── user.rb
├── controllers
│ ├── sessions_controller.rb
│ ├── application_controller.rb
│ ├── calls_controller.rb
│ └── conferences_controller.rb
└── assets
│ ├── javascripts
│ └── application.js
│ └── stylesheets
│ └── application.css
├── .gitignore
├── config
├── database.yml.travis
├── initializers
│ ├── cookies_serializer.rb
│ ├── session_store.rb
│ ├── mime_types.rb
│ ├── filter_parameter_logging.rb
│ ├── omniauth.rb
│ ├── assets.rb
│ ├── backtrace_silencers.rb
│ ├── wrap_parameters.rb
│ └── inflections.rb
├── environment.rb
├── boot.rb
├── routes.rb
├── locales
│ └── en.yml
├── secrets.yml
├── application.rb
├── environments
│ ├── development.rb
│ ├── test.rb
│ └── production.rb
└── database.yml
├── bin
├── bundle
├── rake
├── rails
└── spring
├── spec
├── factories
│ ├── users.rb
│ ├── calls.rb
│ └── conferences.rb
├── models
│ ├── call_spec.rb
│ ├── conference_spec.rb
│ └── user_spec.rb
├── support
│ └── database_cleaner.rb
├── controllers
│ ├── calls_controller_spec.rb
│ ├── conferences_controller_spec.rb
│ └── sessions_controller_spec.rb
├── spec_helper.rb
└── rails_helper.rb
├── .travis.yml
├── config.ru
├── db
├── migrate
│ ├── 20140807005226_create_calls.rb
│ ├── 20140821135118_create_users.rb
│ └── 20140807005126_create_conferences.rb
├── seeds.rb
└── schema.rb
├── README.md
├── Rakefile
├── Gemfile
├── CRITERIA.md
└── Gemfile.lock
/public/favicon.ico:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/views/conferences/show.html.erb:
--------------------------------------------------------------------------------
1 | conference show
--------------------------------------------------------------------------------
/app/helpers/application_helper.rb:
--------------------------------------------------------------------------------
1 | module ApplicationHelper
2 | end
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /.bundle
2 | /db/*.sqlite3
3 | /db/*.sqlite3-journal
4 | /log/*.log
5 | /tmp
6 | .rspec
7 | .env
8 |
--------------------------------------------------------------------------------
/config/database.yml.travis:
--------------------------------------------------------------------------------
1 | test:
2 | adapter: postgresql
3 | database: travis_ci_test
4 | username: postgres
5 |
--------------------------------------------------------------------------------
/app/models/call.rb:
--------------------------------------------------------------------------------
1 | class Call < ActiveRecord::Base
2 | belongs_to :conference
3 | validates_presence_of :conference
4 | end
5 |
--------------------------------------------------------------------------------
/bin/bundle:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3 | load Gem.bin_path('bundler', 'bundle')
4 |
--------------------------------------------------------------------------------
/spec/factories/users.rb:
--------------------------------------------------------------------------------
1 | FactoryGirl.define do
2 | factory :user do
3 | name "Tracy"
4 | uid "123789"
5 | provider "twitter"
6 | end
7 | end
8 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: ruby
2 | rvm:
3 | - 2.1.2
4 | before_script:
5 | - cp config/database.yml.travis config/database.yml
6 | - bin/rake db:create db:migrate
7 |
--------------------------------------------------------------------------------
/config/initializers/cookies_serializer.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | Rails.application.config.action_dispatch.cookies_serializer = :json
--------------------------------------------------------------------------------
/config.ru:
--------------------------------------------------------------------------------
1 | # This file is used by Rack-based servers to start the application.
2 |
3 | require ::File.expand_path('../config/environment', __FILE__)
4 | run Rails.application
5 |
--------------------------------------------------------------------------------
/config/environment.rb:
--------------------------------------------------------------------------------
1 | # Load the Rails application.
2 | require File.expand_path('../application', __FILE__)
3 |
4 | # Initialize the Rails application.
5 | Rails.application.initialize!
6 |
--------------------------------------------------------------------------------
/config/boot.rb:
--------------------------------------------------------------------------------
1 | # Set up gems listed in the Gemfile.
2 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3 |
4 | require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5 |
--------------------------------------------------------------------------------
/config/initializers/session_store.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | Rails.application.config.session_store :cookie_store, key: '_callback-women-rails_session'
4 |
--------------------------------------------------------------------------------
/spec/factories/calls.rb:
--------------------------------------------------------------------------------
1 | FactoryGirl.define do
2 | factory :call do
3 | due_date "2015/07/04"
4 | association :conference, factory: :conference
5 | end
6 | end
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/bin/rake:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | begin
3 | load File.expand_path("../spring", __FILE__)
4 | rescue LoadError
5 | end
6 | require_relative '../config/boot'
7 | require 'rake'
8 | Rake.application.run
9 |
--------------------------------------------------------------------------------
/config/initializers/mime_types.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new mime types for use in respond_to blocks:
4 | # Mime::Type.register "text/richtext", :rtf
5 |
--------------------------------------------------------------------------------
/app/views/calls/new.html.erb:
--------------------------------------------------------------------------------
1 | <%= form_for [:conference, @call] do |f| %>
2 | <%= f.label :due_date %>:
3 | <%= f.datetime_local_field :due_date, type: "date" %>
4 |
5 | <%= f.submit %>
6 | <% end %>
7 |
--------------------------------------------------------------------------------
/spec/factories/conferences.rb:
--------------------------------------------------------------------------------
1 | FactoryGirl.define do
2 | factory :conference do
3 | name "GoGaGaGaGa: The Spoon Conf"
4 | location "Seattle, WA"
5 | code_of_conduct true
6 | childcare true
7 | end
8 | end
9 |
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
2 | #
3 | # To ban all spiders from the entire site uncomment the next two lines:
4 | # User-agent: *
5 | # Disallow: /
6 |
--------------------------------------------------------------------------------
/app/models/conference.rb:
--------------------------------------------------------------------------------
1 | class Conference < ActiveRecord::Base
2 | has_many :calls
3 |
4 | validates_presence_of :name, :location
5 |
6 | def current_call
7 | self.calls.present? ? self.calls.first.due_date : false
8 | end
9 | end
10 |
--------------------------------------------------------------------------------
/config/initializers/filter_parameter_logging.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Configure sensitive parameters which will be filtered from the log file.
4 | Rails.application.config.filter_parameters += [:password]
5 |
--------------------------------------------------------------------------------
/bin/rails:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | begin
3 | load File.expand_path("../spring", __FILE__)
4 | rescue LoadError
5 | end
6 | APP_PATH = File.expand_path('../../config/application', __FILE__)
7 | require_relative '../config/boot'
8 | require 'rails/commands'
9 |
--------------------------------------------------------------------------------
/config/initializers/omniauth.rb:
--------------------------------------------------------------------------------
1 | Rails.application.config.middleware.use OmniAuth::Builder do
2 | # To configure further, review:
3 | # https://github.com/arunagw/omniauth-twitter#authentication-options
4 | provider :twitter, ENV["API_KEY"], ENV["API_SECRET"]
5 | end
--------------------------------------------------------------------------------
/db/migrate/20140807005226_create_calls.rb:
--------------------------------------------------------------------------------
1 | class CreateCalls < ActiveRecord::Migration
2 | def change
3 | create_table :calls do |t|
4 | t.datetime :due_date
5 | t.references :conference
6 |
7 | t.timestamps
8 | end
9 | end
10 | end
11 |
--------------------------------------------------------------------------------
/db/migrate/20140821135118_create_users.rb:
--------------------------------------------------------------------------------
1 | class CreateUsers < ActiveRecord::Migration
2 | def change
3 | create_table :users do |t|
4 | t.string :provider
5 | t.string :uid
6 | t.string :name
7 |
8 | t.timestamps
9 | end
10 | end
11 | end
12 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | CallbackWomen's mission: increasing & promoting gender diversity at coder confs, inspiring women to speak, building information networks, and highlighting resources that support them.
2 |
3 | Twitter: @callbackwomen
4 | Website: http://callbackwomen.com
5 |
6 | ====================
7 |
--------------------------------------------------------------------------------
/Rakefile:
--------------------------------------------------------------------------------
1 | # Add your own tasks in files placed in lib/tasks ending in .rake,
2 | # for example lib/tasks/capistrano.rake, and they will automatically be
3 | # available to Rake.
4 |
5 | require File.expand_path('../config/application', __FILE__)
6 |
7 | Rails.application.load_tasks
8 |
9 | desc "Run the specs!"
10 | task :default do
11 | exec "rspec"
12 | end
13 |
--------------------------------------------------------------------------------
/db/seeds.rb:
--------------------------------------------------------------------------------
1 | # This file should contain all the record creation needed to seed the database with its default values.
2 | # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3 | #
4 | # Examples:
5 | #
6 | # cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
7 | # Mayor.create(name: 'Emanuel', city: cities.first)
8 |
--------------------------------------------------------------------------------
/spec/models/call_spec.rb:
--------------------------------------------------------------------------------
1 | require 'rails_helper'
2 |
3 | describe Call do
4 | let(:conference) { FactoryGirl.create :conference }
5 | let(:call) { FactoryGirl.create :call }
6 |
7 | it "has a due date" do
8 | expect(call.due_date.month).to eq 7
9 | end
10 |
11 | it { should belong_to :conference }
12 | it { should validate_presence_of :conference }
13 | end
14 |
--------------------------------------------------------------------------------
/config/routes.rb:
--------------------------------------------------------------------------------
1 | Rails.application.routes.draw do
2 | resources :conferences, only: [:index, :show, :new, :create] do
3 | resources :calls, only: [:new, :create]
4 | end
5 |
6 | root to: "conferences#index"
7 |
8 | get 'auth/twitter/callback', to: "sessions#create"
9 | get 'auth/failure', to: redirect('/')
10 | get 'signout', to: 'sessions#destroy', as: 'signout'
11 | end
12 |
--------------------------------------------------------------------------------
/app/controllers/sessions_controller.rb:
--------------------------------------------------------------------------------
1 | class SessionsController < ApplicationController
2 | def create
3 | user = User.find_or_create_using_omniauth request.env["omniauth.auth"]
4 | session[:user_id] = user.id
5 | redirect_to root_url, notice: "Signed in."
6 | end
7 |
8 | def destroy
9 | session[:user_id] = nil
10 | redirect_to root_url, notice: "Signed out!"
11 | end
12 | end
--------------------------------------------------------------------------------
/app/controllers/application_controller.rb:
--------------------------------------------------------------------------------
1 | class ApplicationController < ActionController::Base
2 | # Prevent CSRF attacks by raising an exception.
3 | # For APIs, you may want to use :null_session instead.
4 | protect_from_forgery with: :exception
5 |
6 | def current_user
7 | @current_user ||= User.find(session[:user_id]) if session[:user_id]
8 | end
9 |
10 | helper_method :current_user
11 | end
12 |
--------------------------------------------------------------------------------
/config/initializers/assets.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Version of your assets, change this if you want to expire all your assets.
4 | Rails.application.config.assets.version = '1.0'
5 |
6 | # Precompile additional assets.
7 | # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
8 | # Rails.application.config.assets.precompile += %w( search.js )
9 |
--------------------------------------------------------------------------------
/db/migrate/20140807005126_create_conferences.rb:
--------------------------------------------------------------------------------
1 | class CreateConferences < ActiveRecord::Migration
2 | def change
3 | create_table :conferences do |t|
4 | t.string :name
5 | t.string :location
6 | t.boolean :code_of_conduct, default: false
7 | t.boolean :childcare, default: false
8 | t.integer :last_years_attendance, default: 0
9 |
10 | t.timestamps
11 | end
12 | end
13 | end
14 |
--------------------------------------------------------------------------------
/config/initializers/backtrace_silencers.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5 |
6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7 | # Rails.backtrace_cleaner.remove_silencers!
8 |
--------------------------------------------------------------------------------
/app/controllers/calls_controller.rb:
--------------------------------------------------------------------------------
1 | class CallsController < ApplicationController
2 | def new
3 | @call = Call.new conference: Conference.find(params[:conference_id])
4 | end
5 |
6 | def create
7 | @call = Call.new conference_id: params[:conference_id],
8 | due_date: params[:call][:due_date]
9 |
10 | if @call.save
11 | redirect_to @call.conference, notice: 'Call for Papers was successfully created.'
12 | else
13 | render :new
14 | end
15 | end
16 | end
17 |
--------------------------------------------------------------------------------
/app/views/conferences/new.html.erb:
--------------------------------------------------------------------------------
1 | <%= form_for @conference do |f| %>
2 | <%= f.label :name %>:
3 | <%= f.text_field :name %>
4 |
5 | <%= f.label :location %>:
6 | <%= f.text_field :location %>
7 |
8 | <%= f.label :code_of_conduct %>:
9 | <%= f.check_box :code_of_conduct %>
10 |
11 | <%= f.label :childcare %>:
12 | <%= f.check_box :childcare %>
13 |
14 | <%= f.label :last_years_attendance %>:
15 | <%= f.number_field :last_years_attendance %>
16 |
17 | <%= f.submit %>
18 | <% end %>
19 |
--------------------------------------------------------------------------------
/bin/spring:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 |
3 | # This file loads spring without using Bundler, in order to be fast
4 | # It gets overwritten when you run the `spring binstub` command
5 |
6 | unless defined?(Spring)
7 | require "rubygems"
8 | require "bundler"
9 |
10 | if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ spring \((.*?)\)$.*?^$/m)
11 | ENV["GEM_PATH"] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR)
12 | ENV["GEM_HOME"] = ""
13 | Gem.paths = ENV
14 |
15 | gem "spring", match[1]
16 | require "spring/binstub"
17 | end
18 | end
19 |
--------------------------------------------------------------------------------
/config/initializers/wrap_parameters.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # This file contains settings for ActionController::ParamsWrapper which
4 | # is enabled by default.
5 |
6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7 | ActiveSupport.on_load(:action_controller) do
8 | wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9 | end
10 |
11 | # To enable root element in JSON for ActiveRecord objects.
12 | # ActiveSupport.on_load(:active_record) do
13 | # self.include_root_in_json = true
14 | # end
15 |
--------------------------------------------------------------------------------
/spec/support/database_cleaner.rb:
--------------------------------------------------------------------------------
1 | # Code from:
2 | # http://devblog.avdi.org/2012/08/31/configuring-database_cleaner-with-rails-rspec-capybara-and-selenium/
3 | RSpec.configure do |config|
4 | config.before(:suite) do
5 | DatabaseCleaner.clean_with(:truncation)
6 | end
7 |
8 | config.before(:each) do
9 | DatabaseCleaner.strategy = :transaction
10 | end
11 |
12 | config.before(:each, :js => true) do
13 | DatabaseCleaner.strategy = :truncation
14 | end
15 |
16 | config.before(:each) do
17 | DatabaseCleaner.start
18 | end
19 |
20 | config.after(:each) do
21 | DatabaseCleaner.clean
22 | end
23 | end
24 |
--------------------------------------------------------------------------------
/app/models/user.rb:
--------------------------------------------------------------------------------
1 | class User < ActiveRecord::Base
2 | validates_presence_of :name, :provider, :uid
3 |
4 | def self.find_or_create_using_omniauth(auth_hash)
5 | return nil unless well_formatted?(auth_hash)
6 |
7 | User.create_with(name: auth_hash[:info][:name],
8 | provider: auth_hash[:provider])
9 | .find_or_create_by uid: auth_hash[:uid]
10 | end
11 |
12 | private
13 | def self.well_formatted?(auth_hash)
14 | auth_hash.present? &&
15 | auth_hash.fetch(:info, {})[:name].present? &&
16 | auth_hash[:provider].present? &&
17 | auth_hash[:uid].present?
18 | end
19 | end
20 |
--------------------------------------------------------------------------------
/app/controllers/conferences_controller.rb:
--------------------------------------------------------------------------------
1 | class ConferencesController < ApplicationController
2 | def index
3 | @conferences = Conference.all
4 | end
5 |
6 | def new
7 | @conference = Conference.new
8 | end
9 |
10 | def create
11 | @conference = Conference.new conference_params
12 |
13 | if @conference.save
14 | redirect_to @conference, notice: 'Conference was successfully created.'
15 | else
16 | render :new
17 | end
18 | end
19 |
20 | private
21 | def conference_params
22 | params.permit %i(name location code_of_conduct childcare
23 | last_years_attendance)
24 | end
25 | end
26 |
--------------------------------------------------------------------------------
/spec/controllers/calls_controller_spec.rb:
--------------------------------------------------------------------------------
1 | require 'rails_helper'
2 |
3 | describe CallsController do
4 | let(:conference) { FactoryGirl.create :conference }
5 |
6 | context "#new" do
7 | it "renders the calls new template" do
8 | get :new, conference_id: conference.id
9 | expect(response).to render_template(:new)
10 | end
11 | end
12 |
13 | context "#create" do
14 | it "processes requests with correct params" do
15 | post :create, { conference_id: conference.id,
16 | call: { due_date: "2015-01-06" } }
17 | expect(response).to redirect_to conference_path(conference)
18 | end
19 | end
20 | end
21 |
--------------------------------------------------------------------------------
/app/views/layouts/application.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | CallbackWomenRails
5 | <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6 | <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
7 | <%= csrf_meta_tags %>
8 |
9 |
10 | <% if flash[:notice] %>
11 | <%= flash[:notice] %>
12 | <% end %>
13 |
14 | <% if current_user %>
15 | You are <%= current_user.name %>
16 | <%= link_to "Sign out", signout_path %>
17 | <% else %>
18 | <%= link_to "Sign in with Twitter", "/auth/twitter" %>
19 | <% end %>
20 |
21 | <%= yield %>
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/config/initializers/inflections.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new inflection rules using the following format. Inflections
4 | # are locale specific, and you may define rules for as many different
5 | # locales as you wish. All of these examples are active by default:
6 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
7 | # inflect.plural /^(ox)$/i, '\1en'
8 | # inflect.singular /^(ox)en/i, '\1'
9 | # inflect.irregular 'person', 'people'
10 | # inflect.uncountable %w( fish sheep )
11 | # end
12 |
13 | # These inflection rules are supported but not enabled by default:
14 | # ActiveSupport::Inflector.inflections(:en) do |inflect|
15 | # inflect.acronym 'RESTful'
16 | # end
17 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 | ruby '2.1.2'
3 |
4 | gem 'rails', '4.1.4'
5 | gem 'pg'
6 | gem 'sass-rails', '~> 4.0.3'
7 | gem 'uglifier', '>= 1.3.0'
8 | gem 'coffee-rails', '~> 4.0.0'
9 |
10 | gem 'jquery-rails'
11 | gem 'turbolinks'
12 | gem 'jbuilder', '~> 2.0'
13 |
14 | gem 'omniauth', '~> 1.2.2'
15 | gem 'omniauth-twitter', '~> 1.0.1'
16 |
17 | gem 'sdoc', '~> 0.4.0', group: :doc
18 |
19 | gem 'spring', group: :development
20 |
21 | group :test do
22 | gem 'rspec-rails', '~> 3.0.2'
23 | gem 'shoulda-matchers', '~> 2.6.2'
24 | gem 'factory_girl_rails', '~> 4.4.1'
25 | gem 'database_cleaner', '~> 1.3.0'
26 | end
27 |
28 | group :test, :development do
29 | gem 'dotenv-rails'
30 | gem 'pry'
31 | end
32 |
--------------------------------------------------------------------------------
/config/locales/en.yml:
--------------------------------------------------------------------------------
1 | # Files in the config/locales directory are used for internationalization
2 | # and are automatically loaded by Rails. If you want to use locales other
3 | # than English, add the necessary files in this directory.
4 | #
5 | # To use the locales, use `I18n.t`:
6 | #
7 | # I18n.t 'hello'
8 | #
9 | # In views, this is aliased to just `t`:
10 | #
11 | # <%= t('hello') %>
12 | #
13 | # To use a different locale, set it with `I18n.locale`:
14 | #
15 | # I18n.locale = :es
16 | #
17 | # This would use the information in config/locales/es.yml.
18 | #
19 | # To learn more, please read the Rails Internationalization guide
20 | # available at http://guides.rubyonrails.org/i18n.html.
21 |
22 | en:
23 | hello: "Hello world"
24 |
--------------------------------------------------------------------------------
/app/assets/javascripts/application.js:
--------------------------------------------------------------------------------
1 | // This is a manifest file that'll be compiled into application.js, which will include all the files
2 | // listed below.
3 | //
4 | // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5 | // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6 | //
7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8 | // compiled file.
9 | //
10 | // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11 | // about supported directives.
12 | //
13 | //= require jquery
14 | //= require jquery_ujs
15 | //= require turbolinks
16 | //= require_tree .
17 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/application.css:
--------------------------------------------------------------------------------
1 | /*
2 | * This is a manifest file that'll be compiled into application.css, which will include all the files
3 | * listed below.
4 | *
5 | * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6 | * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7 | *
8 | * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9 | * compiled file so the styles you add here take precedence over styles defined in any styles
10 | * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11 | * file per style scope.
12 | *
13 | *= require_tree .
14 | *= require_self
15 | */
16 |
--------------------------------------------------------------------------------
/app/views/conferences/index.html.erb:
--------------------------------------------------------------------------------
1 |
2 |
3 | | Name |
4 | Location |
5 | Code of Conduct |
6 | Childcare |
7 | Call for Proposal |
8 |
9 | <% @conferences.each do |conference| %>
10 |
11 | |
12 | <%= conference.name %>
13 | |
14 |
15 | <%= conference.location %>
16 | |
17 |
18 | <%= conference.code_of_conduct %>
19 | |
20 |
21 | <%= conference.childcare %>
22 | |
23 |
24 | <% if conference.current_call %>
25 | conference.current_call
26 | <% else %>
27 | <%= link_to "Add CfP", new_conference_call_path(conference) %>
28 | <% end %>
29 | |
30 |
31 | <% end %>
32 |
33 |
34 | <%= link_to "Create a new conference", new_conference_path %>
35 |
--------------------------------------------------------------------------------
/spec/spec_helper.rb:
--------------------------------------------------------------------------------
1 | require "factory_girl"
2 | require 'database_cleaner'
3 | require 'omniauth'
4 |
5 | RSpec.configure do |config|
6 | config.filter_run :focus
7 | config.run_all_when_everything_filtered = true
8 |
9 | if config.files_to_run.one?
10 | config.default_formatter = 'doc'
11 | end
12 |
13 | config.profile_examples = 10
14 |
15 | config.order = :random
16 |
17 | Kernel.srand config.seed
18 |
19 | config.expect_with :rspec do |expectations|
20 | expectations.syntax = :expect
21 | end
22 |
23 | config.mock_with :rspec do |mocks|
24 | mocks.syntax = :expect
25 |
26 | mocks.verify_partial_doubles = true
27 | end
28 |
29 | config.include FactoryGirl::Syntax::Methods
30 |
31 | OmniAuth.config.test_mode = true
32 |
33 | omniauth_hash = { 'provider' => 'twitter',
34 | 'uid' => '12345',
35 | 'info' => { 'name' => 'natasha' }
36 | }
37 |
38 | OmniAuth.config.mock_auth[:twitter] = OmniAuth::AuthHash.new(omniauth_hash)
39 | end
40 |
--------------------------------------------------------------------------------
/config/secrets.yml:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Your secret key is used for verifying the integrity of signed cookies.
4 | # If you change this key, all old signed cookies will become invalid!
5 |
6 | # Make sure the secret is at least 30 characters and all random,
7 | # no regular words or you'll be exposed to dictionary attacks.
8 | # You can use `rake secret` to generate a secure secret key.
9 |
10 | # Make sure the secrets in this file are kept private
11 | # if you're sharing your code publicly.
12 |
13 | development:
14 | secret_key_base: 680d66f02d258eb5165b40275eef6ec53067d0bbcf1dbff4071d6cd476ec9acf17d878b9f8de5304a28221d046365fc35c9212ee080f1a27efe9ec279c58d090
15 |
16 | test:
17 | secret_key_base: eb3c5a8a749a0444a3f65fee1f1a72091d21b6c8603646ed032aa64540ca83c00299ff98d6c5ca73b9cab78206d55aa99fb3c2c637cf244b9b0675ba6c58dd84
18 |
19 | # Do not keep production secrets in the repository,
20 | # instead read values from the environment.
21 | production:
22 | secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
23 |
--------------------------------------------------------------------------------
/spec/controllers/conferences_controller_spec.rb:
--------------------------------------------------------------------------------
1 | require 'rails_helper'
2 |
3 | describe ConferencesController do
4 | let!(:conference) { FactoryGirl.create :conference }
5 |
6 | context "#index" do
7 | it "renders the conferences index" do
8 | get :index
9 | expect(response).to render_template(:index)
10 | end
11 |
12 | it "returns conferences" do
13 | get :index
14 | expect(assigns(:conferences)).to include(Conference.first)
15 | end
16 | end
17 |
18 | context "#new" do
19 | it "shows the form for a new conference" do
20 | get :new
21 | expect(response).to render_template(:new)
22 | end
23 | end
24 |
25 | context "#create" do
26 | it "processes requests with correct params" do
27 | post :create, name: "Foo Conf",
28 | location: "UK",
29 | code_of_conduct: true,
30 | childcare: false,
31 | last_years_attendance: 97
32 | expect(response.status).to eq 302 # Redirect
33 | end
34 | end
35 | end
36 |
--------------------------------------------------------------------------------
/CRITERIA.md:
--------------------------------------------------------------------------------
1 | CallbackWomen's scope in intentionally limited to:
2 |
3 | 1. **Conferences**
4 | (Not hackathons, meetups, networking groups, etc.)
5 |
6 |
7 | 2. **Of professonial coders speaking to professional coders about topics relevant to professional programming**
8 | (Not academia conferences, founders conferences, conferences for tech executives, etc.
9 | _Yes_ to conferences that meet this criteria yet also cultivate/welcome participation of coders who aren't _yet_ professionals. For example, people who are aspiring, studying, or apprenticing.)
10 |
11 | 3. **In-person**
12 | (Not an online conference.)
13 |
14 | 4. **Which fill at least some of the speaking slots via public, open, competitive, CFP process**
15 | (The majority of unconferences don't meet this criteria.)
16 |
17 | 5. **Of selecting content of substantial length**
18 | (Not when the only competitive slots are for lightning talks, ignite talks, etc. Whereas giving tutorials/trainings/workshops definitely are content of substantial length.)
19 |
20 | 6. **And the conference publicly schedules & announces those speakers weeks or months ahead of time.**
21 |
22 |
23 | NOTE: **The individual _CFP_ must meet these criteria.**
24 |
25 |
26 |
--------------------------------------------------------------------------------
/config/application.rb:
--------------------------------------------------------------------------------
1 | require File.expand_path('../boot', __FILE__)
2 |
3 | # Pick the frameworks you want:
4 | require "active_model/railtie"
5 | require "active_record/railtie"
6 | require "action_controller/railtie"
7 | require "action_mailer/railtie"
8 | require "action_view/railtie"
9 | require "sprockets/railtie"
10 | # require "rails/test_unit/railtie"
11 |
12 | # Require the gems listed in Gemfile, including any gems
13 | # you've limited to :test, :development, or :production.
14 | Bundler.require(*Rails.groups)
15 |
16 | module CallbackWomenRails
17 | class Application < Rails::Application
18 | # Settings in config/environments/* take precedence over those specified here.
19 | # Application configuration should go into files in config/initializers
20 | # -- all .rb files in that directory are automatically loaded.
21 |
22 | # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
23 | # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
24 | # config.time_zone = 'Central Time (US & Canada)'
25 |
26 | # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
27 | # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
28 | # config.i18n.default_locale = :de
29 | end
30 | end
31 |
--------------------------------------------------------------------------------
/config/environments/development.rb:
--------------------------------------------------------------------------------
1 | Rails.application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb.
3 |
4 | # In the development environment your application's code is reloaded on
5 | # every request. This slows down response time but is perfect for development
6 | # since you don't have to restart the web server when you make code changes.
7 | config.cache_classes = false
8 |
9 | # Do not eager load code on boot.
10 | config.eager_load = false
11 |
12 | # Show full error reports and disable caching.
13 | config.consider_all_requests_local = true
14 | config.action_controller.perform_caching = false
15 |
16 | # Don't care if the mailer can't send.
17 | config.action_mailer.raise_delivery_errors = false
18 |
19 | # Print deprecation notices to the Rails logger.
20 | config.active_support.deprecation = :log
21 |
22 | # Raise an error on page load if there are pending migrations.
23 | config.active_record.migration_error = :page_load
24 |
25 | # Debug mode disables concatenation and preprocessing of assets.
26 | # This option may cause significant delays in view rendering with a large
27 | # number of complex assets.
28 | config.assets.debug = true
29 |
30 | # Adds additional error checking when serving assets at runtime.
31 | # Checks for improperly declared sprockets dependencies.
32 | # Raises helpful error messages.
33 | config.assets.raise_runtime_errors = true
34 |
35 | # Raises error for missing translations
36 | # config.action_view.raise_on_missing_translations = true
37 | end
38 |
--------------------------------------------------------------------------------
/spec/models/conference_spec.rb:
--------------------------------------------------------------------------------
1 | require 'rails_helper'
2 |
3 | describe Conference do
4 | let(:conference) { FactoryGirl.create :conference }
5 | let(:other_conference) { FactoryGirl.create :conference,
6 | name: "TrololololConf",
7 | location: "Oakland, CA" }
8 | let!(:cfp) { FactoryGirl.create :call, conference: conference }
9 |
10 | context "current call for proposals" do
11 | it "has a current call for proposals for conferences with cfps" do
12 | expect(conference.current_call).to eq cfp.due_date
13 | end
14 |
15 | it "indicates there is no cfp yet for conferences without calls" do
16 | expect(other_conference.current_call).to eq false
17 | end
18 | end
19 |
20 | it "has a name" do
21 | expect(conference.name).to eq "GoGaGaGaGa: The Spoon Conf"
22 | end
23 | it { should validate_presence_of :name }
24 |
25 | it "has a location" do
26 | expect(conference.location).to eq "Seattle, WA"
27 | end
28 | it { should validate_presence_of :location }
29 |
30 | it "may have a code of conduct" do
31 | # TODO write a case for default
32 | expect(conference.code_of_conduct?).to be true
33 | end
34 |
35 | it "may have childcare" do
36 | # TODO write a case for default
37 | expect(conference.childcare?).to be true
38 | end
39 |
40 | it "may have last year's attendance" do
41 | # TODO write a case for non-default
42 | expect(conference.last_years_attendance).to eq 0
43 | end
44 |
45 | it "has many topics"
46 | it "has many talk lengths"
47 | end
--------------------------------------------------------------------------------
/spec/models/user_spec.rb:
--------------------------------------------------------------------------------
1 | require 'rails_helper'
2 |
3 | describe User do
4 | it { should validate_presence_of :name }
5 | it { should validate_presence_of :provider }
6 | it { should validate_presence_of :uid }
7 |
8 | context ".find_or_create_using_omniauth" do
9 | context "returns a user when it receives a properly formatted hash" do
10 | let(:brennas_params) { { info: { name: "Brenna Dobbs" },
11 | provider: "Vooza",
12 | uid: "1234567890" } }
13 |
14 | let(:annas_params) { { info: { name: "Anna Smith" },
15 | provider: "Vooza",
16 | uid: "1234567891" } }
17 |
18 | context "creates a new user" do
19 | it "should increase the User count by 1" do
20 | expect {
21 | User.find_or_create_using_omniauth brennas_params
22 | }.to change{User.count}.by 1
23 | end
24 | end
25 |
26 | context "finds an existing user" do
27 | it "does not increase the User count" do
28 | User.create name: annas_params[:info][:name],
29 | provider: annas_params[:provider],
30 | uid: annas_params[:uid]
31 |
32 | expect {
33 | User.find_or_create_using_omniauth annas_params
34 | }.to change{User.count}.by 0
35 | end
36 | end
37 | end
38 |
39 | it "returns nil when it receives an improperly formatted hash" do
40 | user = User.find_or_create_using_omniauth provider: "Zombo"
41 | expect(user).to be_nil
42 | end
43 | end
44 | end
45 |
--------------------------------------------------------------------------------
/db/schema.rb:
--------------------------------------------------------------------------------
1 | # encoding: UTF-8
2 | # This file is auto-generated from the current state of the database. Instead
3 | # of editing this file, please use the migrations feature of Active Record to
4 | # incrementally modify your database, and then regenerate this schema definition.
5 | #
6 | # Note that this schema.rb definition is the authoritative source for your
7 | # database schema. If you need to create the application database on another
8 | # system, you should be using db:schema:load, not running all the migrations
9 | # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10 | # you'll amass, the slower it'll run and the greater likelihood for issues).
11 | #
12 | # It's strongly recommended that you check this file into your version control system.
13 |
14 | ActiveRecord::Schema.define(version: 20140821135118) do
15 |
16 | # These are extensions that must be enabled in order to support this database
17 | enable_extension "plpgsql"
18 |
19 | create_table "calls", force: true do |t|
20 | t.datetime "due_date"
21 | t.integer "conference_id"
22 | t.datetime "created_at"
23 | t.datetime "updated_at"
24 | end
25 |
26 | create_table "conferences", force: true do |t|
27 | t.string "name"
28 | t.string "location"
29 | t.boolean "code_of_conduct", default: false
30 | t.boolean "childcare", default: false
31 | t.integer "last_years_attendance", default: 0
32 | t.datetime "created_at"
33 | t.datetime "updated_at"
34 | end
35 |
36 | create_table "users", force: true do |t|
37 | t.string "provider"
38 | t.string "uid"
39 | t.string "name"
40 | t.datetime "created_at"
41 | t.datetime "updated_at"
42 | end
43 |
44 | end
45 |
--------------------------------------------------------------------------------
/public/500.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | We're sorry, but something went wrong (500)
5 |
6 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
We're sorry, but something went wrong.
62 |
63 |
If you are the application owner check the logs for more information.
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/config/environments/test.rb:
--------------------------------------------------------------------------------
1 | Rails.application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb.
3 |
4 | # The test environment is used exclusively to run your application's
5 | # test suite. You never need to work with it otherwise. Remember that
6 | # your test database is "scratch space" for the test suite and is wiped
7 | # and recreated between test runs. Don't rely on the data there!
8 | config.cache_classes = true
9 |
10 | # Do not eager load code on boot. This avoids loading your whole application
11 | # just for the purpose of running a single test. If you are using a tool that
12 | # preloads Rails for running tests, you may have to set it to true.
13 | config.eager_load = false
14 |
15 | # Configure static asset server for tests with Cache-Control for performance.
16 | config.serve_static_assets = true
17 | config.static_cache_control = 'public, max-age=3600'
18 |
19 | # Show full error reports and disable caching.
20 | config.consider_all_requests_local = true
21 | config.action_controller.perform_caching = false
22 |
23 | # Raise exceptions instead of rendering exception templates.
24 | config.action_dispatch.show_exceptions = false
25 |
26 | # Disable request forgery protection in test environment.
27 | config.action_controller.allow_forgery_protection = false
28 |
29 | # Tell Action Mailer not to deliver emails to the real world.
30 | # The :test delivery method accumulates sent emails in the
31 | # ActionMailer::Base.deliveries array.
32 | config.action_mailer.delivery_method = :test
33 |
34 | # Print deprecation notices to the stderr.
35 | config.active_support.deprecation = :stderr
36 |
37 | # Raises error for missing translations
38 | # config.action_view.raise_on_missing_translations = true
39 | end
40 |
--------------------------------------------------------------------------------
/public/422.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | The change you wanted was rejected (422)
5 |
6 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
The change you wanted was rejected.
62 |
Maybe you tried to change something you didn't have access to.
63 |
64 |
If you are the application owner check the logs for more information.
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/public/404.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | The page you were looking for doesn't exist (404)
5 |
6 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
The page you were looking for doesn't exist.
62 |
You may have mistyped the address or the page may have moved.
63 |
64 |
If you are the application owner check the logs for more information.
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/spec/controllers/sessions_controller_spec.rb:
--------------------------------------------------------------------------------
1 | require 'rails_helper'
2 |
3 | describe SessionsController do
4 | before do
5 | request.env['omniauth.auth'] = OmniAuth.config.mock_auth[:twitter]
6 | end
7 |
8 | context "#create" do
9 | context "Creating a new user" do
10 | let(:post_create) { post :create, provider: :twitter }
11 |
12 | it "creates a new user" do
13 | expect { post_create }.to change { User.count }.by(1)
14 | end
15 |
16 | it "creates a session for the new user" do
17 | post_create
18 | expect(session[:user_id]).to be_present
19 | end
20 | end
21 |
22 | context "Creating an existing user" do
23 | before do
24 | # Mock the env to match that of the User Factory.
25 | request.env['omniauth.auth'] = { info: { name: "Tracy"},
26 | uid: "123789",
27 | provider: "twitter" }
28 | end
29 |
30 | let!(:user) { FactoryGirl.create :user }
31 | let(:post_create) { post :create, provider: :twitter }
32 |
33 | it "finds an existing user" do
34 | expect { post_create }.to_not change { User.count }
35 | end
36 |
37 | it "creates a session for the existing user" do
38 | post_create
39 | expect(session[:user_id]).to eq User.find_by(uid: "123789").id
40 | end
41 | end
42 | end
43 |
44 | context "#destroy" do
45 | let!(:post_create) { post :create, provider: :twitter }
46 |
47 | it "should clear the session" do
48 | expect(session[:user_id]).to_not be_nil
49 | delete :destroy
50 | expect(session[:user_id]).to be_nil
51 | end
52 |
53 | it "should redirect to the home page" do
54 | delete :destroy
55 | expect(response).to redirect_to root_url
56 | end
57 | end
58 | end
59 |
--------------------------------------------------------------------------------
/spec/rails_helper.rb:
--------------------------------------------------------------------------------
1 | # This file is copied to spec/ when you run 'rails generate rspec:install'
2 | ENV["RAILS_ENV"] ||= 'test'
3 | require 'spec_helper'
4 | require File.expand_path("../../config/environment", __FILE__)
5 | require 'rspec/rails'
6 |
7 | # Requires supporting ruby files with custom matchers and macros, etc, in
8 | # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
9 | # run as spec files by default. This means that files in spec/support that end
10 | # in _spec.rb will both be required and run as specs, causing the specs to be
11 | # run twice. It is recommended that you do not name files matching this glob to
12 | # end with _spec.rb. You can configure this pattern with the --pattern
13 | # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
14 | Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
15 |
16 | # Checks for pending migrations before tests are run.
17 | # If you are not using ActiveRecord, you can remove this line.
18 | ActiveRecord::Migration.maintain_test_schema!
19 |
20 | RSpec.configure do |config|
21 | # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
22 | config.fixture_path = "#{::Rails.root}/spec/fixtures"
23 |
24 | # If you're not using ActiveRecord, or you'd prefer not to run each of your
25 | # examples within a transaction, remove the following line or assign false
26 | # instead of true.
27 | config.use_transactional_fixtures = true
28 |
29 | # RSpec Rails can automatically mix in different behaviours to your tests
30 | # based on their file location, for example enabling you to call `get` and
31 | # `post` in specs under `spec/controllers`.
32 | #
33 | # You can disable this behaviour by removing the line below, and instead
34 | # explicitly tag your specs with their type, e.g.:
35 | #
36 | # RSpec.describe UsersController, :type => :controller do
37 | # # ...
38 | # end
39 | #
40 | # The different available types are documented in the features, such as in
41 | # https://relishapp.com/rspec/rspec-rails/docs
42 | config.infer_spec_type_from_file_location!
43 | end
44 |
--------------------------------------------------------------------------------
/config/database.yml:
--------------------------------------------------------------------------------
1 | # PostgreSQL. Versions 8.2 and up are supported.
2 | #
3 | # Install the pg driver:
4 | # gem install pg
5 | # On OS X with Homebrew:
6 | # gem install pg -- --with-pg-config=/usr/local/bin/pg_config
7 | # On OS X with MacPorts:
8 | # gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config
9 | # On Windows:
10 | # gem install pg
11 | # Choose the win32 build.
12 | # Install PostgreSQL and put its /bin directory on your path.
13 | #
14 | # Configure Using Gemfile
15 | # gem 'pg'
16 | #
17 | default: &default
18 | adapter: postgresql
19 | encoding: unicode
20 | # For details on connection pooling, see rails configuration guide
21 | # http://guides.rubyonrails.org/configuring.html#database-pooling
22 | pool: 5
23 |
24 | development:
25 | <<: *default
26 | database: callback-women-rails_development
27 |
28 | # The specified database role being used to connect to postgres.
29 | # To create additional roles in postgres see `$ createuser --help`.
30 | # When left blank, postgres will use the default role. This is
31 | # the same name as the operating system user that initialized the database.
32 | #username: callback-women-rails
33 |
34 | # The password associated with the postgres role (username).
35 | #password:
36 |
37 | # Connect on a TCP socket. Omitted by default since the client uses a
38 | # domain socket that doesn't need configuration. Windows does not have
39 | # domain sockets, so uncomment these lines.
40 | #host: localhost
41 |
42 | # The TCP port the server listens on. Defaults to 5432.
43 | # If your server runs on a different port number, change accordingly.
44 | #port: 5432
45 |
46 | # Schema search path. The server defaults to $user,public
47 | #schema_search_path: myapp,sharedapp,public
48 |
49 | # Minimum log levels, in increasing order:
50 | # debug5, debug4, debug3, debug2, debug1,
51 | # log, notice, warning, error, fatal, and panic
52 | # Defaults to warning.
53 | #min_messages: notice
54 |
55 | # Warning: The database defined as "test" will be erased and
56 | # re-generated from your development database when you run "rake".
57 | # Do not set this db to the same as development or production.
58 | test:
59 | <<: *default
60 | database: callback-women-rails_test
61 |
62 | # As with config/secrets.yml, you never want to store sensitive information,
63 | # like your database password, in your source code. If your source code is
64 | # ever seen by anyone, they now have access to your database.
65 | #
66 | # Instead, provide the password as a unix environment variable when you boot
67 | # the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database
68 | # for a full rundown on how to provide these environment variables in a
69 | # production deployment.
70 | #
71 | # On Heroku and other platform providers, you may have a full connection URL
72 | # available as an environment variable. For example:
73 | #
74 | # DATABASE_URL="postgres://myuser:mypass@localhost/somedatabase"
75 | #
76 | # You can use this database configuration with:
77 | #
78 | # production:
79 | # url: <%= ENV['DATABASE_URL'] %>
80 | #
81 | production:
82 | <<: *default
83 | database: callback-women-rails_production
84 | username: callback-women-rails
85 | password: <%= ENV['CALLBACK-WOMEN-RAILS_DATABASE_PASSWORD'] %>
86 |
--------------------------------------------------------------------------------
/config/environments/production.rb:
--------------------------------------------------------------------------------
1 | Rails.application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb.
3 |
4 | # Code is not reloaded between requests.
5 | config.cache_classes = true
6 |
7 | # Eager load code on boot. This eager loads most of Rails and
8 | # your application in memory, allowing both threaded web servers
9 | # and those relying on copy on write to perform better.
10 | # Rake tasks automatically ignore this option for performance.
11 | config.eager_load = true
12 |
13 | # Full error reports are disabled and caching is turned on.
14 | config.consider_all_requests_local = false
15 | config.action_controller.perform_caching = true
16 |
17 | # Enable Rack::Cache to put a simple HTTP cache in front of your application
18 | # Add `rack-cache` to your Gemfile before enabling this.
19 | # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
20 | # config.action_dispatch.rack_cache = true
21 |
22 | # Disable Rails's static asset server (Apache or nginx will already do this).
23 | config.serve_static_assets = false
24 |
25 | # Compress JavaScripts and CSS.
26 | config.assets.js_compressor = :uglifier
27 | # config.assets.css_compressor = :sass
28 |
29 | # Do not fallback to assets pipeline if a precompiled asset is missed.
30 | config.assets.compile = false
31 |
32 | # Generate digests for assets URLs.
33 | config.assets.digest = true
34 |
35 | # `config.assets.precompile` has moved to config/initializers/assets.rb
36 |
37 | # Specifies the header that your server uses for sending files.
38 | # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
39 | # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
40 |
41 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
42 | # config.force_ssl = true
43 |
44 | # Set to :debug to see everything in the log.
45 | config.log_level = :info
46 |
47 | # Prepend all log lines with the following tags.
48 | # config.log_tags = [ :subdomain, :uuid ]
49 |
50 | # Use a different logger for distributed setups.
51 | # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
52 |
53 | # Use a different cache store in production.
54 | # config.cache_store = :mem_cache_store
55 |
56 | # Enable serving of images, stylesheets, and JavaScripts from an asset server.
57 | # config.action_controller.asset_host = "http://assets.example.com"
58 |
59 | # Precompile additional assets.
60 | # application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
61 | # config.assets.precompile += %w( search.js )
62 |
63 | # Ignore bad email addresses and do not raise email delivery errors.
64 | # Set this to true and configure the email server for immediate delivery to raise delivery errors.
65 | # config.action_mailer.raise_delivery_errors = false
66 |
67 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
68 | # the I18n.default_locale when a translation cannot be found).
69 | config.i18n.fallbacks = true
70 |
71 | # Send deprecation notices to registered listeners.
72 | config.active_support.deprecation = :notify
73 |
74 | # Disable automatic flushing of the log to improve performance.
75 | # config.autoflush_log = false
76 |
77 | # Use default logging formatter so that PID and timestamp are not suppressed.
78 | config.log_formatter = ::Logger::Formatter.new
79 |
80 | # Do not dump schema after migrations.
81 | config.active_record.dump_schema_after_migration = false
82 | end
83 |
--------------------------------------------------------------------------------
/Gemfile.lock:
--------------------------------------------------------------------------------
1 | GEM
2 | remote: https://rubygems.org/
3 | specs:
4 | actionmailer (4.1.4)
5 | actionpack (= 4.1.4)
6 | actionview (= 4.1.4)
7 | mail (~> 2.5.4)
8 | actionpack (4.1.4)
9 | actionview (= 4.1.4)
10 | activesupport (= 4.1.4)
11 | rack (~> 1.5.2)
12 | rack-test (~> 0.6.2)
13 | actionview (4.1.4)
14 | activesupport (= 4.1.4)
15 | builder (~> 3.1)
16 | erubis (~> 2.7.0)
17 | activemodel (4.1.4)
18 | activesupport (= 4.1.4)
19 | builder (~> 3.1)
20 | activerecord (4.1.4)
21 | activemodel (= 4.1.4)
22 | activesupport (= 4.1.4)
23 | arel (~> 5.0.0)
24 | activesupport (4.1.4)
25 | i18n (~> 0.6, >= 0.6.9)
26 | json (~> 1.7, >= 1.7.7)
27 | minitest (~> 5.1)
28 | thread_safe (~> 0.1)
29 | tzinfo (~> 1.1)
30 | arel (5.0.1.20140414130214)
31 | builder (3.2.2)
32 | coderay (1.1.0)
33 | coffee-rails (4.0.1)
34 | coffee-script (>= 2.2.0)
35 | railties (>= 4.0.0, < 5.0)
36 | coffee-script (2.3.0)
37 | coffee-script-source
38 | execjs
39 | coffee-script-source (1.7.1)
40 | database_cleaner (1.3.0)
41 | diff-lcs (1.2.5)
42 | dotenv (0.11.1)
43 | dotenv-deployment (~> 0.0.2)
44 | dotenv-deployment (0.0.2)
45 | dotenv-rails (0.11.1)
46 | dotenv (= 0.11.1)
47 | erubis (2.7.0)
48 | execjs (2.2.1)
49 | factory_girl (4.4.0)
50 | activesupport (>= 3.0.0)
51 | factory_girl_rails (4.4.1)
52 | factory_girl (~> 4.4.0)
53 | railties (>= 3.0.0)
54 | hashie (3.2.0)
55 | hike (1.2.3)
56 | i18n (0.6.11)
57 | jbuilder (2.1.3)
58 | activesupport (>= 3.0.0, < 5)
59 | multi_json (~> 1.2)
60 | jquery-rails (3.1.1)
61 | railties (>= 3.0, < 5.0)
62 | thor (>= 0.14, < 2.0)
63 | json (1.8.1)
64 | mail (2.5.4)
65 | mime-types (~> 1.16)
66 | treetop (~> 1.4.8)
67 | method_source (0.8.2)
68 | mime-types (1.25.1)
69 | minitest (5.4.0)
70 | multi_json (1.10.1)
71 | oauth (0.4.7)
72 | omniauth (1.2.2)
73 | hashie (>= 1.2, < 4)
74 | rack (~> 1.0)
75 | omniauth-oauth (1.0.1)
76 | oauth
77 | omniauth (~> 1.0)
78 | omniauth-twitter (1.0.1)
79 | multi_json (~> 1.3)
80 | omniauth-oauth (~> 1.0)
81 | pg (0.17.1)
82 | polyglot (0.3.5)
83 | pry (0.10.0)
84 | coderay (~> 1.1.0)
85 | method_source (~> 0.8.1)
86 | slop (~> 3.4)
87 | rack (1.5.2)
88 | rack-test (0.6.2)
89 | rack (>= 1.0)
90 | rails (4.1.4)
91 | actionmailer (= 4.1.4)
92 | actionpack (= 4.1.4)
93 | actionview (= 4.1.4)
94 | activemodel (= 4.1.4)
95 | activerecord (= 4.1.4)
96 | activesupport (= 4.1.4)
97 | bundler (>= 1.3.0, < 2.0)
98 | railties (= 4.1.4)
99 | sprockets-rails (~> 2.0)
100 | railties (4.1.4)
101 | actionpack (= 4.1.4)
102 | activesupport (= 4.1.4)
103 | rake (>= 0.8.7)
104 | thor (>= 0.18.1, < 2.0)
105 | rake (10.3.2)
106 | rdoc (4.1.1)
107 | json (~> 1.4)
108 | rspec-core (3.0.3)
109 | rspec-support (~> 3.0.0)
110 | rspec-expectations (3.0.3)
111 | diff-lcs (>= 1.2.0, < 2.0)
112 | rspec-support (~> 3.0.0)
113 | rspec-mocks (3.0.3)
114 | rspec-support (~> 3.0.0)
115 | rspec-rails (3.0.2)
116 | actionpack (>= 3.0)
117 | activesupport (>= 3.0)
118 | railties (>= 3.0)
119 | rspec-core (~> 3.0.0)
120 | rspec-expectations (~> 3.0.0)
121 | rspec-mocks (~> 3.0.0)
122 | rspec-support (~> 3.0.0)
123 | rspec-support (3.0.3)
124 | sass (3.2.19)
125 | sass-rails (4.0.3)
126 | railties (>= 4.0.0, < 5.0)
127 | sass (~> 3.2.0)
128 | sprockets (~> 2.8, <= 2.11.0)
129 | sprockets-rails (~> 2.0)
130 | sdoc (0.4.0)
131 | json (~> 1.8)
132 | rdoc (~> 4.0, < 5.0)
133 | shoulda-matchers (2.6.2)
134 | activesupport (>= 3.0.0)
135 | slop (3.5.0)
136 | spring (1.1.3)
137 | sprockets (2.11.0)
138 | hike (~> 1.2)
139 | multi_json (~> 1.0)
140 | rack (~> 1.0)
141 | tilt (~> 1.1, != 1.3.0)
142 | sprockets-rails (2.1.3)
143 | actionpack (>= 3.0)
144 | activesupport (>= 3.0)
145 | sprockets (~> 2.8)
146 | thor (0.19.1)
147 | thread_safe (0.3.4)
148 | tilt (1.4.1)
149 | treetop (1.4.15)
150 | polyglot
151 | polyglot (>= 0.3.1)
152 | turbolinks (2.2.2)
153 | coffee-rails
154 | tzinfo (1.2.1)
155 | thread_safe (~> 0.1)
156 | uglifier (2.5.3)
157 | execjs (>= 0.3.0)
158 | json (>= 1.8.0)
159 |
160 | PLATFORMS
161 | ruby
162 |
163 | DEPENDENCIES
164 | coffee-rails (~> 4.0.0)
165 | database_cleaner (~> 1.3.0)
166 | dotenv-rails
167 | factory_girl_rails (~> 4.4.1)
168 | jbuilder (~> 2.0)
169 | jquery-rails
170 | omniauth (~> 1.2.2)
171 | omniauth-twitter (~> 1.0.1)
172 | pg
173 | pry
174 | rails (= 4.1.4)
175 | rspec-rails (~> 3.0.2)
176 | sass-rails (~> 4.0.3)
177 | sdoc (~> 0.4.0)
178 | shoulda-matchers (~> 2.6.2)
179 | spring
180 | turbolinks
181 | uglifier (>= 1.3.0)
182 |
--------------------------------------------------------------------------------