{"id":13879025,"url":"https://github.com/sedubois/mobility-actiontext","last_synced_at":"2025-09-01T18:06:19.802Z","repository":{"id":40003977,"uuid":"327384766","full_name":"sedubois/mobility-actiontext","owner":"sedubois","description":"Translate Rails Action Text rich text with Mobility.","archived":false,"fork":false,"pushed_at":"2024-12-17T08:26:41.000Z","size":266,"stargazers_count":41,"open_issues_count":2,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-28T04:08:49.318Z","etag":null,"topics":["action-text","i18n","localization","mobility","rails","rich-text","ruby-gem","ruby-on-rails","translation"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sedubois.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-06T17:34:51.000Z","updated_at":"2025-05-19T17:02:36.000Z","dependencies_parsed_at":"2023-02-12T16:16:11.868Z","dependency_job_id":"f8617b60-ce54-45cb-a0bd-df48001e589f","html_url":"https://github.com/sedubois/mobility-actiontext","commit_stats":{"total_commits":101,"total_committers":8,"mean_commits":12.625,"dds":0.09900990099009899,"last_synced_commit":"c040a777f012a15d6cc67e61e56451ac359169b1"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/sedubois/mobility-actiontext","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sedubois%2Fmobility-actiontext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sedubois%2Fmobility-actiontext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sedubois%2Fmobility-actiontext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sedubois%2Fmobility-actiontext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sedubois","download_url":"https://codeload.github.com/sedubois/mobility-actiontext/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sedubois%2Fmobility-actiontext/sbom","scorecard":{"id":809313,"data":{"date":"2025-08-11","repo":{"name":"github.com/sedubois/mobility-actiontext","commit":"c1cb6af332fddbe4ed4a328556bf5f1ce7eac5f6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/sedubois/mobility-actiontext/main.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/sedubois/mobility-actiontext/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/sedubois/mobility-actiontext/main.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"15 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-76r7-hhxj-r776","Warn: Project is vulnerable to: GHSA-r4mg-4433-c7g3","Warn: Project is vulnerable to: GHSA-353f-x4gh-cqq8","Warn: Project is vulnerable to: GHSA-5w6v-399v-w3cc","Warn: Project is vulnerable to: GHSA-mrxw-mxhj-p664","Warn: Project is vulnerable to: GHSA-vvfq-8hwr-qm4m","Warn: Project is vulnerable to: GHSA-47m2-26rw-j2jw","Warn: Project is vulnerable to: GHSA-7g2v-jj9q-g3rg","Warn: Project is vulnerable to: GHSA-7wqh-767x-r66v","Warn: Project is vulnerable to: GHSA-8cgq-6mh2-7j6v","Warn: Project is vulnerable to: GHSA-gjh7-p2fx-99vx","Warn: Project is vulnerable to: GHSA-9j94-67jr-4cqj","Warn: Project is vulnerable to: GHSA-22h5-pq3x-2gf2","Warn: Project is vulnerable to: GHSA-7fc5-f82f-cx69","Warn: Project is vulnerable to: GHSA-j3g3-5qv5-52mj"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T12:41:01.763Z","repository_id":40003977,"created_at":"2025-08-23T12:41:01.763Z","updated_at":"2025-08-23T12:41:01.763Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273167388,"owners_count":25057185,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["action-text","i18n","localization","mobility","rails","rich-text","ruby-gem","ruby-on-rails","translation"],"created_at":"2024-08-06T08:02:07.272Z","updated_at":"2025-09-01T18:06:19.752Z","avatar_url":"https://github.com/sedubois.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Mobility Action Text\n\n![Gem Version](https://badge.fury.io/rb/mobility-actiontext.svg)\n![Build Status](https://github.com/sedubois/mobility-actiontext/workflows/CI/badge.svg)\n\nTranslate Rails [Action Text](https://guides.rubyonrails.org/action_text_overview.html) rich text with [Mobility](https://github.com/shioyama/mobility).\n\n## Installation\n\n1. [Install Action Text](https://guides.rubyonrails.org/action_text_overview.html#installation).\n\n2. [Install Mobility without tables](https://github.com/shioyama/mobility#activerecord-rails).\n\n3. Execute `bundle add mobility-actiontext`\n\n4. Run this migration:\n\n```rb\nclass TranslateRichTexts \u003c ActiveRecord::Migration[7.1]\n  def change\n    # or null: true to allow untranslated rich text\n    add_column :action_text_rich_texts, :locale, :string, null: false\n\n    remove_index :action_text_rich_texts,\n                 column: [:record_type, :record_id, :name],\n                 name: :index_action_text_rich_texts_uniqueness,\n                 unique: true\n    add_index :action_text_rich_texts,\n              [:record_type, :record_id, :name, :locale],\n              name: :index_action_text_rich_texts_uniqueness,\n              unique: true\n  end\nend\n```\n\n## Usage\n\n```diff\n# app/models/message.rb\nclass Message \u003c ApplicationRecord\n+  extend Mobility\n+\n-  has_rich_text :content\n+  translates :content, backend: :action_text\nend\n```\n\n### Plain text\n\nAlthough the main purpose of the `action_text_rich_texts` table is to store rich text, this gem allows using it for plain text as well. This could be useful to consolidate all text in a single table and to remove the need to migrate data when converting between one and the other.\n\n```diff\n# app/models/message.rb\nclass Message \u003c ApplicationRecord\n   extend Mobility\n\n+  translates :title, backend: :action_text, plain: true\n   translates :content, backend: :action_text\nend\n```\n\n## Implementation note\n\nAction Text's rich text content is saved in its own model that can be associated with any existing Active Record model using a polymorphic relation. Likewise, Mobility's KeyValue backend allows to translate any model using a polymorphic relation. This gem makes use of this similarity by combining both features in a single step, thus offering rich text \"for free\", i.e. in theory at no extra performance cost compared to untranslated rich text or translated plain text.\n\nThis is done through the `Mobility::Backends::ActionText::Translation` model extending `ActionText::RichText`. This model is backed by Action Text's existing `action_text_rich_texts` table and its existing `name`, `body` and `record` attributes, to which is added a new `locale` attribute.\n\n[Read more](https://github.com/shioyama/mobility/issues/385) on the genesis of this gem.\n\n## Development\n\nAfter checking out the repo, run `bundle install` to install dependencies.\n\nExecute tests by running:\n\n```sh\ncd test_app\nbundle install\nbundle exec rails test\n```\n\nTo release a new version, update `lib/mobility/action_text/version.rb` and `CHANGELOG.md`, run `bundle \u0026\u0026 cd test_app \u0026\u0026 bundle`, commit, then run `bundle exec rake release`. This 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).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/sedubois/mobility-actiontext.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsedubois%2Fmobility-actiontext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsedubois%2Fmobility-actiontext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsedubois%2Fmobility-actiontext/lists"}