{"id":13483896,"url":"https://github.com/teeparham/gemdiff","last_synced_at":"2025-05-15T23:03:26.329Z","repository":{"id":14632159,"uuid":"17349677","full_name":"teeparham/gemdiff","owner":"teeparham","description":"Find source repositories for ruby gems. Open, compare, and update outdated gem versions","archived":false,"fork":false,"pushed_at":"2025-04-25T19:07:53.000Z","size":321,"stargazers_count":123,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-15T23:02:48.464Z","etag":null,"topics":["compare-urls","compare-views","github","outdated-gems","ruby","rubygems"],"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/teeparham.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-03-02T23:31:56.000Z","updated_at":"2025-04-25T19:07:57.000Z","dependencies_parsed_at":"2024-10-15T03:52:42.415Z","dependency_job_id":"26e632c5-ab95-4dd1-bda5-f856b7c83fc8","html_url":"https://github.com/teeparham/gemdiff","commit_stats":{"total_commits":367,"total_committers":9,"mean_commits":40.77777777777778,"dds":"0.032697547683923744","last_synced_commit":"1bebc48c4c1a076fa4020d4ee4e74981f6025554"},"previous_names":[],"tags_count":94,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teeparham%2Fgemdiff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teeparham%2Fgemdiff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teeparham%2Fgemdiff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/teeparham%2Fgemdiff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/teeparham","download_url":"https://codeload.github.com/teeparham/gemdiff/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254436944,"owners_count":22070946,"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":["compare-urls","compare-views","github","outdated-gems","ruby","rubygems"],"created_at":"2024-07-31T17:01:16.606Z","updated_at":"2025-05-15T23:03:26.307Z","avatar_url":"https://github.com/teeparham.png","language":"Ruby","readme":"# gemdiff\n\n[![Gem Version](https://badge.fury.io/rb/gemdiff.svg)](http://rubygems.org/gems/gemdiff)\n[![CI](https://github.com/teeparham/gemdiff/actions/workflows/test.yml/badge.svg)](https://github.com/teeparham/gemdiff/actions/workflows/test.yml)\n\n`gemdiff` is a command-line tool to find source code for ruby gems.\nIt connects gem version management (rubygems + bundler) with source code (GitHub).\n\n`gemdiff` provides commands to\n* Find GitHub repositories for gems\n* Open the compare view for two gem versions\n* Inspect your bundle and list all the available updates\n* Simplify your `git` workflow for updating gems\n\n### Why?\n\nYou want to view differences between versions of gems before updating.\n`gemdiff` does the source repository lookup, opens a compare view of commits on GitHub,\nand simplifies your git workflow for a bundled project.\n\n### How does it work?\n\n`gemdiff` finds a repository by inspecting the local or remote gemspec, or searching GitHub if needed.\nIt uses bundler to list your outdated gems. For each outdated gem, it determines your currently used version and\nthe version you can update to, and builds a compare view URL with the old and new version tags.\n\nRun `gemdiff update [gem]` to update a gem (`bundle update [gem]`) and commit the change with a nice\ncommit message that includes the old and new versions and a compare URL with the changes.\n\n## Install\n\n```sh\ngem install gemdiff\n```\n\n## Commands\n\n### `gemdiff [list]`\n\nRuns `bundle outdated --strict` in the current directory.\nOutputs outdated gems in your bundle with their compare URLs to stdout.\n`list` is the default command.\n\n```sh\n$ cd /your/ruby/project/using/bundler\n$ gemdiff\nChecking for outdated gems in your bundle...\nFetching gem metadata from https://rubygems.org/.......\nFetching version metadata from https://rubygems.org/..\nResolving dependencies...\n\nOutdated gems included in the bundle:\n  * mocha (newest 1.2.1, installed 1.1.0, requested ~\u003e 1.0) in group \"development\"\n  * rake (newest 11.3.0, installed 11.1.2, requested ~\u003e 11.0) in group \"development\"\n  * sqlite3 (newest 1.3.12, installed 1.3.11, requested ~\u003e 1.3) in group \"development\"\n\nmocha: 1.2.1 \u003e 1.1.0\nhttps://github.com/freerange/mocha/compare/v1.1.0...v1.2.1\n\nrake: 11.3.0 \u003e 11.1.2\nhttps://github.com/ruby/rake/compare/v11.1.2...v11.3.0\n\nsqlite3: 1.3.12 \u003e 1.3.11\nhttps://github.com/sparklemotion/sqlite3-ruby/compare/v1.3.11...v1.3.12\n```\n\n### `gemdiff each`\n\nRuns `bundle outdated --strict` in the current directory. For each outdated gem,\nyou can open the compare view for that gem, skip it, or exit.\nEnter `y` to review. Enter `A` to open all compare views (beware!).\nEnter `s` to list all the compare URLs to stdout (same as the `list` command).\n\n```sh\n$ gemdiff each\nChecking for outdated gems in your bundle...\nFetching gem metadata from https://rubygems.org/.......\nFetching version metadata from https://rubygems.org/..\nResolving dependencies...\n\nOutdated gems included in the bundle:\n  * aws-sdk (1.35.0 \u003e 1.34.1)\n  * sprockets (2.11.0 \u003e 2.10.1)\n  * webmock (1.17.4 \u003e 1.17.3)\naws-sdk: 1.35.0 \u003e 1.34.1\nOpen? (y to open, x to exit, A to open all, s to show all to stdout, else skip)\nsprockets: 2.11.0 \u003e 2.10.1\nOpen? (y to open, x to exit, A to open all, s to show all to stdout, else skip) y\nwebmock: 1.17.4 \u003e 1.17.3\nOpen? (y to open, x to exit, A to open all, s to show all to stdout, else skip)\n```\n\n### `gemdiff update [gem]`\n\nUpdate a gem in your bundle and commit the change with git.\nA compare URL showing the difference between the versions will be part of the commit message.\nYou will be shown a preview of the `git diff` and you may choose to commit or reset the change.\n\n```sh\n$ gemdiff update nokogiri\n\nUpdating nokogiri...\ndiff --git a/Gemfile.lock b/Gemfile.lock\nindex b074472..e0554f2 100644\n--- a/Gemfile.lock\n+++ b/Gemfile.lock\n@@ -102,7 +102,7 @@ GEM\n     mini_portile2 (2.1.0)\n     minitest (5.10.1)\n     nio4r (2.0.0)\n-    nokogiri (1.7.1)\n+    nokogiri (1.7.2)\n       mini_portile2 (~\u003e 2.1.0)\n     orm_adapter (0.5.0)\n     parser (2.4.0.0)\n\nCommit? (c to commit, r to reset, else do nothing) c\n\ncommit 1131db6f57ccad8ed3dab6759c6b1306f98a165c\nAuthor: Tee Parham\nDate:   Fri May 12 14:04:26 2017 -0600\n\n    Update nokogiri to 1.7.2\n\n    https://github.com/sparklemotion/nokogiri/compare/v1.7.1...v1.7.2\n\ndiff --git a/Gemfile.lock b/Gemfile.lock\n...\n```\n\n### `gemdiff find [gem]`\n\nShow the repository URL using the gemspec. If a GitHub URL is not found, query the GitHub search API.\n\n```sh\n$ gemdiff find pundit\nhttps://github.com/varvet/pundit\n```\n\n### `gemdiff open [gem]`\n\nOpen the repository URL with your default browser (or whatever your operating system is configured\nto run with the `open` command with a URL argument):\n\n```sh\n$ gemdiff open pundit\n```\n\nYou may also use `.` as a shortcut for the current directory name.\nThis is helpful if you would like to quickly open the gem you are developing, for example:\n\n```sh\n$ pwd\n/Users/you/projects/somegem\n$ gemdiff open .\n```\n\n### `gemdiff compare [gem] [version] [version]`\n\nOpen a compare view for an individual outdated gem in your bundle:\n\n```sh\n$ gemdiff compare pundit\n```\n\nYou can bypass bundler and query a gem by including the old and new version numbers. This is faster since it bypasses\nthe `bundle outdated --strict` command used to get the versions.\n\nFor example, open the GitHub compare view in browser for difference between `pundit` versions 0.3.0 and 1.0.0:\n\n```sh\n$ gemdiff compare pundit 1.0.0 0.3.0\n```\n\nYou can compare a version with a branch name:\n\n```sh\n$ gemdiff compare arel 6.0.0 main\n```\n\n### `gemdiff releases [gem]`\n\nOpen the repository's release history page:\n\n```sh\n$ gemdiff releases haml\n```\n\n### `gemdiff main [gem]`\n\nOpen the repository's main branch commit history page:\n\n```sh\n$ gemdiff main haml\n```\n\n### `gemdiff help`\n\nTo get help on the command line:\n\n```sh\n$ gemdiff help\n```\n\n### Shortcuts\n\nYou can use abbreviations for any of the above commands. For example, this is equivalent to `gemdiff find pundit`:\n\n```sh\n$ gemdiff f pundit\nhttps://github.com/varvet/pundit\n```\n\nAll commands that have a gem name argument can now use \".\" as an alias for the current directory name.\n\nFor example:\n\n```sh\npwd\n/Users/you/ruby/somegem\ngemdiff find .\ngemdiff open .\ngemdiff main .\ngemdiff compare . 1.2.3 main\n```\n\n### Authenticated GitHub API requests\n\nIf GitHub returns rate limit errors, you can make authenticated API\nrequests to GitHub. Set the `GEMDIFF_GITHUB_TOKEN` or `GITHUB_TOKEN`\nenvironment variable to a\n[personal access token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/).\nUsing `GEMDIFF_GITHUB_TOKEN` is recommended, since other programs such as\n`hub` use `GITHUB_TOKEN`.\n\n### What if it didn't work?\n\n`gemdiff` assumes a few things:\n\n1. The gem must have a repository on GitHub. If not, `gemdiff` will find nothing or a similar repository, which\nis not helpful. Some gems' source code is not on GitHub. `gemdiff` could support other source hosts. Submit a pull request!\n\n2. The GitHub repository must have tagged releases to show compare views. If you find gems that do not tag\nreleases, submit an issue to the gem maintainer to tag their releases.\n\n3. The versions must be tagged using the standard format of `v1.2.3`. If you find gems that follow\na non-standard format (such as `1.2.3`), please open an issue or submit a pull request.\nSee [`lib/gemdiff/outdated_gem.rb`](https://github.com/teeparham/gemdiff/blob/main/lib/gemdiff/outdated_gem.rb).\n\n4. Encourage gem maintainers to enter the GitHub repository URL in the `homepage` field of their gemspec\nor anywhere in the description. If you find exceptions, open an issue or submit a pull request.\nSee [`lib/gemdiff/repo_finder.rb`](https://github.com/teeparham/gemdiff/blob/main/lib/gemdiff/repo_finder.rb).\n\n### More Info\n\n[Slides from lightning talk at Boulder Ruby 4/15/2014](http://www.slideshare.net/teeparham/gemdiff)\n","funding_links":[],"categories":["Ruby","Diff","Awesome Ruby CLIs"],"sub_categories":["Search"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteeparham%2Fgemdiff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fteeparham%2Fgemdiff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fteeparham%2Fgemdiff/lists"}