-
-
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.
- Loading branch information
Showing
101 changed files
with
5,959 additions
and
5,741 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
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
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
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,67 @@ | ||
require: | ||
- rubocop-minitest | ||
- rubocop-rails | ||
|
||
inherit_gem: | ||
rubocop-shopify: rubocop.yml | ||
|
||
Style/FrozenStringLiteralComment: | ||
Enabled: true | ||
# SafeAutoCorrect: false | ||
|
||
Minitest/AssertPredicate: | ||
Enabled: false | ||
# 1. Hace más largo el assert porque transforma `assert caso.valid?` en | ||
# `assert_predicate caso, :valid?` | ||
# 2. EMHO no facilita legibilidad | ||
# 3. No es homogéneo, no transforma `assert_not caso.valid?` | ||
# La ventaja de assert_predicate es que presenta mejor | ||
# mensaje de error cuando la aserción falla. | ||
|
||
Minitest/MultipleAssertions: | ||
Enabled: false | ||
|
||
Rails/ApplicationRecord: | ||
Enabled: false | ||
|
||
Rails/LexicallyScopedActionFilter: | ||
Enabled: false | ||
|
||
Rails/SquishedSQLHeredocs: | ||
Enabled: false | ||
|
||
Rails/OutputSafety: | ||
Exclude: | ||
- lib/msip/engine.rb | ||
- app/helpers/msip/* | ||
|
||
Rails/Exit: | ||
Exclude: | ||
- lib/generators/msip/* | ||
|
||
Rails/Output: | ||
Exclude: | ||
- lib/generators/msip/* | ||
|
||
# En generadores Rails.root es nil | ||
Rails/FilePath: | ||
Exclude: | ||
- lib/msip/engine.rb | ||
|
||
Lint/RedundantStringCoercion: | ||
Exclude: | ||
- lib/msip/engine.rb | ||
|
||
Rails/RenderInline: | ||
Enabled: false | ||
|
||
Naming/AsciiIdentifiers: | ||
Enabled: false | ||
|
||
Metrics/ParameterLists: | ||
Enabled: false | ||
|
||
AllCops: | ||
NewCops: enable | ||
|
||
|
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,24 @@ | ||
# frozen_string_literal: true | ||
|
||
SimpleCov.formatters = [ | ||
SimpleCov::Formatter::SimpleFormatter, | ||
SimpleCov::Formatter::HTMLFormatter, | ||
] | ||
|
||
SimpleCov.coverage_dir("coverage") | ||
if ENV["CONFIG_HOSTS"] == "www.example.com" | ||
SimpleCov.coverage_dir("cobertura-unitarias") | ||
elsif ENV["CONFIG_HOSTS"] == "127.0.0.1" | ||
SimpleCov.coverage_dir("cobertura-sistema") | ||
end | ||
|
||
SimpleCov.start do | ||
enable_coverage :branch | ||
primary_coverage :branch | ||
enable_coverage_for_eval | ||
filters.clear # This will remove default :root_filter and :bundler_filter | ||
add_filter do |src| | ||
!(src.filename =~ /^#{SimpleCov.root}/) unless src.filename =~ /msip/ | ||
end | ||
add_filter "/test/" | ||
end |
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
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
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
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
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 |
---|---|---|
@@ -1,15 +1,48 @@ | ||
|
||
valida: valida-js valida-ruby | ||
all: sintaxis-js sintaxis-ruby bundler-audit brakeman rubocop | ||
|
||
valida-js: | ||
sintaxis-js: | ||
for i in `find app/assets/javascripts/ -name "*js" -or -name "*es6"`; do \ | ||
node -c $$i; \ | ||
done | ||
for i in `find app/assets/javascripts/ -name "*coffee"`; do \ | ||
coffee -o /tmp/ $$i; \ | ||
done | ||
|
||
valida-ruby: | ||
sintaxis-ruby: | ||
find . -name "*\.rb" -exec ruby -w -W2 -c {} ';' | ||
|
||
erd: | ||
bundle exec erd | ||
mv erd.pdf doc/ | ||
convert doc/erd.pdf doc/erd.png | ||
instala-gemas: | ||
grep "([0-9]" Gemfile.lock | sed -e "s/^ */doas gem install /g;s/ (/ -v /g;s/)//g" > /tmp/i.sh | ||
doas chmod +x /tmp/i.sh | ||
doas /tmp/i.sh | ||
|
||
erd: # Antes de esto instalar graphviz con doas pkg_add graphviz | ||
(cd test/dummy; \ | ||
bundle exec erd) | ||
mv test/dummy/erd.pdf doc/ | ||
pdftoppm doc/erd.pdf doc/erd | ||
convert doc/erd-1.ppm doc/erd.png | ||
rm doc/erd-1.ppm | ||
|
||
doc/dependencias.png: doc/dependencias.dot | ||
dot -Tpng doc/dependencias.dot > doc/dependencias.png | ||
|
||
|
||
bundler-audit: | ||
bin/bundler-audit | ||
|
||
brakeman: | ||
bin/brakeman | ||
|
||
rubocop: | ||
bin/rubocop | ||
|
||
c_brakeman: | ||
bin/brakeman -I | ||
|
||
c_rubocop: | ||
bin/rubocop -a | ||
|
||
yard: | ||
yard |
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
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
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
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
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
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
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
Oops, something went wrong.