git-revision 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 38c023ad9fe2690c001f667183300d4ae9006ab8779894b96496a12c9288a89f
4
- data.tar.gz: c0a1cda3e04244dd0a788e033177e3616c929ab4a2e016f4bc0a777415550f40
3
+ metadata.gz: 2dd382007b3624a2fa642ed57d17c30aabcfdbfc82ba1dac7e96c65c0a23e8e7
4
+ data.tar.gz: eebcec5644297c25c07c265f81720d2430a96876e21182124a8453f59e209699
5
5
  SHA512:
6
- metadata.gz: 9544c0ff30075387b23dcb2549f88f36d6ff2bf6a1141dfe2f31c5f34af16bb40c01a9fee8d00d4abbdf29857e3b7b23c27ceb1a43f835d1c8199bcdada5a11d
7
- data.tar.gz: 713785ab3e63732e8c900f063f722edc80c029e02cb7fc80036afdb2d470ac4fe65847228c43b567c3cfea297845c3f23c3efe06fd390f4bd0cc2cb421619c5f
6
+ metadata.gz: dea9895cffc44d7c15b8e3139b34f7a29cddf3ba1b0cac3fef07951fd7de88d5ead4c6026fb62ecd75a36a7586ab8d408e43043b4563cd313d8e5930857f7b5c
7
+ data.tar.gz: 23ab948965b529e516025f0da8a48d5917794da5dba73e4ee566c32b98b97e72e8722da2be9ba12c9717a5622549dd12450c95a39c0be52f779e843d01432c47
data/README.md CHANGED
@@ -23,6 +23,8 @@ bundle install
23
23
 
24
24
  ```ruby
25
25
  {
26
+ :author => "John Smith",
27
+ :branch => "master",
26
28
  :commit_hash => "60619c10baca6f9b4d03253697d43b7cf5d08edf",
27
29
  :commit_hash_short => "60619c1",
28
30
  :commit_subject => "release beta version",
@@ -36,6 +38,8 @@ bundle install
36
38
  Additionally you can access these methods directly:
37
39
 
38
40
  ```ruby
41
+ Git::Revision.author # returns last commit author
42
+ Git::Revision.branch # returns current branch
39
43
  Git::Revision.commit # returns last commit hash
40
44
  Git::Revision.commit_short # returns abbreviated last commit hash (7 characters)
41
45
  Git::Revision.message # returns last commit message subject
data/git-revision.gemspec CHANGED
@@ -1,9 +1,9 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = 'git-revision'
3
- gem.version = '0.0.3'
3
+ gem.version = '0.0.4'
4
4
  gem.files = `git ls-files`.split($\)
5
5
  gem.require_path = 'lib'
6
- gem.license = 'BSD'
6
+ gem.license = 'BSD-2-Clause'
7
7
 
8
8
  gem.author = 'Nihad Abbasov'
9
9
  gem.email = 'nihad@42na.in'
data/lib/git-revision.rb CHANGED
@@ -33,8 +33,13 @@ module Git
33
33
  `git rev-parse --abbrev-ref HEAD`.strip
34
34
  end
35
35
 
36
+ def author
37
+ `git log -1 --pretty=format:"%an"`
38
+ end
39
+
36
40
  def info
37
41
  @info ||= {
42
+ :author => author,
38
43
  :branch => branch,
39
44
  :commit_hash => commit,
40
45
  :commit_hash_short => commit_short,
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-revision
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nihad Abbasov
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-19 00:00:00.000000000 Z
11
+ date: 2021-12-26 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description:
13
+ description:
14
14
  email: nihad@42na.in
15
15
  executables: []
16
16
  extensions: []
@@ -22,9 +22,9 @@ files:
22
22
  - lib/git-revision.rb
23
23
  homepage: http://github.com/narkoz/git-revision
24
24
  licenses:
25
- - BSD
25
+ - BSD-2-Clause
26
26
  metadata: {}
27
- post_install_message:
27
+ post_install_message:
28
28
  rdoc_options: []
29
29
  require_paths:
30
30
  - lib
@@ -39,8 +39,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  requirements: []
42
- rubygems_version: 3.0.6
43
- signing_key:
42
+ rubygems_version: 3.2.33
43
+ signing_key:
44
44
  specification_version: 4
45
45
  summary: Git Revision provides information about git source code.
46
46
  test_files: []