{"id":16699950,"url":"https://github.com/narkoz/git-revision","last_synced_at":"2025-03-21T19:32:53.273Z","repository":{"id":5943976,"uuid":"7164607","full_name":"NARKOZ/git-revision","owner":"NARKOZ","description":"Ruby gem to get information about git source code","archived":false,"fork":false,"pushed_at":"2022-06-12T08:27:01.000Z","size":12,"stargazers_count":12,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-13T18:08:37.055Z","etag":null,"topics":["deployment","git","git-revision","ruby-gem"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/git-revision","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NARKOZ.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":"2012-12-14T11:49:13.000Z","updated_at":"2024-04-09T19:35:14.000Z","dependencies_parsed_at":"2022-09-11T05:54:18.836Z","dependency_job_id":null,"html_url":"https://github.com/NARKOZ/git-revision","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NARKOZ%2Fgit-revision","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NARKOZ%2Fgit-revision/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NARKOZ%2Fgit-revision/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NARKOZ%2Fgit-revision/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NARKOZ","download_url":"https://codeload.github.com/NARKOZ/git-revision/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221818145,"owners_count":16885696,"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":["deployment","git","git-revision","ruby-gem"],"created_at":"2024-10-12T18:08:38.545Z","updated_at":"2024-10-28T10:43:21.347Z","avatar_url":"https://github.com/NARKOZ.png","language":"Ruby","readme":"# Git Revision\n\nGit Revision is a simple (45 SLoC) Ruby gem that provides basic information about git source code.\nYou can use it in your apps, [for example](http://stackoverflow.com/q/8500644/159721), to show deployed version.\n\n## Installation\n\nAdd to Gemfile:\n\n```ruby\ngem 'git-revision'\n```\n\nand run:\n\n```sh\nbundle install\n```\n\n## Usage\n\n`Git::Revision.info` will return the following hash:\n\n```ruby\n{\n  :author =\u003e \"John Smith\",\n  :branch =\u003e \"master\",\n  :commit_hash =\u003e \"60619c10baca6f9b4d03253697d43b7cf5d08edf\",\n  :commit_hash_short =\u003e \"60619c1\",\n  :commit_subject =\u003e \"release beta version\",\n  :authored_date =\u003e \"Fri Jun 8 17:55:01 2012 +0500\",\n  :authored_timestamp =\u003e \"1339160101\",\n  :commit_tag =\u003e \"4.2.0.beta\",\n  :repo_last_tag =\u003e \"4.2.0.beta\"\n}\n```\n\nAdditionally you can access these methods directly:\n\n```ruby\nGit::Revision.author       # returns last commit author\nGit::Revision.branch       # returns current branch\nGit::Revision.commit       # returns last commit hash\nGit::Revision.commit_short # returns abbreviated last commit hash (7 characters)\nGit::Revision.message      # returns last commit message subject\nGit::Revision.date         # returns authored date of last commit\nGit::Revision.timestamp    # returns authored date of last commit in Unix time\nGit::Revision.tag          # returns last commit tag if exists\nGit::Revision.last_tag     # returns last tag in repository if exists\n```\n\n## License\n\nReleased under the BSD 2-clause license. See LICENSE.txt for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnarkoz%2Fgit-revision","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnarkoz%2Fgit-revision","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnarkoz%2Fgit-revision/lists"}