README.md in decidim-cdtb-0.1.2 vs README.md in decidim-cdtb-0.1.3

- old
+ new

@@ -6,21 +6,21 @@ ## Installation Install the gem and add to the application's Gemfile by executing: $ bundle add decidim-cdtb + $ bundle install -If bundler is not being used to manage dependencies, install the gem by executing: +Install CI tests on your app with: - $ gem install decidim-cdtb + $ bin/rails generate cdtb:validate_migrations_ci + ## Usage -### Rake tasks +### Organizations information -#### Organizations information - Returns information regarding the organizations in a multitenant installation that match a search term ignorecase. The following will return all the attributes for all organizations that contain the "vila" term in its host name: @@ -34,11 +34,11 @@ bin/rake cdtb:org_by_host_like[vila] >>> Organization [1] Sant Boi de Llobregat: host: localhost, time_zone: Madrid, locales: ca + [ca, es, oc], available authorizations: [postal_letter, members_picker_authorization_handler] ``` -#### Fix nicknames +### Fix nicknames In a previous version than Decidim v0.25 a validation to the `Decidim::User.nickname` was added with a migration to fix existing nicknames. But the migration was only taking into acocunt managed (impersonated) users. This task iterates (with `find_each`) over all non managed users and nicknamizes the nickname. @@ -46,32 +46,26 @@ ``` bin/rake cdtb:fix_nicknames ``` -#### Anonymize production dump +### Anonymize production dump Anonymize rake task was taken from https://github.com/AjuntamentdeBarcelona/decidim-barcelona Available rake tasks: -```bin/rake cdtb:anonymize:check``` allows you to check if you can anonymize production dump +- `bin/rake cdtb:anonymize:check` allows you to check if you can anonymize production dump +- `bin/rake cdtb:anonymize:all` anonymizes whole production dump (without proposals) +- `bin/rake cdtb:anonymize:users` anonymizes users +- `bin/rake cdtb:anonymize:proposals` anonymizes proposals +- `bin/rake cdtb:anonymize:user_groups` anonymizes user groups +- `bin/rake cdtb:anonymize:system_admins` anonymizes system admins +- `bin/rake cdtb:anonymize:paper_trail` anonymizes paper trails -```bin/rake cdtb:anonymize:all``` anonymizes whole production dump (without proposals) +### Migrate ActiveStorage service from S3 to local -```bin/rake cdtb:anonymize:users``` anonymizes users - -```bin/rake cdtb:anonymize:proposals``` anonymizes proposals - -```bin/rake cdtb:anonymize:user_groups``` anonymizes user groups - -```bin/rake cdtb:anonymize:system_admins``` anonymizes system admins - -```bin/rake cdtb:anonymize:paper_trail``` anonymizes paper trails - -#### Migrate ActiveStorage service from S3 to local - To migrate from S3 to local storage, the identified steps will be: 1. Download the assets to a temporary directory: `aws s3 sync s3://bucket-name tmp/storage/` 2. Move the downloaded assets into the local storage directory doing the sharding: @@ -80,10 +74,30 @@ `bin/rake cdtb:s3_to_local:set_local_service_on_blobs` 4. Clean the cache: `bin/rake cache:clear` 5. Restart the Rails server +### Upgrades: + +#### Upgrade modules + +Upgrades the gems with engines in them. All, Decidim modules and standard Rails engines. + +TO-DO To be finished + +#### Validate migrations + +Validates that migrations from all gems in the Gemfile have already been installed. + +``` +bin/rake cdtb:upgrades:validate_migrations +``` + +See the [Installation](#installation) chapter to install a GitHub Action on your app that will run this validation on your CI. + +TO-DO also check that all migrations have been executed and the schema.rb does not change + ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org). @@ -105,14 +119,14 @@ ``` ## Contributing -Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/decidim-cdtb. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/decidim-cdtb/blob/master/CODE_OF_CONDUCT.md). +Bug reports and pull requests are welcome on GitHub at https://github.com/CodiTramuntana/decidim-cdtb. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/CodiTramuntana/decidim-cdtb/blob/master/CODE_OF_CONDUCT.md). ## License The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). ## Code of Conduct -Everyone interacting in the Decidim::Cdtb project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/decidim-cdtb/blob/master/CODE_OF_CONDUCT.md). +Everyone interacting in the Decidim::Cdtb project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/CodiTramuntana/decidim-cdtb/blob/master/CODE_OF_CONDUCT.md).