lolcommits 0.15.0 → 0.16.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f4f33742b052d7ef499ed1ebd967fec77ebbe4e52a76eca2675e2f540ee2b115
4
- data.tar.gz: 958254d97dcf9a965bb8e57a8c651ddbc766ebf240ad51f0e542bd24efd97251
3
+ metadata.gz: 164b3de849954edf608d49789f55504eb4b64a5e9a75eaa543536e22cf7ee354
4
+ data.tar.gz: 566c9199274b5fb28501daa75ffccf0366ec58079ebb8f7b544b0d605a4991c4
5
5
  SHA512:
6
- metadata.gz: 480d203c87991f45be26489355729b8ff5073ffc6b248061e2e717515c2c868ccab3bc808aa3b8d36646eac78f4a76b64f6a64354d63d970da1a8dc49d1ac6da
7
- data.tar.gz: 86ae68a15665cd07ee7163e519ea8b6c17e57a1e70ac55c82d34d69128cc32177439688121e42ae5460cfeebdbecb14575dd579c135ddcbd6463451265b17940
6
+ metadata.gz: 213a07bd6e7e6072de06247805da3f390d465d873dd4174e70337cf324a3c6b697209ebb4c42de7c7cbab065fd9cd3f7417bf9a830ac58d50209f96bcec24fe5
7
+ data.tar.gz: 12acf1920f4901338887f8363a8500a92444d7072650c420683b27021f621bcbfd06d47c882088b603bb31bdf18f3afbf0c7f9326b9bc99626286401579dcf9f
@@ -1,52 +1,68 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2017-12-13 17:09:06 +0000 using RuboCop version 0.52.0.
3
+ # on 2020-01-20 22:28:11 +0000 using RuboCop version 0.79.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 7
9
+ # Offense count: 6
10
10
  # Cop supports --auto-correct.
11
- # Configuration parameters: Include, TreatCommentsAsGroupSeparators.
11
+ # Configuration parameters: TreatCommentsAsGroupSeparators, Include.
12
12
  # Include: **/*.gemspec
13
13
  Gemspec/OrderedDependencies:
14
14
  Exclude:
15
15
  - 'lolcommits.gemspec'
16
16
 
17
+ # Offense count: 19
18
+ # Cop supports --auto-correct.
19
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
20
+ # SupportedStyles: with_first_argument, with_fixed_indentation
21
+ Layout/ArgumentAlignment:
22
+ Enabled: false
23
+
24
+ # Offense count: 6
25
+ # Cop supports --auto-correct.
26
+ Layout/EmptyLineAfterGuardClause:
27
+ Exclude:
28
+ - 'bin/bundle'
29
+
17
30
  # Offense count: 1
18
31
  # Cop supports --auto-correct.
19
32
  # Configuration parameters: EnforcedStyle.
20
- # SupportedStyles: auto_detection, squiggly, active_support, powerpack, unindent
21
- Layout/IndentHeredoc:
33
+ # SupportedStyles: squiggly, active_support, powerpack, unindent
34
+ Layout/HeredocIndentation:
22
35
  Exclude:
23
36
  - 'lib/lolcommits/backends/installation_git.rb'
24
37
 
38
+ # Offense count: 1
39
+ # Cop supports --auto-correct.
40
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
41
+ # SupportedStyles: aligned, indented
42
+ Layout/MultilineOperationIndentation:
43
+ Exclude:
44
+ - 'bin/bundle'
45
+
25
46
  # Offense count: 1
26
47
  Lint/AmbiguousBlockAssociation:
27
48
  Exclude:
28
49
  - 'lib/lolcommits/cli/process_runner.rb'
29
50
 
30
- # Offense count: 19
51
+ # Offense count: 18
31
52
  Metrics/AbcSize:
32
53
  Max: 35
33
54
 
34
- # Offense count: 1
35
- # Configuration parameters: CountComments, ExcludedMethods.
36
- Metrics/BlockLength:
37
- Max: 40
38
-
39
55
  # Offense count: 2
40
56
  # Configuration parameters: CountComments.
41
57
  Metrics/ClassLength:
42
- Max: 150
58
+ Max: 144
43
59
 
44
60
  # Offense count: 5
45
61
  Metrics/CyclomaticComplexity:
46
62
  Max: 10
47
63
 
48
- # Offense count: 23
49
- # Configuration parameters: CountComments.
64
+ # Offense count: 21
65
+ # Configuration parameters: CountComments, ExcludedMethods.
50
66
  Metrics/MethodLength:
51
67
  Max: 24
52
68
 
@@ -54,23 +70,20 @@ Metrics/MethodLength:
54
70
  Metrics/PerceivedComplexity:
55
71
  Max: 10
56
72
 
57
- # Offense count: 1
58
- # Cop supports --auto-correct.
59
- Security/YAMLLoad:
60
- Exclude:
61
- - 'lib/lolcommits/configuration.rb'
62
-
63
73
  # Offense count: 25
64
74
  Style/Documentation:
65
75
  Enabled: false
66
76
 
67
- # Offense count: 5
77
+ # Offense count: 20
78
+ # Cop supports --auto-correct.
79
+ Style/ExpandPathArguments:
80
+ Enabled: false
81
+
82
+ # Offense count: 2
68
83
  Style/MixinUsage:
69
84
  Exclude:
70
85
  - 'Rakefile'
71
- - 'bin/lolcommits'
72
86
  - 'features/support/env.rb'
73
- - 'test/lolcommits_test.rb'
74
87
 
75
88
  # Offense count: 5
76
89
  # Cop supports --auto-correct.
@@ -85,13 +98,28 @@ Style/PercentLiteralDelimiters:
85
98
 
86
99
  # Offense count: 1
87
100
  # Cop supports --auto-correct.
88
- # Configuration parameters: MinSize.
89
- # SupportedStyles: percent, brackets
90
- Style/SymbolArray:
91
- EnforcedStyle: brackets
101
+ Style/PerlBackrefs:
102
+ Exclude:
103
+ - 'bin/bundle'
104
+
105
+ # Offense count: 1
106
+ # Cop supports --auto-correct.
107
+ # Configuration parameters: EnforcedStyle.
108
+ # SupportedStyles: use_perl_names, use_english_names
109
+ Style/SpecialGlobalVars:
110
+ Exclude:
111
+ - 'bin/bundle'
92
112
 
93
- # Offense count: 90
94
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
113
+ # Offense count: 166
114
+ # Cop supports --auto-correct.
115
+ # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
116
+ # SupportedStyles: single_quotes, double_quotes
117
+ Style/StringLiterals:
118
+ Enabled: false
119
+
120
+ # Offense count: 120
121
+ # Cop supports --auto-correct.
122
+ # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
95
123
  # URISchemes: http, https
96
- Metrics/LineLength:
97
- Max: 168
124
+ Layout/LineLength:
125
+ Max: 198
@@ -2,10 +2,10 @@ sudo: false
2
2
  language: ruby
3
3
  cache: bundler
4
4
  rvm:
5
- - 2.3.8
6
- - 2.4.6
7
- - 2.5.5
8
- - 2.6.3
5
+ - 2.4.9
6
+ - 2.5.7
7
+ - 2.6.5
8
+ - 2.7.1
9
9
  - ruby-head
10
10
 
11
11
  matrix:
@@ -7,6 +7,21 @@ This project adheres to [Semantic Versioning][Semver].
7
7
 
8
8
  * Your contribution here!
9
9
 
10
+ ## [0.16.2][] (24 Aug 2020)
11
+ * Support delays w/ Linux animated GIFs (@theY4Kman [#405][])
12
+ * Upgrade git gem to version 1.6.0 (@depfu [#402][])
13
+ * Upgrade lolcommits-loltext to version 0.4.0 (@depfu [#401][])
14
+
15
+ ## [0.16.1][] (21 Jan 2020)
16
+ * Upgrade mini_magick to version 4.10.1 (@depfu [#399][])
17
+ * Fix rubocop config (@Salzig [#400][])
18
+
19
+ ## [0.16.0][] (21 Oct 2019)
20
+ * update macOS binaries for Catalina support (@matthutchinson, @samwize [#398][])
21
+
22
+ ## [0.15.1][] (6 Jun 2019)
23
+ * fix device list command (@matthutchinson [#394][])
24
+
10
25
  ## [0.15.0][] (20 May 2019)
11
26
  * require at least lolcommits-loltext `>= 0.3.0` (@matthutchinson)
12
27
  * remove `main_image` method, plugins should use `lolcommit_path` on
@@ -32,7 +47,7 @@ This project adheres to [Semantic Versioning][Semver].
32
47
  * Update all links and badges (in gemspec, README etc.) to lolcommits
33
48
  organisation (@matthutchinson)
34
49
  * remove gem `post_install` message (@matthutchinson)
35
- * use `lolcommits-loltext ~> 0.1.0' (@matthutchinson)
50
+ * use `lolcommits-loltext ~> 0.1.0` (@matthutchinson)
36
51
 
37
52
  ## [0.13.0][] (23 April 2019)
38
53
  * Require at least Ruby 2.3
@@ -46,7 +61,7 @@ This project adheres to [Semantic Versioning][Semver].
46
61
 
47
62
  ## [0.12.1][] (27 March 2018)
48
63
  * Name passed to `Plugin::Base` initializer (@matthutchinson)
49
- * Removed dead method `configured? in `Plugin::Base`
64
+ * Removed dead method `configured?` in `Plugin::Base`
50
65
  * Using `YAML.safe_load` for configuration loading
51
66
 
52
67
  ## [0.12.0][] (15 March 2018)
@@ -363,7 +378,11 @@ This project adheres to [Semantic Versioning][Semver].
363
378
  reliable to not glitch.)
364
379
 
365
380
  [Semver]: http://semver.org
366
- [Unreleased]: https://github.com/lolcommits/lolcommits/compare/v0.15.0...HEAD
381
+ [Unreleased]: https://github.com/lolcommits/lolcommits/compare/v0.16.2...HEAD
382
+ [0.16.2]: https://github.com/lolcommits/lolcommits/compare/v0.16.1...v0.16.2
383
+ [0.16.1]: https://github.com/lolcommits/lolcommits/compare/v0.16.0...v0.16.1
384
+ [0.16.0]: https://github.com/lolcommits/lolcommits/compare/v0.15.1...v0.16.0
385
+ [0.15.1]: https://github.com/lolcommits/lolcommits/compare/v0.15.0...v0.15.1
367
386
  [0.15.0]: https://github.com/lolcommits/lolcommits/compare/v0.14.1...v0.15.0
368
387
  [0.14.2]: https://github.com/lolcommits/lolcommits/compare/v0.14.1...v0.14.2
369
388
  [0.14.1]: https://github.com/lolcommits/lolcommits/compare/v0.14.0...v0.14.1
@@ -564,3 +583,10 @@ This project adheres to [Semantic Versioning][Semver].
564
583
  [#385]: https://github.com/lolcommits/lolcommits/pull/385
565
584
  [#386]: https://github.com/lolcommits/lolcommits/pull/386
566
585
  [#392]: https://github.com/lolcommits/lolcommits/pull/392
586
+ [#394]: https://github.com/lolcommits/lolcommits/pull/394
587
+ [#398]: https://github.com/lolcommits/lolcommits/pull/398
588
+ [#399]: https://github.com/lolcommits/lolcommits/pull/399
589
+ [#400]: https://github.com/lolcommits/lolcommits/pull/400
590
+ [#401]: https://github.com/lolcommits/lolcommits/pull/401
591
+ [#402]: https://github.com/lolcommits/lolcommits/pull/402
592
+ [#405]: https://github.com/lolcommits/lolcommits/pull/405
@@ -1,2 +1,2 @@
1
1
  ---
2
- default: <%= ENV['TRAVIS'] == 'true' ? '--tags ~@requires_ffmpeg' : 'features' %>
2
+ default: <%= ENV['TRAVIS'] == "true" ? "features --tags \"not @requires_ffmpeg\"" : "features" %>
@@ -63,15 +63,6 @@ Feature: Basic UI functionality
63
63
  And a file named ".git/hooks/post-commit" should exist
64
64
  And the exit status should be 0
65
65
 
66
- Scenario: Trying to enable while not in a git repo fails
67
- Given I am in a directory named "svnrulez"
68
- When I run `lolcommits --enable`
69
- Then the output should contain:
70
- """
71
- You don't appear to be in the base directory of a supported vcs project.
72
- """
73
- And the exit status should be 1
74
-
75
66
  # flakey test sometimes fails
76
67
  # Scenario: Capture doesnt break in forked mode
77
68
  # Given I am in a git repo named "forked"
@@ -160,8 +151,17 @@ Feature: Basic UI functionality
160
151
  """
161
152
  And the exit status should be 0
162
153
 
163
- @no-repo-dir
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
+
164
163
  Scenario: last command should fail gracefully if not in a repo
164
+ Given I am not in a git repo
165
165
  When I run `lolcommits --last`
166
166
  Then the output should contain:
167
167
  """
@@ -169,8 +169,8 @@ Feature: Basic UI functionality
169
169
  """
170
170
  And the exit status should be 1
171
171
 
172
- @no-repo-dir
173
172
  Scenario: Configuring loltext plugin if not in a repo
173
+ Given I am not in a git repo
174
174
  When I run `lolcommits --config`
175
175
  Then the output should contain:
176
176
  """
@@ -178,8 +178,8 @@ Feature: Basic UI functionality
178
178
  """
179
179
  And the exit status should be 1
180
180
 
181
- @no-repo-dir
182
181
  Scenario: browse command should fail gracefully when not in a repo
182
+ Given I am not in a git repo
183
183
  When I run `lolcommits --browse`
184
184
  Then the output should contain:
185
185
  """
@@ -45,6 +45,14 @@ Given(/^I am in a git repo$/) do
45
45
  )
46
46
  end
47
47
 
48
+ Given(/^I am not in a git repo/) do
49
+ steps %(
50
+ Given I cd to "/tmp"
51
+ And a directory named "lolcommits_no_repo"
52
+ And I cd to "lolcommits_no_repo"
53
+ )
54
+ end
55
+
48
56
  Given(/^I am in a git repo named "(.*?)" with lolcommits enabled$/) do |repo|
49
57
  steps %(
50
58
  Given I am in a git repo named "#{repo}"
@@ -146,8 +154,8 @@ Given(/^a loldir named "(.*?)" with (\d+) lolimages$/) do |repo, num_images|
146
154
  loldir = expand_path("~/.lolcommits/#{repo}")
147
155
  FileUtils.mkdir_p loldir
148
156
  num_images.to_i.times do
149
- hex = format('%011x', (rand * 0xfffffffffff)).to_s
150
- FileUtils.cp 'test/assets/test_image.jpg', File.join(loldir, "#{hex}.jpg")
157
+ sha = format('%<hex>x', hex: (rand * 0xfffffffffff))
158
+ FileUtils.cp 'test/assets/test_image.jpg', File.join(loldir, "#{sha}.jpg")
151
159
  end
152
160
  end
153
161
 
@@ -13,6 +13,8 @@ World(PathHelpers)
13
13
 
14
14
  Aruba.configure do |config|
15
15
  config.exit_timeout = 20
16
+ # allow absolute paths for tests involving no repo
17
+ config.allow_absolute_paths = true
16
18
  end
17
19
 
18
20
  Before do
@@ -52,21 +54,3 @@ end
52
54
  Before('@fake-no-ffmpeg') do
53
55
  reject_paths_with_cmd('ffmpeg')
54
56
  end
55
-
56
- # do test in a new temp directory (outside our own git repo-ness)
57
- # due to https://github.com/cucumber/aruba/issues/478 aruba no longer allows
58
- # wandering out of `tmp/aruba` so this pop/restore is necessary
59
- Before('@no-repo-dir') do
60
- @original_root = aruba.root_directory.pop
61
- @original_dir = aruba.current_directory.pop
62
- @working_dir = Dir.mktmpdir
63
- aruba.current_directory << @working_dir
64
- end
65
-
66
- After('@no-repo-dir') do
67
- aruba.current_directory.pop
68
- aruba.root_directory << @original_root
69
- aruba.current_directory << @original_dir
70
-
71
- FileUtils.rm_rf(@working_dir)
72
- end
@@ -3,7 +3,7 @@
3
3
  module Lolcommits
4
4
  class CaptureLinuxVideo < Capturer
5
5
  def capture
6
- system_call "ffmpeg -nostats -v quiet -y -f video4linux2 -video_size 640x480 -i #{capture_device_string} -t #{capture_duration} \"#{capture_path}\" > /dev/null"
6
+ system_call "ffmpeg -nostats -v quiet -y -f video4linux2 -video_size 640x480 -i #{capture_device_string} -t #{capture_duration} -ss #{capture_delay || 0} \"#{capture_path}\" > /dev/null"
7
7
  end
8
8
 
9
9
  private
@@ -123,8 +123,8 @@ module Lolcommits
123
123
  # TODO: handle other platforms here (linux/windows) e.g with ffmpeg -list_devices
124
124
  return unless Platform.platform_mac?
125
125
 
126
- capturer = Lolcommits::CaptureMacVideo.new
127
- `#{capturer.executable_path} -l`
126
+ videosnap = File.join(Configuration::LOLCOMMITS_ROOT, 'vendor', 'ext', 'videosnap', 'videosnap')
127
+ `#{videosnap} -l`
128
128
  end
129
129
  end
130
130
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lolcommits
4
- VERSION = '0.15.0'
4
+ VERSION = '0.16.2'
5
5
  GEM_NAME = 'lolcommits'
6
6
  end
@@ -33,20 +33,20 @@ Gem::Specification.new do |s|
33
33
  s.require_paths = ['lib']
34
34
 
35
35
  # non-gem dependencies
36
- s.required_ruby_version = '>= 2.3'
36
+ s.required_ruby_version = '>= 2.4'
37
37
  s.requirements << 'imagemagick'
38
38
  s.requirements << 'a webcam'
39
39
 
40
40
  # core
41
41
  s.add_runtime_dependency('methadone', '~> 1.9.5')
42
42
  s.add_runtime_dependency('mercurial-ruby', '~> 0.7.12')
43
- s.add_runtime_dependency('mini_magick', '~> 4.9.3')
43
+ s.add_runtime_dependency('mini_magick', '~> 4.10.1')
44
44
  s.add_runtime_dependency('launchy', '~> 2.4.3')
45
45
  s.add_runtime_dependency('open4', '~> 1.3.4')
46
- s.add_runtime_dependency('git', '~> 1.5.0')
46
+ s.add_runtime_dependency('git', '~> 1.6.0')
47
47
 
48
48
  # included plugins
49
- s.add_runtime_dependency('lolcommits-loltext', '~> 0.3.0')
49
+ s.add_runtime_dependency('lolcommits-loltext', '~> 0.4.0')
50
50
 
51
51
  # development & test gems
52
52
  s.add_development_dependency('aruba')
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.15.0
4
+ version: 0.16.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Rothenberg
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-05-20 00:00:00.000000000 Z
12
+ date: 2020-08-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: methadone
@@ -45,14 +45,14 @@ dependencies:
45
45
  requirements:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: 4.9.3
48
+ version: 4.10.1
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: 4.9.3
55
+ version: 4.10.1
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: launchy
58
58
  requirement: !ruby/object:Gem::Requirement
@@ -87,28 +87,28 @@ dependencies:
87
87
  requirements:
88
88
  - - "~>"
89
89
  - !ruby/object:Gem::Version
90
- version: 1.5.0
90
+ version: 1.6.0
91
91
  type: :runtime
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
95
  - - "~>"
96
96
  - !ruby/object:Gem::Version
97
- version: 1.5.0
97
+ version: 1.6.0
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: lolcommits-loltext
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
102
  - - "~>"
103
103
  - !ruby/object:Gem::Version
104
- version: 0.3.0
104
+ version: 0.4.0
105
105
  type: :runtime
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
109
  - - "~>"
110
110
  - !ruby/object:Gem::Version
111
- version: 0.3.0
111
+ version: 0.4.0
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: aruba
114
114
  requirement: !ruby/object:Gem::Requirement
@@ -320,7 +320,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
320
320
  requirements:
321
321
  - - ">="
322
322
  - !ruby/object:Gem::Version
323
- version: '2.3'
323
+ version: '2.4'
324
324
  required_rubygems_version: !ruby/object:Gem::Requirement
325
325
  requirements:
326
326
  - - ">="
@@ -329,9 +329,18 @@ required_rubygems_version: !ruby/object:Gem::Requirement
329
329
  requirements:
330
330
  - imagemagick
331
331
  - a webcam
332
- rubyforge_project:
333
- rubygems_version: 2.7.7
332
+ rubygems_version: 3.1.2
334
333
  signing_key:
335
334
  specification_version: 4
336
335
  summary: Capture webcam image on git commit for lulz.
337
- test_files: []
336
+ test_files:
337
+ - features/bugs.feature
338
+ - features/lolcommits.feature
339
+ - features/step_definitions/lolcommits_steps.rb
340
+ - features/support/env.rb
341
+ - features/support/path_helpers.rb
342
+ - test/assets/test_image.jpg
343
+ - test/assets/test_video.mp4
344
+ - test/images/test_image.jpg
345
+ - test/permissions_test.rb
346
+ - test/test_helper.rb