lolcommits 0.5.7 → 0.5.8.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.rubocop.yml +1 -0
- data/.rubocop_todo.yml +16 -161
- data/.travis.yml +11 -4
- data/Gemfile +2 -2
- data/Rakefile +24 -32
- data/bin/lolcommits +62 -125
- data/features/bugs.feature +24 -9
- data/features/lolcommits.feature +136 -145
- data/features/plugins.feature +16 -33
- data/features/step_definitions/lolcommits_steps.rb +91 -71
- data/features/support/env.rb +18 -48
- data/features/support/path_helpers.rb +9 -8
- data/lib/lolcommits.rb +3 -10
- data/lib/lolcommits/capturer.rb +10 -2
- data/lib/lolcommits/capturer/capture_linux.rb +1 -1
- data/lib/lolcommits/capturer/capture_linux_animated.rb +12 -13
- data/lib/lolcommits/capturer/capture_mac_animated.rb +12 -13
- data/lib/lolcommits/cli/fatals.rb +77 -0
- data/lib/lolcommits/cli/launcher.rb +29 -0
- data/lib/lolcommits/cli/process_runner.rb +48 -0
- data/lib/lolcommits/cli/timelapse_gif.rb +45 -0
- data/lib/lolcommits/configuration.rb +30 -133
- data/lib/lolcommits/git_info.rb +58 -28
- data/lib/lolcommits/installation.rb +11 -21
- data/lib/lolcommits/platform.rb +134 -0
- data/lib/lolcommits/plugin.rb +2 -2
- data/lib/lolcommits/plugins/dot_com.rb +15 -15
- data/lib/lolcommits/plugins/lol_protonet.rb +68 -0
- data/lib/lolcommits/plugins/lol_twitter.rb +12 -15
- data/lib/lolcommits/plugins/lol_yammer.rb +4 -6
- data/lib/lolcommits/plugins/lolsrv.rb +8 -11
- data/lib/lolcommits/plugins/loltext.rb +7 -7
- data/lib/lolcommits/plugins/tranzlate.rb +70 -70
- data/lib/lolcommits/plugins/uploldz.rb +8 -8
- data/lib/lolcommits/runner.rb +36 -35
- data/lib/lolcommits/version.rb +1 -1
- data/lolcommits.gemspec +11 -10
- data/test/lolcommits_test.rb +35 -0
- data/test/plugins_test.rb +52 -0
- metadata +41 -20
- data/test/test_lolcommits.rb +0 -78
data/features/bugs.feature
CHANGED
@@ -3,11 +3,14 @@ Feature: Bug regression testing
|
|
3
3
|
I want to ensure fixed bugs stay fixed
|
4
4
|
So that I don't have to fix them again!
|
5
5
|
|
6
|
+
Background:
|
7
|
+
Given a mocked home directory
|
8
|
+
|
6
9
|
#
|
7
10
|
# issue #58, https://github.com/mroth/lolcommits/issues/58
|
8
11
|
#
|
9
12
|
Scenario: handle git repos with spaces in directory name
|
10
|
-
Given I am in a git
|
13
|
+
Given I am in a git repo named "test lolol" with lolcommits enabled
|
11
14
|
And I successfully run `git commit --allow-empty -m 'can haz commit'`
|
12
15
|
Then the output should contain "*** Preserving this moment in history."
|
13
16
|
And a directory named "../.lolcommits/test-lolol" should exist
|
@@ -17,7 +20,7 @@ Feature: Bug regression testing
|
|
17
20
|
#
|
18
21
|
@fake-interactive-rebase @slow_process @unstable
|
19
22
|
Scenario: Don't trigger capture during a git rebase
|
20
|
-
Given I am in a git
|
23
|
+
Given I am in a git repo named "yuh8history" with lolcommits enabled
|
21
24
|
And I do 6 git commits
|
22
25
|
When I successfully run `git rebase -i HEAD~5`
|
23
26
|
# Then there should be 4 commit entries in the git log
|
@@ -28,31 +31,43 @@ Feature: Bug regression testing
|
|
28
31
|
#
|
29
32
|
Scenario: don't warn about system_timer (on MRI 1.8.7)
|
30
33
|
When I successfully run `lolcommits`
|
31
|
-
Then the output should not contain
|
34
|
+
Then the output should not contain:
|
35
|
+
"""
|
36
|
+
Faraday: you may want to install system_timer for reliable timeouts
|
37
|
+
"""
|
32
38
|
|
33
39
|
#
|
34
40
|
# issue #81, https://github.com/mroth/lolcommits/issues/81
|
35
41
|
#
|
36
|
-
Scenario: don't want
|
42
|
+
Scenario: don't want initialized constant warning from Faraday (MRI 1.8.7)
|
37
43
|
When I successfully run `lolcommits`
|
38
|
-
Then the output should not contain
|
39
|
-
|
44
|
+
Then the output should not contain:
|
45
|
+
"""
|
46
|
+
warning: already initialized constant DEFAULT_BOUNDARY
|
47
|
+
"""
|
48
|
+
|
40
49
|
#
|
41
50
|
# issue #87, https://github.com/mroth/lolcommits/issues/87
|
42
51
|
#
|
43
52
|
@fake-no-imagemagick
|
44
53
|
Scenario: gracefully fail when imagemagick is not installed
|
45
54
|
When I run `lolcommits`
|
46
|
-
Then the output should contain
|
55
|
+
Then the output should contain:
|
56
|
+
"""
|
57
|
+
ImageMagick does not appear to be properly installed
|
58
|
+
"""
|
47
59
|
And the exit status should be 1
|
48
60
|
|
49
61
|
#
|
50
62
|
# issue #50, https://github.com/mroth/lolcommits/issues/50
|
51
63
|
#
|
52
64
|
Scenario: catch upstream bug with ruby-git and color=always
|
53
|
-
Given I am in a git
|
65
|
+
Given I am in a git repo named "whatev" with lolcommits enabled
|
54
66
|
And I successfully run `git config color.ui always`
|
55
67
|
When I run `lolcommits`
|
56
|
-
Then the output should contain
|
68
|
+
Then the output should contain:
|
69
|
+
"""
|
70
|
+
Due to a bug in the ruby-git library, git config for color.ui cannot be set to 'always'.
|
71
|
+
"""
|
57
72
|
And the output should contain "Try setting it to 'auto' instead!"
|
58
73
|
And the exit status should be 1
|
data/features/lolcommits.feature
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
Feature: Basic UI functionality
|
2
2
|
|
3
|
+
Background:
|
4
|
+
Given a mocked home directory
|
5
|
+
|
3
6
|
Scenario: App just runs
|
4
7
|
When I get help for "lolcommits"
|
5
8
|
Then the exit status should be 0
|
@@ -9,161 +12,134 @@ Feature: Basic UI functionality
|
|
9
12
|
Given I am using a "Mac" platform
|
10
13
|
When I get help for "lolcommits"
|
11
14
|
Then the following options should be documented:
|
12
|
-
|
13
|
-
|
15
|
+
| --animate | which is optional |
|
16
|
+
| -a | which is optional |
|
14
17
|
|
15
18
|
Scenario: Help should not show the animate option on a Windows plaftorm
|
16
19
|
Given I am using a "Windows" platform
|
17
20
|
When I get help for "lolcommits"
|
18
21
|
Then the output should not match /\-a\, \-\-animate\=SECONDS/
|
19
22
|
|
20
|
-
Scenario: Enable in a naked git
|
21
|
-
Given
|
22
|
-
When I
|
23
|
-
And I successfully run `lolcommits --enable`
|
23
|
+
Scenario: Enable in a naked git repo
|
24
|
+
Given I am in a git repo
|
25
|
+
When I successfully run `lolcommits --enable`
|
24
26
|
Then the output should contain "installed lolcommit hook to:"
|
25
|
-
And the
|
26
|
-
And a file named ".git/hooks/post-commit" should exist
|
27
|
-
And the file ".git/hooks/post-commit" should contain "lolcommits --capture"
|
27
|
+
And the lolcommits post-commit hook should be properly installed
|
28
28
|
And the exit status should be 0
|
29
29
|
|
30
|
-
Scenario: Enable in a git
|
31
|
-
Given
|
32
|
-
|
33
|
-
When I
|
34
|
-
And I successfully run `lolcommits --enable`
|
30
|
+
Scenario: Enable in a git repo that already has a post-commit hook
|
31
|
+
Given I am in a git repo
|
32
|
+
And a post-commit hook with "#!/bin/sh\n\n/my/own/script"
|
33
|
+
When I successfully run `lolcommits --enable`
|
35
34
|
Then the output should contain "installed lolcommit hook to:"
|
36
|
-
And the
|
37
|
-
And
|
38
|
-
And the
|
39
|
-
And the file ".git/hooks/post-commit" should contain "/my/own/script"
|
40
|
-
And the file ".git/hooks/post-commit" should contain "lolcommits --capture"
|
35
|
+
And the lolcommits post-commit hook should be properly installed
|
36
|
+
And the post-commit hook should contain "#!/bin/sh"
|
37
|
+
And the post-commit hook should contain "/my/own/script"
|
41
38
|
And the exit status should be 0
|
42
39
|
|
43
|
-
Scenario: Enable in a git
|
44
|
-
Given
|
45
|
-
|
46
|
-
When I cd to "loltest"
|
40
|
+
Scenario: Enable in a git repo that has post-commit hook with a bad shebang
|
41
|
+
Given I am in a git repo
|
42
|
+
And a post-commit hook with "#!/bin/ruby"
|
47
43
|
And I run `lolcommits --enable`
|
48
|
-
|
49
|
-
And the
|
44
|
+
Then the output should contain "doesn't start with a good shebang"
|
45
|
+
And the post-commit hook should not contain "lolcommits --capture"
|
50
46
|
And the exit status should be 1
|
51
47
|
|
52
|
-
Scenario: Enable in a git
|
53
|
-
Given
|
54
|
-
When I
|
55
|
-
|
56
|
-
|
57
|
-
And the output should contain "(to remove later, you can use: lolcommits --disable)"
|
58
|
-
And a file named ".git/hooks/post-commit" should exist
|
59
|
-
And the file ".git/hooks/post-commit" should contain "lolcommits --capture -w 5 --fork"
|
60
|
-
And the exit status should be 0
|
48
|
+
Scenario: Enable in a git repo passing capture arguments
|
49
|
+
Given I am in a git repo
|
50
|
+
When I successfully run `lolcommits --enable -w 5 --fork`
|
51
|
+
Then the post-commit hook should contain "lolcommits --capture -w 5 --fork"
|
52
|
+
And the exit status should be 0
|
61
53
|
|
62
|
-
Scenario: Disable in a enabled git
|
63
|
-
Given I am in a git
|
54
|
+
Scenario: Disable in a enabled git repo
|
55
|
+
Given I am in a git repo with lolcommits enabled
|
64
56
|
When I successfully run `lolcommits --disable`
|
65
57
|
Then the output should contain "uninstalled"
|
66
|
-
|
67
|
-
|
68
|
-
And the exit status should be 0
|
58
|
+
And a file named ".git/hooks/post-commit" should exist
|
59
|
+
And the exit status should be 0
|
69
60
|
|
70
61
|
Scenario: Trying to enable while not in a git repo fails
|
71
62
|
Given I am in a directory named "svnrulez"
|
72
63
|
When I run `lolcommits --enable`
|
73
|
-
Then the output should contain
|
74
|
-
|
64
|
+
Then the output should contain:
|
65
|
+
"""
|
66
|
+
You don't appear to be in the base directory of a git project.
|
67
|
+
"""
|
68
|
+
And the exit status should be 1
|
75
69
|
|
76
70
|
Scenario: Capture doesnt break in forked mode
|
77
|
-
Given I am in a git
|
71
|
+
Given I am in a git repo named "forked"
|
78
72
|
And I do a git commit
|
79
73
|
When I successfully run `lolcommits --capture --fork`
|
80
|
-
Then there should be exactly 1 pid in "
|
81
|
-
When I wait for the child process to exit in "
|
82
|
-
Then a directory named "
|
83
|
-
And a file named "
|
84
|
-
And there should be exactly 1 jpg in "
|
74
|
+
Then there should be exactly 1 pid in "~/.lolcommits/forked"
|
75
|
+
When I wait for the child process to exit in "forked"
|
76
|
+
Then a directory named "~/.lolcommits/forked" should exist
|
77
|
+
And a file named "~/.lolcommits/forked/tmp_snapshot.jpg" should not exist
|
78
|
+
And there should be exactly 1 jpg in "~/.lolcommits/forked"
|
85
79
|
|
86
80
|
Scenario: Commiting in an enabled repo triggers successful capture
|
87
|
-
Given I am in a git
|
81
|
+
Given I am in a git repo named "myrepo" with lolcommits enabled
|
88
82
|
When I do a git commit
|
89
83
|
Then the output should contain "*** Preserving this moment in history."
|
90
|
-
And a directory named "
|
91
|
-
And a file named "
|
92
|
-
And there should be exactly 1 jpg in "
|
84
|
+
And a directory named "~/.lolcommits/myrepo" should exist
|
85
|
+
And a file named "~/.lolcommits/myrepo/tmp_snapshot.jpg" should not exist
|
86
|
+
And there should be exactly 1 jpg in "~/.lolcommits/myrepo"
|
93
87
|
|
94
|
-
Scenario: Commiting in
|
95
|
-
Given I am in a git
|
88
|
+
Scenario: Commiting in enabled repo subdirectory triggers successful capture
|
89
|
+
Given I am in a git repo named "testcapture" with lolcommits enabled
|
96
90
|
And a directory named "subdir"
|
97
91
|
And an empty file named "subdir/FOOBAR"
|
98
92
|
When I cd to "subdir/"
|
99
93
|
And I do a git commit
|
100
94
|
Then the output should contain "*** Preserving this moment in history."
|
101
|
-
And a directory named "
|
102
|
-
And a directory named "
|
103
|
-
And there should be exactly 1 jpg in "
|
95
|
+
And a directory named "~/.lolcommits/testcapture" should exist
|
96
|
+
And a directory named "~/.lolcommits/subdir" should not exist
|
97
|
+
And there should be exactly 1 jpg in "~/.lolcommits/testcapture"
|
104
98
|
|
105
99
|
Scenario: Stealth mode does not alert the user
|
106
|
-
Given I am in a git
|
100
|
+
Given I am in a git repo named "teststealth"
|
107
101
|
And I do a git commit
|
108
102
|
When I run `lolcommits --stealth --capture`
|
109
103
|
Then the output should not contain "*** Preserving this moment in history."
|
110
|
-
|
104
|
+
And there should be exactly 1 jpg in "~/.lolcommits/teststealth"
|
111
105
|
|
112
|
-
Scenario: Commiting in stealth mode
|
113
|
-
Given I am in a git
|
114
|
-
|
106
|
+
Scenario: Commiting in stealth mode captures without alerting the committer
|
107
|
+
Given I am in a git repo with lolcommits enabled
|
108
|
+
And I have environment variable LOLCOMMITS_STEALTH set to 1
|
115
109
|
When I do a git commit
|
116
110
|
Then the output should not contain "*** Preserving this moment in history."
|
117
|
-
|
111
|
+
And there should be exactly 1 jpg in its loldir
|
118
112
|
|
119
113
|
Scenario: Show plugins
|
120
114
|
When I successfully run `lolcommits --plugins`
|
121
115
|
Then the output should contain a list of plugins
|
122
116
|
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
And I run `lolcommits --config` interactively
|
131
|
-
When I type "loltext"
|
132
|
-
When I type "true"
|
133
|
-
Then the output should contain a list of plugins
|
134
|
-
And the output should contain "Name of plugin to configure:"
|
135
|
-
Then the output should contain "enabled:"
|
117
|
+
Scenario: Configuring plugin
|
118
|
+
Given I am in a git repo named "config-test"
|
119
|
+
When I run `lolcommits --config` interactively
|
120
|
+
And I wait for output to contain "Name of plugin to configure:"
|
121
|
+
Then I type "loltext"
|
122
|
+
And I wait for output to contain "enabled:"
|
123
|
+
Then I type "true"
|
136
124
|
Then the output should contain "Successfully configured plugin: loltext"
|
137
|
-
And
|
125
|
+
And the output should contain a list of plugins
|
126
|
+
And a file named "~/.lolcommits/config-test/config.yml" should exist
|
138
127
|
When I successfully run `lolcommits --show-config`
|
139
|
-
Then the output should
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
Then
|
149
|
-
And a file named "
|
150
|
-
When I successfully run `lolcommits --show-config`
|
151
|
-
Then the output should contain "loltext:"
|
152
|
-
And the output should contain "enabled: true"
|
153
|
-
|
154
|
-
Scenario: Configuring Plugin In Test Mode
|
155
|
-
Given a git repository named "testmode-config-test"
|
156
|
-
When I cd to "testmode-config-test"
|
157
|
-
And I run `lolcommits --config --test` and wait for output
|
158
|
-
And I enter "loltext" for "Name of plugin to configure"
|
159
|
-
And I enter "true" for "enabled"
|
160
|
-
Then I should be presented "Successfully configured plugin: loltext"
|
161
|
-
And a file named "../.lolcommits/test/config.yml" should exist
|
128
|
+
Then the output should match /loltext:\s+enabled: true/
|
129
|
+
|
130
|
+
Scenario: Configuring plugin in test mode affects test loldir not repo loldir
|
131
|
+
Given I am in a git repo named "testmode-config-test"
|
132
|
+
When I run `lolcommits --config --test` interactively
|
133
|
+
And I wait for output to contain "Name of plugin to configure:"
|
134
|
+
Then I type "loltext"
|
135
|
+
And I wait for output to contain "enabled:"
|
136
|
+
Then I type "true"
|
137
|
+
Then the output should contain "Successfully configured plugin: loltext"
|
138
|
+
And a file named "~/.lolcommits/test/config.yml" should exist
|
162
139
|
When I successfully run `lolcommits --test --show-config`
|
163
|
-
Then the output should
|
164
|
-
And the output should contain "enabled: true"
|
140
|
+
Then the output should match /loltext:\s+enabled: true/
|
165
141
|
|
166
|
-
Scenario: test capture should work regardless of whether in a git
|
142
|
+
Scenario: test capture should work regardless of whether in a git repo
|
167
143
|
Given I am in a directory named "nothingtoseehere"
|
168
144
|
When I run `lolcommits --test --capture`
|
169
145
|
Then the output should contain "*** Capturing in test mode."
|
@@ -171,100 +147,115 @@ Feature: Basic UI functionality
|
|
171
147
|
And the exit status should be 0
|
172
148
|
|
173
149
|
Scenario: test capture should store in its own test directory
|
174
|
-
Given I am in a git
|
150
|
+
Given I am in a git repo named "randomgitrepo" with lolcommits enabled
|
175
151
|
When I successfully run `lolcommits --test --capture`
|
176
|
-
Then a directory named "
|
177
|
-
And a directory named "
|
152
|
+
Then a directory named "~/.lolcommits/test" should exist
|
153
|
+
And a directory named "~/.lolcommits/randomgitrepo" should not exist
|
178
154
|
|
179
155
|
Scenario: last command should work properly when in a lolrepo
|
180
|
-
Given a git
|
181
|
-
|
182
|
-
And I cd to "randomgitrepo"
|
156
|
+
Given I am in a git repo
|
157
|
+
And its loldir has 2 lolimages
|
183
158
|
When I run `lolcommits --last`
|
184
159
|
Then the exit status should be 0
|
185
160
|
|
186
161
|
Scenario: last command should work properly when in a lolrepo subdirectory
|
187
|
-
Given I am in a git
|
188
|
-
And
|
162
|
+
Given I am in a git repo
|
163
|
+
And its loldir has 2 lolimages
|
189
164
|
And a directory named "randomdir"
|
190
165
|
And I cd to "randomdir"
|
191
166
|
When I run `lolcommits --last`
|
192
|
-
Then the output should not contain
|
193
|
-
|
167
|
+
Then the output should not contain:
|
168
|
+
"""
|
169
|
+
Can't do that since we're not in a valid git repository!
|
170
|
+
"""
|
171
|
+
And the exit status should be 0
|
194
172
|
|
195
173
|
@in-tempdir
|
196
174
|
Scenario: last command should fail gracefully if not in a lolrepo
|
197
175
|
Given I am in a directory named "gitsuxcvs4eva"
|
198
176
|
When I run `lolcommits --last`
|
199
|
-
Then the output should contain
|
177
|
+
Then the output should contain:
|
178
|
+
"""
|
179
|
+
Can't do that since we're not in a valid git repository!
|
180
|
+
"""
|
200
181
|
And the exit status should be 1
|
201
182
|
|
202
183
|
Scenario: last command should fail gracefully if zero lolimages in lolrepo
|
203
|
-
Given a git
|
204
|
-
And
|
205
|
-
And I cd to "randomgitrepo"
|
184
|
+
Given I am in a git repo
|
185
|
+
And its loldir has 0 lolimages
|
206
186
|
When I run `lolcommits --last`
|
207
|
-
Then the output should contain
|
187
|
+
Then the output should contain:
|
188
|
+
"""
|
189
|
+
No lolcommits have been captured for this repository yet.
|
190
|
+
"""
|
208
191
|
Then the exit status should be 1
|
209
192
|
|
210
193
|
Scenario: browse command should work properly when in a lolrepo
|
211
|
-
Given a git
|
212
|
-
|
213
|
-
And I cd to "randomgitrepo"
|
194
|
+
Given I am in a git repo
|
195
|
+
And its loldir has 2 lolimages
|
214
196
|
When I run `lolcommits --browse`
|
215
197
|
Then the exit status should be 0
|
216
198
|
|
217
199
|
Scenario: browse command should work properly when in a lolrepo subdirectory
|
218
|
-
Given I am in a git
|
219
|
-
And
|
220
|
-
And a directory named "
|
221
|
-
And I cd to "
|
200
|
+
Given I am in a git repo
|
201
|
+
And its loldir has 2 lolimages
|
202
|
+
And a directory named "subdir"
|
203
|
+
And I cd to "subdir"
|
222
204
|
When I run `lolcommits --browse`
|
223
|
-
Then the output should not contain
|
224
|
-
|
205
|
+
Then the output should not contain:
|
206
|
+
"""
|
207
|
+
Can't do that since we're not in a valid git repository!
|
208
|
+
"""
|
209
|
+
And the exit status should be 0
|
225
210
|
|
226
211
|
@in-tempdir
|
227
212
|
Scenario: browse command should fail gracefully when not in a lolrepo
|
228
213
|
Given I am in a directory named "gitsuxcvs4eva"
|
229
214
|
When I run `lolcommits --browse`
|
230
|
-
Then the output should contain
|
231
|
-
|
215
|
+
Then the output should contain:
|
216
|
+
"""
|
217
|
+
Can't do that since we're not in a valid git repository!
|
218
|
+
"""
|
219
|
+
And the exit status should be 1
|
232
220
|
|
233
221
|
Scenario: handle commit messages with quotation marks
|
234
|
-
Given I am in a git
|
235
|
-
When I successfully run `git commit --allow-empty -m '
|
222
|
+
Given I am in a git repo with lolcommits enabled
|
223
|
+
When I successfully run `git commit --allow-empty -m 'no "air quotes" bae'`
|
236
224
|
Then the exit status should be 0
|
237
|
-
|
225
|
+
And there should be exactly 1 jpg in its loldir
|
238
226
|
|
239
227
|
Scenario: generate gif should store in its own archive directory
|
240
|
-
Given I am in a git
|
241
|
-
And a loldir named "
|
228
|
+
Given I am in a git repo named "giffy" with lolcommits enabled
|
229
|
+
And a loldir named "giffy" with 2 lolimages
|
242
230
|
When I successfully run `lolcommits -g`
|
243
231
|
Then the output should contain "Generating animated gif."
|
244
|
-
|
245
|
-
|
232
|
+
And a directory named "~/.lolcommits/giffy/archive" should exist
|
233
|
+
And a file named "~/.lolcommits/giffy/archive/archive.gif" should exist
|
246
234
|
|
247
235
|
Scenario: generate gif with argument 'today'
|
248
|
-
Given I am in a git
|
249
|
-
And a loldir named "
|
236
|
+
Given I am in a git repo named "sunday" with lolcommits enabled
|
237
|
+
And a loldir named "sunday" with 2 lolimages
|
250
238
|
When I successfully run `lolcommits -g today`
|
251
|
-
|
239
|
+
Then there should be exactly 1 gif in "~/.lolcommits/sunday/archive"
|
252
240
|
|
253
241
|
@mac-only
|
254
242
|
Scenario: should generate an animated gif on the Mac platform
|
255
|
-
Given I am in a git
|
243
|
+
Given I am in a git repo named "animate"
|
256
244
|
And I do a git commit
|
257
245
|
And I am using a "Mac" platform
|
258
246
|
When I run `lolcommits --capture --animate=1`
|
259
247
|
Then the output should contain "*** Preserving this moment in history."
|
260
|
-
And a directory named "
|
261
|
-
And a file named "
|
262
|
-
And a directory named "
|
263
|
-
And there should be exactly 1 gif in "
|
248
|
+
And a directory named "~/.lolcommits/animate" should exist
|
249
|
+
And a file named "~/.lolcommits/animate/tmp_video.mov" should not exist
|
250
|
+
And a directory named "~/.lolcommits/animate/tmp_frames" should not exist
|
251
|
+
And there should be exactly 1 gif in "~/.lolcommits/animate"
|
264
252
|
|
265
253
|
@fake-no-ffmpeg
|
266
|
-
Scenario: gracefully fail when ffmpeg
|
254
|
+
Scenario: gracefully fail when ffmpeg not installed and --animate is used
|
267
255
|
Given I am using a "Mac" platform
|
268
256
|
When I run `lolcommits --animate=3`
|
269
|
-
Then the output should contain
|
257
|
+
Then the output should contain:
|
258
|
+
"""
|
259
|
+
ffmpeg does not appear to be properly installed
|
260
|
+
"""
|
270
261
|
And the exit status should be 1
|