commitshots 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/commitshots/commits.rb +17 -0
  2. metadata +2 -1
@@ -0,0 +1,17 @@
1
+ module Commitshots
2
+ class Commits
3
+ def each
4
+ commit_ids = `git rev-list --all --pretty=oneline`.split("\n")
5
+ commit_ids.reverse!
6
+
7
+ commit_ids.each do |line|
8
+ parts = line.split(' ')
9
+ id = parts[0]
10
+ msg = line.gsub(id, '')
11
+ `git checkout #{id}`
12
+ yield id, msg
13
+ end
14
+ end
15
+ end
16
+ end
17
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: commitshots
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -19,6 +19,7 @@ extensions: []
19
19
  extra_rdoc_files: []
20
20
  files:
21
21
  - lib/commitshots.rb
22
+ - lib/commitshots/commits.rb
22
23
  - bin/commitshots
23
24
  homepage: http://rubygems.org/gems/commitshots
24
25
  licenses: []