lolcommits 0.10.0 → 0.11.0.pre

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 24b1d6618151e0c561e26e9502385992bc2cf4cd4de34a5da12439503e271c41
4
- data.tar.gz: d200b883e98ee15cbe3bdc4f11b71794602e933792deb13a9f131b39ad28c89e
3
+ metadata.gz: 0f93509ee36cd5e7fa550f169a19f74e146048df155da1e5db23b6f1b1f13798
4
+ data.tar.gz: a8eaf4f0807b5ac62472bb4bd61f5ce9329cac784390bd66de1c60b391afdc62
5
5
  SHA512:
6
- metadata.gz: 8ae5e93238d12ec98d269a52e3460626738886de4ce8e8738aac73e3d16a8e4fa1baba07c8d3a5bffec4cbbc558a01a7aedc5c14c0a084dd3d1eeb55de96ddf2
7
- data.tar.gz: db81b3ffdb7f4f47259a69a5d27c5312ed2e4ab3a50e112bcf1a1b38dc8518cad2e338c7c704ee42b19102c21eb7becc38aa1dbe523cf993ce30784ac87153ad
6
+ metadata.gz: e20212c54de036f5dc129763369d82aba69f17f2f9154785fe25250f17407820482d68e7a549aea48d17c5bd08f3bdf99d085797b2c0e2a2d0c6d091c19b999c
7
+ data.tar.gz: c8db18a4f490e11ed5d9394c8baf5b3dfc99ca7049852abca852df966b57da7180df1ec8684197d123377d5695af21cc63dc15ee1a7deb8caa98b6b7ce59a08c
data/.travis.yml CHANGED
@@ -2,11 +2,11 @@ sudo: false
2
2
  language: ruby
3
3
  cache: bundler
4
4
  rvm:
5
- - 2.0.0
6
5
  - 2.1.10
7
6
  - 2.2.9
8
7
  - 2.3.6
9
8
  - 2.4.3
9
+ - 2.5.0
10
10
  - ruby-head
11
11
 
12
12
  before_install:
@@ -15,6 +15,7 @@ before_install:
15
15
  - touch ~/bin/mplayer ~/bin/ffmpeg
16
16
  - chmod +x ~/bin/mplayer ~/bin/ffmpeg
17
17
  - export PATH=~/bin:$PATH
18
+ - gem update --system
18
19
  - git --version
19
20
 
20
21
  matrix:
data/CHANGELOG.md CHANGED
@@ -7,6 +7,12 @@ project adheres to [Semantic Versioning][Semver].
7
7
 
8
8
  * Your contribution here!
9
9
 
10
+ ## [0.11.0][] (4 February 2018)
11
+ * Require at least Ruby 2.1 (@matthutchinson [#366][])
12
+ - drop support for Ruby 2.0
13
+ - update all remaining gem dependencies (incl. Aruba, Cucumber)
14
+ - remove @unstable tag from features
15
+
10
16
  ## [0.10.0][] (10 January 2018)
11
17
  * Plugin configuration changes (@matthutchinson [#365][])
12
18
  - `--plugins` now shows if plugin is enabled or not
@@ -310,7 +316,8 @@ project adheres to [Semantic Versioning][Semver].
310
316
  instead of compositing multiply image Caption objects (this seems to be more
311
317
  reliable to not glitch.)
312
318
 
313
- [Unreleased]: https://github.com/mroth/lolcommits/compare/v0.10.0...HEAD
319
+ [Unreleased]: https://github.com/mroth/lolcommits/compare/v0.11.0...HEAD
320
+ [0.10.0]: https://github.com/mroth/lolcommits/compare/v0.10.0...v0.11.0
314
321
  [0.10.0]: https://github.com/mroth/lolcommits/compare/v0.9.8...v0.10.0
315
322
  [0.9.8]: https://github.com/mroth/lolcommits/compare/v0.9.7...v0.9.8
316
323
  [0.9.7]: https://github.com/mroth/lolcommits/compare/v0.9.6...v0.9.7
@@ -495,3 +502,4 @@ project adheres to [Semantic Versioning][Semver].
495
502
  [#361]: https://github.com/mroth/lolcommits/pull/361
496
503
  [#363]: https://github.com/mroth/lolcommits/pull/363
497
504
  [#365]: https://github.com/mroth/lolcommits/pull/365
505
+ [#366]: https://github.com/mroth/lolcommits/pull/366
data/Rakefile CHANGED
@@ -37,7 +37,6 @@ CLEAN << CUKE_RESULTS
37
37
  Cucumber::Rake::Task.new(:features) do |t|
38
38
  optstr = "features --format html -o #{CUKE_RESULTS} --format progress -x"
39
39
  optstr << " --tags @#{ENV['tag']}" unless ENV['tag'].nil?
40
- optstr << ' --tags ~@unstable' if ENV['tag'].nil? # ignore unstable tests unless specifying something at CLI
41
40
  t.cucumber_opts = optstr
42
41
  t.fork = false
43
42
  end
@@ -11,20 +11,19 @@ Feature: Bug regression testing
11
11
  #
12
12
  Scenario: handle git repos with spaces in directory name
13
13
  Given I am in a git repo named "test lolol" with lolcommits enabled
14
- And I successfully run `git commit --allow-empty -m 'can haz commit'`
14
+ And I run `git commit --allow-empty -m 'can haz commit'`
15
15
  Then the output should contain "*** Preserving this moment in history."
16
16
  And a directory named "../.lolcommits/test-lolol" should exist
17
17
 
18
18
  #
19
19
  # issue #68, https://github.com/mroth/lolcommits/issues/68
20
20
  #
21
- @fake-interactive-rebase @slow_process @unstable
21
+ @fake-interactive-rebase @slow_process
22
22
  Scenario: Don't trigger capture during a git rebase
23
23
  Given I am in a git repo named "yuh8history" with lolcommits enabled
24
- And I do 6 git commits
25
- When I successfully run `git rebase -i HEAD~5`
26
- # Then there should be 4 commit entries in the git log
27
- Then there should be exactly 6 jpgs in "../.lolcommits/yuh8history"
24
+ And I do 3 git commits
25
+ When I run `git rebase -i HEAD~2`
26
+ Then there should be exactly 3 jpgs in "~/.lolcommits/yuh8history"
28
27
 
29
28
  #
30
29
  # issue #87, https://github.com/mroth/lolcommits/issues/87
@@ -43,7 +42,7 @@ Feature: Bug regression testing
43
42
  #
44
43
  Scenario: catch upstream bug with ruby-git and color=always
45
44
  Given I am in a git repo named "whatev" with lolcommits enabled
46
- And I successfully run `git config color.ui always`
45
+ And I run `git config color.ui always`
47
46
  When I run `lolcommits`
48
47
  Then the output should contain:
49
48
  """
@@ -22,7 +22,7 @@ Feature: Basic UI functionality
22
22
 
23
23
  Scenario: Enable in a naked git repo
24
24
  Given I am in a git repo
25
- When I successfully run `lolcommits --enable`
25
+ When I run `lolcommits --enable`
26
26
  Then the output should contain "installed lolcommit hook to:"
27
27
  And the lolcommits git post-commit hook should be properly installed
28
28
  And the exit status should be 0
@@ -30,7 +30,7 @@ Feature: Basic UI functionality
30
30
  Scenario: Enable in a git repo that already has a git post-commit hook
31
31
  Given I am in a git repo
32
32
  And a git post-commit hook with "#!/bin/sh\n\n/my/own/script"
33
- When I successfully run `lolcommits --enable`
33
+ When I run `lolcommits --enable`
34
34
  Then the output should contain "installed lolcommit hook to:"
35
35
  And the lolcommits git post-commit hook should be properly installed
36
36
  And the git post-commit hook should contain "#!/bin/sh"
@@ -47,13 +47,13 @@ Feature: Basic UI functionality
47
47
 
48
48
  Scenario: Enable in a git repo passing capture arguments
49
49
  Given I am in a git repo
50
- When I successfully run `lolcommits --enable -w 5 --fork --stealth --device 'My Devce'`
50
+ When I run `lolcommits --enable -w 5 --fork --stealth --device 'My Devce'`
51
51
  Then the git post-commit hook should contain "lolcommits --capture --delay 5 --fork --stealth --device 'My Devce'"
52
52
  And the exit status should be 0
53
53
 
54
54
  Scenario: Disable in a enabled git repo
55
55
  Given I am in a git repo with lolcommits enabled
56
- When I successfully run `lolcommits --disable`
56
+ When I run `lolcommits --disable`
57
57
  Then the output should contain "uninstalled"
58
58
  And a file named ".git/hooks/post-commit" should exist
59
59
  And the exit status should be 0
@@ -112,17 +112,16 @@ Feature: Basic UI functionality
112
112
  And there should be exactly 1 jpg in its loldir
113
113
 
114
114
  Scenario: Show plugins
115
- When I successfully run `lolcommits --plugins`
115
+ When I run `lolcommits --plugins`
116
116
  Then the output should contain a list of plugins
117
117
 
118
118
  Scenario: Configuring loltext plugin in test mode affects test loldir not repo loldir
119
119
  Given I am in a git repo named "testmode-config-test"
120
120
  When I run `lolcommits --config --test -p loltext` interactively
121
- And I wait for output to contain "enabled:"
122
121
  Then I type "false"
123
122
  Then the output should contain "Disabling plugin: loltext - answer with 'true' to enable & configure"
124
123
  And a file named "~/.lolcommits/test/config.yml" should exist
125
- When I successfully run `lolcommits --test --show-config`
124
+ When I run `lolcommits --test --show-config`
126
125
  Then the output should match /loltext:\s+:enabled: false/
127
126
 
128
127
  Scenario: test capture should work regardless of whether in a lolrepo
@@ -134,7 +133,7 @@ Feature: Basic UI functionality
134
133
 
135
134
  Scenario: test capture should store in its own test directory
136
135
  Given I am in a git repo named "randomgitrepo" with lolcommits enabled
137
- When I successfully run `lolcommits --test --capture`
136
+ When I run `lolcommits --test --capture`
138
137
  Then a directory named "~/.lolcommits/test" should exist
139
138
  And a directory named "~/.lolcommits/randomgitrepo" should not exist
140
139
 
@@ -156,9 +155,8 @@ Feature: Basic UI functionality
156
155
  """
157
156
  And the exit status should be 0
158
157
 
159
- @in-tempdir
160
- Scenario: last command should fail gracefully if not in a lolrepo
161
- Given I am in a directory named "gitsuxcvs4eva"
158
+ @no-repo-dir
159
+ Scenario: last command should fail gracefully if not in a repo
162
160
  When I run `lolcommits --last`
163
161
  Then the output should contain:
164
162
  """
@@ -166,9 +164,8 @@ Feature: Basic UI functionality
166
164
  """
167
165
  And the exit status should be 1
168
166
 
169
- @in-tempdir
170
- Scenario: Configuring loltext plugin if not in a lolrepo
171
- Given I am in a directory named "gitsuxcvs4eva"
167
+ @no-repo-dir
168
+ Scenario: Configuring loltext plugin if not in a repo
172
169
  When I run `lolcommits --config`
173
170
  Then the output should contain:
174
171
  """
@@ -176,6 +173,15 @@ Feature: Basic UI functionality
176
173
  """
177
174
  And the exit status should be 1
178
175
 
176
+ @no-repo-dir
177
+ Scenario: browse command should fail gracefully when not in a repo
178
+ When I run `lolcommits --browse`
179
+ Then the output should contain:
180
+ """
181
+ You don't appear to be in a directory of a supported vcs project.
182
+ """
183
+ And the exit status should be 1
184
+
179
185
  Scenario: last command should fail gracefully if zero lolimages in lolrepo
180
186
  Given I am in a git repo
181
187
  And its loldir has 0 lolimages
@@ -204,26 +210,16 @@ Feature: Basic UI functionality
204
210
  """
205
211
  And the exit status should be 0
206
212
 
207
- @in-tempdir
208
- Scenario: browse command should fail gracefully when not in a lolrepo
209
- Given I am in a directory named "gitsuxcvs4eva"
210
- When I run `lolcommits --browse`
211
- Then the output should contain:
212
- """
213
- You don't appear to be in a directory of a supported vcs project.
214
- """
215
- And the exit status should be 1
216
-
217
213
  Scenario: handle git commit messages with quotation marks
218
214
  Given I am in a git repo with lolcommits enabled
219
- When I successfully run `git commit --allow-empty -m 'no "air quotes" bae'`
215
+ When I run `git commit --allow-empty -m 'no "air quotes" bae'`
220
216
  Then the exit status should be 0
221
217
  And there should be exactly 1 jpg in its loldir
222
218
 
223
219
  Scenario: generate gif should store in its own archive directory
224
220
  Given I am in a git repo named "giffy" with lolcommits enabled
225
221
  And a loldir named "giffy" with 2 lolimages
226
- When I successfully run `lolcommits --timelapse`
222
+ When I run `lolcommits --timelapse`
227
223
  Then the output should contain "Generating animated gif."
228
224
  And a directory named "~/.lolcommits/giffy/archive" should exist
229
225
  And a file named "~/.lolcommits/giffy/archive/archive.gif" should exist
@@ -231,7 +227,7 @@ Feature: Basic UI functionality
231
227
  Scenario: generate gif with argument 'today'
232
228
  Given I am in a git repo named "sunday" with lolcommits enabled
233
229
  And a loldir named "sunday" with 2 lolimages
234
- When I successfully run `lolcommits --timelapse --period today`
230
+ When I run `lolcommits --timelapse --period today`
235
231
  Then there should be exactly 1 gif in "~/.lolcommits/sunday/archive"
236
232
 
237
233
  @mac-only
@@ -258,13 +254,13 @@ Feature: Basic UI functionality
258
254
  Scenario: Enable on windows platform setting PATH in git post-commit hook
259
255
  Given I am using a "win32" platform
260
256
  And I am in a git repo
261
- When I successfully run `lolcommits --enable`
257
+ When I run `lolcommits --enable`
262
258
  Then the git post-commit hook should contain "set path"
263
259
  And the exit status should be 0
264
260
 
265
261
  Scenario: Enable in a naked mercurial repo
266
262
  Given I am in a mercurial repo
267
- When I successfully run `lolcommits --enable`
263
+ When I run `lolcommits --enable`
268
264
  Then the output should contain "installed lolcommit hook to:"
269
265
  And the lolcommits mercurial post-commit hook should be properly installed
270
266
  And the exit status should be 0
@@ -272,7 +268,7 @@ Feature: Basic UI functionality
272
268
  Scenario: Enable in a mercurial repo that already has a mercurial post-commit hook
273
269
  Given I am in a mercurial repo
274
270
  And a mercurial post-commit hook with "[hooks]\npost-commit.mine = /my/own/script"
275
- When I successfully run `lolcommits --enable`
271
+ When I run `lolcommits --enable`
276
272
  Then the output should contain "installed lolcommit hook to:"
277
273
  And the lolcommits mercurial post-commit hook should be properly installed
278
274
  And the mercurial post-commit hook should contain "post-commit.mine = /my/own/script"
@@ -280,13 +276,13 @@ Feature: Basic UI functionality
280
276
 
281
277
  Scenario: Enable in a mercurial repo passing capture arguments
282
278
  Given I am in a mercurial repo
283
- When I successfully run `lolcommits --enable -w 5 --fork`
279
+ When I run `lolcommits --enable -w 5 --fork`
284
280
  Then the mercurial post-commit hook should contain "lolcommits --capture --delay 5 --fork"
285
281
  And the exit status should be 0
286
282
 
287
283
  Scenario: Disable in a enabled mercurial repo
288
284
  Given I am in a mercurial repo with lolcommits enabled
289
- When I successfully run `lolcommits --disable`
285
+ When I run `lolcommits --disable`
290
286
  Then the output should contain "uninstalled"
291
287
  And a file named ".hg/hgrc" should exist
292
288
  And the exit status should be 0
@@ -348,8 +344,8 @@ Feature: Basic UI functionality
348
344
 
349
345
  Scenario: handle mercurial commit messages with quotation marks
350
346
  Given I am in a mercurial repo with lolcommits enabled
351
- When I successfully run `touch meh`
352
- And I successfully run `hg add meh`
353
- And I successfully run `hg commit -m 'no "air quotes" bae'`
347
+ When I run `touch meh`
348
+ And I run `hg add meh`
349
+ And I run `hg commit -m 'no "air quotes" bae'`
354
350
  Then the exit status should be 0
355
351
  And there should be exactly 1 jpg in its loldir
@@ -14,7 +14,7 @@ def default_repo
14
14
  end
15
15
 
16
16
  def default_loldir
17
- absolute_path("~/.lolcommits/#{default_repo}")
17
+ "~/.lolcommits/#{default_repo}"
18
18
  end
19
19
 
20
20
  Given(/^I am in a directory named "(.*?)"$/) do |dir_name|
@@ -26,7 +26,7 @@ end
26
26
 
27
27
  Given(/^a git repo named "(.*?)"$/) do |repo_name|
28
28
  steps %(
29
- Given I successfully run `git init --quiet "#{repo_name}"`
29
+ Given I run `git init --quiet "#{repo_name}"`
30
30
  )
31
31
  end
32
32
 
@@ -46,7 +46,7 @@ end
46
46
  Given(/^I am in a git repo named "(.*?)" with lolcommits enabled$/) do |repo|
47
47
  steps %(
48
48
  Given I am in a git repo named "#{repo}"
49
- And I successfully run `lolcommits --enable`
49
+ And I run `lolcommits --enable`
50
50
  )
51
51
  end
52
52
 
@@ -79,7 +79,7 @@ end
79
79
 
80
80
  Given(/^a mercurial repo named "(.*?)"$/) do |repo_name|
81
81
  steps %(
82
- Given I successfully run `hg init "#{repo_name}"`
82
+ Given I run `hg init "#{repo_name}"`
83
83
  )
84
84
  end
85
85
 
@@ -99,7 +99,7 @@ end
99
99
  Given(/^I am in a mercurial repo named "(.*?)" with lolcommits enabled$/) do |repo|
100
100
  steps %(
101
101
  Given I am in a mercurial repo named "#{repo}"
102
- And I successfully run `lolcommits --enable`
102
+ And I run `lolcommits --enable`
103
103
  )
104
104
  end
105
105
 
@@ -131,7 +131,7 @@ Then(/^the mercurial post\-commit hook (should|should not) contain "(.*?)"$/) do
131
131
  end
132
132
 
133
133
  Given(/^I have environment variable (.*?) set to (.*?)$/) do |var, value|
134
- set_env var, value
134
+ set_environment_variable var, value
135
135
  end
136
136
 
137
137
  Given(/^its loldir has (\d+) lolimages$/) do |num_images|
@@ -141,7 +141,7 @@ Given(/^its loldir has (\d+) lolimages$/) do |num_images|
141
141
  end
142
142
 
143
143
  Given(/^a loldir named "(.*?)" with (\d+) lolimages$/) do |repo, num_images|
144
- loldir = absolute_path("~/.lolcommits/#{repo}")
144
+ loldir = expand_path("~/.lolcommits/#{repo}")
145
145
  FileUtils.mkdir_p loldir
146
146
  num_images.to_i.times do
147
147
  hex = format('%011x', (rand * 0xfffffffffff)).to_s
@@ -156,7 +156,7 @@ Then(/^there should be exactly (.*?) (jpg|gif|pid)s? in its loldir$/) do |n, typ
156
156
  end
157
157
 
158
158
  Then(/^there should be exactly (.*?) (jpg|gif|pid)s? in "(.*?)"$/) do |n, type, folder|
159
- expect(Dir[absolute_path(folder, "*.#{type}")].count).to eq(n.to_i)
159
+ expect(Dir[expand_path("#{folder}/*.#{type}")].count).to eq(n.to_i)
160
160
  end
161
161
 
162
162
  Then(/^the output should contain a list of plugins$/) do
@@ -168,8 +168,8 @@ When(/^I do a git commit with commit message "(.*?)"$/) do |commit_msg|
168
168
  filename = FFaker::Lorem.words(1).first
169
169
  steps %(
170
170
  Given a 98 byte file named "#{filename}"
171
- And I successfully run `git add #{filename}`
172
- And I successfully run `git commit -m "#{commit_msg}"`
171
+ And I run `git add #{filename}`
172
+ And I run `git commit -m "#{commit_msg}"`
173
173
  )
174
174
  end
175
175
 
@@ -180,7 +180,7 @@ end
180
180
  When(/^I do (\d+) git commits$/) do |n|
181
181
  n.to_i.times do
182
182
  step %(I do a git commit)
183
- sleep 0.1
183
+ sleep 0.2
184
184
  end
185
185
  end
186
186
 
@@ -193,8 +193,8 @@ When(/^I do a mercurial commit with commit message "(.*?)"$/) do |commit_msg|
193
193
  filename = FFaker::Lorem.words(1).first
194
194
  steps %(
195
195
  Given a 98 byte file named "#{filename}"
196
- And I successfully run `hg add #{filename}`
197
- And I successfully run `hg commit -m "#{commit_msg}"`
196
+ And I run `hg add #{filename}`
197
+ And I run `hg commit -m "#{commit_msg}"`
198
198
  )
199
199
  end
200
200
 
@@ -215,10 +215,10 @@ Then(/^there should be (\d+) commit entries in the mercurial log$/) do |n|
215
215
  end
216
216
 
217
217
  Given(/^I am using a "(.*?)" platform$/) do |host_os_name|
218
- set_env 'LOLCOMMITS_FAKE_HOST_OS', host_os_name
218
+ set_environment_variable 'LOLCOMMITS_FAKE_HOST_OS', host_os_name
219
219
  end
220
220
 
221
221
  When(/^I wait for the child process to exit in "(.*?)"$/) do |repo_name|
222
- pid_loc = absolute_path("~/.lolcommits/#{repo_name}/lolcommits.pid")
222
+ pid_loc = expand_path("~/.lolcommits/#{repo_name}/lolcommits.pid")
223
223
  sleep 0.1 while File.exist?(pid_loc)
224
224
  end
@@ -9,33 +9,36 @@ include Lolcommits
9
9
 
10
10
  World(PathHelpers)
11
11
 
12
- Before do
13
- @aruba_timeout_seconds = 20
12
+ Aruba.configure do |config|
13
+ config.exit_timeout = 20
14
+ end
14
15
 
16
+ Before do
15
17
  # prevent launchy from opening gifs in tests
16
- set_env 'LAUNCHY_DRY_RUN', 'true'
17
- set_env 'LOLCOMMITS_CAPTURER', 'Lolcommits::CaptureFake'
18
+ set_environment_variable 'LAUNCHY_DRY_RUN', 'true'
19
+ set_environment_variable 'LOLCOMMITS_CAPTURER', 'Lolcommits::CaptureFake'
18
20
 
19
21
  author_name = 'Testy McTesterson'
20
22
  author_email = 'testy@tester.com'
21
23
 
22
- set_env 'GIT_AUTHOR_NAME', author_name
23
- set_env 'GIT_COMMITTER_NAME', author_name
24
- set_env 'GIT_AUTHOR_EMAIL', author_email
25
- set_env 'GIT_COMMITTER_EMAIL', author_email
24
+ set_environment_variable 'GIT_AUTHOR_NAME', author_name
25
+ set_environment_variable 'GIT_COMMITTER_NAME', author_name
26
+ set_environment_variable 'GIT_AUTHOR_EMAIL', author_email
27
+ set_environment_variable 'GIT_COMMITTER_EMAIL', author_email
26
28
  end
27
29
 
28
30
  # for tasks that may take an incredibly long time (e.g. network related)
29
31
  # we should strive to not have any of these in our scenarios, naturally.
30
32
  Before('@slow_process') do
31
- @aruba_io_wait_seconds = 5
32
- @aruba_timeout_seconds = 60
33
+ Aruba.configure do |config|
34
+ config.exit_timeout = 60
35
+ end
33
36
  end
34
37
 
35
38
  # in order to fake an interactive rebase, we replace the editor with a script
36
39
  # to simply squash a few random commits. in this case, using lines 3-5.
37
40
  Before('@fake-interactive-rebase') do
38
- set_env 'GIT_EDITOR', "sed -i -e '3,5 s/pick/squash/g'"
41
+ set_environment_variable 'GIT_EDITOR', "sed -i -e '3,5 s/pick/squash/g'"
39
42
  end
40
43
 
41
44
  # adjust the path so tests dont see a global imagemagick install
@@ -48,11 +51,20 @@ Before('@fake-no-ffmpeg') do
48
51
  reject_paths_with_cmd('ffmpeg')
49
52
  end
50
53
 
51
- # do test in temporary directory so our own git repo-ness doesn't affect it
52
- Before('@in-tempdir') do
53
- @dirs = [Dir.mktmpdir]
54
+ # do test in a new temp directory (outside our own git repo-ness)
55
+ # due to https://github.com/cucumber/aruba/issues/478 aruba no longer allows
56
+ # wandering out of `tmp/aruba` so this pop/restore is necessary
57
+ Before('@no-repo-dir') do
58
+ @original_root = aruba.root_directory.pop
59
+ @original_dir = aruba.current_directory.pop
60
+ @working_dir = Dir.mktmpdir
61
+ aruba.current_directory << @working_dir
54
62
  end
55
63
 
56
- After('@in-tempdir') do
57
- FileUtils.rm_rf(@dirs.first)
64
+ After('@no-repo-dir') do
65
+ aruba.current_directory.pop
66
+ aruba.root_directory << @original_root
67
+ aruba.current_directory << @original_dir
68
+
69
+ FileUtils.rm_rf(@working_dir)
58
70
  end
@@ -5,7 +5,7 @@ require 'lolcommits/platform'
5
5
  module PathHelpers
6
6
  def reject_paths_with_cmd(cmd)
7
7
  # make a new subdir that still contains cmds
8
- tmpbindir = File.expand_path(File.join(@dirs, 'bin'))
8
+ tmpbindir = expand_path('./bin')
9
9
  FileUtils.mkdir_p tmpbindir
10
10
 
11
11
  preseve_cmds_in_path(%w(git mplayer), tmpbindir)
@@ -24,7 +24,7 @@ module PathHelpers
24
24
  newpaths << tmpbindir
25
25
 
26
26
  # use aruba/api set_environment_variable to set PATH, which will be automaticaly restored
27
- set_env 'PATH', newpaths.join(File::PATH_SEPARATOR)
27
+ set_environment_variable 'PATH', newpaths.join(File::PATH_SEPARATOR)
28
28
  end
29
29
 
30
30
  def preseve_cmds_in_path(cmds, tmpbindir)
@@ -62,8 +62,7 @@ module Lolcommits
62
62
  end
63
63
 
64
64
  def enabled?
65
- # legacy configs (< 0.9.9) used a string key
66
- configuration[:enabled] || configuration['enabled']
65
+ configuration[:enabled] == true
67
66
  end
68
67
 
69
68
  # check config is valid
@@ -1,4 +1,4 @@
1
1
  module Lolcommits
2
- VERSION = '0.10.0'.freeze
2
+ VERSION = '0.11.0.pre'.freeze
3
3
  GEM_NAME = 'lolcommits'.freeze
4
4
  end
data/lolcommits.gemspec CHANGED
@@ -44,21 +44,14 @@ POSTINSTALL
44
44
  s.require_paths = ['lib']
45
45
 
46
46
  # non-gem dependencies
47
- s.required_ruby_version = '>= 2.0'
47
+ s.required_ruby_version = '>= 2.1'
48
48
  s.requirements << 'imagemagick'
49
49
  s.requirements << 'a webcam'
50
50
 
51
- # hold back upgrading (and why)
52
- s.add_development_dependency('aruba', '=0.6.2') # upgrading requires a lot of test code changes
53
- s.add_development_dependency('rake', '=10.5.0') # ~> 11+ introduces lots of warnings from other deps
54
- s.add_development_dependency('cucumber', '~> 2.4.0') # > 2.4 breaks aruba, since aruba_timeout_seconds not set
55
- s.add_runtime_dependency('net-http-persistent', '=2.9.4') # ~> 3+ requires Ruby 2.1
56
- s.add_runtime_dependency('public_suffix', '~>2.0.0') # ~> 3+ requires Ruby 2.1
57
-
58
51
  # core
59
52
  s.add_runtime_dependency('methadone', '~> 1.9.5')
60
53
  s.add_runtime_dependency('mercurial-ruby', '~> 0.7.12')
61
- s.add_runtime_dependency('mini_magick', '~> 4.6.0')
54
+ s.add_runtime_dependency('mini_magick', '~> 4.8.0')
62
55
  s.add_runtime_dependency('launchy', '~> 2.4.3')
63
56
  s.add_runtime_dependency('open4', '~> 1.3.4')
64
57
  s.add_runtime_dependency('git', '~> 1.3.0')
@@ -67,6 +60,8 @@ POSTINSTALL
67
60
  s.add_runtime_dependency('lolcommits-loltext', '~> 0.0.5')
68
61
 
69
62
  # development & test gems
63
+ s.add_development_dependency('aruba')
64
+ s.add_development_dependency('rake')
70
65
  s.add_development_dependency('rdoc')
71
66
  s.add_development_dependency('pry')
72
67
  s.add_development_dependency('rubocop')
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.10.0
4
+ version: 0.11.0.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Rothenberg
@@ -9,78 +9,8 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-01-10 00:00:00.000000000 Z
12
+ date: 2018-02-04 00:00:00.000000000 Z
13
13
  dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: aruba
16
- requirement: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - '='
19
- - !ruby/object:Gem::Version
20
- version: 0.6.2
21
- type: :development
22
- prerelease: false
23
- version_requirements: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - '='
26
- - !ruby/object:Gem::Version
27
- version: 0.6.2
28
- - !ruby/object:Gem::Dependency
29
- name: rake
30
- requirement: !ruby/object:Gem::Requirement
31
- requirements:
32
- - - '='
33
- - !ruby/object:Gem::Version
34
- version: 10.5.0
35
- type: :development
36
- prerelease: false
37
- version_requirements: !ruby/object:Gem::Requirement
38
- requirements:
39
- - - '='
40
- - !ruby/object:Gem::Version
41
- version: 10.5.0
42
- - !ruby/object:Gem::Dependency
43
- name: cucumber
44
- requirement: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - "~>"
47
- - !ruby/object:Gem::Version
48
- version: 2.4.0
49
- type: :development
50
- prerelease: false
51
- version_requirements: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - "~>"
54
- - !ruby/object:Gem::Version
55
- version: 2.4.0
56
- - !ruby/object:Gem::Dependency
57
- name: net-http-persistent
58
- requirement: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - '='
61
- - !ruby/object:Gem::Version
62
- version: 2.9.4
63
- type: :runtime
64
- prerelease: false
65
- version_requirements: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - '='
68
- - !ruby/object:Gem::Version
69
- version: 2.9.4
70
- - !ruby/object:Gem::Dependency
71
- name: public_suffix
72
- requirement: !ruby/object:Gem::Requirement
73
- requirements:
74
- - - "~>"
75
- - !ruby/object:Gem::Version
76
- version: 2.0.0
77
- type: :runtime
78
- prerelease: false
79
- version_requirements: !ruby/object:Gem::Requirement
80
- requirements:
81
- - - "~>"
82
- - !ruby/object:Gem::Version
83
- version: 2.0.0
84
14
  - !ruby/object:Gem::Dependency
85
15
  name: methadone
86
16
  requirement: !ruby/object:Gem::Requirement
@@ -115,14 +45,14 @@ dependencies:
115
45
  requirements:
116
46
  - - "~>"
117
47
  - !ruby/object:Gem::Version
118
- version: 4.6.0
48
+ version: 4.8.0
119
49
  type: :runtime
120
50
  prerelease: false
121
51
  version_requirements: !ruby/object:Gem::Requirement
122
52
  requirements:
123
53
  - - "~>"
124
54
  - !ruby/object:Gem::Version
125
- version: 4.6.0
55
+ version: 4.8.0
126
56
  - !ruby/object:Gem::Dependency
127
57
  name: launchy
128
58
  requirement: !ruby/object:Gem::Requirement
@@ -179,6 +109,34 @@ dependencies:
179
109
  - - "~>"
180
110
  - !ruby/object:Gem::Version
181
111
  version: 0.0.5
112
+ - !ruby/object:Gem::Dependency
113
+ name: aruba
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: rake
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
182
140
  - !ruby/object:Gem::Dependency
183
141
  name: rdoc
184
142
  requirement: !ruby/object:Gem::Requirement
@@ -372,12 +330,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
372
330
  requirements:
373
331
  - - ">="
374
332
  - !ruby/object:Gem::Version
375
- version: '2.0'
333
+ version: '2.1'
376
334
  required_rubygems_version: !ruby/object:Gem::Requirement
377
335
  requirements:
378
- - - ">="
336
+ - - ">"
379
337
  - !ruby/object:Gem::Version
380
- version: '0'
338
+ version: 1.3.1
381
339
  requirements:
382
340
  - imagemagick
383
341
  - a webcam