|
|
Welches Gem macht was
|
|
|
====================
|
|
|
Ich liste hier zu allen wichtigen Aufgaben auf welches Gem dafür zuständig ist. Ich gehe aus dem Gedächtnis also vielleicht vergesse ich ein oder zwei.
|
|
|
|
|
|
Login und User Management
|
|
|
Hier ist eine Auflistung der verwendeten Gems mit ihren Aufgaben.
|
|
|
|
|
|
|
|
|
Webanwendung
|
|
|
---------------------------
|
|
|
[Devise](https://github.com/plataformatec/devise)
|
|
|
Als Framework für Dozentron wird [rails](https://github.com/rails/rails) zusammen mit [railties](https://github.com/rails/rails/tree/master/railties) verwendet.
|
|
|
Die Anwendung selbst verwendet [puma](https://github.com/puma/puma) als Server, welcher standardmäßig in eine Rails-Anwendung eingebunden ist.
|
|
|
|
|
|
Für Stylesheets wird [sass-rails](https://github.com/rails/sass-rails) benutzt, sowie [slim](https://github.com/slim-template/slim) und [slim-rails](https://github.com/slim-template/slim-rails) für Templates.
|
|
|
|
|
|
Login über CAS
|
|
|
----------------------------
|
|
|
[devise_cas_authenticatable](https://github.com/nbudin/devise_cas_authenticatable)
|
|
|
JavaScript wird mit [therubyracer](https://github.com/cowboyd/therubyracer) ausgeführt. Weitere Laufzeitumgebungen für JavaScript sind in der [Erläuterung von execjs](https://github.com/rails/execjs#readme) einsehbar.
|
|
|
Für CoffeeScript wird zusätzlich [coffee-rails](https://github.com/rails/coffee-rails) benötigt.
|
|
|
|
|
|
Job Backend führt Tests aus
|
|
|
-------------------------------
|
|
|
[Delayed Job](https://github.com/collectiveidea/delayed_job) ist ein Job Backend für Rails Activejobs, das Jobs über die Datenbank managed. Kann ausgetauscht werden, wenn eure neue lösung eine möglichkeit bietet einen Task nach einer definierten Zeit abzubrechen.
|
|
|
Des Weiteren werden für den Betrieb der Webanwendung folgende Gems benötigt:
|
|
|
- [rails-i18n](https://github.com/svenfuchs/rails-i18n) - Support für verschiedene Sprachen
|
|
|
- [font-awesome-rails](https://github.com/bokmann/font-awesome-rails) - Ermöglicht Verwendung von font-awesome in Assets
|
|
|
- [bootstrap_form](https://github.com/bootstrap-ruby/bootstrap_form) - Forms in Bootstrap 4
|
|
|
- [will_paginate-bootstrap](https://github.com/bootstrap-ruby/will_paginate-bootstrap) - Integriert Pagination Komponente
|
|
|
- [inherited_resources](https://github.com/activeadmin/inherited_resources) - Framework für restful Components
|
|
|
- [uglifier](https://github.com/lautis/uglifier) - Komprimierung von JavaScript Assets
|
|
|
- [jquery-rails](https://github.com/rails/jquery-rails) - JQuery Implementierung für rails
|
|
|
- [turbolinks](https://github.com/turbolinks/turbolinks) - Schnellere Navigation
|
|
|
- [jbuilder](https://github.com/rails/jbuilder) - Für JSON APIs
|
|
|
- [redis](https://github.com/redis/redis-rb) - Redis-Adapter für Action Cable
|
|
|
|
|
|
Rechte Management
|
|
|
|
|
|
Login und User-Management
|
|
|
---------------------------
|
|
|
[CanCanCan](https://github.com/CanCanCommunity/cancancan)
|
|
|
Das User-Management wird von [devise](https://github.com/plataformatec/devise) übernommen.
|
|
|
Zudem verwendet Dozentron [devise_cas_authenticatable](https://github.com/nbudin/devise_cas_authenticatable) für die Integration ins CAS.
|
|
|
|
|
|
Datei Upload
|
|
|
-----------------
|
|
|
[Carrierwave](https://github.com/carrierwaveuploader/carrierwave)
|
|
|
Um sichere Speicherung der Zugangsdaten zu ermöglichen, wird [bcrypt](https://github.com/codahale/bcrypt-ruby) benötigt.
|
|
|
|
|
|
Admin Dashboard
|
|
|
-------------------------
|
|
|
[ActiveAdmin](https://github.com/activeadmin/activeadmin)
|
|
|
Die Verwaltung von Rechten wird von [cancancan](https://github.com/CanCanCommunity/cancancan) übernommen. Hinzu kommt [activeadmin](https://github.com/activeadmin/activeadmin), welches das Admin-Panel von Dozentron darstellt.
|
|
|
|
|
|
Datenbank einträge in eine Baumstruktur bringen
|
|
|
--------------------------------------------------
|
|
|
[Ancestry](https://github.com/stefankroes/ancestry)
|
|
|
|
|
|
Deployment
|
|
|
Datenbank
|
|
|
---------------
|
|
|
Für die Datenbankanbindung an MySQL im Production-Environment wird [pg](https://bitbucket.org/ged/ruby-pg/wiki/Home) verwendet.
|
|
|
|
|
|
Im Development-Environment wird SQLite3 verwendet, wozu [sqlite3](https://github.com/sparklemotion/sqlite3-ruby) als Gem benötigt wird.
|
|
|
|
|
|
Zudem gibt es noch ein Gem [ancestry](https://github.com/stefankroes/ancestry), welches es ermöglicht, Datenbankeinträge in eine Baumstruktur zu bringen.
|
|
|
|
|
|
|
|
|
Suche und Autovervollständigung
|
|
|
---------------------------------
|
|
|
Suchfenster werden dargestellt mit [jquery-ui-rails](https://github.com/jquery-ui-rails/jquery-ui-rails).
|
|
|
Die Suchfunktion selbst wird dabei durch [fuzzily](https://github.com/mezis/fuzzily) bereitgestellt.
|
|
|
|
|
|
Die entsprechende Vervollständigung von Suchbegriffen übernimmt [rails-jquery-autocomplete](https://github.com/risuiowa/rails-jquery-autocomplete).
|
|
|
|
|
|
|
|
|
Diagramme und Highlighting
|
|
|
---------------------------
|
|
|
Diagramme und Charts werden mit dem Gem [chartkick](https://github.com/ankane/chartkick) erstellt.
|
|
|
|
|
|
Für das Rendering von Markdown wird [redcarpet](https://github.com/vmg/redcarpet) verwendet.
|
|
|
Das Syntaxhighlighting von Codeblöcken übernimmt [rouge](https://github.com/jneen/rouge) und [rouge-rails](https://github.com/jacobsimeon/rouge-rails).
|
|
|
|
|
|
Unterstützung für AsciiDoc kommt von [asciidoctor](https://github.com/asciidoctor/asciidoctor) mit dem entsprechenden Gem [asciidoctor-rouge](https://github.com/jirutka/asciidoctor-rouge) für Syntaxhighlighting in Codeblöcken.
|
|
|
|
|
|
|
|
|
Upload von Abgaben
|
|
|
--------------------
|
|
|
Der Upload von Abgaben geschieht mit Hilfe von [carrierwave](https://github.com/carrierwaveuploader/carrierwave).
|
|
|
|
|
|
Zudem wird [rubyzip](https://github.com/rubyzip/rubyzip) und [mimemagic](https://github.com/minad/mimemagic) benötigt, um die Abgaben zu validieren und bearbeiten.
|
|
|
|
|
|
Moss
|
|
|
-------
|
|
|
Für die Anbindung an Moss wird ein eigener Gem verwendet, der als Fork der offiziellen Version einige Fehler beim Encoding behebt: [Moss Ruby](https://bitbucket.org/macite/moss-ruby)
|
|
|
|
|
|
|
|
|
Job-Backend für Tests
|
|
|
-----------------------
|
|
|
[Capistrano](https://github.com/capistrano/rails)
|
|
|
Es wird das Job-Backend [delayed_job](https://github.com/collectiveidea/delayed_job) für Rails Activejobs verwendet, welches die Jobverwaltung über die Datenbank macht.
|
|
|
|
|
|
Tests
|
|
|
-------------
|
|
|
[Rspec](https://github.com/rspec/rspec-rails).
|
|
|
[Factory Girl](https://github.com/dscape/factory_girl_rails)
|
|
|
[Capybara](https://github.com/teamcapybara/capybara)
|
|
|
Es ist geplant, diesen Gem zu ersetzen, sobald eine andere Lösung die Möglichkeit bietet, einen Task nach bestimmter Zeit abzubrechen.
|
|
|
|
|
|
Ja Dozentron hat ein paar wenige automatisierte Tests.
|
|
|
|
|
|
Anbindung an Moss
|
|
|
--------------------------
|
|
|
[Moss Ruby](https://bitbucket.org/macite/moss-ruby). Ich benutze einen Fork von mir selbst, der einen encoding fehler behebt.
|
|
|
Tests
|
|
|
--------
|
|
|
Für die automatisierten Tests von Dozentron, werden folgende Gems benötigt:
|
|
|
- [RSpec](https://github.com/rspec/rspec-rails) - RSpec Testing Framework für Rails
|
|
|
- [RSpec API Documentation](https://github.com/zipmark/rspec_api_documentation) - Automatische Dokumentation für RSpec
|
|
|
- [Factory Girl](https://github.com/dscape/factory_girl_rails) - Erstellt Ruby-Objekte für Testzwecke
|
|
|
- [Capybara](https://github.com/teamcapybara/capybara) - Simuliert Interaktion mit der Webanwendung
|
|
|
- [Capybara-Webkit](https://github.com/thoughtbot/capybara-webkit) - Headless-Webkit für Capybara
|
|
|
|
|
|
|
|
|
Diagramme
|
|
|
Deployment
|
|
|
---------------
|
|
|
[Chartkick](https://github.com/ankane/chartkick)
|
|
|
Für das Deployment wird Capistrano verwendet. Eine [Erklärung der verschiedenen Features](dev-guide/deployment) gibt es bereits.
|
|
|
|
|
|
Für die verschiedenen Features von Capistrano werden folgende Gems benötigt:
|
|
|
- [capistrano](https://github.com/capistrano/capistrano) - Automatisches Deployment
|
|
|
- [capistrano-rvm](https://github.com/capistrano/rvm) - Erweiterung für RVM
|
|
|
- [capistrano-bundler](https://github.com/capistrano/bundler) - Erweiterung für Bundler
|
|
|
- [capistrano-rails](https://github.com/capistrano/rails) - Erweiterung für Rails
|
|
|
- [capistrano-systemd](https://github.com/CrBoy/capistrano-systemd) - Erweiterung für Systemd
|
|
|
- [capistrano-maintenance](https://github.com/CrBoy/capistrano-systemd) - Verwaltung des Maintenance-Mode
|
|
|
- [capistrano-pending](https://github.com/a2ikm/capistrano-pending) - Erweiterung für Git und SVN
|
|
|
- [capistrano3-delayed-job](https://github.com/AgileConsultingLLC/capistrano3-delayed-job) - Erweiterung für asynchrone und verzögerte Jobs
|
|
|
- [slackistrano](https://github.com/phallstrom/slackistrano) - Ermöglicht das Senden von Slack-Benachrichtigungen über Capistrano
|
|
|
|
|
|
Die Erweiterungen ermöglichen es Capistrano mit besonderen Eigenschaften und Befehlen des
|
|
|
jeweiligen Frameworks umzugehen und so mit diesem zu interagieren.
|
|
|
|
|
|
|
|
|
Fehlerbehandlung
|
|
|
------------------
|
|
|
Es gibt einige Gems, die für die Fehlerbehandlung verwendet werden und Entwicklern das Leben erleichtern sollen.
|
|
|
|
|
|
Das Gem [web-console](https://github.com/rails/web-console) erlaubt Zugriff auf die IRB-Konsole von einer Fehlerseite aus.
|
|
|
So kann interaktiv mit Ruby-Code ausgeführt werden, wenn ein Fehler auftritt, um so die Umstände des Fehlers besser nachzuvollziehen.
|
|
|
Diese Konsole ist in die Fehlerseiten von [better_errors](https://github.com/BetterErrors/better_errors) integriert.
|
|
|
|
|
|
Diese Gems sind jedoch nur im Development-Environment aktiv und sollte auch nicht in Production verwendet werden.
|
|
|
|
|
|
Für das Production-Environment gibt es [exception-notification](https://github.com/smartinez87/exception_notification), welches automatisch Emails beim Auftreten von Fehlern sendet.
|
|
|
|
|
|
|
|
|
Entwicklung
|
|
|
------------
|
|
|
Verschiedene Gems werden als Tools für die Unterstützung der Entwicklung verwendet und sind daher nicht in Production aktiv.
|
|
|
|
|
|
Zu diesem Gems gehört [listen](https://github.com/guard/listen), welches es ermöglicht auf Dateizugriffe und Änderungen zu reagieren.
|
|
|
|
|
|
Des Weiteren wird [binding_of_caller](https://github.com/banister/binding_of_caller) verwendet, um das Debugging zu vereinfachen.
|
|
|
|
|
|
Zusätzlich wird die Anwendung mit [spring](https://github.com/rails/spring) und [spring-watcher-listen](https://github.com/jonleighton/spring-watcher-listen) gestartet, sodass die Webanwendung nicht jedesmal neugestartet werden muss, wodurch Entwicklung und Tests vereinfacht werden.
|
|
|
|
|
|
Für das Erstellen von Testdaten in der Datenbank wird [faker](https://github.com/stympy/faker) verwendet.
|
|
|
|
|
|
Sonstiges
|
|
|
-------------------
|
|
|
Da nicht immer sichergestellt werden kann, dass das Betriebssystem auf dem Dozentron läuft Zoneinfo-Dateien besitzt, wird teilweise [tzinfo-data](https://github.com/tzinfo/tzinfo-data) benötigt.
|
|
|
|
|
|
Markdown
|
|
|
----------------
|
|
|
[Red Carpet](https://github.com/vmg/redcarpet)
|
|
|
|
|
|
Erweiterungen
|
|
|
----------------------
|
|
|
Damit Dozentron das Testen von Abgaben einer bestimmten Programmiersprache unterstützt, wird ein Plugin für diese Sprache benötigt.
|
|
|
Zur Zeit gibt es ein Gem für:
|
|
|
- Java: [Java-Submission-Tester](https://git.thm.de/dalt40/java-submission-tester)
|
|
|
- Python: [Python-Submission-Test-Runner](https://git.thm.de/dalt40/python_submission_test_runner)
|
|
|
|
|
|
Automatische Mails bei Exceptions
|
|
|
-----------------------------------
|
|
|
[Exception Notification](https://github.com/smartinez87/exception_notification) |
|
|
\ No newline at end of file |