Skip to content

Commit

Permalink
Merge branch 'performance' of https://github.com/hpi-swt2/vm-portal i…
Browse files Browse the repository at this point in the history
…nto performance
  • Loading branch information
BraunTom committed Apr 7, 2019
2 parents 8093dbd + 9af59f1 commit be5b1fd
Show file tree
Hide file tree
Showing 52 changed files with 605 additions and 997 deletions.
169 changes: 83 additions & 86 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,27 @@ gem 'rails', '~> 5.2.1'
gem 'sqlite3', '~> 1.3.6' # development and testing
# Use Puma as the app server
gem 'puma', '~> 3.11'
# Use SCSS for stylesheets
# Gem integrates the C implementation of Sass, LibSass, into the asset pipeline
# https://github.com/sass/sassc-rails
gem 'sassc-rails'
# Use SCSS for stylesheets, integrate C implementation of Sass, LibSass, into asset pipeline
gem 'sassc-rails' # https://github.com/sass/sassc-rails
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
gem 'mini_racer', platforms: :ruby
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Turbolinks makes navigating your web application faster
gem 'turbolinks', '~> 5' # https://github.com/turbolinks/turbolinks
# Flexible authentication solution for Rails with Warden
# https://github.com/plataformatec/devise
gem 'devise'
gem 'devise-bootstrap-views', '~> 1.0'
gem 'devise-i18n'
gem 'devise' # https://github.com/plataformatec/devise
gem 'devise-bootstrap-views', '~> 1.0' # https://github.com/hisea/devise-bootstrap-views
gem 'devise-i18n' # https://github.com/tigrish/devise-i18n
# Provides different authentication strategies
gem 'omniauth'
gem 'omniauth_openid_connect'
gem 'omniauth' # https://github.com/omniauth/omniauth
gem 'omniauth_openid_connect' # https://github.com/m0n9oose/omniauth_openid_connect
# Role management, minimal authorization through OO design and pure Ruby classes
# https://github.com/varvet/pundit
gem 'pundit'
gem 'pundit' # https://github.com/varvet/pundit
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.1.0', require: false
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
gem 'bootsnap', '>= 1.1.0', require: false # https://github.com/Shopify/bootsnap
# Build JSON APIs with ease.
gem 'jbuilder', '~> 2.5' # https://github.com/rails/jbuilder
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use ActiveModel has_secure_password
Expand All @@ -54,101 +48,104 @@ gem 'jbuilder', '~> 2.5'
#

# Ruby interface to the VMware vSphere API
# https://github.com/vmware/rbvmomi
gem 'rbvmomi'
# Ruby Git
gem 'git'
gem 'rbvmomi' # https://github.com/vmware/rbvmomi
# Library for using Git in Ruby
gem 'git' # https://github.com/ruby-git/ruby-git
# Allow locks on database
# https://github.com/ClosureTree/with_advisory_lock
gem 'with_advisory_lock'
gem 'with_advisory_lock' # https://github.com/ClosureTree/with_advisory_lock
# SSH private and public key generator in pure Ruby (RSA & DSA)
# https://github.com/bensie/sshkey
gem 'sshkey', '~> 1.9'
gem 'sshkey', '~> 1.9' # https://github.com/bensie/sshkey
# Mina for deployment
# Have a look in the tutorial:
# https://github.com/lnikell/wiki/wiki/Deploy-rails-application-with-Mina,-Nginx-and-Puma
gem 'mina', require: false
# Tutorial: https://github.com/lnikell/wiki/wiki/Deploy-rails-application-with-Mina,-Nginx-and-Puma
gem 'mina', require: false # https://github.com/mina-deploy/mina
gem 'mina-puma', require: false, github: 'untitledkingdom/mina-puma'
# Adds support for multiple stages, https://github.com/endoze/mina-multistage
gem 'mina-multistage', require: false
# Tail production logs, https://github.com/windy/mina-logs
# $ mina logs # tail -f log/production.log
gem 'mina-logs', require: false
# Announce Mina deploys to Slack channels, https://github.com/krichly/mina-slack
# Adds support for multiple stages to mina
gem 'mina-multistage', require: false # https://github.com/endoze/mina-multistage
# Tail production logs: $ mina logs == tail -f log/production.log
gem 'mina-logs', require: false # https://github.com/windy/mina-logs
# Announce Mina deploys to Slack channels
gem 'execjs', require: false
gem 'mina-slack', require: false, github: 'krichly/mina-slack'
# Coveralls is a web service to help you track your code coverage
# over time, and ensure that all your new code is fully covered
gem 'mina-slack', require: false, github: 'krichly/mina-slack' # https://github.com/krichly/mina-slack
# Web service for tracking code coverage over time
# https://coveralls.io/github/hpi-swt2/vm-portal
gem 'coveralls', require: false
# Report errors in production to central Errbit system
# https://github.com/errbit/errbit
# https://github.com/airbrake/airbrake
gem 'airbrake', '~> 5.0'
gem 'airbrake', '~> 5.0' # https://github.com/airbrake/airbrake

#
# Packaged JS & CSS libraries
# Packaged JS, CSS libraries and helpers
#

# Fancy default views and javascript helpers https://github.com/twbs/bootstrap-rubygem
gem 'bootstrap', '~> 4.3.1'
# jQuery for Rails https://github.com/rails/jquery-rails
gem 'jquery-rails'
# Jquery datatables ruby gems for assets pipeline, https://datatables.net/
# https://github.com/mkhairi/jquery-datatables
gem 'jquery-datatables'
# The font-awesome font bundled as an asset for the rails asset pipeline
# See https://github.com/bokmann/font-awesome-rails
gem 'font-awesome-rails'
# Fancy default views and javascript helpers
gem 'bootstrap', '~> 4.3.1' # https://github.com/twbs/bootstrap-rubygem
# jQuery for Rails
gem 'jquery-rails' # https://github.com/rails/jquery-rails
# jQuery datatables Ruby gem for assets pipeline, https://datatables.net/
gem 'jquery-datatables' # https://github.com/mkhairi/jquery-datatables
# The font-awesome font bundled as an asset for the Rails asset pipeline
gem 'font-awesome-rails' # https://github.com/bokmann/font-awesome-rails
# Integrate Select2 javascript library with Rails asset pipeline
# https://github.com/argerim/select2-rails
gem 'select2-rails'
gem 'select2-rails' # https://github.com/argerim/select2-rails
# Packaged clipboard.js JS library for copying text to clipboard
# https://github.com/sadiqmmm/clipboard-rails
gem 'clipboard-rails'
# Deprecated! https://github.com/kossnocorp/jquery.turbolinks
# gem 'jquery-turbolinks'
gem 'clipboard-rails' # https://github.com/sadiqmmm/clipboard-rails
# Rails form builder for creating forms using Bootstrap 4
gem "bootstrap_form", ">= 4.2.0" # https://github.com/bootstrap-ruby/bootstrap_form
# Deprecated!
# gem 'jquery-turbolinks' # https://github.com/kossnocorp/jquery.turbolinks

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: %i[mri mingw x64_mingw]
gem 'rspec-rails', '~> 3.8'
# State of the art fixtures https://github.com/thoughtbot/factory_bot_rails
gem 'factory_bot_rails'
gem 'byebug', platforms: %i[mri mingw x64_mingw] # https://github.com/deivid-rodriguez/byebug
# RSpec testing framework as a drop-in alternative to Rails' default testing framework, Minitest
gem 'rspec-rails', '~> 3.8' # https://github.com/rspec/rspec-rails
# State of the art fixtures
gem 'factory_bot_rails' # https://github.com/thoughtbot/factory_bot_rails
end

group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'listen', '>= 3.0.5', '< 3.2'
gem 'web-console', '>= 3.3.0'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
# Easy linting https://github.com/rubocop-hq/rubocop
gem 'rubocop', require: false
gem 'rubocop-rspec'
# Much nicer error pages https://github.com/BetterErrors/better_errors
gem 'better_errors'
gem 'web-console', '>= 3.3.0' # https://github.com/rails/web-console
# The Listen gem listens to file modifications and notifies you about the changes.
gem 'listen', '>= 3.0.5', '< 3.2' # https://github.com/guard/listen
# Spring speeds up development by keeping your application running in the background
gem 'spring' # https://github.com/rails/spring
# Makes Spring watch the filesystem for changes using Listen rather than by polling the filesystem
gem 'spring-watcher-listen', '~> 2.0.0' # https://github.com/jonleighton/spring-watcher-listen
# Static code analyzer and formatter, based on the community Ruby style guide
gem 'rubocop', require: false # https://github.com/rubocop-hq/rubocop
# Code style checking for RSpec files
gem 'rubocop-rspec' # https://github.com/rubocop-hq/rubocop-rspec
# Replaces standard Rails error page with a more useful error page
# binding_of_caller is optional, but is necessary to use Better Errors' advanced features
gem 'better_errors' # https://github.com/BetterErrors/better_errors
gem 'binding_of_caller'
# Continous execution of unit tests
gem 'guard'
gem 'guard' # https://github.com/guard/guard
# Benchmarking
gem 'meta_request'
gem 'ruby-prof'
# Supporting gem for Rails Panel (Google Chrome extension for Rails development)
gem 'meta_request' # https://github.com/dejan/rails_panel
# code profiler for MRI Ruby
gem 'ruby-prof' # https://github.com/ruby-prof/ruby-prof

end

group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15'
gem 'selenium-webdriver'
# Easy installation and use of chromedriver to run system tests with Chrome
gem 'chromedriver-helper'
# More fun while testing, easy sample data and oneline tests for rails functionality
gem 'faker', git: 'https://github.com/stympy/faker.git', branch: 'master'
gem 'rails-controller-testing'
gem 'shoulda-matchers', '4.0.0.rc1'
# Code coverage for Ruby, https://github.com/colszowka/simplecov
gem 'simplecov', require: false
# Test web applications by simulating how a real user would interact with your app
gem 'capybara', '>= 2.15' # https://github.com/teamcapybara/capybara
# Run Selenium tests more easily with automatic installation and updates for all supported webdrivers
# gem 'webdrivers', '~> 3.0', # https://github.com/titusfortner/webdrivers
# Ruby bindings for WebDriver
# gem 'selenium-webdriver', # https://github.com/SeleniumHQ/selenium/tree/master/rb

# Port of Perl's Data::Faker library that generates fake data
gem 'faker' # https://github.com/stympy/faker
# RSpec- and Minitest-compatible one-liners that test common Rails functionality
# rails-controller-testing is required by shoulda-matchers
gem 'shoulda-matchers', '4.0.0.rc1' # https://github.com/thoughtbot/shoulda-matchers
gem 'rails-controller-testing' # https://github.com/rails/rails-controller-testing
# Code coverage for Ruby
gem 'simplecov', require: false # https://github.com/colszowka/simplecov
end

group :production do
Expand Down
38 changes: 7 additions & 31 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@ GIT
net-ssh
rake

GIT
remote: https://github.com/stympy/faker.git
revision: acd8a719efc6af27a8bf9ca76277c350ec6b3865
branch: master
specs:
faker (1.9.3)
i18n (>= 0.7)

GIT
remote: https://github.com/untitledkingdom/mina-puma.git
revision: 581a2048d82998328a5c9581a45883e0f3b28d06
Expand Down Expand Up @@ -74,8 +66,6 @@ GEM
airbrake (5.8.1)
airbrake-ruby (~> 1.8)
airbrake-ruby (1.8.0)
archive-zip (0.11.0)
io-like (~> 0.3.0)
arel (9.0.0)
ast (2.4.0)
attr_required (1.0.1)
Expand All @@ -96,6 +86,9 @@ GEM
autoprefixer-rails (>= 9.1.0)
popper_js (>= 1.14.3, < 2)
sassc-rails (>= 2.0.0)
bootstrap_form (4.2.0)
actionpack (>= 5.0)
activemodel (>= 5.0)
builder (3.2.3)
byebug (10.0.2)
callsite (0.0.11)
Expand All @@ -107,20 +100,8 @@ GEM
rack-test (>= 0.6.3)
regexp_parser (~> 1.2)
xpath (~> 3.2)
childprocess (0.9.0)
ffi (~> 1.0, >= 1.0.11)
chromedriver-helper (2.1.0)
archive-zip (~> 0.10)
nokogiri (~> 1.8)
clipboard-rails (1.7.1)
coderay (1.1.2)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
railties (>= 4.0.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.1.4)
coveralls (0.8.22)
json (>= 1.8, < 3)
Expand Down Expand Up @@ -148,6 +129,8 @@ GEM
factory_bot_rails (5.0.1)
factory_bot (~> 5.0.0)
railties (>= 4.2.0)
faker (1.9.3)
i18n (>= 0.7)
ffi (1.9.25)
font-awesome-rails (4.7.0.4)
railties (>= 3.2, < 6.0)
Expand All @@ -168,7 +151,6 @@ GEM
httpclient (2.8.3)
i18n (1.5.3)
concurrent-ruby (~> 1.0)
io-like (0.3.0)
jaro_winkler (1.5.2)
jbuilder (2.8.0)
activesupport (>= 4.2.0)
Expand Down Expand Up @@ -341,7 +323,6 @@ GEM
ruby-prof (0.17.0)
ruby-progressbar (1.10.0)
ruby_dep (1.5.0)
rubyzip (1.2.2)
sassc (2.0.0)
ffi (~> 1.9.6)
rake
Expand All @@ -353,9 +334,6 @@ GEM
tilt
select2-rails (4.0.3)
thor (~> 0.14)
selenium-webdriver (3.141.0)
childprocess (~> 0.5)
rubyzip (~> 1.2, >= 1.2.2)
shellany (0.0.1)
shoulda-matchers (4.0.0.rc1)
activesupport (>= 4.2.0)
Expand Down Expand Up @@ -429,18 +407,17 @@ DEPENDENCIES
binding_of_caller
bootsnap (>= 1.1.0)
bootstrap (~> 4.3.1)
bootstrap_form (>= 4.2.0)
byebug
capybara (>= 2.15)
chromedriver-helper
clipboard-rails
coffee-rails (~> 4.2)
coveralls
devise
devise-bootstrap-views (~> 1.0)
devise-i18n
execjs
factory_bot_rails
faker!
faker
font-awesome-rails
git
guard
Expand Down Expand Up @@ -470,7 +447,6 @@ DEPENDENCIES
ruby-prof
sassc-rails
select2-rails
selenium-webdriver
shoulda-matchers (= 4.0.0.rc1)
simplecov
spring
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's
// Any JavaScript file within this directory, lib/assets/javascripts, or any plugin's
// vendor/assets/javascripts directory can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
Expand Down
13 changes: 0 additions & 13 deletions app/assets/javascripts/notifications.coffee

This file was deleted.

15 changes: 15 additions & 0 deletions app/assets/javascripts/notifications.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
var check_notifications = function () {
$.ajax({
url: "/notifications/has_any"
}).done(function (response) {
if (response.has_unread_notifications) {
$('#notification-alert').show();
}
});
};

$(document).on('turbolinks:load', function () {
check_notifications();
setInterval(check_notifications, 60000);
});

Loading

0 comments on commit be5b1fd

Please sign in to comment.