{"id":15554164,"url":"https://github.com/bearandgiraffe/bg-common","last_synced_at":"2026-05-18T10:10:58.303Z","repository":{"id":59151066,"uuid":"98911512","full_name":"bearandgiraffe/bg-common","owner":"bearandgiraffe","description":"A ruby library of common behaviors","archived":false,"fork":false,"pushed_at":"2018-11-15T02:37:23.000Z","size":37,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-25T03:33:14.348Z","etag":null,"topics":["ruby","ruby-gem","ruby-on-rails"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bearandgiraffe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-31T17:15:28.000Z","updated_at":"2018-11-15T02:37:02.000Z","dependencies_parsed_at":"2022-09-13T11:00:52.205Z","dependency_job_id":null,"html_url":"https://github.com/bearandgiraffe/bg-common","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/bearandgiraffe/bg-common","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bearandgiraffe%2Fbg-common","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bearandgiraffe%2Fbg-common/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bearandgiraffe%2Fbg-common/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bearandgiraffe%2Fbg-common/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bearandgiraffe","download_url":"https://codeload.github.com/bearandgiraffe/bg-common/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bearandgiraffe%2Fbg-common/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33174091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"ssl_error","status_checked_at":"2026-05-18T09:27:28.300Z","response_time":71,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ruby","ruby-gem","ruby-on-rails"],"created_at":"2024-10-02T14:50:55.061Z","updated_at":"2026-05-18T10:10:58.282Z","avatar_url":"https://github.com/bearandgiraffe.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BG::Common\n\nA Ruby library of common behaviors, especially for Ruby on Rails applications.\n\n# Table of Contents\n\n\u003c!-- MarkdownTOC depth=4 autolink=true bracket=round --\u003e\n\n- Installation\n- Usage\n  - I. Basic Auth\n- Development\n- Contributing\n\n\u003c!-- /MarkdownTOC --\u003e\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'bg-common'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install bg-common\n\n## Usage\n\n### I. Basic Auth\n\nTo hide an app from bots and people who are trying to troll us, we want to hide the app behind a \"firewall\". Typically we want to do that for staging or any other environment that is not public.\n\nThe best way to do that is to put the app behind Basic Auth.\n\nTo enable Basic Auth, add the following as an ENV variable:\n\n```\nBASIC_AUTH_ENABLED=true\nBASIC_AUTH_USERNAME=user\nBASIC_AUTH_PASSWORD=password\n```\n\nmake sure to change `user` and `password` to something a bit more secure!\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, 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/bearandgiraffe/bg-common. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbearandgiraffe%2Fbg-common","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbearandgiraffe%2Fbg-common","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbearandgiraffe%2Fbg-common/lists"}