{"id":20864300,"url":"https://github.com/kodius/userswitch","last_synced_at":"2025-07-19T22:05:19.194Z","repository":{"id":59158843,"uuid":"86790386","full_name":"kodius/userswitch","owner":"kodius","description":"Avoid the pain of manual switching user roles while developing","archived":false,"fork":false,"pushed_at":"2017-04-11T09:05:30.000Z","size":751,"stargazers_count":19,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-09T14:03:01.862Z","etag":null,"topics":["development","rails","tweaks"],"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/kodius.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2017-03-31T07:23:07.000Z","updated_at":"2021-11-16T13:08:22.000Z","dependencies_parsed_at":"2022-09-13T20:10:28.361Z","dependency_job_id":null,"html_url":"https://github.com/kodius/userswitch","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/kodius%2Fuserswitch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kodius%2Fuserswitch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kodius%2Fuserswitch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kodius%2Fuserswitch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kodius","download_url":"https://codeload.github.com/kodius/userswitch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225136213,"owners_count":17426418,"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":["development","rails","tweaks"],"created_at":"2024-11-18T05:41:05.048Z","updated_at":"2024-11-18T05:41:05.760Z","avatar_url":"https://github.com/kodius.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UserSwitch\n\n[![Gem Version](https://badge.fury.io/rb/userswitch.svg)](https://badge.fury.io/rb/userswitch)\n\nUser Switch is a Rails plugin for switching between commonly used roles and users. It's particularly useful for development and staging environments when you often need to switch between various accounts. It saves you from the hassle of logging in or out.\n\n![alt](https://cloud.githubusercontent.com/assets/17185440/24801547/f2cb2c8a-1ba4-11e7-87a6-59911794d6c7.png)\n\n## Example\n\nBy default, the gem will output a chain of buttons as follows\n\nBy clicking on a button, your Rails app will switch to a different user, that is, your session will change to that of a different account and save you the time you might otherwise spend clicking on logout links and filling in forms to log as a different user.\n\nDifferent roles have different colors so as to be more noticeable. If we put mulitple \"same role\" users for testing, we can still see by color coding what role it belongs to.\n\n![alt](https://cloud.githubusercontent.com/assets/17185440/24800120/04b1a614-1b9f-11e7-9584-3392ca40f125.gif)\n\n## Requirements\n```ruby\ngem 'bootstrap'\ngem 'devise'\n```\n\n## How to install\n\nAdd it to your app's Gemfile and run bundle\n```ruby\ngem 'userswitch'\n```\nor install it manually\n```ruby\ngem install userswitch\n```\n\n## How to use\nCreate userswitch.yml inside you config folder with:\n\n```ruby\nrake userswitch:install\n```\n\nInside of your template/view, you can call users with (showing only users from your userswitch.yml file):\n\n```ruby\nUserswitch.users(current_user)\n```\n\nThe above command will generate the required HTML output to make the user switching work.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkodius%2Fuserswitch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkodius%2Fuserswitch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkodius%2Fuserswitch/lists"}