Skip to content

gzzengwei/current_commit_rails

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CurrentCommitRails

Get current git commit information in Rails

Installation

Add this line to your application's Gemfile:

gem 'current_commit_rails'

And then execute:

$ bundle

Usage

Include current_commit_rails in your Gemfile (As shown above)

Get current GIT commit info via

CurrentCommitRails.commit_hash

Example:

CurrentCommitRails.commit_hash.sha #=> '38b96a38ec61b22cf9d385b8926cf63f4fdf3dcc'

Attributes including:

[:sha, :time, :branch, :author, :author_email, :author_time, :committer, :committer_email, :comitter_time]

Contributing

  1. Fork it ( https://github.com/gzzengwei/current_commit_rails/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

About

current_commit_rails gem

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages