lolcommits 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +5 -1
- data/README.md +9 -35
- data/bin/lolcommits +5 -1
- data/lib/lolcommits.rb +1 -1
- data/lib/lolcommits/version.rb +1 -1
- metadata +2 -2
data/CHANGELOG
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
0.0. (
|
1
|
+
0.0.3 (16 April 2012)
|
2
|
+
* use only first line for multi-line commit msgs (pull req #21)
|
3
|
+
* clean up some command line options
|
4
|
+
|
5
|
+
0.0.2 (2 April 2012)
|
2
6
|
* add --delay option to delay image capture (thx JohanB), can be
|
3
7
|
persistently set via LOLCOMMITS_DELAY environment variable.
|
4
8
|
* add --last command to view most recent lolcommit for a repo
|
data/README.md
CHANGED
@@ -4,10 +4,10 @@ Takes a snapshot with your Mac's built-in iSight/FaceTime webcam every time you
|
|
4
4
|
|
5
5
|
By default, the lolimages are stored by a Github style short SHA in a `~/.lolcommits` directory created for you.
|
6
6
|
|
7
|
-
## Installation (for
|
7
|
+
## Installation (for Mac OS X)
|
8
8
|
We've gotten rid of most of the dependency chain, yay!
|
9
9
|
|
10
|
-
You'll need imagesnap and imagemagick installed. Homebrew makes this easy. Simply do:
|
10
|
+
You'll need imagesnap and imagemagick installed. [Homebrew](http://mxcl.github.com/homebrew/) makes this easy. Simply do:
|
11
11
|
|
12
12
|
brew install imagemagick
|
13
13
|
brew install imagesnap
|
@@ -22,7 +22,7 @@ You're all set! To enable lolcommits for a git repo, go to the base directory o
|
|
22
22
|
|
23
23
|
lolcommits --enable
|
24
24
|
|
25
|
-
Likewise, you can disable it via `lolcommits --disable`.
|
25
|
+
Likewise, you can disable it via `lolcommits --disable`. For a full list of options, you can do `lolcommits --help`.
|
26
26
|
|
27
27
|
## Sample images
|
28
28
|
Please add your own lolcommit to these samples! Just fork this repo, add it to this section of the README, and send me a pull request.
|
@@ -38,7 +38,13 @@ Please add your own lolcommit to these samples! Just fork this repo, add it to
|
|
38
38
|
|
39
39
|
<img width='320' height='240' src="https://github.com/mroth/lolcommits/raw/gh-pages/sample8.jpg" />
|
40
40
|
<br/>
|
41
|
+
<a href="http://github.com/sfsekaran/"><img width='320' height='240' src="http://cl.ly/252S0o1J3x3n1b1k251N/d5f80e4f88a.jpg" /></a>
|
42
|
+
|
43
|
+
<a href="http://github.com/codegoblin/"><img width='320' height='240' src="http://cl.ly/2R0u040D2E2k0Y03240B/19bda811539.jpg" /></a>
|
44
|
+
<br/>
|
45
|
+
<img width='320' height='240' src="https://p.twimg.com/AqE73M1CMAAerqL.jpg" />
|
41
46
|
|
47
|
+
<!--
|
42
48
|
## Upgrading from an old (non-gem) version?
|
43
49
|
If you used the autoinstaller, here's how to get rid of the old stuff (I think)
|
44
50
|
|
@@ -53,36 +59,4 @@ If you want to get rid of git-hooks entirly (it won't hurt anything, but we dont
|
|
53
59
|
rm /usr/local/bin/git-hooks
|
54
60
|
rm -rf ~/.git_hooks
|
55
61
|
rm -rf ~/.githooks_src
|
56
|
-
|
57
|
-
<!--
|
58
|
-
# LEGACY README STUFF LIVES BELOW THIS LINE
|
59
|
-
|
60
|
-
## Prerequisites
|
61
|
-
|
62
|
-
- ImageMagick (`brew install imagemagick` assuming you are on a mac using [Homebrew](http://mxcl.github.com/homebrew/))
|
63
|
-
- RMagick and ruby-git gems (`bundle install` when in this directory)
|
64
|
-
- [ImageSnap](http://www.iharder.net/current/macosx/imagesnap/) (included)
|
65
|
-
|
66
|
-
## Installation
|
67
|
-
|
68
|
-
### The boring way
|
69
|
-
Copy `bin/imagesnap` to somewhere in your `$PATH`. Make `lolcommit.rb` a post-commit hook in the repo you want it to run for.
|
70
|
-
|
71
|
-
### The awesome way (works for multiple repos)
|
72
|
-
Run `rake install`. This will do the following:
|
73
|
-
|
74
|
-
- Copy `imagesnap` to `/usr/local/bin`
|
75
|
-
- Clone and install [the git-hooks project](https://github.com/icefox/git-hooks) (adding it to `/usr/local/bin`)
|
76
|
-
- Creates your global user `~/.git_hooks` and gives you a few directories to start (pre-commit, commit-msg, and post-commit).
|
77
|
-
- Copies the main script here (`lolcommit.rb`) to your new `~/.git_hooks/post-commit` directory.
|
78
|
-
- Uses `bundler` to install any uninstalled Gem dependencies (assuming bundler is installed, manually `gem install bundler` if not, we don't auto-install it to be polite.)
|
79
|
-
- Uses `homebrew` to install ImageMagick (assuming Homebrew is installed, we don't auto-install it here to be polite.)
|
80
|
-
|
81
|
-
Once this is done, simply run `git hooks --install` while in any repository you want to use this in.
|
82
|
-
|
83
|
-
This installs [git-hooks](https://github.com/icefox/git-hooks) which gives you a global user hooks directory so you can set up other stuff easily as well. See their README for more details.
|
84
|
-
|
85
|
-
If you don't want to use `/usr/local/bin` you can provide a different
|
86
|
-
dir running `LOCAL_BINDIR=/your/path/of/choice rake install`
|
87
|
-
|
88
62
|
-->
|
data/bin/lolcommits
CHANGED
@@ -94,18 +94,21 @@ Choice.options do
|
|
94
94
|
|
95
95
|
option :enable do
|
96
96
|
long "--enable"
|
97
|
+
short '-e'
|
97
98
|
action { do_enable }
|
98
99
|
desc "install lolcommits for this repo"
|
99
100
|
end
|
100
101
|
|
101
102
|
option :disable do
|
102
103
|
long "--disable"
|
104
|
+
short '-d'
|
103
105
|
action { do_disable }
|
104
106
|
desc "uninstall lolcommits for this repo"
|
105
107
|
end
|
106
108
|
|
107
109
|
option :capture do
|
108
110
|
long "--capture"
|
111
|
+
short 'c'
|
109
112
|
desc "capture lolcommit based on last git commit"
|
110
113
|
end
|
111
114
|
|
@@ -134,12 +137,14 @@ Choice.options do
|
|
134
137
|
|
135
138
|
option :sha do
|
136
139
|
desc "pass SHA manually (for test only)"
|
140
|
+
long "--sha"
|
137
141
|
short '-s'
|
138
142
|
default "test-#{rand(10 ** 10)}"
|
139
143
|
end
|
140
144
|
|
141
145
|
option :msg do
|
142
146
|
desc "pass commit msg manually (for test only)"
|
147
|
+
long "--msg"
|
143
148
|
short '-m'
|
144
149
|
default "this is a test message i didnt really commit something"
|
145
150
|
end
|
@@ -149,7 +154,6 @@ Choice.options do
|
|
149
154
|
desc "delay taking of the snapshot by n seconds"
|
150
155
|
cast Integer
|
151
156
|
short '-d'
|
152
|
-
#default 0
|
153
157
|
end
|
154
158
|
end
|
155
159
|
|
data/lib/lolcommits.rb
CHANGED
@@ -23,7 +23,7 @@ module Lolcommits
|
|
23
23
|
def parse_git(dir='.')
|
24
24
|
g = Git.open('.')
|
25
25
|
commit = g.log.first
|
26
|
-
commit_msg = commit.message
|
26
|
+
commit_msg = commit.message.split("\n").first
|
27
27
|
commit_sha = commit.sha[0..10]
|
28
28
|
basename = File.basename(g.dir.to_s)
|
29
29
|
basename.sub!(/^\./, 'dot') #no invisible directories in output, thanks!
|
data/lib/lolcommits/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lolcommits
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-04-
|
12
|
+
date: 2012-04-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rmagick
|