lesli_support 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ff939ab963e674de3a14442077d06572ce2c1091568666fa730259a83171e747
4
- data.tar.gz: a23328ff32b2a7cdf84992a36fe92baac93447ee48c3644ce0ee4addd6a353ca
3
+ metadata.gz: ace6f17700b63713a0ba3dd0fc295e567ac891c62d2da2e59cd838ad13358e38
4
+ data.tar.gz: 4413108d01bee145d26ce16e8d93cb1c59cfad1a25a97adeefe6302479aa532a
5
5
  SHA512:
6
- metadata.gz: 149e25ce3d686b52625697dbb871a27c9a06b18b3ea762c9a7e4bc1cdb2954bc0ebaa3e848d4a40e9a43c393dccbe9b71aba510902b1c36e01ae0bd447d4785b
7
- data.tar.gz: 6eafb0c0c16385130259ca6cb2ffb22ad3a9ef5d09525fbe1b02762e93fcd86945d08aa363fae51e5d724d1fbd7941c03d8f4f4952c4ae65331eab85d85ec002
6
+ metadata.gz: be478a9e9839ce9833244182553d22e8923c0adff1a1bdfe8f940a034dd0ad3c423f95e319c7892d8b4a681c2b8f960cee8c7350808767af1f1da45ae5e46654
7
+ data.tar.gz: 199728d1ee5c1dbfc6fb02c837e71d38fbc15fdc24ec000ec1459746d3fb3b9964273cca3a1da38069f3cba4accc21bd6aa093fc3b4c1131f98a5a760b1cfafb
data/Rakefile CHANGED
@@ -1,5 +1,7 @@
1
1
  require "bundler/setup"
2
2
 
3
- load "rails/tasks/statistics.rake"
3
+ APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
4
+
5
+ load "rails/tasks/engine.rake"
4
6
 
5
7
  require "bundler/gem_tasks"
@@ -1,60 +1,4 @@
1
1
  module LesliSupport
2
- class AccountsController < ApplicationController
3
- before_action :set_account, only: %i[ show edit update destroy ]
4
-
5
- # GET /accounts
6
- def index
7
- @accounts = Account.all
2
+ class AccountsController < ApplicationController
8
3
  end
9
-
10
- # GET /accounts/1
11
- def show
12
- end
13
-
14
- # GET /accounts/new
15
- def new
16
- @account = Account.new
17
- end
18
-
19
- # GET /accounts/1/edit
20
- def edit
21
- end
22
-
23
- # POST /accounts
24
- def create
25
- @account = Account.new(account_params)
26
-
27
- if @account.save
28
- redirect_to @account, notice: "Account was successfully created."
29
- else
30
- render :new, status: :unprocessable_entity
31
- end
32
- end
33
-
34
- # PATCH/PUT /accounts/1
35
- def update
36
- if @account.update(account_params)
37
- redirect_to @account, notice: "Account was successfully updated.", status: :see_other
38
- else
39
- render :edit, status: :unprocessable_entity
40
- end
41
- end
42
-
43
- # DELETE /accounts/1
44
- def destroy
45
- @account.destroy
46
- redirect_to accounts_url, notice: "Account was successfully destroyed.", status: :see_other
47
- end
48
-
49
- private
50
- # Use callbacks to share common setup or constraints between actions.
51
- def set_account
52
- @account = Account.find(params[:id])
53
- end
54
-
55
- # Only allow a list of trusted parameters through.
56
- def account_params
57
- params.fetch(:account, {})
58
- end
59
- end
60
4
  end
@@ -1,60 +1,4 @@
1
1
  module LesliSupport
2
- class Catalog::ItemsController < ApplicationController
3
- before_action :set_catalog_item, only: %i[ show edit update destroy ]
4
-
5
- # GET /catalog/items
6
- def index
7
- @catalog_items = Catalog::Item.all
2
+ class Catalog::ItemsController < ApplicationController
8
3
  end
9
-
10
- # GET /catalog/items/1
11
- def show
12
- end
13
-
14
- # GET /catalog/items/new
15
- def new
16
- @catalog_item = Catalog::Item.new
17
- end
18
-
19
- # GET /catalog/items/1/edit
20
- def edit
21
- end
22
-
23
- # POST /catalog/items
24
- def create
25
- @catalog_item = Catalog::Item.new(catalog_item_params)
26
-
27
- if @catalog_item.save
28
- redirect_to @catalog_item, notice: "Item was successfully created."
29
- else
30
- render :new, status: :unprocessable_entity
31
- end
32
- end
33
-
34
- # PATCH/PUT /catalog/items/1
35
- def update
36
- if @catalog_item.update(catalog_item_params)
37
- redirect_to @catalog_item, notice: "Item was successfully updated.", status: :see_other
38
- else
39
- render :edit, status: :unprocessable_entity
40
- end
41
- end
42
-
43
- # DELETE /catalog/items/1
44
- def destroy
45
- @catalog_item.destroy!
46
- redirect_to catalog_items_url, notice: "Item was successfully destroyed.", status: :see_other
47
- end
48
-
49
- private
50
- # Use callbacks to share common setup or constraints between actions.
51
- def set_catalog_item
52
- @catalog_item = Catalog::Item.find(params[:id])
53
- end
54
-
55
- # Only allow a list of trusted parameters through.
56
- def catalog_item_params
57
- params.fetch(:catalog_item, {})
58
- end
59
- end
60
4
  end
@@ -0,0 +1,6 @@
1
+ module LesliSupport
2
+ module Items
3
+ class DiscussionsController < Lesli::Items::DiscussionsController
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module LesliSupport
2
+ module Items
3
+ class TasksController < Lesli::Items::TasksController
4
+ end
5
+ end
6
+ end
@@ -1,60 +1,4 @@
1
1
  module LesliSupport
2
- class Ticket::ActivitiesController < ApplicationController
3
- before_action :set_ticket_activity, only: %i[ show edit update destroy ]
4
-
5
- # GET /ticket/activities
6
- def index
7
- @ticket_activities = Ticket::Activity.all
2
+ class Ticket::ActivitiesController < ApplicationController
8
3
  end
9
-
10
- # GET /ticket/activities/1
11
- def show
12
- end
13
-
14
- # GET /ticket/activities/new
15
- def new
16
- @ticket_activity = Ticket::Activity.new
17
- end
18
-
19
- # GET /ticket/activities/1/edit
20
- def edit
21
- end
22
-
23
- # POST /ticket/activities
24
- def create
25
- @ticket_activity = Ticket::Activity.new(ticket_activity_params)
26
-
27
- if @ticket_activity.save
28
- redirect_to @ticket_activity, notice: "Activity was successfully created."
29
- else
30
- render :new, status: :unprocessable_entity
31
- end
32
- end
33
-
34
- # PATCH/PUT /ticket/activities/1
35
- def update
36
- if @ticket_activity.update(ticket_activity_params)
37
- redirect_to @ticket_activity, notice: "Activity was successfully updated.", status: :see_other
38
- else
39
- render :edit, status: :unprocessable_entity
40
- end
41
- end
42
-
43
- # DELETE /ticket/activities/1
44
- def destroy
45
- @ticket_activity.destroy!
46
- redirect_to ticket_activities_path, notice: "Activity was successfully destroyed.", status: :see_other
47
- end
48
-
49
- private
50
- # Use callbacks to share common setup or constraints between actions.
51
- def set_ticket_activity
52
- @ticket_activity = Ticket::Activity.find(params.expect(:id))
53
- end
54
-
55
- # Only allow a list of trusted parameters through.
56
- def ticket_activity_params
57
- params.fetch(:ticket_activity, {})
58
- end
59
- end
60
4
  end
@@ -0,0 +1,6 @@
1
+ module LesliSupport
2
+ module Items
3
+ class Activity < Lesli::Items::Activity
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module LesliSupport
2
+ module Items
3
+ class Discussion < Lesli::Items::Discussion
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module LesliSupport
2
+ module Items
3
+ class Task < Lesli::Items::Task
4
+ end
5
+ end
6
+ end
@@ -42,9 +42,9 @@ module LesliSupport
42
42
  belongs_to :priority, optional: true, class_name: "Catalog::Item"
43
43
 
44
44
  # Items
45
- include Lesli::Item::Tasks
46
- include Lesli::Item::Activities
47
- include Lesli::Item::Discussions
45
+ include Lesli::Items::Tasks
46
+ include Lesli::Items::Activities
47
+ include Lesli::Items::Discussions
48
48
  #has_many :discussions, class_name: "LesliSupport::Item::Discussion"
49
49
 
50
50
  # include Lesli::Items::Attachments
@@ -1,8 +1,16 @@
1
1
 
2
2
  <%= form_with(model: @ticket, builder: LesliView::Forms::Builder) do |form| %>
3
3
  <%= form.fieldset do %>
4
+
5
+ <div class="field">
6
+ <div class="control">
7
+ <input class="input has-text-centered" type="text" disabled value="<%= @ticket.uid %>">
8
+ </div>
9
+ </div>
10
+
4
11
  <%= form.field_control(:subject) %>
5
- <div class="columns">
12
+
13
+ <div class="columns mb-0">
6
14
  <div class="column">
7
15
  <%= form.field_control_select(:type_id, current_user.account.support.catalogs.items_for("Ticket Types").pluck(:name, :id)) %>
8
16
  </div>
@@ -14,14 +22,13 @@
14
22
  </div>
15
23
  </div>
16
24
 
17
- <div class="columns">
18
- <div class="column">
19
- <%= form.field_control_select(:owner_id, current_user.account.users.pluck(:first_name, :id)) %>
20
- </div>
21
- </div>
25
+ <%= form.field_control_select(:owner_id, current_user.account.users.pluck(:first_name, :id)) %>
22
26
 
23
27
  <%= form.field_control_textarea(:description, label:false) %>
28
+
24
29
  <hr/>
30
+
25
31
  <%= form.field_control_submit %>
32
+
26
33
  <% end %>
27
34
  <% end %>
@@ -1,6 +1,6 @@
1
1
  <%= render(LesliView::Layout::Container.new("support-tickets-#{@ticket.id}")) do %>
2
2
 
3
- <%= render(LesliView::Components::Header.new("#{@ticket.uid} - #{@ticket.subject}")) %>
3
+ <%= render(LesliView::Components::Header.new("#{@ticket.subject}")) %>
4
4
 
5
5
  <%= render LesliView::Components::Tabs.new(active_tab: "ticket-information") do |tabs| %>
6
6
 
@@ -0,0 +1,44 @@
1
+
2
+ # Brakeman Configuration File
3
+ # Documentation: https://brakemanscanner.org/docs/options/
4
+
5
+ # Files and Directories to Skip
6
+ skip_files:
7
+
8
+ # Warnings to Ignore (List Warning Codes)
9
+ ignore_warnings:
10
+ # - "SQLi" # Example: Ignore false-positive SQL injection warnings
11
+ # - "WeakHash" # Ignore warnings about weak hashing if you're using MD5 intentionally
12
+
13
+ # Additional Checks
14
+ checks_to_run:
15
+ - "DefaultRoutes"
16
+ - "MassAssignment"
17
+ - "CrossSiteScripting"
18
+ - "SQLInjection"
19
+ - "FileAccess"
20
+ - "UnmaintainedDependency"
21
+
22
+ # Confidence Levels to Report
23
+ min_confidence: 2 # 0 (all warnings), 1 (medium), 2 (high)
24
+
25
+ # Output Format
26
+ output_formats:
27
+ - "html"
28
+ - "json"
29
+ - "plain"
30
+
31
+ # Output Files
32
+ output_files:
33
+ - "brakeman/brakeman_report.html"
34
+ - "brakeman/brakeman_report.json"
35
+
36
+ # Optional Settings
37
+ run_all_checks: true # Run all checks even if specific ones are set
38
+ report_routes: true # Include unused routes in the report
39
+ exit_on_warn: true # Exit with a non-zero code if warnings are found
40
+
41
+ # Skipping Specific Models or Files (Advanced)
42
+ skip_files_containing:
43
+ - "DO NOT SCAN" # Add comment markers in files you want skipped
44
+ - "IGNORE ME"
@@ -52,8 +52,6 @@ class CreateLesliSupportTickets < ActiveRecord::Migration[6.0]
52
52
  t.timestamps
53
53
  end
54
54
 
55
- add_index(:lesli_support_tickets, :uid, unique: true)
56
-
57
55
  add_reference(:lesli_support_tickets, :sla, foreign_key: { to_table: :lesli_support_slas })
58
56
  add_reference(:lesli_support_tickets, :type, foreign_key: { to_table: :lesli_support_catalog_items })
59
57
  #add_reference(:lesli_support_tickets, :status, foreign_key: { to_table: :lesli_support_workflow_statuses })
@@ -64,5 +62,7 @@ class CreateLesliSupportTickets < ActiveRecord::Migration[6.0]
64
62
  add_reference(:lesli_support_tickets, :user, foreign_key: { to_table: :lesli_users })
65
63
  add_reference(:lesli_support_tickets, :owner, foreign_key: { to_table: :lesli_users })
66
64
  add_reference(:lesli_support_tickets, :account, foreign_key: { to_table: :lesli_support_accounts })
65
+
66
+ add_index(:lesli_support_tickets, [:account_id, :uid], unique: true)
67
67
  end
68
68
  end
data/db/seeds.rb CHANGED
@@ -30,7 +30,7 @@ Building a better future, one line of code at a time.
30
30
  // ·
31
31
  =end
32
32
 
33
- L2.msg("LesliSupport", "Version: #{LesliSupport::VERSION}", "Build: #{LesliSupport::BUILD}")
33
+ Termline.msg("LesliSupport", "Version: #{LesliSupport::VERSION}", "Build: #{LesliSupport::BUILD}")
34
34
 
35
35
  # · load specific environment seeds
36
36
  if Rails.env.development? || Lesli.config.demo
@@ -1,4 +1,4 @@
1
1
  module LesliSupport
2
- VERSION = "1.1.0"
3
- BUILD = "1774678451"
2
+ VERSION = "1.2.0"
3
+ BUILD = "1777174912"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lesli_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Lesli Development Team
@@ -23,7 +23,9 @@ dependencies:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
25
  version: 5.1.0
26
- description: Ticket Management System for the Lesli Framework
26
+ description: "Provides a support ticket management solution for The Lesli Framework,
27
+ \nincluding ticket creation, assignment workflows, status tracking, \nteam collaboration,
28
+ and support request organization.\n"
27
29
  email:
28
30
  - hello@lesli.tech
29
31
  executables: []
@@ -40,8 +42,8 @@ files:
40
42
  - app/controllers/lesli_support/catalog/items_controller.rb
41
43
  - app/controllers/lesli_support/catalogs_controller.rb
42
44
  - app/controllers/lesli_support/dashboards_controller.rb
43
- - app/controllers/lesli_support/item/discussions_controller.rb
44
- - app/controllers/lesli_support/item/tasks_controller.rb
45
+ - app/controllers/lesli_support/items/discussions_controller.rb
46
+ - app/controllers/lesli_support/items/tasks_controller.rb
45
47
  - app/controllers/lesli_support/ticket/activities_controller.rb
46
48
  - app/controllers/lesli_support/ticket/discussions_controller.rb
47
49
  - app/controllers/lesli_support/tickets_controller.rb
@@ -59,9 +61,9 @@ files:
59
61
  - app/models/lesli_support/catalog.rb
60
62
  - app/models/lesli_support/catalog/item.rb
61
63
  - app/models/lesli_support/dashboard.rb
62
- - app/models/lesli_support/item/activity.rb
63
- - app/models/lesli_support/item/discussion.rb
64
- - app/models/lesli_support/item/task.rb
64
+ - app/models/lesli_support/items/activity.rb
65
+ - app/models/lesli_support/items/discussion.rb
66
+ - app/models/lesli_support/items/task.rb
65
67
  - app/models/lesli_support/ticket.rb
66
68
  - app/models/lesli_support/ticket/activity.rb
67
69
  - app/models/lesli_support/ticket/discussion.rb
@@ -94,6 +96,7 @@ files:
94
96
  - app/views/lesli_support/tickets/index.html.erb
95
97
  - app/views/lesli_support/tickets/new.html.erb
96
98
  - app/views/lesli_support/tickets/show.html.erb
99
+ - config/brakeman.yml
97
100
  - config/locales/translations.en.yml
98
101
  - config/locales/translations.es.yml
99
102
  - config/locales/translations.fr.yml
@@ -124,8 +127,6 @@ files:
124
127
  - db/tables/0702040110_create_cloud_help_custom_validations.rb
125
128
  - db/tables/0702040210_create_cloud_help_custom_validation_rules.rb
126
129
  - db/tables/0702040310_create_cloud_help_custom_validation_fields.rb
127
- - db/tables/0702100310_create_cloud_help_ticket_actions.rb
128
- - db/tables/0702100410_create_cloud_help_ticket_activities.rb
129
130
  - db/tables/0702100610_create_cloud_help_ticket_files.rb
130
131
  - db/tables/0702100710_create_cloud_help_ticket_subscribers.rb
131
132
  - db/tables/0702101010_create_cloud_help_ticket_timelines.rb
@@ -165,5 +166,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
166
  requirements: []
166
167
  rubygems_version: 3.7.1
167
168
  specification_version: 4
168
- summary: Ticket Management System for the Lesli Framework
169
+ summary: Support ticket management for the Lesli Framework.
169
170
  test_files: []
@@ -1,6 +0,0 @@
1
- module LesliSupport
2
- module Item
3
- class DiscussionsController < Lesli::Item::DiscussionsController
4
- end
5
- end
6
- end
@@ -1,6 +0,0 @@
1
- module LesliSupport
2
- module Item
3
- class TasksController < Lesli::Item::TasksController
4
- end
5
- end
6
- end
@@ -1,4 +0,0 @@
1
- module LesliSupport
2
- class Item::Activity < Lesli::Item::Activity
3
- end
4
- end
@@ -1,6 +0,0 @@
1
- module LesliSupport
2
- module Item
3
- class Discussion < Lesli::Item::Discussion
4
- end
5
- end
6
- end
@@ -1,6 +0,0 @@
1
- module LesliSupport
2
- module Item
3
- class Task < Lesli::Item::Task
4
- end
5
- end
6
- end
@@ -1,16 +0,0 @@
1
- class CreateCloudHelpTicketActions < ActiveRecord::Migration[6.0]
2
- def change
3
- table_base_structure = JSON.parse(File.read(Rails.root.join("db","structure","00000003_actions.json")))
4
- create_table :cloud_help_ticket_actions do |t|
5
- table_base_structure.each do |column|
6
- t.send(
7
- column["type"].parameterize.underscore.to_sym,
8
- column["name"].parameterize.underscore.to_sym
9
- )
10
- end
11
- t.timestamps
12
- end
13
- add_reference :cloud_help_ticket_actions, :users, foreign_key: true
14
- add_reference :cloud_help_ticket_actions, :cloud_help_tickets, foreign_key: true, index: { name: "help_ticket_actions_tickets" }
15
- end
16
- end
@@ -1,15 +0,0 @@
1
- class CreateCloudHelpTicketActivities < ActiveRecord::Migration[6.0]
2
- def change
3
- table_base_structure = JSON.parse(File.read(Rails.root.join("db","structure","00000004_activities.json")))
4
- create_table :cloud_help_ticket_activities do |t|
5
- table_base_structure.each do |column|
6
- t.send(
7
- column["type"].parameterize.underscore.to_sym,
8
- column["name"].parameterize.underscore.to_sym
9
- )
10
- end
11
- t.timestamps
12
- end
13
- add_reference :cloud_help_ticket_activities, :cloud_help_tickets, foreign_key: true
14
- end
15
- end