-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commit inicial a partir de a143097a de [email protected]:pasosdeJesus/si…
…vel2
- Loading branch information
0 parents
commit 086d4a8
Showing
262 changed files
with
135,514 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh | ||
# Variables de configuración de la aplicación | ||
# Damos precedencia a las especificadas en línea de ordenes | ||
|
||
. ./.env.plantilla | ||
|
||
# Base de datos. Muy util: https://hub.docker.com/_/postgres | ||
export BD_USUARIO=runner | ||
export BD_CLAVE="" | ||
export BD_PRUEBA="sivel2gen_pru" | ||
export BD_SERVIDOR=postgres | ||
|
||
|
||
# Despliegue | ||
export CONFIG_HOSTS=www.example.com | ||
export DIRAP="/build/pasosdeJesus/sivel2/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
#!/bin/sh | ||
# Variables de configuración de la aplicación | ||
# Damos precedencia a las especificadas en línea de ordenes | ||
|
||
|
||
# Base de datos | ||
if (test "$BD_SERVIDOR" = "") then { | ||
export BD_SERVIDOR=/var/www/var/run/postgresql | ||
} fi; | ||
if (test "$BD_USUARIO" = "") then { | ||
export BD_USUARIO=sipdes | ||
} fi; | ||
if (test "$BD_CLAVE" = "") then { | ||
export BD_CLAVE=xyz | ||
} fi; | ||
if (test "$BD_DES" = "") then { | ||
export BD_DES=sivel21gen_des | ||
} fi; | ||
if (test "$BD_PRUEBA" = "") then { | ||
export BD_PRUEBA=sivel21gen_pru | ||
} fi; | ||
if (test "$BD_PRO" = "") then { | ||
export BD_PRO=sivel21gen_pro | ||
} fi; | ||
|
||
|
||
|
||
# Despliegue común desarrollo y producción | ||
if (test "$CONFIG_HOSTS" = "") then { | ||
export CONFIG_HOSTS="192.168.10.1" | ||
} fi; | ||
if (test "$RUTA_RELATIVA" = "") then { | ||
export RUTA_RELATIVA=/sivel2_1/ | ||
} fi; | ||
if (test "$DIRAP" = "") then { | ||
export DIRAP=/var/www/htdocs/sivel2_1 | ||
} fi; | ||
if (test "$RAILS_ENV" = "") then { | ||
export RAILS_ENV=development | ||
} fi; | ||
|
||
|
||
# Despliegue en modo desarrollo | ||
if (test "$IPDES" = "") then { | ||
export IPDES=192.168.10.1 | ||
} fi; | ||
if (test "$PUERTODES" = "") then { | ||
export PUERTODES=3000 | ||
} fi; | ||
if (test "" = "") then { # Conexión para recarga viva | ||
export MAQRECVIVA="192.168.10.1" | ||
} fi; | ||
if (test "" = "") then { # Puerto para recarga viva | ||
export PUERTORECVIVA=4500 | ||
} fi; | ||
|
||
|
||
# Despliegue en modo producción con unicorn | ||
if (test "$RC" = "") then { | ||
export RC=sivel2_1 | ||
} fi; | ||
if (test "$PUERTOUNICORN" = "") then { | ||
export PUERTOUNICORN=3015 | ||
} fi; | ||
if (test "$USUARIO_AP" = "") then { | ||
export USUARIO_AP=miusuario | ||
} fi; | ||
if (test "$ORIGEN_CORS" = "") then { | ||
# Permite peticiones al API desde los siguientes dominios | ||
export ORIGEN_CORS="localhost:8080,mi.dominio.org,192.168.1.1:3000" | ||
} fi; | ||
|
||
|
||
# Configuraciones requeridas por sip | ||
if (test "$SIP_FORMATO_FECHA" = "") then { | ||
export SIP_FORMATO_FECHA='dd/M/yyyy' | ||
} fi; | ||
if (test "$SIP_RUTA_ANEXOS" = "") then { | ||
export SIP_RUTA_ANEXOS=${DIRAP}/archivos/anexos | ||
} fi; | ||
if (test "$SIP_RUTA_VOLCADOS" = "") then { | ||
export SIP_RUTA_VOLCADOS=${DIRAP}/archivos/bd | ||
} fi; | ||
if (test "$SIP_TITULO" = "") then { | ||
export SIP_TITULO="SIVeL" | ||
} fi; | ||
|
||
|
||
# Configuraciones requeridas por heb412 | ||
if (test "$HEB412_RUTA" = "") then { | ||
export HEB412_RUTA=${DIRAP}/public/heb412 | ||
} fi; | ||
|
||
|
||
# Configuraciones de sivel2 | ||
if (test "$SIVEL2_CONSWEB_PUBLICA" = "") then { | ||
export SIVEL2_CONSWEB_PUBLICA= | ||
} fi; | ||
if (test "$SIVEL2_CONSWEB_MAX" = "") then { | ||
export SIVEL2_CONSWEB_MAX=2000 | ||
} fi; | ||
if (test "$SIVEL2_CONSWEB_EPILOGO" = "") then { | ||
export SIVEL2_CONSWEB_EPILOGO="<br>Si requiere más puede suscribirse a SIVeL Pro" | ||
} fi; | ||
if (test "$SIVEL2_CONSWEB_PIE" = "") then { | ||
export SIVEL2_CONSWEB_PIE='' | ||
} fi; | ||
if (test "$SIVEL2_MAPAOSM_DIASATRAS" = "") then { | ||
export SIVEL2_MAPAOSM_DIASATRAS=182 | ||
} fi; | ||
# Exportación a otro servidor | ||
if (test "$SIVEL2_EXP_USUARIO" = "") then { | ||
export SIVEL2_EXP_USUARIO=miusuario | ||
} fi; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# This workflow integrates Brakeman with GitHub's Code Scanning feature | ||
# Brakeman is a static analysis security vulnerability scanner for Ruby on Rails applications | ||
|
||
name: Brakeman Scan | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ main ] | ||
schedule: | ||
- cron: '24 13 * * 0' | ||
|
||
jobs: | ||
brakeman-scan: | ||
name: Brakeman Scan | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout the repository to the GitHub Actions runner | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
# Customize the ruby version depending on your needs | ||
- name: Setup Ruby | ||
uses: actions/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.0.2' | ||
|
||
- name: Setup Brakeman | ||
env: | ||
BRAKEMAN_VERSION: '4.10' # SARIF support is provided in Brakeman version 4.10+ | ||
run: | | ||
gem install brakeman --version $BRAKEMAN_VERSION | ||
# Execute Brakeman CLI and generate a SARIF output with the security issues identified during the analysis | ||
- name: Scan | ||
continue-on-error: true | ||
run: | | ||
brakeman -f sarif -o output.sarif.json . | ||
# Upload the SARIF file generated in the previous step | ||
- name: Upload SARIF | ||
uses: github/codeql-action/upload-sarif@v1 | ||
with: | ||
sarif_file: output.sarif.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ main ] | ||
schedule: | ||
- cron: '16 8 * * 3' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'javascript' ] | ||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] | ||
# Learn more: | ||
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v1 | ||
with: | ||
languages: ${{ matrix.language }} | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
# queries: ./path/to/local/query, your-org/your-repo/queries@main | ||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v1 | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 https://git.io/JvXDl | ||
|
||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | ||
# and modify them (or add more) to build your code if your project | ||
# uses a compiled language | ||
|
||
#- run: | | ||
# make bootstrap | ||
# make release | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# pulled from repo | ||
name: "Rubocop" | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ main ] | ||
schedule: | ||
- cron: '15 5 * * 6' | ||
|
||
jobs: | ||
rubocop: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
# If running on a self-hosted runner, check it meets the requirements | ||
# listed at https://github.com/ruby/setup-ruby#using-self-hosted-runners | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.0.1 | ||
|
||
# This step is not necessary if you add the gem to your Gemfile | ||
- name: Install Code Scanning integration | ||
run: bundle add code-scanning-rubocop --version 0.3.0 --skip-install | ||
|
||
- name: Install dependencies | ||
run: bundle install | ||
|
||
- name: Rubocop run | ||
run: | | ||
bash -c " | ||
bundle exec rubocop --require code_scanning --format CodeScanning::SarifFormatter -o rubocop.sarif | ||
[[ $? -ne 2 ]] | ||
" | ||
- name: Upload Sarif output | ||
uses: github/codeql-action/upload-sarif@v1 | ||
with: | ||
sarif_file: rubocop.sarif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
# This workflow will download a prebuilt Ruby version, install dependencies, and run linters | ||
name: Rails - Install dependencies and run linters | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
jobs: | ||
run-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Ruby and install gems | ||
uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e | ||
with: | ||
bundler-cache: true | ||
ruby-version: 3.0.0 | ||
# Add or Replace any other security checks here | ||
- name: Run security checks | ||
run: | | ||
bin/bundler-audit --update | ||
bin/brakeman -q -w2 | ||
# Add or Replace any other Linters here | ||
- name: Run linters | ||
run: | | ||
bin/rubocop --parallel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# 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 | ||
config/database.yml | ||
|
||
# Ignore the default SQLite database. | ||
/db/*.sqlite3 | ||
/db/*.sqlite3-journal | ||
|
||
# Ignore all logfiles and tempfiles. | ||
/log/*.log | ||
/tmp | ||
*~ | ||
*core | ||
|
||
public/assets/* | ||
config/initializers/sip.rb | ||
config/application.rb | ||
config/routes.rb | ||
archivos/ | ||
public/heb412/ | ||
public/sivel2/ | ||
public/sivel2_1/ | ||
config/initializers/punto_montaje.rb | ||
.byebug_history | ||
app/views/sip/hogar/ | ||
bin/u.sh | ||
coverage/ | ||
bin/corre.sh | ||
bin/detiene.sh | ||
bin/migra.sh | ||
|
||
# Ignore master key for decrypting credentials and more. | ||
/config/master.key | ||
|
||
/public/packs | ||
/public/packs-test | ||
/node_modules | ||
/yarn-error.log | ||
yarn-debug.log* | ||
.yarn-integrity | ||
config/credentials.yml.enc | ||
.env | ||
*.cp | ||
app/assets/builds/ | ||
app/javascript/controllers/sip | ||
app/javascript/controllers/mr519_gen | ||
app/javascript/controllers/heb412_gen | ||
app/javascript/controllers/cor1440_gen | ||
app/javascript/controllers/sal7711_gen | ||
app/javascript/controllers/sivel2_gen |
Oops, something went wrong.