{"id":20779122,"url":"https://github.com/solidusio/solidus_support","last_synced_at":"2025-04-05T01:05:29.158Z","repository":{"id":18988317,"uuid":"85746970","full_name":"solidusio/solidus_support","owner":"solidusio","description":"Common runtime helpers for Solidus extensions.","archived":false,"fork":false,"pushed_at":"2025-02-11T18:49:43.000Z","size":219,"stargazers_count":10,"open_issues_count":1,"forks_count":23,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-29T00:06:18.030Z","etag":null,"topics":["extension","hacktoberfest","runtime","solidus","tools"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solidusio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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},"funding":{"open_collective":"solidus"}},"created_at":"2017-03-21T19:55:42.000Z","updated_at":"2025-02-11T18:49:45.000Z","dependencies_parsed_at":"2024-12-12T17:29:55.124Z","dependency_job_id":"e442a27f-d6f2-45b3-9e4b-737ce82f103d","html_url":"https://github.com/solidusio/solidus_support","commit_stats":{"total_commits":130,"total_committers":17,"mean_commits":7.647058823529412,"dds":0.7230769230769231,"last_synced_commit":"49282e567c7adc35e562c953061be821c5b69cbf"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidusio%2Fsolidus_support","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidusio%2Fsolidus_support/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidusio%2Fsolidus_support/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solidusio%2Fsolidus_support/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solidusio","download_url":"https://codeload.github.com/solidusio/solidus_support/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247271522,"owners_count":20911587,"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","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":["extension","hacktoberfest","runtime","solidus","tools"],"created_at":"2024-11-17T13:26:07.565Z","updated_at":"2025-04-05T01:05:29.117Z","avatar_url":"https://github.com/solidusio.png","language":"Ruby","readme":"[![CircleCI](https://dl.circleci.com/status-badge/img/gh/solidusio/solidus_support/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/solidusio/solidus_support/tree/main)\n\n# SolidusSupport\n\nThis gem contains common runtime functionality for Solidus extensions.\n\nIf you are looking for development tools instead, see\n[solidus_dev_support](https://github.com/solidusio-contrib/solidus_dev_support).\n\n## Usage\n\n### Engine extensions\n\nThis extension provides a module that decorates `Rails::Engine` to seamlessly support autoloading\ndecorators both with the classic autoloader and with Zeitwerk on Rails 6. In order to use it, just\ninclude the provided module in your `Engine` class:\n\n```ruby\nmodule SolidusExtensionName\n  class Engine \u003c Rails::Engine\n    engine_name 'solidus_extension_name'\n\n    include SolidusSupport::EngineExtensions\n\n    # ...\n  end\nend\n```\n\nIf needed, also ensure to remove the original implementation of `.activate`:\n\n```ruby\ndef self.activate\n  Dir.glob(File.join(root, \"app/**/*_decorator*.rb\")) do |c|\n    Rails.configuration.cache_classes ? require(c) : load(c)\n  end\nend\n\nconfig.to_prepare(\u0026method(:activate).to_proc)\n```\n\n#### Loading files conditionally\n\nIf you include `EngineExtensions` in your extension and structure your files according to the\nexpected paths, they will be loaded automagically only when the relevant Solidus engines are\navailable.\n\nHere's what an example structure may look like:\n\n- `lib/views/backend`: will only be added to the view paths when `solidus_backend` is available.\n- `lib/controllers/backend`: will only be added to the controller paths when `solidus_backend` is\n  available.\n- `lib/decorators/backend`: will only be added to the decorator paths when `solidus_backend` is\n  available.\n\nThe same goes for `frontend` and `api`.\n\nWe strongly recommend following this structure and making your extensions so that they're not\ndependent on anything other than `solidus_core`, only augmenting the functionality of the other\nengines when they are available.\n\n## Development\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new\nversion, update the version number in `version.rb`, and then run `bundle exec rake release`, which\nwill create a git tag for the version, push git commits and tags, and push the `.gem` file to\n[rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/solidusio/solidus_support.\n","funding_links":["https://opencollective.com/solidus"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidusio%2Fsolidus_support","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolidusio%2Fsolidus_support","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidusio%2Fsolidus_support/lists"}