lolcommits 0.5.5 → 0.5.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MWEyZjJjMzUxNGE1N2M3ZTI0ZTc5N2ExZmI1OWQwYTRjZGNiZjliZg==
4
+ MzgxMmM4Y2M4ZjUzYTQ0NzQ5ZTQ4ZDUyZDIyYTUxMzViYTczMGQwMw==
5
5
  data.tar.gz: !binary |-
6
- NDlkNDQyNDk3NmQzOTRmNTRkMjQ4ZmQ1YmNmMDQ2MDRhMmUzNjkzZg==
6
+ MTZjOTY1OGI5NGQ2NTdiOWQ4ZjE2YjczMzk0ZDBmODY1ODk2ZjhlMg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZmQ1ZTQ3ZDZlNDE1NDNjMzc0YjU4NTQzMDdhNzJjZGUzMDExMTBmNDVlNmM2
10
- MTUwNzIzOTgzNjUyMDhmOTQ4Nzk4MGU1NzA4NWM5ZjdmMzc0ZTdmYTA1YjZh
11
- ODExYTUxNDJjOTZjMDQ0MWZiNmU5OTNjZTA1ZDA5YmEwMTA1NzU=
9
+ OTZlNjU5ZGFhOTQ5M2ZlYTJmODBmYTYwMjA2MTBhNDJiY2Q1NDQwMmM1MGFh
10
+ ZDAwMmE4YTQwZTE2MDEyMjQ3MGFmMDMxMmY2OTI1YTM5NjM4ZDI3MWUwM2Y4
11
+ NjYxZjBiMGI4ZDZkNDc5NTBmZDMzM2Y5ZjQwYmI4OTk0NjkyYjU=
12
12
  data.tar.gz: !binary |-
13
- OTk0NGNlY2Y4MTZiNDhiNTNhODRhOTRhODNmNjRmMDAyNjI4NmNjYTY1N2Ez
14
- NTdjZTE3ZjJhZDQ1NTAwMThiYTY4MDJiMTQ2N2EyYjA2NWY3ZjVjNWFhZDgw
15
- OWVlZjQ5ZjdjNDdlOGJkZTE0N2M4ODgyNjk3Nzc0YmM4NzkzOWY=
13
+ YjQ5YjUzZjU4YTQyNmM5NDRkY2FiZDIyYTRjMWY3NGZiNDAyMjg0Yzg4OTFi
14
+ NDFlYzUyYjY1NDI2MjNmNzIzZDQ1YWMwYmQ2MmM5ZTI2MDY5NGQ0ZmExYmY4
15
+ NjgxNzAyMmVjMzIyZjZhMzcwNTVjMGE3MzQ0NWFjMjE5NmRmNWU=
@@ -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
- # matrix:
21
- # allow_failures:
22
- # - rvm: 2.0.0
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.6 (in development)
2
- * update gems!
3
- * prepare plugins for extraction
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).
@@ -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 the output should contain "*** Preserving this moment in history."
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 = Lolcommits::Configuration.command_which('ruby', true)
79
- imagick_path = Lolcommits::Configuration.command_which('identify', true)
80
- hook_export = "export PATH=\"#{ruby_path}:#{imagick_path}:$PATH\"\n"
81
- capture_cmd = 'lolcommits --capture'
82
- capture_args = " #{ARGV[1..-1].join(' ')}" if ARGV.length > 1
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
@@ -47,7 +47,7 @@ module Lolcommits
47
47
  def configure_options!
48
48
  options = super
49
49
  # ask user to configure tokens if enabling
50
- if enabled?
50
+ if options['enabled']
51
51
  auth_config = configure_auth!
52
52
  if auth_config
53
53
  options.merge!(auth_config)
@@ -44,12 +44,13 @@ module Lolcommits
44
44
 
45
45
  def configure_options!
46
46
  options = super
47
- if enabled?
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
@@ -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 "precapture: about to execute #{plugin}"
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
- # **** do the main capture ****
42
- run_capture_and_resize
44
+ # do main capture to snapshot_loc
45
+ run_capture
43
46
 
44
- # do native plugins that need to happen immediately after capture
45
- # this is effectively the "image processing" phase
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
- # do native plugins that need to happen after capture
50
- plugins_for(:postcapture).each do |plugin|
51
- plugin.new(self).execute_postcapture
52
- end
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
- # do gem plugins that need to happen after capture?
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
- # do things that should happen last
57
- cleanup!
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 and resize operation, critical
65
- def run_capture_and_resize
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?
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Lolcommits
3
- VERSION = '0.5.5'
3
+ VERSION = '0.5.6'
4
4
  end
@@ -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 = "lolcommits"
6
+ s.name = 'lolcommits'
7
7
  s.version = Lolcommits::VERSION
8
- s.authors = ["Matthew Rothenberg"]
9
- s.email = ["mrothenberg@gmail.com"]
10
- s.homepage = "http://mroth.github.com/lolcommits/"
11
- s.summary = %q{Capture webcam image on git commit for lulz.}
12
- s.description = %q{Takes a snapshot with your webcam every time you git commit code, and archives a lolcat style image with it.}
13
- s.license = "LGPL-3"
14
- s.rubyforge_project = "lolcommits"
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.5')
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')
@@ -66,7 +66,7 @@ Documentation:
66
66
  # Offence count: 3
67
67
  # Configuration parameters: CountComments.
68
68
  ClassLength:
69
- Max: 179
69
+ Max: 190
70
70
 
71
71
  # Offence count: 73
72
72
  LineLength:
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.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-09-29 00:00:00.000000000 Z
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: '3.5'
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: '3.5'
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: Takes a snapshot with your webcam every time you git commit code, and
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: '0'
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
- rubyforge_project: lolcommits
418
- rubygems_version: 2.4.1
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.