-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Generate decidim module * Configure CI * Remove unused files * Fix gemspec * Add models * Change module name from superspace to superspaces * Backoffice skeleton * Public view skeleton * Lock Ubuntu to 22.04 in GH actions * Configure HTML linter * Skeleton for the views * Complete superspace model (#8) * Added locales and image to superspaces admin form * Added participatory spaces associations * Added basic layout for show * Changed update command * Added styles in admin form * Added section titles to superspace show * Fixed rubocop issues * Update app/commands/decidim/superspaces/admin/create_superspace.rb * Update app/commands/decidim/superspaces/admin/update_superspace.rb * Update app/commands/decidim/superspaces/admin/update_superspace.rb * Update app/models/decidim/superspaces/superspace.rb * Fixed lint issues * Fixed command create_superspace tests * Fixed error when creating a new superspace * Added new params to tests * Fixed style in locales * Fixed rubocop offenses * Fixed system tests * Fixed lint issues --------- Co-authored-by: Jose Illana Lope <[email protected]> Co-authored-by: Fran Bolívar <[email protected]> --------- Co-authored-by: pepeilo02 <[email protected]> Co-authored-by: Jose Illana Lope <[email protected]>
- Loading branch information
1 parent
7823c90
commit 0583f27
Showing
82 changed files
with
18,072 additions
and
68 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,2 @@ | ||
--exclude-exts=.min.css | ||
--ignore=adjoining-classes,box-model,ids,order-alphabetical,unqualified-attributes |
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,121 @@ | ||
--- | ||
glob: "app/{cells,views}/**/*.erb" | ||
exclude: | ||
- '**/vendor/**/*' | ||
- '**/node_modules/**/*' | ||
|
||
linters: | ||
ExtraNewline: | ||
enabled: true | ||
|
||
FinalNewline: | ||
enabled: true | ||
|
||
RequireInputAutocomplete: | ||
enabled: false | ||
|
||
SpaceAroundErbTag: | ||
enabled: true | ||
|
||
AllowedScriptType: | ||
enabled: true | ||
allowed_types: | ||
- text/javascript | ||
- text/template | ||
|
||
DeprecatedClasses: | ||
enabled: true | ||
addendum: "Please remove it from code." | ||
rule_set: | ||
- deprecated: ['process-content'] | ||
suggestion: "This class is deprecated. Please remove the surrounding element" | ||
- deprecated: ['xlarge-[\w]*'] | ||
suggestion: "Foundation classes are deprecated." | ||
|
||
Rubocop: | ||
enabled: true | ||
|
||
rubocop_config: | ||
inherit_from: | ||
- .rubocop.yml | ||
|
||
AllCops: | ||
DisabledByDefault: true | ||
|
||
Layout/InitialIndentation: | ||
Enabled: false | ||
|
||
Lint/SymbolConversion: | ||
Enabled: false | ||
|
||
Layout/SpaceInsideParens: | ||
Enabled: false | ||
|
||
Layout/SpaceAfterColon: | ||
Enabled: false | ||
|
||
Lint/UselessAssignment: | ||
Enabled: false | ||
|
||
Layout/ArgumentAlignment: | ||
Enabled: true | ||
|
||
Layout/SpaceAfterComma: | ||
Enabled: false | ||
|
||
Layout/TrailingWhitespace: | ||
Enabled: false | ||
|
||
Layout/LeadingEmptyLines: | ||
Enabled: false | ||
|
||
Layout/SpaceBeforeComma: | ||
Enabled: false | ||
|
||
Style/Copyright: | ||
Enabled: false | ||
|
||
Style/FrozenStringLiteralComment: | ||
Enabled: false | ||
|
||
Style/StringLiterals: | ||
EnforcedStyle: double_quotes | ||
|
||
Layout/LineLength: | ||
Enabled: false | ||
|
||
Layout/FirstArgumentIndentation: | ||
Enabled: false | ||
|
||
Layout/SpaceInsideHashLiteralBraces: | ||
Enabled: true | ||
|
||
Layout/BlockAlignment: | ||
Enabled: false | ||
|
||
Layout/MultilineMethodCallBraceLayout: | ||
Enabled: false | ||
|
||
Layout/FirstArrayElementIndentation: | ||
Enabled: false | ||
|
||
Layout/TrailingEmptyLines: | ||
Enabled: false | ||
|
||
Naming/FileName: | ||
Enabled: false | ||
|
||
Rails/LinkToBlank: | ||
Enabled: false | ||
|
||
Naming/VariableName: | ||
Enabled: false | ||
|
||
Layout/MultilineMethodCallIndentation: | ||
Enabled: true | ||
|
||
Layout/IndentationWidth: | ||
Enabled: false | ||
|
||
Layout/MultilineAssignmentLayout: | ||
Enabled: false |
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,13 @@ | ||
**/*{.,-}min.js | ||
spec/decidim_dummy_app/**/*.js | ||
development_app | ||
**/node_modules/** | ||
bundle.js | ||
karma.conf.js | ||
webpack.config.js | ||
webpack.config.babel.js | ||
entry.test.js | ||
entry.js | ||
*_manifest.js | ||
coverage | ||
vendor/bundle |
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,3 @@ | ||
{ | ||
"extends": ["@decidim"] | ||
} |
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,75 @@ | ||
name: "[CI] Lint" | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- release/* | ||
- "*-stable" | ||
pull_request: | ||
branches-ignore: | ||
- "chore/l10n*" | ||
|
||
env: | ||
CI: "true" | ||
RUBY_VERSION: 3.1.1 | ||
NODE_VERSION: 18.17.1 | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
main: | ||
name: Lint | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 30 | ||
services: | ||
postgres: | ||
image: postgres:14 | ||
ports: ["5432:5432"] | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
env: | ||
POSTGRES_PASSWORD: postgres | ||
env: | ||
DATABASE_USERNAME: postgres | ||
DATABASE_PASSWORD: postgres | ||
DATABASE_HOST: localhost | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
ruby-version: ${{ env.RUBY_VERSION }} | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: Get npm cache directory path | ||
id: npm-cache-dir-path | ||
run: echo "dir=$(npm get cache)-ub" >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v3 | ||
id: npm-cache | ||
with: | ||
path: ${{ steps.npm-cache-dir-path.outputs.dir }} | ||
key: npm-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
npm- | ||
- name: Install JS dependencies | ||
run: npm ci | ||
- run: bundle exec rubocop -P | ||
name: Lint Ruby files | ||
- run: npm run lint | ||
name: Lint JavaScript files | ||
- run: npm run stylelint | ||
name: Lint CSS files | ||
- run: npm run linthtml | ||
name: Lint HTML files | ||
- run: npm run markdownlint | ||
name: Lint Markdown files | ||
- run: npm run prettier | ||
name: Format files |
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,80 @@ | ||
name: "[CI] Test" | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
- release/* | ||
- "*-stable" | ||
pull_request: | ||
branches-ignore: | ||
- "chore/l10n*" | ||
|
||
env: | ||
CI: "true" | ||
RUBY_VERSION: 3.1.1 | ||
NODE_VERSION: 18.17.1 | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
main: | ||
name: Tests | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 30 | ||
services: | ||
postgres: | ||
image: postgres:14 | ||
ports: ["5432:5432"] | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
env: | ||
POSTGRES_PASSWORD: postgres | ||
env: | ||
DATABASE_USERNAME: postgres | ||
DATABASE_PASSWORD: postgres | ||
DATABASE_HOST: localhost | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
- name: Get npm cache directory path | ||
id: npm-cache-dir-path | ||
run: echo "dir=$(npm get cache)-superspaces" >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v3 | ||
id: npm-cache | ||
with: | ||
path: ${{ steps.npm-cache-dir-path.outputs.dir }} | ||
key: npm-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
npm- | ||
- name: Install JS dependencies | ||
run: npm ci | ||
- run: bundle exec rake test_app | ||
name: Create test app | ||
- run: mkdir -p ./spec/decidim_dummy_app/tmp/screenshots | ||
name: Create the screenshots folder | ||
- uses: nanasess/setup-chromedriver@v2 | ||
- run: RAILS_ENV=test bundle exec rails assets:precompile | ||
name: Precompile assets | ||
working-directory: ./spec/decidim_dummy_app/ | ||
- run: bundle exec rspec | ||
name: RSpec | ||
- uses: codecov/codecov-action@v3 | ||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: screenshots | ||
path: ./spec/decidim_dummy_app/tmp/screenshots | ||
if-no-files-found: ignore |
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,69 +1,24 @@ | ||
*.rbc | ||
capybara-*.html | ||
.rspec | ||
/db/*.sqlite3 | ||
/db/*.sqlite3-journal | ||
/db/*.sqlite3-[0-9]* | ||
/public/system | ||
/.bundle/ | ||
/.yardoc | ||
/_yardoc/ | ||
/coverage/ | ||
/spec/tmp | ||
*.orig | ||
rerun.txt | ||
pickle-email-*.html | ||
|
||
# Ignore all logfiles and tempfiles. | ||
/log/* | ||
/tmp/* | ||
!/log/.keep | ||
!/tmp/.keep | ||
|
||
# TODO Comment out this rule if you are OK with secrets being uploaded to the repo | ||
config/initializers/secret_token.rb | ||
config/master.key | ||
/doc/ | ||
/pkg/ | ||
/spec/reports/ | ||
/tmp/ | ||
.DS_Store | ||
node_modules/ | ||
|
||
# Only include if you have production secrets in this file, which is no longer a Rails default | ||
# config/secrets.yml | ||
# rspec failure tracking | ||
.rspec-failures | ||
|
||
# dotenv, dotenv-rails | ||
# TODO Comment out these rules if environment variables can be committed | ||
# env configuration files | ||
.env | ||
.env*.local | ||
|
||
## Environment normalization: | ||
/.bundle | ||
/vendor/bundle | ||
|
||
# these should all be checked in to normalize the environment: | ||
# Gemfile.lock, .ruby-version, .ruby-gemset | ||
|
||
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this: | ||
.rvmrc | ||
|
||
# if using bower-rails ignore default bower_components path bower.json files | ||
/vendor/assets/bower_components | ||
*.bowerrc | ||
bower.json | ||
|
||
# Ignore pow environment settings | ||
.powenv | ||
|
||
# Ignore Byebug command history file. | ||
.byebug_history | ||
|
||
# Ignore node_modules | ||
node_modules/ | ||
|
||
# Ignore precompiled javascript packs | ||
/public/packs | ||
/public/packs-test | ||
/public/assets | ||
.envrc | ||
.rbenv-vars | ||
|
||
# Ignore yarn files | ||
/yarn-error.log | ||
yarn-debug.log* | ||
.yarn-integrity | ||
# default test application | ||
spec/decidim_dummy_app | ||
|
||
# Ignore uploaded files in development | ||
/storage/* | ||
!/storage/.keep | ||
/public/uploads | ||
# default development application | ||
development_app |
Oops, something went wrong.