From 35a41e63ebd5f6cf9d17419c150eb53a005d2e87 Mon Sep 17 00:00:00 2001
From: Max Magorsch
Date: Sat, 18 Apr 2020 02:38:35 +0200
Subject: Add the initial version of the rewritten glsamaker
The glsamaker has been completly rewritten in go. It is
using postgres instead of mysql now. The look and feel is
based on tyrian.
Signed-off-by: Max Magorsch
---
.gitignore | 26 +-
.gitlab-ci.yml | 32 +
.rubocop.yml | 27 -
.rubocop_todo.yml | 1369 -
.travis.yml | 29 -
Capfile | 4 -
Dockerfile | 26 +
Dockerfile.dev | 10 +
Gemfile | 60 -
Gemfile.lock | 206 -
LICENSE | 661 -
README | 243 -
Rakefile | 12 -
app/assets/images/biglogo.png | Bin 23122 -> 0 bytes
app/assets/images/cvetool-logo.png | Bin 5036 -> 0 bytes
app/assets/images/icons/access.png | Bin 729 -> 0 bytes
app/assets/images/icons/admin.png | Bin 584 -> 0 bytes
app/assets/images/icons/affected.png | Bin 768 -> 0 bytes
app/assets/images/icons/approval.png | Bin 754 -> 0 bytes
app/assets/images/icons/approved.png | Bin 724 -> 0 bytes
app/assets/images/icons/arch.png | Bin 740 -> 0 bytes
app/assets/images/icons/atom.png | Bin 760 -> 0 bytes
app/assets/images/icons/auto.png | Bin 652 -> 0 bytes
app/assets/images/icons/background-go.png | Bin 558 -> 0 bytes
app/assets/images/icons/background.png | Bin 371 -> 0 bytes
app/assets/images/icons/bug-grey.png | Bin 1444 -> 0 bytes
app/assets/images/icons/bug.png | Bin 704 -> 0 bytes
app/assets/images/icons/bug_add.png | Bin 773 -> 0 bytes
app/assets/images/icons/bug_new.png | Bin 817 -> 0 bytes
app/assets/images/icons/calendar-select-month.png | Bin 627 -> 0 bytes
app/assets/images/icons/checkboxes.png | Bin 512 -> 0 bytes
app/assets/images/icons/close.png | Bin 321 -> 0 bytes
app/assets/images/icons/comment.png | Bin 413 -> 0 bytes
app/assets/images/icons/commented.png | Bin 744 -> 0 bytes
app/assets/images/icons/confidential.png | Bin 778 -> 0 bytes
app/assets/images/icons/delete.png | Bin 663 -> 0 bytes
app/assets/images/icons/diff.png | Bin 616 -> 0 bytes
app/assets/images/icons/dock-right.png | Bin 622 -> 0 bytes
app/assets/images/icons/document-go.png | Bin 613 -> 0 bytes
app/assets/images/icons/document.png | Bin 485 -> 0 bytes
app/assets/images/icons/draft.png | Bin 805 -> 0 bytes
app/assets/images/icons/edit-small.png | Bin 384 -> 0 bytes
app/assets/images/icons/edit.png | Bin 450 -> 0 bytes
app/assets/images/icons/error.png | Bin 874 -> 0 bytes
app/assets/images/icons/flag-green.png | Bin 777 -> 0 bytes
app/assets/images/icons/flag.png | Bin 728 -> 0 bytes
app/assets/images/icons/glsa.png | Bin 649 -> 0 bytes
app/assets/images/icons/glsa_draft.png | Bin 762 -> 0 bytes
app/assets/images/icons/glsa_new.png | Bin 714 -> 0 bytes
app/assets/images/icons/glsa_ready.png | Bin 812 -> 0 bytes
app/assets/images/icons/glsa_request.png | Bin 756 -> 0 bytes
app/assets/images/icons/glsa_sent.png | Bin 760 -> 0 bytes
app/assets/images/icons/impact.png | Bin 742 -> 0 bytes
app/assets/images/icons/info.png | Bin 723 -> 0 bytes
app/assets/images/icons/keyword.png | Bin 730 -> 0 bytes
app/assets/images/icons/larr.png | Bin 539 -> 0 bytes
app/assets/images/icons/less_width.png | Bin 391 -> 0 bytes
app/assets/images/icons/logout.png | Bin 688 -> 0 bytes
app/assets/images/icons/metadata.png | Bin 470 -> 0 bytes
app/assets/images/icons/minus-small.png | Bin 908 -> 0 bytes
app/assets/images/icons/minus.png | Bin 259 -> 0 bytes
app/assets/images/icons/more_width.png | Bin 440 -> 0 bytes
app/assets/images/icons/next.png | Bin 658 -> 0 bytes
app/assets/images/icons/not-approved.png | Bin 729 -> 0 bytes
app/assets/images/icons/note.png | Bin 435 -> 0 bytes
app/assets/images/icons/ok.png | Bin 744 -> 0 bytes
app/assets/images/icons/package-add.png | Bin 634 -> 0 bytes
app/assets/images/icons/package-go.png | Bin 656 -> 0 bytes
app/assets/images/icons/package-remove.png | Bin 554 -> 0 bytes
app/assets/images/icons/package.png | Bin 524 -> 0 bytes
app/assets/images/icons/paste.png | Bin 605 -> 0 bytes
app/assets/images/icons/pending.png | Bin 748 -> 0 bytes
app/assets/images/icons/permission.png | Bin 612 -> 0 bytes
app/assets/images/icons/plus-small.png | Bin 992 -> 0 bytes
app/assets/images/icons/plus.png | Bin 476 -> 0 bytes
app/assets/images/icons/profile.png | Bin 533 -> 0 bytes
app/assets/images/icons/public.png | Bin 687 -> 0 bytes
app/assets/images/icons/reference-add.png | Bin 630 -> 0 bytes
app/assets/images/icons/reference-remove.png | Bin 585 -> 0 bytes
app/assets/images/icons/reference.png | Bin 537 -> 0 bytes
app/assets/images/icons/refresh.png | Bin 835 -> 0 bytes
app/assets/images/icons/rejection.png | Bin 866 -> 0 bytes
app/assets/images/icons/request.png | Bin 703 -> 0 bytes
app/assets/images/icons/resolution-go.png | Bin 845 -> 0 bytes
app/assets/images/icons/resolution.png | Bin 687 -> 0 bytes
app/assets/images/icons/restricted.png | Bin 501 -> 0 bytes
app/assets/images/icons/sent.png | Bin 640 -> 0 bytes
app/assets/images/icons/severity.png | Bin 621 -> 0 bytes
app/assets/images/icons/stamp.png | Bin 621 -> 0 bytes
app/assets/images/icons/status-green.png | Bin 433 -> 0 bytes
app/assets/images/icons/status-grey.png | Bin 448 -> 0 bytes
app/assets/images/icons/status-red.png | Bin 439 -> 0 bytes
app/assets/images/icons/status-yellow.png | Bin 457 -> 0 bytes
app/assets/images/icons/switch.png | Bin 541 -> 0 bytes
app/assets/images/icons/synopsis.png | Bin 522 -> 0 bytes
app/assets/images/icons/template.png | Bin 630 -> 0 bytes
app/assets/images/icons/time.png | Bin 854 -> 0 bytes
app/assets/images/icons/title.png | Bin 534 -> 0 bytes
app/assets/images/icons/toolbox.png | Bin 501 -> 0 bytes
app/assets/images/icons/txt.png | Bin 592 -> 0 bytes
app/assets/images/icons/unaffected.png | Bin 801 -> 0 bytes
app/assets/images/icons/user.png | Bin 511 -> 0 bytes
app/assets/images/icons/user_add.png | Bin 746 -> 0 bytes
app/assets/images/icons/warning.png | Bin 666 -> 0 bytes
app/assets/images/icons/workaround-no.png | Bin 789 -> 0 bytes
app/assets/images/icons/workaround.png | Bin 778 -> 0 bytes
app/assets/images/icons/xml.png | Bin 630 -> 0 bytes
app/assets/images/icons/zoom_100.png | Bin 772 -> 0 bytes
app/assets/images/icons/zoom_in.png | Bin 765 -> 0 bytes
app/assets/images/icons/zoom_out.png | Bin 742 -> 0 bytes
app/assets/images/intel-editor.png | Bin 1316 -> 0 bytes
app/assets/images/line.png | Bin 42782 -> 0 bytes
app/assets/images/login-bg.png | Bin 32753 -> 0 bytes
app/assets/images/logo.png | Bin 10091 -> 0 bytes
app/assets/images/menu-left.png | Bin 1314 -> 0 bytes
app/assets/images/menu-right.png | Bin 1398 -> 0 bytes
app/assets/images/menubg.png | Bin 1412 -> 0 bytes
app/assets/images/rails.png | Bin 6646 -> 0 bytes
app/assets/images/separator.png | Bin 212 -> 0 bytes
app/assets/images/spinner.gif | Bin 7823 -> 0 bytes
app/assets/javascripts/application.js | 14 -
app/assets/javascripts/glsamaker.js.erb | 151 -
app/assets/javascripts/glsamaker_edit.js | 181 -
app/assets/javascripts/glsamaker_misc.js | 102 -
app/assets/javascripts/jsui.js | 8 -
app/assets/javascripts/modalbox.js | 593 -
app/assets/javascripts/searchable.js | 71 -
app/assets/javascripts/uki-more.js | 827 -
app/assets/javascripts/uki.js | 8022 ---
app/assets/stylesheets/admin.css | 54 -
app/assets/stylesheets/application.css | 10 -
app/assets/stylesheets/cve.css | 23 -
app/assets/stylesheets/login.css | 91 -
app/assets/stylesheets/modalbox.css | 122 -
app/assets/stylesheets/screen.css.erb | 662 -
app/controllers/admin/index_controller.rb | 6 -
app/controllers/admin/templates_controller.rb | 85 -
app/controllers/admin/users_controller.rb | 71 -
app/controllers/application_controller.rb | 32 -
app/controllers/bug_controller.rb | 39 -
app/controllers/bugs_controller.rb | 59 -
app/controllers/comments_controller.rb | 76 -
app/controllers/cve_controller.rb | 323 -
app/controllers/glsa_controller.rb | 562 -
app/controllers/index_controller.rb | 65 -
app/controllers/search_controller.rb | 37 -
app/controllers/tools_controller.rb | 86 -
app/helpers/admin/index_helper.rb | 2 -
app/helpers/admin/templates_helper.rb | 6 -
app/helpers/admin/users_helper.rb | 18 -
app/helpers/application_helper.rb | 168 -
app/helpers/bug_helper.rb | 8 -
app/helpers/bugs_helper.rb | 2 -
app/helpers/comments_helper.rb | 2 -
app/helpers/cve_helper.rb | 14 -
app/helpers/glsa_helper.rb | 200 -
app/helpers/index_helper.rb | 14 -
app/helpers/search_helper.rb | 2 -
app/helpers/tools_helper.rb | 14 -
app/indices/indices.rb | 34 -
app/mailers/.gitkeep | 0
app/mailers/glsa_mailer.rb | 45 -
app/models/.gitkeep | 0
app/models/bug.rb | 46 -
app/models/comment.rb | 44 -
app/models/cpe.rb | 29 -
app/models/cve.rb | 177 -
app/models/cve_assignment.rb | 3 -
app/models/cve_change.rb | 4 -
app/models/cve_comment.rb | 4 -
app/models/cve_reference.rb | 3 -
app/models/glsa.rb | 311 -
app/models/package.rb | 48 -
app/models/reference.rb | 15 -
app/models/revision.rb | 103 -
app/models/template.rb | 2 -
app/models/user.rb | 65 -
app/views/admin/index/index.html.erb | 6 -
app/views/admin/templates/_form.html.erb | 35 -
app/views/admin/templates/edit.html.erb | 8 -
app/views/admin/templates/index.html.erb | 23 -
app/views/admin/templates/new.html.erb | 7 -
app/views/admin/templates/show.html.erb | 26 -
app/views/admin/users/_user.html.erb | 9 -
app/views/admin/users/create.html.erb | 2 -
app/views/admin/users/destroy.html.erb | 2 -
app/views/admin/users/edit.html.erb | 50 -
app/views/admin/users/index.html.erb | 19 -
app/views/admin/users/new.html.erb | 47 -
app/views/admin/users/show.html.erb | 34 -
app/views/admin/users/update.html.erb | 2 -
app/views/bug/bug.html.erb | 58 -
app/views/bug/history.html.erb | 43 -
app/views/bugs/create.html.erb | 2 -
app/views/bugs/create.js.erb | 6 -
app/views/bugs/destroy.html.erb | 2 -
app/views/bugs/new.html.erb | 34 -
app/views/bugs/show.html.erb | 2 -
app/views/comments/create.js.erb | 10 -
app/views/comments/destroy.html.erb | 2 -
app/views/comments/new.html.erb | 25 -
app/views/comments/show.html.erb | 2 -
app/views/cve/_assigning.js.erb | 94 -
app/views/cve/_filing.js.erb | 170 -
app/views/cve/_invalidate.js.erb | 71 -
app/views/cve/_key_events.js.erb | 71 -
app/views/cve/_later.js.erb | 65 -
app/views/cve/_new.js.erb | 75 -
app/views/cve/_nfu.js.erb | 65 -
app/views/cve/_toolbar.js.erb | 54 -
app/views/cve/_ui_misc.js.erb | 115 -
app/views/cve/actions.html.erb | 5 -
app/views/cve/assign_preview.html.erb | 17 -
app/views/cve/bug_preview.html.erb | 81 -
app/views/cve/changes.html.erb | 10 -
app/views/cve/comments.html.erb | 10 -
app/views/cve/general_info.html.erb | 11 -
app/views/cve/index.html.erb | 0
app/views/cve/info.html.erb | 140 -
app/views/cve/info.json.jbuilder | 5 -
app/views/cve/list.html.erb | 135 -
app/views/cve/new_preview.html.erb | 7 -
app/views/cve/packages.html.erb | 22 -
app/views/cve/references.html.erb | 10 -
app/views/glsa/_approval_row.erb | 5 -
app/views/glsa/_close_msg.txt.erb | 3 -
app/views/glsa/_comment.html.erb | 27 -
app/views/glsa/_comments.html.erb | 11 -
app/views/glsa/_edit_bug_row.html.erb | 13 -
app/views/glsa/_email_headers.txt.erb | 3 -
app/views/glsa/_glsa.xml.builder | 74 -
app/views/glsa/_glsa_row.html.erb | 31 -
app/views/glsa/_package.html.erb | 16 -
app/views/glsa/_reference.html.erb | 10 -
app/views/glsa/_show_bug_row.html.erb | 7 -
app/views/glsa/_show_package_row.txt.erb | 49 -
app/views/glsa/_show_reference.txt.erb | 2 -
app/views/glsa/_status_legend.html.erb | 38 -
app/views/glsa/_template_popups.html.erb | 8 -
app/views/glsa/archive.html.erb | 26 -
app/views/glsa/archive.js.erb | 2 -
app/views/glsa/comment.html.erb | 2 -
app/views/glsa/create.html.erb | 2 -
app/views/glsa/destroy.html.erb | 2 -
app/views/glsa/diff.html.erb | 19 -
app/views/glsa/drafts.html.erb | 16 -
app/views/glsa/edit.html.erb | 177 -
app/views/glsa/finalize_release.html.erb | 29 -
app/views/glsa/import_references.html.erb | 16 -
app/views/glsa/new-draft.html.erb | 1 -
app/views/glsa/new-request.html.erb | 60 -
app/views/glsa/new.html.erb | 11 -
app/views/glsa/prepare_release.html.erb | 112 -
app/views/glsa/release.html.erb | 31 -
app/views/glsa/requests.html.erb | 16 -
app/views/glsa/show.html.erb | 158 -
app/views/glsa/show.txt.erb | 116 -
app/views/glsa/show.xml.erb | 1 -
app/views/glsa/update.html.erb | 2 -
app/views/glsa_mailer/approval.text.erb | 23 -
app/views/glsa_mailer/comment.text.erb | 8 -
app/views/glsa_mailer/edit.text.erb | 8 -
app/views/glsa_mailer/new_request.text.erb | 13 -
app/views/glsa_mailer/text.text.erb | 4 -
app/views/index/about.html.erb | 29 -
app/views/index/error-access.html.erb | 7 -
app/views/index/error-disabled.html.erb | 5 -
app/views/index/error-system.html.erb | 8 -
app/views/index/error-user.html.erb | 7 -
app/views/index/index.html.erb | 18 -
app/views/index/profile.html.erb | 34 -
app/views/layouts/application.html.erb | 96 -
app/views/layouts/cve.html.erb | 16 -
app/views/layouts/none.html.erb | 1 -
app/views/layouts/notice.html.erb | 24 -
app/views/search/_cve_row.html.erb | 6 -
app/views/search/_cves.html.erb | 13 -
app/views/search/_glsas.html.erb | 14 -
app/views/search/results.html.erb | 19 -
app/views/tools/_cve.html.erb | 4 -
app/views/tools/ajaxbugs.html.erb | 10 -
app/views/tools/ajaxdescr.html.erb | 3 -
app/views/tools/background.html.erb | 3 -
app/views/tools/template.js.erb | 7 -
assets/.keep | 0
bin/.keep | 0
bin/bundle | 3 -
bin/rails | 4 -
bin/rake | 4 -
bin/setup | 29 -
config.ru | 4 -
config/application.rb | 38 -
config/boot.rb | 3 -
config/database.yml.mysql | 42 -
config/deploy.rb | 37 -
config/environment.rb | 9 -
config/environments/development.rb | 41 -
config/environments/production.rb | 83 -
config/environments/test.rb | 42 -
config/initializers/assets.rb | 11 -
config/initializers/backtrace_silencers.rb | 7 -
config/initializers/cookies_serializer.rb | 3 -
config/initializers/filter_parameter_logging.rb | 4 -
config/initializers/glsamaker-global.rb | 2 -
config/initializers/glsamaker.rb.sample | 48 -
config/initializers/glsamaker_constants.rb | 1 -
config/initializers/inflections.rb | 20 -
config/initializers/mime_types.rb | 7 -
config/initializers/session_store.rb | 3 -
config/initializers/time_formats.rb | 1 -
config/initializers/wrap_parameters.rb | 14 -
config/locales/en.yml | 23 -
config/routes.rb | 96 -
config/secrets.yml | 22 -
config/thinking_sphinx.yml | 9 -
db/migrate/20090314092539_create_users.rb | 21 -
db/migrate/20090314191650_create_glsas.rb | 22 -
.../20090314194257_add_glsa_user_constraints.rb | 13 -
db/migrate/20090314194659_create_revisions.rb | 32 -
db/migrate/20090314230516_create_references.rb | 18 -
db/migrate/20090315105049_create_bugs.rb | 19 -
...15105326_add_references_revisions_constraint.rb | 9 -
db/migrate/20090315110025_create_comments.rb | 18 -
.../20090315110119_add_comment_constraints.rb | 11 -
.../20090410212514_add_user_id_to_revisions.rb | 9 -
...90410212600_add_revisions_user_id_constraint.rb | 9 -
db/migrate/20090419140216_create_sessions.rb | 16 -
.../20090501114107_add_status_cache_to_bugs.rb | 11 -
...20100511192546_change_comment_type_to_rating.rb | 9 -
db/migrate/20100513183324_create_packages.rb | 21 -
db/migrate/20100813183543_create_cves.rb | 19 -
db/migrate/20100814103856_create_cve_references.rb | 19 -
db/migrate/20100814105152_create_cve_comments.rb | 21 -
db/migrate/20100814105345_create_cve_changes.rb | 20 -
db/migrate/20100814142647_create_cpes.rb | 27 -
.../20100902093457_create_cve_assignments.rb | 23 -
db/migrate/20100918223549_add_system_user.rb | 12 -
...20110226204724_add_release_flag_to_revisions.rb | 11 -
db/migrate/20110827143514_create_templates.rb | 12 -
...0110829174909_add_first_release_date_to_glsa.rb | 5 -
db/migrate/20170418102638_add_slots_to_packages.rb | 11 -
db/schema.rb | 239 -
db/seeds.rb | 7 -
doc/README_FOR_APP | 29 -
doc/app/Admin.html | 278 -
doc/app/Admin/IndexController.html | 317 -
doc/app/Admin/IndexHelper.html | 261 -
doc/app/Admin/TemplatesController.html | 569 -
doc/app/Admin/TemplatesHelper.html | 310 -
doc/app/Admin/UsersController.html | 568 -
doc/app/Admin/UsersHelper.html | 354 -
doc/app/ApplicationController.html | 344 -
doc/app/ApplicationHelper.html | 661 -
doc/app/Authentication.html | 464 -
doc/app/Authorization.html | 435 -
doc/app/Bug.html | 423 -
doc/app/BugController.html | 383 -
doc/app/BugHelper.html | 311 -
doc/app/BugsController.html | 449 -
doc/app/BugsHelper.html | 261 -
doc/app/Bugzilla.html | 619 -
doc/app/Bugzilla/Bug.html | 859 -
doc/app/Bugzilla/Bugzilla.html | 268 -
doc/app/Bugzilla/Bugzilla/Bugzilla.html | 268 -
doc/app/Bugzilla/Bugzilla/Bugzilla/Change.html | 461 -
doc/app/Bugzilla/Comment.html | 372 -
doc/app/Bugzilla/History.html | 470 -
doc/app/Comment.html | 293 -
doc/app/Comment/CommentValidator.html | 328 -
doc/app/CommentsController.html | 459 -
doc/app/CommentsHelper.html | 261 -
doc/app/Cpe.html | 434 -
doc/app/Cve.html | 821 -
doc/app/CveAssignment.html | 269 -
doc/app/CveChange.html | 269 -
doc/app/CveComment.html | 269 -
doc/app/CveController.html | 1175 -
doc/app/CveHelper.html | 318 -
doc/app/CveReference.html | 269 -
doc/app/GLSAReleaseError.html | 269 -
doc/app/Glsa.html | 1086 -
doc/app/GlsaController.html | 1231 -
doc/app/GlsaHelper.html | 876 -
doc/app/GlsaMailer.html | 440 -
doc/app/Glsamaker.html | 388 -
doc/app/Glsamaker/Bugs.html | 279 -
doc/app/Glsamaker/Bugs/ArchesMixin.html | 310 -
doc/app/Glsamaker/Bugs/Bug.html | 376 -
doc/app/Glsamaker/Bugs/BugReadyMixin.html | 317 -
doc/app/Glsamaker/Bugs/Status.html | 580 -
doc/app/Glsamaker/Bugs/StatusMixin.html | 320 -
doc/app/Glsamaker/Diff.html | 338 -
doc/app/Glsamaker/HTTP.html | 323 -
doc/app/Glsamaker/Helper.html | 285 -
doc/app/Glsamaker/Mail.html | 498 -
doc/app/Glsamaker/Portage.html | 567 -
doc/app/Glsamaker/Portage/Description.html | 436 -
doc/app/Glsamaker/XML.html | 323 -
doc/app/IndexController.html | 487 -
doc/app/IndexHelper.html | 263 -
doc/app/Package.html | 332 -
doc/app/Reference.html | 271 -
doc/app/Revision.html | 524 -
doc/app/SearchController.html | 378 -
doc/app/SearchHelper.html | 261 -
doc/app/String.html | 435 -
doc/app/Template.html | 269 -
doc/app/ToolsController.html | 448 -
doc/app/ToolsHelper.html | 263 -
doc/app/User.html | 444 -
.../app/controllers/admin/index_controller_rb.html | 52 -
.../controllers/admin/templates_controller_rb.html | 52 -
.../app/controllers/admin/users_controller_rb.html | 52 -
.../app/controllers/application_controller_rb.html | 64 -
doc/app/app/controllers/bug_controller_rb.html | 64 -
doc/app/app/controllers/bugs_controller_rb.html | 63 -
.../app/controllers/comments_controller_rb.html | 63 -
doc/app/app/controllers/cve_controller_rb.html | 52 -
doc/app/app/controllers/glsa_controller_rb.html | 64 -
doc/app/app/controllers/index_controller_rb.html | 64 -
doc/app/app/controllers/search_controller_rb.html | 52 -
doc/app/app/controllers/tools_controller_rb.html | 64 -
doc/app/app/helpers/admin/index_helper_rb.html | 52 -
doc/app/app/helpers/admin/templates_helper_rb.html | 52 -
doc/app/app/helpers/admin/users_helper_rb.html | 52 -
doc/app/app/helpers/application_helper_rb.html | 65 -
doc/app/app/helpers/bug_helper_rb.html | 52 -
doc/app/app/helpers/bugs_helper_rb.html | 52 -
doc/app/app/helpers/comments_helper_rb.html | 52 -
doc/app/app/helpers/cve_helper_rb.html | 52 -
doc/app/app/helpers/glsa_helper_rb.html | 64 -
doc/app/app/helpers/index_helper_rb.html | 64 -
doc/app/app/helpers/search_helper_rb.html | 52 -
doc/app/app/helpers/tools_helper_rb.html | 64 -
doc/app/app/mailers/glsa_mailer_rb.html | 52 -
doc/app/app/models/bug_rb.html | 64 -
doc/app/app/models/comment_rb.html | 64 -
doc/app/app/models/cpe_rb.html | 63 -
doc/app/app/models/cve_assignment_rb.html | 52 -
doc/app/app/models/cve_change_rb.html | 52 -
doc/app/app/models/cve_comment_rb.html | 52 -
doc/app/app/models/cve_rb.html | 65 -
doc/app/app/models/cve_reference_rb.html | 52 -
doc/app/app/models/glsa_rb.html | 64 -
doc/app/app/models/package_rb.html | 64 -
doc/app/app/models/reference_rb.html | 64 -
doc/app/app/models/revision_rb.html | 66 -
doc/app/app/models/template_rb.html | 52 -
doc/app/app/models/user_rb.html | 64 -
doc/app/created.rid | 56 -
doc/app/doc/README_FOR_APP.html | 260 -
doc/app/images/brick.png | Bin 452 -> 0 bytes
doc/app/images/brick_link.png | Bin 764 -> 0 bytes
doc/app/images/bug.png | Bin 774 -> 0 bytes
doc/app/images/bullet_black.png | Bin 211 -> 0 bytes
doc/app/images/bullet_toggle_minus.png | Bin 207 -> 0 bytes
doc/app/images/bullet_toggle_plus.png | Bin 209 -> 0 bytes
doc/app/images/date.png | Bin 626 -> 0 bytes
doc/app/images/find.png | Bin 659 -> 0 bytes
doc/app/images/loadingAnimation.gif | Bin 5886 -> 0 bytes
doc/app/images/macFFBgHack.png | Bin 207 -> 0 bytes
doc/app/images/package.png | Bin 853 -> 0 bytes
doc/app/images/page_green.png | Bin 621 -> 0 bytes
doc/app/images/page_white_text.png | Bin 342 -> 0 bytes
doc/app/images/page_white_width.png | Bin 309 -> 0 bytes
doc/app/images/plugin.png | Bin 591 -> 0 bytes
doc/app/images/ruby.png | Bin 592 -> 0 bytes
doc/app/images/tag_green.png | Bin 613 -> 0 bytes
doc/app/images/wrench.png | Bin 610 -> 0 bytes
doc/app/images/wrench_orange.png | Bin 584 -> 0 bytes
doc/app/images/zoom.png | Bin 692 -> 0 bytes
doc/app/index.html | 612 -
doc/app/js/darkfish.js | 116 -
doc/app/js/jquery.js | 32 -
doc/app/js/quicksearch.js | 114 -
doc/app/js/thickbox-compressed.js | 10 -
doc/app/lib/authentication_rb.html | 64 -
doc/app/lib/authorization_rb.html | 63 -
doc/app/lib/bugzilla/bug_rb.html | 63 -
doc/app/lib/bugzilla/comment_rb.html | 63 -
doc/app/lib/bugzilla/history_rb.html | 54 -
doc/app/lib/bugzilla_rb.html | 72 -
doc/app/lib/glsamaker/bugs_rb.html | 66 -
doc/app/lib/glsamaker/diff_rb.html | 69 -
doc/app/lib/glsamaker/helpers_rb.html | 63 -
doc/app/lib/glsamaker/http_rb.html | 68 -
doc/app/lib/glsamaker/mail_rb.html | 63 -
doc/app/lib/glsamaker/portage_rb.html | 66 -
doc/app/lib/glsamaker/xml_rb.html | 63 -
doc/app/lib/glsamaker_rb.html | 76 -
doc/app/lib/tasks/utils_rb.html | 64 -
doc/app/rdoc.css | 763 -
doc/diagrams/models.dot | 18 -
doc/diagrams/models.png | Bin 112432 -> 0 bytes
docker-compose.override.yml | 60 +
docker-compose.yml | 55 +
glsamaker.go | 60 +
go.mod | 13 +
go.sum | 739 +
lib/assets/.gitkeep | 0
lib/authentication.rb | 111 -
lib/authorization.rb | 49 -
lib/bugzilla.rb | 195 -
lib/bugzilla/bug.rb | 143 -
lib/bugzilla/comment.rb | 22 -
lib/bugzilla/history.rb | 104 -
lib/glsamaker.rb | 23 -
lib/glsamaker/bugs.rb | 182 -
lib/glsamaker/diff.rb | 53 -
lib/glsamaker/helpers.rb | 21 -
lib/glsamaker/http.rb | 37 -
lib/glsamaker/mail.rb | 106 -
lib/glsamaker/portage.rb | 194 -
lib/glsamaker/spelling.rb | 48 -
lib/glsamaker/xml.rb | 31 -
lib/kramdown_ext.rb | 20 -
lib/tasks/.gitkeep | 0
lib/tasks/cve.rake | 366 -
lib/tasks/import.rake | 256 -
lib/tasks/rcov.rake | 81 -
lib/tasks/utils.rb | 35 -
package-lock.json | 8682 +++
package.json | 41 +
pkg/app/handler/about/index.go | 28 +
pkg/app/handler/about/utils.go | 58 +
pkg/app/handler/account/password.go | 109 +
pkg/app/handler/account/twofactor.go | 200 +
pkg/app/handler/admin/edit.go | 293 +
pkg/app/handler/admin/index.go | 27 +
pkg/app/handler/admin/passwordreset.go | 73 +
pkg/app/handler/admin/utils.go | 112 +
pkg/app/handler/all/index.go | 40 +
pkg/app/handler/all/utils.go | 36 +
pkg/app/handler/archive/index.go | 44 +
pkg/app/handler/archive/utils.go | 36 +
pkg/app/handler/authentication/accessDenied.go | 10 +
.../authentication/auth_session/authsession.go | 177 +
pkg/app/handler/authentication/login.go | 100 +
pkg/app/handler/authentication/logout.go | 29 +
pkg/app/handler/authentication/templates/admin.go | 36 +
pkg/app/handler/authentication/templates/login.go | 32 +
pkg/app/handler/authentication/templates/totp.go | 23 +
.../handler/authentication/templates/webauthn.go | 23 +
pkg/app/handler/authentication/totp/totp.go | 60 +
pkg/app/handler/authentication/utils/utils.go | 81 +
pkg/app/handler/authentication/webauthn/login.go | 118 +
.../handler/authentication/webauthn/register.go | 111 +
pkg/app/handler/cvetool/bug.go | 85 +
pkg/app/handler/cvetool/comments.go | 74 +
pkg/app/handler/cvetool/index.go | 169 +
pkg/app/handler/cvetool/state.go | 75 +
pkg/app/handler/cvetool/update.go | 23 +
pkg/app/handler/cvetool/utils.go | 47 +
pkg/app/handler/dashboard/index.go | 58 +
pkg/app/handler/dashboard/utils.go | 44 +
pkg/app/handler/drafts/index.go | 44 +
pkg/app/handler/drafts/utils.go | 37 +
pkg/app/handler/glsa/bugs.go | 63 +
pkg/app/handler/glsa/comments.go | 110 +
pkg/app/handler/glsa/delete.go | 42 +
pkg/app/handler/glsa/edit.go | 185 +
pkg/app/handler/glsa/release.go | 70 +
pkg/app/handler/glsa/utils.go | 79 +
pkg/app/handler/glsa/view.go | 48 +
pkg/app/handler/home/index.go | 16 +
pkg/app/handler/home/utils.go | 34 +
pkg/app/handler/newRequest/index.go | 186 +
pkg/app/handler/newRequest/utils.go | 36 +
pkg/app/handler/requests/index.go | 44 +
pkg/app/handler/requests/utils.go | 36 +
pkg/app/handler/search/index.go | 126 +
pkg/app/handler/search/utils.go | 38 +
pkg/app/handler/statistics/index.go | 42 +
pkg/app/handler/statistics/utils.go | 48 +
pkg/app/serve.go | 214 +
pkg/app/utils.go | 89 +
pkg/config/config.go | 63 +
pkg/cveimport/update.go | 96 +
pkg/database/connection/connection.go | 42 +
pkg/database/init.go | 23 +
pkg/database/schema/create.go | 36 +
pkg/logger/loggers.go | 39 +
pkg/models/application.go | 69 +
pkg/models/bugzilla/bugs.go | 156 +
pkg/models/cve/cve.go | 86 +
pkg/models/cve/cvss.go | 62 +
pkg/models/cve/feed.go | 116 +
pkg/models/glsa.go | 115 +
pkg/models/gpackage/package.go | 11 +
pkg/models/session.go | 15 +
pkg/models/users/user.go | 214 +
public/404.html | 30 -
public/422.html | 26 -
public/500.html | 29 -
public/error-404.png | Bin 18691 -> 0 bytes
public/error-500.png | Bin 7810 -> 0 bytes
public/favicon.ico | 0
public/robots.txt | 5 -
public/xsl/ads.xsl | 103 -
public/xsl/content.xsl | 35 -
public/xsl/devmap.xsl | 86 -
public/xsl/doc-struct.xsl | 185 -
public/xsl/glsa.xsl | 412 -
public/xsl/guide.xsl | 2015 -
public/xsl/handbook.xsl | 323 -
public/xsl/inserts.xsl | 401 -
public/xsl/mail.xsl | 183 -
public/xsl/menu.xsl | 57 -
public/xsl/util.xsl | 62 -
script/config_init | 44 -
script/db-backup | 29 -
script/rails | 6 -
script/update-portage-cache | 14 -
test/fixtures/.gitkeep | 0
test/fixtures/bugs.yml | 11 -
test/fixtures/comments.yml | 13 -
test/fixtures/cpes.yml | 7 -
test/fixtures/cve_assignments.yml | 9 -
test/fixtures/cve_changes.yml | 7 -
test/fixtures/cve_comments.yml | 7 -
test/fixtures/cve_references.yml | 7 -
test/fixtures/cves.yml | 13 -
test/fixtures/glsa_mailer/approval | 3 -
test/fixtures/glsa_mailer/comment | 3 -
test/fixtures/glsa_mailer/edit | 3 -
test/fixtures/glsa_mailer/request | 3 -
test/fixtures/glsa_mailer/sent | 3 -
test/fixtures/glsas.yml | 24 -
test/fixtures/packages.yml | 19 -
test/fixtures/references.yml | 11 -
test/fixtures/revisions.yml | 58 -
test/fixtures/templates.yml | 13 -
test/fixtures/users.yml | 49 -
test/functional/.gitkeep | 0
test/functional/admin/index_controller_test.rb | 15 -
test/functional/admin/templates_controller_test.rb | 56 -
test/functional/admin/users_controller_test.rb | 15 -
test/functional/bug_controller_test.rb | 8 -
test/functional/bugs_controller_test.rb | 4 -
test/functional/comments_controller_test.rb | 4 -
test/functional/cve_controller_test.rb | 8 -
test/functional/glsa_controller_test.rb | 83 -
test/functional/glsa_mailer_test.rb | 7 -
test/functional/index_controller_test.rb | 8 -
test/functional/search_controller_test.rb | 7 -
test/functional/tools_controller_test.rb | 8 -
test/integration/.gitkeep | 0
test/integration/authentication_test.rb | 20 -
test/test_helper.rb | 48 -
test/unit/.gitkeep | 0
test/unit/bug_test.rb | 8 -
test/unit/comment_test.rb | 54 -
test/unit/cpe_test.rb | 8 -
test/unit/cve_assignment_test.rb | 8 -
test/unit/cve_change_test.rb | 8 -
test/unit/cve_comment_test.rb | 8 -
test/unit/cve_reference_test.rb | 8 -
test/unit/cve_test.rb | 92 -
test/unit/glsa_mailer_test.rb | 4 -
test/unit/glsa_test.rb | 55 -
test/unit/helpers/bug_helper_test.rb | 4 -
test/unit/helpers/bugs_helper_test.rb | 4 -
test/unit/helpers/comments_helper_test.rb | 4 -
test/unit/helpers/cve_helper_test.rb | 4 -
test/unit/helpers/glsa_helper_test.rb | 4 -
test/unit/helpers/index_helper_test.rb | 4 -
test/unit/helpers/search_helper_test.rb | 4 -
test/unit/helpers/templates_helper_test.rb | 4 -
test/unit/helpers/tools_helper_test.rb | 4 -
test/unit/helpers/user_helper_test.rb | 4 -
test/unit/package_test.rb | 8 -
test/unit/reference_test.rb | 8 -
test/unit/revision_test.rb | 47 -
test/unit/template_test.rb | 7 -
test/unit/user_test.rb | 47 -
tmp/cache/.gitignore | 0
tmp/pids/.gitignore | 0
tmp/sessions/.gitignore | 0
tmp/sockets/.gitignore | 0
vendor/assets/stylesheets/.gitkeep | 0
vendor/dictionaries/README_en_US.txt | 278 -
vendor/dictionaries/en_US.aff | 3107 --
vendor/dictionaries/en_US.dic | 52895 -------------------
vendor/plugins/.gitignore | 0
vendor/plugins/.gitkeep | 0
web/packs/account.js | 81 +
web/packs/admin.js | 60 +
web/packs/application.js | 69 +
web/packs/edit.js | 235 +
web/packs/glsa.js | 114 +
web/packs/newglsa.js | 58 +
web/packs/src/javascript/all.js | 37 +
web/packs/src/javascript/archive.js | 42 +
web/packs/src/javascript/cvetool.js | 535 +
web/packs/src/javascript/drafts.js | 38 +
web/packs/src/javascript/requests.js | 37 +
web/packs/src/stylesheets/application.scss | 11 +
web/packs/src/stylesheets/index.scss | 27 +
web/packs/statistics.js | 15 +
web/packs/stylesheets.js | 1 +
web/templates/about/about.tmpl | 31 +
web/templates/about/aboutCLI.tmpl | 30 +
web/templates/about/aboutSearch.tmpl | 71 +
web/templates/account/2fa.tmpl | 186 +
web/templates/account/password/forcedchange.tmpl | 98 +
web/templates/account/password/normalchange.tmpl | 45 +
web/templates/account/password/password.tmpl | 5 +
web/templates/admin/components/global.tmpl | 45 +
web/templates/admin/components/permissions.tmpl | 424 +
web/templates/admin/components/templates.tmpl | 10 +
web/templates/admin/components/users.tmpl | 226 +
web/templates/admin/edit/permissions.tmpl | 36 +
web/templates/admin/edit/users.tmpl | 37 +
web/templates/admin/passwordreset.tmpl | 35 +
web/templates/admin/view.tmpl | 41 +
web/templates/all/all.tmpl | 86 +
web/templates/archive/archive.tmpl | 75 +
web/templates/authentication/accessDenied.tmpl | 26 +
web/templates/authentication/login.tmpl | 113 +
web/templates/authentication/totp.tmpl | 94 +
web/templates/authentication/webauthn.tmpl | 204 +
web/templates/dashboard/dashboard.tmpl | 158 +
web/templates/drafts/drafts.tmpl | 84 +
web/templates/glsa/edit.tmpl | 768 +
web/templates/glsa/show.tmpl | 495 +
web/templates/home/home.tmpl | 166 +
web/templates/index/show.tmpl | 85 +
web/templates/index/showFullscreen.tmpl | 80 +
web/templates/layout/footer.tmpl | 50 +
web/templates/layout/head.tmpl | 12 +
web/templates/layout/header.tmpl | 6 +
web/templates/layout/sitetitle.tmpl | 37 +
web/templates/layout/tyriannav.tmpl | 72 +
web/templates/new/new.tmpl | 282 +
web/templates/requests/requests.tmpl | 84 +
web/templates/search/search.tmpl | 84 +
web/templates/statistics/statistics.tmpl | 89 +
webpack.config.js | 90 +
738 files changed, 20803 insertions(+), 117936 deletions(-)
create mode 100644 .gitlab-ci.yml
delete mode 100644 .rubocop.yml
delete mode 100644 .rubocop_todo.yml
delete mode 100644 .travis.yml
delete mode 100644 Capfile
create mode 100644 Dockerfile
create mode 100644 Dockerfile.dev
delete mode 100644 Gemfile
delete mode 100644 Gemfile.lock
delete mode 100644 LICENSE
delete mode 100644 README
delete mode 100644 Rakefile
delete mode 100644 app/assets/images/biglogo.png
delete mode 100644 app/assets/images/cvetool-logo.png
delete mode 100755 app/assets/images/icons/access.png
delete mode 100644 app/assets/images/icons/admin.png
delete mode 100755 app/assets/images/icons/affected.png
delete mode 100644 app/assets/images/icons/approval.png
delete mode 100755 app/assets/images/icons/approved.png
delete mode 100755 app/assets/images/icons/arch.png
delete mode 100755 app/assets/images/icons/atom.png
delete mode 100755 app/assets/images/icons/auto.png
delete mode 100755 app/assets/images/icons/background-go.png
delete mode 100755 app/assets/images/icons/background.png
delete mode 100644 app/assets/images/icons/bug-grey.png
delete mode 100755 app/assets/images/icons/bug.png
delete mode 100755 app/assets/images/icons/bug_add.png
delete mode 100755 app/assets/images/icons/bug_new.png
delete mode 100644 app/assets/images/icons/calendar-select-month.png
delete mode 100755 app/assets/images/icons/checkboxes.png
delete mode 100644 app/assets/images/icons/close.png
delete mode 100644 app/assets/images/icons/comment.png
delete mode 100755 app/assets/images/icons/commented.png
delete mode 100755 app/assets/images/icons/confidential.png
delete mode 100755 app/assets/images/icons/delete.png
delete mode 100644 app/assets/images/icons/diff.png
delete mode 100644 app/assets/images/icons/dock-right.png
delete mode 100755 app/assets/images/icons/document-go.png
delete mode 100755 app/assets/images/icons/document.png
delete mode 100755 app/assets/images/icons/draft.png
delete mode 100755 app/assets/images/icons/edit-small.png
delete mode 100644 app/assets/images/icons/edit.png
delete mode 100644 app/assets/images/icons/error.png
delete mode 100644 app/assets/images/icons/flag-green.png
delete mode 100644 app/assets/images/icons/flag.png
delete mode 100644 app/assets/images/icons/glsa.png
delete mode 100644 app/assets/images/icons/glsa_draft.png
delete mode 100644 app/assets/images/icons/glsa_new.png
delete mode 100755 app/assets/images/icons/glsa_ready.png
delete mode 100644 app/assets/images/icons/glsa_request.png
delete mode 100644 app/assets/images/icons/glsa_sent.png
delete mode 100644 app/assets/images/icons/impact.png
delete mode 100644 app/assets/images/icons/info.png
delete mode 100755 app/assets/images/icons/keyword.png
delete mode 100644 app/assets/images/icons/larr.png
delete mode 100755 app/assets/images/icons/less_width.png
delete mode 100644 app/assets/images/icons/logout.png
delete mode 100755 app/assets/images/icons/metadata.png
delete mode 100644 app/assets/images/icons/minus-small.png
delete mode 100644 app/assets/images/icons/minus.png
delete mode 100755 app/assets/images/icons/more_width.png
delete mode 100644 app/assets/images/icons/next.png
delete mode 100755 app/assets/images/icons/not-approved.png
delete mode 100755 app/assets/images/icons/note.png
delete mode 100644 app/assets/images/icons/ok.png
delete mode 100755 app/assets/images/icons/package-add.png
delete mode 100755 app/assets/images/icons/package-go.png
delete mode 100755 app/assets/images/icons/package-remove.png
delete mode 100755 app/assets/images/icons/package.png
delete mode 100644 app/assets/images/icons/paste.png
delete mode 100644 app/assets/images/icons/pending.png
delete mode 100644 app/assets/images/icons/permission.png
delete mode 100644 app/assets/images/icons/plus-small.png
delete mode 100644 app/assets/images/icons/plus.png
delete mode 100644 app/assets/images/icons/profile.png
delete mode 100755 app/assets/images/icons/public.png
delete mode 100755 app/assets/images/icons/reference-add.png
delete mode 100755 app/assets/images/icons/reference-remove.png
delete mode 100755 app/assets/images/icons/reference.png
delete mode 100755 app/assets/images/icons/refresh.png
delete mode 100644 app/assets/images/icons/rejection.png
delete mode 100755 app/assets/images/icons/request.png
delete mode 100755 app/assets/images/icons/resolution-go.png
delete mode 100755 app/assets/images/icons/resolution.png
delete mode 100644 app/assets/images/icons/restricted.png
delete mode 100755 app/assets/images/icons/sent.png
delete mode 100644 app/assets/images/icons/severity.png
delete mode 100755 app/assets/images/icons/stamp.png
delete mode 100755 app/assets/images/icons/status-green.png
delete mode 100755 app/assets/images/icons/status-grey.png
delete mode 100755 app/assets/images/icons/status-red.png
delete mode 100755 app/assets/images/icons/status-yellow.png
delete mode 100755 app/assets/images/icons/switch.png
delete mode 100755 app/assets/images/icons/synopsis.png
delete mode 100644 app/assets/images/icons/template.png
delete mode 100755 app/assets/images/icons/time.png
delete mode 100755 app/assets/images/icons/title.png
delete mode 100755 app/assets/images/icons/toolbox.png
delete mode 100755 app/assets/images/icons/txt.png
delete mode 100755 app/assets/images/icons/unaffected.png
delete mode 100755 app/assets/images/icons/user.png
delete mode 100644 app/assets/images/icons/user_add.png
delete mode 100644 app/assets/images/icons/warning.png
delete mode 100755 app/assets/images/icons/workaround-no.png
delete mode 100755 app/assets/images/icons/workaround.png
delete mode 100644 app/assets/images/icons/xml.png
delete mode 100755 app/assets/images/icons/zoom_100.png
delete mode 100755 app/assets/images/icons/zoom_in.png
delete mode 100755 app/assets/images/icons/zoom_out.png
delete mode 100644 app/assets/images/intel-editor.png
delete mode 100644 app/assets/images/line.png
delete mode 100644 app/assets/images/login-bg.png
delete mode 100644 app/assets/images/logo.png
delete mode 100644 app/assets/images/menu-left.png
delete mode 100644 app/assets/images/menu-right.png
delete mode 100644 app/assets/images/menubg.png
delete mode 100644 app/assets/images/rails.png
delete mode 100644 app/assets/images/separator.png
delete mode 100644 app/assets/images/spinner.gif
delete mode 100644 app/assets/javascripts/application.js
delete mode 100644 app/assets/javascripts/glsamaker.js.erb
delete mode 100644 app/assets/javascripts/glsamaker_edit.js
delete mode 100644 app/assets/javascripts/glsamaker_misc.js
delete mode 100644 app/assets/javascripts/jsui.js
delete mode 100644 app/assets/javascripts/modalbox.js
delete mode 100644 app/assets/javascripts/searchable.js
delete mode 100644 app/assets/javascripts/uki-more.js
delete mode 100644 app/assets/javascripts/uki.js
delete mode 100644 app/assets/stylesheets/admin.css
delete mode 100644 app/assets/stylesheets/application.css
delete mode 100644 app/assets/stylesheets/cve.css
delete mode 100644 app/assets/stylesheets/login.css
delete mode 100644 app/assets/stylesheets/modalbox.css
delete mode 100644 app/assets/stylesheets/screen.css.erb
delete mode 100644 app/controllers/admin/index_controller.rb
delete mode 100644 app/controllers/admin/templates_controller.rb
delete mode 100644 app/controllers/admin/users_controller.rb
delete mode 100644 app/controllers/application_controller.rb
delete mode 100644 app/controllers/bug_controller.rb
delete mode 100644 app/controllers/bugs_controller.rb
delete mode 100644 app/controllers/comments_controller.rb
delete mode 100644 app/controllers/cve_controller.rb
delete mode 100644 app/controllers/glsa_controller.rb
delete mode 100644 app/controllers/index_controller.rb
delete mode 100644 app/controllers/search_controller.rb
delete mode 100644 app/controllers/tools_controller.rb
delete mode 100644 app/helpers/admin/index_helper.rb
delete mode 100644 app/helpers/admin/templates_helper.rb
delete mode 100644 app/helpers/admin/users_helper.rb
delete mode 100644 app/helpers/application_helper.rb
delete mode 100644 app/helpers/bug_helper.rb
delete mode 100644 app/helpers/bugs_helper.rb
delete mode 100644 app/helpers/comments_helper.rb
delete mode 100644 app/helpers/cve_helper.rb
delete mode 100644 app/helpers/glsa_helper.rb
delete mode 100644 app/helpers/index_helper.rb
delete mode 100644 app/helpers/search_helper.rb
delete mode 100644 app/helpers/tools_helper.rb
delete mode 100644 app/indices/indices.rb
delete mode 100644 app/mailers/.gitkeep
delete mode 100644 app/mailers/glsa_mailer.rb
delete mode 100644 app/models/.gitkeep
delete mode 100644 app/models/bug.rb
delete mode 100644 app/models/comment.rb
delete mode 100644 app/models/cpe.rb
delete mode 100644 app/models/cve.rb
delete mode 100644 app/models/cve_assignment.rb
delete mode 100644 app/models/cve_change.rb
delete mode 100644 app/models/cve_comment.rb
delete mode 100644 app/models/cve_reference.rb
delete mode 100644 app/models/glsa.rb
delete mode 100644 app/models/package.rb
delete mode 100644 app/models/reference.rb
delete mode 100644 app/models/revision.rb
delete mode 100644 app/models/template.rb
delete mode 100644 app/models/user.rb
delete mode 100644 app/views/admin/index/index.html.erb
delete mode 100644 app/views/admin/templates/_form.html.erb
delete mode 100644 app/views/admin/templates/edit.html.erb
delete mode 100644 app/views/admin/templates/index.html.erb
delete mode 100644 app/views/admin/templates/new.html.erb
delete mode 100644 app/views/admin/templates/show.html.erb
delete mode 100644 app/views/admin/users/_user.html.erb
delete mode 100644 app/views/admin/users/create.html.erb
delete mode 100644 app/views/admin/users/destroy.html.erb
delete mode 100644 app/views/admin/users/edit.html.erb
delete mode 100644 app/views/admin/users/index.html.erb
delete mode 100644 app/views/admin/users/new.html.erb
delete mode 100644 app/views/admin/users/show.html.erb
delete mode 100644 app/views/admin/users/update.html.erb
delete mode 100644 app/views/bug/bug.html.erb
delete mode 100644 app/views/bug/history.html.erb
delete mode 100644 app/views/bugs/create.html.erb
delete mode 100644 app/views/bugs/create.js.erb
delete mode 100644 app/views/bugs/destroy.html.erb
delete mode 100644 app/views/bugs/new.html.erb
delete mode 100644 app/views/bugs/show.html.erb
delete mode 100644 app/views/comments/create.js.erb
delete mode 100644 app/views/comments/destroy.html.erb
delete mode 100644 app/views/comments/new.html.erb
delete mode 100644 app/views/comments/show.html.erb
delete mode 100644 app/views/cve/_assigning.js.erb
delete mode 100644 app/views/cve/_filing.js.erb
delete mode 100644 app/views/cve/_invalidate.js.erb
delete mode 100644 app/views/cve/_key_events.js.erb
delete mode 100644 app/views/cve/_later.js.erb
delete mode 100644 app/views/cve/_new.js.erb
delete mode 100644 app/views/cve/_nfu.js.erb
delete mode 100644 app/views/cve/_toolbar.js.erb
delete mode 100644 app/views/cve/_ui_misc.js.erb
delete mode 100644 app/views/cve/actions.html.erb
delete mode 100644 app/views/cve/assign_preview.html.erb
delete mode 100644 app/views/cve/bug_preview.html.erb
delete mode 100644 app/views/cve/changes.html.erb
delete mode 100644 app/views/cve/comments.html.erb
delete mode 100644 app/views/cve/general_info.html.erb
delete mode 100644 app/views/cve/index.html.erb
delete mode 100644 app/views/cve/info.html.erb
delete mode 100644 app/views/cve/info.json.jbuilder
delete mode 100644 app/views/cve/list.html.erb
delete mode 100644 app/views/cve/new_preview.html.erb
delete mode 100644 app/views/cve/packages.html.erb
delete mode 100644 app/views/cve/references.html.erb
delete mode 100644 app/views/glsa/_approval_row.erb
delete mode 100644 app/views/glsa/_close_msg.txt.erb
delete mode 100644 app/views/glsa/_comment.html.erb
delete mode 100644 app/views/glsa/_comments.html.erb
delete mode 100644 app/views/glsa/_edit_bug_row.html.erb
delete mode 100644 app/views/glsa/_email_headers.txt.erb
delete mode 100644 app/views/glsa/_glsa.xml.builder
delete mode 100644 app/views/glsa/_glsa_row.html.erb
delete mode 100644 app/views/glsa/_package.html.erb
delete mode 100644 app/views/glsa/_reference.html.erb
delete mode 100644 app/views/glsa/_show_bug_row.html.erb
delete mode 100644 app/views/glsa/_show_package_row.txt.erb
delete mode 100644 app/views/glsa/_show_reference.txt.erb
delete mode 100644 app/views/glsa/_status_legend.html.erb
delete mode 100644 app/views/glsa/_template_popups.html.erb
delete mode 100644 app/views/glsa/archive.html.erb
delete mode 100644 app/views/glsa/archive.js.erb
delete mode 100644 app/views/glsa/comment.html.erb
delete mode 100644 app/views/glsa/create.html.erb
delete mode 100644 app/views/glsa/destroy.html.erb
delete mode 100644 app/views/glsa/diff.html.erb
delete mode 100644 app/views/glsa/drafts.html.erb
delete mode 100644 app/views/glsa/edit.html.erb
delete mode 100644 app/views/glsa/finalize_release.html.erb
delete mode 100644 app/views/glsa/import_references.html.erb
delete mode 100644 app/views/glsa/new-draft.html.erb
delete mode 100644 app/views/glsa/new-request.html.erb
delete mode 100644 app/views/glsa/new.html.erb
delete mode 100644 app/views/glsa/prepare_release.html.erb
delete mode 100644 app/views/glsa/release.html.erb
delete mode 100644 app/views/glsa/requests.html.erb
delete mode 100644 app/views/glsa/show.html.erb
delete mode 100644 app/views/glsa/show.txt.erb
delete mode 100644 app/views/glsa/show.xml.erb
delete mode 100644 app/views/glsa/update.html.erb
delete mode 100644 app/views/glsa_mailer/approval.text.erb
delete mode 100644 app/views/glsa_mailer/comment.text.erb
delete mode 100644 app/views/glsa_mailer/edit.text.erb
delete mode 100644 app/views/glsa_mailer/new_request.text.erb
delete mode 100644 app/views/glsa_mailer/text.text.erb
delete mode 100644 app/views/index/about.html.erb
delete mode 100644 app/views/index/error-access.html.erb
delete mode 100644 app/views/index/error-disabled.html.erb
delete mode 100644 app/views/index/error-system.html.erb
delete mode 100644 app/views/index/error-user.html.erb
delete mode 100644 app/views/index/index.html.erb
delete mode 100644 app/views/index/profile.html.erb
delete mode 100644 app/views/layouts/application.html.erb
delete mode 100644 app/views/layouts/cve.html.erb
delete mode 100644 app/views/layouts/none.html.erb
delete mode 100644 app/views/layouts/notice.html.erb
delete mode 100644 app/views/search/_cve_row.html.erb
delete mode 100644 app/views/search/_cves.html.erb
delete mode 100644 app/views/search/_glsas.html.erb
delete mode 100644 app/views/search/results.html.erb
delete mode 100644 app/views/tools/_cve.html.erb
delete mode 100644 app/views/tools/ajaxbugs.html.erb
delete mode 100644 app/views/tools/ajaxdescr.html.erb
delete mode 100644 app/views/tools/background.html.erb
delete mode 100644 app/views/tools/template.js.erb
create mode 100644 assets/.keep
create mode 100644 bin/.keep
delete mode 100755 bin/bundle
delete mode 100755 bin/rails
delete mode 100755 bin/rake
delete mode 100755 bin/setup
delete mode 100644 config.ru
delete mode 100644 config/application.rb
delete mode 100644 config/boot.rb
delete mode 100644 config/database.yml.mysql
delete mode 100644 config/deploy.rb
delete mode 100644 config/environment.rb
delete mode 100644 config/environments/development.rb
delete mode 100644 config/environments/production.rb
delete mode 100644 config/environments/test.rb
delete mode 100644 config/initializers/assets.rb
delete mode 100644 config/initializers/backtrace_silencers.rb
delete mode 100644 config/initializers/cookies_serializer.rb
delete mode 100644 config/initializers/filter_parameter_logging.rb
delete mode 100644 config/initializers/glsamaker-global.rb
delete mode 100644 config/initializers/glsamaker.rb.sample
delete mode 100644 config/initializers/glsamaker_constants.rb
delete mode 100644 config/initializers/inflections.rb
delete mode 100644 config/initializers/mime_types.rb
delete mode 100644 config/initializers/session_store.rb
delete mode 100644 config/initializers/time_formats.rb
delete mode 100644 config/initializers/wrap_parameters.rb
delete mode 100644 config/locales/en.yml
delete mode 100644 config/routes.rb
delete mode 100644 config/secrets.yml
delete mode 100644 config/thinking_sphinx.yml
delete mode 100644 db/migrate/20090314092539_create_users.rb
delete mode 100644 db/migrate/20090314191650_create_glsas.rb
delete mode 100644 db/migrate/20090314194257_add_glsa_user_constraints.rb
delete mode 100644 db/migrate/20090314194659_create_revisions.rb
delete mode 100644 db/migrate/20090314230516_create_references.rb
delete mode 100644 db/migrate/20090315105049_create_bugs.rb
delete mode 100644 db/migrate/20090315105326_add_references_revisions_constraint.rb
delete mode 100644 db/migrate/20090315110025_create_comments.rb
delete mode 100644 db/migrate/20090315110119_add_comment_constraints.rb
delete mode 100644 db/migrate/20090410212514_add_user_id_to_revisions.rb
delete mode 100644 db/migrate/20090410212600_add_revisions_user_id_constraint.rb
delete mode 100644 db/migrate/20090419140216_create_sessions.rb
delete mode 100644 db/migrate/20090501114107_add_status_cache_to_bugs.rb
delete mode 100644 db/migrate/20100511192546_change_comment_type_to_rating.rb
delete mode 100644 db/migrate/20100513183324_create_packages.rb
delete mode 100644 db/migrate/20100813183543_create_cves.rb
delete mode 100644 db/migrate/20100814103856_create_cve_references.rb
delete mode 100644 db/migrate/20100814105152_create_cve_comments.rb
delete mode 100644 db/migrate/20100814105345_create_cve_changes.rb
delete mode 100644 db/migrate/20100814142647_create_cpes.rb
delete mode 100644 db/migrate/20100902093457_create_cve_assignments.rb
delete mode 100644 db/migrate/20100918223549_add_system_user.rb
delete mode 100644 db/migrate/20110226204724_add_release_flag_to_revisions.rb
delete mode 100644 db/migrate/20110827143514_create_templates.rb
delete mode 100644 db/migrate/20110829174909_add_first_release_date_to_glsa.rb
delete mode 100644 db/migrate/20170418102638_add_slots_to_packages.rb
delete mode 100644 db/schema.rb
delete mode 100644 db/seeds.rb
delete mode 100644 doc/README_FOR_APP
delete mode 100644 doc/app/Admin.html
delete mode 100644 doc/app/Admin/IndexController.html
delete mode 100644 doc/app/Admin/IndexHelper.html
delete mode 100644 doc/app/Admin/TemplatesController.html
delete mode 100644 doc/app/Admin/TemplatesHelper.html
delete mode 100644 doc/app/Admin/UsersController.html
delete mode 100644 doc/app/Admin/UsersHelper.html
delete mode 100644 doc/app/ApplicationController.html
delete mode 100644 doc/app/ApplicationHelper.html
delete mode 100644 doc/app/Authentication.html
delete mode 100644 doc/app/Authorization.html
delete mode 100644 doc/app/Bug.html
delete mode 100644 doc/app/BugController.html
delete mode 100644 doc/app/BugHelper.html
delete mode 100644 doc/app/BugsController.html
delete mode 100644 doc/app/BugsHelper.html
delete mode 100644 doc/app/Bugzilla.html
delete mode 100644 doc/app/Bugzilla/Bug.html
delete mode 100644 doc/app/Bugzilla/Bugzilla.html
delete mode 100644 doc/app/Bugzilla/Bugzilla/Bugzilla.html
delete mode 100644 doc/app/Bugzilla/Bugzilla/Bugzilla/Change.html
delete mode 100644 doc/app/Bugzilla/Comment.html
delete mode 100644 doc/app/Bugzilla/History.html
delete mode 100644 doc/app/Comment.html
delete mode 100644 doc/app/Comment/CommentValidator.html
delete mode 100644 doc/app/CommentsController.html
delete mode 100644 doc/app/CommentsHelper.html
delete mode 100644 doc/app/Cpe.html
delete mode 100644 doc/app/Cve.html
delete mode 100644 doc/app/CveAssignment.html
delete mode 100644 doc/app/CveChange.html
delete mode 100644 doc/app/CveComment.html
delete mode 100644 doc/app/CveController.html
delete mode 100644 doc/app/CveHelper.html
delete mode 100644 doc/app/CveReference.html
delete mode 100644 doc/app/GLSAReleaseError.html
delete mode 100644 doc/app/Glsa.html
delete mode 100644 doc/app/GlsaController.html
delete mode 100644 doc/app/GlsaHelper.html
delete mode 100644 doc/app/GlsaMailer.html
delete mode 100644 doc/app/Glsamaker.html
delete mode 100644 doc/app/Glsamaker/Bugs.html
delete mode 100644 doc/app/Glsamaker/Bugs/ArchesMixin.html
delete mode 100644 doc/app/Glsamaker/Bugs/Bug.html
delete mode 100644 doc/app/Glsamaker/Bugs/BugReadyMixin.html
delete mode 100644 doc/app/Glsamaker/Bugs/Status.html
delete mode 100644 doc/app/Glsamaker/Bugs/StatusMixin.html
delete mode 100644 doc/app/Glsamaker/Diff.html
delete mode 100644 doc/app/Glsamaker/HTTP.html
delete mode 100644 doc/app/Glsamaker/Helper.html
delete mode 100644 doc/app/Glsamaker/Mail.html
delete mode 100644 doc/app/Glsamaker/Portage.html
delete mode 100644 doc/app/Glsamaker/Portage/Description.html
delete mode 100644 doc/app/Glsamaker/XML.html
delete mode 100644 doc/app/IndexController.html
delete mode 100644 doc/app/IndexHelper.html
delete mode 100644 doc/app/Package.html
delete mode 100644 doc/app/Reference.html
delete mode 100644 doc/app/Revision.html
delete mode 100644 doc/app/SearchController.html
delete mode 100644 doc/app/SearchHelper.html
delete mode 100644 doc/app/String.html
delete mode 100644 doc/app/Template.html
delete mode 100644 doc/app/ToolsController.html
delete mode 100644 doc/app/ToolsHelper.html
delete mode 100644 doc/app/User.html
delete mode 100644 doc/app/app/controllers/admin/index_controller_rb.html
delete mode 100644 doc/app/app/controllers/admin/templates_controller_rb.html
delete mode 100644 doc/app/app/controllers/admin/users_controller_rb.html
delete mode 100644 doc/app/app/controllers/application_controller_rb.html
delete mode 100644 doc/app/app/controllers/bug_controller_rb.html
delete mode 100644 doc/app/app/controllers/bugs_controller_rb.html
delete mode 100644 doc/app/app/controllers/comments_controller_rb.html
delete mode 100644 doc/app/app/controllers/cve_controller_rb.html
delete mode 100644 doc/app/app/controllers/glsa_controller_rb.html
delete mode 100644 doc/app/app/controllers/index_controller_rb.html
delete mode 100644 doc/app/app/controllers/search_controller_rb.html
delete mode 100644 doc/app/app/controllers/tools_controller_rb.html
delete mode 100644 doc/app/app/helpers/admin/index_helper_rb.html
delete mode 100644 doc/app/app/helpers/admin/templates_helper_rb.html
delete mode 100644 doc/app/app/helpers/admin/users_helper_rb.html
delete mode 100644 doc/app/app/helpers/application_helper_rb.html
delete mode 100644 doc/app/app/helpers/bug_helper_rb.html
delete mode 100644 doc/app/app/helpers/bugs_helper_rb.html
delete mode 100644 doc/app/app/helpers/comments_helper_rb.html
delete mode 100644 doc/app/app/helpers/cve_helper_rb.html
delete mode 100644 doc/app/app/helpers/glsa_helper_rb.html
delete mode 100644 doc/app/app/helpers/index_helper_rb.html
delete mode 100644 doc/app/app/helpers/search_helper_rb.html
delete mode 100644 doc/app/app/helpers/tools_helper_rb.html
delete mode 100644 doc/app/app/mailers/glsa_mailer_rb.html
delete mode 100644 doc/app/app/models/bug_rb.html
delete mode 100644 doc/app/app/models/comment_rb.html
delete mode 100644 doc/app/app/models/cpe_rb.html
delete mode 100644 doc/app/app/models/cve_assignment_rb.html
delete mode 100644 doc/app/app/models/cve_change_rb.html
delete mode 100644 doc/app/app/models/cve_comment_rb.html
delete mode 100644 doc/app/app/models/cve_rb.html
delete mode 100644 doc/app/app/models/cve_reference_rb.html
delete mode 100644 doc/app/app/models/glsa_rb.html
delete mode 100644 doc/app/app/models/package_rb.html
delete mode 100644 doc/app/app/models/reference_rb.html
delete mode 100644 doc/app/app/models/revision_rb.html
delete mode 100644 doc/app/app/models/template_rb.html
delete mode 100644 doc/app/app/models/user_rb.html
delete mode 100644 doc/app/created.rid
delete mode 100644 doc/app/doc/README_FOR_APP.html
delete mode 100644 doc/app/images/brick.png
delete mode 100644 doc/app/images/brick_link.png
delete mode 100644 doc/app/images/bug.png
delete mode 100644 doc/app/images/bullet_black.png
delete mode 100644 doc/app/images/bullet_toggle_minus.png
delete mode 100644 doc/app/images/bullet_toggle_plus.png
delete mode 100644 doc/app/images/date.png
delete mode 100644 doc/app/images/find.png
delete mode 100644 doc/app/images/loadingAnimation.gif
delete mode 100644 doc/app/images/macFFBgHack.png
delete mode 100644 doc/app/images/package.png
delete mode 100644 doc/app/images/page_green.png
delete mode 100644 doc/app/images/page_white_text.png
delete mode 100644 doc/app/images/page_white_width.png
delete mode 100644 doc/app/images/plugin.png
delete mode 100644 doc/app/images/ruby.png
delete mode 100644 doc/app/images/tag_green.png
delete mode 100644 doc/app/images/wrench.png
delete mode 100644 doc/app/images/wrench_orange.png
delete mode 100644 doc/app/images/zoom.png
delete mode 100644 doc/app/index.html
delete mode 100644 doc/app/js/darkfish.js
delete mode 100644 doc/app/js/jquery.js
delete mode 100644 doc/app/js/quicksearch.js
delete mode 100644 doc/app/js/thickbox-compressed.js
delete mode 100644 doc/app/lib/authentication_rb.html
delete mode 100644 doc/app/lib/authorization_rb.html
delete mode 100644 doc/app/lib/bugzilla/bug_rb.html
delete mode 100644 doc/app/lib/bugzilla/comment_rb.html
delete mode 100644 doc/app/lib/bugzilla/history_rb.html
delete mode 100644 doc/app/lib/bugzilla_rb.html
delete mode 100644 doc/app/lib/glsamaker/bugs_rb.html
delete mode 100644 doc/app/lib/glsamaker/diff_rb.html
delete mode 100644 doc/app/lib/glsamaker/helpers_rb.html
delete mode 100644 doc/app/lib/glsamaker/http_rb.html
delete mode 100644 doc/app/lib/glsamaker/mail_rb.html
delete mode 100644 doc/app/lib/glsamaker/portage_rb.html
delete mode 100644 doc/app/lib/glsamaker/xml_rb.html
delete mode 100644 doc/app/lib/glsamaker_rb.html
delete mode 100644 doc/app/lib/tasks/utils_rb.html
delete mode 100644 doc/app/rdoc.css
delete mode 100644 doc/diagrams/models.dot
delete mode 100644 doc/diagrams/models.png
create mode 100644 docker-compose.override.yml
create mode 100644 docker-compose.yml
create mode 100644 glsamaker.go
create mode 100644 go.mod
create mode 100644 go.sum
delete mode 100644 lib/assets/.gitkeep
delete mode 100644 lib/authentication.rb
delete mode 100644 lib/authorization.rb
delete mode 100644 lib/bugzilla.rb
delete mode 100644 lib/bugzilla/bug.rb
delete mode 100644 lib/bugzilla/comment.rb
delete mode 100644 lib/bugzilla/history.rb
delete mode 100644 lib/glsamaker.rb
delete mode 100644 lib/glsamaker/bugs.rb
delete mode 100644 lib/glsamaker/diff.rb
delete mode 100644 lib/glsamaker/helpers.rb
delete mode 100644 lib/glsamaker/http.rb
delete mode 100644 lib/glsamaker/mail.rb
delete mode 100644 lib/glsamaker/portage.rb
delete mode 100644 lib/glsamaker/spelling.rb
delete mode 100644 lib/glsamaker/xml.rb
delete mode 100644 lib/kramdown_ext.rb
delete mode 100644 lib/tasks/.gitkeep
delete mode 100644 lib/tasks/cve.rake
delete mode 100644 lib/tasks/import.rake
delete mode 100644 lib/tasks/rcov.rake
delete mode 100644 lib/tasks/utils.rb
create mode 100644 package-lock.json
create mode 100644 package.json
create mode 100644 pkg/app/handler/about/index.go
create mode 100644 pkg/app/handler/about/utils.go
create mode 100644 pkg/app/handler/account/password.go
create mode 100644 pkg/app/handler/account/twofactor.go
create mode 100644 pkg/app/handler/admin/edit.go
create mode 100644 pkg/app/handler/admin/index.go
create mode 100644 pkg/app/handler/admin/passwordreset.go
create mode 100644 pkg/app/handler/admin/utils.go
create mode 100644 pkg/app/handler/all/index.go
create mode 100644 pkg/app/handler/all/utils.go
create mode 100644 pkg/app/handler/archive/index.go
create mode 100644 pkg/app/handler/archive/utils.go
create mode 100644 pkg/app/handler/authentication/accessDenied.go
create mode 100644 pkg/app/handler/authentication/auth_session/authsession.go
create mode 100644 pkg/app/handler/authentication/login.go
create mode 100644 pkg/app/handler/authentication/logout.go
create mode 100644 pkg/app/handler/authentication/templates/admin.go
create mode 100644 pkg/app/handler/authentication/templates/login.go
create mode 100644 pkg/app/handler/authentication/templates/totp.go
create mode 100644 pkg/app/handler/authentication/templates/webauthn.go
create mode 100644 pkg/app/handler/authentication/totp/totp.go
create mode 100644 pkg/app/handler/authentication/utils/utils.go
create mode 100644 pkg/app/handler/authentication/webauthn/login.go
create mode 100644 pkg/app/handler/authentication/webauthn/register.go
create mode 100644 pkg/app/handler/cvetool/bug.go
create mode 100644 pkg/app/handler/cvetool/comments.go
create mode 100644 pkg/app/handler/cvetool/index.go
create mode 100644 pkg/app/handler/cvetool/state.go
create mode 100644 pkg/app/handler/cvetool/update.go
create mode 100644 pkg/app/handler/cvetool/utils.go
create mode 100644 pkg/app/handler/dashboard/index.go
create mode 100644 pkg/app/handler/dashboard/utils.go
create mode 100644 pkg/app/handler/drafts/index.go
create mode 100644 pkg/app/handler/drafts/utils.go
create mode 100644 pkg/app/handler/glsa/bugs.go
create mode 100644 pkg/app/handler/glsa/comments.go
create mode 100644 pkg/app/handler/glsa/delete.go
create mode 100644 pkg/app/handler/glsa/edit.go
create mode 100644 pkg/app/handler/glsa/release.go
create mode 100644 pkg/app/handler/glsa/utils.go
create mode 100644 pkg/app/handler/glsa/view.go
create mode 100644 pkg/app/handler/home/index.go
create mode 100644 pkg/app/handler/home/utils.go
create mode 100644 pkg/app/handler/newRequest/index.go
create mode 100644 pkg/app/handler/newRequest/utils.go
create mode 100644 pkg/app/handler/requests/index.go
create mode 100644 pkg/app/handler/requests/utils.go
create mode 100644 pkg/app/handler/search/index.go
create mode 100644 pkg/app/handler/search/utils.go
create mode 100644 pkg/app/handler/statistics/index.go
create mode 100644 pkg/app/handler/statistics/utils.go
create mode 100644 pkg/app/serve.go
create mode 100644 pkg/app/utils.go
create mode 100644 pkg/config/config.go
create mode 100644 pkg/cveimport/update.go
create mode 100644 pkg/database/connection/connection.go
create mode 100644 pkg/database/init.go
create mode 100644 pkg/database/schema/create.go
create mode 100644 pkg/logger/loggers.go
create mode 100644 pkg/models/application.go
create mode 100644 pkg/models/bugzilla/bugs.go
create mode 100644 pkg/models/cve/cve.go
create mode 100644 pkg/models/cve/cvss.go
create mode 100644 pkg/models/cve/feed.go
create mode 100644 pkg/models/glsa.go
create mode 100644 pkg/models/gpackage/package.go
create mode 100644 pkg/models/session.go
create mode 100644 pkg/models/users/user.go
delete mode 100644 public/404.html
delete mode 100644 public/422.html
delete mode 100644 public/500.html
delete mode 100644 public/error-404.png
delete mode 100644 public/error-500.png
delete mode 100644 public/favicon.ico
delete mode 100644 public/robots.txt
delete mode 100644 public/xsl/ads.xsl
delete mode 100644 public/xsl/content.xsl
delete mode 100644 public/xsl/devmap.xsl
delete mode 100644 public/xsl/doc-struct.xsl
delete mode 100644 public/xsl/glsa.xsl
delete mode 100644 public/xsl/guide.xsl
delete mode 100644 public/xsl/handbook.xsl
delete mode 100644 public/xsl/inserts.xsl
delete mode 100644 public/xsl/mail.xsl
delete mode 100644 public/xsl/menu.xsl
delete mode 100644 public/xsl/util.xsl
delete mode 100755 script/config_init
delete mode 100755 script/db-backup
delete mode 100755 script/rails
delete mode 100755 script/update-portage-cache
delete mode 100644 test/fixtures/.gitkeep
delete mode 100644 test/fixtures/bugs.yml
delete mode 100644 test/fixtures/comments.yml
delete mode 100644 test/fixtures/cpes.yml
delete mode 100644 test/fixtures/cve_assignments.yml
delete mode 100644 test/fixtures/cve_changes.yml
delete mode 100644 test/fixtures/cve_comments.yml
delete mode 100644 test/fixtures/cve_references.yml
delete mode 100644 test/fixtures/cves.yml
delete mode 100644 test/fixtures/glsa_mailer/approval
delete mode 100644 test/fixtures/glsa_mailer/comment
delete mode 100644 test/fixtures/glsa_mailer/edit
delete mode 100644 test/fixtures/glsa_mailer/request
delete mode 100644 test/fixtures/glsa_mailer/sent
delete mode 100644 test/fixtures/glsas.yml
delete mode 100644 test/fixtures/packages.yml
delete mode 100644 test/fixtures/references.yml
delete mode 100644 test/fixtures/revisions.yml
delete mode 100644 test/fixtures/templates.yml
delete mode 100644 test/fixtures/users.yml
delete mode 100644 test/functional/.gitkeep
delete mode 100644 test/functional/admin/index_controller_test.rb
delete mode 100644 test/functional/admin/templates_controller_test.rb
delete mode 100644 test/functional/admin/users_controller_test.rb
delete mode 100644 test/functional/bug_controller_test.rb
delete mode 100644 test/functional/bugs_controller_test.rb
delete mode 100644 test/functional/comments_controller_test.rb
delete mode 100644 test/functional/cve_controller_test.rb
delete mode 100644 test/functional/glsa_controller_test.rb
delete mode 100644 test/functional/glsa_mailer_test.rb
delete mode 100644 test/functional/index_controller_test.rb
delete mode 100644 test/functional/search_controller_test.rb
delete mode 100644 test/functional/tools_controller_test.rb
delete mode 100644 test/integration/.gitkeep
delete mode 100644 test/integration/authentication_test.rb
delete mode 100644 test/test_helper.rb
delete mode 100644 test/unit/.gitkeep
delete mode 100644 test/unit/bug_test.rb
delete mode 100644 test/unit/comment_test.rb
delete mode 100644 test/unit/cpe_test.rb
delete mode 100644 test/unit/cve_assignment_test.rb
delete mode 100644 test/unit/cve_change_test.rb
delete mode 100644 test/unit/cve_comment_test.rb
delete mode 100644 test/unit/cve_reference_test.rb
delete mode 100644 test/unit/cve_test.rb
delete mode 100644 test/unit/glsa_mailer_test.rb
delete mode 100644 test/unit/glsa_test.rb
delete mode 100644 test/unit/helpers/bug_helper_test.rb
delete mode 100644 test/unit/helpers/bugs_helper_test.rb
delete mode 100644 test/unit/helpers/comments_helper_test.rb
delete mode 100644 test/unit/helpers/cve_helper_test.rb
delete mode 100644 test/unit/helpers/glsa_helper_test.rb
delete mode 100644 test/unit/helpers/index_helper_test.rb
delete mode 100644 test/unit/helpers/search_helper_test.rb
delete mode 100644 test/unit/helpers/templates_helper_test.rb
delete mode 100644 test/unit/helpers/tools_helper_test.rb
delete mode 100644 test/unit/helpers/user_helper_test.rb
delete mode 100644 test/unit/package_test.rb
delete mode 100644 test/unit/reference_test.rb
delete mode 100644 test/unit/revision_test.rb
delete mode 100644 test/unit/template_test.rb
delete mode 100644 test/unit/user_test.rb
delete mode 100644 tmp/cache/.gitignore
delete mode 100644 tmp/pids/.gitignore
delete mode 100644 tmp/sessions/.gitignore
delete mode 100644 tmp/sockets/.gitignore
delete mode 100644 vendor/assets/stylesheets/.gitkeep
delete mode 100644 vendor/dictionaries/README_en_US.txt
delete mode 100644 vendor/dictionaries/en_US.aff
delete mode 100644 vendor/dictionaries/en_US.dic
delete mode 100644 vendor/plugins/.gitignore
delete mode 100644 vendor/plugins/.gitkeep
create mode 100644 web/packs/account.js
create mode 100644 web/packs/admin.js
create mode 100644 web/packs/application.js
create mode 100644 web/packs/edit.js
create mode 100644 web/packs/glsa.js
create mode 100644 web/packs/newglsa.js
create mode 100644 web/packs/src/javascript/all.js
create mode 100644 web/packs/src/javascript/archive.js
create mode 100644 web/packs/src/javascript/cvetool.js
create mode 100644 web/packs/src/javascript/drafts.js
create mode 100644 web/packs/src/javascript/requests.js
create mode 100644 web/packs/src/stylesheets/application.scss
create mode 100644 web/packs/src/stylesheets/index.scss
create mode 100644 web/packs/statistics.js
create mode 100644 web/packs/stylesheets.js
create mode 100644 web/templates/about/about.tmpl
create mode 100644 web/templates/about/aboutCLI.tmpl
create mode 100644 web/templates/about/aboutSearch.tmpl
create mode 100644 web/templates/account/2fa.tmpl
create mode 100644 web/templates/account/password/forcedchange.tmpl
create mode 100644 web/templates/account/password/normalchange.tmpl
create mode 100644 web/templates/account/password/password.tmpl
create mode 100644 web/templates/admin/components/global.tmpl
create mode 100644 web/templates/admin/components/permissions.tmpl
create mode 100644 web/templates/admin/components/templates.tmpl
create mode 100644 web/templates/admin/components/users.tmpl
create mode 100644 web/templates/admin/edit/permissions.tmpl
create mode 100644 web/templates/admin/edit/users.tmpl
create mode 100644 web/templates/admin/passwordreset.tmpl
create mode 100644 web/templates/admin/view.tmpl
create mode 100644 web/templates/all/all.tmpl
create mode 100644 web/templates/archive/archive.tmpl
create mode 100644 web/templates/authentication/accessDenied.tmpl
create mode 100644 web/templates/authentication/login.tmpl
create mode 100644 web/templates/authentication/totp.tmpl
create mode 100644 web/templates/authentication/webauthn.tmpl
create mode 100644 web/templates/dashboard/dashboard.tmpl
create mode 100644 web/templates/drafts/drafts.tmpl
create mode 100644 web/templates/glsa/edit.tmpl
create mode 100644 web/templates/glsa/show.tmpl
create mode 100644 web/templates/home/home.tmpl
create mode 100644 web/templates/index/show.tmpl
create mode 100644 web/templates/index/showFullscreen.tmpl
create mode 100644 web/templates/layout/footer.tmpl
create mode 100644 web/templates/layout/head.tmpl
create mode 100644 web/templates/layout/header.tmpl
create mode 100644 web/templates/layout/sitetitle.tmpl
create mode 100644 web/templates/layout/tyriannav.tmpl
create mode 100644 web/templates/new/new.tmpl
create mode 100644 web/templates/requests/requests.tmpl
create mode 100644 web/templates/search/search.tmpl
create mode 100644 web/templates/statistics/statistics.tmpl
create mode 100644 webpack.config.js
diff --git a/.gitignore b/.gitignore
index 66aa48d..07a09c0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,23 +1,5 @@
-*.swp
-.DS_Store
-log/*
-tmp/*
-db/*.sqlite*
-config/database.yml
-config/*private*
-config/initializers/glsamaker.rb
-config/initializers/secret_token.rb
-public/stylesheets/all.css
-public/javascripts/all.js
-/.loadpath
-/MYTODO
-coverage
+node_modules/
+assets/
.idea
-.rvmrc
-*.tmproj
-*.sphinx.conf
-db/sphinx
-.bundle
-vendor
-Gemfile.lock
-doc/app/.cache/*
+
+.bin/glsamaker
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..d739110
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,32 @@
+stages:
+ - build
+ - test
+
+info:
+ stage: .pre
+ script:
+ - docker info
+
+build:
+ stage: build
+ variables:
+ IMAGE_TAG: $CI_REGISTRY_IMAGE/$CI_COMMIT_BRANCH:$CI_COMMIT_SHA
+ LATEST_IMAGE_TAG: $CI_REGISTRY_IMAGE/$CI_COMMIT_BRANCH:latest
+ script:
+ - echo $IMAGE_TAG
+ - echo $LATEST_IMAGE_TAG
+ - echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" "$CI_REGISTRY" --password-stdin
+ - docker pull $LATEST_IMAGE_TAG || true
+ - docker build --cache-from $LATEST_IMAGE_TAG -t $IMAGE_TAG -t $LATEST_IMAGE_TAG .
+ - docker push $LATEST_IMAGE_TAG
+ - docker push $IMAGE_TAG
+
+include:
+ - template: Dependency-Scanning.gitlab-ci.yml
+ - template: Container-Scanning.gitlab-ci.yml
+ - template: SAST.gitlab-ci.yml
+
+variables:
+ DS_DISABLE_DIND: "true"
+ SAST_DISABLE_DIND: "true"
+
diff --git a/.rubocop.yml b/.rubocop.yml
deleted file mode 100644
index d379a78..0000000
--- a/.rubocop.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-inherit_from: .rubocop_todo.yml
-
-require:
- - rubocop-performance
- - rubocop-rails
-
-AllCops:
- TargetRubyVersion: 2.4
- TargetRailsVersion: 4.2
-
-Rails:
- Enabled: true
-
-Style/AsciiComments:
- Enabled: false
-
-Style/FormatString:
- Enabled: false
-
-Style/Documentation:
- Enabled: false
-
-Style/PerlBackrefs:
- Enabled: false
-
-Metrics/ModuleLength:
- Max: 200
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
deleted file mode 100644
index e265d63..0000000
--- a/.rubocop_todo.yml
+++ /dev/null
@@ -1,1369 +0,0 @@
-# This configuration was generated by
-# `rubocop --auto-gen-config`
-# on 2019-07-23 23:27:07 +0200 using RuboCop version 0.73.0.
-# The point is for the user to remove these configuration records
-# one by one as the offenses are removed from the code base.
-# Note that changes in the inspected code, or installation of new
-# versions of RuboCop, may require this file to be generated again.
-
-# Offense count: 7
-# Cop supports --auto-correct.
-# Configuration parameters: TreatCommentsAsGroupSeparators, Include.
-# Include: **/*.gemfile, **/Gemfile, **/gems.rb
-Bundler/OrderedGems:
- Exclude:
- - 'Gemfile'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, IndentationWidth.
-# SupportedStyles: outdent, indent
-Layout/AccessModifierIndentation:
- Exclude:
- - 'app/helpers/glsa_helper.rb'
-
-# Offense count: 2
-# Cop supports --auto-correct.
-Layout/AlignArray:
- Exclude:
- - 'lib/glsamaker/bugs.rb'
-
-# Offense count: 22
-# Cop supports --auto-correct.
-# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
-# SupportedHashRocketStyles: key, separator, table
-# SupportedColonStyles: key, separator, table
-# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
-Layout/AlignHash:
- Exclude:
- - 'app/mailers/glsa_mailer.rb'
- - 'app/models/package.rb'
- - 'app/views/glsa/_glsa.xml.builder'
- - 'lib/glsamaker/portage.rb'
- - 'lib/tasks/cve.rake'
- - 'test/unit/user_test.rb'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-Layout/BlockEndNewline:
- Exclude:
- - 'app/controllers/cve_controller.rb'
-
-# Offense count: 11
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, IndentOneStep, IndentationWidth.
-# SupportedStyles: case, end
-Layout/CaseIndentation:
- Exclude:
- - 'lib/tasks/rcov.rake'
- - 'test/test_helper.rb'
-
-# Offense count: 2
-# Cop supports --auto-correct.
-Layout/ClosingParenthesisIndentation:
- Exclude:
- - 'app/controllers/glsa_controller.rb'
- - 'app/helpers/application_helper.rb'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-Layout/CommentIndentation:
- Exclude:
- - 'Gemfile'
-
-# Offense count: 3
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: leading, trailing
-Layout/DotPosition:
- Exclude:
- - 'app/helpers/application_helper.rb'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-Layout/ElseAlignment:
- Exclude:
- - 'app/views/glsa/_glsa.xml.builder'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-# Configuration parameters: AllowBorderComment, AllowMarginComment.
-Layout/EmptyComment:
- Exclude:
- - 'config/routes.rb'
-
-# Offense count: 16
-# Cop supports --auto-correct.
-Layout/EmptyLineAfterGuardClause:
- Exclude:
- - 'app/controllers/glsa_controller.rb'
- - 'app/models/glsa.rb'
- - 'lib/glsamaker/portage.rb'
- - 'test/test_helper.rb'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-Layout/EmptyLineAfterMagicComment:
- Exclude:
- - 'db/schema.rb'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-# Configuration parameters: AllowAdjacentOneLineDefs, NumberOfEmptyLines.
-Layout/EmptyLineBetweenDefs:
- Exclude:
- - 'app/controllers/glsa_controller.rb'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-Layout/EmptyLines:
- Exclude:
- - 'app/controllers/glsa_controller.rb'
-
-# Offense count: 14
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: around, only_before
-Layout/EmptyLinesAroundAccessModifier:
- Exclude:
- - 'app/controllers/application_controller.rb'
- - 'app/controllers/cve_controller.rb'
- - 'app/controllers/glsa_controller.rb'
- - 'app/helpers/glsa_helper.rb'
- - 'lib/authentication.rb'
- - 'lib/bugzilla.rb'
- - 'lib/bugzilla/bug.rb'
- - 'lib/glsamaker/bugs.rb'
- - 'lib/glsamaker/helpers.rb'
- - 'lib/glsamaker/mail.rb'
- - 'lib/glsamaker/portage.rb'
- - 'lib/glsamaker/xml.rb'
- - 'lib/tasks/utils.rb'
-
-# Offense count: 5
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: empty_lines, no_empty_lines
-Layout/EmptyLinesAroundBlockBody:
- Exclude:
- - 'config/environments/production.rb'
- - 'config/routes.rb'
- - 'db/schema.rb'
- - 'lib/tasks/import.rake'
-
-# Offense count: 5
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
-Layout/EmptyLinesAroundClassBody:
- Exclude:
- - 'app/controllers/bug_controller.rb'
- - 'app/controllers/comments_controller.rb'
- - 'app/controllers/cve_controller.rb'
- - 'app/models/glsa.rb'
- - 'lib/glsamaker/bugs.rb'
-
-# Offense count: 2
-# Cop supports --auto-correct.
-Layout/EmptyLinesAroundMethodBody:
- Exclude:
- - 'app/controllers/glsa_controller.rb'
- - 'lib/bugzilla.rb'
-
-# Offense count: 2
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
-Layout/EmptyLinesAroundModuleBody:
- Exclude:
- - 'lib/glsamaker/diff.rb'
- - 'lib/glsamaker/mail.rb'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyleAlignWith, AutoCorrect, Severity.
-# SupportedStylesAlignWith: keyword, variable, start_of_line
-Layout/EndAlignment:
- Exclude:
- - 'lib/tasks/rcov.rake'
-
-# Offense count: 18
-# Cop supports --auto-correct.
-# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
-Layout/ExtraSpacing:
- Exclude:
- - 'app/controllers/comments_controller.rb'
- - 'app/helpers/glsa_helper.rb'
- - 'app/views/cve/info.json.jbuilder'
- - 'bin/setup'
- - 'config.ru'
- - 'db/schema.rb'
- - 'script/db-backup'
- - 'script/rails'
-
-# Offense count: 4
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, IndentationWidth.
-# SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
-Layout/IndentFirstArgument:
- Exclude:
- - 'app/controllers/glsa_controller.rb'
- - 'app/helpers/application_helper.rb'
- - 'app/helpers/glsa_helper.rb'
-
-# Offense count: 2
-# Cop supports --auto-correct.
-# Configuration parameters: IndentationWidth.
-# SupportedStyles: special_inside_parentheses, consistent, align_brackets
-Layout/IndentFirstArrayElement:
- EnforcedStyle: consistent
-
-# Offense count: 7
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, IndentationWidth.
-# SupportedStyles: special_inside_parentheses, consistent, align_braces
-Layout/IndentFirstHashElement:
- Exclude:
- - 'app/models/package.rb'
- - 'lib/bugzilla.rb'
- - 'lib/glsamaker/portage.rb'
-
-# Offense count: 10
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: normal, indented_internal_methods
-Layout/IndentationConsistency:
- Exclude:
- - 'app/models/glsa.rb'
- - 'lib/authentication.rb'
- - 'lib/tasks/import.rake'
-
-# Offense count: 25
-# Cop supports --auto-correct.
-# Configuration parameters: Width, IgnoredPatterns.
-Layout/IndentationWidth:
- Exclude:
- - 'app/views/glsa/_glsa.xml.builder'
- - 'db/migrate/20100814103856_create_cve_references.rb'
- - 'lib/authentication.rb'
- - 'lib/glsamaker/spelling.rb'
- - 'lib/tasks/import.rake'
-
-# Offense count: 31
-# Cop supports --auto-correct.
-# Configuration parameters: AllowDoxygenCommentStyle.
-Layout/LeadingCommentSpace:
- Exclude:
- - 'Gemfile'
- - 'app/controllers/application_controller.rb'
- - 'lib/bugzilla.rb'
- - 'lib/glsamaker.rb'
- - 'lib/tasks/import.rake'
- - 'script/db-backup'
- - 'test/unit/revision_test.rb'
-
-# Offense count: 2
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: symmetrical, new_line, same_line
-Layout/MultilineMethodCallBraceLayout:
- Exclude:
- - 'app/helpers/glsa_helper.rb'
-
-# Offense count: 3
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, IndentationWidth.
-# SupportedStyles: aligned, indented, indented_relative_to_receiver
-Layout/MultilineMethodCallIndentation:
- Exclude:
- - 'app/helpers/application_helper.rb'
-
-# Offense count: 5
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, IndentationWidth.
-# SupportedStyles: aligned, indented
-Layout/MultilineOperationIndentation:
- Exclude:
- - 'db/migrate/20100918223549_add_system_user.rb'
- - 'lib/glsamaker/portage.rb'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-Layout/RescueEnsureAlignment:
- Exclude:
- - 'app/controllers/cve_controller.rb'
-
-# Offense count: 3
-# Cop supports --auto-correct.
-Layout/SpaceAfterComma:
- Exclude:
- - 'app/helpers/glsa_helper.rb'
- - 'config/deploy.rb'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyleInsidePipes.
-# SupportedStylesInsidePipes: space, no_space
-Layout/SpaceAroundBlockParameters:
- Exclude:
- - 'lib/tasks/rcov.rake'
-
-# Offense count: 11
-# Cop supports --auto-correct.
-# Configuration parameters: AllowForAlignment.
-Layout/SpaceAroundOperators:
- Exclude:
- - 'app/controllers/comments_controller.rb'
- - 'app/controllers/glsa_controller.rb'
- - 'app/helpers/glsa_helper.rb'
- - 'app/models/cve.rb'
- - 'app/models/package.rb'
- - 'script/db-backup'
-
-# Offense count: 22
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
-# SupportedStyles: space, no_space
-# SupportedStylesForEmptyBraces: space, no_space
-Layout/SpaceBeforeBlockBraces:
- Exclude:
- - 'app/controllers/cve_controller.rb'
- - 'app/helpers/admin/templates_helper.rb'
- - 'app/helpers/admin/users_helper.rb'
- - 'lib/tasks/rcov.rake'
- - 'test/unit/glsa_test.rb'
- - 'test/unit/revision_test.rb'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-Layout/SpaceBeforeComma:
- Exclude:
- - 'config/routes.rb'
-
-# Offense count: 3
-# Cop supports --auto-correct.
-Layout/SpaceBeforeSemicolon:
- Exclude:
- - 'config/deploy.rb'
- - 'lib/bugzilla.rb'
-
-# Offense count: 72
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
-# SupportedStyles: space, no_space
-# SupportedStylesForEmptyBraces: space, no_space
-Layout/SpaceInsideBlockBraces:
- Enabled: false
-
-# Offense count: 67
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
-# SupportedStyles: space, no_space, compact
-# SupportedStylesForEmptyBraces: space, no_space
-Layout/SpaceInsideHashLiteralBraces:
- Exclude:
- - 'app/controllers/cve_controller.rb'
- - 'app/controllers/glsa_controller.rb'
- - 'app/controllers/index_controller.rb'
- - 'app/controllers/tools_controller.rb'
- - 'app/helpers/glsa_helper.rb'
- - 'app/models/comment.rb'
- - 'app/models/glsa.rb'
- - 'app/views/glsa/_glsa.xml.builder'
- - 'config/deploy.rb'
- - 'lib/bugzilla.rb'
- - 'lib/glsamaker/http.rb'
- - 'lib/glsamaker/xml.rb'
- - 'test/test_helper.rb'
- - 'test/unit/glsa_test.rb'
-
-# Offense count: 8
-# Cop supports --auto-correct.
-Layout/SpaceInsidePercentLiteralDelimiters:
- Exclude:
- - 'config/application.rb'
- - 'config/initializers/glsamaker-global.rb'
- - 'lib/bugzilla.rb'
- - 'lib/tasks/cve.rake'
-
-# Offense count: 7
-# Cop supports --auto-correct.
-# Configuration parameters: IndentationWidth.
-Layout/Tab:
- Exclude:
- - 'app/views/glsa/_glsa.xml.builder'
-
-# Offense count: 286
-# Cop supports --auto-correct.
-# Configuration parameters: AllowInHeredoc.
-Layout/TrailingWhitespace:
- Enabled: false
-
-# Offense count: 1
-Lint/AmbiguousBlockAssociation:
- Exclude:
- - 'app/views/cve/info.json.jbuilder'
-
-# Offense count: 1
-Lint/DuplicateMethods:
- Exclude:
- - 'lib/bugzilla/bug.rb'
-
-# Offense count: 2
-# Configuration parameters: AllowComments.
-Lint/HandleExceptions:
- Exclude:
- - 'Rakefile'
- - 'app/controllers/bugs_controller.rb'
-
-# Offense count: 1
-Lint/IneffectiveAccessModifier:
- Exclude:
- - 'lib/authentication.rb'
-
-# Offense count: 2
-Lint/NestedMethodDefinition:
- Exclude:
- - 'app/models/cve.rb'
- - 'lib/tasks/cve.rake'
-
-# Offense count: 3
-Lint/NonLocalExitFromIterator:
- Exclude:
- - 'app/controllers/glsa_controller.rb'
-
-# Offense count: 38
-Lint/RescueException:
- Exclude:
- - 'app/controllers/bugs_controller.rb'
- - 'app/controllers/comments_controller.rb'
- - 'app/controllers/cve_controller.rb'
- - 'app/controllers/glsa_controller.rb'
- - 'app/controllers/tools_controller.rb'
- - 'app/models/bug.rb'
- - 'app/models/glsa.rb'
- - 'lib/bugzilla/bug.rb'
- - 'lib/bugzilla/history.rb'
- - 'lib/glsamaker/bugs.rb'
- - 'lib/tasks/rcov.rake'
- - 'script/config_init'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-Lint/ScriptPermission:
- Exclude:
- - 'Rakefile'
-
-# Offense count: 7
-# Cop supports --auto-correct.
-Lint/StringConversionInInterpolation:
- Exclude:
- - 'lib/bugzilla/history.rb'
- - 'test/functional/glsa_controller_test.rb'
-
-# Offense count: 2
-# Configuration parameters: AllowKeywordBlockArguments.
-Lint/UnderscorePrefixedVariableName:
- Exclude:
- - 'lib/glsamaker/bugs.rb'
- - 'lib/tasks/cve.rake'
-
-# Offense count: 2
-Lint/UnreachableCode:
- Exclude:
- - 'app/controllers/cve_controller.rb'
- - 'app/controllers/glsa_controller.rb'
-
-# Offense count: 10
-# Cop supports --auto-correct.
-# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
-Lint/UnusedBlockArgument:
- Exclude:
- - 'app/helpers/glsa_helper.rb'
- - 'app/models/glsa.rb'
- - 'lib/glsamaker/portage.rb'
-
-# Offense count: 4
-# Cop supports --auto-correct.
-# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods.
-Lint/UnusedMethodArgument:
- Exclude:
- - 'app/models/glsa.rb'
- - 'lib/glsamaker/portage.rb'
- - 'lib/kramdown_ext.rb'
-
-# Offense count: 16
-Lint/UselessAssignment:
- Exclude:
- - 'app/controllers/bug_controller.rb'
- - 'app/controllers/bugs_controller.rb'
- - 'app/controllers/comments_controller.rb'
- - 'app/controllers/search_controller.rb'
- - 'app/models/cve.rb'
- - 'lib/bugzilla.rb'
- - 'lib/bugzilla/bug.rb'
- - 'lib/bugzilla/history.rb'
- - 'lib/glsamaker/bugs.rb'
- - 'lib/tasks/cve.rake'
- - 'lib/tasks/import.rake'
-
-# Offense count: 6
-Metrics/AbcSize:
- Max: 172
-
-# Offense count: 14
-# Configuration parameters: CountComments, ExcludedMethods.
-# ExcludedMethods: refine
-Metrics/BlockLength:
- Max: 192
-
-# Offense count: 3
-# Configuration parameters: CountBlocks.
-Metrics/BlockNesting:
- Max: 4
-
-# Offense count: 5
-# Configuration parameters: CountComments.
-Metrics/ClassLength:
- Max: 441
-
-# Offense count: 18
-Metrics/CyclomaticComplexity:
- Max: 24
-
-# Offense count: 24
-# Cop supports --auto-correct.
-# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
-# URISchemes: http, https
-Metrics/LineLength:
- Max: 312
-
-# Offense count: 26
-# Configuration parameters: CountComments, ExcludedMethods.
-Metrics/MethodLength:
- Max: 105
-
-# Offense count: 1
-# Configuration parameters: CountKeywordArgs.
-Metrics/ParameterLists:
- Max: 6
-
-# Offense count: 14
-Metrics/PerceivedComplexity:
- Max: 19
-
-# Offense count: 1
-Naming/AccessorMethodName:
- Exclude:
- - 'app/models/revision.rb'
-
-# Offense count: 1
-# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
-# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
-Naming/FileName:
- Exclude:
- - 'config/initializers/glsamaker-global.rb'
-
-# Offense count: 1
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: snake_case, camelCase
-Naming/MethodName:
- Exclude:
- - 'lib/bugzilla/bug.rb'
-
-# Offense count: 7
-# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
-# NamePrefix: is_, has_, have_
-# NamePrefixBlacklist: is_, has_, have_
-# NameWhitelist: is_a?
-# MethodDefinitionMacros: define_method, define_singleton_method
-Naming/PredicateName:
- Exclude:
- - 'spec/**/*'
- - 'app/helpers/glsa_helper.rb'
- - 'app/models/glsa.rb'
- - 'app/models/user.rb'
- - 'lib/glsamaker/portage.rb'
-
-# Offense count: 8
-# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
-# AllowedNames: io, id, to, by, on, in, at, ip, db
-Naming/UncommunicativeMethodParamName:
- Exclude:
- - 'app/helpers/application_helper.rb'
- - 'app/helpers/glsa_helper.rb'
- - 'app/models/cve.rb'
- - 'lib/glsamaker/portage.rb'
- - 'lib/kramdown_ext.rb'
- - 'lib/tasks/cve.rake'
-
-# Offense count: 18
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: snake_case, camelCase
-Naming/VariableName:
- Exclude:
- - 'app/controllers/cve_controller.rb'
- - 'app/controllers/glsa_controller.rb'
- - 'app/controllers/index_controller.rb'
-
-# Offense count: 1
-Performance/Caller:
- Exclude:
- - 'app/controllers/application_controller.rb'
-
-# Offense count: 2
-# Cop supports --auto-correct.
-Performance/CompareWithBlock:
- Exclude:
- - 'app/controllers/glsa_controller.rb'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-Performance/RedundantBlockCall:
- Exclude:
- - 'app/helpers/application_helper.rb'
-
-# Offense count: 5
-# Cop supports --auto-correct.
-Performance/RegexpMatch:
- Exclude:
- - 'lib/glsamaker/spelling.rb'
- - 'lib/tasks/cve.rake'
- - 'lib/tasks/rcov.rake'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-Performance/StringReplacement:
- Exclude:
- - 'lib/glsamaker/xml.rb'
-
-# Offense count: 1
-Performance/UnfreezeString:
- Exclude:
- - 'lib/tasks/rcov.rake'
-
-# Offense count: 6
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, Include.
-# SupportedStyles: action, filter
-# Include: app/controllers/**/*.rb
-Rails/ActionFilter:
- Exclude:
- - 'app/controllers/admin/index_controller.rb'
- - 'app/controllers/admin/templates_controller.rb'
- - 'app/controllers/admin/users_controller.rb'
- - 'app/controllers/application_controller.rb'
- - 'app/controllers/cve_controller.rb'
- - 'app/controllers/index_controller.rb'
-
-# Offense count: 3
-# Cop supports --auto-correct.
-Rails/ActiveRecordAliases:
- Exclude:
- - 'app/controllers/admin/templates_controller.rb'
- - 'app/controllers/admin/users_controller.rb'
- - 'app/models/bug.rb'
-
-# Offense count: 5
-# Cop supports --auto-correct.
-# Configuration parameters: Include.
-# Include: **/test/**/*
-Rails/AssertNot:
- Exclude:
- - 'test/unit/glsa_test.rb'
- - 'test/unit/user_test.rb'
-
-# Offense count: 3
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: strict, flexible
-Rails/Date:
- Exclude:
- - 'app/controllers/glsa_controller.rb'
- - 'lib/tasks/cve.rake'
-
-# Offense count: 10
-# Cop supports --auto-correct.
-# Configuration parameters: Whitelist.
-# Whitelist: find_by_sql
-Rails/DynamicFindBy:
- Exclude:
- - 'app/controllers/glsa_controller.rb'
- - 'lib/authentication.rb'
- - 'lib/tasks/cve.rake'
-
-# Offense count: 4
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: slashes, arguments
-Rails/FilePath:
- Exclude:
- - 'lib/bugzilla.rb'
- - 'lib/glsamaker/spelling.rb'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-# Configuration parameters: Include.
-# Include: app/models/**/*.rb
-Rails/FindEach:
- Exclude:
- - 'app/models/revision.rb'
-
-# Offense count: 2
-# Configuration parameters: Include.
-# Include: app/models/**/*.rb
-Rails/HasAndBelongsToMany:
- Exclude:
- - 'app/models/cpe.rb'
- - 'app/models/cve.rb'
-
-# Offense count: 9
-# Configuration parameters: Include.
-# Include: app/models/**/*.rb
-Rails/HasManyOrHasOneDependent:
- Exclude:
- - 'app/models/cve.rb'
- - 'app/models/user.rb'
-
-# Offense count: 1
-# Configuration parameters: Include.
-# Include: app/helpers/**/*.rb
-Rails/HelperInstanceVariable:
- Exclude:
- - 'app/helpers/glsa_helper.rb'
-
-# Offense count: 21
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: numeric, symbolic
-Rails/HttpStatus:
- Exclude:
- - 'app/controllers/bugs_controller.rb'
- - 'app/controllers/comments_controller.rb'
- - 'app/controllers/cve_controller.rb'
- - 'app/controllers/glsa_controller.rb'
- - 'app/controllers/tools_controller.rb'
-
-# Offense count: 15
-# Configuration parameters: Include.
-# Include: app/models/**/*.rb
-Rails/InverseOf:
- Exclude:
- - 'app/models/comment.rb'
- - 'app/models/cve.rb'
- - 'app/models/cve_change.rb'
- - 'app/models/cve_comment.rb'
- - 'app/models/glsa.rb'
- - 'app/models/revision.rb'
- - 'app/models/user.rb'
-
-# Offense count: 4
-Rails/OutputSafety:
- Exclude:
- - 'app/controllers/glsa_controller.rb'
- - 'app/helpers/application_helper.rb'
- - 'lib/glsamaker/spelling.rb'
-
-# Offense count: 1
-# Configuration parameters: Blacklist, Whitelist.
-# Blacklist: decrement!, decrement_counter, increment!, increment_counter, toggle!, touch, update_all, update_attribute, update_column, update_columns, update_counters
-Rails/SkipsModelValidations:
- Exclude:
- - 'app/controllers/glsa_controller.rb'
-
-# Offense count: 11
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: strict, flexible
-Rails/TimeZone:
- Exclude:
- - 'app/models/glsa.rb'
- - 'lib/authorization.rb'
- - 'lib/bugzilla/bug.rb'
- - 'lib/bugzilla/comment.rb'
- - 'lib/bugzilla/history.rb'
- - 'lib/tasks/cve.rake'
-
-# Offense count: 10
-# Cop supports --auto-correct.
-# Configuration parameters: Include.
-# Include: app/models/**/*.rb
-Rails/Validation:
- Exclude:
- - 'app/models/glsa.rb'
- - 'app/models/revision.rb'
- - 'app/models/user.rb'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-Security/YAMLLoad:
- Exclude:
- - 'script/config_init'
-
-# Offense count: 1
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: inline, group
-Style/AccessModifierDeclarations:
- Exclude:
- - 'lib/glsamaker/http.rb'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: prefer_alias, prefer_alias_method
-Style/Alias:
- Exclude:
- - 'lib/bugzilla/bug.rb'
-
-# Offense count: 28
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: always, conditionals
-Style/AndOr:
- Exclude:
- - 'app/controllers/application_controller.rb'
- - 'app/controllers/comments_controller.rb'
- - 'app/controllers/cve_controller.rb'
- - 'app/controllers/glsa_controller.rb'
- - 'app/helpers/application_helper.rb'
- - 'app/models/cve.rb'
- - 'app/models/glsa.rb'
- - 'app/models/user.rb'
- - 'lib/authentication.rb'
- - 'lib/bugzilla.rb'
- - 'lib/glsamaker/bugs.rb'
- - 'lib/glsamaker/diff.rb'
- - 'lib/glsamaker/portage.rb'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-Style/BlockComments:
- Exclude:
- - 'app/models/revision.rb'
-
-# Offense count: 13
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners.
-# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
-# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
-# FunctionalMethods: let, let!, subject, watch
-# IgnoredMethods: lambda, proc, it
-Style/BlockDelimiters:
- Exclude:
- - 'app/controllers/cve_controller.rb'
- - 'app/controllers/glsa_controller.rb'
- - 'config/deploy.rb'
- - 'lib/glsamaker/http.rb'
- - 'test/unit/cve_test.rb'
-
-# Offense count: 13
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: braces, no_braces, context_dependent
-Style/BracesAroundHashParameters:
- Exclude:
- - 'app/controllers/cve_controller.rb'
- - 'app/controllers/glsa_controller.rb'
- - 'app/views/glsa/_glsa.xml.builder'
- - 'config/deploy.rb'
- - 'lib/bugzilla.rb'
- - 'lib/glsamaker/http.rb'
- - 'test/integration/authentication_test.rb'
-
-# Offense count: 11
-# Cop supports --auto-correct.
-# Configuration parameters: AutoCorrect, EnforcedStyle.
-# SupportedStyles: nested, compact
-Style/ClassAndModuleChildren:
- Exclude:
- - 'app/controllers/admin/index_controller.rb'
- - 'app/controllers/admin/templates_controller.rb'
- - 'app/controllers/admin/users_controller.rb'
- - 'app/helpers/admin/index_helper.rb'
- - 'app/helpers/admin/templates_helper.rb'
- - 'app/helpers/admin/users_helper.rb'
- - 'lib/bugzilla/history.rb'
- - 'test/functional/admin/index_controller_test.rb'
- - 'test/functional/admin/templates_controller_test.rb'
- - 'test/functional/admin/users_controller_test.rb'
- - 'test/test_helper.rb'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-Style/ColonMethodCall:
- Exclude:
- - 'app/models/cve.rb'
-
-# Offense count: 13
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
-# SupportedStyles: assign_to_condition, assign_inside_condition
-Style/ConditionalAssignment:
- Exclude:
- - 'app/controllers/glsa_controller.rb'
- - 'app/helpers/application_helper.rb'
- - 'app/models/cve.rb'
- - 'lib/glsamaker/bugs.rb'
- - 'lib/glsamaker/portage.rb'
- - 'lib/glsamaker/spelling.rb'
- - 'lib/tasks/import.rake'
- - 'lib/tasks/rcov.rake'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-Style/DefWithParentheses:
- Exclude:
- - 'lib/bugzilla/bug.rb'
-
-# Offense count: 4
-# Cop supports --auto-correct.
-Style/EmptyLiteral:
- Exclude:
- - 'lib/tasks/import.rake'
- - 'lib/tasks/rcov.rake'
-
-# Offense count: 6
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: compact, expanded
-Style/EmptyMethod:
- Exclude:
- - 'app/controllers/admin/index_controller.rb'
- - 'app/controllers/bugs_controller.rb'
- - 'app/controllers/comments_controller.rb'
- - 'app/controllers/search_controller.rb'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-Style/Encoding:
- Exclude:
- - 'db/schema.rb'
-
-# Offense count: 10
-# Cop supports --auto-correct.
-Style/ExpandPathArguments:
- Exclude:
- - 'Rakefile'
- - 'bin/bundle'
- - 'bin/rails'
- - 'bin/setup'
- - 'config/application.rb'
- - 'config/boot.rb'
- - 'config/environment.rb'
- - 'script/rails'
- - 'test/test_helper.rb'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: each, for
-Style/For:
- Exclude:
- - 'lib/tasks/rcov.rake'
-
-# Offense count: 13
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: annotated, template, unannotated
-Style/FormatStringToken:
- Exclude:
- - 'app/controllers/cve_controller.rb'
- - 'app/helpers/application_helper.rb'
- - 'app/models/cve.rb'
-
-# Offense count: 159
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: always, never
-Style/FrozenStringLiteralComment:
- Enabled: false
-
-# Offense count: 17
-# Configuration parameters: MinBodyLength.
-Style/GuardClause:
- Exclude:
- - 'app/controllers/admin/users_controller.rb'
- - 'app/controllers/cve_controller.rb'
- - 'app/controllers/glsa_controller.rb'
- - 'app/models/comment.rb'
- - 'app/models/glsa.rb'
- - 'lib/authentication.rb'
- - 'lib/bugzilla.rb'
- - 'lib/bugzilla/bug.rb'
- - 'lib/glsamaker/bugs.rb'
- - 'lib/glsamaker/mail.rb'
- - 'lib/glsamaker/portage.rb'
-
-# Offense count: 550
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
-# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
-Style/HashSyntax:
- Enabled: false
-
-# Offense count: 5
-# Configuration parameters: AllowIfModifier.
-Style/IfInsideElse:
- Exclude:
- - 'app/helpers/application_helper.rb'
- - 'lib/glsamaker/bugs.rb'
- - 'lib/tasks/cve.rake'
-
-# Offense count: 40
-# Cop supports --auto-correct.
-Style/IfUnlessModifier:
- Enabled: false
-
-# Offense count: 1
-# Cop supports --auto-correct.
-# Configuration parameters: InverseMethods, InverseBlocks.
-Style/InverseMethods:
- Exclude:
- - 'app/views/glsa/_glsa.xml.builder'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-Style/LineEndConcatenation:
- Exclude:
- - 'db/migrate/20100918223549_add_system_user.rb'
-
-# Offense count: 3
-# Cop supports --auto-correct.
-# Configuration parameters: IgnoredMethods.
-Style/MethodCallWithoutArgsParentheses:
- Exclude:
- - 'app/helpers/glsa_helper.rb'
- - 'lib/tasks/import.rake'
-
-# Offense count: 2
-# Cop supports --auto-correct.
-Style/MultilineIfThen:
- Exclude:
- - 'lib/authentication.rb'
- - 'script/db-backup'
-
-# Offense count: 18
-# Cop supports --auto-correct.
-Style/MultilineWhenThen:
- Exclude:
- - 'lib/bugzilla/bug.rb'
-
-# Offense count: 14
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: literals, strict
-Style/MutableConstant:
- Exclude:
- - 'config/environment.rb'
- - 'config/initializers/glsamaker-global.rb'
- - 'config/initializers/glsamaker.rb'
- - 'lib/kramdown_ext.rb'
- - 'lib/tasks/cve.rake'
- - 'lib/tasks/import.rake'
- - 'script/db-backup'
-
-# Offense count: 5
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: both, prefix, postfix
-Style/NegatedIf:
- Exclude:
- - 'app/controllers/glsa_controller.rb'
- - 'app/models/glsa.rb'
- - 'lib/tasks/import.rake'
-
-# Offense count: 4
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, MinBodyLength.
-# SupportedStyles: skip_modifier_ifs, always
-Style/Next:
- Exclude:
- - 'app/controllers/tools_controller.rb'
- - 'lib/tasks/import.rake'
-
-# Offense count: 18
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: predicate, comparison
-Style/NilComparison:
- Exclude:
- - 'app/controllers/cve_controller.rb'
- - 'app/controllers/glsa_controller.rb'
- - 'app/controllers/index_controller.rb'
- - 'app/controllers/tools_controller.rb'
- - 'app/models/user.rb'
- - 'lib/authentication.rb'
- - 'lib/bugzilla/history.rb'
- - 'lib/tasks/import.rake'
-
-# Offense count: 3
-# Cop supports --auto-correct.
-# Configuration parameters: IncludeSemanticChanges.
-Style/NonNilCheck:
- Exclude:
- - 'lib/glsamaker/bugs.rb'
- - 'lib/glsamaker/portage.rb'
-
-# Offense count: 10
-# Cop supports --auto-correct.
-Style/Not:
- Exclude:
- - 'app/controllers/search_controller.rb'
- - 'app/models/glsa.rb'
- - 'app/models/user.rb'
- - 'lib/glsamaker/bugs.rb'
- - 'lib/tasks/import.rake'
-
-# Offense count: 2
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedOctalStyle.
-# SupportedOctalStyles: zero_with_o, zero_only
-Style/NumericLiteralPrefix:
- Exclude:
- - 'lib/bugzilla.rb'
- - 'script/config_init'
-
-# Offense count: 24
-# Cop supports --auto-correct.
-# Configuration parameters: Strict.
-Style/NumericLiterals:
- MinDigits: 15
-
-# Offense count: 28
-# Cop supports --auto-correct.
-# Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
-# SupportedStyles: predicate, comparison
-Style/NumericPredicate:
- Exclude:
- - 'spec/**/*'
- - 'app/controllers/admin/users_controller.rb'
- - 'app/controllers/glsa_controller.rb'
- - 'app/controllers/tools_controller.rb'
- - 'app/models/glsa.rb'
- - 'app/models/user.rb'
- - 'app/views/glsa/_glsa.xml.builder'
- - 'lib/authorization.rb'
- - 'lib/bugzilla/bug.rb'
- - 'lib/glsamaker/bugs.rb'
- - 'lib/glsamaker/diff.rb'
- - 'lib/tasks/cve.rake'
- - 'lib/tasks/import.rake'
-
-# Offense count: 5
-# Cop supports --auto-correct.
-# Configuration parameters: PreferredDelimiters.
-Style/PercentLiteralDelimiters:
- Exclude:
- - 'app/models/package.rb'
- - 'config/application.rb'
- - 'lib/tasks/cve.rake'
-
-# Offense count: 38
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: short, verbose
-Style/PreferredHashMethods:
- Exclude:
- - 'app/controllers/glsa_controller.rb'
- - 'app/helpers/application_helper.rb'
- - 'lib/bugzilla.rb'
- - 'lib/bugzilla/history.rb'
- - 'lib/glsamaker/xml.rb'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-Style/Proc:
- Exclude:
- - 'app/models/comment.rb'
-
-# Offense count: 2
-# Cop supports --auto-correct.
-Style/RedundantBegin:
- Exclude:
- - 'app/controllers/bugs_controller.rb'
- - 'app/controllers/comments_controller.rb'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-Style/RedundantException:
- Exclude:
- - 'lib/authentication.rb'
-
-# Offense count: 8
-# Cop supports --auto-correct.
-# Configuration parameters: AllowMultipleReturnValues.
-Style/RedundantReturn:
- Exclude:
- - 'app/controllers/cve_controller.rb'
- - 'app/models/glsa.rb'
- - 'app/models/revision.rb'
- - 'lib/authentication.rb'
- - 'lib/glsamaker/bugs.rb'
-
-# Offense count: 38
-# Cop supports --auto-correct.
-Style/RedundantSelf:
- Exclude:
- - 'app/models/bug.rb'
- - 'app/models/cpe.rb'
- - 'app/models/cve.rb'
- - 'app/models/glsa.rb'
- - 'app/models/package.rb'
- - 'app/models/revision.rb'
- - 'app/models/user.rb'
- - 'lib/bugzilla/bug.rb'
- - 'lib/glsamaker/bugs.rb'
-
-# Offense count: 10
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
-# SupportedStyles: slashes, percent_r, mixed
-Style/RegexpLiteral:
- Exclude:
- - 'app/controllers/tools_controller.rb'
- - 'app/helpers/glsa_helper.rb'
- - 'app/models/glsa.rb'
- - 'app/models/package.rb'
- - 'lib/glsamaker/portage.rb'
-
-# Offense count: 3
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: implicit, explicit
-Style/RescueStandardError:
- Exclude:
- - 'app/helpers/application_helper.rb'
- - 'lib/tasks/import.rake'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-Style/SelfAssignment:
- Exclude:
- - 'lib/tasks/rcov.rake'
-
-# Offense count: 3
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: only_raise, only_fail, semantic
-Style/SignalException:
- Exclude:
- - 'app/controllers/cve_controller.rb'
- - 'lib/tasks/cve.rake'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-# Configuration parameters: .
-# SupportedStyles: use_perl_names, use_english_names
-Style/SpecialGlobalVars:
- EnforcedStyle: use_perl_names
-
-# Offense count: 4
-# Cop supports --auto-correct.
-Style/StderrPuts:
- Exclude:
- - 'lib/tasks/cve.rake'
- - 'lib/tasks/rcov.rake'
- - 'script/config_init'
-
-# Offense count: 809
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
-# SupportedStyles: single_quotes, double_quotes
-Style/StringLiterals:
- Enabled: false
-
-# Offense count: 10
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: single_quotes, double_quotes
-Style/StringLiteralsInInterpolation:
- Exclude:
- - 'app/helpers/glsa_helper.rb'
- - 'app/models/cve.rb'
- - 'app/models/glsa.rb'
-
-# Offense count: 11
-# Cop supports --auto-correct.
-# Configuration parameters: MinSize.
-# SupportedStyles: percent, brackets
-Style/SymbolArray:
- EnforcedStyle: brackets
-
-# Offense count: 17
-# Cop supports --auto-correct.
-# Configuration parameters: IgnoredMethods.
-# IgnoredMethods: respond_to, define_method
-Style/SymbolProc:
- Exclude:
- - 'app/controllers/cve_controller.rb'
- - 'app/controllers/glsa_controller.rb'
- - 'app/models/cve.rb'
- - 'app/models/glsa.rb'
- - 'app/models/revision.rb'
- - 'app/views/cve/info.json.jbuilder'
- - 'lib/glsamaker/diff.rb'
- - 'lib/tasks/rcov.rake'
- - 'test/unit/glsa_test.rb'
- - 'test/unit/revision_test.rb'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, AllowSafeAssignment.
-# SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex
-Style/TernaryParentheses:
- Exclude:
- - 'app/views/glsa/_glsa.xml.builder'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyleForMultiline.
-# SupportedStylesForMultiline: comma, consistent_comma, no_comma
-Style/TrailingCommaInHashLiteral:
- Exclude:
- - 'lib/bugzilla.rb'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-# Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, Whitelist.
-# Whitelist: to_ary, to_a, to_c, to_enum, to_h, to_hash, to_i, to_int, to_io, to_open, to_path, to_proc, to_r, to_regexp, to_str, to_s, to_sym
-Style/TrivialAccessors:
- Exclude:
- - 'lib/glsamaker/bugs.rb'
-
-# Offense count: 3
-# Cop supports --auto-correct.
-Style/UnlessElse:
- Exclude:
- - 'app/controllers/bugs_controller.rb'
- - 'app/controllers/comments_controller.rb'
- - 'lib/bugzilla/history.rb'
-
-# Offense count: 2
-# Cop supports --auto-correct.
-Style/UnneededInterpolation:
- Exclude:
- - 'app/views/glsa/_glsa.xml.builder'
- - 'lib/tasks/rcov.rake'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-Style/UnpackFirst:
- Exclude:
- - 'lib/authentication.rb'
-
-# Offense count: 2
-# Cop supports --auto-correct.
-# Configuration parameters: WordRegex.
-# SupportedStyles: percent, brackets
-Style/WordArray:
- EnforcedStyle: percent
- MinSize: 6
-
-# Offense count: 11
-# Cop supports --auto-correct.
-Style/ZeroLengthPredicate:
- Exclude:
- - 'app/controllers/glsa_controller.rb'
- - 'app/controllers/tools_controller.rb'
- - 'app/models/glsa.rb'
- - 'app/views/glsa/_glsa.xml.builder'
- - 'lib/bugzilla/bug.rb'
- - 'lib/tasks/cve.rake'
- - 'lib/tasks/import.rake'
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index d69e055..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,29 +0,0 @@
-language: ruby
-cache: bundler
-rvm:
- - 2.4
- - 2.5
-
-gemfiles:
- - Gemfile
-
-branches:
- only:
- - master
-
-addons:
- mariadb: '10.2'
-
-before_install:
- - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
- - gem install bundler -v '< 2'
-
-
-before_script:
- - sed 's/i_forgot_to_set_this/"test-secret"/' < config/initializers/glsamaker.rb.sample > config/initializers/glsamaker.rb
- - cp config/database.yml.mysql config/database.yml
- - mysql -e 'CREATE DATABASE glsamaker_test;'
-
-script:
- - bundle exec rubocop
- - bundle exec rake test RAILS_ENV=test
diff --git a/Capfile b/Capfile
deleted file mode 100644
index 1a98f3c..0000000
--- a/Capfile
+++ /dev/null
@@ -1,4 +0,0 @@
-load 'deploy' if respond_to?(:namespace) # cap2 differentiator
-Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
-
-load 'config/deploy' # remove this line to skip loading any of the default tasks
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..9a13fa3
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,26 @@
+FROM golang:1.14.0 AS builder
+WORKDIR /go/src/glsamaker
+COPY . /go/src/glsamaker
+RUN go get github.com/go-pg/pg/v9
+RUN go get github.com/google/uuid
+RUN go get github.com/skip2/go-qrcode
+RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o bin .
+
+FROM node:13 AS assetsbuilder
+WORKDIR /go/src/glsamaker
+COPY . /go/src/glsamaker
+RUN npm install && cd node_modules/@gentoo/tyrian && npm install && npm run dist && cd /go/src/glsamaker
+RUN npx webpack
+
+FROM alpine:latest as certs
+RUN apk --update add ca-certificates
+
+FROM scratch
+WORKDIR /go/src/glsamaker
+COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
+COPY --from=assetsbuilder /go/src/glsamaker/assets /go/src/glsamaker/assets
+COPY --from=builder /go/src/glsamaker/bin /go/src/glsamaker/bin
+COPY --from=builder /go/src/glsamaker/pkg /go/src/glsamaker/pkg
+COPY --from=builder /go/src/glsamaker/web /go/src/glsamaker/web
+
+CMD ["/go/src/glsamaker/bin/glsamaker"]
diff --git a/Dockerfile.dev b/Dockerfile.dev
new file mode 100644
index 0000000..902fd47
--- /dev/null
+++ b/Dockerfile.dev
@@ -0,0 +1,10 @@
+FROM golang:1.14.0
+RUN apt update && apt install -y ca-certificates ntp ntpdate
+WORKDIR /go/src/glsamaker
+COPY . /go/src/glsamaker
+RUN go get github.com/go-pg/pg/v9
+RUN go get github.com/google/uuid
+RUN go get github.com/skip2/go-qrcode
+RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o bin .
+
+CMD ["/go/src/glsamaker/bin/glsamaker"]
diff --git a/Gemfile b/Gemfile
deleted file mode 100644
index ea8c8dc..0000000
--- a/Gemfile
+++ /dev/null
@@ -1,60 +0,0 @@
-source 'https://rubygems.org'
-
-gem 'rails', '~> 4.2'
-gem 'xmlrpc'
-gem 'rake'
-
-gem 'mysql2', '~> 0.4.10'
-
-gem 'json', '~> 2.0'
-gem 'jbuilder', '~> 2.0'
-
-# Gems used only for assets and not required
-# in production environments by default.
-#group :assets do
-# gem 'sass-rails', "~> 3.2.0"
-# gem 'coffee-rails', "~> 3.2.0"
-# gem 'uglifier'
-#end
-
-gem 'prototype-rails', github: 'rails/prototype-rails', branch: '4.2'
-
-# Use unicorn as the web server
-#gem 'unicorn'
-gem 'thin'
-
-# Deploy with Capistrano
-gem 'capistrano'
-
-# gem 'exception_notification'
-
-group :development do
-# No debugger at the moment because of the stupid build system of a dependency of ruby-debug19
-# gem 'ruby-debug', :platforms => :ruby_18
-# gem 'ruby-debug19', :platforms => :ruby_19
-# gem 'require_relative'
-end
-
-gem 'diff-lcs', require: 'diff/lcs'
-gem 'nokogiri'
-gem 'text-format-revised', require: 'text/format'
-gem 'kramdown'
-
-gem 'thinking-sphinx', '~> 3.1.4'
-
-#FIXME: runspell 0.0.1 is dead since 2011, we may need
-#to create a new spelling module
-
-#gem 'runspell'
-
-# gem "rdoc"
-
-group :test do
- gem 'simplecov'
- gem 'ci_reporter'
- gem 'minitest-reporters'
-
- gem 'rubocop'
- gem 'rubocop-performance'
- gem 'rubocop-rails'
-end
diff --git a/Gemfile.lock b/Gemfile.lock
deleted file mode 100644
index 48a2d90..0000000
--- a/Gemfile.lock
+++ /dev/null
@@ -1,206 +0,0 @@
-GIT
- remote: git://github.com/rails/prototype-rails.git
- revision: 0fed929ff48c10c3b978edd3baa983a81f404dbf
- branch: 4.2
- specs:
- prototype-rails (4.0.0)
- rails (~> 4.0)
-
-GEM
- remote: https://rubygems.org/
- specs:
- actionmailer (4.2.11.1)
- actionpack (= 4.2.11.1)
- actionview (= 4.2.11.1)
- activejob (= 4.2.11.1)
- mail (~> 2.5, >= 2.5.4)
- rails-dom-testing (~> 1.0, >= 1.0.5)
- actionpack (4.2.11.1)
- actionview (= 4.2.11.1)
- activesupport (= 4.2.11.1)
- rack (~> 1.6)
- rack-test (~> 0.6.2)
- rails-dom-testing (~> 1.0, >= 1.0.5)
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
- actionview (4.2.11.1)
- activesupport (= 4.2.11.1)
- builder (~> 3.1)
- erubis (~> 2.7.0)
- rails-dom-testing (~> 1.0, >= 1.0.5)
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
- activejob (4.2.11.1)
- activesupport (= 4.2.11.1)
- globalid (>= 0.3.0)
- activemodel (4.2.11.1)
- activesupport (= 4.2.11.1)
- builder (~> 3.1)
- activerecord (4.2.11.1)
- activemodel (= 4.2.11.1)
- activesupport (= 4.2.11.1)
- arel (~> 6.0)
- activesupport (4.2.11.1)
- i18n (~> 0.7)
- minitest (~> 5.1)
- thread_safe (~> 0.3, >= 0.3.4)
- tzinfo (~> 1.1)
- airbrussh (1.3.2)
- sshkit (>= 1.6.1, != 1.7.0)
- ansi (1.5.0)
- arel (6.0.4)
- ast (2.4.0)
- builder (3.2.3)
- capistrano (3.11.0)
- airbrussh (>= 1.0.0)
- i18n
- rake (>= 10.0.0)
- sshkit (>= 1.9.0)
- ci_reporter (2.0.0)
- builder (>= 2.1.2)
- concurrent-ruby (1.1.5)
- crass (1.0.4)
- daemons (1.3.1)
- diff-lcs (1.3)
- docile (1.3.2)
- erubis (2.7.0)
- eventmachine (1.2.7)
- globalid (0.4.2)
- activesupport (>= 4.2.0)
- i18n (0.9.5)
- concurrent-ruby (~> 1.0)
- innertube (1.1.0)
- jaro_winkler (1.5.3)
- jbuilder (2.9.1)
- activesupport (>= 4.2.0)
- joiner (0.3.4)
- activerecord (>= 4.1.0)
- json (2.2.0)
- kramdown (2.1.0)
- loofah (2.2.3)
- crass (~> 1.0.2)
- nokogiri (>= 1.5.9)
- mail (2.7.1)
- mini_mime (>= 0.1.1)
- middleware (0.1.0)
- mini_mime (1.0.2)
- mini_portile2 (2.4.0)
- minitest (5.11.3)
- minitest-reporters (1.3.6)
- ansi
- builder
- minitest (>= 5.0)
- ruby-progressbar
- mysql2 (0.4.10)
- net-scp (2.0.0)
- net-ssh (>= 2.6.5, < 6.0.0)
- net-ssh (5.2.0)
- nokogiri (1.10.3)
- mini_portile2 (~> 2.4.0)
- parallel (1.17.0)
- parser (2.6.3.0)
- ast (~> 2.4.0)
- rack (1.6.11)
- rack-test (0.6.3)
- rack (>= 1.0)
- rails (4.2.11.1)
- actionmailer (= 4.2.11.1)
- actionpack (= 4.2.11.1)
- actionview (= 4.2.11.1)
- activejob (= 4.2.11.1)
- activemodel (= 4.2.11.1)
- activerecord (= 4.2.11.1)
- activesupport (= 4.2.11.1)
- bundler (>= 1.3.0, < 2.0)
- railties (= 4.2.11.1)
- sprockets-rails
- rails-deprecated_sanitizer (1.0.3)
- activesupport (>= 4.2.0.alpha)
- rails-dom-testing (1.0.9)
- activesupport (>= 4.2.0, < 5.0)
- nokogiri (~> 1.6)
- rails-deprecated_sanitizer (>= 1.0.1)
- rails-html-sanitizer (1.0.4)
- loofah (~> 2.2, >= 2.2.2)
- railties (4.2.11.1)
- actionpack (= 4.2.11.1)
- activesupport (= 4.2.11.1)
- rake (>= 0.8.7)
- thor (>= 0.18.1, < 2.0)
- rainbow (3.0.0)
- rake (12.3.3)
- riddle (2.3.2)
- rubocop (0.73.0)
- jaro_winkler (~> 1.5.1)
- parallel (~> 1.10)
- parser (>= 2.6)
- rainbow (>= 2.2.2, < 4.0)
- ruby-progressbar (~> 1.7)
- unicode-display_width (>= 1.4.0, < 1.7)
- rubocop-performance (1.4.0)
- rubocop (>= 0.71.0)
- rubocop-rails (2.2.1)
- rack (>= 1.1)
- rubocop (>= 0.72.0)
- ruby-progressbar (1.10.1)
- simplecov (0.17.0)
- docile (~> 1.1)
- json (>= 1.8, < 3)
- simplecov-html (~> 0.10.0)
- simplecov-html (0.10.2)
- sprockets (3.7.2)
- concurrent-ruby (~> 1.0)
- rack (> 1, < 3)
- sprockets-rails (3.2.1)
- actionpack (>= 4.0)
- activesupport (>= 4.0)
- sprockets (>= 3.0.0)
- sshkit (1.19.1)
- net-scp (>= 1.1.2)
- net-ssh (>= 2.8.0)
- text-format-revised (1.1.0)
- text-hyphen (~> 1.2.0)
- text-hyphen (1.2)
- thin (1.7.2)
- daemons (~> 1.0, >= 1.0.9)
- eventmachine (~> 1.0, >= 1.0.4)
- rack (>= 1, < 3)
- thinking-sphinx (3.1.4)
- activerecord (>= 3.1.0)
- builder (>= 2.1.2)
- innertube (>= 1.0.2)
- joiner (>= 0.2.0)
- middleware (>= 0.1.0)
- riddle (>= 1.5.11)
- thor (0.20.3)
- thread_safe (0.3.6)
- tzinfo (1.2.5)
- thread_safe (~> 0.1)
- unicode-display_width (1.6.0)
- xmlrpc (0.3.0)
-
-PLATFORMS
- ruby
-
-DEPENDENCIES
- capistrano
- ci_reporter
- diff-lcs
- jbuilder (~> 2.0)
- json (~> 2.0)
- kramdown
- minitest-reporters
- mysql2 (~> 0.4.10)
- nokogiri
- prototype-rails!
- rails (~> 4.2)
- rake
- rubocop
- rubocop-performance
- rubocop-rails
- simplecov
- text-format-revised
- thin
- thinking-sphinx (~> 3.1.4)
- xmlrpc
-
-BUNDLED WITH
- 1.17.3
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 2def0e8..0000000
--- a/LICENSE
+++ /dev/null
@@ -1,661 +0,0 @@
- GNU AFFERO GENERAL PUBLIC LICENSE
- Version 3, 19 November 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU Affero General Public License is a free, copyleft license for
-software and other kinds of works, specifically designed to ensure
-cooperation with the community in the case of network server software.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-our General Public Licenses are intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- Developers that use our General Public Licenses protect your rights
-with two steps: (1) assert copyright on the software, and (2) offer
-you this License which gives you legal permission to copy, distribute
-and/or modify the software.
-
- A secondary benefit of defending all users' freedom is that
-improvements made in alternate versions of the program, if they
-receive widespread use, become available for other developers to
-incorporate. Many developers of free software are heartened and
-encouraged by the resulting cooperation. However, in the case of
-software used on network servers, this result may fail to come about.
-The GNU General Public License permits making a modified version and
-letting the public access it on a server without ever releasing its
-source code to the public.
-
- The GNU Affero General Public License is designed specifically to
-ensure that, in such cases, the modified source code becomes available
-to the community. It requires the operator of a network server to
-provide the source code of the modified version running there to the
-users of that server. Therefore, public use of a modified version, on
-a publicly accessible server, gives the public access to the source
-code of the modified version.
-
- An older license, called the Affero General Public License and
-published by Affero, was designed to accomplish similar goals. This is
-a different license, not a version of the Affero GPL, but Affero has
-released a new version of the Affero GPL which permits relicensing under
-this license.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU Affero General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Remote Network Interaction; Use with the GNU General Public License.
-
- Notwithstanding any other provision of this License, if you modify the
-Program, your modified version must prominently offer all users
-interacting with it remotely through a computer network (if your version
-supports such interaction) an opportunity to receive the Corresponding
-Source of your version by providing access to the Corresponding Source
-from a network server at no charge, through some standard or customary
-means of facilitating copying of software. This Corresponding Source
-shall include the Corresponding Source for any work covered by version 3
-of the GNU General Public License that is incorporated pursuant to the
-following paragraph.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the work with which it is combined will remain governed by version
-3 of the GNU General Public License.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU Affero General Public License from time to time. Such new versions
-will be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU Affero General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU Affero General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU Affero General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-
- Copyright (C)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-
-Also add information on how to contact you by electronic and paper mail.
-
- If your software can interact with users remotely through a computer
-network, you should also make sure that it provides a way for users to
-get its source. For example, if your program is a web application, its
-interface could display a "Source" link that leads users to an archive
-of the code. There are many ways you could offer source, and different
-solutions will be better for different programs; see section 13 for the
-specific requirements.
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU AGPL, see
-.
\ No newline at end of file
diff --git a/README b/README
deleted file mode 100644
index 37ec8ea..0000000
--- a/README
+++ /dev/null
@@ -1,243 +0,0 @@
-== Welcome to Rails
-
-Rails is a web-application framework that includes everything needed to create
-database-backed web applications according to the Model-View-Control pattern.
-
-This pattern splits the view (also called the presentation) into "dumb" templates
-that are primarily responsible for inserting pre-built data in between HTML tags.
-The model contains the "smart" domain objects (such as Account, Product, Person,
-Post) that holds all the business logic and knows how to persist themselves to
-a database. The controller handles the incoming requests (such as Save New Account,
-Update Product, Show Post) by manipulating the model and directing data to the view.
-
-In Rails, the model is handled by what's called an object-relational mapping
-layer entitled Active Record. This layer allows you to present the data from
-database rows as objects and embellish these data objects with business logic
-methods. You can read more about Active Record in
-link:files/vendor/rails/activerecord/README.html.
-
-The controller and view are handled by the Action Pack, which handles both
-layers by its two parts: Action View and Action Controller. These two layers
-are bundled in a single package due to their heavy interdependence. This is
-unlike the relationship between the Active Record and Action Pack that is much
-more separate. Each of these packages can be used independently outside of
-Rails. You can read more about Action Pack in
-link:files/vendor/rails/actionpack/README.html.
-
-
-== Getting Started
-
-1. At the command prompt, start a new Rails application using the rails command
- and your application name. Ex: rails myapp
-2. Change directory into myapp and start the web server: script/server (run with --help for options)
-3. Go to http://localhost:3000/ and get "Welcome aboard: You're riding the Rails!"
-4. Follow the guidelines to start developing your application
-
-
-== Web Servers
-
-By default, Rails will try to use Mongrel if it's are installed when started with script/server, otherwise Rails will use WEBrick, the webserver that ships with Ruby. But you can also use Rails
-with a variety of other web servers.
-
-Mongrel is a Ruby-based webserver with a C component (which requires compilation) that is
-suitable for development and deployment of Rails applications. If you have Ruby Gems installed,
-getting up and running with mongrel is as easy as: gem install mongrel.
-More info at: http://mongrel.rubyforge.org
-
-Say other Ruby web servers like Thin and Ebb or regular web servers like Apache or LiteSpeed or
-Lighttpd or IIS. The Ruby web servers are run through Rack and the latter can either be setup to use
-FCGI or proxy to a pack of Mongrels/Thin/Ebb servers.
-
-== Apache .htaccess example for FCGI/CGI
-
-# General Apache options
-AddHandler fastcgi-script .fcgi
-AddHandler cgi-script .cgi
-Options +FollowSymLinks +ExecCGI
-
-# If you don't want Rails to look in certain directories,
-# use the following rewrite rules so that Apache won't rewrite certain requests
-#
-# Example:
-# RewriteCond %{REQUEST_URI} ^/notrails.*
-# RewriteRule .* - [L]
-
-# Redirect all requests not available on the filesystem to Rails
-# By default the cgi dispatcher is used which is very slow
-#
-# For better performance replace the dispatcher with the fastcgi one
-#
-# Example:
-# RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
-RewriteEngine On
-
-# If your Rails application is accessed via an Alias directive,
-# then you MUST also set the RewriteBase in this htaccess file.
-#
-# Example:
-# Alias /myrailsapp /path/to/myrailsapp/public
-# RewriteBase /myrailsapp
-
-RewriteRule ^$ index.html [QSA]
-RewriteRule ^([^.]+)$ $1.html [QSA]
-RewriteCond %{REQUEST_FILENAME} !-f
-RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
-
-# In case Rails experiences terminal errors
-# Instead of displaying this message you can supply a file here which will be rendered instead
-#
-# Example:
-# ErrorDocument 500 /500.html
-
-ErrorDocument 500 "
Application error
Rails application failed to start properly"
-
-
-== Debugging Rails
-
-Sometimes your application goes wrong. Fortunately there are a lot of tools that
-will help you debug it and get it back on the rails.
-
-First area to check is the application log files. Have "tail -f" commands running
-on the server.log and development.log. Rails will automatically display debugging
-and runtime information to these files. Debugging info will also be shown in the
-browser on requests from 127.0.0.1.
-
-You can also log your own messages directly into the log file from your code using
-the Ruby logger class from inside your controllers. Example:
-
- class WeblogController < ActionController::Base
- def destroy
- @weblog = Weblog.find(params[:id])
- @weblog.destroy
- logger.info("#{Time.now} Destroyed Weblog ID ##{@weblog.id}!")
- end
- end
-
-The result will be a message in your log file along the lines of:
-
- Mon Oct 08 14:22:29 +1000 2007 Destroyed Weblog ID #1
-
-More information on how to use the logger is at http://www.ruby-doc.org/core/
-
-Also, Ruby documentation can be found at http://www.ruby-lang.org/ including:
-
-* The Learning Ruby (Pickaxe) Book: http://www.ruby-doc.org/docs/ProgrammingRuby/
-* Learn to Program: http://pine.fm/LearnToProgram/ (a beginners guide)
-
-These two online (and free) books will bring you up to speed on the Ruby language
-and also on programming in general.
-
-
-== Debugger
-
-Debugger support is available through the debugger command when you start your Mongrel or
-Webrick server with --debugger. This means that you can break out of execution at any point
-in the code, investigate and change the model, AND then resume execution!
-You need to install ruby-debug to run the server in debugging mode. With gems, use 'gem install ruby-debug'
-Example:
-
- class WeblogController < ActionController::Base
- def index
- @posts = Post.find(:all)
- debugger
- end
- end
-
-So the controller will accept the action, run the first line, then present you
-with a IRB prompt in the server window. Here you can do things like:
-
- >> @posts.inspect
- => "[#nil, \"body\"=>nil, \"id\"=>\"1\"}>,
- #\"Rails you know!\", \"body\"=>\"Only ten..\", \"id\"=>\"2\"}>]"
- >> @posts.first.title = "hello from a debugger"
- => "hello from a debugger"
-
-...and even better is that you can examine how your runtime objects actually work:
-
- >> f = @posts.first
- => #nil, "body"=>nil, "id"=>"1"}>
- >> f.
- Display all 152 possibilities? (y or n)
-
-Finally, when you're ready to resume execution, you enter "cont"
-
-
-== Console
-
-You can interact with the domain model by starting the console through script/console.
-Here you'll have all parts of the application configured, just like it is when the
-application is running. You can inspect domain models, change values, and save to the
-database. Starting the script without arguments will launch it in the development environment.
-Passing an argument will specify a different environment, like script/console production.
-
-To reload your controllers and models after launching the console run reload!
-
-== dbconsole
-
-You can go to the command line of your database directly through script/dbconsole.
-You would be connected to the database with the credentials defined in database.yml.
-Starting the script without arguments will connect you to the development database. Passing an
-argument will connect you to a different database, like script/dbconsole production.
-Currently works for mysql, postgresql and sqlite.
-
-== Description of Contents
-
-app
- Holds all the code that's specific to this particular application.
-
-app/controllers
- Holds controllers that should be named like weblogs_controller.rb for
- automated URL mapping. All controllers should descend from ApplicationController
- which itself descends from ActionController::Base.
-
-app/models
- Holds models that should be named like post.rb.
- Most models will descend from ActiveRecord::Base.
-
-app/views
- Holds the template files for the view that should be named like
- weblogs/index.html.erb for the WeblogsController#index action. All views use eRuby
- syntax.
-
-app/views/layouts
- Holds the template files for layouts to be used with views. This models the common
- header/footer method of wrapping views. In your views, define a layout using the
- layout :default and create a file named default.html.erb. Inside default.html.erb,
- call <% yield %> to render the view using this layout.
-
-app/helpers
- Holds view helpers that should be named like weblogs_helper.rb. These are generated
- for you automatically when using script/generate for controllers. Helpers can be used to
- wrap functionality for your views into methods.
-
-config
- Configuration files for the Rails environment, the routing map, the database, and other dependencies.
-
-db
- Contains the database schema in schema.rb. db/migrate contains all
- the sequence of Migrations for your schema.
-
-doc
- This directory is where your application documentation will be stored when generated
- using rake doc:app
-
-lib
- Application specific libraries. Basically, any kind of custom code that doesn't
- belong under controllers, models, or helpers. This directory is in the load path.
-
-public
- The directory available for the web server. Contains subdirectories for images, stylesheets,
- and javascripts. Also contains the dispatchers and the default HTML files. This should be
- set as the DOCUMENT_ROOT of your web server.
-
-script
- Helper scripts for automation and generation.
-
-test
- Unit and functional tests along with fixtures. When using the script/generate scripts, template
- test files will be generated for you and placed in this directory.
-
-vendor
- External libraries that the application depends on. Also includes the plugins subdirectory.
- If the app has frozen rails, those gems also go here, under vendor/rails/.
- This directory is in the load path.
diff --git a/Rakefile b/Rakefile
deleted file mode 100644
index 463f2f4..0000000
--- a/Rakefile
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env rake
-# Add your own tasks in files placed in lib/tasks ending in .rake,
-# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
-
-require File.expand_path('../config/application', __FILE__)
-
-Glsamaker::Application.load_tasks
-
-begin
- require 'ci/reporter/rake/test_unit'
-rescue LoadError
-end
diff --git a/app/assets/images/biglogo.png b/app/assets/images/biglogo.png
deleted file mode 100644
index 58fc589..0000000
Binary files a/app/assets/images/biglogo.png and /dev/null differ
diff --git a/app/assets/images/cvetool-logo.png b/app/assets/images/cvetool-logo.png
deleted file mode 100644
index 2546cc7..0000000
Binary files a/app/assets/images/cvetool-logo.png and /dev/null differ
diff --git a/app/assets/images/icons/access.png b/app/assets/images/icons/access.png
deleted file mode 100755
index a9e1d4a..0000000
Binary files a/app/assets/images/icons/access.png and /dev/null differ
diff --git a/app/assets/images/icons/admin.png b/app/assets/images/icons/admin.png
deleted file mode 100644
index 565a933..0000000
Binary files a/app/assets/images/icons/admin.png and /dev/null differ
diff --git a/app/assets/images/icons/affected.png b/app/assets/images/icons/affected.png
deleted file mode 100755
index 25ea793..0000000
Binary files a/app/assets/images/icons/affected.png and /dev/null differ
diff --git a/app/assets/images/icons/approval.png b/app/assets/images/icons/approval.png
deleted file mode 100644
index a12a1d0..0000000
Binary files a/app/assets/images/icons/approval.png and /dev/null differ
diff --git a/app/assets/images/icons/approved.png b/app/assets/images/icons/approved.png
deleted file mode 100755
index 210b1a6..0000000
Binary files a/app/assets/images/icons/approved.png and /dev/null differ
diff --git a/app/assets/images/icons/arch.png b/app/assets/images/icons/arch.png
deleted file mode 100755
index 9db64b5..0000000
Binary files a/app/assets/images/icons/arch.png and /dev/null differ
diff --git a/app/assets/images/icons/atom.png b/app/assets/images/icons/atom.png
deleted file mode 100755
index 200a5fd..0000000
Binary files a/app/assets/images/icons/atom.png and /dev/null differ
diff --git a/app/assets/images/icons/auto.png b/app/assets/images/icons/auto.png
deleted file mode 100755
index 19dfc93..0000000
Binary files a/app/assets/images/icons/auto.png and /dev/null differ
diff --git a/app/assets/images/icons/background-go.png b/app/assets/images/icons/background-go.png
deleted file mode 100755
index acaea0f..0000000
Binary files a/app/assets/images/icons/background-go.png and /dev/null differ
diff --git a/app/assets/images/icons/background.png b/app/assets/images/icons/background.png
deleted file mode 100755
index be7001f..0000000
Binary files a/app/assets/images/icons/background.png and /dev/null differ
diff --git a/app/assets/images/icons/bug-grey.png b/app/assets/images/icons/bug-grey.png
deleted file mode 100644
index a6f8396..0000000
Binary files a/app/assets/images/icons/bug-grey.png and /dev/null differ
diff --git a/app/assets/images/icons/bug.png b/app/assets/images/icons/bug.png
deleted file mode 100755
index 242d539..0000000
Binary files a/app/assets/images/icons/bug.png and /dev/null differ
diff --git a/app/assets/images/icons/bug_add.png b/app/assets/images/icons/bug_add.png
deleted file mode 100755
index fe12b19..0000000
Binary files a/app/assets/images/icons/bug_add.png and /dev/null differ
diff --git a/app/assets/images/icons/bug_new.png b/app/assets/images/icons/bug_new.png
deleted file mode 100755
index 9076cc5..0000000
Binary files a/app/assets/images/icons/bug_new.png and /dev/null differ
diff --git a/app/assets/images/icons/calendar-select-month.png b/app/assets/images/icons/calendar-select-month.png
deleted file mode 100644
index 4f5ed55..0000000
Binary files a/app/assets/images/icons/calendar-select-month.png and /dev/null differ
diff --git a/app/assets/images/icons/checkboxes.png b/app/assets/images/icons/checkboxes.png
deleted file mode 100755
index 05eed23..0000000
Binary files a/app/assets/images/icons/checkboxes.png and /dev/null differ
diff --git a/app/assets/images/icons/close.png b/app/assets/images/icons/close.png
deleted file mode 100644
index 237ae2a..0000000
Binary files a/app/assets/images/icons/close.png and /dev/null differ
diff --git a/app/assets/images/icons/comment.png b/app/assets/images/icons/comment.png
deleted file mode 100644
index 7bc9233..0000000
Binary files a/app/assets/images/icons/comment.png and /dev/null differ
diff --git a/app/assets/images/icons/commented.png b/app/assets/images/icons/commented.png
deleted file mode 100755
index 9926e5d..0000000
Binary files a/app/assets/images/icons/commented.png and /dev/null differ
diff --git a/app/assets/images/icons/confidential.png b/app/assets/images/icons/confidential.png
deleted file mode 100755
index ec71aec..0000000
Binary files a/app/assets/images/icons/confidential.png and /dev/null differ
diff --git a/app/assets/images/icons/delete.png b/app/assets/images/icons/delete.png
deleted file mode 100755
index 70b59dc..0000000
Binary files a/app/assets/images/icons/delete.png and /dev/null differ
diff --git a/app/assets/images/icons/diff.png b/app/assets/images/icons/diff.png
deleted file mode 100644
index d4d1b56..0000000
Binary files a/app/assets/images/icons/diff.png and /dev/null differ
diff --git a/app/assets/images/icons/dock-right.png b/app/assets/images/icons/dock-right.png
deleted file mode 100644
index 0e51904..0000000
Binary files a/app/assets/images/icons/dock-right.png and /dev/null differ
diff --git a/app/assets/images/icons/document-go.png b/app/assets/images/icons/document-go.png
deleted file mode 100755
index f3e265d..0000000
Binary files a/app/assets/images/icons/document-go.png and /dev/null differ
diff --git a/app/assets/images/icons/document.png b/app/assets/images/icons/document.png
deleted file mode 100755
index 75f92b0..0000000
Binary files a/app/assets/images/icons/document.png and /dev/null differ
diff --git a/app/assets/images/icons/draft.png b/app/assets/images/icons/draft.png
deleted file mode 100755
index 0e2b42d..0000000
Binary files a/app/assets/images/icons/draft.png and /dev/null differ
diff --git a/app/assets/images/icons/edit-small.png b/app/assets/images/icons/edit-small.png
deleted file mode 100755
index 3d81c2f..0000000
Binary files a/app/assets/images/icons/edit-small.png and /dev/null differ
diff --git a/app/assets/images/icons/edit.png b/app/assets/images/icons/edit.png
deleted file mode 100644
index 0bfecd5..0000000
Binary files a/app/assets/images/icons/edit.png and /dev/null differ
diff --git a/app/assets/images/icons/error.png b/app/assets/images/icons/error.png
deleted file mode 100644
index 0496522..0000000
Binary files a/app/assets/images/icons/error.png and /dev/null differ
diff --git a/app/assets/images/icons/flag-green.png b/app/assets/images/icons/flag-green.png
deleted file mode 100644
index 6747730..0000000
Binary files a/app/assets/images/icons/flag-green.png and /dev/null differ
diff --git a/app/assets/images/icons/flag.png b/app/assets/images/icons/flag.png
deleted file mode 100644
index 5c008b0..0000000
Binary files a/app/assets/images/icons/flag.png and /dev/null differ
diff --git a/app/assets/images/icons/glsa.png b/app/assets/images/icons/glsa.png
deleted file mode 100644
index 779ad58..0000000
Binary files a/app/assets/images/icons/glsa.png and /dev/null differ
diff --git a/app/assets/images/icons/glsa_draft.png b/app/assets/images/icons/glsa_draft.png
deleted file mode 100644
index c61a6d8..0000000
Binary files a/app/assets/images/icons/glsa_draft.png and /dev/null differ
diff --git a/app/assets/images/icons/glsa_new.png b/app/assets/images/icons/glsa_new.png
deleted file mode 100644
index d5eac9b..0000000
Binary files a/app/assets/images/icons/glsa_new.png and /dev/null differ
diff --git a/app/assets/images/icons/glsa_ready.png b/app/assets/images/icons/glsa_ready.png
deleted file mode 100755
index c17bb7d..0000000
Binary files a/app/assets/images/icons/glsa_ready.png and /dev/null differ
diff --git a/app/assets/images/icons/glsa_request.png b/app/assets/images/icons/glsa_request.png
deleted file mode 100644
index f35a979..0000000
Binary files a/app/assets/images/icons/glsa_request.png and /dev/null differ
diff --git a/app/assets/images/icons/glsa_sent.png b/app/assets/images/icons/glsa_sent.png
deleted file mode 100644
index 1c856cd..0000000
Binary files a/app/assets/images/icons/glsa_sent.png and /dev/null differ
diff --git a/app/assets/images/icons/impact.png b/app/assets/images/icons/impact.png
deleted file mode 100644
index fa96cdd..0000000
Binary files a/app/assets/images/icons/impact.png and /dev/null differ
diff --git a/app/assets/images/icons/info.png b/app/assets/images/icons/info.png
deleted file mode 100644
index bd9fd94..0000000
Binary files a/app/assets/images/icons/info.png and /dev/null differ
diff --git a/app/assets/images/icons/keyword.png b/app/assets/images/icons/keyword.png
deleted file mode 100755
index ab11ce2..0000000
Binary files a/app/assets/images/icons/keyword.png and /dev/null differ
diff --git a/app/assets/images/icons/larr.png b/app/assets/images/icons/larr.png
deleted file mode 100644
index cdf1fb0..0000000
Binary files a/app/assets/images/icons/larr.png and /dev/null differ
diff --git a/app/assets/images/icons/less_width.png b/app/assets/images/icons/less_width.png
deleted file mode 100755
index 868cd87..0000000
Binary files a/app/assets/images/icons/less_width.png and /dev/null differ
diff --git a/app/assets/images/icons/logout.png b/app/assets/images/icons/logout.png
deleted file mode 100644
index 2541d2b..0000000
Binary files a/app/assets/images/icons/logout.png and /dev/null differ
diff --git a/app/assets/images/icons/metadata.png b/app/assets/images/icons/metadata.png
deleted file mode 100755
index 83f17cc..0000000
Binary files a/app/assets/images/icons/metadata.png and /dev/null differ
diff --git a/app/assets/images/icons/minus-small.png b/app/assets/images/icons/minus-small.png
deleted file mode 100644
index 46c4c0d..0000000
Binary files a/app/assets/images/icons/minus-small.png and /dev/null differ
diff --git a/app/assets/images/icons/minus.png b/app/assets/images/icons/minus.png
deleted file mode 100644
index f953427..0000000
Binary files a/app/assets/images/icons/minus.png and /dev/null differ
diff --git a/app/assets/images/icons/more_width.png b/app/assets/images/icons/more_width.png
deleted file mode 100755
index 2af50ef..0000000
Binary files a/app/assets/images/icons/more_width.png and /dev/null differ
diff --git a/app/assets/images/icons/next.png b/app/assets/images/icons/next.png
deleted file mode 100644
index 5102071..0000000
Binary files a/app/assets/images/icons/next.png and /dev/null differ
diff --git a/app/assets/images/icons/not-approved.png b/app/assets/images/icons/not-approved.png
deleted file mode 100755
index 20d6f5e..0000000
Binary files a/app/assets/images/icons/not-approved.png and /dev/null differ
diff --git a/app/assets/images/icons/note.png b/app/assets/images/icons/note.png
deleted file mode 100755
index adaf4f0..0000000
Binary files a/app/assets/images/icons/note.png and /dev/null differ
diff --git a/app/assets/images/icons/ok.png b/app/assets/images/icons/ok.png
deleted file mode 100644
index dff03da..0000000
Binary files a/app/assets/images/icons/ok.png and /dev/null differ
diff --git a/app/assets/images/icons/package-add.png b/app/assets/images/icons/package-add.png
deleted file mode 100755
index 9cea3b8..0000000
Binary files a/app/assets/images/icons/package-add.png and /dev/null differ
diff --git a/app/assets/images/icons/package-go.png b/app/assets/images/icons/package-go.png
deleted file mode 100755
index 4b8d163..0000000
Binary files a/app/assets/images/icons/package-go.png and /dev/null differ
diff --git a/app/assets/images/icons/package-remove.png b/app/assets/images/icons/package-remove.png
deleted file mode 100755
index 16c299f..0000000
Binary files a/app/assets/images/icons/package-remove.png and /dev/null differ
diff --git a/app/assets/images/icons/package.png b/app/assets/images/icons/package.png
deleted file mode 100755
index 78578c0..0000000
Binary files a/app/assets/images/icons/package.png and /dev/null differ
diff --git a/app/assets/images/icons/paste.png b/app/assets/images/icons/paste.png
deleted file mode 100644
index c0490eb..0000000
Binary files a/app/assets/images/icons/paste.png and /dev/null differ
diff --git a/app/assets/images/icons/pending.png b/app/assets/images/icons/pending.png
deleted file mode 100644
index c28a746..0000000
Binary files a/app/assets/images/icons/pending.png and /dev/null differ
diff --git a/app/assets/images/icons/permission.png b/app/assets/images/icons/permission.png
deleted file mode 100644
index 4ec1a92..0000000
Binary files a/app/assets/images/icons/permission.png and /dev/null differ
diff --git a/app/assets/images/icons/plus-small.png b/app/assets/images/icons/plus-small.png
deleted file mode 100644
index 33cf9af..0000000
Binary files a/app/assets/images/icons/plus-small.png and /dev/null differ
diff --git a/app/assets/images/icons/plus.png b/app/assets/images/icons/plus.png
deleted file mode 100644
index 3f2e8f7..0000000
Binary files a/app/assets/images/icons/plus.png and /dev/null differ
diff --git a/app/assets/images/icons/profile.png b/app/assets/images/icons/profile.png
deleted file mode 100644
index c02f315..0000000
Binary files a/app/assets/images/icons/profile.png and /dev/null differ
diff --git a/app/assets/images/icons/public.png b/app/assets/images/icons/public.png
deleted file mode 100755
index 1fff57c..0000000
Binary files a/app/assets/images/icons/public.png and /dev/null differ
diff --git a/app/assets/images/icons/reference-add.png b/app/assets/images/icons/reference-add.png
deleted file mode 100755
index 689c34c..0000000
Binary files a/app/assets/images/icons/reference-add.png and /dev/null differ
diff --git a/app/assets/images/icons/reference-remove.png b/app/assets/images/icons/reference-remove.png
deleted file mode 100755
index 8565b4d..0000000
Binary files a/app/assets/images/icons/reference-remove.png and /dev/null differ
diff --git a/app/assets/images/icons/reference.png b/app/assets/images/icons/reference.png
deleted file mode 100755
index 449037c..0000000
Binary files a/app/assets/images/icons/reference.png and /dev/null differ
diff --git a/app/assets/images/icons/refresh.png b/app/assets/images/icons/refresh.png
deleted file mode 100755
index 6d68b75..0000000
Binary files a/app/assets/images/icons/refresh.png and /dev/null differ
diff --git a/app/assets/images/icons/rejection.png b/app/assets/images/icons/rejection.png
deleted file mode 100644
index 558b7d0..0000000
Binary files a/app/assets/images/icons/rejection.png and /dev/null differ
diff --git a/app/assets/images/icons/request.png b/app/assets/images/icons/request.png
deleted file mode 100755
index 1e55e3f..0000000
Binary files a/app/assets/images/icons/request.png and /dev/null differ
diff --git a/app/assets/images/icons/resolution-go.png b/app/assets/images/icons/resolution-go.png
deleted file mode 100755
index bfbe022..0000000
Binary files a/app/assets/images/icons/resolution-go.png and /dev/null differ
diff --git a/app/assets/images/icons/resolution.png b/app/assets/images/icons/resolution.png
deleted file mode 100755
index f2af438..0000000
Binary files a/app/assets/images/icons/resolution.png and /dev/null differ
diff --git a/app/assets/images/icons/restricted.png b/app/assets/images/icons/restricted.png
deleted file mode 100644
index 282c64a..0000000
Binary files a/app/assets/images/icons/restricted.png and /dev/null differ
diff --git a/app/assets/images/icons/sent.png b/app/assets/images/icons/sent.png
deleted file mode 100755
index 95b0da4..0000000
Binary files a/app/assets/images/icons/sent.png and /dev/null differ
diff --git a/app/assets/images/icons/severity.png b/app/assets/images/icons/severity.png
deleted file mode 100644
index f250029..0000000
Binary files a/app/assets/images/icons/severity.png and /dev/null differ
diff --git a/app/assets/images/icons/stamp.png b/app/assets/images/icons/stamp.png
deleted file mode 100755
index 9d556de..0000000
Binary files a/app/assets/images/icons/stamp.png and /dev/null differ
diff --git a/app/assets/images/icons/status-green.png b/app/assets/images/icons/status-green.png
deleted file mode 100755
index 680bb8a..0000000
Binary files a/app/assets/images/icons/status-green.png and /dev/null differ
diff --git a/app/assets/images/icons/status-grey.png b/app/assets/images/icons/status-grey.png
deleted file mode 100755
index f148af4..0000000
Binary files a/app/assets/images/icons/status-grey.png and /dev/null differ
diff --git a/app/assets/images/icons/status-red.png b/app/assets/images/icons/status-red.png
deleted file mode 100755
index a9d5f4d..0000000
Binary files a/app/assets/images/icons/status-red.png and /dev/null differ
diff --git a/app/assets/images/icons/status-yellow.png b/app/assets/images/icons/status-yellow.png
deleted file mode 100755
index c7be0ab..0000000
Binary files a/app/assets/images/icons/status-yellow.png and /dev/null differ
diff --git a/app/assets/images/icons/switch.png b/app/assets/images/icons/switch.png
deleted file mode 100755
index 04bb1e0..0000000
Binary files a/app/assets/images/icons/switch.png and /dev/null differ
diff --git a/app/assets/images/icons/synopsis.png b/app/assets/images/icons/synopsis.png
deleted file mode 100755
index 363394b..0000000
Binary files a/app/assets/images/icons/synopsis.png and /dev/null differ
diff --git a/app/assets/images/icons/template.png b/app/assets/images/icons/template.png
deleted file mode 100644
index ed7ec0e..0000000
Binary files a/app/assets/images/icons/template.png and /dev/null differ
diff --git a/app/assets/images/icons/time.png b/app/assets/images/icons/time.png
deleted file mode 100755
index e4535fa..0000000
Binary files a/app/assets/images/icons/time.png and /dev/null differ
diff --git a/app/assets/images/icons/title.png b/app/assets/images/icons/title.png
deleted file mode 100755
index d0d2843..0000000
Binary files a/app/assets/images/icons/title.png and /dev/null differ
diff --git a/app/assets/images/icons/toolbox.png b/app/assets/images/icons/toolbox.png
deleted file mode 100755
index b581d77..0000000
Binary files a/app/assets/images/icons/toolbox.png and /dev/null differ
diff --git a/app/assets/images/icons/txt.png b/app/assets/images/icons/txt.png
deleted file mode 100755
index ed841a0..0000000
Binary files a/app/assets/images/icons/txt.png and /dev/null differ
diff --git a/app/assets/images/icons/unaffected.png b/app/assets/images/icons/unaffected.png
deleted file mode 100755
index 8889996..0000000
Binary files a/app/assets/images/icons/unaffected.png and /dev/null differ
diff --git a/app/assets/images/icons/user.png b/app/assets/images/icons/user.png
deleted file mode 100755
index f6e4dc8..0000000
Binary files a/app/assets/images/icons/user.png and /dev/null differ
diff --git a/app/assets/images/icons/user_add.png b/app/assets/images/icons/user_add.png
deleted file mode 100644
index deae99b..0000000
Binary files a/app/assets/images/icons/user_add.png and /dev/null differ
diff --git a/app/assets/images/icons/warning.png b/app/assets/images/icons/warning.png
deleted file mode 100644
index 628cf2d..0000000
Binary files a/app/assets/images/icons/warning.png and /dev/null differ
diff --git a/app/assets/images/icons/workaround-no.png b/app/assets/images/icons/workaround-no.png
deleted file mode 100755
index c08fc6e..0000000
Binary files a/app/assets/images/icons/workaround-no.png and /dev/null differ
diff --git a/app/assets/images/icons/workaround.png b/app/assets/images/icons/workaround.png
deleted file mode 100755
index dafa648..0000000
Binary files a/app/assets/images/icons/workaround.png and /dev/null differ
diff --git a/app/assets/images/icons/xml.png b/app/assets/images/icons/xml.png
deleted file mode 100644
index b5769e6..0000000
Binary files a/app/assets/images/icons/xml.png and /dev/null differ
diff --git a/app/assets/images/icons/zoom_100.png b/app/assets/images/icons/zoom_100.png
deleted file mode 100755
index a445ea6..0000000
Binary files a/app/assets/images/icons/zoom_100.png and /dev/null differ
diff --git a/app/assets/images/icons/zoom_in.png b/app/assets/images/icons/zoom_in.png
deleted file mode 100755
index a46dcc8..0000000
Binary files a/app/assets/images/icons/zoom_in.png and /dev/null differ
diff --git a/app/assets/images/icons/zoom_out.png b/app/assets/images/icons/zoom_out.png
deleted file mode 100755
index 49bb8f2..0000000
Binary files a/app/assets/images/icons/zoom_out.png and /dev/null differ
diff --git a/app/assets/images/intel-editor.png b/app/assets/images/intel-editor.png
deleted file mode 100644
index 7db46a6..0000000
Binary files a/app/assets/images/intel-editor.png and /dev/null differ
diff --git a/app/assets/images/line.png b/app/assets/images/line.png
deleted file mode 100644
index 1a8469c..0000000
Binary files a/app/assets/images/line.png and /dev/null differ
diff --git a/app/assets/images/login-bg.png b/app/assets/images/login-bg.png
deleted file mode 100644
index d2876a9..0000000
Binary files a/app/assets/images/login-bg.png and /dev/null differ
diff --git a/app/assets/images/logo.png b/app/assets/images/logo.png
deleted file mode 100644
index 9bc7bd5..0000000
Binary files a/app/assets/images/logo.png and /dev/null differ
diff --git a/app/assets/images/menu-left.png b/app/assets/images/menu-left.png
deleted file mode 100644
index d741c7e..0000000
Binary files a/app/assets/images/menu-left.png and /dev/null differ
diff --git a/app/assets/images/menu-right.png b/app/assets/images/menu-right.png
deleted file mode 100644
index cf42427..0000000
Binary files a/app/assets/images/menu-right.png and /dev/null differ
diff --git a/app/assets/images/menubg.png b/app/assets/images/menubg.png
deleted file mode 100644
index 19aba57..0000000
Binary files a/app/assets/images/menubg.png and /dev/null differ
diff --git a/app/assets/images/rails.png b/app/assets/images/rails.png
deleted file mode 100644
index d5edc04..0000000
Binary files a/app/assets/images/rails.png and /dev/null differ
diff --git a/app/assets/images/separator.png b/app/assets/images/separator.png
deleted file mode 100644
index 5a009e5..0000000
Binary files a/app/assets/images/separator.png and /dev/null differ
diff --git a/app/assets/images/spinner.gif b/app/assets/images/spinner.gif
deleted file mode 100644
index 39615c8..0000000
Binary files a/app/assets/images/spinner.gif and /dev/null differ
diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js
deleted file mode 100644
index d6f4b40..0000000
--- a/app/assets/javascripts/application.js
+++ /dev/null
@@ -1,14 +0,0 @@
-// This is a manifest file that'll be compiled into including all the files listed below.
-// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
-// be included in the compiled file accessible from http://example.com/assets/application.js
-// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
-// the compiled file.
-//
-//= require prototype
-//= require prototype_ujs
-//= require effects
-//= require glsamaker
-//= require glsamaker_misc
-//= require glsamaker_edit
-//= require modalbox
-//= require_self
\ No newline at end of file
diff --git a/app/assets/javascripts/glsamaker.js.erb b/app/assets/javascripts/glsamaker.js.erb
deleted file mode 100644
index 92bc6ab..0000000
--- a/app/assets/javascripts/glsamaker.js.erb
+++ /dev/null
@@ -1,151 +0,0 @@
-/**
- Sets the count of lines if more than 5 or less than 50.
-*/
-function lines(id, amount) {
-// if ($(id).rows > 0 && $(id).rows <= 50) {
- $(id).rows += amount;
-// }
-}
-
-/**
- Toggles extra-wide input fields
-**/
-function toggleWide(id) {
- if ($(id).style.width == "140%") {
- $(id).style.width = "";
- $(id + "-widebtn").childNodes[1].src = "/images/icons/more_width.png";
- $(id + "-widebtn").title = "More columns";
- } else {
- $(id).style.width = "140%";
- $(id + "-widebtn").childNodes[1].src = "/images/icons/less_width.png";
- $(id + "-widebtn").title = "Fewer columns";
- }
-}
-
-function addBugDialog(glsaid) {
- alert('deprecated. use GLSAMaker.editing.bugs.add_dialog() instead.');
-}
-
-function addCommentDialog(glsaid) {
- Modalbox.show("/glsas/"+glsaid+"/comments/new", {title: "Add comment", width: 600});
-}
-
-function backgroundDialog() {
- Modalbox.show("/tools/background/?id=dev-lang/ruby", {title: "Get background", width: 600});
-}
-
-
-function getClientWidth() {
- return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientWidth:document.body.clientWidth;
-}
-
-function buginfo(bugid) {
- Modalbox.show("/bug/" + bugid, {title: "Bug " + bugid, width: 800});
-}
-
-function generateResolution() {
- $('resolution').value = "";
- var resolution = "";
- var unaffected_atoms = new Array();
- var name, atom, comp, version;
-
- // First find and list all upgrade paths...
- for (i = 0; i < $('packages_table_unaffected').select('.entry').length; i++) {
- if ($('packages_table_unaffected').down(".entry", i).select('input[type=hidden][value=ignore]').length > 0)
- continue;
-
- atom = $('packages_table_unaffected').down(".entry", i).down("#glsa_package__atom").value;
- name = atom.split("/")[1];
- if (name == undefined)
- name = "UNDEFINED";
- comp = $('packages_table_unaffected').down(".entry", i).down("#glsa_package__comp").value.replace('*', '');
- version = $('packages_table_unaffected').down(".entry", i).down("#glsa_package__version").value;
-
- resolution += "All " + name + " users should upgrade to the latest version:\n\n\
-\n\
-# emerge --sync\n\
-# emerge --ask --oneshot --verbose \"" + comp + atom + "-" + version + "\"\n\n";
-
- unaffected_atoms.push(atom);
- }
-
- // Check if there are any packages that only have vulnerable entries.
- // These need to be unmerged.
- for (i = 0; i < $('packages_table_vulnerable').select('.entry').length; i++) {
- if ($('packages_table_vulnerable').down(".entry", i).select('input[type=hidden][value=ignore]').length > 0)
- continue;
-
- atom = $('packages_table_vulnerable').down(".entry", i).down("#glsa_package__atom").value;
- if (unaffected_atoms.indexOf(atom) == -1) {
- name = atom.split("/")[1];
- if (name == undefined)
- name = "UNDEFINED";
-
- resolution += "We recommend that users unmerge " + name + ":\n\n\
-\n\
-# emerge --unmerge \"" + atom + "\"";
- }
- }
-
- $('resolution').value = resolution;
-}
-
-function generateDescription() {
- // This code is pretty ugly. You have been warned.
- // cnt is the number of 'entry's
- // act_cnt is cnt minus the number of to be ignored 'entry's
- // i is used to walk down into the i'th entry element
- // act_i is used to keep track of how many packages have been / will be added
-
- var name = "";
- var cnt = $('packages_table_vulnerable').select('.entry').length;
- var act_cnt = cnt - $('packages_table_vulnerable').select('.entry input[type=hidden][value=ignore]').length;
-
- var act_i = 0;
- for (var i = 0; i < cnt; i++) {
- if ($('packages_table_vulnerable').down(".entry", i).select('input[type=hidden][value=ignore]').length > 0)
- continue;
-
- var atom = $('packages_table_vulnerable').down(".entry", i).down("#glsa_package__atom").value;
-
- if (act_cnt > 1 && act_i == act_cnt - 1) {
- name += ", and ";
- } else if (act_cnt > 1 && act_i != 0) {
- name += ", ";
- }
- act_i++;
- name += atom.split("/")[1];
- }
-
- if (name == "undefined")
- name = "UNDEFINED";
-
- $('description').value = "Multiple vulnerabilities have been discovered in " + name + ". Please review the CVE identifiers referenced below for details.";
-}
-
-function toggleCommentRead(comment) {
- if ($('commentread-' + comment).value == "true") {
- $('commentread-' + comment).value = "false";
- $('commentflag-' + comment).update('');
- }
- else {
- $('commentread-' + comment).value = "true";
- $('commentflag-' + comment).update('');
- }
-}
-
-function cveinfo(cveid) {
- Modalbox.show("/cve/info/" + cveid, {title: cveid, width: 800});
-}
-
-function cvepopup(cveid) {
- window.open("/cve/info/" + escapeHTML(cveid), "cvepopup-" + cveid, "width=500, height=600,status=no,menubar=no,toolbar=no,resizable=no");
-}
-
-function escapeHTML(str) {
- return str.replace(/(<([^>]+)>)/ig,"");
-}
-
-//document.observe('dom:loaded', function() {
-
-//});
diff --git a/app/assets/javascripts/glsamaker_edit.js b/app/assets/javascripts/glsamaker_edit.js
deleted file mode 100644
index cc77621..0000000
--- a/app/assets/javascripts/glsamaker_edit.js
+++ /dev/null
@@ -1,181 +0,0 @@
-/**
- * GLSAMaker 2
- * Draft editing JS
- */
-
-if (typeof GLSAMaker == "undefined" || !GLSAMaker) {
- var GLSAMaker = {};
-}
-
-if (typeof GLSAMaker.editing == "undefined" || !GLSAMaker.editing) {
- GLSAMaker.editing = function() {
- return {};
- }();
-}
-
-GLSAMaker.editing.bugs = function() {
- return {
- /**
- * Removes a bug from a draft being edited
- */
- del : function(bug_id) {
- // no such bug, or already removed
- if (!$('bug-' + bug_id)) {
- return;
- }
-
- Effect.Fade('bug-' + bug_id, {
- duration: .75,
- afterFinish: function(e) {
- $('bug-' + bug_id).remove();
- }
- });
- },
- /**
- * Opens a dialog to add bugs
- */
- add_dialog : function(glsa_id) {
- Modalbox.show("/glsas/" + glsa_id + "/bugs/new", {title: "Add bugs", width: 600});
- }
- };
-}();
-
-GLSAMaker.editing.references = function() {
- return {
- /**
- * Removes a reference from a draft being edited
- */
- del : function(ref) {
- // no such reference, or already removed
- if (!ref) {
- return;
- }
-
- var td = ref.up(".entry")
-
- Effect.Fade(td, {
- duration: .75,
- afterFinish: function(e) {
- td.remove();
- }
- });
- },
- /**
- * Opens a dialog to import references from external data
- */
- import_dialog : function(glsa_id) {
- Modalbox.show("/glsa/import_references/" + glsa_id, {title: "Import references", width: 800});
- }
- };
-}();
-
-GLSAMaker.editing.packages = function() {
- return {
- /**
- * Removes a reference from a draft being edited
- */
- del : function(ref) {
- // no such reference, or already removed
- if (!ref) {
- return;
- }
-
- var td = ref.up(".entry");
-
- Effect.Fade(td, {
- duration: .75,
- afterFinish: function(e) {
- td.remove();
- }
- });
- }
- };
-}();
-
-GLSAMaker.editing.templates = function() {
- return {
- /**
- * Displays a drop down menu to select a template to append
- */
- dropdown : function(button, target) {
- var div = $('templates-' + target);
-
- if (!div) {
- return;
- }
-
- // Close the popup if it's already open
- if (div.getStyle('display') != 'none') {
- GLSAMaker.editing.templates.close(div);
- return;
- }
-
- var btn_layout = button.getLayout();
-
- div.setStyle({
- position: 'absolute',
- right: btn_layout.get('right') + "px",
- top: btn_layout.get('top') + btn_layout.get('height') + 5 + "px"
- });
-
- Effect.SlideDown(div, {
- duration: .15
- });
- },
- /**
- * Closes a popup
- *
- * @param target The popup to close
- */
- close : function(target) {
- Effect.SlideUp(target, {
- duration: .2
- });
- },
- /**
- * Observes a field for clicks into template fields and sets the
- * @param elem
- */
- observeClick : function(elem) {
- elem.observe('click', function(event) {
- var before = '[';
- var after = ']';
-
- var selection_info = GLSAMaker.misc.getInputSelection(this);
- var text = this.getValue();
-
- // If the user clicked and did not select
- if (selection_info.start == selection_info.end) {
- var text_before = text.substring(0, selection_info.start);
- var text_after = text.substring(selection_info.end, text.length - 1);
-
- // check if there is any template before this
- var pos_prev = text_before.search(GLSAMaker.misc.escapeRegExp(after));
- var pos_comp = 0;
-
- while (pos_prev > 0) {
- pos_comp += pos_prev;
- text_before = text_before.slice(pos_prev);
- pos_prev = text_before.search(GLSAMaker.misc.escapeRegExp(after));
- }
-
- var pos_before = text_before.search(GLSAMaker.misc.escapeRegExp(before));
- if (pos_before == -1) {
- return;
- }
-
- // pos_before is our selection start.
- var pos_after = text_after.search(GLSAMaker.misc.escapeRegExp(after));
- if (pos_after == -1) {
- return;
- }
-
- pos_before += pos_comp;
- pos_after += selection_info.end + 1;
-
- GLSAMaker.misc.setInputSelection(this, {start: pos_before, end: pos_after});
- }
- })
- }
- };
-}();
\ No newline at end of file
diff --git a/app/assets/javascripts/glsamaker_misc.js b/app/assets/javascripts/glsamaker_misc.js
deleted file mode 100644
index fb04be3..0000000
--- a/app/assets/javascripts/glsamaker_misc.js
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- * GLSAMaker 2
- * Draft editing JS
- */
-
-if (typeof GLSAMaker == "undefined" || !GLSAMaker) {
- var GLSAMaker = {};
-}
-
-if (typeof GLSAMaker.misc == "undefined" || !GLSAMaker.misc) {
- GLSAMaker.misc = function() {
- return {
- /**
- * Find out the selection position in a text field
- * via: http://stackoverflow.com/questions/4928586/get-caret-position-in-html-input
- *
- * @param el
- */
- getInputSelection : function(el) {
- var start = 0, end = 0, normalizedValue, range,
- textInputRange, len, endRange;
-
- if (typeof el.selectionStart == "number" && typeof el.selectionEnd == "number") {
- start = el.selectionStart;
- end = el.selectionEnd;
- } else {
- range = document.selection.createRange();
-
- if (range && range.parentElement() == el) {
- len = el.value.length;
- normalizedValue = el.value.replace(/\r\n/g, "\n");
-
- // Create a working TextRange that lives only in the input
- textInputRange = el.createTextRange();
- textInputRange.moveToBookmark(range.getBookmark());
-
- // Check if the start and end of the selection are at the very end
- // of the input, since moveStart/moveEnd doesn't return what we want
- // in those cases
- endRange = el.createTextRange();
- endRange.collapse(false);
-
- if (textInputRange.compareEndPoints("StartToEnd", endRange) > -1) {
- start = end = len;
- } else {
- start = -textInputRange.moveStart("character", -len);
- start += normalizedValue.slice(0, start).split("\n").length - 1;
-
- if (textInputRange.compareEndPoints("EndToEnd", endRange) > -1) {
- end = len;
- } else {
- end = -textInputRange.moveEnd("character", -len);
- end += normalizedValue.slice(0, end).split("\n").length - 1;
- }
- }
- }
- }
-
- return {
- start: start,
- end: end
- };
- },
- /**
- * Sets the caret position of a control
- * @param ctrl
- * @param pos
- */
- setInputSelection: function (ctrl, data) {
- if (ctrl.setSelectionRange) {
- ctrl.focus();
- ctrl.setSelectionRange(data.start, data.end);
- }
- else if (ctrl.createTextRange) {
- var range = ctrl.createTextRange();
- range.collapse(true);
- range.moveEnd('character', data.end);
- range.moveStart('character', data.start);
- range.select();
- }
- },
- escapeRegExp : function(text) {
- return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
- }
- };
- }();
-}
-
-GLSAMaker.misc.ui = function() {
- return {
- /**
- * Docks an element to the right
- */
- dock : function(elem) {
- if (!elem) {
- return;
- }
-
- elem.toggleClassName('docked-right');
- }
- };
-}();
diff --git a/app/assets/javascripts/jsui.js b/app/assets/javascripts/jsui.js
deleted file mode 100644
index 039f727..0000000
--- a/app/assets/javascripts/jsui.js
+++ /dev/null
@@ -1,8 +0,0 @@
-//= require prototype
-//= require prototype_ujs
-//= require effects
-//= require uki
-//= require uki-more
-//= require searchable
-//= require glsamaker
-//= require glsamaker_misc
\ No newline at end of file
diff --git a/app/assets/javascripts/modalbox.js b/app/assets/javascripts/modalbox.js
deleted file mode 100644
index 611c226..0000000
--- a/app/assets/javascripts/modalbox.js
+++ /dev/null
@@ -1,593 +0,0 @@
-//
-// ModalBox - The pop-up window thingie with AJAX, based on Prototype JS framework.
-//
-// Created by Andrew Okonetchnikov
-// Copyright 2006-2010 okonet.ru. All rights reserved.
-//
-// Licensed under MIT license.
-//
-
-if (Object.isUndefined(Prototype.Browser.IE6)) {
- Prototype.Browser.IE6 = (navigator.appName.indexOf("Microsoft Internet Explorer") != -1 && navigator.appVersion.indexOf("MSIE 6.0") != -1 && !window.XMLHttpRequest);
-}
-
-if (!window.Modalbox)
- var Modalbox = {};
-
-Modalbox.Methods = {
- overrideAlert: false, // Override standard browser alert message with ModalBox
- focusableElements: [],
- currFocused: 0,
- initialized: false, // Modalbox is visible
- active: true, // Modalbox is visible and active
- options: {
- title: "ModalBox Window", // Title of the ModalBox window
- overlayClose: true, // Close modal box by clicking on overlay
- width: 500, // Default width in px
- height: 90, // Default height in px
- overlayOpacity: 0.65, // Default overlay opacity
- overlayDuration: 0.25, // Default overlay fade in/out duration in seconds
- slideDownDuration: 0.5, // Default Modalbox appear slide down effect in seconds
- slideUpDuration: 0.5, // Default Modalbox hiding slide up effect in seconds
- resizeDuration: 0.25, // Default resize duration seconds
- inactiveFade: true, // Fades MB window on inactive state
- transitions: true, // Toggles transition effects. Transitions are enabled by default
- loadingString: "Please wait. Loading...", // Default loading string message
- closeString: "Close window", // Default title attribute for close window link
- closeValue: "×", // Default string for close link in the header
- params: {},
- method: 'get', // Default Ajax request method
- autoFocusing: true, // Toggles auto-focusing for form elements. Disable for long text pages.
- aspnet: false, // Should be true when using with ASP.NET controls. When true Modalbox window will be injected into the first form element.
- resizeCSSID: ''
- },
- _options: {},
-
- setOptions: function(options) {
- Object.extend(this.options, options || {});
- },
-
- _init: function(options) {
- // Setting up original options with default options
- Object.extend(this._options, this.options);
- this.setOptions(options);
-
- // Creating the overlay
- this.MBoverlay = new Element("div", {id: "MB_overlay", style: "opacity: 0"});
-
- // Creating the modal window
- this.MBwindowwrapper = new Element("div", {id: "MB_windowwrapper"}).update(
- this.MBwindow = new Element("div", {id: "MB_window", style: "display: none"}).update(
- this.MBframe = new Element("div", {id: "MB_frame"}).update(
- this.MBheader = new Element("div", {id: "MB_header"}).update(
- this.MBcaption = new Element("div", {id: "MB_caption"})
- )
- )
- )
- );
-
- this.MBclose = new Element("a", {id: "MB_close", title: this.options.closeString, href: "#"}).update("" + this.options.closeValue + "");
- this.MBheader.insert({'bottom':this.MBclose});
-
- this.MBcontent = new Element("div", {id: "MB_content"}).update(
- this.MBloading = new Element("div", {id: "MB_loading"}).update(this.options.loadingString)
- );
- this.MBframe.insert({'bottom':this.MBcontent});
-
- // Inserting into DOM. If parameter set and form element have been found will inject into it. Otherwise will inject into body as topmost element.
- // Be sure to set padding and marging to null via CSS for both body and (in case of asp.net) form elements.
- var injectToEl = this.options.aspnet ? $(document.body).down('form') : $(document.body);
- injectToEl.insert({'top':this.MBwindowwrapper});
- injectToEl.insert({'top':this.MBoverlay});
-
- var scrollOffsets = document.viewport.getScrollOffsets();
- if (scrollOffsets[1] > 0) {
- $('MB_window').setStyle({top:scrollOffsets[1] + 'px'});
- }
-
- Event.observe(window, 'scroll', function() {
- scrollOffsets = document.viewport.getScrollOffsets();
- $('MB_window').setStyle({top:scrollOffsets[1] + 'px'});
- });
-
- // Initial scrolling position of the window. To be used for remove scrolling effect during ModalBox appearing
- this.initScrollX = window.pageXOffset || document.body.scrollLeft || document.documentElement.scrollLeft;
- this.initScrollY = window.pageYOffset || document.body.scrollTop || document.documentElement.scrollTop;
-
- //Adding event observers
- this.hideObserver = this._hide.bindAsEventListener(this);
- this.kbdObserver = this._kbdHandler.bindAsEventListener(this);
- this.resizeObserver = this._setWidthAndPosition.bindAsEventListener(this);
- this._initObservers();
-
- this.initialized = true; // Mark as initialized
- },
-
- show: function(content, options) {
- if (!this.initialized) this._init(options); // Check if MB is already initialized
-
- this._cleanUpContentIDs();
-
- this.content = content;
- this.setOptions(options);
-
- if (this.options.title) { // Updating title of the MB
- this.MBcaption.update(this.options.title);
- } else { // If title isn't given, the header will not displayed
- this.MBheader.hide();
- this.MBcaption.hide();
- }
-
- if (this.MBwindow.style.display == "none") { // First modal box appearing
- this._appear();
- this.event("onShow"); // Passing onShow callback
- } else { // If MB already on the screen, update it
- this._update();
- this.event("onUpdate"); // Passing onUpdate callback
- }
- },
-
- hide: function(options) { // External hide method to use from external HTML and JS
- if (this.initialized) {
- // Reading for options/callbacks except if event given as a parameter
- if (options && !Object.isFunction(options.element))
- Object.extend(this.options, options);
- this.event("beforeHide"); // Passing beforeHide callback
- if (this.options.transitions) {
- Effect.SlideUp(this.MBwindow, { duration: this.options.slideUpDuration, transition: Effect.Transitions.sinoidal, afterFinish: this._deinit.bind(this) });
- } else {
- this.MBwindow.hide();
- this._deinit();
- }
- Event.stopObserving(window, 'scroll');
- } else {
- throw("Modalbox is not initialized.");
- }
- },
-
- _hide: function(event) { // Internal hide method to use with overlay and close link
- event.stop(); // Stop event propagation for link elements
- // When clicked on overlay we'll check the option and in case of overlayClose == false we'll break hiding execution [Fix for #139]
- if (event.element().id == 'MB_overlay' && !this.options.overlayClose) return false;
- this.hide();
- },
-
- alert: function(message){
- var html = '
' + message + '
';
- Modalbox.show(html, {title: 'Alert: ' + document.title, width: 300});
- },
-
- _appear: function() { // First appearing of MB
- if (Prototype.Browser.IE6) { // Preparing IE 6 for showing modalbox
- window.scrollTo(0,0);
- this._prepareIEHtml("100%", "hidden");
- this._prepareIESelects("hidden");
- }
- this._setWidth();
- if(this.options.transitions) {
- this.MBoverlay.setOpacity(0);
- new Effect.Fade(this.MBoverlay, {
- from: 0,
- to: this.options.overlayOpacity,
- duration: this.options.overlayDuration,
- afterFinish: (function() {
- new Effect.SlideDown(this.MBwindow, {
- duration: this.options.slideDownDuration,
- transition: Effect.Transitions.sinoidal,
- afterFinish: this.loadContent.bind(this)
- });
- }).bind(this)
- });
- } else {
- this.MBoverlay.setOpacity(this.options.overlayOpacity);
- this.MBwindow.show();
- this.loadContent();
- }
- Event.observe(window, "resize", this.resizeObserver);
- },
-
- resize: function(byWidth, byHeight, options) { // Change size of MB without content reloading
- var oWidth = $(this.MBoverlay).getWidth();
- var wHeight = $(this.MBwindow).getHeight();
- var wWidth = $(this.MBwindow).getWidth();
- var hHeight = $(this.MBheader).getHeight();
- var cHeight = $(this.MBcontent).getHeight();
- var newHeight = ((wHeight - hHeight + byHeight) < cHeight) ? (cHeight + hHeight) : (wHeight + byHeight);
-
- var el = $(this.MBwindow);
- var contentEl = $(this.MBcontent);
- var windowBottomMargin = 10;
- newHeight += windowBottomMargin;
- var windowOffset = (parseInt(el.getStyle('margin-top'), 0) + parseInt(el.getStyle('margin-bottom'), 0) + parseInt(el.getStyle('border-top-width'), 0) + parseInt(el.getStyle('border-bottom-width'), 0)) + windowBottomMargin;
- var contentPadding = (parseInt(contentEl.getStyle('padding-top')) + parseInt(contentEl.getStyle('padding-bottom')));
-
- if ((newHeight + windowOffset + contentPadding) > document.viewport.getHeight()) {
- // adjust window height to account for margins and border widths
- newHeight = document.viewport.getHeight() - windowOffset - windowBottomMargin;
- // calculate content height including header height and padding values
- newcHeight = newHeight - hHeight - parseInt($(this.MBframe).getStyle('padding-bottom'), 0) - parseInt($(this.MBcontent).getStyle('padding-bottom'), 0);
- $(this.MBcontent).setStyle({height:newcHeight + 'px'});
- } else if ($(this.MBcontent).getStyle('height')) {
- // release any MB_content height set prior to establish scrollbars in content area
- $(this.MBcontent).setStyle({height:''});
- }
-
- var newWidth = wWidth + byWidth;
- //var newStyle = {width: newWidth + "px", height: newHeight + "px", left: (o.width - newWidth)/2 + "px"};
- var newStyle = {width: newWidth + "px", height: newHeight + "px"};
- this.options.width = newWidth;
- if (options) this.setOptions(options); // Passing callbacks
- if (this.options.transitions && !Modalbox.animating) {
- Modalbox.animating = true;
- new Effect.Morph(this.MBwindow, {
- style: newStyle,
- duration: this.options.resizeDuration,
- beforeStart: function(fx){
- fx.element.setStyle({overflow: "hidden"}); // Fix for MSIE 6 to resize correctly
- },
- afterFinish: (function(fx) {
- fx.element.setStyle({overflow: "visible"});
- this.event("_afterResize"); // Passing internal callback
- this.event("afterResize"); // Passing callback
- Modalbox.animating = false;
- }).bind(this)
- });
- } else {
- this.MBwindow.setStyle(newStyle);
- (function() {
- this.event("_afterResize"); // Passing internal callback
- this.event("afterResize"); // Passing callback
- }).bind(this).defer();
- }
- },
-
- resizeToContent: function(options){
- // Resizes the modalbox window to the actual content height.
- // This might be useful to resize modalbox after some content modifications which were changed content height.
-
- if (typeof options == "undefined") {
- options = {};
- }
-
- // check to see if MB_content includes any images
- var mbimages = $('MB_content').select('img');
- var totalimages = mbimages.length;
- if (mbimages[0]) {
- if (typeof options.imagesloaded == "undefined") {
-
- var loadedImages = $A();
- var loadedImageTotal = 0;
- mbimages.each(function(o,idx) {
- loadedImages[idx] = new Image();
- loadedImages[idx].src = o.src;
- loadedImages[idx].onload = function() {
- loadedImageTotal++;
- if (loadedImageTotal == totalimages) {
- // make sure all images have been rendered by checking their height
- var imageincomplete = false;
- mbimages.each(function(i) {
- if (i.height == 0) {
- imageincomplete = true;
- }
- });
- if (imageincomplete || Modalbox.animating) {
- // some image hasn't been rendered yet, trigger resize loop until it is
- Modalbox.resizeToContent();
- } else {
- // trigger one final resize, but set imagesloaded option to skip inspection of images
- options.imagesloaded = true;
- Modalbox.resizeToContent(options);
- }
- }
- }
- })
- }
- }
-
- var byWidth = 0, byHeight = this.options.height - this.MBwindow.getHeight();
- if (options.resizeCSSID && $(options.resizeCSSID)) {
- // byWidth is the amount of pixels needed to increase/decrease window to meet width of options.resizeCSSID
- // plus a 10 pixel margin to accommodate scrollbars
- byWidth = $(options.resizeCSSID).getWidth() - $(this.MBwindow).getWidth() + (parseInt($(this.MBcontent).getStyle('padding-left'), 0) + parseInt($(this.MBcontent).getStyle('padding-right'), 0)) + 15;
- }
- if (byHeight != 0) {
- this.resize(byWidth, byHeight, options);
- }
- },
-
- resizeToInclude: function(element, options){
- // Resizes the modalbox window to the cumulative height of element. Calculations are using CSS properties for margins and border.
- // This method might be useful to resize modalbox before including or updating content.
-
- var el = $(element);
- var elHeight = el.getHeight() + parseInt(el.getStyle('margin-top'), 0) + parseInt(el.getStyle('margin-bottom'), 0) + parseInt(el.getStyle('border-top-width'), 0) + parseInt(el.getStyle('border-bottom-width'), 0);
- if (elHeight > 0) {
- this.resize(0, elHeight, options);
- }
- },
-
- _update: function() { // Updating MB in case of wizards
- this.MBcontent.update($(this.MBloading).update(this.options.loadingString));
- this.loadContent();
- },
-
- loadContent: function() {
- if (this.event("beforeLoad") != false) { // If callback passed false, skip loading of the content
- if (typeof this.content == 'string') {
- var htmlRegExp = new RegExp(/<\/?[^>]+>/gi);
- if (htmlRegExp.test(this.content)) { // Plain HTML given as a parameter
- this._processContent(this.content);
- } else { // URL given as a parameter. We'll request it via Ajax
- new Ajax.Request(this.content, {
- method: this.options.method.toLowerCase(),
- parameters: this.options.params,
- onComplete: (function(response) {
- this._processContent(response.responseText);
- }).bind(this),
- onException: function(instance, exception){
- Modalbox.hide();
- throw('Modalbox Loading Error: ' + exception);
- }
- });
- }
- } else if (typeof this.content == 'object') { // HTML Object is given
- this._insertContent(this.content);
- } else {
- this.hide();
- throw('Modalbox Parameters Error: Please specify correct URL or HTML element (plain HTML or object)');
- }
- }
- },
-
- _processContent: function(content) {
- var html = content.stripScripts(), scripts = content.extractScripts();
- this._insertContent(html, function() {
- scripts.map(function(script) {
- return eval(script.replace("", ""));
- }, window);
- });
- },
-
- _insertContent: function(content, callback) {
- this.MBcontent.hide().update();
-
- if (typeof content == 'string') { // Plain HTML is given
- this.MBcontent.insert(new Element("div", { style: "display: none" }).update(content)).down().show();
- } else if (typeof content == 'object') { // HTML Object is given
- var _htmlObj = content.cloneNode(true); // If node is already a part of DOM we'll clone it
- // If cloneable element has ID attribute defined, modify it to prevent duplicates
- if (content.id) content.id = "MB_" + content.id;
- // Add prefix for IDs on all elements inside the DOM node
- $(content).select('*[id]').each(function(el) { el.id = "MB_" + el.id; });
- this.MBcontent.insert(_htmlObj).down('div').show();
- if (Prototype.Browser.IE6) { // Toggling back visibility for hidden selects in IE
- this._prepareIESelects("", "#MB_content ");
- }
- }
-
- // Prepare and resize modal box for content
- if (this.options.height == this._options.height) {
- this.resize((this.options.width - $(this.MBwindow).getWidth()), this.MBcontent.getHeight() - $(this.MBwindow).getHeight() + this.MBheader.getHeight(), {
- afterResize: (function() {
- this._putContent.bind(this, callback).defer(); // MSIE fix
- }).bind(this)
- });
- } else { // Height is defined. Creating a scrollable window
- this._setWidth();
- this.MBcontent.setStyle({
- overflow: 'auto',
- height: this.MBwindow.getHeight() - this.MBheader.getHeight() - 13 + 'px'
- });
- this._putContent.bind(this, callback).defer(); // MSIE fix
- }
- },
-
- _putContent: function(callback) {
- this.MBcontent.show();
- this._findFocusableElements();
- this._setFocus(); // Setting focus on first 'focusable' element in content (input, select, textarea, link or button)
- if (Object.isFunction(callback))
- callback(); // Executing internal JS from loaded content
- this.event("afterLoad"); // Passing callback
- },
-
- activate: function(options) {
- this.setOptions(options);
- this.active = true;
- if (this.options.overlayClose)
- this.MBoverlay.observe("click", this.hideObserver);
- this.MBclose.observe("click", this.hideObserver).show();
- if (this.options.transitions && this.options.inactiveFade)
- new Effect.Appear(this.MBwindow, {duration: this.options.slideUpDuration});
- },
-
- deactivate: function(options) {
- this.setOptions(options);
- this.active = false;
- if (this.options.overlayClose)
- this.MBoverlay.stopObserving("click", this.hideObserver);
- this.MBclose.stopObserving("click", this.hideObserver).hide();
- if (this.options.transitions && this.options.inactiveFade)
- new Effect.Fade(this.MBwindow, {duration: this.options.slideUpDuration, to: 0.75});
- },
-
- _initObservers: function() {
- this.MBclose.observe("click", this.hideObserver);
- if (this.options.overlayClose)
- this.MBoverlay.observe("click", this.hideObserver);
- // Gecko and Opera are moving focus a way too fast, all other browsers are okay with keydown
- var kbdEvent = (Prototype.Browser.Gecko || Prototype.Browser.Opera) ? "keypress" : "keydown";
- Event.observe(document, kbdEvent, this.kbdObserver);
- },
-
- _removeObservers: function() {
- this.MBclose.stopObserving("click", this.hideObserver);
- if (this.options.overlayClose)
- this.MBoverlay.stopObserving("click", this.hideObserver);
- var kbdEvent = (Prototype.Browser.Gecko || Prototype.Browser.Opera) ? "keypress" : "keydown";
- Event.stopObserving(document, kbdEvent, this.kbdObserver);
- },
-
- _setFocus: function() {
- // Setting focus to the first 'focusable' element which is one with tabindex = 1 or the first in the form loaded.
- if (this.focusableElements.length > 0 && this.options.autoFocusing == true) {
- var firstEl = this.focusableElements.find(function (el){
- return el.tabIndex == 1;
- }) || this.focusableElements.first();
- this.currFocused = this.focusableElements.toArray().indexOf(firstEl);
- firstEl.focus(); // Focus on first focusable element except close button
- } else if (this.MBclose.visible()) {
- this.MBclose.focus(); // If no focusable elements exist focus on close button
- }
- },
-
- _findFocusableElements: function() { // Collect form elements and links from MB content
- if (this.options.autoFocusing === true) {
- // TODO maybe add :enabled to select and textarea elements
- this.MBcontent.select('input:not([type=hidden]):enabled, select, textarea, button, a[href]').invoke('addClassName', 'MB_focusable');
- this.focusableElements = this.MBcontent.select('.MB_focusable');
- }
- },
-
- _kbdHandler: function(event) {
- var node = event.element();
- switch(event.keyCode) {
- case Event.KEY_TAB:
- event.stop();
-
- // Switching currFocused to the element which was focused by mouse instead of TAB-key. Fix for #134
- if (node != this.focusableElements[this.currFocused])
- this.currFocused = this.focusableElements.indexOf(node);
-
- if (!event.shiftKey) { // Focusing in direct order
- if (this.currFocused >= this.focusableElements.length - 1) {
- this.currFocused = 0;
- } else {
- this.currFocused++;
- }
- } else { // Shift key is pressed. Focusing in reverse order
- if (this.currFocused <= 0) {
- this.currFocused = this.focusableElements.length - 1;
- } else {
- this.currFocused--;
- }
- }
- this.focusableElements[this.currFocused].focus();
- break;
- case Event.KEY_ESC:
- if (this.active) this._hide(event);
- break;
- case 32:
- this._preventScroll(event);
- break;
- case 0: // For Gecko browsers compatibility
- if (event.which == 32) this._preventScroll(event);
- break;
- case Event.KEY_UP:
- case Event.KEY_DOWN:
- case Event.KEY_PAGEDOWN:
- case Event.KEY_PAGEUP:
- case Event.KEY_HOME:
- case Event.KEY_END:
- var tagName = node.tagName.toLowerCase();
- // Safari operates in slightly different way. This realization is still buggy in Safari.
- if (Prototype.Browser.WebKit && !["textarea", "select"].include(tagName)) {
- event.stop();
- } else if ((tagName == "input" && ["submit", "button"].include(node.type)) || (tagName == "a")) {
- event.stop();
- }
- break;
- }
- },
-
- _preventScroll: function(event) { // Disabling scrolling by "space" key
- if (!["input", "textarea", "select", "button"].include(event.element().tagName.toLowerCase()))
- event.stop();
- },
-
- _deinit: function() {
- this._removeObservers();
- Event.stopObserving(window, "resize", this.resizeObserver);
- if (this.options.transitions) {
- Effect.toggle(this.MBoverlay, 'appear', {duration: this.options.overlayDuration, afterFinish: this._removeElements.bind(this) });
- } else {
- this.MBoverlay.hide();
- this._removeElements();
- }
- this.MBcontent.setStyle({overflow: '', height: ''});
- },
-
- _cleanUpContentIDs: function() {
- // Replace prefixes 'MB_' in IDs for the original content
- if (typeof this.content == 'object') {
- if (this.content.id && this.content.id.match(/MB_/)) {
- this.content.id = this.content.id.replace(/MB_/, "");
- }
-
- this.content.select('*[id]').each(function(el) {
- el.id = el.id.replace(/MB_/, "");
- });
- }
- },
-
- _removeElements: function() {
- if (Prototype.Browser.Opera) { // Remove overlay after-effects in Opera
- window.scrollBy(0, 0);
- }
- this.MBoverlay.remove();
- $(this.MBwindowwrapper).remove();
- if (Prototype.Browser.IE6) {
- this._prepareIEHtml("", ""); // If set to auto MSIE will show horizontal scrolling
- this._prepareIESelects("");
- window.scrollTo(this.initScrollX, this.initScrollY);
- }
-
- this._cleanUpContentIDs();
-
- // Initialized will be set to false
- this.initialized = false;
- this.event("afterHide"); // Passing afterHide callback
- this.setOptions(this._options); // Settings options object into initial state
- },
-
- _setWidth: function() { // Set size
- this.MBwindow.setStyle({width: this.options.width + "px", height: this.options.height + "px"});
- },
-
- _setWidthAndPosition: function() {
- this.MBwindow.setStyle({
- width: this.options.width + "px"
- });
- },
-
- _prepareIEHtml: function(height, overflow) {
- // IE6 requires width and height set to 100% and overflow hidden
- $$('html, body').invoke('setStyle', {
- width: height,
- height: height,
- overflow: overflow
- });
- },
-
- _prepareIESelects: function(visibility, prefix) {
- // Toggle visibility for select elements
- $$((prefix || "") + "select").invoke('setStyle', {
- 'visibility': visibility
- });
- },
-
- event: function(eventName) {
- var r = true;
- if (this.options[eventName]) {
- var returnValue = this.options[eventName](); // Executing callback
- this.options[eventName] = null; // Removing callback after execution
- if (!Object.isUndefined(returnValue))
- r = returnValue;
- }
- return r;
- }
-};
-
-Object.extend(Modalbox, Modalbox.Methods);
-
-if (Modalbox.overrideAlert) window.alert = Modalbox.alert;
diff --git a/app/assets/javascripts/searchable.js b/app/assets/javascripts/searchable.js
deleted file mode 100644
index 6ef683d..0000000
--- a/app/assets/javascripts/searchable.js
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * Search with chunks
- */
-window.Searchable = uki.newClass(uki.view.Observable, new function() {
- this.chunkSize = 100;
- this.chunkTimeout = 20;
-
- this.init = function(data) {
- this.items = data;
- };
-
- this.search = function(query, callback) {
- stopSearch.call(this);
-
- this._query = query;
- var iterator = this.createIterator(query, callback);
-
- this.trigger('search.start', iterator);
- filterChunk.call(this, iterator);
- };
-
- this.matchRow = function( row, iterator ) { return false; };
-
- this.createIterator = function(query, callback) {
- return {
- query: query,
- iteration: 0,
- found: 0,
- callback: callback
- };
- };
-
- this._bindToDom = function() { return true };
-
- function filterChunk(iterator) {
- var filtered = 0,
- _this = this,
- foundInChunk = [],
- item;
-
- while(iterator.iteration < this.items.length) {
- if (filtered == this.chunkSize) {
- if (foundInChunk.length) this.trigger('search.foundInChunk', foundInChunk);
- this._searchTimer = setTimeout(function() { filterChunk.call(_this, iterator); }, this.chunkTimeout);
- return;
- }
- item = this.items[iterator.iteration];
- if (this.matchRow( item, iterator )) {
- iterator.found++;
- foundInChunk.push(item);
- this.trigger('search.found', item, iterator);
- if (iterator.callback) iterator.callback(item, iterator);
- } else {
- this.trigger('search.missed', item, iterator);
- }
- iterator.iteration++;
- filtered++;
- }
- this.trigger('search.foundInChunk', foundInChunk);
-
- stopSearch.call(this);
- this.trigger('search.finish', iterator);
- };
-
- function stopSearch () {
- if (this._searchTimer) {
- clearTimeout(this._searchTimer);
- this._searchTimer = false;
- }
- }
-});
\ No newline at end of file
diff --git a/app/assets/javascripts/uki-more.js b/app/assets/javascripts/uki-more.js
deleted file mode 100644
index 9f75423..0000000
--- a/app/assets/javascripts/uki-more.js
+++ /dev/null
@@ -1,827 +0,0 @@
-uki.more = {};
-
-uki.more.utils = {
- range: function (from, to) {
- var result = new Array(to - from), idx = 0;
- for (; from <= to; from++, idx++) {
- result[idx] = from;
- };
- return result;
- }
-};
-
-uki.extend(uki, uki.more.utils);
-
-uki.more.view = {};
-
-uki.viewNamespaces.push('uki.more.view.');
-
-// really basic tree list implementation
-uki.more.view.treeList = {};
-
-uki.view.declare('uki.more.view.TreeList', uki.view.List, function(Base) {
- this._setup = function() {
- Base._setup.call(this);
- this._render = new uki.more.view.treeList.Render();
- };
-
- this.listData = Base.data;
-
- this.data = uki.newProp('_treeData', function(v) {
- this._treeData = v;
- this._data = this._treeNodeToListData(v);
- var children = this.listData(), opened = false;
- for (var i=children.length - 1; i >= 0 ; i--) {
- if (this._data[i].__opened) {
- opened = true;
- this._openSubElement(i);
- }
- };
- this.listData(this._data);
- if (opened) this.trigger('open');
- });
-
- this._treeNodeToListData = function(node, indent) {
- indent = indent || 0;
- return uki.map(node, function(row) {
- row.__indent = indent;
- return row;
- });
- };
-
- this.toggle = function(index) {
- this._data[index].__opened ? this.close(index) : this.open(index);
- };
-
- function offsetFrom (array, from, offset) {
- for (var i = from; i < array.length; i++) {
- array[i] += offset;
- };
- }
-
- function recursiveLength (item) {
- var children = uki.attr(item, 'children'),
- length = children.length;
-
- for (var i=0; i < children.length; i++) {
- if (children[i].__opened) length += recursiveLength(children[i]);
- };
- return length;
- }
-
- this._openSubElement = function(index) {
- var item = this._data[index],
- children = uki.attr(item, 'children');
-
- if (!children || !children.length) return 0;
- var length = children.length;
-
- item.__opened = true;
- this._data.splice.apply(this._data, [index+1, 0].concat( this._treeNodeToListData(children, item.__indent + 1) ));
-
- for (var i=children.length - 1; i >= 0 ; i--) {
- if (this._data[index+1+i].__opened) {
- length += this._openSubElement(index+1+i);
- }
- };
- return length;
- };
-
- this.open = function(index) {
- if (this._data[index].__opened) return this;
-
- var length = this._openSubElement(index),
- positionInSelection = uki.binarySearch(index, this._selectedIndexes),
- clickIndex = this._lastClickIndex,
- indexes = this._selectedIndexes;
-
- this.clearSelection(true);
- offsetFrom(
- indexes,
- positionInSelection + (indexes[positionInSelection] == index ? 1 : 0),
- length
- );
-
- this.listData(this._data);
- this.selectedIndexes(indexes);
- this._lastClickIndex = clickIndex > index ? clickIndex + length : clickIndex;
- this.trigger('open');
- return this;
- };
-
- this.close = function(index) {
- var item = this._data[index],
- indexes = this._selectedIndexes,
- children = uki.attr(item, 'children');
- if (!children || !children.length || !item.__opened) return;
-
- var length = recursiveLength(item);
-
- item.__opened = false;
- this._data.splice(index+1, length);
-
- var positionInSelection = uki.binarySearch(index, indexes),
- removeFrom = positionInSelection + (indexes[positionInSelection] == index ? 1 : 0),
- toRemove = 0,
- clickIndex = this._lastClickIndex;
- while (indexes[removeFrom + toRemove] && indexes[removeFrom + toRemove] <= index + length) toRemove++;
-
- this.clearSelection(true);
- offsetFrom(indexes, removeFrom, -length);
- if (toRemove > 0) {
- indexes.splice(positionInSelection, toRemove);
- }
-
- this.listData(this._data);
- this.selectedIndexes(indexes);
- this._lastClickIndex = clickIndex > index ? clickIndex - length : clickIndex;
- this.trigger('close');
- };
-
- this._mousedown = function(e) {
- if (e.target.className.indexOf('toggle-tree') > -1) {
- var o = uki.dom.offset(this._dom),
- y = e.pageY - o.y,
- p = y / this._rowHeight << 0;
- this.toggle(p);
- } else {
- Base._mousedown.call(this, e);
- }
- };
-
- this._keypress = function(e) {
- Base._keypress.call(this, e);
- e = e.domEvent;
- if (e.which == 39 || e.keyCode == 39) { // RIGHT
- this.open(this._lastClickIndex);
- } else if (e.which == 37 || e.keyCode == 37) { // LEFT
- this.close(this._lastClickIndex);
- }
- };
-
-});
-// tree list render
-uki.more.view.treeList.Render = uki.newClass(uki.view.list.Render, new function() {
- this._parentTemplate = new uki.theme.Template(
- '
If target has function with attr it will be called target[attr](value=)
- * If no function present attribute will be set/get directly: target[attr] = value or return target[attr]
- *
- * @example
- * uki.attr(view, 'name', 'funny') // sets name to funny on view
- * uki.attr(view, 'id') // gets id attribute of view
- *
- * @param {object} target
- * @param {string} attr Attribute name
- * @param {object=} value Value to set
- * @returns {object} target if value is being set, retrieved value otherwise
- */
- attr: function(target, attr, value) {
- if (value !== undefined) {
- if (target[attr] && target[attr].apply) {
- // if (uki.isFunction(target[attr])) {
- target[attr](value);
- } else {
- target[attr] = value;
- }
- return target;
- } else {
- if (target[attr] && target[attr].apply) {
- // if (uki.isFunction(target[attr])) {
- return target[attr]();
- } else {
- return target[attr];
- }
- }
- },
-
- /**
- * Runs a function in a given context
- *
- * @param {function()} fn
- * @param {object} context
- */
- proxy: function(fn, context) {
- var args = slice.call(arguments, 2),
- result = function() {
- return fn.apply(context, args.concat(slice.call(arguments, 0)));
- };
- result.huid = fn.huid = fn.huid || uki.guid++;
- return result;
- },
-
- /**
- * Checks if obj is a function
- *
- * @param {object} object Object to check
- * @returns {boolean}
- */
- isFunction: function( obj ) {
- return toString.call(obj) === "[object Function]";
- },
-
- /**
- * Checks if obj is an Array
- *
- * @param {object} object Object to check
- * @returns {boolean}
- */
- isArray: function( obj ) {
- return toString.call(obj) === "[object Array]";
- },
-
- /**
- * Trims the string
- *
- * @param {string} text
- * @returns {string} trimmed text
- */
- trim: function( text ) {
- text = text || '';
- return trim ? trim.call(text) : text.replace( trimRe, "" );
- },
-
- /**
- * Converts unsafe symbols to entities
- *
- * @param {string} html
- * @returns {string} escaped html
- */
- escapeHTML: function( html ) {
- var trans = {
- '&': '&',
- '<': '<',
- '>': '>',
- '"': '"',
- "'": '''
- };
- return (html + '').replace(/[&<>\"\']/g, function(c) { return trans[c]; });
- },
-
- /**
- * Iterates through all non empty values of object or an Array
- *
- * @param {object|Array} object Object to iterate through
- * @param {function(number, object):boolean} callback Called for every item, may return false to stop iteration
- * @param {object} context Context in which callback should called. If not specified context will be set to
- * current item
- * @returns {object}
- */
- each: function( object, callback, context ) {
- var name, i = 0, length = object.length;
-
- if ( length === undefined ) {
- for ( name in object ) {
- if ( !name || object[ name ] === undefined || !object.hasOwnProperty(name) ) continue;
- if ( callback.call( context || object[ name ], name, object[ name ] ) === false ) { break; }
- }
- } else {
- for ( var value = object[0]; i < length && callback.call( context || value, i, value ) !== false; value = object[++i] ){}
- }
- return object;
- },
-
- /**
- * Checks if elem is in array
- *
- * @param {object} elem
- * @param {object} array
- * @returns {boolean}
- */
- inArray: function( elem, array ) {
- for ( var i = 0, length = array.length; i < length; i++ ) {
- if ( array[ i ] === elem ) { return i; }
- }
-
- return -1;
- },
-
- /**
- * Returns unique elements in array
- *
- * @param {Array} array
- * @returns {Array}
- */
- unique: function( array ) {
- if (array.length && (typeof array[0] == 'object' || typeof array[0] == 'function')) {
- var result = [],
- i;
-
- for (i = 0; i < array.length; i++) {
- if (!array[i][marked]) { result[result.length] = array[i]; }
- array[i][marked] = true;
- };
- for (i = 0; i < result.length; i++) {
- delete result[i][marked];
- };
- return result;
-
- } else {
-
- var ret = [],
- done = {};
-
- for ( var i = 0, length = array.length; i < length; i++ ) {
- var id = array[ i ];
-
- if ( !done[ id ] ) {
- done[ id ] = true;
- ret.push( array[ i ] );
- }
- }
-
- return ret;
- }
- },
-
- /**
- * Searches for all items matching given criteria
- *
- * @param {Array} elems Element to search through
- * @param {function(object, number)} callback Returns true for every matched element
- * @returns {Array} matched elements
- */
- grep: function( elems, callback ) {
- var ret = [];
-
- for ( var i = 0, length = elems.length; i < length; i++ ) {
- if ( callback( elems[ i ], i ) ) { ret.push( elems[ i ] ); }
- }
-
- return ret;
- },
-
- /**
- * Maps elements passing them to callback
- * @example
- * x = uki.map([1, 2, 3], function(item) { return -item });
- *
- * @param {Array} elems Elements to map
- * @param {function(object, number)} mapping function
- * @param {object} context Context in which callback should called. If not specified context will be set to
- * current item
- * @returns {Array} mapped values
- */
- map: function( elems, callback, context ) {
- var ret = [],
- mapper = uki.isFunction(callback) ? callback :
- function(e) { return uki.attr(e, callback); };
-
- for ( var i = 0, length = elems.length; i < length; i++ ) {
- var value = mapper.call( context || elems[ i ], elems[ i ], i );
-
- if ( value != null ) { ret[ ret.length ] = value; }
- }
-
- return ret;
- },
-
- /**
- * Reduces array
- * @example
- * x = uki.reduce(1, [1, 2, 3], function(p, x) { return p * x}) // calculates product
- *
- * @param {object} initial Initial value
- * @param {Array} elems Elements to reduce
- * @param {function(object, number)} reduce function
- * @param {object} context Context in which callback should called. If not specified context will be set to
- * current item
- * @returns {object}
- */
- reduce: function( initial, elems, callback, context ) {
- for ( var i = 0, length = elems.length; i < length; i++ ) {
- initial = callback.call( context || elems[ i ], initial, elems[ i ], i );
- }
- return initial;
- },
-
- /**
- * Copies properties from one object to another
- * @example
- * uki.extend(x, { width: 13, height: 14 }) // sets x.width = 13, x.height = 14
- * options = uki.extend({}, defaultOptions, options)
- *
- * @param {object} target Object to copy properties into
- * @param {...object} sources Objects to take properties from
- * @returns Describe what it returns
- */
- extend: function() {
- var target = arguments[0] || {}, i = 1, length = arguments.length, options;
-
- for ( ; i < length; i++ ) {
- if ( (options = arguments[i]) != null ) {
-
- for ( var name in options ) {
- var copy = options[ name ];
-
- if ( copy !== undefined ) {
- target[ name ] = copy;
- }
-
- }
- }
- }
-
- return target;
- },
-
- /**
- * Creates a new class inherited from base classes. Init function is used as constructor
- * @example
- * baseClass = uki.newClass({
- * init: function() { this.x = 3 }
- * });
- *
- * childClass = uki.newClass(baseClass, {
- * getSqrt: function() { return this.x*this.x }
- * });
- *
- * @param {object=} superClass If superClass has prototype "real" prototype base inheritance is used,
- * otherwise superClass properties are simply copied to newClass prototype
- * @param {Array.
- *
- *
Its easier to call uki([view1, view2]) or uki('selector') instead of creating collection directly
View creates and layouts dom nodes. uki.view.Base defines basic API for other views.
- * It also defines common layout algorithms.
- *
- * Layout
- *
- *
View layout is defined by rectangle and anchors.
- * Rectangle is passed to constructor, anchors are set through the #anchors attribute.
- *
- *
Rectangle defines initial position and size. Anchors specify how view will move and
- * resize when its parent is resized.
- *
- * 2 phases of layout
- *
- *
Layout process has 2 phases.
- * First views rectangles are recalculated. This may happen several times before dom
- * is touched. This is done either explicitly through #rect attribute or through
- * #parentResized callbacks.
- * After rectangles are set #layout is called. This actually updates dom styles.
", ""
-
- content
- end
-
- def field_content(str)
- sanitize(html_format(spelling(str)), :tags => %w[p ul li code span])
- end
-
-private
- def shorten_args(text)
- text.gsub!(/# (.*)/) do |s|
- r = $1
- r_fallback = r.dup
-
- logger.debug r.inspect
- logger.debug r.length
-
- r.gsub!(/ --verbose /m, " -v ") if r.length > 67
- r.gsub!(/ --ask /m, " -a ") if r.length > 67
- r.gsub!(/ --oneshot /m, " -1 ") if r.length > 67
- r.gsub!(/ -a -1 -v /m, " -1av ") if r.length > 67
-
- r = r_fallback.gsub(/ --verbose /, " --verbose \\\n ") if r.length > 67
-
- "# " + r
- end
- end
-end
diff --git a/app/helpers/index_helper.rb b/app/helpers/index_helper.rb
deleted file mode 100644
index ea82a6a..0000000
--- a/app/helpers/index_helper.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# ===GLSAMaker v2
-# Copyright (C) 2009-2011 Alex Legler
-# Copyright (C) 2009 Pierre-Yves Rofes
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# For more information, see the LICENSE file.
-
-# Index Helper
-module IndexHelper
-end
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb
deleted file mode 100644
index b3ce20a..0000000
--- a/app/helpers/search_helper.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-module SearchHelper
-end
diff --git a/app/helpers/tools_helper.rb b/app/helpers/tools_helper.rb
deleted file mode 100644
index 5fa4f26..0000000
--- a/app/helpers/tools_helper.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-# ===GLSAMaker v2
-# Copyright (C) 2009-2011 Alex Legler
-# Copyright (C) 2009 Pierre-Yves Rofes
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# For more information, see the LICENSE file.
-
-# Tools helper
-module ToolsHelper
-end
diff --git a/app/indices/indices.rb b/app/indices/indices.rb
deleted file mode 100644
index 04be101..0000000
--- a/app/indices/indices.rb
+++ /dev/null
@@ -1,34 +0,0 @@
-ThinkingSphinx::Index.define :bug, :with => :active_record do
- indexes whiteboard
-
- has revision_id
-end
-
-ThinkingSphinx::Index.define :cve_comment, :with => :active_record do
- indexes comment
- has user_id, cve_id
-end
-
-ThinkingSphinx::Index.define :cve, :with => :active_record do
- indexes cve_id, :sortable => true
- indexes state, :sortable => true
- indexes summary
-
- has published_at, last_changed_at
-end
-
-ThinkingSphinx::Index.define :glsa, :with => :active_record do
- indexes glsa_id, :sortable => true
-end
-
-ThinkingSphinx::Index.define :revision, :with => :active_record do
- indexes title
- indexes synopsis
- indexes description
- indexes impact
- indexes workaround
- indexes resolution
- indexes is_release
-
- has glsa_id, revid, release_revision
-end
diff --git a/app/mailers/.gitkeep b/app/mailers/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/app/mailers/glsa_mailer.rb b/app/mailers/glsa_mailer.rb
deleted file mode 100644
index 1f6b54a..0000000
--- a/app/mailers/glsa_mailer.rb
+++ /dev/null
@@ -1,45 +0,0 @@
-class GlsaMailer < ActionMailer::Base
- default :from => GLSAMAKER_FROM_EMAIL,
- :content_type => 'text/plain'
-
- def new_request(recipient, glsa, requestor)
- @requestor = requestor
- @glsa = glsa
-
- mail(:to => recipient.email,
- :subject => "[GLSAMaker] New request: #{glsa.last_revision.title}")
- end
-
- def edit(recipient, glsa, diff, editor)
- @editor = editor
- @diff = diff
- @glsa = glsa
-
- mail(:to => recipient.email,
- :subject => "[GLSAMaker] Draft edit: #{glsa.last_revision.title}")
- end
-
- def comment(recipient, glsa, comment, commentator)
- @commentator = commentator
- @comment = comment
- @glsa = glsa
-
- mail(:to => recipient.email,
- :subject => "[GLSAMaker] Draft commented: #{glsa.last_revision.title}")
- end
-
- def approval(recipient, glsa)
- @glsa = glsa
-
- mail(:to => recipient.email,
- :subject => "[GLSAMaker] Draft approved: #{glsa.last_revision.title}")
- end
-
- def text(recipient, subject, text, footer)
- @text = text
- @footer = footer
-
- mail(:to => recipient.email,
- :subject => subject)
- end
-end
diff --git a/app/models/.gitkeep b/app/models/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/app/models/bug.rb b/app/models/bug.rb
deleted file mode 100644
index 00e2d6d..0000000
--- a/app/models/bug.rb
+++ /dev/null
@@ -1,46 +0,0 @@
-# ===GLSAMaker v2
-# Copyright (C) 2009-2011 Alex Legler
-# Copyright (C) 2009 Pierre-Yves Rofes
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# For more information, see the LICENSE file.
-
-# Bug model
-class Bug < ActiveRecord::Base
- belongs_to :revision
-
- def cc
- self.arches
- end
-
- include Glsamaker::Bugs::StatusMixin
- include Glsamaker::Bugs::ArchesMixin
- include Glsamaker::Bugs::BugReadyMixin
-
- # Returns the Gentoo Bugzilla URI for the bug.
- # Set +secure+ to false to get a HTTP instead of a HTTPS URI
- def bug_url(secure = true)
- if secure
- "https://#{GLSAMAKER_BUGZIE_HOST}/show_bug.cgi?id=#{self.bug_id}"
- else
- "http://#{GLSAMAKER_BUGZIE_HOST}/show_bug.cgi?id=#{self.bug_id}"
- end
- end
-
- # Updates the cached bug metadata
- def update_cached_metadata
- b = Glsamaker::Bugs::Bug.load_from_id(bug_id)
-
- update_attributes!(
- :title => b.summary,
- :whiteboard => b.status_whiteboard,
- :arches => b.arch_cc.join(', ')
- )
- rescue Exception => e
- raise "Could not update cached metadata: " + e.message
- end
-end
diff --git a/app/models/comment.rb b/app/models/comment.rb
deleted file mode 100644
index fa285a4..0000000
--- a/app/models/comment.rb
+++ /dev/null
@@ -1,44 +0,0 @@
-# ===GLSAMaker v2
-# Copyright (C) 2009-2011 Alex Legler
-# Copyright (C) 2009 Pierre-Yves Rofes
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# For more information, see the LICENSE file.
-
-# Comment model
-class Comment < ActiveRecord::Base
- belongs_to :glsa, :class_name => "Glsa", :foreign_key => "glsa_id"
- belongs_to :user
-
- include ActiveModel::Validations
- validates :glsa_id, :presence => true
- validates :user_id, :presence => true
- validates :rating, :inclusion => { :in => %w[neutral approval rejection]}
- validates :rating, :uniqueness => { :scope => [:glsa_id, :user_id], :if => Proc.new {|comment| comment.rating != 'neutral'}, :message => 'You have already approved or rejected this draft' }
-
- class CommentValidator < ActiveModel::Validator
- def validate(record)
- if record.glsa.is_owner? record.user
- if record.rating != 'neutral'
- record.errors[:rating] << 'The owner of a draft cannot make approvals or rejections'
- end
- end
-
- if record.glsa.submitter.nil?
- record.errors[:rating] << 'You may not approve or reject advisories that have not been filled in yet'
- end
-
- if record.user.access < 2
- if record.rating != 'neutral'
- record.errors[:rating] << 'You may not approve or reject drafts'
- end
- end
- end
- end
-
- validates_with CommentValidator
-end
diff --git a/app/models/cpe.rb b/app/models/cpe.rb
deleted file mode 100644
index 243cced..0000000
--- a/app/models/cpe.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-# ===GLSAMaker v2
-# Copyright (C) 2010 Alex Legler
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# For more information, see the LICENSE file.
-
-class Cpe < ActiveRecord::Base
- has_and_belongs_to_many :cves, :class_name => 'Cve'
-
- def split
- self.cpe.split(':')
- end
-
- def vendor
- split[2]
- end
-
- def product
- split[3]
- end
-
- def version
- split[4]
- end
-end
diff --git a/app/models/cve.rb b/app/models/cve.rb
deleted file mode 100644
index d9a05c6..0000000
--- a/app/models/cve.rb
+++ /dev/null
@@ -1,177 +0,0 @@
-# ===GLSAMaker v2
-# Copyright (C) 2010 Alex Legler
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# For more information, see the LICENSE file.
-
-require 'glsamaker/helpers'
-
-class Cve < ActiveRecord::Base
- has_many :references, :class_name => "CveReference"
- has_many :comments, :class_name => "CveComment"
- has_and_belongs_to_many :cpes, :class_name => "Cpe"
- has_many :cve_changes, :class_name => "CveChange", :foreign_key => "cve_id"
- has_many :assignments, :class_name => "CveAssignment", :foreign_key => "cve_id"
-
- def to_s(line_length = 78)
- str = "#{self.cve_id} #{"(%s):" % url}\n"
- str += " " + Glsamaker::help.word_wrap(self.summary, :line_width => line_length-2).gsub(/\n/, "\n ")
- end
-
- # Returns the URL for this CVE at NVD (:nvd, default) or MITRE (:mitre)
- def url(site = :nvd)
- if site == :nvd
- "https://nvd.nist.gov/vuln/detail/%s" % self.cve_id
- elsif site == :mitre
- "https://cve.mitre.org/cgi-bin/cvename.cgi?name=%s" % self.cve_id
- else
- raise ArgumentError, 'Invalid site'
- end
- end
-
- # Concatenates the CVE descriptions of many cves, separated by separator
- def self.concat(cves, separator = "\n\n")
- txt = ""
- cves.each do |cve|
- txt += Cve.find(cve).to_s
- txt += separator
- end
- txt
- end
-
- # Assigns the CVE to a certain bug, creating a history entry
- def assign(bugnr, user, action = 'assign')
- bugnr = Integer(bugnr)
-
- case action
- when 'assign', :assign
- act = 'assign'
- when 'file', :file
- act = 'file'
- else
- raise ArgumentError, "Invalid action specified"
- end
-
- a = self.assignments.create!(:bug => bugnr)
-
- ch = self.cve_changes.create!(
- :user => user,
- :action => act,
- :object => a.id
- )
-
- self.state = 'ASSIGNED'
- save!
- end
-
- # Mark the CVE as Not-For-Us, creating a history entry
- def nfu(user, reason = nil)
- self.cve_changes.create!(
- :user => user,
- :action => 'nfu',
- :object => reason
- )
-
- self.state = 'NFU'
- save!
- end
-
- # Mark the CVE as INVALID, creating a history entry
- def invalidate(user, reason = nil)
- self.cve_changes.create!(
- :user => user,
- :action => 'invalid',
- :object => reason
- )
-
- self.state = 'INVALID'
- save!
- end
-
- def later(user, reason = nil)
- self.cve_changes.create!(
- :user => user,
- :action => 'later',
- :object => reason
- )
-
- self.state = 'LATER'
- save!
- end
-
- def mark_new(user, reason = nil)
- self.cve_changes.create!(
- :user => user,
- :action => 'new',
- :object => reason
- )
-
- self.state = 'NEW'
- save!
- end
-
- def add_comment(user, comment, confidential = false)
- self.comments << CveComment.create!(
- :user => user,
- :confidential => confidential,
- :comment => comment
- )
- end
-
- # Decorates the output of field with a color, depending on the status
- def colorize(field = :cve_id)
- "%s" % [state.downcase, self[field]]
- end
-
- # Looks for Gentoo packages that might be affected by this CVE
- def package_hints
- def search(s)
- return [] if s.nil? or s == ""
-
- Glsamaker::Portage.find_packages(
- Regexp.compile(Regexp.escape(s).gsub(/[^a-zA-Z0-9]/, '.*?'), Regexp::IGNORECASE)
- )
- end
-
- package_hints = []
- my_cpes = cpes.map {|c| c.product }.uniq
- package_hints << my_cpes.map {|c| search c }.flatten
-
- # stolen from the old cvetools.py
- if summary =~ / in (\S+\.\S+) in (?:the )?(?:a )?(\D+) \d+/
- match = $2
- if match.end_with? 'before'
- package_hints << search(match[0, match.length - 7])
- else
- package_hints << search(match)
- end
- end
-
- if summary =~ / in (?:the )?(?:a )?(\D+) \d+/
- match = $1
- if match.end_with? 'before'
- package_hints << search(match[0, match.length - 7])
- else
- package_hints << search(match)
- end
- end
-
- if summary =~ / in (\S+\.\S+) in (?:the )?(?:a )?(\S+) /
- package_hints << search($1)
- end
-
- if summary =~ / in (?:the )?(?:a )?(\S+) /
- package_hints << search($1)
- end
-
- if summary =~ /(?:The )?(\S+) /
- package_hints << search($1)
- end
-
- package_hints.flatten.uniq
- end
-end
diff --git a/app/models/cve_assignment.rb b/app/models/cve_assignment.rb
deleted file mode 100644
index af1559a..0000000
--- a/app/models/cve_assignment.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-class CveAssignment < ActiveRecord::Base
- belongs_to :cve
-end
diff --git a/app/models/cve_change.rb b/app/models/cve_change.rb
deleted file mode 100644
index 71ff974..0000000
--- a/app/models/cve_change.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-class CveChange < ActiveRecord::Base
- belongs_to :user, :class_name => "User", :foreign_key => "user_id"
- belongs_to :cve
-end
diff --git a/app/models/cve_comment.rb b/app/models/cve_comment.rb
deleted file mode 100644
index 73357dc..0000000
--- a/app/models/cve_comment.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-class CveComment < ActiveRecord::Base
- belongs_to :cve
- belongs_to :user, :class_name => "User", :foreign_key => "user_id"
-end
diff --git a/app/models/cve_reference.rb b/app/models/cve_reference.rb
deleted file mode 100644
index 1f11e01..0000000
--- a/app/models/cve_reference.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-class CveReference < ActiveRecord::Base
- belongs_to :cve
-end
diff --git a/app/models/glsa.rb b/app/models/glsa.rb
deleted file mode 100644
index bee70be..0000000
--- a/app/models/glsa.rb
+++ /dev/null
@@ -1,311 +0,0 @@
-# ===GLSAMaker v2
-# Copyright (C) 2009-2011 Alex Legler
-# Copyright (C) 2009 Pierre-Yves Rofes
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# For more information, see the LICENSE file.
-
-# GLSA model
-class Glsa < ActiveRecord::Base
- validates_uniqueness_of :glsa_id, :message => "must be unique"
- validates_presence_of :glsa_id, :message => "GLSA ID needed"
-
- belongs_to :submitter, :class_name => "User", :foreign_key => "submitter"
- belongs_to :requester, :class_name => "User", :foreign_key => "requester"
- belongs_to :bugreadymaker, :class_name => "User", :foreign_key => "bugreadymaker"
-
- has_many :revisions, :dependent => :destroy
- has_many :comments, :dependent => :destroy
-
- # Returns the last revision object, referring to the current state of things
- def last_revision
- @last_revision ||= self.revisions.order("revid DESC").first
- end
-
- # Returns the last revision object that was a release
- def last_release_revision
- self.revisions.where(:is_release => true).order('release_revision DESC').first
- end
-
- # Invalidates the last revision cache
- def invalidate_last_revision_cache
- @last_revision = nil
- end
-
- # Returns the next revision ID to be given for this GLSA
- def next_revid
- if (rev = last_revision)
- rev.revid + 1
- else
- 0
- end
- end
-
- # Returns the next release revision ID to be given for this GLSA
- def next_releaseid
- if (rev = last_release_revision)
- rev.release_revision + 1
- else
- 1
- end
- end
-
- # Returns the best available release date
- def release_date
- return first_released_at if status == 'release'
- last_revision.created_at
- end
-
- # Returns the best available revision date
- def revised_date
- if status == 'release' and last_revision.created_at < first_released_at
- first_released_at
- else
- last_revision.created_at
- end
- end
-
- # Returns all approving comments
- def approvals
- comments.where(:rating => 'approval')
- end
-
- # Returns all rejecting comments
- def rejections
- comments.where(:rating => 'rejection')
- end
-
- # Returns true if the draft is ready for sending
- def is_approved?
- count = 0
- users_who_approved = approvals.map { |a| a.user_id }
- users_who_rejected = rejections.map { |a| a.user_id }
-
- common_users = (users_who_approved & users_who_rejected)
- common_users.each do |user|
- approval = approvals.where(:user_id => user).order('created_at DESC').first
- rejection = rejections.where(:user_id => user).order('created_at DESC').first
-
- # if the approval was before a rejection => 0
- if approval.created_at < rejection.created_at
- count += 0
- elsif approval.created_at > rejection.created_at
- count += 1
- end
- end
-
- (users_who_approved - common_users).each do |user|
- count += 1
- end
-
- (users_who_rejected - common_users).each do |user|
- count -= 1
- end
-
- (count >= 1)
- end
-
- # Returns true if it has comments
- def has_comments?
- comments.count > 0
- end
-
- # The approval status of the GLSA, either :approved, :commented, or :none
- def approval_status
- if is_approved?
- return :approved
- elsif has_comments?
- if has_pending_comments?
- return :comments_pending
- else
- return :commented
- end
- end
- return :none
- end
-
- # Returns true if user is the owner of this GLSA.
- def is_owner?(user)
- return false if user.nil?
- luser = (status == "request" ? requester : submitter)
- luser == user
- end
-
- # Returns the workflow status of this GLSA for a given user.
- # Return values: :own (own draft), :approved (approval given), :commented (comment or rejection given)
- def workflow_status(user)
- if is_owner?(user)
- return :own
- end
-
- if comments.where(:rating => 'approval', :user_id => user.id).count > 0
- return :approved
- end
-
- if comments.where(:user_id => user.id, :read => false).count > 0
- return :commented
- end
-
- return :todo
- end
-
- # Returns true if there are any pending comments left
- def has_pending_comments?
- comments.where(:read => false).all.count > 0
- end
-
- # Returns all CVEs linked to this GLSA
- def related_cves
- last_revision.bugs.map do |bug|
- CveAssignment.where(bug: bug.bug_id).map {|assignment| assignment.cve}.uniq
- end.flatten
- end
-
- # Bulk addition of references.
- # Expects an array of hashes {:title => ..., :url => ...}
- def add_references(refs)
- rev = last_revision.deep_copy
-
- refs.each do |reference|
- rev.references.create(reference)
- end
-
- invalidate_last_revision_cache
- self
- end
-
- # Performs the steps to release the GLSA, performing santiy checks.
- def release
- raise GLSAReleaseError, 'Cannot release the GLSA as it is not approved' if not is_approved?
- raise GLSAReleaseError, 'Cannot release the GLSA as there are comments pending' if has_pending_comments?
- # TODO: releasing someone else's draft
- release!
- end
-
- # Performs the steps to release the GLSA, performing not as many checks. The +release+ method is to be preferred.
- def release!
- # This one is not avoidable. Some information is only filled in during the first edit, thus making it required.
- raise GLSAReleaseError, 'Cannot release the GLSA as it is not in "draft" or "release" status' if not (self.status == 'draft' or self.status == 'release')
-
- rev = last_revision.deep_copy
- rev.is_release = true
- rev.release_revision = next_releaseid
- rev.save!
-
- unless self.status == 'release'
- self.glsa_id = Glsa.next_id
- self.first_released_at = Time.now
- end
-
- self.status = 'release'
- save!
- end
-
- # Closes all bugs linked to this advisory and refreshes the metadata
- def close_bugs(message)
- last_revision.bugs.each do |bug|
- logger.info "Closing bug #{bug.bug_id}"
- b = Glsamaker::Bugs::Bug.load_from_id(bug.bug_id)
-
- changes = {}
- changes[:comment] = message
- changes[:whiteboard] = b.status_whiteboard.gsub(/(ebuild\+?|upstream\+?|stable\+?|glsa)\??/, 'glsa+').gsub(/glsa\/glsa/, 'glsa+')
- changes[:status] = "RESOLVED"
- changes[:resolution] = "FIXED"
-
- Bugzilla.update_bug(bug.bug_id, changes)
- bug.update_cached_metadata
- end
- end
-
- # Returns a publically accessible URL for the advisory if it's a released GLSA
- def to_url
- "https://security.gentoo.org/glsa/#{self.glsa_id}"
- end
-
- # Calculates the next GLSA ID for the given month, or the current month
- def self.next_id(month = Time.now)
- month_id = month.strftime("%Y%m")
- items = Glsa.where("glsa_id LIKE ? AND status = ?", month_id + '%', 'release').order('glsa_id DESC')
-
- return "#{month_id}-01" if items.length == 0
-
- items.first.glsa_id =~ /^#{month_id}-(\d+)$/
- next_id = $1.to_i + 1
- "#{month_id}-#{format "%02d", next_id}"
- end
-
- # Files a new GLSA request
- def self.new_request(title, bugs, comment, access, import_references, user)
- glsa = Glsa.new
- glsa.requester = user
- glsa.glsa_id = Digest::MD5.hexdigest(title + Time.now.to_s)[0...9]
- glsa.restricted = (access == "confidential")
- glsa.status = "request"
-
- begin
- glsa.save!
- rescue Exception => e
- raise Exception, "Error while saving the GLSA object: #{e.message}"
- end
-
- # unless comment.strip.blank?
- # glsa.comments << Comment.new(:rating => "neutral", :text => comment, :user => user)
-
- # begin
- # glsa.save!
- # rescue Exception => e
- # raise Exception, "Error while saving the comment: #{e.message}"
- # end
- # end
-
- revision = Revision.new
- revision.revid = glsa.next_revid
- revision.glsa = glsa
- revision.title = title
- revision.user = user
-
- begin
- revision.save!
- rescue Exception => e
- glsa.delete
- raise Exception, "Error while saving Revision object: #{e.message}"
- end
-
- bugs = Bugzilla::Bug.str2bugIDs(bugs)
-
- bugs.each do |bug|
- begin
- b = Glsamaker::Bugs::Bug.load_from_id(bug)
-
- revision.bugs.create(
- :bug_id => bug,
- :title => b.summary,
- :whiteboard => b.status_whiteboard,
- :arches => b.arch_cc.join(', ')
- )
- rescue Exception => e
- # In case of bugzilla errors, just keep the bug #
- revision.bugs.create(:bug_id => bug)
- end
- end
-
- if import_references
- logger.debug { "importing references" }
- refs = []
- glsa.related_cves.each do |cve|
- refs << {:title => cve.cve_id, :url => cve.url}
- end
- glsa.add_references refs
- end
-
- glsa
- end
-
-end
-
-class GLSAReleaseError < StandardError; end
diff --git a/app/models/package.rb b/app/models/package.rb
deleted file mode 100644
index 30fb1bd..0000000
--- a/app/models/package.rb
+++ /dev/null
@@ -1,48 +0,0 @@
-# ===GLSAMaker v2
-# Copyright (C) 2009-2011 Alex Legler
-# Copyright (C) 2009 Pierre-Yves Rofes
-# Copyright (C) 2017 Robin H. Johnson
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# For more information, see the LICENSE file.
-
-# Package model
-class Package < ActiveRecord::Base
- # Mapping XML comparators to internally used ones
- COMP_MAP = {
- '>=' => 'ge',
- '>' => 'gt',
- '=' => 'eq',
- '<=' => 'le',
- '<' => 'lt',
- '*<' => 'rlt',
- '*<=' => 'rle',
- '*>' => 'rgt',
- '*>=' => 'rge'
- }.freeze
-
- # Arches (from $PORTDIR/profiles/arch.list)
- ARCHLIST_BASE = %w{alpha amd64 arm arm64 hppa ia64 m68k mips nios2 ppc ppc64 riscv s390 sh sparc x86}.freeze
- ARCHLIST_FBSD = %w{amd64-fbsd sparc-fbsd x86-fbsd}.freeze
- ARCHLIST_PREFIX = %w{ppc-aix amd64-linux arm-linux arm64-linux ppc64-linux x86-linux ppc-macos x86-macos x64-macos m68k-mint sparc-solaris sparc64-solaris x64-solaris x86-solaris x86-winnt x64-cygwin x86-cygwin}.freeze
- ARCHLIST = (ARCHLIST_BASE+ARCHLIST_FBSD+ARCHLIST_PREFIX).freeze
- ARCHLIST_REGEX = %r{(?:#{ARCHLIST.join('|')})}.freeze
-
- # Model properties
- belongs_to :revision
- validates :comp, :inclusion => { :in => COMP_MAP.keys }
- validates :arch, :format => { :with => /\A(\*|(#{ARCHLIST_REGEX} )*#{ARCHLIST_REGEX})\z/ }
-
- # Returns the comparator in the format needed for the XML
- def xml_comp
- COMP_MAP[self.comp]
- end
-
- def self.reverse_comp(cmp)
- COMP_MAP.invert[cmp]
- end
-end
diff --git a/app/models/reference.rb b/app/models/reference.rb
deleted file mode 100644
index f378cd4..0000000
--- a/app/models/reference.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-# ===GLSAMaker v2
-# Copyright (C) 2009-2011 Alex Legler
-# Copyright (C) 2009 Pierre-Yves Rofes
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# For more information, see the LICENSE file.
-
-# Reference model
-class Reference < ActiveRecord::Base
- belongs_to :revision
-end
diff --git a/app/models/revision.rb b/app/models/revision.rb
deleted file mode 100644
index 26cfd82..0000000
--- a/app/models/revision.rb
+++ /dev/null
@@ -1,103 +0,0 @@
-# ===GLSAMaker v2
-# Copyright (C) 2009-2011 Alex Legler
-# Copyright (C) 2009 Pierre-Yves Rofes
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# For more information, see the LICENSE file.
-
-require 'rexml/document'
-
-# Revision model
-class Revision < ActiveRecord::Base
- belongs_to :glsa, :class_name => "Glsa", :foreign_key => "glsa_id"
- has_many :bugs, :dependent => :destroy
- has_many :references, :dependent => :destroy
- has_many :packages, :dependent => :destroy
- has_many :vulnerable_packages, -> { where :my_type => "vulnerable" }, :class_name => "Package"
- has_many :unaffected_packages, -> { where :my_type => "unaffected" }, :class_name => "Package"
- belongs_to :user
-
- validates_numericality_of :user_id, :message => "user id needed"
- validates_presence_of :title
-
-=begin
- validates_each :description, :resolution do |record, attr, value|
- # XML well-formedness test
- begin
- REXML::Document.new("#{value}")
- rescue REXML::ParseException => e
- record.errors.add attr, "is not well-formed XML"
- end
- end
-=end
-
- # Returns an Array of Integers of the bugs linked to this revision
- def get_linked_bugs
- self.bugs.map do |bug|
- bug.bug_id.to_i
- end
- end
-
- # Checks all assigned bugs for bug ready status
- def bug_ready?
- self.bugs.each do |b|
- return false unless b.bug_ready?
- end
-
- return true
- end
-
- # Updates the cached metadata of all assigned bugs
- def update_cached_bug_metadata
- self.bugs.each do |b|
- b.update_cached_metadata
- end
- end
-
- # Creates a deep copy of a previous revision, copying all bugs, references and packages,
- # incrementing the revision ID by one.
- # The caller must take care of deleting this revision again in case any error occurs later.
- def deep_copy
- new_rev = dup
- new_rev.revid = glsa.next_revid
-
- references.each {|reference| new_rev.references << reference.dup }
- packages.each {|package| new_rev.packages << package.dup }
- bugs.each {|bug| new_rev.bugs << bug.dup }
-
- new_rev.save!
- new_rev
- end
-
- # Returns the packages linked to this revision grouped by atoms
- def packages_by_atom
- packages_list = {}
- self.packages.each do |p|
- packages_list[p[:atom]] ||= {}
- (packages_list[p[:atom]][p[:my_type]] ||= []) << p
- end
-
- packages_list
- end
-
- def to_s
- s = "r#{self.revid}"
- if self.is_release?
- s << " (release #{self.release_revision})"
- end
-
- s
- end
-
- def release_access
- if self.access == "both"
- "local, remote"
- else
- self.access
- end
- end
-end
diff --git a/app/models/template.rb b/app/models/template.rb
deleted file mode 100644
index d974347..0000000
--- a/app/models/template.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-class Template < ActiveRecord::Base
-end
diff --git a/app/models/user.rb b/app/models/user.rb
deleted file mode 100644
index 88d5eff..0000000
--- a/app/models/user.rb
+++ /dev/null
@@ -1,65 +0,0 @@
-# ===GLSAMaker v2
-# Copyright (C) 2009-2011 Alex Legler
-# Copyright (C) 2009 Pierre-Yves Rofes
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# For more information, see the LICENSE file.
-
-# =Access levels
-#
-# [0 (Contributor)] Can see own drafts, can fill in requests
-# [1 (Padawan)] all of the above, plus see and edit all drafts
-# [2 (Full member)] all of the above, plus voting
-# [3 (Confidential member)] all of the above, including restricted drafts
-class User < ActiveRecord::Base
- has_many :submitted_glsas, :class_name => "Glsa", :foreign_key => "submitter"
- has_many :requested_glsas, :class_name => "Glsa", :foreign_key => "requester"
- has_many :bugreadymade_glsas, :class_name => "Glsa", :foreign_key => "bugreadymaker"
- has_many :cve_changes, :class_name => "CveChange", :foreign_key => "user_id"
-
- has_many :revisions
-
- serialize :preferences
-
- validates_uniqueness_of :login, :message => "User name must be unique"
- validates_presence_of :login, :message => "User name can't be blank"
-
- validates_presence_of :name, :message => "Name can't be blank"
-
- validates_presence_of :access, :message => "Access level needed"
- validates_numericality_of :access, :greater_than_or_equal_to => 0, :less_than_or_equal_to => 3, :message => "Access level must be between 0 and 3"
-
- validates_format_of :email, :with => /[\w.%+-]+?@[\w.-]+?\.\w{2,6}\z/, :message => "Invalid Email address format"
-
- scope :active, -> { where(:disabled => false).where('id > ?', 0) }
-
- # Is the user an admin? ;)
- def is_el_jefe?
- self.jefe
- end
-
- # Checks access to a given GLSA
- def can_access?(glsa)
- return false if disabled?
- return false if access == 0 and not glsa.is_owner? self
- return false if access < 3 and glsa.restricted
-
- true
- end
-
- def to_s
- "#{name} (#{login})"
- end
-
- # Returns a certain category form the user's preferences
- # or an empty hash if that category does not exist
- def get_pref_category(category)
- return {} if self.preferences == nil or self.preferences[category] == nil
-
- self.preferences[category]
- end
-end
diff --git a/app/views/admin/index/index.html.erb b/app/views/admin/index/index.html.erb
deleted file mode 100644
index 2313d16..0000000
--- a/app/views/admin/index/index.html.erb
+++ /dev/null
@@ -1,6 +0,0 @@
-
-<% end %>
-
-
-<% end %>
\ No newline at end of file
diff --git a/app/views/bugs/create.html.erb b/app/views/bugs/create.html.erb
deleted file mode 100644
index aa3490b..0000000
--- a/app/views/bugs/create.html.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-
Bugs#create
-
Find me in app/views/bugs/create.html.erb
diff --git a/app/views/bugs/create.js.erb b/app/views/bugs/create.js.erb
deleted file mode 100644
index 13a466b..0000000
--- a/app/views/bugs/create.js.erb
+++ /dev/null
@@ -1,6 +0,0 @@
-<% if @error == nil %>
-Element.insert('bugtable', { bottom: '<%= escape_javascript(@bugs_text).html_safe %>'});
-Modalbox.hide();
-<% else %>
-alert('<%= escape_javascript(@error).html_safe %>');
-<% end %>
\ No newline at end of file
diff --git a/app/views/bugs/destroy.html.erb b/app/views/bugs/destroy.html.erb
deleted file mode 100644
index b08c545..0000000
--- a/app/views/bugs/destroy.html.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-
-<% end -%>
-<% end %>
\ No newline at end of file
diff --git a/app/views/comments/show.html.erb b/app/views/comments/show.html.erb
deleted file mode 100644
index b66469d..0000000
--- a/app/views/comments/show.html.erb
+++ /dev/null
@@ -1,2 +0,0 @@
-
- → Bugzilla - <%= comment.author %> - at <%= comment.date %> -
-
-<%= simple_format_without_paragraph(linkify_comment(comment.text)).html_safe %>