{"id":13416383,"url":"https://github.com/logux/logux_rails","last_synced_at":"2025-04-23T03:31:56.401Z","repository":{"id":53598842,"uuid":"136374319","full_name":"logux/logux_rails","owner":"logux","description":"Rails client for Logux server","archived":true,"fork":false,"pushed_at":"2021-03-22T06:42:38.000Z","size":281,"stargazers_count":40,"open_issues_count":7,"forks_count":19,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-24T17:54:38.662Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://logux.org/","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/logux.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}},"created_at":"2018-06-06T19:04:23.000Z","updated_at":"2024-11-21T18:17:06.000Z","dependencies_parsed_at":"2022-09-21T21:51:23.869Z","dependency_job_id":null,"html_url":"https://github.com/logux/logux_rails","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logux%2Flogux_rails","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logux%2Flogux_rails/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logux%2Flogux_rails/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/logux%2Flogux_rails/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/logux","download_url":"https://codeload.github.com/logux/logux_rails/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250365732,"owners_count":21418737,"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":[],"created_at":"2024-07-30T21:00:57.943Z","updated_at":"2025-04-23T03:31:55.956Z","avatar_url":"https://github.com/logux.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Logux Rails\n\n[![Build Status](https://travis-ci.org/logux/logux_rails.svg?branch=master)](https://travis-ci.org/logux/logux_rails) [![Coverage Status](https://coveralls.io/repos/github/logux/logux_rails/badge.svg?branch=master)](https://coveralls.io/github/logux/logux_rails?branch=master)\n\nAdd WebSockets, live-updates and offline-first to Ruby on Rails with [Logux](https://logux.io/). This gem will add [Logux Back-end Protocol](https://logux.io/protocols/backend/spec/) to Ruby on Rails and then you can use Logux Server as a proxy between WebSocket and your Rails application.\n\nRead [Creating Logux Proxy](https://logux.io/guide/starting/proxy-server/) guide.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'logux_rails'\n```\n\nAnd then execute:\n\n```bash\nbundle\n```\n\n## Usage\n\nFirst of all, you have to configure Logux, by defining server address in, for example, `config/initializers/logux.rb`:\n\n```ruby\nLogux.configure do |config|\n  config.logux_host = 'http://localhost:31338'\nend\n```\n\nMount `Logux::Rack` in your application routing configuration:\n\n```ruby\n# config/routes.rb\nRails.application.routes.draw do\n  mount Logux::Engine =\u003e '/'\nend\n```\n\nAfter this, POST requests to `/logux` will be processed by `LoguxController`. You can redefine it or inherit from, if it necessary, for example, for implementing custom authorization flow.\n\nLogux Rails will try to find Action for the specific message from Logux Server. For example, for `project/rename` action, you should define `Action::Project` class, inherited from `Logux::Action` base class, and implement `rename` method.\n\n### Rake commands\n\nUse `rails logux:actions` command to get the list of available action types, or `rails logux:channels` for channels. The default search path is set to `app/logux/actions` and `app/logux/channels` for actions and channels correspondingly, assuming `app` directory is the root of your Rails application. Both command support custom search paths: `rails logux:actions[lib/logux/actions]`.\n\n## Development with Docker\n\nAfter checking out the repo, run:\n\n```bash\ndocker-compose run app bundle install\ndocker-compose run app bundle exec appraisal install\n```\n\nRun tests with:\n\n```bash\ndocker-compose run app bundle exec appraisal rspec\n```\n\nRun RuboCop with:\n\n```bash\ndocker-compose run app bundle exec rubocop\n```\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%2Flogux%2Flogux_rails","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flogux%2Flogux_rails","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flogux%2Flogux_rails/lists"}