lolcommits 0.5.5 → 0.5.6
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 +8 -8
- data/.travis.yml +5 -5
- data/CHANGELOG +14 -3
- data/README.md +3 -0
- data/features/lolcommits.feature +1 -2
- data/lib/lolcommits/configuration.rb +5 -0
- data/lib/lolcommits/installation.rb +7 -6
- data/lib/lolcommits/plugins/lol_twitter.rb +1 -1
- data/lib/lolcommits/plugins/lol_yammer.rb +3 -2
- data/lib/lolcommits/runner.rb +30 -19
- data/lib/lolcommits/version.rb +1 -1
- data/lolcommits.gemspec +18 -9
- data/rubocop-todo.yml +1 -1
- metadata +15 -10
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzgxMmM4Y2M4ZjUzYTQ0NzQ5ZTQ4ZDUyZDIyYTUxMzViYTczMGQwMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTZjOTY1OGI5NGQ2NTdiOWQ4ZjE2YjczMzk0ZDBmODY1ODk2ZjhlMg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OTZlNjU5ZGFhOTQ5M2ZlYTJmODBmYTYwMjA2MTBhNDJiY2Q1NDQwMmM1MGFh
|
10
|
+
ZDAwMmE4YTQwZTE2MDEyMjQ3MGFmMDMxMmY2OTI1YTM5NjM4ZDI3MWUwM2Y4
|
11
|
+
NjYxZjBiMGI4ZDZkNDc5NTBmZDMzM2Y5ZjQwYmI4OTk0NjkyYjU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YjQ5YjUzZjU4YTQyNmM5NDRkY2FiZDIyYTRjMWY3NGZiNDAyMjg0Yzg4OTFi
|
14
|
+
NDFlYzUyYjY1NDI2MjNmNzIzZDQ1YWMwYmQ2MmM5ZTI2MDY5NGQ0ZmExYmY4
|
15
|
+
NjgxNzAyMmVjMzIyZjZhMzcwNTVjMGE3MzQ0NWFjMjE5NmRmNWU=
|
data/.travis.yml
CHANGED
@@ -6,20 +6,20 @@ rvm:
|
|
6
6
|
- 2.0.0
|
7
7
|
- 2.1.0
|
8
8
|
- 2.1.2
|
9
|
+
- ruby-head
|
9
10
|
|
10
11
|
before_install:
|
11
12
|
# use earlier version of Rubygems to avoid fatal bundler error on 1.8.7
|
12
13
|
- gem update --system 2.1.11
|
13
14
|
- gem --version
|
14
15
|
- sudo apt-get update -qq
|
15
|
-
- sudo apt-get install -qq -y mplayer
|
16
|
-
- sudo apt-get install ffmpeg
|
16
|
+
- sudo apt-get install -qq -y mplayer ffmpeg
|
17
17
|
# imagemagick is installed by default on normal travis image now
|
18
18
|
# - sudo apt-get install -qq -y imagemagick libmagickwand-dev
|
19
19
|
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
matrix:
|
21
|
+
allow_failures:
|
22
|
+
- rvm: ruby-head
|
23
23
|
|
24
24
|
branches:
|
25
25
|
except:
|
data/CHANGELOG
CHANGED
@@ -1,6 +1,17 @@
|
|
1
|
-
0.5.
|
2
|
-
*
|
3
|
-
*
|
1
|
+
0.5.7 (WIP)
|
2
|
+
* upgrade gems
|
3
|
+
* seperate gems for all plugins
|
4
|
+
|
5
|
+
0.5.6 (24 November 2014)
|
6
|
+
* Updates and clean ups on the gemspec (@mroth #228)
|
7
|
+
* Travis CI now includes ruby-head (@mroth #229)
|
8
|
+
* Improved error message for ImageMagick issues #159 (@matthutchinson #233)
|
9
|
+
* Fix twitter plugin config issue #231 (@matthutchinson #232)
|
10
|
+
* Update mini_magick gem to 3.8.1 (@matthutchinson #234)
|
11
|
+
* Improve README for LOLCOMMITS_DIR (@dagar #235)
|
12
|
+
* Update README to include ffmpeg installation (@VictorBjelkholm #236)
|
13
|
+
* Better failover when no snapshot created (@matthutchinson #237)
|
14
|
+
* Export LANG to post-commit hook, fixes GitHub client (@matthutchinson #240)
|
4
15
|
|
5
16
|
0.5.5 (29 September 2014)
|
6
17
|
* Animated gif capture support (@theY4Kman #226)
|
data/README.md
CHANGED
@@ -45,6 +45,8 @@ Install dependencies using your package manager of choice, for example in
|
|
45
45
|
Ubuntu:
|
46
46
|
|
47
47
|
sudo apt-get install mplayer imagemagick libmagickwand-dev
|
48
|
+
|
49
|
+
For Ubuntu 14.04 or newer, you need to manually install ffmpeg since it no longer ships with the default Ubuntu sources. [Downloads for ffmpeg](http://ffmpeg.org/download.html)
|
48
50
|
|
49
51
|
Then install the gem with:
|
50
52
|
|
@@ -106,6 +108,7 @@ via environment variables like so;
|
|
106
108
|
* `LOLCOMMITS_FORK` fork lolcommit runner (capture command forks to a new
|
107
109
|
process, speedily returning you to your terminal)
|
108
110
|
* `LOLCOMMITS_STEALTH` disable notification messages at commit time
|
111
|
+
* `LOLCOMMITS_DIR` set the output directory (defaults to ~/.lolcommits)
|
109
112
|
|
110
113
|
Or they can be set via the following arguments in the capture command (located
|
111
114
|
in your repository's `.git/hooks/post-commit` file).
|
data/features/lolcommits.feature
CHANGED
@@ -79,8 +79,7 @@ Feature: Basic UI functionality
|
|
79
79
|
When I successfully run `lolcommits --capture --fork`
|
80
80
|
Then there should be exactly 1 pid in "../.lolcommits/testforkcapture"
|
81
81
|
When I wait for the child process to exit in "testforkcapture"
|
82
|
-
Then
|
83
|
-
And a directory named "../.lolcommits/testforkcapture" should exist
|
82
|
+
Then a directory named "../.lolcommits/testforkcapture" should exist
|
84
83
|
And a file named "../.lolcommits/testforkcapture/tmp_snapshot.jpg" should not exist
|
85
84
|
And there should be exactly 1 jpg in "../.lolcommits/testforkcapture"
|
86
85
|
|
@@ -198,6 +198,11 @@ module Lolcommits
|
|
198
198
|
# you'd expect the below to work on its own, but it only handles old versions
|
199
199
|
# and will throw an exception if IM is not installed in PATH
|
200
200
|
MiniMagick.valid_version_installed?
|
201
|
+
rescue
|
202
|
+
puts "FATAL: ImageMagick >= #{MiniMagick.minimum_image_magick_version} required (http://imagemagick.org)"
|
203
|
+
puts 'Please check the following command works and returns a valid version number'
|
204
|
+
puts '=> mogrify --version'
|
205
|
+
exit 1
|
201
206
|
end
|
202
207
|
|
203
208
|
def self.valid_ffmpeg_installed?
|
@@ -75,15 +75,16 @@ module Lolcommits
|
|
75
75
|
protected
|
76
76
|
|
77
77
|
def self.hook_script(add_shebang = true)
|
78
|
-
ruby_path
|
79
|
-
imagick_path
|
80
|
-
|
81
|
-
|
82
|
-
|
78
|
+
ruby_path = Lolcommits::Configuration.command_which('ruby', true)
|
79
|
+
imagick_path = Lolcommits::Configuration.command_which('identify', true)
|
80
|
+
locale_export = "export LANG=\"#{ENV['LANG']}\"\n"
|
81
|
+
hook_export = "export PATH=\"#{ruby_path}:#{imagick_path}:$PATH\"\n"
|
82
|
+
capture_cmd = 'lolcommits --capture'
|
83
|
+
capture_args = " #{ARGV[1..-1].join(' ')}" if ARGV.length > 1
|
83
84
|
|
84
85
|
<<-EOS
|
85
86
|
### lolcommits hook (begin) ###
|
86
|
-
#{hook_export}#{capture_cmd}#{capture_args}
|
87
|
+
#{locale_export}#{hook_export}#{capture_cmd}#{capture_args}
|
87
88
|
### lolcommits hook (end) ###
|
88
89
|
EOS
|
89
90
|
end
|
@@ -44,12 +44,13 @@ module Lolcommits
|
|
44
44
|
|
45
45
|
def configure_options!
|
46
46
|
options = super
|
47
|
-
if
|
47
|
+
# ask user to configure tokens if enabling
|
48
|
+
if options['enabled']
|
48
49
|
auth_config = configure_access_token
|
49
50
|
if auth_config
|
50
51
|
options.merge!(auth_config)
|
51
52
|
else
|
52
|
-
return
|
53
|
+
return # return nil if configure_auth failed
|
53
54
|
end
|
54
55
|
end
|
55
56
|
options
|
data/lib/lolcommits/runner.rb
CHANGED
@@ -28,43 +28,55 @@ module Lolcommits
|
|
28
28
|
# this used to be handled with ActiveSupport::Callbacks, but
|
29
29
|
# now we're just using a simple procedural list
|
30
30
|
def run
|
31
|
+
# abort if we are in a rebase
|
32
|
+
die_if_rebasing!
|
33
|
+
|
31
34
|
# do things that need to happen before capture and plugins
|
32
35
|
|
33
36
|
# do native plugins that need to happen before capture
|
34
37
|
plugins_for(:precapture).each do |plugin|
|
35
|
-
debug "
|
38
|
+
debug "Runner: precapture about to execute #{plugin}"
|
36
39
|
plugin.new(self).execute_precapture
|
37
40
|
end
|
38
41
|
|
39
42
|
# do gem plugins that need to happen before capture?
|
40
43
|
|
41
|
-
#
|
42
|
-
|
44
|
+
# do main capture to snapshot_loc
|
45
|
+
run_capture
|
43
46
|
|
44
|
-
#
|
45
|
-
|
46
|
-
# for now, reserve just for us and handle manually...?
|
47
|
-
Lolcommits::Loltext.new(self).execute_postcapture
|
47
|
+
# check capture succeded, file must exist
|
48
|
+
if File.exists?(self.snapshot_loc)
|
48
49
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
50
|
+
## resize snapshot first
|
51
|
+
resize_snapshot!
|
52
|
+
|
53
|
+
# do native plugins that need to happen immediately after capture and
|
54
|
+
# resize this is effectively the "image processing" phase for now,
|
55
|
+
# reserve just for us and handle manually...?
|
56
|
+
Lolcommits::Loltext.new(self).execute_postcapture
|
53
57
|
|
54
|
-
|
58
|
+
# do native plugins that need to happen after capture
|
59
|
+
plugins_for(:postcapture).each do |plugin|
|
60
|
+
debug "Runner: postcapture about to execute #{plugin}"
|
61
|
+
plugin.new(self).execute_postcapture
|
62
|
+
end
|
55
63
|
|
56
|
-
|
57
|
-
|
64
|
+
# do gem plugins that need to happen after capture?
|
65
|
+
|
66
|
+
# do things that should happen last
|
67
|
+
cleanup!
|
68
|
+
else
|
69
|
+
debug 'Runner: failed to capture a snapshot'
|
70
|
+
exit 1
|
71
|
+
end
|
58
72
|
end
|
59
73
|
|
60
74
|
def plugins_for(position)
|
61
75
|
Lolcommits::PLUGINS.select { |p| p.runner_order == position }
|
62
76
|
end
|
63
77
|
|
64
|
-
# the main capture
|
65
|
-
def
|
66
|
-
die_if_rebasing!
|
67
|
-
|
78
|
+
# the main capture
|
79
|
+
def run_capture
|
68
80
|
puts '*** Preserving this moment in history.' unless capture_stealth
|
69
81
|
self.snapshot_loc = self.config.raw_image(image_file_type)
|
70
82
|
self.main_image = self.config.main_image(self.sha, image_file_type)
|
@@ -78,7 +90,6 @@ module Lolcommits
|
|
78
90
|
:animated_duration => self.capture_animate
|
79
91
|
)
|
80
92
|
capturer.capture
|
81
|
-
resize_snapshot!
|
82
93
|
end
|
83
94
|
|
84
95
|
def animate?
|
data/lib/lolcommits/version.rb
CHANGED
data/lolcommits.gemspec
CHANGED
@@ -3,23 +3,32 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
require "lolcommits/version"
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
|
-
s.name =
|
6
|
+
s.name = 'lolcommits'
|
7
7
|
s.version = Lolcommits::VERSION
|
8
|
-
s.authors = [
|
9
|
-
s.email = [
|
10
|
-
s.homepage =
|
11
|
-
s.
|
12
|
-
s.
|
13
|
-
|
14
|
-
s.
|
8
|
+
s.authors = ['Matthew Rothenberg', 'Matt Hutchinson']
|
9
|
+
s.email = ['mrothenberg@gmail.com', 'matt@hiddenloop.com']
|
10
|
+
s.homepage = 'http://mroth.github.com/lolcommits/'
|
11
|
+
s.license = 'LGPL-3'
|
12
|
+
s.summary = 'Capture webcam image on git commit for lulz.'
|
13
|
+
|
14
|
+
s.description = <<-EOF
|
15
|
+
lolcommits takes a snapshot with your webcam every time you git commit code,
|
16
|
+
and archives a lolcat style image with it. It's selfies for software
|
17
|
+
developers. `git blame` has never been so much fun.
|
18
|
+
EOF
|
15
19
|
|
16
20
|
s.files = `git ls-files`.split("\n")
|
17
21
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
22
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
23
|
s.require_paths = ["lib"]
|
20
24
|
|
25
|
+
# non-gem dependencies
|
26
|
+
s.required_ruby_version = '>= 1.8.7'
|
27
|
+
s.requirements << 'imagemagick'
|
28
|
+
s.requirements << 'a webcam'
|
29
|
+
|
21
30
|
# core gem dependencies
|
22
|
-
s.add_runtime_dependency('mini_magick', '~> 3.
|
31
|
+
s.add_runtime_dependency('mini_magick', '~> 3.8.1')
|
23
32
|
s.add_runtime_dependency('git', '~> 1.2.5')
|
24
33
|
s.add_runtime_dependency('choice', '~> 0.1.6')
|
25
34
|
s.add_runtime_dependency('launchy', '~> 2.2.0')
|
data/rubocop-todo.yml
CHANGED
metadata
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lolcommits
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Rothenberg
|
8
|
+
- Matt Hutchinson
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2014-
|
12
|
+
date: 2014-11-24 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: mini_magick
|
@@ -16,14 +17,14 @@ dependencies:
|
|
16
17
|
requirements:
|
17
18
|
- - ~>
|
18
19
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
20
|
+
version: 3.8.1
|
20
21
|
type: :runtime
|
21
22
|
prerelease: false
|
22
23
|
version_requirements: !ruby/object:Gem::Requirement
|
23
24
|
requirements:
|
24
25
|
- - ~>
|
25
26
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
27
|
+
version: 3.8.1
|
27
28
|
- !ruby/object:Gem::Dependency
|
28
29
|
name: git
|
29
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -332,10 +333,12 @@ dependencies:
|
|
332
333
|
- - ~>
|
333
334
|
- !ruby/object:Gem::Version
|
334
335
|
version: '1.25'
|
335
|
-
description:
|
336
|
-
archives a lolcat style image with it.
|
336
|
+
description: ! " lolcommits takes a snapshot with your webcam every time you git
|
337
|
+
commit code,\n and archives a lolcat style image with it. It's selfies for software\n
|
338
|
+
\ developers. `git blame` has never been so much fun.\n"
|
337
339
|
email:
|
338
340
|
- mrothenberg@gmail.com
|
341
|
+
- matt@hiddenloop.com
|
339
342
|
executables:
|
340
343
|
- lolcommits
|
341
344
|
extensions: []
|
@@ -407,15 +410,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
407
410
|
requirements:
|
408
411
|
- - ! '>='
|
409
412
|
- !ruby/object:Gem::Version
|
410
|
-
version:
|
413
|
+
version: 1.8.7
|
411
414
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
412
415
|
requirements:
|
413
416
|
- - ! '>='
|
414
417
|
- !ruby/object:Gem::Version
|
415
418
|
version: '0'
|
416
|
-
requirements:
|
417
|
-
|
418
|
-
|
419
|
+
requirements:
|
420
|
+
- imagemagick
|
421
|
+
- a webcam
|
422
|
+
rubyforge_project:
|
423
|
+
rubygems_version: 2.4.2
|
419
424
|
signing_key:
|
420
425
|
specification_version: 4
|
421
426
|
summary: Capture webcam image on git commit for lulz.
|