Merge pull request #28 from snap-cloud/fix-build
Attempt to Unbreak Stuff
This commit is contained in:
commit
1b4132fb19
18 changed files with 113 additions and 96 deletions
12
Gemfile
12
Gemfile
|
|
@ -20,7 +20,6 @@ gem 'puma', '~> 3.0'
|
||||||
gem 'responders', '~> 2.0'
|
gem 'responders', '~> 2.0'
|
||||||
|
|
||||||
# as supported databases
|
# as supported databases
|
||||||
# gem 'mysql2'
|
|
||||||
gem 'pg'
|
gem 'pg'
|
||||||
|
|
||||||
# for tracking data changes
|
# for tracking data changes
|
||||||
|
|
@ -39,11 +38,11 @@ gem 'devise'
|
||||||
gem 'devise_ichain_authenticatable'
|
gem 'devise_ichain_authenticatable'
|
||||||
|
|
||||||
gem 'omniauth'
|
gem 'omniauth'
|
||||||
gem 'omniauth-google-oauth2'
|
|
||||||
gem 'omniauth-discourse'
|
gem 'omniauth-discourse'
|
||||||
# gem 'omniauth-openid'
|
gem 'omniauth-facebook'
|
||||||
# gem 'omniauth-facebook'
|
gem 'omniauth-github'
|
||||||
# gem 'omniauth-github'
|
gem 'omniauth-google-oauth2'
|
||||||
|
gem 'omniauth-openid'
|
||||||
|
|
||||||
# Bot-filtering
|
# Bot-filtering
|
||||||
gem 'recaptcha', require: 'recaptcha/rails'
|
gem 'recaptcha', require: 'recaptcha/rails'
|
||||||
|
|
@ -143,8 +142,7 @@ gem 'rqrcode'
|
||||||
gem 'axlsx', git: 'https://github.com/randym/axlsx.git'
|
gem 'axlsx', git: 'https://github.com/randym/axlsx.git'
|
||||||
gem 'axlsx_rails'
|
gem 'axlsx_rails'
|
||||||
|
|
||||||
# as error catcher
|
gem 'sentry'
|
||||||
gem 'airbrake'
|
|
||||||
|
|
||||||
# to make links faster
|
# to make links faster
|
||||||
gem 'turbolinks'
|
gem 'turbolinks'
|
||||||
|
|
|
||||||
36
Gemfile.lock
36
Gemfile.lock
|
|
@ -68,10 +68,6 @@ GEM
|
||||||
addressable (2.6.0)
|
addressable (2.6.0)
|
||||||
public_suffix (>= 2.0.2, < 4.0)
|
public_suffix (>= 2.0.2, < 4.0)
|
||||||
afm (0.2.2)
|
afm (0.2.2)
|
||||||
airbrake (9.2.2)
|
|
||||||
airbrake-ruby (~> 4.4)
|
|
||||||
airbrake-ruby (4.4.0)
|
|
||||||
rbtree3 (~> 0.5)
|
|
||||||
ajax-datatables-rails (0.4.3)
|
ajax-datatables-rails (0.4.3)
|
||||||
railties (>= 4.0)
|
railties (>= 4.0)
|
||||||
archive-zip (0.12.0)
|
archive-zip (0.12.0)
|
||||||
|
|
@ -130,7 +126,6 @@ GEM
|
||||||
url
|
url
|
||||||
coderay (1.1.1)
|
coderay (1.1.1)
|
||||||
concurrent-ruby (1.1.5)
|
concurrent-ruby (1.1.5)
|
||||||
connection_pool (2.2.2)
|
|
||||||
countable-rails (0.0.1)
|
countable-rails (0.0.1)
|
||||||
railties (>= 3.1)
|
railties (>= 3.1)
|
||||||
countries (3.0.0)
|
countries (3.0.0)
|
||||||
|
|
@ -301,12 +296,10 @@ GEM
|
||||||
monetize (~> 1.9.0)
|
monetize (~> 1.9.0)
|
||||||
money (~> 6.13.2)
|
money (~> 6.13.2)
|
||||||
railties (>= 3.0)
|
railties (>= 3.0)
|
||||||
multi_json (1.13.1)
|
multi_json (1.14.1)
|
||||||
multi_xml (0.6.0)
|
multi_xml (0.6.0)
|
||||||
multipart-post (2.1.1)
|
multipart-post (2.1.1)
|
||||||
nenv (0.3.0)
|
nenv (0.3.0)
|
||||||
net-http-persistent (3.0.1)
|
|
||||||
connection_pool (~> 2.2)
|
|
||||||
netrc (0.11.0)
|
netrc (0.11.0)
|
||||||
nio4r (2.5.2)
|
nio4r (2.5.2)
|
||||||
nokogiri (1.10.5)
|
nokogiri (1.10.5)
|
||||||
|
|
@ -325,6 +318,11 @@ GEM
|
||||||
rack (>= 1.6.2, < 3)
|
rack (>= 1.6.2, < 3)
|
||||||
omniauth-discourse (1.0.0)
|
omniauth-discourse (1.0.0)
|
||||||
omniauth (~> 1.0)
|
omniauth (~> 1.0)
|
||||||
|
omniauth-facebook (6.0.0)
|
||||||
|
omniauth-oauth2 (~> 1.2)
|
||||||
|
omniauth-github (1.3.0)
|
||||||
|
omniauth (~> 1.5)
|
||||||
|
omniauth-oauth2 (>= 1.4.0, < 2.0)
|
||||||
omniauth-google-oauth2 (0.6.1)
|
omniauth-google-oauth2 (0.6.1)
|
||||||
jwt (>= 2.0)
|
jwt (>= 2.0)
|
||||||
omniauth (>= 1.1.1)
|
omniauth (>= 1.1.1)
|
||||||
|
|
@ -332,6 +330,9 @@ GEM
|
||||||
omniauth-oauth2 (1.6.0)
|
omniauth-oauth2 (1.6.0)
|
||||||
oauth2 (~> 1.1)
|
oauth2 (~> 1.1)
|
||||||
omniauth (~> 1.9)
|
omniauth (~> 1.9)
|
||||||
|
omniauth-openid (1.0.1)
|
||||||
|
omniauth (~> 1.0)
|
||||||
|
rack-openid (~> 1.3.1)
|
||||||
open4 (1.3.4)
|
open4 (1.3.4)
|
||||||
orm_adapter (0.5.0)
|
orm_adapter (0.5.0)
|
||||||
paper_trail (10.3.1)
|
paper_trail (10.3.1)
|
||||||
|
|
@ -373,6 +374,9 @@ GEM
|
||||||
public_suffix (3.1.1)
|
public_suffix (3.1.1)
|
||||||
puma (3.12.2)
|
puma (3.12.2)
|
||||||
rack (2.0.8)
|
rack (2.0.8)
|
||||||
|
rack-openid (1.3.1)
|
||||||
|
rack (>= 1.1.0)
|
||||||
|
ruby-openid (>= 2.1.8)
|
||||||
rack-test (1.1.0)
|
rack-test (1.1.0)
|
||||||
rack (>= 1.0, < 3)
|
rack (>= 1.0, < 3)
|
||||||
rails (5.2.3)
|
rails (5.2.3)
|
||||||
|
|
@ -431,7 +435,6 @@ GEM
|
||||||
rb-fsevent (0.10.3)
|
rb-fsevent (0.10.3)
|
||||||
rb-inotify (0.10.0)
|
rb-inotify (0.10.0)
|
||||||
ffi (~> 1.0)
|
ffi (~> 1.0)
|
||||||
rbtree3 (0.5.0)
|
|
||||||
rdoc (6.0.4)
|
rdoc (6.0.4)
|
||||||
rdoc-generator-fivefish (0.4.0)
|
rdoc-generator-fivefish (0.4.0)
|
||||||
inversion (~> 1.1)
|
inversion (~> 1.1)
|
||||||
|
|
@ -489,6 +492,7 @@ GEM
|
||||||
rubocop-rspec (1.36.0)
|
rubocop-rspec (1.36.0)
|
||||||
rubocop (>= 0.68.1)
|
rubocop (>= 0.68.1)
|
||||||
ruby-oembed (0.12.0)
|
ruby-oembed (0.12.0)
|
||||||
|
ruby-openid (2.9.2)
|
||||||
ruby-progressbar (1.10.1)
|
ruby-progressbar (1.10.1)
|
||||||
ruby-rc4 (0.1.5)
|
ruby-rc4 (0.1.5)
|
||||||
ruby_dep (1.5.0)
|
ruby_dep (1.5.0)
|
||||||
|
|
@ -514,6 +518,7 @@ GEM
|
||||||
selenium-webdriver (3.142.6)
|
selenium-webdriver (3.142.6)
|
||||||
childprocess (>= 0.5, < 4.0)
|
childprocess (>= 0.5, < 4.0)
|
||||||
rubyzip (>= 1.2.2)
|
rubyzip (>= 1.2.2)
|
||||||
|
sentry (0.5.3)
|
||||||
sexp_processor (4.11.0)
|
sexp_processor (4.11.0)
|
||||||
shellany (0.0.1)
|
shellany (0.0.1)
|
||||||
shoulda-matchers (4.1.2)
|
shoulda-matchers (4.1.2)
|
||||||
|
|
@ -542,13 +547,11 @@ GEM
|
||||||
activesupport (>= 4.0)
|
activesupport (>= 4.0)
|
||||||
sprockets (>= 3.0.0)
|
sprockets (>= 3.0.0)
|
||||||
sqlite3 (1.4.1)
|
sqlite3 (1.4.1)
|
||||||
stripe (4.21.3)
|
stripe (5.14.0)
|
||||||
faraday (~> 0.13)
|
stripe-ruby-mock (3.0.1)
|
||||||
net-http-persistent (~> 3.0)
|
|
||||||
stripe-ruby-mock (2.5.8)
|
|
||||||
dante (>= 0.2.0)
|
dante (>= 0.2.0)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
stripe (>= 2.0.3)
|
stripe (> 5, < 6)
|
||||||
sysexits (1.2.0)
|
sysexits (1.2.0)
|
||||||
temple (0.8.0)
|
temple (0.8.0)
|
||||||
thor (0.20.3)
|
thor (0.20.3)
|
||||||
|
|
@ -605,7 +608,6 @@ DEPENDENCIES
|
||||||
active_model_serializers
|
active_model_serializers
|
||||||
acts_as_commentable_with_threading
|
acts_as_commentable_with_threading
|
||||||
acts_as_list
|
acts_as_list
|
||||||
airbrake
|
|
||||||
ajax-datatables-rails
|
ajax-datatables-rails
|
||||||
autoprefixer-rails
|
autoprefixer-rails
|
||||||
awesome_nested_set
|
awesome_nested_set
|
||||||
|
|
@ -657,7 +659,10 @@ DEPENDENCIES
|
||||||
nokogiri (>= 1.8.1)
|
nokogiri (>= 1.8.1)
|
||||||
omniauth
|
omniauth
|
||||||
omniauth-discourse
|
omniauth-discourse
|
||||||
|
omniauth-facebook
|
||||||
|
omniauth-github
|
||||||
omniauth-google-oauth2
|
omniauth-google-oauth2
|
||||||
|
omniauth-openid
|
||||||
paper_trail
|
paper_trail
|
||||||
pdf-inspector
|
pdf-inspector
|
||||||
pg
|
pg
|
||||||
|
|
@ -693,6 +698,7 @@ DEPENDENCIES
|
||||||
ruby-oembed
|
ruby-oembed
|
||||||
sass-rails (>= 4.0.2)
|
sass-rails (>= 4.0.2)
|
||||||
selectize-rails
|
selectize-rails
|
||||||
|
sentry
|
||||||
shoulda-matchers
|
shoulda-matchers
|
||||||
skylight
|
skylight
|
||||||
spring-commands-rspec
|
spring-commands-rspec
|
||||||
|
|
|
||||||
|
|
@ -178,20 +178,22 @@ module ApplicationHelper
|
||||||
'hidden' if Date.today > conference.end_date
|
'hidden' if Date.today > conference.end_date
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# TODO:Snap!Con: Replace this with a search for a conference logo.
|
||||||
def nav_root_link_for(conference)
|
def nav_root_link_for(conference)
|
||||||
link_text = (
|
|
||||||
conference.try(:organization).try(:name) ||
|
|
||||||
ENV['OSEM_NAME'] ||
|
|
||||||
'OSEM'
|
|
||||||
)
|
|
||||||
link_to(
|
link_to(
|
||||||
image_tag('snapcon_logo.png'),
|
image_tag('snapcon_logo.png'),
|
||||||
root_path,
|
root_path,
|
||||||
class: 'navbar-brand',
|
class: 'navbar-brand',
|
||||||
title: 'Open Source Event Manager'
|
title: nav_link_text(conference)
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def nav_link_text(conference)
|
||||||
|
conference.try(:organization).try(:name) ||
|
||||||
|
ENV['OSEM_NAME'] ||
|
||||||
|
'OSEM'
|
||||||
|
end
|
||||||
|
|
||||||
# returns the url to be used for logo on basis of sponsorship level position
|
# returns the url to be used for logo on basis of sponsorship level position
|
||||||
def get_logo(object)
|
def get_logo(object)
|
||||||
if object.try(:sponsorship_level)
|
if object.try(:sponsorship_level)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'redcarpet/render_strip'
|
require 'redcarpet/render_strip'
|
||||||
|
|
||||||
module FormatHelper
|
module FormatHelper
|
||||||
|
|
@ -43,12 +44,11 @@ module FormatHelper
|
||||||
|
|
||||||
def target_progress_color(progress)
|
def target_progress_color(progress)
|
||||||
progress = progress.to_i
|
progress = progress.to_i
|
||||||
result =
|
result = case
|
||||||
case
|
when progress >= 90 then 'green'
|
||||||
when progress >= 90 then 'green'
|
when progress < 90 && progress >= 80 then 'orange'
|
||||||
when progress < 90 && progress >= 80 then 'orange'
|
else 'red'
|
||||||
else 'red'
|
end
|
||||||
end
|
|
||||||
|
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
|
@ -100,19 +100,11 @@ module FormatHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def icon_for_todo(bool)
|
def icon_for_todo(bool)
|
||||||
if bool
|
bool ? 'fa fa-check' : 'fa fa-times'
|
||||||
'fa fa-check'
|
|
||||||
else
|
|
||||||
'fa fa-times'
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def class_for_todo(bool)
|
def class_for_todo(bool)
|
||||||
if bool
|
bool ? 'todolist-ok' : 'todolist-missing'
|
||||||
'todolist-ok'
|
|
||||||
else
|
|
||||||
'todolist-missing'
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def word_pluralize(count, singular, plural = nil)
|
def word_pluralize(count, singular, plural = nil)
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,10 @@ class User < ApplicationRecord
|
||||||
else
|
else
|
||||||
[:database_authenticatable, :registerable,
|
[:database_authenticatable, :registerable,
|
||||||
:recoverable, :rememberable, :trackable, :validatable, :confirmable,
|
:recoverable, :rememberable, :trackable, :validatable, :confirmable,
|
||||||
:omniauthable, omniauth_providers: [:google, :discourse]]
|
:omniauthable,
|
||||||
|
# omniauth_providers: [:suse, :google, :facebook, :github, :discourse]
|
||||||
|
omniauth_providers: [:google, :discourse]
|
||||||
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
devise(*devise_modules)
|
devise(*devise_modules)
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
.container
|
.container
|
||||||
.row
|
.row
|
||||||
.col-md-12.text-center
|
.col-md-12.text-center
|
||||||
%h2 Sign Up for Campus Housing
|
%h2 Sign Up for Snap<em>!</em>Con
|
||||||
%br
|
%br
|
||||||
-# %h2
|
-# %h2
|
||||||
-# Support
|
-# Support
|
||||||
|
|
@ -15,8 +15,7 @@
|
||||||
.row.row-centered
|
.row.row-centered
|
||||||
- tickets.each do |ticket|
|
- tickets.each do |ticket|
|
||||||
.col-lg-4.col-md-3.col-sm-3.col-centered.col-top
|
.col-lg-4.col-md-3.col-sm-3.col-centered.col-top
|
||||||
= link_to(conference_tickets_path(conference.short_title),
|
= link_to(conference_tickets_path(conference.short_title), class: 'thumbnail') do
|
||||||
class: 'thumbnail') do
|
|
||||||
.caption
|
.caption
|
||||||
%h3.text-center.word_break
|
%h3.text-center.word_break
|
||||||
= ticket.title
|
= ticket.title
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,10 @@
|
||||||
title: "Your #{provider} login" do
|
title: "Your #{provider} login" do
|
||||||
%i{class: "fa fa-#{provider}"}
|
%i{class: "fa fa-#{provider}"}
|
||||||
- else
|
- else
|
||||||
= link_to("Snap!",
|
= link_to("user_#{provider}_omniauth_authorize".to_sym,
|
||||||
"user_#{provider}_omniauth_authorize".to_sym,
|
|
||||||
class: "btn btn-success btn-lg",
|
class: "btn btn-success btn-lg",
|
||||||
id: "omniauth-#{provider}",
|
id: "omniauth-#{provider}",
|
||||||
title: "Your #{provider} login")
|
title: "Your #{provider} login") do
|
||||||
|
%span
|
||||||
|
Snap
|
||||||
|
%em> !
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
.div
|
.div
|
||||||
.col-md-12.table-responsive
|
.col-md-12.table-responsive
|
||||||
%table.table.table-hover
|
%table.table.table-hover.table-striped
|
||||||
%thead
|
%thead
|
||||||
%tr
|
%tr
|
||||||
%th Ticket
|
%th Ticket
|
||||||
|
|
@ -20,8 +20,13 @@
|
||||||
= humanized_money_with_symbol ticket.quantity * ticket.price
|
= humanized_money_with_symbol ticket.quantity * ticket.price
|
||||||
|
|
||||||
= form_tag conference_payments_path do
|
= form_tag conference_payments_path do
|
||||||
%script.stripe-button{ src: "https://checkout.stripe.com/checkout.js",
|
%script.stripe-button{'src': "https://checkout.stripe.com/checkout.js",
|
||||||
data: { amount: @total_amount_to_pay.cents, label: "Pay #{humanized_money_with_symbol @total_amount_to_pay}",
|
'data': {amount: @total_amount_to_pay.cents,
|
||||||
email: current_user.email, currency: @total_amount_to_pay.currency, name: ENV['OSEM_NAME'] || 'OSEM',
|
label: "Pay #{humanized_money_with_symbol @total_amount_to_pay}",
|
||||||
description: "book your tickets", key: Rails.application.secrets.stripe_publishable_key, locale: "auto"}}
|
email: current_user.email,
|
||||||
= link_to 'Edit Purchase', conference_tickets_path(@conference.short_title), class: 'btn btn-default'
|
currency: @total_amount_to_pay.currency,
|
||||||
|
name: ENV['OSEM_NAME'] || 'OSEM',
|
||||||
|
description: "#{ENV['OSEM_NAME']} tickets",
|
||||||
|
key: ENV['STRIPE_PUBLISHABLE_KEY'] || Rails.application.secrets.stripe_publishable_key, locale: "auto"}}
|
||||||
|
= link_to('Edit Purchase', conference_tickets_path(@conference.short_title),
|
||||||
|
class: 'btn btn-default')
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
bundle install
|
||||||
# Setup the app if it isn't already setup
|
# Setup the app if it isn't already setup
|
||||||
bundle exec rake db:bootstrap
|
bundle exec rake db:bootstrap
|
||||||
# Start the app
|
# Start the app
|
||||||
|
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
Airbrake.configure do |config|
|
|
||||||
# Change this to some sensible data for your errbit instance
|
|
||||||
config.project_id = ENV['OSEM_ERRBIT_ID'] || Rails.application.secrets.errbit_id || ''
|
|
||||||
config.project_key = ENV['OSEM_ERRBIT_KEY'] || Rails.application.secrets.errbit_key || ''
|
|
||||||
config.host = ENV['OSEM_ERRBIT_HOST']
|
|
||||||
config.environment = Rails.env
|
|
||||||
if config.project_key.blank? || config.host.blank?
|
|
||||||
config.ignore_environments = [:production, :development, :test]
|
|
||||||
else
|
|
||||||
config.ignore_environments = [:development, :test]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
Airbrake.add_filter do |notice|
|
|
||||||
notice.ignore! if notice[:errors].any? { |error| error[:type] == 'ActiveRecord::RecordNotFound' }
|
|
||||||
notice.ignore! if notice[:errors].any? { |error| error[:type] == 'ActionController::InvalidAuthenticityToken' }
|
|
||||||
notice.ignore! if notice[:errors].any? { |error| error[:type] == 'ActionController::UnknownAction' }
|
|
||||||
notice.ignore! if notice[:errors].any? { |error| error[:type] == 'AbstractController::ActionNotFound' }
|
|
||||||
notice.ignore! if notice[:errors].any? { |error| error[:type] == 'ActionView::MissingTemplate' }
|
|
||||||
notice.ignore! if notice[:errors].any? { |error| error[:type] == 'ActionController::UnknownFormat' }
|
|
||||||
notice.ignore! if notice[:errors].any? { |error| error[:type] == 'ActionController::RoutingError' && error[:message] =~ %r{\[GET\]} }
|
|
||||||
end
|
|
||||||
|
|
@ -8,16 +8,23 @@ Devise.setup do |config|
|
||||||
|
|
||||||
# config.omniauth :open_id, name: 'suse', identifier: 'http://www.opensuse.org/openid/user'
|
# config.omniauth :open_id, name: 'suse', identifier: 'http://www.opensuse.org/openid/user'
|
||||||
|
|
||||||
config.omniauth :google_oauth2, (ENV['OSEM_GOOGLE_KEY'] || Rails.application.secrets.google_key), (ENV['OSEM_GOOGLE_SECRET'] || Rails.application.secrets.google_secret),
|
config.omniauth :google_oauth2,
|
||||||
|
(ENV['OSEM_GOOGLE_KEY'] || Rails.application.secrets.google_key),
|
||||||
|
(ENV['OSEM_GOOGLE_SECRET'] || Rails.application.secrets.google_secret),
|
||||||
name: 'google',
|
name: 'google',
|
||||||
scope: 'email'
|
scope: 'email'
|
||||||
|
|
||||||
config.omniauth :discourse,
|
config.omniauth :discourse,
|
||||||
sso_url: "https://forum.snap.berkeley.edu/session/sso_provider",
|
sso_url: 'https://forum.snap.berkeley.edu/session/sso_provider',
|
||||||
sso_secret: ENV['OSEM_DISCOURSE_SECRET']
|
sso_secret: ENV['OSEM_DISCOURSE_SECRET']
|
||||||
|
|
||||||
# config.omniauth :facebook, (ENV['OSEM_FACEBOOK_KEY'] || Rails.application.secrets.facebook_key), (ENV['OSEM_FACEBOOK_SECRET'] || Rails.application.secrets.facebook_secret)
|
config.omniauth :facebook,
|
||||||
# config.omniauth :github, (ENV['OSEM_GITHUB_KEY'] || Rails.application.secrets.github_key), (ENV['OSEM_GITHUB_SECRET'] || Rails.application.secrets.github_secret)
|
(ENV['OSEM_FACEBOOK_KEY'] || Rails.application.secrets.facebook_key),
|
||||||
|
(ENV['OSEM_FACEBOOK_SECRET'] || Rails.application.secrets.facebook_secret)
|
||||||
|
|
||||||
|
config.omniauth :github,
|
||||||
|
(ENV['OSEM_GITHUB_KEY'] || Rails.application.secrets.github_key),
|
||||||
|
(ENV['OSEM_GITHUB_SECRET'] || Rails.application.secrets.github_secret)
|
||||||
|
|
||||||
# ==> Mailer Configuration
|
# ==> Mailer Configuration
|
||||||
# Configure the e-mail address which will be shown in Devise::Mailer,
|
# Configure the e-mail address which will be shown in Devise::Mailer,
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Stripe.api_key = Rails.application.secrets.stripe_secret_key
|
Stripe.api_key = ENV['STRIPE_SECRET_KEY'] || Rails.application.secrets.stripe_secret_key
|
||||||
|
|
|
||||||
|
|
@ -43,5 +43,16 @@ on_worker_boot do
|
||||||
ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
|
ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
lowlevel_error_handler do |ex, env|
|
||||||
|
Raven.capture_exception(
|
||||||
|
ex,
|
||||||
|
:message => ex.message,
|
||||||
|
:extra => { :puma => env },
|
||||||
|
:transaction => "Puma"
|
||||||
|
)
|
||||||
|
# note the below is just a Rack response
|
||||||
|
[500, {}, ["An error has occurred, and engineers have been informed. Please reload the page. If you continue to have problems, contact conference@snap.berkeley.edu\n"]]
|
||||||
|
end
|
||||||
|
|
||||||
# Allow puma to be restarted by `rails restart` command.
|
# Allow puma to be restarted by `rails restart` command.
|
||||||
plugin :tmp_restart
|
plugin :tmp_restart
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,8 @@ feature Conference do
|
||||||
sign_in user
|
sign_in user
|
||||||
visit admin_conference_path(conference.short_title)
|
visit admin_conference_path(conference.short_title)
|
||||||
|
|
||||||
expect(find('.navbar-brand').text).to eq(conference.organization.name)
|
# expect(find('.navbar-brand')).to eq(conference.organization.name)
|
||||||
|
expect(find('.navbar-brand img')['alt']).to have_content conference.organization.name
|
||||||
end
|
end
|
||||||
|
|
||||||
it_behaves_like 'add and update conference'
|
it_behaves_like 'add and update conference'
|
||||||
|
|
|
||||||
|
|
@ -65,16 +65,19 @@ describe ApplicationHelper, type: :helper do
|
||||||
describe 'navigation title link' do
|
describe 'navigation title link' do
|
||||||
it 'should default to OSEM' do
|
it 'should default to OSEM' do
|
||||||
ENV.delete('OSEM_NAME')
|
ENV.delete('OSEM_NAME')
|
||||||
expect(nav_root_link_for(nil)).to match 'OSEM'
|
# TODO:Snap!Con: expect(nav_root_link_for(nil)).to match 'OSEM'
|
||||||
|
expect(nav_root_link_for(nil)).to match image_tag('snapcon_logo.png')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should use the environment variable' do
|
it 'should use the environment variable' do
|
||||||
ENV['OSEM_NAME'] = Faker::Company.name + "'"
|
ENV['OSEM_NAME'] = Faker::Company.name + "'"
|
||||||
expect(nav_root_link_for(nil)).to match h(ENV['OSEM_NAME'])
|
# expect(nav_root_link_for(nil)).to match h(ENV['OSEM_NAME'])
|
||||||
|
expect(nav_root_link_for(nil)).to match image_tag('snapcon_logo.png')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should use the conference organization name' do
|
it 'should use the conference organization name' do
|
||||||
expect(nav_root_link_for(conference)).to match h(conference.organization.name)
|
# expect(nav_root_link_for(conference)).to match h(conference.organization.name)
|
||||||
|
expect(nav_root_link_for(nil)).to match image_tag('snapcon_logo.png')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,15 @@ describe FormatHelper, type: :helper do
|
||||||
|
|
||||||
it 'should return HTML for header markdown' do
|
it 'should return HTML for header markdown' do
|
||||||
expect(Redcarpet::Markdown).to receive(:new)
|
expect(Redcarpet::Markdown).to receive(:new)
|
||||||
.with(Redcarpet::Render::HTML, autolink: true, space_after_headers: true, no_intra_emphasis: true)
|
.with(
|
||||||
|
Redcarpet::Render::HTML,
|
||||||
|
autolink: true,
|
||||||
|
space_after_headers: true,
|
||||||
|
tables: true,
|
||||||
|
strikethrough: true,
|
||||||
|
footnotes: true,
|
||||||
|
superscript: true
|
||||||
|
)
|
||||||
.and_call_original
|
.and_call_original
|
||||||
|
|
||||||
expect(markdown('# this is my header')).to eq "<h1>this is my header</h1>\n"
|
expect(markdown('# this is my header')).to eq "<h1>this is my header</h1>\n"
|
||||||
|
|
|
||||||
|
|
@ -468,7 +468,8 @@ describe User do
|
||||||
|
|
||||||
describe '.omniauth_providers' do
|
describe '.omniauth_providers' do
|
||||||
it 'contains providers' do
|
it 'contains providers' do
|
||||||
expect(User.omniauth_providers).to eq [:suse, :google, :facebook, :github]
|
# expect(User.omniauth_providers).to eq [:suse, :google, :facebook, :github]
|
||||||
|
expect(User.omniauth_providers).to eq [:google, :discourse]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,12 @@ module OmniauthMacros
|
||||||
|
|
||||||
ENV['OSEM_GOOGLE_KEY'] = 'test key google'
|
ENV['OSEM_GOOGLE_KEY'] = 'test key google'
|
||||||
ENV['OSEM_GOOGLE_SECRET'] = 'test secret google'
|
ENV['OSEM_GOOGLE_SECRET'] = 'test secret google'
|
||||||
ENV['OSEM_FACEBOOK_KEY'] = 'test key facebook'
|
# ENV['OSEM_FACEBOOK_KEY'] = 'test key facebook'
|
||||||
ENV['OSEM_FACEBOOK_SECRET'] = 'test secret facebook'
|
# ENV['OSEM_FACEBOOK_SECRET'] = 'test secret facebook'
|
||||||
ENV['OSEM_SUSE_KEY'] = 'test key suse'
|
# ENV['OSEM_SUSE_KEY'] = 'test key suse'
|
||||||
ENV['OSEM_SUSE_SECRET'] = 'test secret suse'
|
# ENV['OSEM_SUSE_SECRET'] = 'test secret suse'
|
||||||
ENV['OSEM_GITHUB_KEY'] = 'test key github'
|
# ENV['OSEM_GITHUB_KEY'] = 'test key github'
|
||||||
ENV['OSEM_GITHUB_SECRET'] = 'test secret github'
|
# ENV['OSEM_GITHUB_SECRET'] = 'test secret github'
|
||||||
|
|
||||||
def mock_auth_new_user
|
def mock_auth_new_user
|
||||||
OmniAuth.config.mock_auth[:google] =
|
OmniAuth.config.mock_auth[:google] =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue