lolcommits 0.17.3 → 0.18.0

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/CODE_OF_CONDUCT.md DELETED
@@ -1,71 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- education, socio-economic status, nationality, personal appearance, race,
10
- religion, or sexual identity and orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
16
-
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
-
23
- Examples of unacceptable behavior by participants include:
24
-
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
28
- * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
31
- * Other conduct which could reasonably be considered inappropriate in a
32
- professional setting
33
-
34
- ## Our Responsibilities
35
-
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
39
-
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
45
-
46
- ## Scope
47
-
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
54
-
55
- ## Reporting
56
-
57
- If you are subject to or witness unacceptable behavior, or have any other
58
- concerns, please notify a project maintainer. All reports will be kept
59
- confidential and will be reviewed and investigated promptly.
60
-
61
- We will investigate every complaint and take appropriate action. We reserve the
62
- right to remove any content that violates this Code of Conduct, or to
63
- temporarily or permanently ban any contributor for other behaviors that we deem
64
- inappropriate, threatening, offensive, or harmful.
65
-
66
- ## Attribution
67
-
68
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
69
- available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
70
-
71
- [homepage]: https://www.contributor-covenant.org
data/CONTRIBUTING.md DELETED
@@ -1,44 +0,0 @@
1
- ### Contributing
2
-
3
- Pull Requests are welcome! To start helping out on lolcommits:
4
-
5
- [Fork](https://guides.github.com/activities/forking/) then clone the repository:
6
-
7
- git clone git@github.com:your-username/lolcommits.git
8
-
9
- Create your feature branch:
10
-
11
- git checkout -b my-new-feature
12
-
13
- When you are happy with your change, run the full test suite:
14
-
15
- bundle exec rake
16
-
17
- Please ensure nothing is broken. It'd be awesome if you manually tested for
18
- regressions as well (since the test suite is far from complete).
19
-
20
- This default rake task uses [RuboCop](https://github.com/bbatsov/rubocop) to
21
- ensure Ruby style guidelines. If you want to run tests before conforming to this
22
- to verify functionality, just run `rake test` and `rake features` manually.
23
-
24
- With a passing test suite, commit your changes, push and submit a new [Pull
25
- Request](https://github.com/lolcommits/lolcommits/compare/):
26
-
27
- git commit -am 'Added some feature'
28
- git push origin my-new-feature
29
-
30
- At this point you'll be waiting for one of our maintainers to review it. We will
31
- try to reply to new Pull Requests within a few days. We might suggest some
32
- changes, improvements or alternatives. To increase the chance that your pull
33
- request gets accepted:
34
-
35
- * Explain what your are doing (and why) in your Pull Request description.
36
- * If you are fixing an
37
- [issue](https://github.com/lolcommits/lolcommits/issues), link to
38
- it in your description and [mention
39
- it](https://help.github.com/articles/closing-issues-via-commit-messages/) in
40
- the commit message.
41
- * Write a good [commit
42
- message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
43
- * Write tests.
44
-
data/Gemfile DELETED
@@ -1,6 +0,0 @@
1
- source "https://rubygems.org"
2
- git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3
-
4
- gemspec
5
-
6
- gem "cucumber", github: "cucumber/cucumber-ruby", ref: "a468bc6"
@@ -1,16 +0,0 @@
1
-
2
- Explain what you're changing and why here.
3
-
4
- ---
5
- #### :memo: Checklist
6
-
7
- Please check this list and leave it intact for the reviewer. Thanks! :heart:
8
-
9
- - [ ] Commit messages provide context (why not just what, some tips [here](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)).
10
- - [ ] If relevant, mention GitHub issue number above and include in a commit message.
11
- - [ ] Latest code from master merged.
12
- - [ ] New behaviour has test coverage.
13
- - [ ] Avoid duplicating code.
14
- - [ ] No commented out code.
15
- - [ ] Avoid comments for your code, write code that explains itself.
16
- - [ ] Changes are simple, useful, clear and brief.
data/Rakefile DELETED
@@ -1,16 +0,0 @@
1
- require "bundler/setup"
2
- require "bundler/gem_tasks"
3
-
4
- require "minitest/test_task"
5
- Minitest::TestTask.create(:test) do |t|
6
- t.warning = false
7
- end
8
-
9
- require "rdoc/task"
10
- Rake::RDocTask.new do |rdoc|
11
- rdoc.main = "README.md"
12
- rdoc.rdoc_files.include("README.md", "lib/**/*.rb", "bin/**/*")
13
- rdoc.rdoc_dir = "doc"
14
- end
15
-
16
- task default: :test
data/bin/cucumber DELETED
@@ -1,25 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'cucumber' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
10
-
11
- bundle_binstub = File.expand_path("bundle", __dir__)
12
-
13
- if File.file?(bundle_binstub)
14
- if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
15
- load(bundle_binstub)
16
- else
17
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
18
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
19
- end
20
- end
21
-
22
- require "rubygems"
23
- require "bundler/setup"
24
-
25
- load Gem.bin_path("cucumber", "cucumber")
data/bin/rubocop DELETED
@@ -1,25 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'rubocop' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
10
-
11
- bundle_binstub = File.expand_path("bundle", __dir__)
12
-
13
- if File.file?(bundle_binstub)
14
- if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
15
- load(bundle_binstub)
16
- else
17
- abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
18
- Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
19
- end
20
- end
21
-
22
- require "rubygems"
23
- require "bundler/setup"
24
-
25
- load Gem.bin_path("rubocop", "rubocop")
@@ -1,52 +0,0 @@
1
- Feature: Bug regression testing
2
- As a developer
3
- I want to ensure fixed bugs stay fixed
4
- So that I don't have to fix them again!
5
-
6
- Background:
7
- Given a mocked home directory
8
-
9
- #
10
- # issue #58, https://github.com/lolcommits/lolcommits/issues/58
11
- #
12
- Scenario: handle git repos with spaces in directory name
13
- Given I am in a git repo named "test lolol" with lolcommits enabled
14
- And I run `git commit --allow-empty -m 'can haz commit'`
15
- Then the output should contain "*** Preserving this moment in history."
16
- And a directory named "../.lolcommits/test-lolol" should exist
17
-
18
- #
19
- # issue #68, https://github.com/lolcommits/lolcommits/issues/68
20
- #
21
- @fake-interactive-rebase @slow_process
22
- Scenario: Don't trigger capture during a git rebase
23
- Given I am in a git repo named "yuh8history" with lolcommits enabled
24
- And I do 2 git commits
25
- When I run `git rebase -i HEAD~2`
26
- Then there should be exactly 2 jpgs in "~/.lolcommits/yuh8history"
27
-
28
- #
29
- # issue #87, https://github.com/lolcommits/lolcommits/issues/87
30
- #
31
- @fake-no-imagemagick
32
- Scenario: gracefully fail when imagemagick is not installed
33
- When I run `lolcommits`
34
- Then the output should contain:
35
- """
36
- ImageMagick does not appear to be properly installed
37
- """
38
- And the exit status should be 1
39
-
40
- #
41
- # issue #50, https://github.com/lolcommits/lolcommits/issues/50
42
- #
43
- Scenario: catch upstream bug with ruby-git and color=always
44
- Given I am in a git repo named "whatev" with lolcommits enabled
45
- And I run `git config color.ui always`
46
- When I run `lolcommits`
47
- Then the output should contain:
48
- """
49
- Due to a bug in the ruby-git library, git config for color.ui cannot be set to 'always'.
50
- """
51
- And the output should contain "Try setting it to 'auto' instead!"
52
- And the exit status should be 1
@@ -1,376 +0,0 @@
1
- Feature: Basic UI functionality
2
-
3
- Background:
4
- Given a mocked home directory
5
-
6
- Scenario: App just runs
7
- When I get help for "lolcommits"
8
- Then the exit status should be 0
9
- And the banner should be present
10
-
11
- Scenario: Shows version information
12
- When I run `lolcommits --version`
13
- Then the output should show the version number
14
- And the exit status should be 0
15
-
16
- Scenario: Help should show the animate option on a Mac platform
17
- Given I am using a "darwin" platform
18
- When I get help for "lolcommits"
19
- Then the following options should be documented:
20
- | --animate | which is optional |
21
- | -a | which is optional |
22
-
23
- Scenario: Help should not show the animate option on a Windows plaftorm
24
- Given I am using a "win32" platform
25
- When I get help for "lolcommits"
26
- Then the output should not match /\-a\, \-\-animate\=SECONDS/
27
-
28
- Scenario: Enable in a naked git repo
29
- Given I am in a git repo
30
- When I run `lolcommits --enable`
31
- Then the output should contain "installed lolcommit hook to:"
32
- And the lolcommits git post-commit hook should be properly installed
33
- And the exit status should be 0
34
-
35
- Scenario: Enable in a git repo that already has a git post-commit hook
36
- Given I am in a git repo
37
- And a git post-commit hook with "#!/bin/sh\n\n/my/own/script"
38
- When I run `lolcommits --enable`
39
- Then the output should contain "installed lolcommit hook to:"
40
- And the lolcommits git post-commit hook should be properly installed
41
- And the git post-commit hook should contain "#!/bin/sh"
42
- And the git post-commit hook should contain "/my/own/script"
43
- And the exit status should be 0
44
-
45
- Scenario: Enable in a git repo that has git post-commit hook with a bad shebang
46
- Given I am in a git repo
47
- And a git post-commit hook with "#!/bin/ruby"
48
- And I run `lolcommits --enable`
49
- Then the output should contain "doesn't start with a good shebang"
50
- And the git post-commit hook should not contain "lolcommits --capture"
51
- And the exit status should be 1
52
-
53
- Scenario: Enable in a git repo passing capture arguments
54
- Given I am in a git repo
55
- When I run `lolcommits --enable -w 5 --fork --stealth --device 'My Devce'`
56
- Then the git post-commit hook should contain "lolcommits --capture --delay 5 --fork --stealth --device 'My Devce'"
57
- And the exit status should be 0
58
-
59
- Scenario: Disable in a enabled git repo
60
- Given I am in a git repo with lolcommits enabled
61
- When I run `lolcommits --disable`
62
- Then the output should contain "uninstalled"
63
- And a file named ".git/hooks/post-commit" should exist
64
- And the exit status should be 0
65
-
66
- # flakey test sometimes fails
67
- # Scenario: Capture doesnt break in forked mode
68
- # Given I am in a git repo named "forked"
69
- # And I do a git commit
70
- # When I run `lolcommits --capture --fork`
71
- # Then there should be exactly 1 pid in "~/.lolcommits/forked"
72
- # When I wait for the child process to exit in "forked"
73
- # Then a directory named "~/.lolcommits/forked" should exist
74
- # And a file named "~/.lolcommits/forked/raw_capture.jpg" should not exist
75
- # And there should be exactly 1 jpg in "~/.lolcommits/forked"
76
-
77
- Scenario: Commiting in an enabled git repo triggers successful capture
78
- Given I am in a git repo named "myrepo" with lolcommits enabled
79
- When I do a git commit
80
- Then the output should contain "*** Preserving this moment in history."
81
- And a directory named "~/.lolcommits/myrepo" should exist
82
- And a file named "~/.lolcommits/myrepo/raw_capture.jpg" should not exist
83
- And there should be exactly 1 jpg in "~/.lolcommits/myrepo"
84
-
85
- Scenario: Commiting in enabled git repo subdirectory triggers successful capture
86
- Given I am in a git repo named "testcapture" with lolcommits enabled
87
- And a directory named "subdir"
88
- And an empty file named "subdir/FOOBAR"
89
- When I cd to "subdir/"
90
- And I do a git commit
91
- Then the output should contain "*** Preserving this moment in history."
92
- And a directory named "~/.lolcommits/testcapture" should exist
93
- And a directory named "~/.lolcommits/subdir" should not exist
94
- And there should be exactly 1 jpg in "~/.lolcommits/testcapture"
95
-
96
- Scenario: Stealth mode does not alert the user
97
- Given I am in a git repo named "teststealth"
98
- And I do a git commit
99
- When I run `lolcommits --stealth --capture`
100
- Then the output should not contain "*** Preserving this moment in history."
101
- And there should be exactly 1 jpg in "~/.lolcommits/teststealth"
102
-
103
- Scenario: Commiting in stealth mode captures without alerting the committer
104
- Given I am in a git repo with lolcommits enabled
105
- And I have environment variable LOLCOMMITS_STEALTH set to 1
106
- When I do a git commit
107
- Then the output should not contain "*** Preserving this moment in history."
108
- And there should be exactly 1 jpg in its loldir
109
-
110
- Scenario: Show plugins
111
- When I run `lolcommits --plugins`
112
- Then the output should contain a list of plugins
113
-
114
- Scenario: Configuring loltext plugin in test mode affects test loldir not repo loldir
115
- Given I am in a git repo named "testmode-config-test"
116
- When I run `lolcommits --config --test -p loltext` interactively
117
- Then I type "false"
118
- Then the output should contain "Disabling plugin: loltext - answer with 'true' to enable & configure"
119
- And a file named "~/.lolcommits/test/config.yml" should exist
120
- When I run `lolcommits --test --show-config`
121
- Then the output should match /loltext:\s+:enabled: false/
122
-
123
- Scenario: test capture should work regardless of whether in a vcs repo
124
- Given I am in a directory named "not_a_vcs_repo"
125
- When I run `lolcommits --test --capture`
126
- Then the output should contain "*** Capturing in test mode."
127
- And the output should not contain "path does not exist (ArgumentError)"
128
- And the exit status should be 0
129
-
130
- Scenario: test capture should store in its own test directory
131
- Given I am in a git repo named "randomgitrepo" with lolcommits enabled
132
- When I run `lolcommits --test --capture`
133
- Then a directory named "~/.lolcommits/test" should exist
134
- And a directory named "~/.lolcommits/randomgitrepo" should not exist
135
-
136
- Scenario: last command should work properly when in a git lolrepo
137
- Given I am in a git repo
138
- And its loldir has 2 lolimages
139
- When I run `lolcommits --last`
140
- Then the exit status should be 0
141
-
142
- Scenario: last command should work properly when in a git lolrepo subdirectory
143
- Given I am in a git repo
144
- And its loldir has 2 lolimages
145
- And a directory named "randomdir"
146
- And I cd to "randomdir"
147
- When I run `lolcommits --last`
148
- Then the output should not contain:
149
- """
150
- You don't appear to be in a directory of a supported vcs project.
151
- """
152
- And the exit status should be 0
153
-
154
- Scenario: Trying to enable while not in a git repo fails
155
- Given I am not in a git repo
156
- When I run `lolcommits --enable`
157
- Then the output should contain:
158
- """
159
- You don't appear to be in the base directory of a supported vcs project.
160
- """
161
- And the exit status should be 1
162
-
163
- Scenario: last command should fail gracefully if not in a repo
164
- Given I am not in a git repo
165
- When I run `lolcommits --last`
166
- Then the output should contain:
167
- """
168
- You don't appear to be in a directory of a supported vcs project.
169
- """
170
- And the exit status should be 1
171
-
172
- Scenario: Configuring loltext plugin if not in a repo
173
- Given I am not in a git repo
174
- When I run `lolcommits --config`
175
- Then the output should contain:
176
- """
177
- You don't appear to be in a directory of a supported vcs project.
178
- """
179
- And the exit status should be 1
180
-
181
- Scenario: browse command should fail gracefully when not in a repo
182
- Given I am not in a git repo
183
- When I run `lolcommits --browse`
184
- Then the output should contain:
185
- """
186
- You don't appear to be in a directory of a supported vcs project.
187
- """
188
- And the exit status should be 1
189
-
190
- Scenario: last command should fail gracefully if zero lolimages in lolrepo
191
- Given I am in a git repo
192
- And its loldir has 0 lolimages
193
- When I run `lolcommits --last`
194
- Then the output should contain:
195
- """
196
- No lolcommits have been captured for this repository yet.
197
- """
198
- Then the exit status should be 1
199
-
200
- Scenario: browse command should work properly when in a git lolrepo
201
- Given I am in a git repo
202
- And its loldir has 2 lolimages
203
- When I run `lolcommits --browse`
204
- Then the exit status should be 0
205
-
206
- Scenario: browse command should work properly when in a git lolrepo subdirectory
207
- Given I am in a git repo
208
- And its loldir has 2 lolimages
209
- And a directory named "subdir"
210
- And I cd to "subdir"
211
- When I run `lolcommits --browse`
212
- Then the output should not contain:
213
- """
214
- You don't appear to be in a directory of a supported vcs project.
215
- """
216
- And the exit status should be 0
217
-
218
- Scenario: handle git commit messages with quotation marks
219
- Given I am in a git repo with lolcommits enabled
220
- When I run `git commit --allow-empty -m 'no "air quotes" bae'`
221
- Then the exit status should be 0
222
- And there should be exactly 1 jpg in its loldir
223
-
224
- Scenario: generate gif should store in the timelapses directory
225
- Given I am in a git repo named "giffy" with lolcommits enabled
226
- And a loldir named "giffy" with 2 lolimages
227
- When I run `lolcommits --timelapse`
228
- Then the output should contain "Generating animated timelapse gif."
229
- And a directory named "~/.lolcommits/giffy/timelapses" should exist
230
- And there should be exactly 1 gif in "~/.lolcommits/giffy/timelapses"
231
-
232
- Scenario: generate gif with argument 'today'
233
- Given I am in a git repo named "sunday" with lolcommits enabled
234
- And a loldir named "sunday" with 2 lolimages
235
- When I run `lolcommits --timelapse --period today`
236
- Then there should be exactly 1 gif in "~/.lolcommits/sunday/timelapses"
237
-
238
- @requires_ffmpeg @slow_process
239
- Scenario: should generate a lolcommit animated gif
240
- Given I am in a git repo named "gif"
241
- And I do a git commit
242
- When I run `lolcommits --capture --animate=1`
243
- Then the output should contain "*** Preserving this moment in history."
244
- And a directory named "~/.lolcommits/gif" should exist
245
- And a file named "~/.lolcommits/animate/raw_capture.mp4" should not exist
246
- And there should be exactly 1 gif in "~/.lolcommits/gif"
247
-
248
- @requires_ffmpeg @slow_process
249
- Scenario: should generate a lolcommit video
250
- Given I am in a git repo named "video"
251
- And I do a git commit
252
- When I run `lolcommits --capture --video=1`
253
- Then the output should contain "*** Preserving this moment in history."
254
- And a directory named "~/.lolcommits/video" should exist
255
- And a file named "~/.lolcommits/animate/raw_capture.mp4" should not exist
256
- And there should be exactly 1 mp4 in "~/.lolcommits/video"
257
-
258
- @requires_ffmpeg @slow_process
259
- Scenario: should generate a lolcommit video and animated gif
260
- Given I am in a git repo named "video-and-gif"
261
- And I do a git commit
262
- When I run `lolcommits --capture -v1 -a1`
263
- Then the output should contain "*** Preserving this moment in history."
264
- And a directory named "~/.lolcommits/video-and-gif" should exist
265
- And a file named "~/.lolcommits/animate/raw_capture.mp4" should not exist
266
- And there should be exactly 1 mp4 in "~/.lolcommits/video-and-gif"
267
- And there should be exactly 1 gif in "~/.lolcommits/video-and-gif"
268
-
269
- @fake-no-ffmpeg
270
- Scenario: gracefully fail when ffmpeg not installed and --animate is used
271
- Given I am using a "darwin" platform
272
- When I run `lolcommits -c --animate 3`
273
- Then the output should contain:
274
- """
275
- ffmpeg does not appear to be properly installed
276
- """
277
- And the exit status should be 1
278
-
279
- Scenario: Enable on windows platform setting PATH in git post-commit hook
280
- Given I am using a "win32" platform
281
- And I am in a git repo
282
- When I run `lolcommits --enable`
283
- Then the git post-commit hook should contain "set path"
284
- And the exit status should be 0
285
-
286
- Scenario: Enable in a naked mercurial repo
287
- Given I am in a mercurial repo
288
- When I run `lolcommits --enable`
289
- Then the output should contain "installed lolcommit hook to:"
290
- And the lolcommits mercurial post-commit hook should be properly installed
291
- And the exit status should be 0
292
-
293
- Scenario: Enable in a mercurial repo that already has a mercurial post-commit hook
294
- Given I am in a mercurial repo
295
- And a mercurial post-commit hook with "[hooks]\npost-commit.mine = /my/own/script"
296
- When I run `lolcommits --enable`
297
- Then the output should contain "installed lolcommit hook to:"
298
- And the lolcommits mercurial post-commit hook should be properly installed
299
- And the mercurial post-commit hook should contain "post-commit.mine = /my/own/script"
300
- And the exit status should be 0
301
-
302
- Scenario: Enable in a mercurial repo passing capture arguments
303
- Given I am in a mercurial repo
304
- When I run `lolcommits --enable -w 5 --fork`
305
- Then the mercurial post-commit hook should contain "lolcommits --capture --delay 5 --fork"
306
- And the exit status should be 0
307
-
308
- Scenario: Disable in a enabled mercurial repo
309
- Given I am in a mercurial repo with lolcommits enabled
310
- When I run `lolcommits --disable`
311
- Then the output should contain "uninstalled"
312
- And a file named ".hg/hgrc" should exist
313
- And the exit status should be 0
314
-
315
- Scenario: Commiting in an enabled mercurial repo triggers successful capture
316
- Given I am in a mercurial repo named "myrepo" with lolcommits enabled
317
- When I do a mercurial commit
318
- Then the output should contain "*** Preserving this moment in history."
319
- And a directory named "~/.lolcommits/myrepo" should exist
320
- And a file named "~/.lolcommits/myrepo/raw_capture.jpg" should not exist
321
- And there should be exactly 1 jpg in "~/.lolcommits/myrepo"
322
-
323
- Scenario: Commiting in enabled mercurial repo subdirectory triggers successful capture
324
- Given I am in a mercurial repo named "testcapture" with lolcommits enabled
325
- And a directory named "subdir"
326
- And an empty file named "subdir/FOOBAR"
327
- When I cd to "subdir/"
328
- And I do a mercurial commit
329
- Then the output should contain "*** Preserving this moment in history."
330
- And a directory named "~/.lolcommits/testcapture" should exist
331
- And a directory named "~/.lolcommits/subdir" should not exist
332
- And there should be exactly 1 jpg in "~/.lolcommits/testcapture"
333
-
334
- Scenario: last command should work properly when in a mercurial lolrepo
335
- Given I am in a mercurial repo
336
- And its loldir has 2 lolimages
337
- When I run `lolcommits --last`
338
- Then the exit status should be 0
339
-
340
- Scenario: last command should work properly when in a mercurial lolrepo subdirectory
341
- Given I am in a mercurial repo
342
- And its loldir has 2 lolimages
343
- And a directory named "randomdir"
344
- And I cd to "randomdir"
345
- When I run `lolcommits --last`
346
- Then the output should not contain:
347
- """
348
- You don't appear to be in a directory of a supported vcs project.
349
- """
350
- And the exit status should be 0
351
-
352
- Scenario: browse command should work properly when in a mercurial lolrepo
353
- Given I am in a mercurial repo
354
- And its loldir has 2 lolimages
355
- When I run `lolcommits --browse`
356
- Then the exit status should be 0
357
-
358
- Scenario: browse command should work properly when in a mercurial lolrepo subdirectory
359
- Given I am in a mercurial repo
360
- And its loldir has 2 lolimages
361
- And a directory named "subdir"
362
- And I cd to "subdir"
363
- When I run `lolcommits --browse`
364
- Then the output should not contain:
365
- """
366
- You don't appear to be in a directory of a supported vcs project.
367
- """
368
- And the exit status should be 0
369
-
370
- Scenario: handle mercurial commit messages with quotation marks
371
- Given I am in a mercurial repo with lolcommits enabled
372
- When I run `touch meh`
373
- And I run `hg add meh`
374
- And I run `hg commit -m 'no "air quotes" bae'`
375
- Then the exit status should be 0
376
- And there should be exactly 1 jpg in its loldir