hephaestus 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +13 -0
- data/LICENSE.txt +9 -0
- data/README.md +19 -0
- data/bin/hephaestus +55 -0
- data/lib/hephaestus/actions/strip_comments_action.rb +263 -0
- data/lib/hephaestus/actions.rb +116 -0
- data/lib/hephaestus/app_builder.rb +168 -0
- data/lib/hephaestus/exit_on_failure.rb +22 -0
- data/lib/hephaestus/generators/app_generator.rb +158 -0
- data/lib/hephaestus/generators/base.rb +65 -0
- data/lib/hephaestus/generators/config_generator.rb +102 -0
- data/lib/hephaestus/generators/core_generator.rb +50 -0
- data/lib/hephaestus/generators/deployment_generator.rb +18 -0
- data/lib/hephaestus/generators/lib_generator.rb +16 -0
- data/lib/hephaestus/generators/license_generator.rb +16 -0
- data/lib/hephaestus/generators/rubocop_generator.rb +18 -0
- data/lib/hephaestus/generators/sorbet_generator.rb +16 -0
- data/lib/hephaestus/version.rb +11 -0
- data/lib/hephaestus.rb +21 -0
- data/templates/Gemfile.erb +121 -0
- data/templates/Procfile.debug +2 -0
- data/templates/Procfile.dev +2 -0
- data/templates/README.md.erb +1 -0
- data/templates/app/controllers/application_controller.rb +107 -0
- data/templates/app/controllers/concerns/authable.rb +32 -0
- data/templates/app/controllers/root_controller.rb +11 -0
- data/templates/app/controllers/settings_controller.rb +7 -0
- data/templates/app/controllers/staff_controller.rb +15 -0
- data/templates/app/controllers/yetto_controller.rb +30 -0
- data/templates/app/jobs/application_job.rb +10 -0
- data/templates/app/jobs/update_yetto_job.rb +27 -0
- data/templates/app/lib/body_parameter/yetto_parameters.rb +8 -0
- data/templates/app/lib/body_parameter.rb +6 -0
- data/templates/app/lib/constants/app.rb +8 -0
- data/templates/app/lib/headers/yetto.rb +17 -0
- data/templates/app/lib/headers.rb +5 -0
- data/templates/app/lib/path_parameter/yetto_parameters.rb +25 -0
- data/templates/app/lib/path_parameter.rb +8 -0
- data/templates/app/lib/plug_app/http.rb +34 -0
- data/templates/app/lib/plug_app/middleware/malformed_request.rb +110 -0
- data/templates/app/lib/plug_app/middleware/not_found.rb +41 -0
- data/templates/app/lib/plug_app/middleware/openapi_validation.rb +54 -0
- data/templates/app/lib/plug_app/middleware/tracing_attributes.rb +42 -0
- data/templates/app/lib/query_parameter.rb +6 -0
- data/templates/app/serializers/error_serializer.rb +16 -0
- data/templates/app/services/yetto_service.rb +61 -0
- data/templates/app/views/settings/index.json.jbuilder +15 -0
- data/templates/config/initializers/cors.rb +18 -0
- data/templates/config/initializers/environment.rb +30 -0
- data/templates/config/initializers/filter_parameter_logging.rb +22 -0
- data/templates/config/initializers/inflections.rb +20 -0
- data/templates/config/initializers/lograge.rb +25 -0
- data/templates/config/initializers/open_telemetry.rb +27 -0
- data/templates/config/initializers/sidekiq.rb +11 -0
- data/templates/config/initializers/slack_webhook_logger.rb +17 -0
- data/templates/config/sidekiq.yml +18 -0
- data/templates/hephaestus_gitignore +296 -0
- data/templates/lib/plug_app/schemas/api/2023-03-06/components/parameters/headers/yetto.json +42 -0
- data/templates/lib/plug_app/schemas/api/2023-03-06/components/parameters/plugInstallation.json +12 -0
- data/templates/lib/plug_app/schemas/api/2023-03-06/components/schemas/plug.json +9 -0
- data/templates/lib/plug_app/schemas/api/2023-03-06/components/schemas/responses.json +64 -0
- data/templates/lib/plug_app/schemas/api/2023-03-06/components/schemas/yetto.json +1 -0
- data/templates/lib/plug_app/schemas/api/2023-03-06/openapi.json +27 -0
- data/templates/lib/plug_app/schemas/api/2023-03-06/paths/plug.json +91 -0
- data/templates/lib/plug_app/schemas/api/2023-03-06/paths/yetto/after_create_message.json +41 -0
- data/templates/lib/plug_app/schemas/api/2023-03-06/paths/yetto/after_create_plug_installation.json +41 -0
- data/templates/lib/tasks/test_tasks.rake +10 -0
- data/templates/script/ci +7 -0
- data/templates/script/hmac_text +22 -0
- data/templates/script/licenses +51 -0
- data/templates/script/ngrok +5 -0
- data/templates/script/security_checks/brakeman +5 -0
- data/templates/script/security_checks/bundle-audit +5 -0
- data/templates/script/server +5 -0
- data/templates/script/server-debug +5 -0
- data/templates/script/test +5 -0
- data/templates/script/typecheck +42 -0
- data/templates/sorbet/custom.rbi +14 -0
- data/templates/test/controllers/root_controller_test.rb +12 -0
- data/templates/test/controllers/settings_controller_test.rb +27 -0
- data/templates/test/controllers/yetto_controller_test.rb +130 -0
- data/templates/test/jobs/update_yetto_job_test.rb +41 -0
- data/templates/test/support/api.rb +74 -0
- data/templates/test/support/rails.rb +39 -0
- data/templates/test/support/webmocks/slack_webmock.rb +24 -0
- data/templates/test/support/webmocks/yetto.rb +94 -0
- data/templates/test/support/webmocks.rb +5 -0
- data/templates/test/test_helper.rb +24 -0
- metadata +209 -0
@@ -0,0 +1,61 @@
|
|
1
|
+
# typed: false
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
class YettoService
|
5
|
+
cattr_reader :yetto_client, instance_accessor: false do
|
6
|
+
HTTPX.plugin(:persistent).with_headers({
|
7
|
+
"Content-Type" => "application/json",
|
8
|
+
"Accept" => "application/json",
|
9
|
+
"User-Agent" => "PlugApp/#{PlugApp::Application::GIT_SHA}",
|
10
|
+
})
|
11
|
+
end
|
12
|
+
|
13
|
+
PROTOCOL = Rails.env.development? ? "http" : "https"
|
14
|
+
YETTO_API_VERSION_TLD = "#{PROTOCOL}://#{YETTO_API_TLD}/#{YETTO_API_VERSION}"
|
15
|
+
|
16
|
+
class << self
|
17
|
+
def get_plug_installation(organization_id, inbox_id, plug_installation_id)
|
18
|
+
yetto_client.get("#{YETTO_API_VERSION_TLD}/organizations/#{organization_id}/inboxes/#{inbox_id}/plug_installations/#{plug_installation_id}")
|
19
|
+
end
|
20
|
+
|
21
|
+
def update_installation(organization_id, inbox_id, plug_installation_id, params)
|
22
|
+
plug_installation = {}
|
23
|
+
plug_installation[:settings] = params[:plug_installation].fetch(:settings, {})
|
24
|
+
plug_installation[:credentials] = params[:plug_installation].fetch(:credentials, {})
|
25
|
+
body = {
|
26
|
+
plug_installation: plug_installation,
|
27
|
+
}
|
28
|
+
|
29
|
+
yetto_client.patch("#{YETTO_API_VERSION_TLD}/organizations/#{organization_id}/inboxes/#{inbox_id}/plug_installations/#{plug_installation_id}", json: body)
|
30
|
+
end
|
31
|
+
|
32
|
+
def create_switch(organization_id, inbox_id, plug_id, params)
|
33
|
+
inbox_id = params.fetch(:inbox).fetch(:id)
|
34
|
+
creator_id = params.fetch(:plug).fetch(:id)
|
35
|
+
payload = {
|
36
|
+
name: "After install",
|
37
|
+
creator: { id: creator_id },
|
38
|
+
}
|
39
|
+
yetto_client.post("#{YETTO_API_VERSION_TLD}/organizations/#{organization_id}/inboxes/#{inbox_id}/switches", json: payload)
|
40
|
+
end
|
41
|
+
|
42
|
+
def create_message(organization_id, inbox_id, params)
|
43
|
+
payload = params[:payload]
|
44
|
+
yetto_client.post("#{YETTO_API_VERSION_TLD}/organizations/#{organization_id}/inboxes/#{inbox_id}/messages", json: payload)
|
45
|
+
end
|
46
|
+
|
47
|
+
def parse_body(response)
|
48
|
+
JSON.parse(response.body.read)
|
49
|
+
end
|
50
|
+
|
51
|
+
def unavailable?(response)
|
52
|
+
return true unless (200..299).cover?(response.status)
|
53
|
+
|
54
|
+
response.body.blank? || response.body == "{}"
|
55
|
+
end
|
56
|
+
|
57
|
+
def available?(response)
|
58
|
+
!unavailable?(response)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# typed: false
|
2
|
+
# frozen_string_literal: true
|
3
|
+
# Be sure to restart your server when you modify this file.
|
4
|
+
|
5
|
+
# Avoid CORS issues when API is called from the frontend app.
|
6
|
+
# Handle Cross-Origin Resource Sharing (CORS) in order to accept cross-origin AJAX requests.
|
7
|
+
|
8
|
+
# Read more: https://github.com/cyu/rack-cors
|
9
|
+
|
10
|
+
# Rails.application.config.middleware.insert_before 0, Rack::Cors do
|
11
|
+
# allow do
|
12
|
+
# origins "example.com"
|
13
|
+
#
|
14
|
+
# resource "*",
|
15
|
+
# headers: :any,
|
16
|
+
# methods: [:get, :post, :put, :patch, :delete, :options, :head]
|
17
|
+
# end
|
18
|
+
# end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# typed: false
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
PLUG_APP_URL = ENV.fetch("PLUG_APP_URL", "yetto.email")
|
5
|
+
|
6
|
+
YETTO_URL = if Rails.env.production?
|
7
|
+
"yetto.app"
|
8
|
+
elsif Rails.env.staging?
|
9
|
+
"yetto-staging.onrender.com"
|
10
|
+
elsif Rails.env.development?
|
11
|
+
"localhost:3000"
|
12
|
+
elsif Rails.env.test?
|
13
|
+
"test.yetto.app"
|
14
|
+
end
|
15
|
+
|
16
|
+
YETTO_API_TLD = ENV.fetch("YETTO_API_TLD", "#{YETTO_URL}/api")
|
17
|
+
YETTO_API_VERSION = ENV.fetch("YETTO_API_VERSION", "v1")
|
18
|
+
|
19
|
+
SLACK_LOG_URL = ENV.fetch("SLACK_LOG_URL", nil)
|
20
|
+
|
21
|
+
YETTO_PLUG_APP_TOKEN = ENV.fetch("YETTO_PLUG_APP_TOKEN", "super-secret")
|
22
|
+
|
23
|
+
# For Honeycomb.io
|
24
|
+
OTEL_EXPORTER_OTLP_ENDPOINT = ENV.fetch("OTEL_EXPORTER_OTLP_ENDPOINT", "https://api.honeycomb.io")
|
25
|
+
OTEL_EXPORTER_OTLP_HEADERS = ENV.fetch("OTEL_EXPORTER_OTLP_HEADERS", "x-honeycomb-team=your-api-key")
|
26
|
+
OTEL_SERVICE_NAME = ENV.fetch("OTEL_SERVICE_NAME", "your-service-name")
|
27
|
+
|
28
|
+
def productionish?
|
29
|
+
Rails.env.production? || Rails.env.staging?
|
30
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# typed: false
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
# Be sure to restart your server when you modify this file.
|
5
|
+
|
6
|
+
# Configure parameters to be filtered from the log file. Use this to limit dissemination of
|
7
|
+
# sensitive information. See the ActiveSupport::ParameterFilter documentation for supported
|
8
|
+
# notations and behaviors.
|
9
|
+
Rails.application.config.filter_parameters += [
|
10
|
+
:passw,
|
11
|
+
:secret,
|
12
|
+
:token,
|
13
|
+
:_key,
|
14
|
+
:crypt,
|
15
|
+
:salt,
|
16
|
+
:certificate,
|
17
|
+
:otp,
|
18
|
+
:ssn,
|
19
|
+
:credentials,
|
20
|
+
:html_content,
|
21
|
+
:text_content,
|
22
|
+
]
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# typed: false
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
# Be sure to restart your server when you modify this file.
|
5
|
+
|
6
|
+
# Add new inflection rules using the following format. Inflections
|
7
|
+
# are locale specific, and you may define rules for as many different
|
8
|
+
# locales as you wish. All of these examples are active by default:
|
9
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
10
|
+
# inflect.plural /^(ox)$/i, "\\1en"
|
11
|
+
# inflect.singular /^(ox)en/i, "\\1"
|
12
|
+
# inflect.irregular "person", "people"
|
13
|
+
# inflect.uncountable %w( fish sheep )
|
14
|
+
# end
|
15
|
+
|
16
|
+
# These inflection rules are supported but not enabled by default:
|
17
|
+
ActiveSupport::Inflector.inflections(:en) do |inflect|
|
18
|
+
inflect.acronym("API")
|
19
|
+
inflect.acronym("HTTP")
|
20
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# typed: false
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
Rails.application.configure do
|
5
|
+
config.lograge.enabled = true
|
6
|
+
config.lograge.custom_options = lambda do |event|
|
7
|
+
span = OpenTelemetry::Trace.current_span
|
8
|
+
{
|
9
|
+
time: event.time,
|
10
|
+
trace_id: span.context.hex_trace_id,
|
11
|
+
span_id: span.context.hex_span_id,
|
12
|
+
}
|
13
|
+
end
|
14
|
+
|
15
|
+
config.lograge.custom_payload do |controller|
|
16
|
+
payload = {
|
17
|
+
host: controller.request.host,
|
18
|
+
}
|
19
|
+
|
20
|
+
payload
|
21
|
+
end
|
22
|
+
|
23
|
+
config.lograge.keep_original_rails_log = true
|
24
|
+
config.lograge.logger = ActiveSupport::Logger.new(Rails.root.join("log", "lograge_#{Rails.env}.log"))
|
25
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# typed: false
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "opentelemetry/sdk"
|
5
|
+
require "opentelemetry/semantic_conventions"
|
6
|
+
|
7
|
+
if Rails.env.staging? || Rails.env.production?
|
8
|
+
OpenTelemetry::SDK.configure do |c|
|
9
|
+
c.logger = Rails.logger
|
10
|
+
|
11
|
+
c.use_all
|
12
|
+
|
13
|
+
if productionish?
|
14
|
+
c.add_span_processor(
|
15
|
+
OpenTelemetry::SDK::Trace::Export::BatchSpanProcessor.new(
|
16
|
+
OpenTelemetry::Exporter::OTLP::Exporter.new,
|
17
|
+
),
|
18
|
+
)
|
19
|
+
else
|
20
|
+
c.add_span_processor(
|
21
|
+
OpenTelemetry::SDK::Trace::Export::SimpleSpanProcessornew(
|
22
|
+
OpenTelemetry::SDK::Trace::Export::SpanExporter.new,
|
23
|
+
),
|
24
|
+
)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# typed: false
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
Sidekiq.configure_server do |config|
|
5
|
+
config.logger = Sidekiq::Logger.new($stdout)
|
6
|
+
config.redis = { url: ENV.fetch("REDIS_URL", "redis://localhost:6379/1") }
|
7
|
+
end
|
8
|
+
Sidekiq.configure_client do |config|
|
9
|
+
config.logger = Sidekiq::Logger.new($stdout)
|
10
|
+
config.redis = { url: ENV.fetch("REDIS_URL", "redis://localhost:6379/1") }
|
11
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# typed: false
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
SlackWebhookLogger.setup do |config|
|
5
|
+
# Webhook URL
|
6
|
+
#
|
7
|
+
# The URL where messages will be sent.
|
8
|
+
config.webhook_url = SLACK_LOG_URL
|
9
|
+
|
10
|
+
# The minimum error level to see in Slack.
|
11
|
+
#
|
12
|
+
# All log levels are supported, but don't do anything less then :warn since Slack only allows one message
|
13
|
+
# per minute.
|
14
|
+
config.level = :WARN
|
15
|
+
|
16
|
+
config.ignore_patterns = [/Can't verify CSRF token authenticity/, /is not a valid MIME type/]
|
17
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Sample configuration file for Sidekiq.
|
2
|
+
# Options here can still be overridden by cmd line args.
|
3
|
+
# Place this file at config/sidekiq.yml and Sidekiq will
|
4
|
+
# pick it up automatically.
|
5
|
+
---
|
6
|
+
:verbose: false
|
7
|
+
:logfile: ./log/sidekiq.log
|
8
|
+
:concurrency: <%= ENV.fetch("SIDEKIQ_CONCURRENCY", 10) %>
|
9
|
+
:timeout: 25
|
10
|
+
:max_retries: 3
|
11
|
+
|
12
|
+
# https://phil.tech/2016/tips-on-sidekiq-queues/
|
13
|
+
:queues:
|
14
|
+
- [default, 5]
|
15
|
+
- [mailers, 3]
|
16
|
+
|
17
|
+
- [active_storage_analysis, 1]
|
18
|
+
- [active_storage_purge, 1]
|
@@ -0,0 +1,296 @@
|
|
1
|
+
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
|
2
|
+
#
|
3
|
+
# If you find yourself ignoring temporary files generated by your text editor
|
4
|
+
# or operating system, you probably want to add a global ignore instead:
|
5
|
+
# git config --global core.excludesfile '~/.gitignore_global'
|
6
|
+
|
7
|
+
# Ignore keys for decrypting credentials and more.
|
8
|
+
/config/master.key
|
9
|
+
/config/credentials/development.key
|
10
|
+
/config/credentials/staging.key
|
11
|
+
/config/credentials/production.key
|
12
|
+
/config/credentials/test.key
|
13
|
+
|
14
|
+
/app/assets/builds/*
|
15
|
+
!/app/assets/builds/.keep
|
16
|
+
|
17
|
+
# Created by https://www.toptal.com/developers/gitignore/api/macos,windows,linux,rails,dotenv,database,visualstudiocode,rubymine+all,nodejs
|
18
|
+
# Edit at https://www.toptal.com/developers/gitignore?templates=macos,windows,linux,rails,dotenv,database,visualstudiocode,rubymine+all,nodejs
|
19
|
+
|
20
|
+
### Database ###
|
21
|
+
*.accdb
|
22
|
+
*.db
|
23
|
+
*.dbf
|
24
|
+
*.mdb
|
25
|
+
*.pdb
|
26
|
+
*.sqlite3
|
27
|
+
|
28
|
+
### dotenv ###
|
29
|
+
.env
|
30
|
+
|
31
|
+
### Linux ###
|
32
|
+
*~
|
33
|
+
|
34
|
+
# temporary files which can be created if a process still has a handle open of a deleted file
|
35
|
+
.fuse_hidden*
|
36
|
+
|
37
|
+
# KDE directory preferences
|
38
|
+
.directory
|
39
|
+
|
40
|
+
# Linux trash folder which might appear on any partition or disk
|
41
|
+
.Trash-*
|
42
|
+
|
43
|
+
# .nfs files are created when an open file is removed but is still being accessed
|
44
|
+
.nfs*
|
45
|
+
|
46
|
+
### macOS ###
|
47
|
+
# General
|
48
|
+
.DS_Store
|
49
|
+
.AppleDouble
|
50
|
+
.LSOverride
|
51
|
+
|
52
|
+
# Icon must end with two \r
|
53
|
+
Icon
|
54
|
+
|
55
|
+
|
56
|
+
# Thumbnails
|
57
|
+
._*
|
58
|
+
|
59
|
+
# Files that might appear in the root of a volume
|
60
|
+
.DocumentRevisions-V100
|
61
|
+
.fseventsd
|
62
|
+
.Spotlight-V100
|
63
|
+
.TemporaryItems
|
64
|
+
.Trashes
|
65
|
+
.VolumeIcon.icns
|
66
|
+
.com.apple.timemachine.donotpresent
|
67
|
+
|
68
|
+
# Directories potentially created on remote AFP share
|
69
|
+
.AppleDB
|
70
|
+
.AppleDesktop
|
71
|
+
Network Trash Folder
|
72
|
+
Temporary Items
|
73
|
+
.apdisk
|
74
|
+
|
75
|
+
### macOS Patch ###
|
76
|
+
# iCloud generated files
|
77
|
+
*.icloud
|
78
|
+
|
79
|
+
#!! ERROR: nodejs is undefined. Use list command to see defined gitignore types !!#
|
80
|
+
|
81
|
+
### Rails ###
|
82
|
+
*.rbc
|
83
|
+
capybara-*.html
|
84
|
+
.rspec
|
85
|
+
/db/*.sqlite3
|
86
|
+
/db/*.sqlite3-journal
|
87
|
+
/db/*.sqlite3-[0-9]*
|
88
|
+
/public/system
|
89
|
+
/coverage/
|
90
|
+
/spec/tmp
|
91
|
+
*.orig
|
92
|
+
rerun.txt
|
93
|
+
pickle-email-*.html
|
94
|
+
|
95
|
+
# Ignore all logfiles and tempfiles.
|
96
|
+
/log/*
|
97
|
+
/tmp/*
|
98
|
+
!/log/.keep
|
99
|
+
!/tmp/.keep
|
100
|
+
|
101
|
+
# Comment out this rule if you are OK with secrets being uploaded to the repo
|
102
|
+
config/initializers/secret_token.rb
|
103
|
+
config/master.key
|
104
|
+
|
105
|
+
# Only include if you have production secrets in this file, which is no longer a Rails default
|
106
|
+
# config/secrets.yml
|
107
|
+
|
108
|
+
# dotenv, dotenv-rails
|
109
|
+
# Comment out these rules if environment variables can be committed
|
110
|
+
.env*.local
|
111
|
+
|
112
|
+
## Environment normalization:
|
113
|
+
/.bundle
|
114
|
+
/vendor/bundle
|
115
|
+
|
116
|
+
# these should all be checked in to normalize the environment:
|
117
|
+
# Gemfile.lock, .ruby-version, .ruby-gemset
|
118
|
+
|
119
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
120
|
+
.rvmrc
|
121
|
+
|
122
|
+
# if using bower-rails ignore default bower_components path bower.json files
|
123
|
+
/vendor/assets/bower_components
|
124
|
+
*.bowerrc
|
125
|
+
bower.json
|
126
|
+
|
127
|
+
# Ignore pow environment settings
|
128
|
+
.powenv
|
129
|
+
|
130
|
+
# Ignore Byebug command history file.
|
131
|
+
.byebug_history
|
132
|
+
|
133
|
+
# Ignore node_modules
|
134
|
+
node_modules/
|
135
|
+
|
136
|
+
# Ignore precompiled javascript packs
|
137
|
+
/public/packs
|
138
|
+
/public/packs-test
|
139
|
+
/public/assets
|
140
|
+
|
141
|
+
# Ignore yarn files
|
142
|
+
/yarn-error.log
|
143
|
+
yarn-debug.log*
|
144
|
+
.yarn-integrity
|
145
|
+
|
146
|
+
# Ignore uploaded files in development
|
147
|
+
/storage/*
|
148
|
+
!/storage/.keep
|
149
|
+
/public/uploads
|
150
|
+
|
151
|
+
### RubyMine+all ###
|
152
|
+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
153
|
+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
154
|
+
|
155
|
+
# User-specific stuff
|
156
|
+
.idea/**/workspace.xml
|
157
|
+
.idea/**/tasks.xml
|
158
|
+
.idea/**/usage.statistics.xml
|
159
|
+
.idea/**/dictionaries
|
160
|
+
.idea/**/shelf
|
161
|
+
|
162
|
+
# AWS User-specific
|
163
|
+
.idea/**/aws.xml
|
164
|
+
|
165
|
+
# Generated files
|
166
|
+
.idea/**/contentModel.xml
|
167
|
+
|
168
|
+
# Sensitive or high-churn files
|
169
|
+
.idea/**/dataSources/
|
170
|
+
.idea/**/dataSources.ids
|
171
|
+
.idea/**/dataSources.local.xml
|
172
|
+
.idea/**/sqlDataSources.xml
|
173
|
+
.idea/**/dynamic.xml
|
174
|
+
.idea/**/uiDesigner.xml
|
175
|
+
.idea/**/dbnavigator.xml
|
176
|
+
|
177
|
+
# Gradle
|
178
|
+
.idea/**/gradle.xml
|
179
|
+
.idea/**/libraries
|
180
|
+
|
181
|
+
# Gradle and Maven with auto-import
|
182
|
+
# When using Gradle or Maven with auto-import, you should exclude module files,
|
183
|
+
# since they will be recreated, and may cause churn. Uncomment if using
|
184
|
+
# auto-import.
|
185
|
+
# .idea/artifacts
|
186
|
+
# .idea/compiler.xml
|
187
|
+
# .idea/jarRepositories.xml
|
188
|
+
# .idea/modules.xml
|
189
|
+
# .idea/*.iml
|
190
|
+
# .idea/modules
|
191
|
+
# *.iml
|
192
|
+
# *.ipr
|
193
|
+
|
194
|
+
# CMake
|
195
|
+
cmake-build-*/
|
196
|
+
|
197
|
+
# Mongo Explorer plugin
|
198
|
+
.idea/**/mongoSettings.xml
|
199
|
+
|
200
|
+
# File-based project format
|
201
|
+
*.iws
|
202
|
+
|
203
|
+
# IntelliJ
|
204
|
+
out/
|
205
|
+
|
206
|
+
# mpeltonen/sbt-idea plugin
|
207
|
+
.idea_modules/
|
208
|
+
|
209
|
+
# JIRA plugin
|
210
|
+
atlassian-ide-plugin.xml
|
211
|
+
|
212
|
+
# Cursive Clojure plugin
|
213
|
+
.idea/replstate.xml
|
214
|
+
|
215
|
+
# SonarLint plugin
|
216
|
+
.idea/sonarlint/
|
217
|
+
|
218
|
+
# Crashlytics plugin (for Android Studio and IntelliJ)
|
219
|
+
com_crashlytics_export_strings.xml
|
220
|
+
crashlytics.properties
|
221
|
+
crashlytics-build.properties
|
222
|
+
fabric.properties
|
223
|
+
|
224
|
+
# Editor-based Rest Client
|
225
|
+
.idea/httpRequests
|
226
|
+
|
227
|
+
# Android studio 3.1+ serialized cache file
|
228
|
+
.idea/caches/build_file_checksums.ser
|
229
|
+
|
230
|
+
### RubyMine+all Patch ###
|
231
|
+
# Ignore everything but code style settings and run configurations
|
232
|
+
# that are supposed to be shared within teams.
|
233
|
+
|
234
|
+
.idea/*
|
235
|
+
|
236
|
+
!.idea/codeStyles
|
237
|
+
!.idea/runConfigurations
|
238
|
+
|
239
|
+
### VisualStudioCode ###
|
240
|
+
.vscode/*
|
241
|
+
!.vscode/settings.json
|
242
|
+
!.vscode/tasks.json
|
243
|
+
!.vscode/launch.json
|
244
|
+
!.vscode/extensions.json
|
245
|
+
!.vscode/*.code-snippets
|
246
|
+
|
247
|
+
# Local History for Visual Studio Code
|
248
|
+
.history/
|
249
|
+
|
250
|
+
# Built Visual Studio Code Extensions
|
251
|
+
*.vsix
|
252
|
+
|
253
|
+
### VisualStudioCode Patch ###
|
254
|
+
# Ignore all local history of files
|
255
|
+
.history
|
256
|
+
.ionide
|
257
|
+
|
258
|
+
# Support for Project snippet scope
|
259
|
+
.vscode/*.code-snippets
|
260
|
+
|
261
|
+
# Ignore code-workspaces
|
262
|
+
*.code-workspace
|
263
|
+
|
264
|
+
### Windows ###
|
265
|
+
# Windows thumbnail cache files
|
266
|
+
Thumbs.db
|
267
|
+
Thumbs.db:encryptable
|
268
|
+
ehthumbs.db
|
269
|
+
ehthumbs_vista.db
|
270
|
+
|
271
|
+
# Dump file
|
272
|
+
*.stackdump
|
273
|
+
|
274
|
+
# Folder config file
|
275
|
+
[Dd]esktop.ini
|
276
|
+
|
277
|
+
# Recycle Bin used on file shares
|
278
|
+
$RECYCLE.BIN/
|
279
|
+
|
280
|
+
# Windows Installer files
|
281
|
+
*.cab
|
282
|
+
*.msi
|
283
|
+
*.msix
|
284
|
+
*.msm
|
285
|
+
*.msp
|
286
|
+
|
287
|
+
# Windows shortcuts
|
288
|
+
*.lnk
|
289
|
+
|
290
|
+
# End of https://www.toptal.com/developers/gitignore/api/macos,windows,linux,rails,dotenv,database,visualstudiocode,rubymine+all,nodejs
|
291
|
+
|
292
|
+
app/javascript/controllers/*.js
|
293
|
+
!app/javascript/controllers/application.js
|
294
|
+
!app/javascript/controllers/index.js
|
295
|
+
|
296
|
+
security_results.json
|
@@ -0,0 +1,42 @@
|
|
1
|
+
{
|
2
|
+
"Event": {
|
3
|
+
"name": "X-Yetto-Event",
|
4
|
+
"in": "header",
|
5
|
+
"description": "The event from Yetto",
|
6
|
+
"required": true,
|
7
|
+
"schema": {
|
8
|
+
"type": "string",
|
9
|
+
"pattern": "^after_{create|update|destroy}$"
|
10
|
+
}
|
11
|
+
},
|
12
|
+
"RecordType": {
|
13
|
+
"name": "X-Yetto-RecordType",
|
14
|
+
"in": "header",
|
15
|
+
"description": "The record type from Yetto",
|
16
|
+
"required": true,
|
17
|
+
"schema": {
|
18
|
+
"type": "string",
|
19
|
+
"pattern": "^[a-z_]+$"
|
20
|
+
}
|
21
|
+
},
|
22
|
+
"DeliveryID": {
|
23
|
+
"name": "X-Yetto-DeliveryID",
|
24
|
+
"in": "header",
|
25
|
+
"description": "The delivery ID from Yetto",
|
26
|
+
"required": true,
|
27
|
+
"schema": {
|
28
|
+
"type": "string",
|
29
|
+
"pattern": "^[a-z0-9-]+$"
|
30
|
+
}
|
31
|
+
},
|
32
|
+
"Signature": {
|
33
|
+
"name": "X-Yetto-Signature",
|
34
|
+
"in": "header",
|
35
|
+
"description": "The signature from Yetto",
|
36
|
+
"required": true,
|
37
|
+
"schema": {
|
38
|
+
"type": "string",
|
39
|
+
"pattern": "^sha256=[a-f0-9]{64}$"
|
40
|
+
}
|
41
|
+
}
|
42
|
+
}
|