From 3a059172eba626ed6c86116871dc0527de607fce Mon Sep 17 00:00:00 2001 From: stef Date: Sat, 10 Feb 2024 15:56:20 +0100 Subject: [PATCH] first commit --- .gitignore | 2 + Dockerfile | 17 + README.MD | 215 +++++++++++++ docker-compose.yml | 31 ++ src/autogen/.dockerignore | 37 +++ src/autogen/.gitattributes | 7 + src/autogen/.gitignore | 35 +++ src/autogen/.node-version | 1 + src/autogen/.ruby-version | 1 + src/autogen/Dockerfile | 75 +++++ src/autogen/Gemfile | 70 +++++ src/autogen/Gemfile.lock | 295 ++++++++++++++++++ src/autogen/README.md | 24 ++ src/autogen/Rakefile | 6 + src/autogen/app/assets/config/manifest.js | 3 + src/autogen/app/assets/images/.keep | 0 .../app/assets/images/installerlogo.png | Bin 0 -> 14344 bytes src/autogen/app/assets/javascript/init.js | 7 + .../app/assets/javascript/jquery-3.7.1.min.js | 2 + .../app/assets/stylesheets/_layout.scss | 0 .../app/assets/stylesheets/application.scss | 17 + src/autogen/app/assets/stylesheets/main.scss | 1 + .../app/channels/application_cable/channel.rb | 4 + .../channels/application_cable/connection.rb | 4 + .../app/controllers/application_controller.rb | 2 + src/autogen/app/controllers/concerns/.keep | 0 .../app/controllers/home_controller.rb | 4 + .../app/controllers/scripts_controller.rb | 70 +++++ src/autogen/app/helpers/application_helper.rb | 2 + src/autogen/app/helpers/home_helper.rb | 2 + src/autogen/app/helpers/scripts_helper.rb | 2 + src/autogen/app/jobs/application_job.rb | 7 + src/autogen/app/mailers/application_mailer.rb | 4 + src/autogen/app/models/concerns/.keep | 0 src/autogen/app/models/script.rb | 10 + src/autogen/app/views/home/index.html.erb | 7 + .../app/views/layouts/application.html.erb | 31 ++ src/autogen/app/views/layouts/mailer.html.erb | 13 + src/autogen/app/views/layouts/mailer.text.erb | 1 + .../app/views/partials/_left-menu.html.erb | 40 +++ .../app/views/partials/_top-menu.html.erb | 60 ++++ src/autogen/app/views/scripts/_form.html.erb | 47 +++ .../app/views/scripts/_script.html.erb | 32 ++ .../app/views/scripts/_script.json.jbuilder | 2 + src/autogen/app/views/scripts/edit.html.erb | 10 + src/autogen/app/views/scripts/index.html.erb | 14 + .../app/views/scripts/index.json.jbuilder | 1 + src/autogen/app/views/scripts/new.html.erb | 9 + src/autogen/app/views/scripts/show.html.erb | 10 + .../app/views/scripts/show.json.jbuilder | 1 + src/autogen/bin/docker-entrypoint | 3 + src/autogen/bin/rails | 4 + src/autogen/bin/rake | 4 + src/autogen/bin/setup | 28 ++ src/autogen/config.ru | 6 + src/autogen/config/application.rb | 40 +++ src/autogen/config/boot.rb | 4 + src/autogen/config/cable.yml | 10 + src/autogen/config/credentials.yml.enc | 1 + src/autogen/config/environment.rb | 5 + .../config/environments/development.rb | 67 ++++ src/autogen/config/environments/production.rb | 91 ++++++ src/autogen/config/environments/test.rb | 61 ++++ src/autogen/config/initializers/assets.rb | 12 + .../initializers/content_security_policy.rb | 25 ++ .../initializers/filter_parameter_logging.rb | 8 + .../config/initializers/inflections.rb | 16 + .../config/initializers/permissions_policy.rb | 13 + src/autogen/config/locales/en.yml | 31 ++ src/autogen/config/mongoid.yml | 185 +++++++++++ src/autogen/config/puma.rb | 35 +++ src/autogen/config/routes.rb | 12 + src/autogen/lib/assets/.keep | 0 src/autogen/lib/tasks/.keep | 0 src/autogen/log/.keep | 0 src/autogen/public/404.html | 67 ++++ src/autogen/public/422.html | 67 ++++ src/autogen/public/500.html | 66 ++++ .../public/apple-touch-icon-precomposed.png | 0 src/autogen/public/apple-touch-icon.png | 0 src/autogen/public/favicon.ico | 0 src/autogen/public/robots.txt | 1 + src/autogen/storage/.keep | 0 .../test/application_system_test_case.rb | 5 + .../application_cable/connection_test.rb | 13 + src/autogen/test/controllers/.keep | 0 .../test/controllers/home_controller_test.rb | 8 + .../controllers/scripts_controller_test.rb | 48 +++ src/autogen/test/fixtures/files/.keep | 0 src/autogen/test/fixtures/scripts.yml | 17 + src/autogen/test/helpers/.keep | 0 src/autogen/test/integration/.keep | 0 src/autogen/test/mailers/.keep | 0 src/autogen/test/models/.keep | 0 src/autogen/test/models/script_test.rb | 7 + src/autogen/test/system/.keep | 0 src/autogen/test/system/scripts_test.rb | 51 +++ src/autogen/test/test_helper.rb | 12 + src/autogen/tmp/.keep | 0 src/autogen/tmp/pids/.keep | 0 src/autogen/tmp/storage/.keep | 0 src/autogen/vendor/.keep | 0 102 files changed, 2258 insertions(+) create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100644 README.MD create mode 100644 docker-compose.yml create mode 100644 src/autogen/.dockerignore create mode 100644 src/autogen/.gitattributes create mode 100644 src/autogen/.gitignore create mode 100644 src/autogen/.node-version create mode 100644 src/autogen/.ruby-version create mode 100644 src/autogen/Dockerfile create mode 100644 src/autogen/Gemfile create mode 100644 src/autogen/Gemfile.lock create mode 100644 src/autogen/README.md create mode 100644 src/autogen/Rakefile create mode 100644 src/autogen/app/assets/config/manifest.js create mode 100644 src/autogen/app/assets/images/.keep create mode 100644 src/autogen/app/assets/images/installerlogo.png create mode 100644 src/autogen/app/assets/javascript/init.js create mode 100644 src/autogen/app/assets/javascript/jquery-3.7.1.min.js create mode 100644 src/autogen/app/assets/stylesheets/_layout.scss create mode 100644 src/autogen/app/assets/stylesheets/application.scss create mode 100644 src/autogen/app/assets/stylesheets/main.scss create mode 100644 src/autogen/app/channels/application_cable/channel.rb create mode 100644 src/autogen/app/channels/application_cable/connection.rb create mode 100644 src/autogen/app/controllers/application_controller.rb create mode 100644 src/autogen/app/controllers/concerns/.keep create mode 100644 src/autogen/app/controllers/home_controller.rb create mode 100644 src/autogen/app/controllers/scripts_controller.rb create mode 100644 src/autogen/app/helpers/application_helper.rb create mode 100644 src/autogen/app/helpers/home_helper.rb create mode 100644 src/autogen/app/helpers/scripts_helper.rb create mode 100644 src/autogen/app/jobs/application_job.rb create mode 100644 src/autogen/app/mailers/application_mailer.rb create mode 100644 src/autogen/app/models/concerns/.keep create mode 100644 src/autogen/app/models/script.rb create mode 100644 src/autogen/app/views/home/index.html.erb create mode 100644 src/autogen/app/views/layouts/application.html.erb create mode 100644 src/autogen/app/views/layouts/mailer.html.erb create mode 100644 src/autogen/app/views/layouts/mailer.text.erb create mode 100644 src/autogen/app/views/partials/_left-menu.html.erb create mode 100644 src/autogen/app/views/partials/_top-menu.html.erb create mode 100644 src/autogen/app/views/scripts/_form.html.erb create mode 100644 src/autogen/app/views/scripts/_script.html.erb create mode 100644 src/autogen/app/views/scripts/_script.json.jbuilder create mode 100644 src/autogen/app/views/scripts/edit.html.erb create mode 100644 src/autogen/app/views/scripts/index.html.erb create mode 100644 src/autogen/app/views/scripts/index.json.jbuilder create mode 100644 src/autogen/app/views/scripts/new.html.erb create mode 100644 src/autogen/app/views/scripts/show.html.erb create mode 100644 src/autogen/app/views/scripts/show.json.jbuilder create mode 100755 src/autogen/bin/docker-entrypoint create mode 100755 src/autogen/bin/rails create mode 100755 src/autogen/bin/rake create mode 100755 src/autogen/bin/setup create mode 100644 src/autogen/config.ru create mode 100644 src/autogen/config/application.rb create mode 100644 src/autogen/config/boot.rb create mode 100644 src/autogen/config/cable.yml create mode 100644 src/autogen/config/credentials.yml.enc create mode 100644 src/autogen/config/environment.rb create mode 100644 src/autogen/config/environments/development.rb create mode 100644 src/autogen/config/environments/production.rb create mode 100644 src/autogen/config/environments/test.rb create mode 100644 src/autogen/config/initializers/assets.rb create mode 100644 src/autogen/config/initializers/content_security_policy.rb create mode 100644 src/autogen/config/initializers/filter_parameter_logging.rb create mode 100644 src/autogen/config/initializers/inflections.rb create mode 100644 src/autogen/config/initializers/permissions_policy.rb create mode 100644 src/autogen/config/locales/en.yml create mode 100644 src/autogen/config/mongoid.yml create mode 100644 src/autogen/config/puma.rb create mode 100644 src/autogen/config/routes.rb create mode 100644 src/autogen/lib/assets/.keep create mode 100644 src/autogen/lib/tasks/.keep create mode 100644 src/autogen/log/.keep create mode 100644 src/autogen/public/404.html create mode 100644 src/autogen/public/422.html create mode 100644 src/autogen/public/500.html create mode 100644 src/autogen/public/apple-touch-icon-precomposed.png create mode 100644 src/autogen/public/apple-touch-icon.png create mode 100644 src/autogen/public/favicon.ico create mode 100644 src/autogen/public/robots.txt create mode 100644 src/autogen/storage/.keep create mode 100644 src/autogen/test/application_system_test_case.rb create mode 100644 src/autogen/test/channels/application_cable/connection_test.rb create mode 100644 src/autogen/test/controllers/.keep create mode 100644 src/autogen/test/controllers/home_controller_test.rb create mode 100644 src/autogen/test/controllers/scripts_controller_test.rb create mode 100644 src/autogen/test/fixtures/files/.keep create mode 100644 src/autogen/test/fixtures/scripts.yml create mode 100644 src/autogen/test/helpers/.keep create mode 100644 src/autogen/test/integration/.keep create mode 100644 src/autogen/test/mailers/.keep create mode 100644 src/autogen/test/models/.keep create mode 100644 src/autogen/test/models/script_test.rb create mode 100644 src/autogen/test/system/.keep create mode 100644 src/autogen/test/system/scripts_test.rb create mode 100644 src/autogen/test/test_helper.rb create mode 100644 src/autogen/tmp/.keep create mode 100644 src/autogen/tmp/pids/.keep create mode 100644 src/autogen/tmp/storage/.keep create mode 100644 src/autogen/vendor/.keep diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3aedd0f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +src/autogen/app/tmp/ +src/autogen/app/log/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cd651fe --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM ruby:slim as base + +WORKDIR /usr/src +RUN apt update &&\ + apt install --yes git curl build-essential whois +RUN curl -sL https://deb.nodesource.com/setup_current.x | bash - &&\ + apt-get update && \ + apt-get install --yes --no-install-recommends nodejs &&\ + npm install -g yarn \ + apt-get clean + +RUN gem install rails +# RUN gem install rails + +CMD ["bash"] + + diff --git a/README.MD b/README.MD new file mode 100644 index 0000000..4098a10 --- /dev/null +++ b/README.MD @@ -0,0 +1,215 @@ +# REf +https://www.simplethread.com/how-to-create-a-new-rails-7-app-with-tailwind/ +https://blog.saeloun.com/2021/11/17/rails-7-added-css-app-generator/ + +docker compose up -d +docker compose exec -ti autogen bash + +gem install rails +gem update --system 3.5.6 +rails new autogen --skip-active-record --skip-bundle --css bulma +cd autogen/ +Add to Gemfile : +bundle add mongoid + +change config/mongoid.yaml +```yaml +development: + # Configure available database clients. (required) + clients: + # Defines the default client. (required) + default: + # Mongoid can connect to a URI accepted by the driver: + uri: mongodb://railszen:railszen@mongo:27017/railszen + # Otherwise define the parameters separately. + # This defines the name of the default database that Mongoid can connect to. + # (required). + # database: autodeploy_development + # Provides the hosts the default client can connect to. Must be an array + # of host:port pairs. (required) + # hosts: + # - localhost:27017 + options: + # Note that all options listed below are Ruby driver client options (the mongo gem). + # Please refer to the driver documentation of the version of the mongo gem you are using + # for the most up-to-date list of options. + # + # Change the default write concern. (default = { w: 1 }) + # write: + # w: 1 + + # Change the default read preference. Valid options for mode are: :secondary, + # :secondary_preferred, :primary, :primary_preferred, :nearest + # (default: primary) + # read: + # mode: :secondary_preferred + # tag_sets: + # - use: web + + # The name of the user for authentication. + # user: 'user' + + # The password of the user for authentication. + # password: 'password' + + # The user's database roles. + # roles: + # - 'dbOwner' + + # Change the default authentication mechanism. Valid options are: :scram, + # :mongodb_cr, :mongodb_x509, and :plain. Note that all authentication + # mechanisms require username and password, with the exception of :mongodb_x509. + # Default on mongoDB 3.0 is :scram, default on 2.4 and 2.6 is :plain. + # auth_mech: :scram + + # The database or source to authenticate the user against. + # (default: the database specified above or admin) + # auth_source: admin + + # Force a the driver cluster to behave in a certain manner instead of auto- + # discovering. Can be one of: :direct, :replica_set, :sharded. Set to :direct + # when connecting to hidden members of a replica set. + # connect: :direct + + # Changes the default time in seconds the server monitors refresh their status + # via hello commands. (default: 10) + # heartbeat_frequency: 10 + + # The time in seconds for selecting servers for a near read preference. (default: 0.015) + # local_threshold: 0.015 + + # The timeout in seconds for selecting a server for an operation. (default: 30) + # server_selection_timeout: 30 + + # The maximum number of connections in the connection pool. (default: 5) + # max_pool_size: 5 + + # The minimum number of connections in the connection pool. (default: 1) + # min_pool_size: 1 + + # The time to wait, in seconds, in the connection pool for a connection + # to be checked in before timing out. (default: 5) + # wait_queue_timeout: 5 + + # The time to wait to establish a connection before timing out, in seconds. + # (default: 10) + # connect_timeout: 10 + + # How long to wait for a response for each operation sent to the + # server. This timeout should be set to a value larger than the + # processing time for the longest operation that will be executed + # by the application. Note that this is a client-side timeout; + # the server may continue executing an operation after the client + # aborts it with the SocketTimeout exception. + # (default: nil, meaning no timeout) + # socket_timeout: 5 + + # The name of the replica set to connect to. Servers provided as seeds that do + # not belong to this replica set will be ignored. + # replica_set: name + + # Whether to connect to the servers via ssl. (default: false) + # ssl: true + + # The certificate file used to identify the connection against MongoDB. + # ssl_cert: /path/to/my.cert + + # The private keyfile used to identify the connection against MongoDB. + # Note that even if the key is stored in the same file as the certificate, + # both need to be explicitly specified. + # ssl_key: /path/to/my.key + + # A passphrase for the private key. + # ssl_key_pass_phrase: password + + # Whether to do peer certification validation. (default: true) + # ssl_verify: true + + # The file containing concatenated certificate authority certificates + # used to validate certs passed from the other end of the connection. + # ssl_ca_cert: /path/to/ca.cert + + # Whether to truncate long log lines. (default: true) + # truncate_logs: true + + # Configure Mongoid specific options. (optional) + options: + # Application name that is printed to the mongodb logs upon establishing + # a connection in server versions >= 3.4. Note that the name cannot + # exceed 128 bytes. It is also used as the database name if the + # database name is not explicitly defined. (default: nil) + # app_name: MyApplicationName + + # Mark belongs_to associations as required by default, so that saving a + # model with a missing belongs_to association will trigger a validation + # error. (default: true) + # belongs_to_required_by_default: true + + # Raise an exception when a field is redefined. (default: false) + # duplicate_fields_exception: false + + # Include the root model name in json serialization. (default: false) + # include_root_in_json: false + + # Include the _type field in serialization. (default: false) + # include_type_for_serialization: false + + # Whether to join nested persistence contexts for atomic operations + # to parent contexts by default. (default: false) + # join_contexts: false + + # Set the Mongoid and Ruby driver log levels when Mongoid is not using + # Ruby on Rails logger instance. (default: :info) + # log_level: :info + + # Preload all models in development, needed when models use + # inheritance. (default: false) + # preload_models: false + + # Raise an error when performing a #find and the document is not found. + # (default: true) + raise_not_found_error: false + + # Raise an error when defining a scope with the same name as an + # existing method. (default: false) + # scope_overwrite_exception: false + + # Use ActiveSupport's time zone in time operations instead of + # the Ruby default time zone. See the time zone section below for + # further information. (default: true) + # use_activesupport_time_zone: true + + # Return stored times as UTC. See the time zone section below for + # further information. Most applications should not use this option. + # (default: false) + # use_utc: false + + # (Deprecated) In MongoDB 4.0 and earlier, set whether to create + # indexes in the background by default. (default: false) + # background_indexing: false + +test: + clients: + default: + uri: mongodb://railszen:railszen@mongo:27017/railszen + # database: autodeploy_test + # hosts: + # - localhost:27017 + options: + read: + mode: :primary + max_pool_size: 1 + +``` +bin/rails g mongoid:config +edit config/database.yml and update database info +config/application.rb add config.hosts << "autoinstall.msi.stef.lan" + + +bundle add hotwire-livereload --group development +./bin/rails generate controller Public index --no-helper --no-controller-specs + +bin/rails g scaffold Script name:string stage:string lang:string content:text lock:boolean description:text +bin/rails g scaffold Site name:string domain:string gateway:string nameserver:string network:string netmask:string + +bin/rails s -b 0.0.0.0 diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..12d1f29 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,31 @@ +services: + autogen: + container_name: autogen + hostname: autogen + build: . + restart: always + labels: + - "traefik.enable=true" + - "traefik.docker.network=traefik" + - "traefik.http.routers.autoinstall.entrypoints=websecure" + - "traefik.http.routers.autoinstall.tls=true" + - "traefik.http.routers.autoinstall.rule=Host(`autoinstall.msi.stef.lan`)" + - "traefik.http.services.autoinstall.loadbalancer.server.port=3000" + stdin_open: true + tty: true + ports: + - 4000:3000 + + networks: + - traefik + - databases + + volumes: + - ./src:/usr/src +networks: + traefik: + name: traefik + external: true + databases: + name: databases + external: true diff --git a/src/autogen/.dockerignore b/src/autogen/.dockerignore new file mode 100644 index 0000000..9612375 --- /dev/null +++ b/src/autogen/.dockerignore @@ -0,0 +1,37 @@ +# See https://docs.docker.com/engine/reference/builder/#dockerignore-file for more about ignoring files. + +# Ignore git directory. +/.git/ + +# Ignore bundler config. +/.bundle + +# Ignore all environment files (except templates). +/.env* +!/.env*.erb + +# Ignore all default key files. +/config/master.key +/config/credentials/*.key + +# Ignore all logfiles and tempfiles. +/log/* +/tmp/* +!/log/.keep +!/tmp/.keep + +# Ignore pidfiles, but keep the directory. +/tmp/pids/* +!/tmp/pids/.keep + +# Ignore storage (uploaded files in development and any SQLite databases). +/storage/* +!/storage/.keep +/tmp/storage/* +!/tmp/storage/.keep + +# Ignore assets. +/node_modules/ +/app/assets/builds/* +!/app/assets/builds/.keep +/public/assets diff --git a/src/autogen/.gitattributes b/src/autogen/.gitattributes new file mode 100644 index 0000000..4a66706 --- /dev/null +++ b/src/autogen/.gitattributes @@ -0,0 +1,7 @@ +# See https://git-scm.com/docs/gitattributes for more about git attribute files. + + +# Mark any vendored files as having been vendored. +vendor/* linguist-vendored +config/credentials/*.yml.enc diff=rails_credentials +config/credentials.yml.enc diff=rails_credentials diff --git a/src/autogen/.gitignore b/src/autogen/.gitignore new file mode 100644 index 0000000..5fb66c9 --- /dev/null +++ b/src/autogen/.gitignore @@ -0,0 +1,35 @@ +# See https://help.github.com/articles/ignoring-files for more about ignoring files. +# +# If you find yourself ignoring temporary files generated by your text editor +# or operating system, you probably want to add a global ignore instead: +# git config --global core.excludesfile '~/.gitignore_global' + +# Ignore bundler config. +/.bundle + +# Ignore all environment files (except templates). +/.env* +!/.env*.erb + +# Ignore all logfiles and tempfiles. +/log/* +/tmp/* +!/log/.keep +!/tmp/.keep + +# Ignore pidfiles, but keep the directory. +/tmp/pids/* +!/tmp/pids/ +!/tmp/pids/.keep + +# Ignore storage (uploaded files in development and any SQLite databases). +/storage/* +!/storage/.keep +/tmp/storage/* +!/tmp/storage/ +!/tmp/storage/.keep + +/public/assets + +# Ignore master key for decrypting credentials and more. +/config/master.key diff --git a/src/autogen/.node-version b/src/autogen/.node-version new file mode 100644 index 0000000..55bb086 --- /dev/null +++ b/src/autogen/.node-version @@ -0,0 +1 @@ +21.6.1 diff --git a/src/autogen/.ruby-version b/src/autogen/.ruby-version new file mode 100644 index 0000000..03463f3 --- /dev/null +++ b/src/autogen/.ruby-version @@ -0,0 +1 @@ +ruby-3.3.0 diff --git a/src/autogen/Dockerfile b/src/autogen/Dockerfile new file mode 100644 index 0000000..b537a1e --- /dev/null +++ b/src/autogen/Dockerfile @@ -0,0 +1,75 @@ +# syntax = docker/dockerfile:1 + +# Make sure RUBY_VERSION matches the Ruby version in .ruby-version and Gemfile +ARG RUBY_VERSION=3.3.0 +FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim as base + +# Rails app lives here +WORKDIR /rails + +# Set production environment +ENV RAILS_ENV="production" \ + BUNDLE_DEPLOYMENT="1" \ + BUNDLE_PATH="/usr/local/bundle" \ + BUNDLE_WITHOUT="development" + + +# Throw-away build stage to reduce size of final image +FROM base as build + +# Install packages needed to build gems and node modules +RUN apt-get update -qq && \ + apt-get install --no-install-recommends -y build-essential curl git node-gyp pkg-config python-is-python3 + +# Install JavaScript dependencies +ARG NODE_VERSION=21.6.1 +ARG YARN_VERSION=1.22.21 +ENV PATH=/usr/local/node/bin:$PATH +RUN curl -sL https://github.com/nodenv/node-build/archive/master.tar.gz | tar xz -C /tmp/ && \ + /tmp/node-build-master/bin/node-build "${NODE_VERSION}" /usr/local/node && \ + npm install -g yarn@$YARN_VERSION && \ + rm -rf /tmp/node-build-master + +# Install application gems +COPY Gemfile Gemfile.lock ./ +RUN bundle install && \ + rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git && \ + bundle exec bootsnap precompile --gemfile + +# Install node modules +COPY package.json yarn.lock ./ +RUN yarn install --frozen-lockfile + +# Copy application code +COPY . . + +# Precompile bootsnap code for faster boot times +RUN bundle exec bootsnap precompile app/ lib/ + +# Precompiling assets for production without requiring secret RAILS_MASTER_KEY +RUN SECRET_KEY_BASE_DUMMY=1 ./bin/rails assets:precompile + + +# Final stage for app image +FROM base + +# Install packages needed for deployment +RUN apt-get update -qq && \ + apt-get install --no-install-recommends -y curl && \ + rm -rf /var/lib/apt/lists /var/cache/apt/archives + +# Copy built artifacts: gems, application +COPY --from=build /usr/local/bundle /usr/local/bundle +COPY --from=build /rails /rails + +# Run and own only the runtime files as a non-root user for security +RUN useradd rails --create-home --shell /bin/bash && \ + chown -R rails:rails log tmp +USER rails:rails + +# Entrypoint prepares the database. +ENTRYPOINT ["/rails/bin/docker-entrypoint"] + +# Start the server by default, this can be overwritten at runtime +EXPOSE 3000 +CMD ["./bin/rails", "server"] diff --git a/src/autogen/Gemfile b/src/autogen/Gemfile new file mode 100644 index 0000000..c7ad3d1 --- /dev/null +++ b/src/autogen/Gemfile @@ -0,0 +1,70 @@ +source "https://rubygems.org" + +ruby "3.3.0" + +# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" +gem "rails", "~> 7.1.3" + +# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails] +gem "sprockets-rails" + +# Use the Puma web server [https://github.com/puma/puma] +gem "puma", ">= 5.0" + +# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails] +gem "importmap-rails" + +# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev] +gem "turbo-rails" + +# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev] +gem "stimulus-rails" + +# Bundle and process CSS [https://github.com/rails/cssbundling-rails] +gem "cssbundling-rails" + +# Build JSON APIs with ease [https://github.com/rails/jbuilder] +gem "jbuilder" + +# Use Redis adapter to run Action Cable in production +# gem "redis", ">= 4.0.1" + +# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis] +# gem "kredis" + +# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword] +# gem "bcrypt", "~> 3.1.7" + +# Windows does not include zoneinfo files, so bundle the tzinfo-data gem +gem "tzinfo-data", platforms: %i[ windows jruby ] + +# Reduces boot times through caching; required in config/boot.rb +gem "bootsnap", require: false + +group :development, :test do + # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem + gem "debug", platforms: %i[ mri windows ] +end + +group :development do + # Use console on exceptions pages [https://github.com/rails/web-console] + gem "web-console" + + # Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler] + # gem "rack-mini-profiler" + + # Speed up commands on slow machines / big apps [https://github.com/rails/spring] + # gem "spring" +end + +group :test do + # Use system testing [https://guides.rubyonrails.org/testing.html#system-testing] + gem "capybara" + gem "selenium-webdriver" +end + +gem "mongoid", "~> 8.1" + +gem "bulma-rails", "~> 0.9.4" + +gem "jquery-rails", "~> 4.6" diff --git a/src/autogen/Gemfile.lock b/src/autogen/Gemfile.lock new file mode 100644 index 0000000..2472ecf --- /dev/null +++ b/src/autogen/Gemfile.lock @@ -0,0 +1,295 @@ +GEM + remote: https://rubygems.org/ + specs: + actioncable (7.1.3) + actionpack (= 7.1.3) + activesupport (= 7.1.3) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + zeitwerk (~> 2.6) + actionmailbox (7.1.3) + actionpack (= 7.1.3) + activejob (= 7.1.3) + activerecord (= 7.1.3) + activestorage (= 7.1.3) + activesupport (= 7.1.3) + mail (>= 2.7.1) + net-imap + net-pop + net-smtp + actionmailer (7.1.3) + actionpack (= 7.1.3) + actionview (= 7.1.3) + activejob (= 7.1.3) + activesupport (= 7.1.3) + mail (~> 2.5, >= 2.5.4) + net-imap + net-pop + net-smtp + rails-dom-testing (~> 2.2) + actionpack (7.1.3) + actionview (= 7.1.3) + activesupport (= 7.1.3) + nokogiri (>= 1.8.5) + racc + rack (>= 2.2.4) + rack-session (>= 1.0.1) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + actiontext (7.1.3) + actionpack (= 7.1.3) + activerecord (= 7.1.3) + activestorage (= 7.1.3) + activesupport (= 7.1.3) + globalid (>= 0.6.0) + nokogiri (>= 1.8.5) + actionview (7.1.3) + activesupport (= 7.1.3) + builder (~> 3.1) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + activejob (7.1.3) + activesupport (= 7.1.3) + globalid (>= 0.3.6) + activemodel (7.1.3) + activesupport (= 7.1.3) + activerecord (7.1.3) + activemodel (= 7.1.3) + activesupport (= 7.1.3) + timeout (>= 0.4.0) + activestorage (7.1.3) + actionpack (= 7.1.3) + activejob (= 7.1.3) + activerecord (= 7.1.3) + activesupport (= 7.1.3) + marcel (~> 1.0) + activesupport (7.1.3) + base64 + bigdecimal + concurrent-ruby (~> 1.0, >= 1.0.2) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + minitest (>= 5.1) + mutex_m + tzinfo (~> 2.0) + addressable (2.8.6) + public_suffix (>= 2.0.2, < 6.0) + base64 (0.2.0) + bigdecimal (3.1.6) + bindex (0.8.1) + bootsnap (1.18.3) + msgpack (~> 1.2) + bson (4.15.0) + builder (3.2.4) + bulma-rails (0.9.4) + sassc (~> 2.0) + capybara (3.40.0) + addressable + matrix + mini_mime (>= 0.1.3) + nokogiri (~> 1.11) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (>= 1.5, < 3.0) + xpath (~> 3.2) + concurrent-ruby (1.2.3) + connection_pool (2.4.1) + crass (1.0.6) + cssbundling-rails (1.4.0) + railties (>= 6.0.0) + date (3.3.4) + debug (1.9.1) + irb (~> 1.10) + reline (>= 0.3.8) + drb (2.2.0) + ruby2_keywords + erubi (1.12.0) + ffi (1.16.3) + globalid (1.2.1) + activesupport (>= 6.1) + i18n (1.14.1) + concurrent-ruby (~> 1.0) + importmap-rails (2.0.1) + actionpack (>= 6.0.0) + activesupport (>= 6.0.0) + railties (>= 6.0.0) + io-console (0.7.2) + irb (1.11.2) + rdoc + reline (>= 0.4.2) + jbuilder (2.11.5) + actionview (>= 5.0.0) + activesupport (>= 5.0.0) + jquery-rails (4.6.0) + rails-dom-testing (>= 1, < 3) + railties (>= 4.2.0) + thor (>= 0.14, < 2.0) + loofah (2.22.0) + crass (~> 1.0.2) + nokogiri (>= 1.12.0) + mail (2.8.1) + mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp + marcel (1.0.2) + matrix (0.4.2) + mini_mime (1.1.5) + minitest (5.22.2) + mongo (2.19.3) + bson (>= 4.14.1, < 5.0.0) + mongoid (8.1.4) + activemodel (>= 5.1, < 7.2, != 7.0.0) + concurrent-ruby (>= 1.0.5, < 2.0) + mongo (>= 2.18.0, < 3.0.0) + ruby2_keywords (~> 0.0.5) + msgpack (1.7.2) + mutex_m (0.2.0) + net-imap (0.4.10) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.2) + timeout + net-smtp (0.4.0.1) + net-protocol + nio4r (2.7.0) + nokogiri (1.16.2-aarch64-linux) + racc (~> 1.4) + nokogiri (1.16.2-arm-linux) + racc (~> 1.4) + nokogiri (1.16.2-arm64-darwin) + racc (~> 1.4) + nokogiri (1.16.2-x86-linux) + racc (~> 1.4) + nokogiri (1.16.2-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.16.2-x86_64-linux) + racc (~> 1.4) + psych (5.1.2) + stringio + public_suffix (5.0.4) + puma (6.4.2) + nio4r (~> 2.0) + racc (1.7.3) + rack (3.0.9) + rack-session (2.0.0) + rack (>= 3.0.0) + rack-test (2.1.0) + rack (>= 1.3) + rackup (2.1.0) + rack (>= 3) + webrick (~> 1.8) + rails (7.1.3) + actioncable (= 7.1.3) + actionmailbox (= 7.1.3) + actionmailer (= 7.1.3) + actionpack (= 7.1.3) + actiontext (= 7.1.3) + actionview (= 7.1.3) + activejob (= 7.1.3) + activemodel (= 7.1.3) + activerecord (= 7.1.3) + activestorage (= 7.1.3) + activesupport (= 7.1.3) + bundler (>= 1.15.0) + railties (= 7.1.3) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest + nokogiri (>= 1.6) + rails-html-sanitizer (1.6.0) + loofah (~> 2.21) + nokogiri (~> 1.14) + railties (7.1.3) + actionpack (= 7.1.3) + activesupport (= 7.1.3) + irb + rackup (>= 1.0.0) + rake (>= 12.2) + thor (~> 1.0, >= 1.2.2) + zeitwerk (~> 2.6) + rake (13.1.0) + rdoc (6.6.2) + psych (>= 4.0.0) + regexp_parser (2.9.0) + reline (0.4.2) + io-console (~> 0.5) + rexml (3.2.6) + ruby2_keywords (0.0.5) + rubyzip (2.3.2) + sassc (2.4.0) + ffi (~> 1.9) + selenium-webdriver (4.17.0) + base64 (~> 0.2) + rexml (~> 3.2, >= 3.2.5) + rubyzip (>= 1.2.2, < 3.0) + websocket (~> 1.0) + sprockets (4.2.1) + concurrent-ruby (~> 1.0) + rack (>= 2.2.4, < 4) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) + sprockets (>= 3.0.0) + stimulus-rails (1.3.3) + railties (>= 6.0.0) + stringio (3.1.0) + thor (1.3.0) + timeout (0.4.1) + turbo-rails (2.0.2) + actionpack (>= 6.0.0) + activejob (>= 6.0.0) + railties (>= 6.0.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + web-console (4.2.1) + actionview (>= 6.0.0) + activemodel (>= 6.0.0) + bindex (>= 0.4.0) + railties (>= 6.0.0) + webrick (1.8.1) + websocket (1.2.10) + websocket-driver (0.7.6) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) + xpath (3.2.0) + nokogiri (~> 1.8) + zeitwerk (2.6.13) + +PLATFORMS + aarch64-linux + arm-linux + arm64-darwin + x86-linux + x86_64-darwin + x86_64-linux + +DEPENDENCIES + bootsnap + bulma-rails (~> 0.9.4) + capybara + cssbundling-rails + debug + importmap-rails + jbuilder + jquery-rails (~> 4.6) + mongoid (~> 8.1) + puma (>= 5.0) + rails (~> 7.1.3) + selenium-webdriver + sprockets-rails + stimulus-rails + turbo-rails + tzinfo-data + web-console + +RUBY VERSION + ruby 3.3.0p0 + +BUNDLED WITH + 2.5.3 diff --git a/src/autogen/README.md b/src/autogen/README.md new file mode 100644 index 0000000..7db80e4 --- /dev/null +++ b/src/autogen/README.md @@ -0,0 +1,24 @@ +# README + +This README would normally document whatever steps are necessary to get the +application up and running. + +Things you may want to cover: + +* Ruby version + +* System dependencies + +* Configuration + +* Database creation + +* Database initialization + +* How to run the test suite + +* Services (job queues, cache servers, search engines, etc.) + +* Deployment instructions + +* ... diff --git a/src/autogen/Rakefile b/src/autogen/Rakefile new file mode 100644 index 0000000..9a5ea73 --- /dev/null +++ b/src/autogen/Rakefile @@ -0,0 +1,6 @@ +# 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_relative "config/application" + +Rails.application.load_tasks diff --git a/src/autogen/app/assets/config/manifest.js b/src/autogen/app/assets/config/manifest.js new file mode 100644 index 0000000..8472229 --- /dev/null +++ b/src/autogen/app/assets/config/manifest.js @@ -0,0 +1,3 @@ +//= link_tree ../images .png +//= link_directory ../stylesheets .css +//= link_tree ../javascript .js \ No newline at end of file diff --git a/src/autogen/app/assets/images/.keep b/src/autogen/app/assets/images/.keep new file mode 100644 index 0000000..e69de29 diff --git a/src/autogen/app/assets/images/installerlogo.png b/src/autogen/app/assets/images/installerlogo.png new file mode 100644 index 0000000000000000000000000000000000000000..b46c19672c25ddc55a95717fa90f4cb36614f335 GIT binary patch literal 14344 zcmb_jV|OJ?kiM~vNiwmM8{3*_V%xTDn-iNinb@{%+sPZ-+SzaW1GZ09Kj+kkW>s}p zo$g2lISC|qJa_;Afb?5ZROuh?{$nm!=zsO0&_mHbfHW7D6$Sw6;t@U!p#T7|5X)b` z6n_8uMeN{YZ)Ry@3II?i`X=&A4hZ27=_`Yj%7ffc9Y+;%=pv%Hq_Cn53L3GrT$$P) z5Hi`wX&B;yto!=nhsuMa8>*43gNR?i_Ahpe|0AXNVx(z|xZQ0fy1wGS+6EIT>Q`y7 z23KI8kQ_2L;%K3T)*~T~5J2puVpf(f{=s^Kum5~=`^Yff&^hzT?Um9w2FR1-8*v#R z-6qamYjl}@A2d|^gSqd#?-dBb!%Wx!*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+B&>wERPS?>G}AUdycv~X|cK`KksSZgrv#t zU79ZCyzOO;_$F`NhOiUk1!@12`?EkX;R~QC327+b<_k1tU6*^lqExi+mkY;Lh=sr`s?tFD|R zx{H(b(q%&}C-;2dKNI=a%Tu!|@xoBOsRK5dyPeY z6d+zK0w21=zBpcpM+AEidoXl>B2e~3#i~KEu+M&%m^1rI4 zO!7Cp@?6gqsmuK#S`-8Gbz8gPb~ysH4Jx~zc0Ty8VJ<)w-{FT~_^5p(s7`>+IQe{W zjXuQ{qH8m9FMmo)?NG%u+Ic&XxjHMWc)~BX+J=p^5jW^YGSSaBch1x+#=eV|ZTarT zc8Nu?<_xFC$*ax!jTXPgfmz+qmW@YWmT~?<0#i=d-gmHvS{OP0pb+76!P#b~!w!;x z@nCV-=~;@yRoyWN9M5;zyyl%(hFHml?S-*(-Sew4nGstK@Ilnd;2YH5qLptfRevn9 zOMYS3VTE*cJS@~#0^)uZVLHqHd~|{8&j&k+tzqtq zz=RuyeSQN{aV@D+d+wI#@1>e2-n^ff0lJKWL_#o z@FYG@pR_JiFTj&55KaQWxj)Ygn|#+x{~xKe^!rEV+a<+4*only4`6`bVsfI@A_hVK E1M)N>-~a#s literal 0 HcmV?d00001 diff --git a/src/autogen/app/assets/javascript/init.js b/src/autogen/app/assets/javascript/init.js new file mode 100644 index 0000000..283de1b --- /dev/null +++ b/src/autogen/app/assets/javascript/init.js @@ -0,0 +1,7 @@ +$( document ).ready(function() { + $('.toggleable').next().hide(); + $(document).on("click",".toggleable", function(){ + $(this).toggleClass("is-active"); + $(this).next().toggle(); + }); +}) \ No newline at end of file diff --git a/src/autogen/app/assets/javascript/jquery-3.7.1.min.js b/src/autogen/app/assets/javascript/jquery-3.7.1.min.js new file mode 100644 index 0000000..7f37b5d --- /dev/null +++ b/src/autogen/app/assets/javascript/jquery-3.7.1.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.7.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(ie,e){"use strict";var oe=[],r=Object.getPrototypeOf,ae=oe.slice,g=oe.flat?function(e){return oe.flat.call(e)}:function(e){return oe.concat.apply([],e)},s=oe.push,se=oe.indexOf,n={},i=n.toString,ue=n.hasOwnProperty,o=ue.toString,a=o.call(Object),le={},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},y=function(e){return null!=e&&e===e.window},C=ie.document,u={type:!0,src:!0,nonce:!0,noModule:!0};function m(e,t,n){var r,i,o=(n=n||C).createElement("script");if(o.text=e,t)for(r in u)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[i.call(e)]||"object":typeof e}var t="3.7.1",l=/HTML$/i,ce=function(e,t){return new ce.fn.init(e,t)};function c(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!v(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+ge+")"+ge+"*"),x=new RegExp(ge+"|>"),j=new RegExp(g),A=new RegExp("^"+t+"$"),D={ID:new RegExp("^#("+t+")"),CLASS:new RegExp("^\\.("+t+")"),TAG:new RegExp("^("+t+"|[*])"),ATTR:new RegExp("^"+p),PSEUDO:new RegExp("^"+g),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ge+"*(even|odd|(([+-]|)(\\d*)n|)"+ge+"*(?:([+-]|)"+ge+"*(\\d+)|))"+ge+"*\\)|)","i"),bool:new RegExp("^(?:"+f+")$","i"),needsContext:new RegExp("^"+ge+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ge+"*((?:-\\d)?\\d*)"+ge+"*\\)|)(?=[^-]|$)","i")},N=/^(?:input|select|textarea|button)$/i,q=/^h\d$/i,L=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,O=new RegExp("\\\\[\\da-fA-F]{1,6}"+ge+"?|\\\\([^\\r\\n\\f])","g"),P=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},M=function(){V()},R=J(function(e){return!0===e.disabled&&fe(e,"fieldset")},{dir:"parentNode",next:"legend"});try{k.apply(oe=ae.call(ye.childNodes),ye.childNodes),oe[ye.childNodes.length].nodeType}catch(e){k={apply:function(e,t){me.apply(e,ae.call(t))},call:function(e){me.apply(e,ae.call(arguments,1))}}}function I(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(V(e),e=e||T,C)){if(11!==p&&(u=L.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return k.call(n,a),n}else if(f&&(a=f.getElementById(i))&&I.contains(e,a)&&a.id===i)return k.call(n,a),n}else{if(u[2])return k.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(i)),n}if(!(h[t+" "]||d&&d.test(t))){if(c=t,f=e,1===p&&(x.test(t)||m.test(t))){(f=H.test(t)&&U(e.parentNode)||e)==e&&le.scope||((s=e.getAttribute("id"))?s=ce.escapeSelector(s):e.setAttribute("id",s=S)),o=(l=Y(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+Q(l[o]);c=l.join(",")}try{return k.apply(n,f.querySelectorAll(c)),n}catch(e){h(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return re(t.replace(ve,"$1"),e,n,r)}function W(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function F(e){return e[S]=!0,e}function $(e){var t=T.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function B(t){return function(e){return fe(e,"input")&&e.type===t}}function _(t){return function(e){return(fe(e,"input")||fe(e,"button"))&&e.type===t}}function z(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&R(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function X(a){return F(function(o){return o=+o,F(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function U(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function V(e){var t,n=e?e.ownerDocument||e:ye;return n!=T&&9===n.nodeType&&n.documentElement&&(r=(T=n).documentElement,C=!ce.isXMLDoc(T),i=r.matches||r.webkitMatchesSelector||r.msMatchesSelector,r.msMatchesSelector&&ye!=T&&(t=T.defaultView)&&t.top!==t&&t.addEventListener("unload",M),le.getById=$(function(e){return r.appendChild(e).id=ce.expando,!T.getElementsByName||!T.getElementsByName(ce.expando).length}),le.disconnectedMatch=$(function(e){return i.call(e,"*")}),le.scope=$(function(){return T.querySelectorAll(":scope")}),le.cssHas=$(function(){try{return T.querySelector(":has(*,:jqfake)"),!1}catch(e){return!0}}),le.getById?(b.filter.ID=function(e){var t=e.replace(O,P);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(O,P);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&C){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},b.find.CLASS=function(e,t){if("undefined"!=typeof t.getElementsByClassName&&C)return t.getElementsByClassName(e)},d=[],$(function(e){var t;r.appendChild(e).innerHTML="",e.querySelectorAll("[selected]").length||d.push("\\["+ge+"*(?:value|"+f+")"),e.querySelectorAll("[id~="+S+"-]").length||d.push("~="),e.querySelectorAll("a#"+S+"+*").length||d.push(".#.+[+~]"),e.querySelectorAll(":checked").length||d.push(":checked"),(t=T.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),r.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(t=T.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||d.push("\\["+ge+"*name"+ge+"*="+ge+"*(?:''|\"\")")}),le.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),l=function(e,t){if(e===t)return a=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!le.sortDetached&&t.compareDocumentPosition(e)===n?e===T||e.ownerDocument==ye&&I.contains(ye,e)?-1:t===T||t.ownerDocument==ye&&I.contains(ye,t)?1:o?se.call(o,e)-se.call(o,t):0:4&n?-1:1)}),T}for(e in I.matches=function(e,t){return I(e,null,null,t)},I.matchesSelector=function(e,t){if(V(e),C&&!h[t+" "]&&(!d||!d.test(t)))try{var n=i.call(e,t);if(n||le.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){h(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(O,P),e[3]=(e[3]||e[4]||e[5]||"").replace(O,P),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||I.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&I.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return D.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&j.test(n)&&(t=Y(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(O,P).toLowerCase();return"*"===e?function(){return!0}:function(e){return fe(e,t)}},CLASS:function(e){var t=s[e+" "];return t||(t=new RegExp("(^|"+ge+")"+e+"("+ge+"|$)"))&&s(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=I.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function T(e,n,r){return v(n)?ce.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?ce.grep(e,function(e){return e===n!==r}):"string"!=typeof n?ce.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(ce.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||k,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof ce?t[0]:t,ce.merge(this,ce.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:C,!0)),w.test(r[1])&&ce.isPlainObject(t))for(r in t)v(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=C.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):v(e)?void 0!==n.ready?n.ready(e):e(ce):ce.makeArray(e,this)}).prototype=ce.fn,k=ce(C);var E=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){while((e=e[t])&&1!==e.nodeType);return e}ce.fn.extend({has:function(e){var t=ce(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,Ce=/^$|^module$|\/(?:java|ecma)script/i;xe=C.createDocumentFragment().appendChild(C.createElement("div")),(be=C.createElement("input")).setAttribute("type","radio"),be.setAttribute("checked","checked"),be.setAttribute("name","t"),xe.appendChild(be),le.checkClone=xe.cloneNode(!0).cloneNode(!0).lastChild.checked,xe.innerHTML="",le.noCloneChecked=!!xe.cloneNode(!0).lastChild.defaultValue,xe.innerHTML="",le.option=!!xe.lastChild;var ke={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function Se(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&fe(e,t)?ce.merge([e],n):n}function Ee(e,t){for(var n=0,r=e.length;n",""]);var je=/<|&#?\w+;/;function Ae(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function Re(e,t){return fe(e,"table")&&fe(11!==t.nodeType?t:t.firstChild,"tr")&&ce(e).children("tbody")[0]||e}function Ie(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function We(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Fe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(_.hasData(e)&&(s=_.get(e).events))for(i in _.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),C.head.appendChild(r[0])},abort:function(){i&&i()}}});var Jt,Kt=[],Zt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||ce.expando+"_"+jt.guid++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=v(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Zt,"$1"+r):!1!==e.jsonp&&(e.url+=(At.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||ce.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=ie[r],ie[r]=function(){o=arguments},n.always(function(){void 0===i?ce(ie).removeProp(r):ie[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(r)),o&&v(i)&&i(o[0]),o=i=void 0}),"script"}),le.createHTMLDocument=((Jt=C.implementation.createHTMLDocument("").body).innerHTML="
",2===Jt.childNodes.length),ce.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(le.createHTMLDocument?((r=(t=C.implementation.createHTMLDocument("")).createElement("base")).href=C.location.href,t.head.appendChild(r)):t=C),o=!n&&[],(i=w.exec(e))?[t.createElement(i[1])]:(i=Ae([e],t,o),o&&o.length&&ce(o).remove(),ce.merge([],i.childNodes)));var r,i,o},ce.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(ce.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},ce.expr.pseudos.animated=function(t){return ce.grep(ce.timers,function(e){return t===e.elem}).length},ce.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=ce.css(e,"position"),c=ce(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=ce.css(e,"top"),u=ce.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),v(t)&&(t=t.call(e,n,ce.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},ce.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ce.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===ce.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===ce.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=ce(e).offset()).top+=ce.css(e,"borderTopWidth",!0),i.left+=ce.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-ce.css(r,"marginTop",!0),left:t.left-i.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===ce.css(e,"position"))e=e.offsetParent;return e||J})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;ce.fn[t]=function(e){return M(this,function(e,t,n){var r;if(y(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),ce.each(["top","left"],function(e,n){ce.cssHooks[n]=Ye(le.pixelPosition,function(e,t){if(t)return t=Ge(e,n),_e.test(t)?ce(e).position()[n]+"px":t})}),ce.each({Height:"height",Width:"width"},function(a,s){ce.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){ce.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return M(this,function(e,t,n){var r;return y(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?ce.css(e,t,i):ce.style(e,t,n,i)},s,n?e:void 0,n)}})}),ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){ce.fn[n]=function(e,t){return 0 +
+

Home#index

+
+

Find me in app/views/home/index.html.erb

+ \ No newline at end of file diff --git a/src/autogen/app/views/layouts/application.html.erb b/src/autogen/app/views/layouts/application.html.erb new file mode 100644 index 0000000..124e8e9 --- /dev/null +++ b/src/autogen/app/views/layouts/application.html.erb @@ -0,0 +1,31 @@ + + + + Autogen + + <%= csrf_meta_tags %> + <%= csp_meta_tag %> + + <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %> + <%= javascript_include_tag "jquery-3.7.1.min" %> + + + + +
+ <%= render "partials/top-menu" %> +
+
+ <%= render "partials/left-menu" %> +
+
+ +
+ <%= yield %> +
+
+
+
+ <%= javascript_include_tag "init" %> + + diff --git a/src/autogen/app/views/layouts/mailer.html.erb b/src/autogen/app/views/layouts/mailer.html.erb new file mode 100644 index 0000000..3aac900 --- /dev/null +++ b/src/autogen/app/views/layouts/mailer.html.erb @@ -0,0 +1,13 @@ + + + + + + + + + <%= yield %> + + diff --git a/src/autogen/app/views/layouts/mailer.text.erb b/src/autogen/app/views/layouts/mailer.text.erb new file mode 100644 index 0000000..37f0bdd --- /dev/null +++ b/src/autogen/app/views/layouts/mailer.text.erb @@ -0,0 +1 @@ +<%= yield %> diff --git a/src/autogen/app/views/partials/_left-menu.html.erb b/src/autogen/app/views/partials/_left-menu.html.erb new file mode 100644 index 0000000..53c7b54 --- /dev/null +++ b/src/autogen/app/views/partials/_left-menu.html.erb @@ -0,0 +1,40 @@ + \ No newline at end of file diff --git a/src/autogen/app/views/partials/_top-menu.html.erb b/src/autogen/app/views/partials/_top-menu.html.erb new file mode 100644 index 0000000..eab3aef --- /dev/null +++ b/src/autogen/app/views/partials/_top-menu.html.erb @@ -0,0 +1,60 @@ + \ No newline at end of file diff --git a/src/autogen/app/views/scripts/_form.html.erb b/src/autogen/app/views/scripts/_form.html.erb new file mode 100644 index 0000000..c5cfa20 --- /dev/null +++ b/src/autogen/app/views/scripts/_form.html.erb @@ -0,0 +1,47 @@ +<%= form_with(model: script) do |form| %> + <% if script.errors.any? %> +
+

<%= pluralize(script.errors.count, "error") %> prohibited this script from being saved:

+ +
    + <% script.errors.each do |error| %> +
  • <%= error.full_message %>
  • + <% end %> +
+
+ <% end %> + +
+ <%= form.label :name, style: "display: block" %> + <%= form.text_field :name %> +
+ +
+ <%= form.label :stage, style: "display: block" %> + <%= form.text_field :stage %> +
+ +
+ <%= form.label :lang, style: "display: block" %> + <%= form.text_field :lang %> +
+ +
+ <%= form.label :content, style: "display: block" %> + <%= form.text_area :content %> +
+ +
+ <%= form.label :lock, style: "display: block" %> + <%= form.check_box :lock %> +
+ +
+ <%= form.label :description, style: "display: block" %> + <%= form.text_area :description %> +
+ +
+ <%= form.submit %> +
+<% end %> diff --git a/src/autogen/app/views/scripts/_script.html.erb b/src/autogen/app/views/scripts/_script.html.erb new file mode 100644 index 0000000..4e11b1a --- /dev/null +++ b/src/autogen/app/views/scripts/_script.html.erb @@ -0,0 +1,32 @@ +
+

+ Name: + <%= script.name %> +

+ +

+ Stage: + <%= script.stage %> +

+ +

+ Lang: + <%= script.lang %> +

+ +

+ Content: + <%= script.content %> +

+ +

+ Lock: + <%= script.lock %> +

+ +

+ Description: + <%= script.description %> +

+ +
diff --git a/src/autogen/app/views/scripts/_script.json.jbuilder b/src/autogen/app/views/scripts/_script.json.jbuilder new file mode 100644 index 0000000..4483f68 --- /dev/null +++ b/src/autogen/app/views/scripts/_script.json.jbuilder @@ -0,0 +1,2 @@ +json.extract! script, :id, :name, :stage, :lang, :content, :lock, :description, :created_at, :updated_at +json.url script_url(script, format: :json) diff --git a/src/autogen/app/views/scripts/edit.html.erb b/src/autogen/app/views/scripts/edit.html.erb new file mode 100644 index 0000000..8295999 --- /dev/null +++ b/src/autogen/app/views/scripts/edit.html.erb @@ -0,0 +1,10 @@ +

Editing script

+ +<%= render "form", script: @script %> + +
+ +
+ <%= link_to "Show this script", @script %> | + <%= link_to "Back to scripts", scripts_path %> +
diff --git a/src/autogen/app/views/scripts/index.html.erb b/src/autogen/app/views/scripts/index.html.erb new file mode 100644 index 0000000..5490a24 --- /dev/null +++ b/src/autogen/app/views/scripts/index.html.erb @@ -0,0 +1,14 @@ +

<%= notice %>

+ +

Scripts

+ +
+ <% @scripts.each do |script| %> + <%= render script %> +

+ <%= link_to "Show this script", script %> +

+ <% end %> +
+ +<%= link_to "New script", new_script_path %> diff --git a/src/autogen/app/views/scripts/index.json.jbuilder b/src/autogen/app/views/scripts/index.json.jbuilder new file mode 100644 index 0000000..6c42ed4 --- /dev/null +++ b/src/autogen/app/views/scripts/index.json.jbuilder @@ -0,0 +1 @@ +json.array! @scripts, partial: "scripts/script", as: :script diff --git a/src/autogen/app/views/scripts/new.html.erb b/src/autogen/app/views/scripts/new.html.erb new file mode 100644 index 0000000..f074f1a --- /dev/null +++ b/src/autogen/app/views/scripts/new.html.erb @@ -0,0 +1,9 @@ +

New script

+ +<%= render "form", script: @script %> + +
+ +
+ <%= link_to "Back to scripts", scripts_path %> +
diff --git a/src/autogen/app/views/scripts/show.html.erb b/src/autogen/app/views/scripts/show.html.erb new file mode 100644 index 0000000..10af54d --- /dev/null +++ b/src/autogen/app/views/scripts/show.html.erb @@ -0,0 +1,10 @@ +

<%= notice %>

+ +<%= render @script %> + +
+ <%= link_to "Edit this script", edit_script_path(@script) %> | + <%= link_to "Back to scripts", scripts_path %> + + <%= button_to "Destroy this script", @script, method: :delete %> +
diff --git a/src/autogen/app/views/scripts/show.json.jbuilder b/src/autogen/app/views/scripts/show.json.jbuilder new file mode 100644 index 0000000..1b8efd7 --- /dev/null +++ b/src/autogen/app/views/scripts/show.json.jbuilder @@ -0,0 +1 @@ +json.partial! "scripts/script", script: @script diff --git a/src/autogen/bin/docker-entrypoint b/src/autogen/bin/docker-entrypoint new file mode 100755 index 0000000..de0b30b --- /dev/null +++ b/src/autogen/bin/docker-entrypoint @@ -0,0 +1,3 @@ +#!/bin/bash -e + +exec "${@}" diff --git a/src/autogen/bin/rails b/src/autogen/bin/rails new file mode 100755 index 0000000..efc0377 --- /dev/null +++ b/src/autogen/bin/rails @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby +APP_PATH = File.expand_path("../config/application", __dir__) +require_relative "../config/boot" +require "rails/commands" diff --git a/src/autogen/bin/rake b/src/autogen/bin/rake new file mode 100755 index 0000000..4fbf10b --- /dev/null +++ b/src/autogen/bin/rake @@ -0,0 +1,4 @@ +#!/usr/bin/env ruby +require_relative "../config/boot" +require "rake" +Rake.application.run diff --git a/src/autogen/bin/setup b/src/autogen/bin/setup new file mode 100755 index 0000000..a627cd9 --- /dev/null +++ b/src/autogen/bin/setup @@ -0,0 +1,28 @@ +#!/usr/bin/env ruby +require "fileutils" + +# path to your application root. +APP_ROOT = File.expand_path("..", __dir__) + +def system!(*args) + system(*args, exception: true) +end + +FileUtils.chdir APP_ROOT do + # This script is a way to set up or update your development environment automatically. + # This script is idempotent, so that you can run it at any time and get an expectable outcome. + # Add necessary setup steps to this file. + + puts "== Installing dependencies ==" + system! "gem install bundler --conservative" + system("bundle check") || system!("bundle install") + + # Install JavaScript dependencies + system("yarn check --check-files") || system!("yarn install") + + puts "\n== Removing old logs and tempfiles ==" + system! "bin/rails log:clear tmp:clear" + + puts "\n== Restarting application server ==" + system! "bin/rails restart" +end diff --git a/src/autogen/config.ru b/src/autogen/config.ru new file mode 100644 index 0000000..4a3c09a --- /dev/null +++ b/src/autogen/config.ru @@ -0,0 +1,6 @@ +# This file is used by Rack-based servers to start the application. + +require_relative "config/environment" + +run Rails.application +Rails.application.load_server diff --git a/src/autogen/config/application.rb b/src/autogen/config/application.rb new file mode 100644 index 0000000..9d4b3d8 --- /dev/null +++ b/src/autogen/config/application.rb @@ -0,0 +1,40 @@ +require_relative "boot" + +require "rails" +# Pick the frameworks you want: +require "active_model/railtie" +require "active_job/railtie" +# require "active_record/railtie" +# require "active_storage/engine" +require "action_controller/railtie" +require "action_mailer/railtie" +# require "action_mailbox/engine" +# require "action_text/engine" +require "action_view/railtie" +require "action_cable/engine" +require "rails/test_unit/railtie" + +# Require the gems listed in Gemfile, including any gems +# you've limited to :test, :development, or :production. +Bundler.require(*Rails.groups) + +module Autogen + class Application < Rails::Application + # Initialize configuration defaults for originally generated Rails version. + config.load_defaults 7.1 + + # Please, add to the `ignore` list any other `lib` subdirectories that do + # not contain `.rb` files, or that should not be reloaded or eager loaded. + # Common ones are `templates`, `generators`, or `middleware`, for example. + config.autoload_lib(ignore: %w(assets tasks)) + + # Configuration for the application, engines, and railties goes here. + # + # These settings can be overridden in specific environments using the files + # in config/environments, which are processed later. + # + # config.time_zone = "Central Time (US & Canada)" + # config.eager_load_paths << Rails.root.join("extras") + config.hosts << "autoinstall.msi.stef.lan" + end +end diff --git a/src/autogen/config/boot.rb b/src/autogen/config/boot.rb new file mode 100644 index 0000000..988a5dd --- /dev/null +++ b/src/autogen/config/boot.rb @@ -0,0 +1,4 @@ +ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) + +require "bundler/setup" # Set up gems listed in the Gemfile. +require "bootsnap/setup" # Speed up boot time by caching expensive operations. diff --git a/src/autogen/config/cable.yml b/src/autogen/config/cable.yml new file mode 100644 index 0000000..6ce475e --- /dev/null +++ b/src/autogen/config/cable.yml @@ -0,0 +1,10 @@ +development: + adapter: async + +test: + adapter: test + +production: + adapter: redis + url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> + channel_prefix: autogen_production diff --git a/src/autogen/config/credentials.yml.enc b/src/autogen/config/credentials.yml.enc new file mode 100644 index 0000000..b559ad2 --- /dev/null +++ b/src/autogen/config/credentials.yml.enc @@ -0,0 +1 @@ +Pu7UsIECoqYcIGNuzbxA0Jk148K5ixxvy/CcBUOKWjcHhLKnkZesYbIkPQ+/tBlu+2vYtVivpCLEieCSPNyFG5eRErgXuZUGjm4bajzfflR2rrujd54F3+rPGCo8aFD7PIUEeK7IGgVIfwtOIPfbOoul/5eXthbqkfT8Jx6AmwbizhnPacSL2zsBNoSquTEwE4LXFg7zT4UQXBE8WRrCsJkTRJHV6/2oOJl0fxeJIVgoU5DIG47m7haEjR4Me7l5HPZUFpnQktZ3xKypMBA6DaMg8IAP4KQfmlZ9WXNdpb6p8yhuF4ssow3j8U7fQM7DddRG8plLQv6BKu9BIdASw8vi85cD3dm2CbMozC2coTzYfL68vp31OcogCW7ZMWlg1NZKq1V3YeZowbsAiaD3KtzU9z9b--S3olxmjIJNRe1fsE--UHStYIhSHH/X1a39+VSxqg== \ No newline at end of file diff --git a/src/autogen/config/environment.rb b/src/autogen/config/environment.rb new file mode 100644 index 0000000..cac5315 --- /dev/null +++ b/src/autogen/config/environment.rb @@ -0,0 +1,5 @@ +# Load the Rails application. +require_relative "application" + +# Initialize the Rails application. +Rails.application.initialize! diff --git a/src/autogen/config/environments/development.rb b/src/autogen/config/environments/development.rb new file mode 100644 index 0000000..a695867 --- /dev/null +++ b/src/autogen/config/environments/development.rb @@ -0,0 +1,67 @@ +require "active_support/core_ext/integer/time" + +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # In the development environment your application's code is reloaded any time + # it changes. This slows down response time but is perfect for development + # since you don't have to restart the web server when you make code changes. + config.enable_reloading = true + + # Do not eager load code on boot. + config.eager_load = false + + # Show full error reports. + config.consider_all_requests_local = true + + # Enable server timing + config.server_timing = true + + # Enable/disable caching. By default caching is disabled. + # Run rails dev:cache to toggle caching. + if Rails.root.join("tmp/caching-dev.txt").exist? + config.action_controller.perform_caching = true + config.action_controller.enable_fragment_cache_logging = true + + config.cache_store = :memory_store + config.public_file_server.headers = { + "Cache-Control" => "public, max-age=#{2.days.to_i}" + } + else + config.action_controller.perform_caching = false + + config.cache_store = :null_store + end + + # Don't care if the mailer can't send. + config.action_mailer.raise_delivery_errors = false + + config.action_mailer.perform_caching = false + + # Print deprecation notices to the Rails logger. + config.active_support.deprecation = :log + + # Raise exceptions for disallowed deprecations. + config.active_support.disallowed_deprecation = :raise + + # Tell Active Support which deprecation messages to disallow. + config.active_support.disallowed_deprecation_warnings = [] + + # Highlight code that enqueued background job in logs. + config.active_job.verbose_enqueue_logs = true + + # Suppress logger output for asset requests. + config.assets.quiet = true + + # Raises error for missing translations. + # config.i18n.raise_on_missing_translations = true + + # Annotate rendered view with file names. + # config.action_view.annotate_rendered_view_with_filenames = true + + # Uncomment if you wish to allow Action Cable access from any origin. + # config.action_cable.disable_request_forgery_protection = true + + # Raise error when a before_action's only/except options reference missing actions + config.action_controller.raise_on_missing_callback_actions = true +end diff --git a/src/autogen/config/environments/production.rb b/src/autogen/config/environments/production.rb new file mode 100644 index 0000000..2d97372 --- /dev/null +++ b/src/autogen/config/environments/production.rb @@ -0,0 +1,91 @@ +require "active_support/core_ext/integer/time" + +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # Code is not reloaded between requests. + config.enable_reloading = false + + # Eager load code on boot. This eager loads most of Rails and + # your application in memory, allowing both threaded web servers + # and those relying on copy on write to perform better. + # Rake tasks automatically ignore this option for performance. + config.eager_load = true + + # Full error reports are disabled and caching is turned on. + config.consider_all_requests_local = false + config.action_controller.perform_caching = true + + # Ensures that a master key has been made available in ENV["RAILS_MASTER_KEY"], config/master.key, or an environment + # key such as config/credentials/production.key. This key is used to decrypt credentials (and other encrypted files). + # config.require_master_key = true + + # Disable serving static files from `public/`, relying on NGINX/Apache to do so instead. + # config.public_file_server.enabled = false + + # Compress CSS using a preprocessor. + # config.assets.css_compressor = :sass + + # Do not fall back to assets pipeline if a precompiled asset is missed. + config.assets.compile = false + + # Enable serving of images, stylesheets, and JavaScripts from an asset server. + # config.asset_host = "http://assets.example.com" + + # Specifies the header that your server uses for sending files. + # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache + # config.action_dispatch.x_sendfile_header = "X-Accel-Redirect" # for NGINX + + # Mount Action Cable outside main process or domain. + # config.action_cable.mount_path = nil + # config.action_cable.url = "wss://example.com/cable" + # config.action_cable.allowed_request_origins = [ "http://example.com", /http:\/\/example.*/ ] + + # Assume all access to the app is happening through a SSL-terminating reverse proxy. + # Can be used together with config.force_ssl for Strict-Transport-Security and secure cookies. + # config.assume_ssl = true + + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. + config.force_ssl = true + + # Log to STDOUT by default + config.logger = ActiveSupport::Logger.new(STDOUT) + .tap { |logger| logger.formatter = ::Logger::Formatter.new } + .then { |logger| ActiveSupport::TaggedLogging.new(logger) } + + # Prepend all log lines with the following tags. + config.log_tags = [ :request_id ] + + # "info" includes generic and useful information about system operation, but avoids logging too much + # information to avoid inadvertent exposure of personally identifiable information (PII). If you + # want to log everything, set the level to "debug". + config.log_level = ENV.fetch("RAILS_LOG_LEVEL", "info") + + # Use a different cache store in production. + # config.cache_store = :mem_cache_store + + # Use a real queuing backend for Active Job (and separate queues per environment). + # config.active_job.queue_adapter = :resque + # config.active_job.queue_name_prefix = "autogen_production" + + config.action_mailer.perform_caching = false + + # Ignore bad email addresses and do not raise email delivery errors. + # Set this to true and configure the email server for immediate delivery to raise delivery errors. + # config.action_mailer.raise_delivery_errors = false + + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to + # the I18n.default_locale when a translation cannot be found). + config.i18n.fallbacks = true + + # Don't log any deprecations. + config.active_support.report_deprecations = false + + # Enable DNS rebinding protection and other `Host` header attacks. + # config.hosts = [ + # "example.com", # Allow requests from example.com + # /.*\.example\.com/ # Allow requests from subdomains like `www.example.com` + # ] + # Skip DNS rebinding protection for the default health check endpoint. + # config.host_authorization = { exclude: ->(request) { request.path == "/up" } } +end diff --git a/src/autogen/config/environments/test.rb b/src/autogen/config/environments/test.rb new file mode 100644 index 0000000..c468e29 --- /dev/null +++ b/src/autogen/config/environments/test.rb @@ -0,0 +1,61 @@ +require "active_support/core_ext/integer/time" + +# The test environment is used exclusively to run your application's +# test suite. You never need to work with it otherwise. Remember that +# your test database is "scratch space" for the test suite and is wiped +# and recreated between test runs. Don't rely on the data there! + +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # While tests run files are not watched, reloading is not necessary. + config.enable_reloading = false + + # Eager loading loads your entire application. When running a single test locally, + # this is usually not necessary, and can slow down your test suite. However, it's + # recommended that you enable it in continuous integration systems to ensure eager + # loading is working properly before deploying your code. + config.eager_load = ENV["CI"].present? + + # Configure public file server for tests with Cache-Control for performance. + config.public_file_server.enabled = true + config.public_file_server.headers = { + "Cache-Control" => "public, max-age=#{1.hour.to_i}" + } + + # Show full error reports and disable caching. + config.consider_all_requests_local = true + config.action_controller.perform_caching = false + config.cache_store = :null_store + + # Render exception templates for rescuable exceptions and raise for other exceptions. + config.action_dispatch.show_exceptions = :rescuable + + # Disable request forgery protection in test environment. + config.action_controller.allow_forgery_protection = false + + config.action_mailer.perform_caching = false + + # Tell Action Mailer not to deliver emails to the real world. + # The :test delivery method accumulates sent emails in the + # ActionMailer::Base.deliveries array. + config.action_mailer.delivery_method = :test + + # Print deprecation notices to the stderr. + config.active_support.deprecation = :stderr + + # Raise exceptions for disallowed deprecations. + config.active_support.disallowed_deprecation = :raise + + # Tell Active Support which deprecation messages to disallow. + config.active_support.disallowed_deprecation_warnings = [] + + # Raises error for missing translations. + # config.i18n.raise_on_missing_translations = true + + # Annotate rendered view with file names. + # config.action_view.annotate_rendered_view_with_filenames = true + + # Raise error when a before_action's only/except options reference missing actions + config.action_controller.raise_on_missing_callback_actions = true +end diff --git a/src/autogen/config/initializers/assets.rb b/src/autogen/config/initializers/assets.rb new file mode 100644 index 0000000..2eeef96 --- /dev/null +++ b/src/autogen/config/initializers/assets.rb @@ -0,0 +1,12 @@ +# Be sure to restart your server when you modify this file. + +# Version of your assets, change this if you want to expire all your assets. +Rails.application.config.assets.version = "1.0" + +# Add additional assets to the asset load path. +# Rails.application.config.assets.paths << Emoji.images_path + +# Precompile additional assets. +# application.js, application.css, and all non-JS/CSS in the app/assets +# folder are already added. +# Rails.application.config.assets.precompile += %w( admin.js admin.css ) diff --git a/src/autogen/config/initializers/content_security_policy.rb b/src/autogen/config/initializers/content_security_policy.rb new file mode 100644 index 0000000..b3076b3 --- /dev/null +++ b/src/autogen/config/initializers/content_security_policy.rb @@ -0,0 +1,25 @@ +# Be sure to restart your server when you modify this file. + +# Define an application-wide content security policy. +# See the Securing Rails Applications Guide for more information: +# https://guides.rubyonrails.org/security.html#content-security-policy-header + +# Rails.application.configure do +# config.content_security_policy do |policy| +# policy.default_src :self, :https +# policy.font_src :self, :https, :data +# policy.img_src :self, :https, :data +# policy.object_src :none +# policy.script_src :self, :https +# policy.style_src :self, :https +# # Specify URI for violation reports +# # policy.report_uri "/csp-violation-report-endpoint" +# end +# +# # Generate session nonces for permitted importmap, inline scripts, and inline styles. +# config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s } +# config.content_security_policy_nonce_directives = %w(script-src style-src) +# +# # Report violations without enforcing the policy. +# # config.content_security_policy_report_only = true +# end diff --git a/src/autogen/config/initializers/filter_parameter_logging.rb b/src/autogen/config/initializers/filter_parameter_logging.rb new file mode 100644 index 0000000..c2d89e2 --- /dev/null +++ b/src/autogen/config/initializers/filter_parameter_logging.rb @@ -0,0 +1,8 @@ +# Be sure to restart your server when you modify this file. + +# Configure parameters to be partially matched (e.g. passw matches password) and filtered from the log file. +# Use this to limit dissemination of sensitive information. +# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors. +Rails.application.config.filter_parameters += [ + :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn +] diff --git a/src/autogen/config/initializers/inflections.rb b/src/autogen/config/initializers/inflections.rb new file mode 100644 index 0000000..3860f65 --- /dev/null +++ b/src/autogen/config/initializers/inflections.rb @@ -0,0 +1,16 @@ +# Be sure to restart your server when you modify this file. + +# Add new inflection rules using the following format. Inflections +# are locale specific, and you may define rules for as many different +# locales as you wish. All of these examples are active by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.plural /^(ox)$/i, "\\1en" +# inflect.singular /^(ox)en/i, "\\1" +# inflect.irregular "person", "people" +# inflect.uncountable %w( fish sheep ) +# end + +# These inflection rules are supported but not enabled by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.acronym "RESTful" +# end diff --git a/src/autogen/config/initializers/permissions_policy.rb b/src/autogen/config/initializers/permissions_policy.rb new file mode 100644 index 0000000..7db3b95 --- /dev/null +++ b/src/autogen/config/initializers/permissions_policy.rb @@ -0,0 +1,13 @@ +# Be sure to restart your server when you modify this file. + +# Define an application-wide HTTP permissions policy. For further +# information see: https://developers.google.com/web/updates/2018/06/feature-policy + +# Rails.application.config.permissions_policy do |policy| +# policy.camera :none +# policy.gyroscope :none +# policy.microphone :none +# policy.usb :none +# policy.fullscreen :self +# policy.payment :self, "https://secure.example.com" +# end diff --git a/src/autogen/config/locales/en.yml b/src/autogen/config/locales/en.yml new file mode 100644 index 0000000..6c349ae --- /dev/null +++ b/src/autogen/config/locales/en.yml @@ -0,0 +1,31 @@ +# Files in the config/locales directory are used for internationalization and +# are automatically loaded by Rails. If you want to use locales other than +# English, add the necessary files in this directory. +# +# To use the locales, use `I18n.t`: +# +# I18n.t "hello" +# +# In views, this is aliased to just `t`: +# +# <%= t("hello") %> +# +# To use a different locale, set it with `I18n.locale`: +# +# I18n.locale = :es +# +# This would use the information in config/locales/es.yml. +# +# To learn more about the API, please read the Rails Internationalization guide +# at https://guides.rubyonrails.org/i18n.html. +# +# Be aware that YAML interprets the following case-insensitive strings as +# booleans: `true`, `false`, `on`, `off`, `yes`, `no`. Therefore, these strings +# must be quoted to be interpreted as strings. For example: +# +# en: +# "yes": yup +# enabled: "ON" + +en: + hello: "Hello world" diff --git a/src/autogen/config/mongoid.yml b/src/autogen/config/mongoid.yml new file mode 100644 index 0000000..3362a0c --- /dev/null +++ b/src/autogen/config/mongoid.yml @@ -0,0 +1,185 @@ +development: + # Configure available database clients. (required) + clients: + # Defines the default client. (required) + default: + # Mongoid can connect to a URI accepted by the driver: + uri: mongodb://railszen:railszen@mongo:27017/railszen + # Otherwise define the parameters separately. + # This defines the name of the default database that Mongoid can connect to. + # (required). + # database: autodeploy_development + # Provides the hosts the default client can connect to. Must be an array + # of host:port pairs. (required) + # hosts: + # - localhost:27017 + options: + # Note that all options listed below are Ruby driver client options (the mongo gem). + # Please refer to the driver documentation of the version of the mongo gem you are using + # for the most up-to-date list of options. + # + # Change the default write concern. (default = { w: 1 }) + # write: + # w: 1 + + # Change the default read preference. Valid options for mode are: :secondary, + # :secondary_preferred, :primary, :primary_preferred, :nearest + # (default: primary) + # read: + # mode: :secondary_preferred + # tag_sets: + # - use: web + + # The name of the user for authentication. + # user: 'user' + + # The password of the user for authentication. + # password: 'password' + + # The user's database roles. + # roles: + # - 'dbOwner' + + # Change the default authentication mechanism. Valid options are: :scram, + # :mongodb_cr, :mongodb_x509, and :plain. Note that all authentication + # mechanisms require username and password, with the exception of :mongodb_x509. + # Default on mongoDB 3.0 is :scram, default on 2.4 and 2.6 is :plain. + # auth_mech: :scram + + # The database or source to authenticate the user against. + # (default: the database specified above or admin) + # auth_source: admin + + # Force a the driver cluster to behave in a certain manner instead of auto- + # discovering. Can be one of: :direct, :replica_set, :sharded. Set to :direct + # when connecting to hidden members of a replica set. + # connect: :direct + + # Changes the default time in seconds the server monitors refresh their status + # via hello commands. (default: 10) + # heartbeat_frequency: 10 + + # The time in seconds for selecting servers for a near read preference. (default: 0.015) + # local_threshold: 0.015 + + # The timeout in seconds for selecting a server for an operation. (default: 30) + # server_selection_timeout: 30 + + # The maximum number of connections in the connection pool. (default: 5) + # max_pool_size: 5 + + # The minimum number of connections in the connection pool. (default: 1) + # min_pool_size: 1 + + # The time to wait, in seconds, in the connection pool for a connection + # to be checked in before timing out. (default: 5) + # wait_queue_timeout: 5 + + # The time to wait to establish a connection before timing out, in seconds. + # (default: 10) + # connect_timeout: 10 + + # How long to wait for a response for each operation sent to the + # server. This timeout should be set to a value larger than the + # processing time for the longest operation that will be executed + # by the application. Note that this is a client-side timeout; + # the server may continue executing an operation after the client + # aborts it with the SocketTimeout exception. + # (default: nil, meaning no timeout) + # socket_timeout: 5 + + # The name of the replica set to connect to. Servers provided as seeds that do + # not belong to this replica set will be ignored. + # replica_set: name + + # Whether to connect to the servers via ssl. (default: false) + # ssl: true + + # The certificate file used to identify the connection against MongoDB. + # ssl_cert: /path/to/my.cert + + # The private keyfile used to identify the connection against MongoDB. + # Note that even if the key is stored in the same file as the certificate, + # both need to be explicitly specified. + # ssl_key: /path/to/my.key + + # A passphrase for the private key. + # ssl_key_pass_phrase: password + + # Whether to do peer certification validation. (default: true) + # ssl_verify: true + + # The file containing concatenated certificate authority certificates + # used to validate certs passed from the other end of the connection. + # ssl_ca_cert: /path/to/ca.cert + + # Whether to truncate long log lines. (default: true) + # truncate_logs: true + + # Configure Mongoid specific options. (optional) + options: + # Application name that is printed to the mongodb logs upon establishing + # a connection in server versions >= 3.4. Note that the name cannot + # exceed 128 bytes. It is also used as the database name if the + # database name is not explicitly defined. (default: nil) + # app_name: MyApplicationName + + # Mark belongs_to associations as required by default, so that saving a + # model with a missing belongs_to association will trigger a validation + # error. (default: true) + # belongs_to_required_by_default: true + + # Raise an exception when a field is redefined. (default: false) + # duplicate_fields_exception: false + + # Include the root model name in json serialization. (default: false) + # include_root_in_json: false + + # Include the _type field in serialization. (default: false) + # include_type_for_serialization: false + + # Whether to join nested persistence contexts for atomic operations + # to parent contexts by default. (default: false) + # join_contexts: false + + # Set the Mongoid and Ruby driver log levels when Mongoid is not using + # Ruby on Rails logger instance. (default: :info) + # log_level: :info + + # Preload all models in development, needed when models use + # inheritance. (default: false) + # preload_models: false + + # Raise an error when performing a #find and the document is not found. + # (default: true) + raise_not_found_error: false + + # Raise an error when defining a scope with the same name as an + # existing method. (default: false) + # scope_overwrite_exception: false + + # Use ActiveSupport's time zone in time operations instead of + # the Ruby default time zone. See the time zone section below for + # further information. (default: true) + # use_activesupport_time_zone: true + + # Return stored times as UTC. See the time zone section below for + # further information. Most applications should not use this option. + # (default: false) + # use_utc: false + + # (Deprecated) In MongoDB 4.0 and earlier, set whether to create + # indexes in the background by default. (default: false) + # background_indexing: false + +test: + clients: + default: + uri: mongodb://railszen:railszen@mongo:27017/railszen + # database: autodeploy_test + # hosts: + # - localhost:27017 + options: + read: + mode: :primary + max_pool_size: 1 \ No newline at end of file diff --git a/src/autogen/config/puma.rb b/src/autogen/config/puma.rb new file mode 100644 index 0000000..afa809b --- /dev/null +++ b/src/autogen/config/puma.rb @@ -0,0 +1,35 @@ +# This configuration file will be evaluated by Puma. The top-level methods that +# are invoked here are part of Puma's configuration DSL. For more information +# about methods provided by the DSL, see https://puma.io/puma/Puma/DSL.html. + +# Puma can serve each request in a thread from an internal thread pool. +# The `threads` method setting takes two numbers: a minimum and maximum. +# Any libraries that use thread pools should be configured to match +# the maximum value specified for Puma. Default is set to 5 threads for minimum +# and maximum; this matches the default thread size of Active Record. +max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } +min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count } +threads min_threads_count, max_threads_count + +# Specifies that the worker count should equal the number of processors in production. +if ENV["RAILS_ENV"] == "production" + require "concurrent-ruby" + worker_count = Integer(ENV.fetch("WEB_CONCURRENCY") { Concurrent.physical_processor_count }) + workers worker_count if worker_count > 1 +end + +# Specifies the `worker_timeout` threshold that Puma will use to wait before +# terminating a worker in development environments. +worker_timeout 3600 if ENV.fetch("RAILS_ENV", "development") == "development" + +# Specifies the `port` that Puma will listen on to receive requests; default is 3000. +port ENV.fetch("PORT") { 3000 } + +# Specifies the `environment` that Puma will run in. +environment ENV.fetch("RAILS_ENV") { "development" } + +# Specifies the `pidfile` that Puma will use. +pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" } + +# Allow puma to be restarted by `bin/rails restart` command. +plugin :tmp_restart diff --git a/src/autogen/config/routes.rb b/src/autogen/config/routes.rb new file mode 100644 index 0000000..87a79c1 --- /dev/null +++ b/src/autogen/config/routes.rb @@ -0,0 +1,12 @@ +Rails.application.routes.draw do + resources :scripts + root 'home#index' + # Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html + + # Reveal health status on /up that returns 200 if the app boots with no exceptions, otherwise 500. + # Can be used by load balancers and uptime monitors to verify that the app is live. + get "up" => "rails/health#show", as: :rails_health_check + + # Defines the root path route ("/") + # root "posts#index" +end diff --git a/src/autogen/lib/assets/.keep b/src/autogen/lib/assets/.keep new file mode 100644 index 0000000..e69de29 diff --git a/src/autogen/lib/tasks/.keep b/src/autogen/lib/tasks/.keep new file mode 100644 index 0000000..e69de29 diff --git a/src/autogen/log/.keep b/src/autogen/log/.keep new file mode 100644 index 0000000..e69de29 diff --git a/src/autogen/public/404.html b/src/autogen/public/404.html new file mode 100644 index 0000000..2be3af2 --- /dev/null +++ b/src/autogen/public/404.html @@ -0,0 +1,67 @@ + + + + The page you were looking for doesn't exist (404) + + + + + + +
+
+

The page you were looking for doesn't exist.

+

You may have mistyped the address or the page may have moved.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/src/autogen/public/422.html b/src/autogen/public/422.html new file mode 100644 index 0000000..c08eac0 --- /dev/null +++ b/src/autogen/public/422.html @@ -0,0 +1,67 @@ + + + + The change you wanted was rejected (422) + + + + + + +
+
+

The change you wanted was rejected.

+

Maybe you tried to change something you didn't have access to.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/src/autogen/public/500.html b/src/autogen/public/500.html new file mode 100644 index 0000000..78a030a --- /dev/null +++ b/src/autogen/public/500.html @@ -0,0 +1,66 @@ + + + + We're sorry, but something went wrong (500) + + + + + + +
+
+

We're sorry, but something went wrong.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/src/autogen/public/apple-touch-icon-precomposed.png b/src/autogen/public/apple-touch-icon-precomposed.png new file mode 100644 index 0000000..e69de29 diff --git a/src/autogen/public/apple-touch-icon.png b/src/autogen/public/apple-touch-icon.png new file mode 100644 index 0000000..e69de29 diff --git a/src/autogen/public/favicon.ico b/src/autogen/public/favicon.ico new file mode 100644 index 0000000..e69de29 diff --git a/src/autogen/public/robots.txt b/src/autogen/public/robots.txt new file mode 100644 index 0000000..c19f78a --- /dev/null +++ b/src/autogen/public/robots.txt @@ -0,0 +1 @@ +# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file diff --git a/src/autogen/storage/.keep b/src/autogen/storage/.keep new file mode 100644 index 0000000..e69de29 diff --git a/src/autogen/test/application_system_test_case.rb b/src/autogen/test/application_system_test_case.rb new file mode 100644 index 0000000..d19212a --- /dev/null +++ b/src/autogen/test/application_system_test_case.rb @@ -0,0 +1,5 @@ +require "test_helper" + +class ApplicationSystemTestCase < ActionDispatch::SystemTestCase + driven_by :selenium, using: :chrome, screen_size: [1400, 1400] +end diff --git a/src/autogen/test/channels/application_cable/connection_test.rb b/src/autogen/test/channels/application_cable/connection_test.rb new file mode 100644 index 0000000..6340bf9 --- /dev/null +++ b/src/autogen/test/channels/application_cable/connection_test.rb @@ -0,0 +1,13 @@ +require "test_helper" + +module ApplicationCable + class ConnectionTest < ActionCable::Connection::TestCase + # test "connects with cookies" do + # cookies.signed[:user_id] = 42 + # + # connect + # + # assert_equal connection.user_id, "42" + # end + end +end diff --git a/src/autogen/test/controllers/.keep b/src/autogen/test/controllers/.keep new file mode 100644 index 0000000..e69de29 diff --git a/src/autogen/test/controllers/home_controller_test.rb b/src/autogen/test/controllers/home_controller_test.rb new file mode 100644 index 0000000..f6f3785 --- /dev/null +++ b/src/autogen/test/controllers/home_controller_test.rb @@ -0,0 +1,8 @@ +require "test_helper" + +class HomeControllerTest < ActionDispatch::IntegrationTest + test "should get index" do + get home_index_url + assert_response :success + end +end diff --git a/src/autogen/test/controllers/scripts_controller_test.rb b/src/autogen/test/controllers/scripts_controller_test.rb new file mode 100644 index 0000000..fe89ff1 --- /dev/null +++ b/src/autogen/test/controllers/scripts_controller_test.rb @@ -0,0 +1,48 @@ +require "test_helper" + +class ScriptsControllerTest < ActionDispatch::IntegrationTest + setup do + @script = scripts(:one) + end + + test "should get index" do + get scripts_url + assert_response :success + end + + test "should get new" do + get new_script_url + assert_response :success + end + + test "should create script" do + assert_difference("Script.count") do + post scripts_url, params: { script: { content: @script.content, description: @script.description, lang: @script.lang, lock: @script.lock, name: @script.name, stage: @script.stage } } + end + + assert_redirected_to script_url(Script.last) + end + + test "should show script" do + get script_url(@script) + assert_response :success + end + + test "should get edit" do + get edit_script_url(@script) + assert_response :success + end + + test "should update script" do + patch script_url(@script), params: { script: { content: @script.content, description: @script.description, lang: @script.lang, lock: @script.lock, name: @script.name, stage: @script.stage } } + assert_redirected_to script_url(@script) + end + + test "should destroy script" do + assert_difference("Script.count", -1) do + delete script_url(@script) + end + + assert_redirected_to scripts_url + end +end diff --git a/src/autogen/test/fixtures/files/.keep b/src/autogen/test/fixtures/files/.keep new file mode 100644 index 0000000..e69de29 diff --git a/src/autogen/test/fixtures/scripts.yml b/src/autogen/test/fixtures/scripts.yml new file mode 100644 index 0000000..84b56a2 --- /dev/null +++ b/src/autogen/test/fixtures/scripts.yml @@ -0,0 +1,17 @@ +# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + name: MyString + stage: MyString + lang: MyString + content: MyText + lock: false + description: MyText + +two: + name: MyString + stage: MyString + lang: MyString + content: MyText + lock: false + description: MyText diff --git a/src/autogen/test/helpers/.keep b/src/autogen/test/helpers/.keep new file mode 100644 index 0000000..e69de29 diff --git a/src/autogen/test/integration/.keep b/src/autogen/test/integration/.keep new file mode 100644 index 0000000..e69de29 diff --git a/src/autogen/test/mailers/.keep b/src/autogen/test/mailers/.keep new file mode 100644 index 0000000..e69de29 diff --git a/src/autogen/test/models/.keep b/src/autogen/test/models/.keep new file mode 100644 index 0000000..e69de29 diff --git a/src/autogen/test/models/script_test.rb b/src/autogen/test/models/script_test.rb new file mode 100644 index 0000000..dacb96b --- /dev/null +++ b/src/autogen/test/models/script_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +class ScriptTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/src/autogen/test/system/.keep b/src/autogen/test/system/.keep new file mode 100644 index 0000000..e69de29 diff --git a/src/autogen/test/system/scripts_test.rb b/src/autogen/test/system/scripts_test.rb new file mode 100644 index 0000000..9e4e472 --- /dev/null +++ b/src/autogen/test/system/scripts_test.rb @@ -0,0 +1,51 @@ +require "application_system_test_case" + +class ScriptsTest < ApplicationSystemTestCase + setup do + @script = scripts(:one) + end + + test "visiting the index" do + visit scripts_url + assert_selector "h1", text: "Scripts" + end + + test "should create script" do + visit scripts_url + click_on "New script" + + fill_in "Content", with: @script.content + fill_in "Description", with: @script.description + fill_in "Lang", with: @script.lang + check "Lock" if @script.lock + fill_in "Name", with: @script.name + fill_in "Stage", with: @script.stage + click_on "Create Script" + + assert_text "Script was successfully created" + click_on "Back" + end + + test "should update Script" do + visit script_url(@script) + click_on "Edit this script", match: :first + + fill_in "Content", with: @script.content + fill_in "Description", with: @script.description + fill_in "Lang", with: @script.lang + check "Lock" if @script.lock + fill_in "Name", with: @script.name + fill_in "Stage", with: @script.stage + click_on "Update Script" + + assert_text "Script was successfully updated" + click_on "Back" + end + + test "should destroy Script" do + visit script_url(@script) + click_on "Destroy this script", match: :first + + assert_text "Script was successfully destroyed" + end +end diff --git a/src/autogen/test/test_helper.rb b/src/autogen/test/test_helper.rb new file mode 100644 index 0000000..c3cf780 --- /dev/null +++ b/src/autogen/test/test_helper.rb @@ -0,0 +1,12 @@ +ENV["RAILS_ENV"] ||= "test" +require_relative "../config/environment" +require "rails/test_help" + +module ActiveSupport + class TestCase + # Run tests in parallel with specified workers + parallelize(workers: :number_of_processors) + + # Add more helper methods to be used by all tests here... + end +end diff --git a/src/autogen/tmp/.keep b/src/autogen/tmp/.keep new file mode 100644 index 0000000..e69de29 diff --git a/src/autogen/tmp/pids/.keep b/src/autogen/tmp/pids/.keep new file mode 100644 index 0000000..e69de29 diff --git a/src/autogen/tmp/storage/.keep b/src/autogen/tmp/storage/.keep new file mode 100644 index 0000000..e69de29 diff --git a/src/autogen/vendor/.keep b/src/autogen/vendor/.keep new file mode 100644 index 0000000..e69de29