{"id":15630740,"url":"https://github.com/accessd/rails-env-favicon","last_synced_at":"2025-04-05T07:03:23.357Z","repository":{"id":17677322,"uuid":"20482149","full_name":"accessd/rails-env-favicon","owner":"accessd","description":"Gem to display the rails environment on the favicon","archived":false,"fork":false,"pushed_at":"2018-04-25T13:13:44.000Z","size":70,"stargazers_count":215,"open_issues_count":1,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-29T06:04:49.786Z","etag":null,"topics":["environment","favicon","rails","rails-env-favicon","ruby"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/accessd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.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":"2014-06-04T12:13:55.000Z","updated_at":"2025-03-25T10:40:13.000Z","dependencies_parsed_at":"2022-08-21T00:50:32.127Z","dependency_job_id":null,"html_url":"https://github.com/accessd/rails-env-favicon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/accessd%2Frails-env-favicon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/accessd%2Frails-env-favicon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/accessd%2Frails-env-favicon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/accessd%2Frails-env-favicon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/accessd","download_url":"https://codeload.github.com/accessd/rails-env-favicon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247299831,"owners_count":20916190,"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":["environment","favicon","rails","rails-env-favicon","ruby"],"created_at":"2024-10-03T10:36:07.026Z","updated_at":"2025-04-05T07:03:23.333Z","avatar_url":"https://github.com/accessd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Rails Env Favicon\n================================\n\n[![Gem Version](https://badge.fury.io/rb/rails-env-favicon.svg)](http://badge.fury.io/rb/rails-env-favicon)\n\nMade changes in the code to debug and do not understand what's wrong.\nHell, I'm on the debug production! This happened to you? To me several times.\nLibrary offers one of the ways to solve this problem.\n\nMost everyone will understand from one picture:\n\n![ScreenShot](https://raw.github.com/accessd/rails-env-favicon/master/doc/img/sample.png)\n\nThis means that on the first tab we have development environment, on second stage, and third it's production(we don't need change this favicon).\n\nIt uses [Tinycon](https://github.com/tommoor/tinycon) - A small library for manipulating the favicon.\n\nAnd one more option:\n\n![ScreenShot](https://raw.github.com/accessd/rails-env-favicon/master/doc/img/sample-grayscale.png)\n\nIcon will be gray on non production environment.\n\nIt you need this separately you can use [Grayscale-Favicon](https://github.com/khusnetdinov/grayscale-favicon) - adopted for node package managers version.\n\n__Js usage for this task justified by the fact that more often than not have to worry about favicon caching, because favicon changes on the fly after it's loaded. However, if you do not like to use js for this problem, you may use alternative version of gem which uses https://github.com/rmagick/rmagick, follow to branch [rmagick](https://github.com/accessd/rails-env-favicon/tree/rmagick)__\n\nInstallation\n------------\n\nAdd this line to your application's Gemfile:\n\n    gem 'rails-env-favicon'\n\nAnd then execute:\n\n    $ bundle\n\nSetup:\n\n    # adds initializer\n    rails g rails_env_favicon:install\n\nIn your JavaScript manifest (e.g. `application.js`):\n\n    //= require rails_env_favicon\n\nConfig\n------------\n\nIn config/initializers/rails_env_favicon.rb\n\n    RailsEnvFavicon.setup do |config|\n      # If true then favicon will be gray on non production env\n      config.make_grayscale = false\n      # or if make_grayscale = false then draw badge on favicon with this options:\n      config.text_color = '#ffffff'\n      config.background_color = '#549a2f'\n    end\n\nYou can also configure the condition of changing favicon and badge label, just override `RailsEnvFavicon` module methods. For example:\n\n    module RailsEnvFavicon\n      def self.badge_label\n        ENV['TEATRO'].present? ? 'T' : ::Rails.env.first.upcase\n      end\n\n      def self.applicable?\n        !::Rails.env.production? || ENV['TEATRO'].present?\n      end\n    end\n\nIssues\n-------------\n\n  * If you change a configuration to apply changes, you have to:\n\n    * Execute `rm -rf tmp/cache/*` in app directory, for assets cache cleaning.\n    * Restart web server.\n\nContributing\n-------------\n\n1. Fork it ( http://github.com/accessd/rails_env_favicon/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faccessd%2Frails-env-favicon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faccessd%2Frails-env-favicon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faccessd%2Frails-env-favicon/lists"}