{"id":13819616,"url":"https://github.com/rughh/on_ruby","last_synced_at":"2025-05-16T03:05:28.606Z","repository":{"id":1208722,"uuid":"1164691","full_name":"rughh/on_ruby","owner":"rughh","description":":gem: :diamonds: Whitelabel Site for Ruby Communities","archived":false,"fork":false,"pushed_at":"2025-05-08T17:17:40.000Z","size":16299,"stargazers_count":233,"open_issues_count":7,"forks_count":95,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-05-08T18:29:06.135Z","etag":null,"topics":["meetup","rails","ruby"],"latest_commit_sha":null,"homepage":"http://www.onruby.eu","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rughh.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":null,"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,"zenodo":null},"funding":{"github":["phoet"],"patreon":"on_ruby","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2010-12-13T13:46:46.000Z","updated_at":"2025-05-08T17:17:42.000Z","dependencies_parsed_at":"2023-07-05T21:16:25.868Z","dependency_job_id":"1ddc848d-e9a8-46c6-8586-2906958366ad","html_url":"https://github.com/rughh/on_ruby","commit_stats":{"total_commits":2422,"total_committers":84,"mean_commits":"28.833333333333332","dds":"0.40255986787778697","last_synced_commit":"1c5d5e2306a1e5168f692921f769d1f24419e4d9"},"previous_names":["rughh/on_ruby"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rughh%2Fon_ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rughh%2Fon_ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rughh%2Fon_ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rughh%2Fon_ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rughh","download_url":"https://codeload.github.com/rughh/on_ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254459088,"owners_count":22074605,"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":["meetup","rails","ruby"],"created_at":"2024-08-04T08:00:50.872Z","updated_at":"2025-05-16T03:05:23.591Z","avatar_url":"https://github.com/rughh.png","language":"Ruby","readme":"# OnRuby\n\n[![donate at patreon](https://img.shields.io/badge/patreon-donate-green.svg)](https://www.patreon.com/on_ruby)\n[![build Status](https://github.com/phoet/on_ruby/workflows/build/badge.svg)](https://github.com/phoet/on_ruby/workflows/build/)\n[![vulnerability status](https://hakiri.io/github/phoet/on_ruby/master.svg)](https://hakiri.io/github/phoet/on_ruby/master)\n\n[site status \u0026 uptime](http://status.onruby.eu/)\n\n[Get in touch in our Slack Channel - join #on_ruby](https://rubyberlin.herokuapp.com/)\n\nSource for the Sites of the Ruby Communities:\n\n* [Hamburg](https://hamburg.onruby.de)\n* [Cologne](https://cologne.onruby.de)\n* [Berlin](https://www.rug-b.de)\n* [Madrid](https://madridrb.onruby.eu)\n* [Andalucia](https://andalucia.onruby.eu)\n\n## Support OnRuby\n\nThe operation, development and maintenance of OnRuby can be supported via Patreon at [patreon.com/on_ruby](https://www.patreon.com/on_ruby).\n\n### Patrons\n\n* [floriank](https://github.com/floriank)\n* [fnordfish](https://github.com/fnordfish)\n* [BooVeMan](https://github.com/booveman)\n* [rickenharp](https://github.com/rickenharp)\n* [ddfreyne](https://github.com/ddfreyne) (Alumni)\n* [asaaki](https://github.com/asaaki)\n* [5minpause](https://github.com/5minpause)\n* [thilo](https://github.com/thilo)\n* [rkh](https://github.com/rkh)\n\n## Installation\n\nYou can install OnRuby using Docker or a local installation.\n\n### Install using Docker\n\n#### Get containers\n\nInstall [Docker and Docker Compose](https://docs.docker.com/compose/install/)\nif you haven't already. Then:\n\n```sh\ndocker-compose up --build\n```\n\n\u003e `sudo` might be required for `docker-compose` if you run Docker locally on Linux.\n\nThis creates three Docker containers:\n\n- `web` for the application\n- `box` for storing rubygems installations\n- `db` for the PostgreSQL database\n\n#### Prepare the database\n\nIn another terminal, run the Rake task to set up the database structure.\n\n```sh\nscript/in_docker bundle exec rake db:setup\n```\n\nThe `script/in_docker` allows you to run commands inside the Docker\ncontainer.\n\n*Example*: Running a spec inside the Docker container\n\n```sh\nscript/in_docker bundle exec rspec spec/requests/labels_spec.rb\n```\n\n#### Add usergroup hostnames to `/etc/hosts`\n\nNote: This step is currently only necessary for Safari, all other browsers thread localhost as wildcard domain.\n\nAdd all supported subdomains to your `/etc/hosts` file:\n\n```\n127.0.0.1    www.onruby.test hamburg.onruby.localhost cologne.onruby.localhost berlin.onruby.localhost madridrb.onruby.localhost andalucia.onruby.localhost\n```\n\n#### Visit the site\n\nNavigate to the start page for the OnRuby platform at\n[https://www.onruby.test:3000](https://www.onruby.test:3000).\n\nThis will list links and logos to all the usergroups.\n\n### Install locally\n\n### On a Docker Container\n\n```sh\ndocker-compose up postgres -d\n\n./bin/setup\n./bin/rails server\n```\n\n### On your machine\n\n#### Install PostgreSQL\n\n```sh\n# Install PostgreSQL on macOS\nbrew install postgresql\n# or on Ubuntu\nsudo apt-get install postgresql postgresql-contrib\n\n# Check if it's running\npsql postgres # exit with \\q\n\n# Create user and database\ncreateuser -Ps postgres\nrake db:setup\n```\n\nUse `script/server` to run Rails locally, otherwise you need to export the\nenvironment options yourself:\n\n    bundle --without=production\n    script/server\n\n### Add hosts to `/etc/hosts`\n\nFor working with the whitelabel functionality, you need to add all supported\nsubdomains to your `/etc/hosts`:\n\n```\n127.0.0.1    www.onruby.test hamburg.onruby.test cologne.onruby.test berlin.onruby.test madridrb.onruby.test andalucia.onruby.test\n```\n\nAccess via [https://www.onruby.test:3000](https://www.onruby.test:3000)\n\n### Test Data\n\nYou don't need any test data to set up a new project!\n\nIf you want to have some kind of seed, use this Rake task, to generate some\ntest data:\n\n    rake data:create\n\nIf you are a Heroku project admin, you can dump Data from Heroku via [Taps\nGem](https://devcenter.heroku.com/articles/taps):\n\n    heroku pg:pull HEROKU_POSTGRESQL_MAROON_URL onruby_development\n\n## THE GUIDE TO YOUR RUG\n\nThese are the steps to get your Ruby Usergroup Site:\n\n- Fork this repo\n- Run `bundle \u0026\u0026 bundle exec rake fork:usergroup[MyUsergroup]`\n- Create a GitHub Pull Request\n- *Lean back and wait :)*\n\nIf you have a custom domain, you need to [configure the DNS](https://github.com/phoet/on_ruby/issues/360#issuecomment-459729483).\n\nOn the admin site we need to:\n\n- `heroku domains:add xyz.onruby.de [custom.de]`\n- pull the custom domain into cloudflare\n- create a new GitHub app for that domain and add keys via `heroku config:add`\n- merge the Pull Request\n- deploy to Heroku\n- add admin privileges to someone for the new RUG\n\n## Users Login\n\nIn order to register for events, users need to log in first.\n\nThe app uses OAuth for that. At this point, it accepts Twitter [^1], GitHub and Google as valid OAuth providers.\n\nIt also accepts email as a method for registering and logging in, using a custom OAuth provider based on one time passwords (OTP) sent to that email.\n\nWhen a user is not currently logged in, selecting one of the login providers creates an account for him/her, attaching this provider as a valid auth mechanism.\n\nWhen a user is already logged in, selecting another provider will add that auth mechanism to the existing user.\n\n[^1]: As of 2024 Twitter/X has deprecated API v1.1 and Twitter login is not working anymore\n\n### Required used information\n\nAt this point, the app marks `nickname`, `name` and `image` as required, not allowing a user to be created if any of those are empty. `email` is not required.\n\nFor external OAuth sources, values for those 3 properties are obtained from the providers.\n\n- When a user is created through them, it gets these (and other) properties from that source.\n\n- When an existing user adds one of those providers, some of these values are overwritten (`name` and `image`), while `nickname` stays always the same.\n\nFor users registered through email OTP, none of these values are available on creation. In order to deal with the validations, they're initialized as follows:\n\n- `nickname` is generated by hashing the email address.\n\n- `name` is filled in with a known marker for \"missing name\" declared in `User::EMPTY_NAME` (currently `\"********\"`). It doesn't use the email address as a placeholder in order to avoid exposing it, as the user name is displayed in several pages in the application.\n\n- `image` is set to the Gravatar URL for the email.\n\nIn order to urge users registered through email to provide a name that can be used in the app, after log in, a user with such an \"empty\" name is redirected to the profile edit page and asked to provide one.\n\nAs with any other source, if such a user later adds another provider, the `name` and `image` coming from those will take over the existing ones.\n\n### Recovering login for existing users who only had Twitter auth\n\nAs a consequence of X deprecating API v1.1, Twitter authentication is not working anymore and registered users that only had defined Twitter as their auth method are left out in the cold.\n\nIn order to provide an easy way for these users to access their existing account using another auth provider, the app includes additional logic:\n\n1. If a new session successfully authenticates using a provider that includes email as part of their info.\n2. If a user (and only one user) already exists with that same email\n3. If that user was using Twitter (and only Twitter) as OAuth provider\n\nIf all of these conditions are met, then the new provider is added to the existing user and the login proceeds with that.\n\nIf the existing user had other providers already registered, then this logic doesn't kick in, as they can still use one of the others to log in.\n\nAs this behaviour could lead to potential account takeovers (if another user had access to an OAuth account with the same email of the original user) there's a deadline after which it will stop working.\n\nThe default deadline is the end of year 2024. If needed it can be ajusted by setting the environment variable `TWITTER_USER_FALLBACK_DEADLINE` to a valid date address string (like '2025-06-30').\n\n## Website\n\n![OnRuby Website](https://cl.ly/image/3U0S3b0T0F0x/Screen%20Shot%202014-01-07%20at%2014.16.44.png)\n\n## Admin Interface\n\nThe app comes with a [Administrate](https://github.com/thoughtbot/administrate) interface to\nmanage the model data.\n\nIn order to access the admin stuff, you need to be a registered user with the\n\"admin role\".\n\nTypus is mounted under `/admin` of your label, so it's\n`https://hamburg.onruby.de/admin` for Hamburg.\n\n### Stuff to manage (CRUD)\n\n- **Users**\n- **Events**\n    - **Materials**\n- **Locations** and **Companies** (Companies are just special Locations)\n- **Topics** (Subjects for activities that users can request or propose)\n- **Jobs** (These are displayed at top of the page)\n- **Highlights** (Special information that you want to display for a short period of time)\n\n## License\n\n\"THE (extended) BEER-WARE LICENSE\" (Revision 42.0815): [phoet](mailto:ps@nofail.de) contributed to this project.\n\nAs long as you retain this notice you can do whatever you want with this stuff.\nIf we meet some day, and you think this stuff is worth it, you can buy me some beers in return.\n","funding_links":["https://github.com/sponsors/phoet","https://patreon.com/on_ruby","https://www.patreon.com/on_ruby"],"categories":["Happy Exploring 🤘"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frughh%2Fon_ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frughh%2Fon_ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frughh%2Fon_ruby/lists"}