minerva 0.1.25 → 0.1.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +28 -0
  3. data/app/models/minerva/state.rb +1 -2
  4. data/db/migrate/20181218183815_create_minerva_states.rb +4 -6
  5. data/lib/minerva/version.rb +1 -1
  6. metadata +5 -153
  7. data/Rakefile +0 -32
  8. data/app/assets/config/minerva_manifest.js +0 -2
  9. data/app/assets/javascripts/minerva/application.js +0 -15
  10. data/app/assets/javascripts/minerva/assignments.js +0 -2
  11. data/app/assets/javascripts/minerva/interfaces.js +0 -2
  12. data/app/assets/javascripts/minerva/states.js +0 -2
  13. data/app/assets/javascripts/minerva/statuses.js +0 -2
  14. data/app/assets/javascripts/minerva/workflows.js +0 -2
  15. data/app/assets/stylesheets/minerva/application.css +0 -15
  16. data/app/assets/stylesheets/minerva/assignments.css +0 -4
  17. data/app/assets/stylesheets/minerva/interfaces.css +0 -4
  18. data/app/assets/stylesheets/minerva/states.css +0 -4
  19. data/app/assets/stylesheets/minerva/statuses.css +0 -4
  20. data/app/assets/stylesheets/minerva/workflows.css +0 -4
  21. data/app/assets/stylesheets/scaffold.css +0 -80
  22. data/app/controllers/concerns/minerva/base/assignments.rb +0 -62
  23. data/app/controllers/concerns/minerva/base/interfaces.rb +0 -62
  24. data/app/controllers/concerns/minerva/base/states.rb +0 -62
  25. data/app/controllers/concerns/minerva/base/statuses.rb +0 -62
  26. data/app/controllers/concerns/minerva/base/workflows.rb +0 -62
  27. data/app/controllers/minerva/assignments_controller.rb +0 -5
  28. data/app/controllers/minerva/interfaces_controller.rb +0 -5
  29. data/app/controllers/minerva/states_controller.rb +0 -5
  30. data/app/controllers/minerva/statuses_controller.rb +0 -5
  31. data/app/controllers/minerva/workflows_controller.rb +0 -5
  32. data/app/helpers/minerva/application_helper.rb +0 -4
  33. data/app/helpers/minerva/assignments_helper.rb +0 -4
  34. data/app/helpers/minerva/interfaces_helper.rb +0 -4
  35. data/app/helpers/minerva/states_helper.rb +0 -4
  36. data/app/helpers/minerva/statuses_helper.rb +0 -4
  37. data/app/helpers/minerva/workflows_helper.rb +0 -4
  38. data/app/jobs/minerva/application_job.rb +0 -4
  39. data/app/mailers/minerva/application_mailer.rb +0 -6
  40. data/app/models/minerva/assignment.rb +0 -5
  41. data/app/models/minerva/status.rb +0 -4
  42. data/app/views/layouts/minerva/application.html.erb +0 -16
  43. data/app/views/minerva/assignments/_form.html.erb +0 -32
  44. data/app/views/minerva/assignments/edit.html.erb +0 -6
  45. data/app/views/minerva/assignments/index.html.erb +0 -31
  46. data/app/views/minerva/assignments/new.html.erb +0 -5
  47. data/app/views/minerva/assignments/show.html.erb +0 -19
  48. data/app/views/minerva/interfaces/_form.html.erb +0 -27
  49. data/app/views/minerva/interfaces/edit.html.erb +0 -6
  50. data/app/views/minerva/interfaces/index.html.erb +0 -29
  51. data/app/views/minerva/interfaces/new.html.erb +0 -5
  52. data/app/views/minerva/interfaces/show.html.erb +0 -14
  53. data/app/views/minerva/states/_form.html.erb +0 -47
  54. data/app/views/minerva/states/edit.html.erb +0 -6
  55. data/app/views/minerva/states/index.html.erb +0 -35
  56. data/app/views/minerva/states/new.html.erb +0 -5
  57. data/app/views/minerva/states/show.html.erb +0 -33
  58. data/app/views/minerva/statuses/_form.html.erb +0 -22
  59. data/app/views/minerva/statuses/edit.html.erb +0 -6
  60. data/app/views/minerva/statuses/index.html.erb +0 -27
  61. data/app/views/minerva/statuses/new.html.erb +0 -5
  62. data/app/views/minerva/statuses/show.html.erb +0 -9
  63. data/app/views/minerva/workflows/_form.html.erb +0 -42
  64. data/app/views/minerva/workflows/edit.html.erb +0 -6
  65. data/app/views/minerva/workflows/index.html.erb +0 -35
  66. data/app/views/minerva/workflows/new.html.erb +0 -5
  67. data/app/views/minerva/workflows/show.html.erb +0 -29
  68. data/config/initializers/minerva.rb +0 -0
  69. data/config/routes.rb +0 -7
  70. data/db/migrate/20181218183524_create_minerva_statuses.rb +0 -9
  71. data/db/migrate/20181218183728_create_minerva_assignments.rb +0 -13
  72. data/lib/tasks/minerva_tasks.rake +0 -4
@@ -1,62 +0,0 @@
1
- module Minerva::Base::Assignments
2
- extend ActiveSupport::Concern
3
-
4
- included do
5
- before_action :set_assignment, only: [:show, :edit, :update, :destroy]
6
- end
7
-
8
- # GET /assignments
9
- def index
10
- @assignments = Minerva::Assignment.all
11
- end
12
-
13
- # GET /assignments/1
14
- def show
15
- end
16
-
17
- # GET /assignments/new
18
- def new
19
- @assignment = Minerva::Assignment.new
20
- end
21
-
22
- # GET /assignments/1/edit
23
- def edit
24
- end
25
-
26
- # POST /assignments
27
- def create
28
- @assignment = Minerva::Assignment.new(assignment_params)
29
-
30
- if @assignment.save
31
- redirect_to @assignment, notice: 'Assignment was successfully created.'
32
- else
33
- render :new
34
- end
35
- end
36
-
37
- # PATCH/PUT /assignments/1
38
- def update
39
- if @assignment.update(assignment_params)
40
- redirect_to @assignment, notice: 'Assignment was successfully updated.'
41
- else
42
- render :edit
43
- end
44
- end
45
-
46
- # DELETE /assignments/1
47
- def destroy
48
- @assignment.destroy
49
- redirect_to assignments_url, notice: 'Assignment was successfully destroyed.'
50
- end
51
-
52
- private
53
- # Use callbacks to share common setup or constraints between actions.
54
- def set_assignment
55
- @assignment = Minerva::Assignment.find(params[:id])
56
- end
57
-
58
- # Only allow a trusted parameter "white list" through.
59
- def assignment_params
60
- params.require(:assignment).permit(:title, :interface_id, :automated)
61
- end
62
- end
@@ -1,62 +0,0 @@
1
- module Minerva::Base::Interfaces
2
- extend ActiveSupport::Concern
3
-
4
- included do
5
- before_action :set_interface, only: [:show, :edit, :update, :destroy]
6
- end
7
-
8
- # GET /interfaces
9
- def index
10
- @interfaces = Minerva::Interface.all
11
- end
12
-
13
- # GET /interfaces/1
14
- def show
15
- end
16
-
17
- # GET /interfaces/new
18
- def new
19
- @interface = Minerva::Interface.new
20
- end
21
-
22
- # GET /interfaces/1/edit
23
- def edit
24
- end
25
-
26
- # POST /interfaces
27
- def create
28
- @interface = Minerva::Interface.new(interface_params)
29
-
30
- if @interface.save
31
- redirect_to @interface, notice: 'Interface was successfully created.'
32
- else
33
- render :new
34
- end
35
- end
36
-
37
- # PATCH/PUT /interfaces/1
38
- def update
39
- if @interface.update(interface_params)
40
- redirect_to @interface, notice: 'Interface was successfully updated.'
41
- else
42
- render :edit
43
- end
44
- end
45
-
46
- # DELETE /interfaces/1
47
- def destroy
48
- @interface.destroy
49
- redirect_to interfaces_url, notice: 'Interface was successfully destroyed.'
50
- end
51
-
52
- private
53
- # Use callbacks to share common setup or constraints between actions.
54
- def set_interface
55
- @interface = Minerva::Interface.find(params[:id])
56
- end
57
-
58
- # Only allow a trusted parameter "white list" through.
59
- def interface_params
60
- params.require(:interface).permit(:title, :code_point)
61
- end
62
- end
@@ -1,62 +0,0 @@
1
- module Minerva::Base::States
2
- extend ActiveSupport::Concern
3
-
4
- included do
5
- before_action :set_state, only: [:show, :edit, :update, :destroy]
6
- end
7
-
8
- # GET /states
9
- def index
10
- @states = Minerva::State.all
11
- end
12
-
13
- # GET /states/1
14
- def show
15
- end
16
-
17
- # GET /states/new
18
- def new
19
- @state = Minerva::State.new
20
- end
21
-
22
- # GET /states/1/edit
23
- def edit
24
- end
25
-
26
- # POST /states
27
- def create
28
- @state = Minerva::State.new(state_params)
29
-
30
- if @state.save
31
- redirect_to @state, notice: 'State was successfully created.'
32
- else
33
- render :new
34
- end
35
- end
36
-
37
- # PATCH/PUT /states/1
38
- def update
39
- if @state.update(state_params)
40
- redirect_to @state, notice: 'State was successfully updated.'
41
- else
42
- render :edit
43
- end
44
- end
45
-
46
- # DELETE /states/1
47
- def destroy
48
- @state.destroy
49
- redirect_to states_url, notice: 'State was successfully destroyed.'
50
- end
51
-
52
- private
53
- # Use callbacks to share common setup or constraints between actions.
54
- def set_state
55
- @state = Minerva::State.find(params[:id])
56
- end
57
-
58
- # Only allow a trusted parameter "white list" through.
59
- def state_params
60
- params.require(:state).permit(:creator_id, :user_id, :role_id, :work_id, :assignment_id, :status_id)
61
- end
62
- end
@@ -1,62 +0,0 @@
1
- module Minerva::Base::Statuses
2
- extend ActiveSupport::Concern
3
-
4
- included do
5
- before_action :set_status, only: [:show, :edit, :update, :destroy]
6
- end
7
-
8
- # GET /statuses
9
- def index
10
- @statuses = Minerva::Status.all
11
- end
12
-
13
- # GET /statuses/1
14
- def show
15
- end
16
-
17
- # GET /statuses/new
18
- def new
19
- @status = Minerva::Status.new
20
- end
21
-
22
- # GET /statuses/1/edit
23
- def edit
24
- end
25
-
26
- # POST /statuses
27
- def create
28
- @status = Minerva::Status.new(status_params)
29
-
30
- if @status.save
31
- redirect_to @status, notice: 'Status was successfully created.'
32
- else
33
- render :new
34
- end
35
- end
36
-
37
- # PATCH/PUT /statuses/1
38
- def update
39
- if @status.update(status_params)
40
- redirect_to @status, notice: 'Status was successfully updated.'
41
- else
42
- render :edit
43
- end
44
- end
45
-
46
- # DELETE /statuses/1
47
- def destroy
48
- @status.destroy
49
- redirect_to statuses_url, notice: 'Status was successfully destroyed.'
50
- end
51
-
52
- private
53
- # Use callbacks to share common setup or constraints between actions.
54
- def set_status
55
- @status = Minerva::Status.find(params[:id])
56
- end
57
-
58
- # Only allow a trusted parameter "white list" through.
59
- def status_params
60
- params.require(:status).permit(:title)
61
- end
62
- end
@@ -1,62 +0,0 @@
1
- module Minerva::Base::Workflows
2
- extend ActiveSupport::Concern
3
-
4
- included do
5
- before_action :set_workflow, only: [:show, :edit, :update, :destroy]
6
- end
7
-
8
- # GET /workflows
9
- def index
10
- @workflows = Minerva::Workflow.all
11
- end
12
-
13
- # GET /workflows/1
14
- def show
15
- end
16
-
17
- # GET /workflows/new
18
- def new
19
- @workflow = Minerva::Workflow.new
20
- end
21
-
22
- # GET /workflows/1/edit
23
- def edit
24
- end
25
-
26
- # POST /workflows
27
- def create
28
- @workflow = Minerva::Workflow.new(workflow_params)
29
-
30
- if @workflow.save
31
- redirect_to @workflow, notice: 'Workflow was successfully created.'
32
- else
33
- render :new
34
- end
35
- end
36
-
37
- # PATCH/PUT /workflows/1
38
- def update
39
- if @workflow.update(workflow_params)
40
- redirect_to @workflow, notice: 'Workflow was successfully updated.'
41
- else
42
- render :edit
43
- end
44
- end
45
-
46
- # DELETE /workflows/1
47
- def destroy
48
- @workflow.destroy
49
- redirect_to workflows_url, notice: 'Workflow was successfully destroyed.'
50
- end
51
-
52
- private
53
- # Use callbacks to share common setup or constraints between actions.
54
- def set_workflow
55
- @workflow = Minerva::Workflow.find(params[:id])
56
- end
57
-
58
- # Only allow a trusted parameter "white list" through.
59
- def workflow_params
60
- params.require(:workflow).permit(:creator_id, :project_id, :task_list, :title, :ordered)
61
- end
62
- end
@@ -1,5 +0,0 @@
1
- module Minerva
2
- class AssignmentsController < ::ApplicationController
3
- include Minerva::Base::Assignments
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- module Minerva
2
- class InterfacesController < ::ApplicationController
3
- include Minerva::Base::Interfaces
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- module Minerva
2
- class StatesController < ::ApplicationController
3
- include Minerva::Base::States
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- module Minerva
2
- class StatusesController < ::ApplicationController
3
- include Minerva::Base::Statuses
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- module Minerva
2
- class WorkflowsController < ::ApplicationController
3
- include Minerva::Base::Workflows
4
- end
5
- end
@@ -1,4 +0,0 @@
1
- module Minerva
2
- module ApplicationHelper
3
- end
4
- end
@@ -1,4 +0,0 @@
1
- module Minerva
2
- module AssignmentsHelper
3
- end
4
- end
@@ -1,4 +0,0 @@
1
- module Minerva
2
- module InterfacesHelper
3
- end
4
- end
@@ -1,4 +0,0 @@
1
- module Minerva
2
- module StatesHelper
3
- end
4
- end
@@ -1,4 +0,0 @@
1
- module Minerva
2
- module StatusesHelper
3
- end
4
- end
@@ -1,4 +0,0 @@
1
- module Minerva
2
- module WorkflowsHelper
3
- end
4
- end
@@ -1,4 +0,0 @@
1
- module Minerva
2
- class ApplicationJob < ActiveJob::Base
3
- end
4
- end
@@ -1,6 +0,0 @@
1
- module Minerva
2
- class ApplicationMailer < ActionMailer::Base
3
- default from: 'from@example.com'
4
- layout 'mailer'
5
- end
6
- end
@@ -1,5 +0,0 @@
1
- module Minerva
2
- class Assignment < ApplicationRecord
3
- belongs_to :interface, optional: true
4
- end
5
- end
@@ -1,4 +0,0 @@
1
- module Minerva
2
- class Status < ApplicationRecord
3
- end
4
- end
@@ -1,16 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Minerva</title>
5
- <%= csrf_meta_tags %>
6
- <%= csp_meta_tag %>
7
-
8
- <%= stylesheet_link_tag "minerva/application", media: "all" %>
9
- <%= javascript_include_tag "minerva/application" %>
10
- </head>
11
- <body>
12
-
13
- <%= yield %>
14
-
15
- </body>
16
- </html>
@@ -1,32 +0,0 @@
1
- <%= form_with(model: assignment, local: true) do |form| %>
2
- <% if assignment.errors.any? %>
3
- <div id="error_explanation">
4
- <h2><%= pluralize(assignment.errors.count, "error") %> prohibited this assignment from being saved:</h2>
5
-
6
- <ul>
7
- <% assignment.errors.full_messages.each do |message| %>
8
- <li><%= message %></li>
9
- <% end %>
10
- </ul>
11
- </div>
12
- <% end %>
13
-
14
- <div class="field">
15
- <%= form.label :title %>
16
- <%= form.text_field :title %>
17
- </div>
18
-
19
- <div class="field">
20
- <%= form.label :interface_id %>
21
- <%= form.text_field :interface_id %>
22
- </div>
23
-
24
- <div class="field">
25
- <%= form.label :automated %>
26
- <%= form.check_box :automated %>
27
- </div>
28
-
29
- <div class="actions">
30
- <%= form.submit %>
31
- </div>
32
- <% end %>