Merge branch 'master' into autofill_conference_end_date

This commit is contained in:
James Mason 2017-12-07 09:22:56 -08:00 committed by GitHub
commit b83c0032d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 28 additions and 53 deletions

View file

@ -6,14 +6,6 @@
# Note that changes in the inspected code, or installation of new # Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again. # versions of RuboCop, may require this file to be generated again.
# Offense count: 15
# Cop supports --auto-correct.
# Configuration parameters: Include, TreatCommentsAsGroupSeparators.
# Include: **/Gemfile, **/gems.rb
Bundler/OrderedGems:
Exclude:
- 'Gemfile'
# Offense count: 1 # Offense count: 1
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth. # Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
@ -646,16 +638,6 @@ Style/RedundantParentheses:
Exclude: Exclude:
- 'app/controllers/admin/base_controller.rb' - 'app/controllers/admin/base_controller.rb'
# Offense count: 9
# Cop supports --auto-correct.
# Configuration parameters: AllowMultipleReturnValues.
Style/RedundantReturn:
Exclude:
- 'app/helpers/application_helper.rb'
- 'app/helpers/format_helper.rb'
- 'app/helpers/paths_helper.rb'
- 'app/helpers/users_helper.rb'
# Offense count: 2 # Offense count: 2
# Cop supports --auto-correct. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes. # Configuration parameters: EnforcedStyle, SupportedStyles, AllowInnerSlashes.
@ -740,10 +722,3 @@ Style/TrailingCommaInLiteral:
- 'Guardfile' - 'Guardfile'
- 'db/migrate/20140701123203_add_events_per_week_to_conference.rb' - 'db/migrate/20140701123203_add_events_per_week_to_conference.rb'
- 'spec/models/conference_spec.rb' - 'spec/models/conference_spec.rb'
# Offense count: 3
# Cop supports --auto-correct.
Style/UnneededInterpolation:
Exclude:
- 'app/helpers/format_helper.rb'
- 'spec/controllers/admin/conferences_controller_spec.rb'

30
Gemfile
View file

@ -27,8 +27,8 @@ gem 'paper_trail'
# for upload management # for upload management
gem 'carrierwave' gem 'carrierwave'
gem 'mini_magick'
gem 'carrierwave-bombshelter' gem 'carrierwave-bombshelter'
gem 'mini_magick'
# for internationalizing # for internationalizing
gem 'rails-i18n', '~> 4.0.0' gem 'rails-i18n', '~> 4.0.0'
@ -40,9 +40,9 @@ gem 'devise_ichain_authenticatable'
# for openID authentication # for openID authentication
gem 'omniauth' gem 'omniauth'
gem 'omniauth-facebook' gem 'omniauth-facebook'
gem 'omniauth-openid'
gem 'omniauth-google-oauth2'
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'
@ -60,8 +60,8 @@ gem 'unobtrusive_flash', '>=3'
gem 'transitions', :require => %w( transitions active_record/transitions ) gem 'transitions', :require => %w( transitions active_record/transitions )
# for comments # for comments
gem 'awesome_nested_set', '~> 3.1.3'
gem 'acts_as_commentable_with_threading' gem 'acts_as_commentable_with_threading'
gem 'awesome_nested_set', '~> 3.1.3'
# as templating language # as templating language
gem 'haml-rails' gem 'haml-rails'
@ -73,11 +73,11 @@ gem 'sass-rails', '>= 4.0.2'
gem 'uglifier', '>= 1.3.0' gem 'uglifier', '>= 1.3.0'
# as the front-end framework # as the front-end framework
gem 'bootstrap-sass', '~> 3.3.4.1'
gem 'autoprefixer-rails' gem 'autoprefixer-rails'
gem 'formtastic-bootstrap' gem 'bootstrap-sass', '~> 3.3.4.1'
gem 'formtastic', '~> 3.1.1'
gem 'cocoon' gem 'cocoon'
gem 'formtastic', '~> 3.1.1'
gem 'formtastic-bootstrap'
# as the JavaScript library # as the JavaScript library
gem 'jquery-rails' gem 'jquery-rails'
@ -108,8 +108,8 @@ source 'https://rails-assets.org' do
gem 'rails-assets-waypoints' gem 'rails-assets-waypoints'
# for markdown editors # for markdown editors
gem 'rails-assets-bootstrap-markdown' gem 'rails-assets-bootstrap-markdown'
gem 'rails-assets-to-markdown'
gem 'rails-assets-markdown' gem 'rails-assets-markdown'
gem 'rails-assets-to-markdown'
end end
# as date picker # as date picker
@ -129,9 +129,9 @@ gem 'gravtastic'
gem 'country_select' gem 'country_select'
# as PDF generator # as PDF generator
gem 'prawn-qrcode', '~> 0.2.2.1'
gem 'prawn_rails' gem 'prawn_rails'
gem 'rqrcode' gem 'rqrcode'
gem 'prawn-qrcode', '~> 0.2.2.1'
# to render XLS spreadsheets # to render XLS spreadsheets
gem 'axlsx', git: 'https://github.com/randym/axlsx.git' gem 'axlsx', git: 'https://github.com/randym/axlsx.git'
@ -156,13 +156,13 @@ gem 'redcarpet'
gem 'rdoc-generator-fivefish' gem 'rdoc-generator-fivefish'
# for visitor tracking # for visitor tracking
gem 'ahoy_matey'
gem 'activeuuid' gem 'activeuuid'
gem 'ahoy_matey'
gem 'piwik_analytics', '~> 1.0.1' gem 'piwik_analytics', '~> 1.0.1'
# for recurring jobs # for recurring jobs
gem 'whenever', :require => false
gem 'delayed_job_active_record' gem 'delayed_job_active_record'
gem 'whenever', :require => false
# to run scripts # to run scripts
gem 'daemons' gem 'daemons'
@ -216,8 +216,8 @@ gem 'nokogiri', '>= 1.8.1'
group :development do group :development do
# to launch specs when files are modified # to launch specs when files are modified
gem 'guard-rspec' gem 'guard-rspec'
gem 'spring-commands-rspec'
gem 'haml_lint', '~> 0.24.0' gem 'haml_lint', '~> 0.24.0'
gem 'spring-commands-rspec'
# for static code analisys # for static code analisys
gem 'rubocop', '~> 0.51.0', require: false gem 'rubocop', '~> 0.51.0', require: false
# as database # as database
@ -234,11 +234,11 @@ end
group :test do group :test do
# as test framework # as test framework
gem 'rspec-rails', '~> 3.5', '>= 3.5.2'
gem 'database_cleaner'
gem 'capybara' gem 'capybara'
gem 'poltergeist' gem 'database_cleaner'
gem 'phantomjs', :require => 'phantomjs/poltergeist' gem 'phantomjs', :require => 'phantomjs/poltergeist'
gem 'poltergeist'
gem 'rspec-rails', '~> 3.5', '>= 3.5.2'
# for measuring test coverage # for measuring test coverage
gem 'coveralls', require: false gem 'coveralls', require: false
# for describing models # for describing models

View file

@ -42,7 +42,7 @@ There are two configurations to deploy OSEM with Docker: *evaluation mode* and *
If you want to evaluate OSEM to see if it fits your needs, the default configuration in `docker-compose.env` will work perfectly fine for you. If you want to evaluate OSEM to see if it fits your needs, the default configuration in `docker-compose.env` will work perfectly fine for you.
For convenience reasons, `docker-compose.yml` already contains a [MailHog](https://github.com/mailhog/MailHog) service configuration. MailHog For convenience reasons, `docker-compose.yml` already contains a [MailHog](https://github.com/mailhog/MailHog) service configuration. MailHog
is going to catch every email sent by OSEM and displays them on a special web service. Thus, it eliminitates the need to set up an SMTP server just to try out OSEM. is going to catch every email sent by OSEM and displays them on a special web service. Thus, it eliminates the need to set up an SMTP server just to try out OSEM.
Just point your browser to http://localhost:8025 to get access to registration confirmation links etc. Just point your browser to http://localhost:8025 to get access to registration confirmation links etc.
Run `docker-compose up --build` to start the services. On first run, it will take a few minutes to initialize the database. Thus, wait a few minutes before you open up Run `docker-compose up --build` to start the services. On first run, it will take a few minutes to initialize the database. Thus, wait a few minutes before you open up

View file

@ -66,7 +66,7 @@ module ApplicationHelper
else else
ts = all.join ts = all.join
end end
return ts ts
end end
def difficulty_levels(conference) def difficulty_levels(conference)
@ -80,7 +80,7 @@ module ApplicationHelper
else else
ts = all.join ts = all.join
end end
return ts ts
end end
def unread_notifications(user) def unread_notifications(user)

View file

@ -101,17 +101,17 @@ module FormatHelper
def icon_for_todo(bool) def icon_for_todo(bool)
if bool if bool
return 'fa fa-check' 'fa fa-check'
else else
return 'fa fa-times' 'fa fa-times'
end end
end end
def class_for_todo(bool) def class_for_todo(bool)
if bool if bool
return 'todolist-ok' 'todolist-ok'
else else
return 'todolist-missing' 'todolist-missing'
end end
end end
@ -122,7 +122,7 @@ module FormatHelper
plural || singular.pluralize plural || singular.pluralize
end end
"#{word}" word
end end
# Returns black or white deppending on what of them contrast more with the # Returns black or white deppending on what of them contrast more with the

View file

@ -5,9 +5,9 @@ module PathsHelper
def active_nav_li(link) def active_nav_li(link)
if current_page?(link) if current_page?(link)
return 'active' 'active'
else else
return '' ''
end end
end end
end end

View file

@ -18,7 +18,7 @@ module UsersHelper
providers << provider if !ENV["OSEM_#{provider.upcase}_KEY"].blank? && !ENV["OSEM_#{provider.upcase}_SECRET"].blank? providers << provider if !ENV["OSEM_#{provider.upcase}_KEY"].blank? && !ENV["OSEM_#{provider.upcase}_SECRET"].blank?
end end
return providers.uniq providers.uniq
end end
# Receives a hash, generated from User model, function get_roles # Receives a hash, generated from User model, function get_roles

View file

@ -56,8 +56,8 @@ describe Admin::ConferencesController do
conference.reload conference.reload
expect(flash[:error]) expect(flash[:error])
.to eq("Updating conference failed. Short title can't be blank.") .to eq("Updating conference failed. Short title can't be blank.")
expect(conference.title).to eq("#{conference.title}") expect(conference.title).to eq(conference.title)
expect(conference.short_title).to eq("#{conference.short_title}") expect(conference.short_title).to eq(conference.short_title)
end end
it 're-renders the #show template' do it 're-renders the #show template' do