lolcommits 0.9.0 → 0.9.1.pre1

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
  SHA1:
3
- metadata.gz: f26c2d1017250e7f0e83a24fb811c0592f67b778
4
- data.tar.gz: 0d062c79096844310e474691e8b23d9e70470e6b
3
+ metadata.gz: 1c4ac1d2dbe5a6453b6fc5f08ea083644a8867ef
4
+ data.tar.gz: 4ab1a2a37a903bc050ec338bb5fac0e02475dfda
5
5
  SHA512:
6
- metadata.gz: b5806484c1dc7fb6fae3c9d69f309197a98652bede1931d80a4f80ddb9e8ffb8bb53c16c0464f3a1a188c4c1485797d7bdf42b3edb8f5e8956ac7a9efe9ed5c6
7
- data.tar.gz: a63fec5024b5472b9243ef12bcdeba846a3fe717128006608fdbd707f66216379d5a0d4a5ef8758cced0dd7e52cc285d1b9d7e8a69d98eed18153d77062497ec
6
+ metadata.gz: 3502f3b8d8cf42a8a6b89bbb5962dbc6fe2f1ecca2d36594b39f292ec1c4bcdb2e60d36a7207a645058ae6cd9e40b980d0762df112be5f74009f90c8aa351569
7
+ data.tar.gz: 02a4452c6281d97938c58a0e3360f0a9a97b128c845cf4c12a73b17a3ea22dea8b3bcca116d7502733b54ed26c7abdc27e5e767b8bc7664aa38c4864588badf3
data/.rubocop_todo.yml CHANGED
@@ -18,7 +18,7 @@ Metrics/BlockLength:
18
18
  # Offense count: 5
19
19
  # Configuration parameters: CountComments.
20
20
  Metrics/ClassLength:
21
- Max: 146
21
+ Max: 160
22
22
 
23
23
  # Offense count: 6
24
24
  Metrics/CyclomaticComplexity:
data/CHANGELOG.md CHANGED
@@ -8,6 +8,9 @@ project adheres to [Semantic Versioning][Semver].
8
8
  * WIP - extract plugins to separate gems ...
9
9
  * Your contribution here!
10
10
 
11
+ ## [0.9.1][] (20 December 2016)
12
+ * Remove Choice gem, use Methadone (@matthutchinson #326)
13
+
11
14
  ## [0.9.0][] (14 December 2016)
12
15
  * ditch ruby 1.9 support and upgrade some gems (@matthutchinson #325)
13
16
  * term_output plugin added (iTerm2 only) (@ruxton #323)
@@ -259,7 +262,8 @@ project adheres to [Semantic Versioning][Semver].
259
262
  instead of compositing multiply image Caption objects (this seems to be more
260
263
  reliable to not glitch.)
261
264
 
262
- [Unreleased]: https://github.com/mroth/lolcommits/compare/v0.9.0...HEAD
265
+ [Unreleased]: https://github.com/mroth/lolcommits/compare/v0.9.1...HEAD
266
+ [0.9.1]: https://github.com/mroth/lolcommits/compare/v0.9.0...v0.9.1
263
267
  [0.9.0]: https://github.com/mroth/lolcommits/compare/v0.8.1...v0.9.0
264
268
  [0.8.1]: https://github.com/mroth/lolcommits/compare/v0.8.0...v0.8.1
265
269
  [0.8.0]: https://github.com/mroth/lolcommits/compare/v0.7.0...v0.8.0
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # lolcommits (git + webcam = lol)
2
2
 
3
3
  lolcommits takes a snapshot with your webcam every time you git commit code, and
4
- archives a lolcat style image with it. Git blame has never been so much fun.
4
+ archives a lolcat style image with it. Git blame has never been so much fun.
5
5
 
6
6
  By default, the lol images are stored by a Github style short SHA in a
7
7
  `~/.lolcommits` directory created for you.
@@ -12,6 +12,7 @@ By default, the lol images are stored by a Github style short SHA in a
12
12
  [![CodeClimate Status](https://d3s6mut3hikguw.cloudfront.net/github/mroth/lolcommits/badges/gpa.svg)](https://codeclimate.com/github/mroth/lolcommits)
13
13
  [![Coverage Status](https://coveralls.io/repos/mroth/lolcommits/badge.svg?branch=master&service=github)](https://coveralls.io/r/mroth/lolcommits)
14
14
 
15
+
15
16
  ## Sample images
16
17
 
17
18
  <img src="https://lolcommits.github.io/assets/img/gallery.jpeg" />
@@ -20,19 +21,22 @@ Please add your own lolcommit! Add to the [People Using
20
21
  Lolcommits](https://github.com/mroth/lolcommits/wiki/Lolcommits-from-around-the-world%21)
21
22
  page on our wiki.
22
23
 
24
+
23
25
  ## Requirements
24
26
 
25
- * Ruby >= 1.8.7
27
+ * Ruby >= 2.0.0
26
28
  * A webcam
27
29
  * [ImageMagick](http://www.imagemagick.org)
28
30
  * [ffmpeg](https://www.ffmpeg.org) (optional) for animated gif capturing
29
31
 
32
+
30
33
  ## Installation
31
34
 
35
+
32
36
  ### Mac OS X
33
37
 
34
38
  You'll need ImageMagick installed. [Homebrew](http://mxcl.github.com/homebrew/)
35
- makes this easy. Simply do:
39
+ makes this easy.
36
40
 
37
41
  brew install imagemagick
38
42
 
@@ -47,11 +51,12 @@ If [Boxen](https://boxen.github.com) is your thing, [try
47
51
  this](https://github.com/AssuredLabor/puppet-lolcommits).
48
52
 
49
53
  Lolcommits v0.8.1 was the last release to support Ruby < 2.0. If you'd like to
50
- use this gem on older rubies, install it with:
54
+ use this gem on older rubies try:
51
55
 
52
56
  [sudo] gem install lolcommits --version 0.8.1 # for Ruby 1.9
53
57
  [sudo] gem install lolcommits --version 0.7.0 # for Ruby 1.8
54
58
 
59
+
55
60
  ### Linux
56
61
 
57
62
  Install dependencies using your package manager of choice, for example in
@@ -70,14 +75,17 @@ Then install the gem with:
70
75
  For more details, see [Installing on
71
76
  Linux](https://github.com/mroth/lolcommits/wiki/Installing-on-Linux).
72
77
 
78
+
73
79
  ### Windows - here be dragons!
74
80
 
75
- It all works but you'll need some more detailed instructions to get the
76
- dependencies installed. See the wiki page for [Installing on
81
+ It works, but you'll need some more detailed instructions to get the
82
+ dependencies installed. See the wiki page for [Installing on
77
83
  Windows](https://github.com/mroth/lolcommits/wiki/Installing-on-Windows).
78
84
 
85
+
79
86
  ## Usage
80
87
 
88
+
81
89
  ### Enabling and basic usage
82
90
 
83
91
  From within any git repository, simply do a `lolcommits --enable`. From that
@@ -92,23 +100,27 @@ to achieve this using `git init` and the `init.templatedir` setting.
92
100
  Don't worry about it too much, half the fun of lolcommits is forgetting it's
93
101
  installed!
94
102
 
103
+
95
104
  ### Other commands
96
105
 
97
106
  Ok, if you insist... Since you know about `--enable`, common sense suggests
98
107
  there is also a repository specific `--disable`, hopefully you can guess what
99
- that does. Other handy common commands include `--last`, which will open for
100
- display your most recent lolcommit image, or `--browse`, which pops open the
101
- directory containing all the lolcommit images for your current repository. You
102
- can always do `--help` for a full list of available commands.
108
+ that does.
103
109
 
104
- **NOTE**: Any extra arguments you pass with the --enable command are
105
- auto-appended to the git-commit capture command. For example;
110
+ Other handy common commands include `--last`, which will open for display your
111
+ most recent lolcommit, or `--browse`, which pops open the directory containing
112
+ all the lolcommit images for your current repository. You can always do `--help`
113
+ for a full list of available commands.
106
114
 
107
- lolcommits --enable --delay=5 --animate=4 --fork
115
+ **NOTE**: Any extra arguments you pass with `--enable` are appended to the
116
+ git post-hook capture command. For example;
117
+
118
+ lolcommits --enable --delay 5 --animate 4 --fork
108
119
 
109
120
  Will configure capturing of an animated gif (4 secs) after a 5 sec delay in a
110
121
  forked process. See the section below for more capture configuration variables.
111
122
 
123
+
112
124
  ### Capture configuration variables
113
125
 
114
126
  lolcommits has some capture options for additional lulz. You can enable these
@@ -124,27 +136,26 @@ via environment variables like so;
124
136
  * `LOLCOMMITS_STEALTH` disable notification messages at commit time
125
137
  * `LOLCOMMITS_DIR` set the output directory used for all repositories (defaults to ~/.lolcommits)
126
138
 
127
- Or they can be set via the following arguments in the capture command (located
128
- in your repository's `.git/hooks/post-commit` file).
139
+ Or they can be set with these arguments to the capture command (located in your
140
+ repository's `.git/hooks/post-commit` file).
129
141
 
130
- * `--device=DEVICE` or `-d DEVICE`
131
- * `--animate=SECONDS` or `-a SECONDS`
132
- * `--delay=SECONDS` or `-w SECONDS`
142
+ * `--device {name}` or `-d {name}`
143
+ * `--animate {seconds}` or `-a {seconds}`
144
+ * `--delay {seconds}` or `-w {seconds}`
133
145
  * `--fork`
134
146
  * `--stealth`
135
147
 
136
- You can configure lolcommits to adjust the text positions, font styles (type,
137
- size, color etc.) or add a transparent overlay to your images. Simply configure
138
- the default loltext plugin with this command:
148
+ Use `lolcommits --devices` to list all attached video devices available for
149
+ capturing.
150
+
151
+ You can configure lolcommit text positions, font styles (type, size, color etc.)
152
+ or add a transparent overlay to your images. Simply configure the default
153
+ loltext plugin with this command:
139
154
 
140
155
  lolcommits --config -p loltext
141
156
 
142
- To find out more, read about the [loltext options](https://github.com/mroth/lolcommits/wiki/Configure-Commit-Capturing#loltext-options).
157
+ To find out more, read about [loltext options](https://github.com/mroth/lolcommits/wiki/Configure-Commit-Capturing#loltext-options).
143
158
 
144
- You can use `lolcommits --devices` to list all attached video devices available
145
- for capturing. Read how to [configure commit
146
- capturing](https://github.com/mroth/lolcommits/wiki/Configure-Commit-Capturing)
147
- for more details.
148
159
 
149
160
  ### Animated Gif Capturing
150
161
 
@@ -156,46 +167,45 @@ you capture and the capabilities of your machine).
156
167
  * OSX - `brew install ffmpeg`
157
168
 
158
169
  To enable, just set the `LOLCOMMITS_ANIMATE` environment variable with the
159
- number of seconds to capture. Like regular image captures you can use the env
160
- variables `LOLCOMMITS_DEVICE` and `LOLCOMMITS_DELAY` to change the capture
161
- device or delay time (seconds) before capturing.
162
-
163
- If you find capturing an animated gif takes too long, try setting the
164
- `LOLCOMMITS_FORK=true` env variable. Animated gif captures are currently NOT
170
+ number of seconds to capture. If you find animated capturing takes too long, try
171
+ setting `LOLCOMMITS_FORK=true`. Animated gif captures are currently NOT
165
172
  supported on Windows.
166
173
 
167
174
  ![Example animated lolcommit
168
175
  gif](http://cdn2.usa.bugleblogs.com/blogs/000/000/003/de0eb9aa695.gif "Example
169
176
  animated lolcommit gif")
170
177
 
178
+
171
179
  ### Plugins
172
180
 
173
- A growing number of plugins are now available allowing you to transform or share
181
+ A growing number of plugins are available, allowing you to transform or share
174
182
  your lolcommits with others. The default plugin simply appends your commit
175
183
  message and sha to the captured image. Others can auto post to Twitter, Tumblr
176
184
  (and other services), or even translate your commit messages to
177
185
  [lolspeak](http://www.urbandictionary.com/define.php?term=lolspeak). They can be
178
- easily enabled, configured or disabled with our config command:
186
+ easily enabled, configured or disabled with the `--config` option:
179
187
 
180
188
  lolcommits --config
181
189
 
182
190
  Check them out on our [plugins
183
191
  page](https://github.com/mroth/lolcommits/wiki/Configuring-Plugins).
184
192
 
193
+
194
+ ## Timelapse
195
+
196
+ To watch your face as it decays while you program, you can create an animated
197
+ timelapse gif.
198
+
199
+ lolcommits --timelapse
200
+ # or for just today's lolcommits
201
+ lolcommits --timelapse --period today
202
+
185
203
  ## Troubles?
186
204
 
187
205
  Try our trouble-shooting [FAQ](https://github.com/mroth/lolcommits/wiki/FAQ), or
188
206
  take a read through our [wiki](https://github.com/mroth/lolcommits/wiki) for
189
- more information. If you think something is broken or missing, raise a [GitHub
207
+ more information. If you think something is broken or missing, raise a [Github
190
208
  issue](https://github.com/mroth/lolcommits/issues) (and please take a little
191
209
  time to check if we haven't [already
192
210
  addressed](https://github.com/mroth/lolcommits/issues?q=is%3Aissue+is%3Aclosed)
193
211
  it).
194
-
195
- ## Timelapse?
196
-
197
- To watch your face as it decays while you program, you can create a quick mpeg
198
- of all your lolcommits snapshots (if you have `imagemagick` and `ffmpeg`
199
- installed):
200
-
201
- convert `find . -type f -name "*.jpg" -print0 | xargs -0 ls -tlr | awk '{print $9}'` timelapse.mpeg
data/bin/lolcommits CHANGED
@@ -8,333 +8,225 @@ rescue LoadError
8
8
  require 'lolcommits'
9
9
  end
10
10
 
11
- require 'lolcommits/cli/fatals'
12
- require 'lolcommits/cli/launcher'
13
- require 'lolcommits/cli/process_runner'
14
- require 'lolcommits/cli/timelapse_gif'
15
-
16
- include Lolcommits
17
- include Lolcommits::CLI
18
-
19
- require 'choice'
11
+ require 'optparse'
20
12
  require 'methadone'
21
- include Methadone::CLILogging
22
-
23
- #
24
- # NO ARGUMENTS SPECIFIED, HELP THE USER OUT
25
- #
26
- def do_noargs
27
- # TODO: make this a contextual helper to know whether lolcommits is enabled
28
- puts 'Do what exactly?'
29
- puts 'Try: lolcommits --enable (when in a git repository)'
30
- puts 'Or: lolcommits --help'
31
- end
32
-
33
- # Gets a configuration object. If running in test mode will override the
34
- # LOLDIR for the configuration.
35
- #
36
- # @return [Lolcommits::Configuration]
37
- def configuration
38
- if Choice.choices[:test]
39
- Configuration.new(loldir: Configuration.loldir_for('test'))
40
- else
41
- Configuration.new
42
- end
43
- end
13
+ require 'lolcommits/cli.rb'
44
14
 
45
- # Duration for animated capture.
46
- #
47
- # If animation is enabled, returns an integer representing seconds OR a string
48
- # containing the char representation of an integer.
49
- # If animation is disabled, or if the platform doesn't support animated capture,
50
- # returns nil instead.
51
- #
52
- # FIXME: we really should standardize this to always return integer, and remove
53
- # all the to_i calls elsewhere.
54
- #
55
- # @return [Integer, String, nil]
56
- def capture_animate
57
- return unless Platform.can_animate?
58
- Choice.choices[:animate] || ENV['LOLCOMMITS_ANIMATE'] || nil
59
- end
15
+ # allow logging from everywhere
16
+ include Methadone::CLILogging
60
17
 
61
- def default_device
62
- result = Choice.choices[:device] || ENV['LOLCOMMITS_DEVICE']
18
+ class App
19
+ include Methadone::Main
63
20
 
64
- result ||= Dir.glob('/dev/video*').first if Platform.platform_linux?
21
+ include Lolcommits
22
+ include Lolcommits::CLI
65
23
 
66
- result
67
- end
24
+ description 'git-based selfies for software developers (https://lolcommits.github.io)'
25
+ version Lolcommits::VERSION
68
26
 
69
- #
70
- # IF --CAPTURE, DO CAPTURE
71
- #
72
- def do_capture
73
- capture_delay = Choice.choices[:delay] || ENV['LOLCOMMITS_DELAY'] || 0
74
- capture_stealth = Choice.choices[:stealth] || ENV['LOLCOMMITS_STEALTH'] || nil
75
- capture_device = default_device
76
-
77
- capture_options = {
78
- capture_delay: capture_delay,
79
- capture_stealth: capture_stealth,
80
- capture_device: capture_device,
81
- capture_animate: capture_animate,
82
- config: configuration
83
- }
84
-
85
- process_runner = ProcessRunner.new(configuration)
86
- should_we_fork = Choice.choices[:fork] || ENV['LOLCOMMITS_FORK']
87
- process_runner.fork_me?(should_we_fork) do
88
- if Choice.choices[:test]
89
- info '*** Capturing in test mode.'
90
-
91
- # get optional fake commit msg and sha from command line
92
- override_text = {
93
- message: Choice.choices[:msg],
94
- sha: Choice.choices[:sha]
95
- }
96
-
97
- # fire off runner with the overriden fake commit metadata
98
- runner = Lolcommits::Runner.new(capture_options.merge(override_text))
99
- runner.run
27
+ main do
28
+ # check for fatal conditions before execution
29
+ Fatals.die_if_no_valid_ffmpeg_installed! if capture_animated?
30
+ Fatals.die_on_fatal_platform_conditions!
100
31
 
101
- # automatically open so user can see the test image results immediately
102
- Launcher.open_image(runner.main_image)
32
+ if options.empty?
33
+ puts no_options_help
103
34
  else
104
- runner = Lolcommits::Runner.new(capture_options)
105
- runner.run
35
+ if debug_enabled?
36
+ logger.level = Logger::DEBUG
37
+ debug 'Outputting at DEBUG verbosity'
38
+ end
39
+
40
+ if options[:'show-config']
41
+ puts configuration
42
+ elsif options[:plugins]
43
+ puts configuration.plugins_list
44
+ elsif options[:devices]
45
+ puts Platform.device_list
46
+ puts device_list_help
47
+ elsif options[:enable]
48
+ Installation.do_enable(options)
49
+ elsif options[:disable]
50
+ Installation.do_disable
51
+ else
52
+ # all other commands require a vcs repo, check its present and walk up
53
+ # to the root dir
54
+ unless options[:test]
55
+ Fatals.die_if_not_vcs_repo!
56
+ change_dir_to_root_or_repo!
57
+ end
58
+
59
+ if options[:last]
60
+ show_last_lolimage
61
+ elsif options[:browse]
62
+ Launcher.open_folder(configuration.loldir)
63
+ elsif options[:timelapse]
64
+ TimelapseGif.new(configuration).run(options[:period])
65
+ elsif options[:config]
66
+ configuration.do_configure!(options[:plugin])
67
+ elsif options[:capture]
68
+ capture_lolcommit
69
+ end
70
+ end
106
71
  end
107
72
  end
108
- end
109
-
110
- def do_configure
111
- Fatals.die_if_not_vcs_repo!
112
- $stdout.sync = true
113
- configuration.do_configure! Choice.choices[:plugin]
114
- end
115
73
 
116
- def do_last
117
- Fatals.die_if_not_vcs_repo!
118
- lolimage = configuration.most_recent
119
- if lolimage.nil?
120
- warn 'No lolcommits have been captured for this repository yet.'
121
- exit 1
122
- end
123
- Launcher.open_image(lolimage)
124
- end
125
-
126
- def print_version_and_exit
127
- puts Lolcommits::VERSION
128
- exit 0
129
- end
130
-
131
- def change_dir_to_root_or_repo!
132
- debug 'Walking up dir tree'
133
- loop do
134
- cur = File.expand_path('.')
135
- nxt = File.expand_path('..', cur)
136
- if nxt == cur
137
- warn 'Repository root not found'
138
- return
74
+ on('--test', 'run in test mode')
75
+ on('--debug', 'show debugging info')
76
+ on('--show-config', 'show configuration file')
77
+ on('--devices', 'list available capture devices (mac only)')
78
+ on('--plugins', 'list all available plugins')
79
+ on('--config', 'configure a plugin')
80
+ on('-p', '--plugin {name}', 'plugin name to use with --config')
81
+
82
+ on('-c', '--capture', 'capture lolcommit based on last git commit')
83
+ on('-e', '--enable', 'install lolcommits for this repo')
84
+ on('-d', '--disable', 'uninstall lolcommits for this repo')
85
+ on('-l', '--last', 'view the most recent lolcommit')
86
+ on('-b', '--browse', 'browse this repo\'s lolcommits')
87
+
88
+ on('--timelapse', 'generate animated timelapse gif from captured images')
89
+ on('--period {today}', 'period to use for the timelapse gif (today or all)')
90
+
91
+ # optional capturing options
92
+ on('--device {name}', 'device name to capture from (mac/linux only)')
93
+ on('-a', '--animate {seconds}', 'enable animated gif captures with duration')
94
+ on('-w', '--delay {seconds}', 'delay before taking a snapshot')
95
+ on('--stealth', 'capture image in stealth mode (no output)')
96
+ on('--fork', 'fork capturing process to the background')
97
+ on('-s', '--sha {string}', 'pass commit sha manually (--test mode only)')
98
+ on('-m', '--msg {string}', 'pass commit message manually (--test mode only)')
99
+
100
+ #
101
+ # No options specified, help the user out
102
+ #
103
+ def self.no_options_help
104
+ # TODO: make this a contextual helper to know whether lolcommits is enabled
105
+ "Do what exactly?\n" \
106
+ "Try: lolcommits --enable (when in a git repository)\n" \
107
+ 'Or: lolcommits --help'
108
+ end
109
+
110
+ # Gets a configuration object. If running in test mode will override the
111
+ # LOLDIR for the configuration.
112
+ #
113
+ # @return [Lolcommits::Configuration]
114
+ def self.configuration
115
+ if options[:test]
116
+ Configuration.new(loldir: Configuration.loldir_for('test'))
117
+ else
118
+ Configuration.new
139
119
  end
140
- return if VCSInfo.repo_root?
141
- Dir.chdir(nxt)
142
- end
143
- end
144
-
145
- # FIXME: this should be moved out of the CLI, but to where?
146
- def load_local_plugins!
147
- plugins_dir = Configuration.loldir_for('.plugins')
148
- Dir.glob("#{plugins_dir}/*.rb").each do |plugin|
149
- load plugin
150
120
  end
151
- end
152
121
 
153
- #
154
- # Command line parsing fun
155
- #
156
- Choice.options do
157
- option :version do
158
- long '--version'
159
- short '-v'
160
- desc 'print version and exit'
161
- action { print_version_and_exit }
122
+ def self.debug_enabled?
123
+ options[:debug] || ENV['LOLCOMMITS_DEBUG'] || false
162
124
  end
163
125
 
164
- option :enable do
165
- long '--enable'
166
- short '-e'
167
- desc 'install lolcommits for this repo'
168
- action do
169
- Installation.do_enable
170
- exit 0
171
- end
126
+ def self.device_list_help
127
+ 'Specify a device with --device "{device name}" or set the LOLCOMMITS_DEVICE env variable'
172
128
  end
173
129
 
174
- option :disable do
175
- long '--disable'
176
- short '-d'
177
- desc 'uninstall lolcommits for this repo'
178
- action do
179
- Installation.do_disable
180
- exit 0
130
+ def self.show_last_lolimage
131
+ lolimage = configuration.most_recent
132
+ if lolimage.nil?
133
+ warn 'No lolcommits have been captured for this repository yet.'
134
+ exit 1
181
135
  end
136
+ Launcher.open_image(lolimage)
182
137
  end
183
138
 
184
- option :capture do
185
- long '--capture'
186
- short '-c'
187
- desc 'capture lolcommit based on last git commit'
188
- end
189
-
190
- option :last do
191
- long '--last'
192
- short '-l'
193
- desc 'view the most recent lolcommit'
194
- end
195
-
196
- option :browse do
197
- long '--browse'
198
- short '-b'
199
- desc "browse this repo's lolcommits"
200
- end
201
-
202
- option :configure do
203
- long '--config'
204
- desc 'configure a plugin'
139
+ def self.capture_device
140
+ result = options[:device] || ENV['LOLCOMMITS_DEVICE'] || nil
141
+ result ||= Dir.glob('/dev/video*').first if Platform.platform_linux?
142
+ result
205
143
  end
206
144
 
207
- option :show_config do
208
- short '-sc'
209
- long '--show-config'
210
- desc 'display configuration file'
211
- end
212
-
213
- option :plugin do
214
- desc 'pass plugin name for --config'
215
- long '--plugin'
216
- short '-p'
217
- default nil
218
- end
145
+ def self.capture_lolcommit
146
+ should_we_fork = options[:fork] || ENV['LOLCOMMITS_FORK'] || false
147
+ capture_stealth = options[:stealth] || ENV['LOLCOMMITS_STEALTH'] || false
148
+ capture_delay = (options[:delay] || ENV['LOLCOMMITS_DELAY']).to_i
219
149
 
220
- option :plugins do
221
- desc 'list all available plugins'
222
- long '--plugins'
223
- end
150
+ capture_options = {
151
+ capture_delay: capture_delay,
152
+ capture_stealth: capture_stealth,
153
+ capture_device: capture_device,
154
+ capture_animate: capture_animate,
155
+ config: configuration
156
+ }
224
157
 
225
- option :test do
226
- long '--test'
227
- desc 'Run in test mode'
228
- end
229
-
230
- option :sha do
231
- desc 'pass SHA manually [TEST-MODE]'
232
- long '--sha'
233
- short '-s'
234
- default "test-#{rand(10**10)}"
235
- end
158
+ process_runner = ProcessRunner.new(configuration)
159
+ process_runner.fork_me?(should_we_fork) do
160
+ if options[:test]
161
+ info '*** Capturing in test mode.'
162
+ capture_options.merge!(test_capture_options)
163
+ end
236
164
 
237
- option :msg do
238
- desc 'pass commit msg manually [TEST-MODE]'
239
- long '--msg'
240
- short '-m'
241
- default 'this is a test message i didnt really commit something'
242
- end
243
-
244
- option :delay do
245
- long '--delay=SECONDS'
246
- desc 'delay taking of the snapshot by n seconds'
247
- cast Integer
248
- short '-w'
249
- end
250
-
251
- option :stealth do
252
- long '--stealth'
253
- desc 'capture image in stealth mode'
254
- end
165
+ runner = Lolcommits::Runner.new(capture_options)
166
+ runner.run
255
167
 
256
- option :device do
257
- long '--device=DEVICE'
258
- desc 'the device name used to take the snapshot (mac/linux only)'
168
+ # automatically open the image in test mode
169
+ Launcher.open_image(runner.main_image) if options[:test]
170
+ end
259
171
  end
260
172
 
261
- option :devices do
262
- long '--devices'
263
- desc 'list all video devices available (mac only)'
173
+ def self.test_capture_options
174
+ {
175
+ message: options[:msg] || 'this is a test message i didnt really commit something',
176
+ sha: options[:sha] || "test-#{rand(10**10)}"
177
+ }
264
178
  end
265
179
 
266
- option :debug do
267
- long '--debug'
268
- desc 'output debugging information'
180
+ # Duration for animated capturing
181
+ #
182
+ # If animation is enabled, returns an integer > 0 representing seconds.
183
+ # Seconds will be 0 if no option set, or if the platform doesn't support
184
+ # animated captures (in which case animated capturing will be disabled).
185
+ #
186
+ # @return [Integer]
187
+ def self.capture_animate
188
+ if Platform.can_animate?
189
+ (options[:animate] || ENV['LOLCOMMITS_ANIMATE']).to_i
190
+ else
191
+ 0
192
+ end
269
193
  end
270
194
 
271
- option :gif do
272
- long '--gif'
273
- short '-g'
274
- desc 'generate animated timeline gif from captured images'
195
+ def self.capture_animated?
196
+ capture_animate > 0
275
197
  end
276
198
 
277
- if Platform.can_animate?
278
- option :animate do
279
- long '--animate=SECONDS'
280
- short '-a'
281
- cast Integer
282
- desc 'enable animated gif captures with duration (seconds)'
199
+ # TODO: remove this after implementing gem based plugins
200
+ # https://github.com/mroth/lolcommits/issues/99
201
+ # Until then for local plugin dev, use $LOLCOMMITS_DIR/.plugins directory
202
+ def self.load_local_plugins!
203
+ plugins_dir = Configuration.loldir_for('.plugins')
204
+ Dir.glob("#{plugins_dir}/*.rb").each do |plugin|
205
+ load plugin
283
206
  end
284
207
  end
285
208
 
286
- option :fork do
287
- long '--fork'
288
- desc 'fork the lolcommits runner to the background'
209
+ #
210
+ # change working dir to either a repo or the fs root
211
+ #
212
+ def self.change_dir_to_root_or_repo!
213
+ debug 'Walking up dir tree'
214
+ loop do
215
+ cur = File.expand_path('.')
216
+ nxt = File.expand_path('..', cur)
217
+ if nxt == cur
218
+ warn 'Repository root not found'
219
+ return
220
+ end
221
+ return if VCSInfo.repo_root?
222
+ Dir.chdir(nxt)
223
+ end
289
224
  end
290
- end
291
225
 
292
- # Set debug level if needed
293
- debug_mode = Choice.choices[:debug] || ENV['LOLCOMMITS_DEBUG'] || nil
294
- if debug_mode
295
- logger.level = Logger::DEBUG
296
- debug 'Outputting at DEBUG verbosity'
297
- end
226
+ #
227
+ # load plugins
228
+ #
229
+ load_local_plugins!
298
230
 
299
- #
300
- # check for fatal conditions before execution
301
- #
302
- Fatals.die_if_no_valid_ffmpeg_installed! if capture_animate
303
- Fatals.die_on_fatal_platform_conditions!
304
-
305
- #
306
- # change working dir to either a repo or the fs root
307
- #
308
- change_dir_to_root_or_repo!
309
-
310
- # TODO: Allow local backend definitions?
311
-
312
- #
313
- # load system local plugins
314
- #
315
- load_local_plugins!
316
-
317
- #
318
- # Handle actions manually since choice seems weird
319
- #
320
- if Choice.choices[:capture]
321
- do_capture
322
- elsif Choice.choices[:configure]
323
- do_configure
324
- elsif Choice.choices[:show_config]
325
- puts configuration
326
- elsif Choice.choices[:plugins]
327
- configuration.puts_plugins
328
- elsif Choice.choices[:devices]
329
- puts Platform.device_list
330
- puts 'Specify a device with --device="{device name}" or set the LOLCOMMITS_DEVICE env variable'
331
- elsif Choice.choices[:last]
332
- do_last
333
- elsif Choice.choices[:browse]
334
- Fatals.die_if_not_vcs_repo!
335
- Launcher.open_folder(configuration.loldir)
336
- elsif Choice.choices[:gif]
337
- TimelapseGif.new(configuration).run(Choice.choices[:gif])
338
- else
339
- do_noargs
231
+ go!
340
232
  end
@@ -47,8 +47,8 @@ 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`
51
- Then the git post-commit hook should contain "lolcommits --capture -w 5 --fork"
50
+ When I successfully run `lolcommits --enable -w 5 --fork --stealth --device 'My Devce'`
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
@@ -70,7 +70,7 @@ Feature: Basic UI functionality
70
70
  Scenario: Capture doesnt break in forked mode
71
71
  Given I am in a git repo named "forked"
72
72
  And I do a git commit
73
- When I successfully run `lolcommits --capture --fork`
73
+ When I run `lolcommits --capture --fork`
74
74
  Then there should be exactly 1 pid in "~/.lolcommits/forked"
75
75
  When I wait for the child process to exit in "forked"
76
76
  Then a directory named "~/.lolcommits/forked" should exist
@@ -270,7 +270,7 @@ Feature: Basic UI functionality
270
270
  Scenario: generate gif should store in its own archive directory
271
271
  Given I am in a git repo named "giffy" with lolcommits enabled
272
272
  And a loldir named "giffy" with 2 lolimages
273
- When I successfully run `lolcommits -g`
273
+ When I successfully run `lolcommits --timelapse`
274
274
  Then the output should contain "Generating animated gif."
275
275
  And a directory named "~/.lolcommits/giffy/archive" should exist
276
276
  And a file named "~/.lolcommits/giffy/archive/archive.gif" should exist
@@ -278,7 +278,7 @@ Feature: Basic UI functionality
278
278
  Scenario: generate gif with argument 'today'
279
279
  Given I am in a git repo named "sunday" with lolcommits enabled
280
280
  And a loldir named "sunday" with 2 lolimages
281
- When I successfully run `lolcommits -g today`
281
+ When I successfully run `lolcommits --timelapse --period today`
282
282
  Then there should be exactly 1 gif in "~/.lolcommits/sunday/archive"
283
283
 
284
284
  @mac-only
@@ -295,7 +295,7 @@ Feature: Basic UI functionality
295
295
  @fake-no-ffmpeg
296
296
  Scenario: gracefully fail when ffmpeg not installed and --animate is used
297
297
  Given I am using a "darwin" platform
298
- When I run `lolcommits --animate=3`
298
+ When I run `lolcommits -c --animate 3`
299
299
  Then the output should contain:
300
300
  """
301
301
  ffmpeg does not appear to be properly installed
@@ -328,7 +328,7 @@ Feature: Basic UI functionality
328
328
  Scenario: Enable in a mercurial repo passing capture arguments
329
329
  Given I am in a mercurial repo
330
330
  When I successfully run `lolcommits --enable -w 5 --fork`
331
- Then the mercurial post-commit hook should contain "lolcommits --capture -w 5 --fork"
331
+ Then the mercurial post-commit hook should contain "lolcommits --capture --delay 5 --fork"
332
332
  And the exit status should be 0
333
333
 
334
334
  Scenario: Disable in a enabled mercurial repo
@@ -15,7 +15,7 @@ Before do
15
15
 
16
16
  # prevent launchy from opening gifs in tests
17
17
  set_env 'LAUNCHY_DRY_RUN', 'true'
18
- set_env 'LOLCOMMITS_CAPTURER', 'CaptureFake'
18
+ set_env 'LOLCOMMITS_CAPTURER', 'Lolcommits::CaptureFake'
19
19
 
20
20
  author_name = 'Testy McTesterson'
21
21
  author_email = 'testy@tester.com'
@@ -1,7 +1,6 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Lolcommits
3
3
  class GitInfo < VCSInfo
4
- include Methadone::CLILogging
5
4
  attr_accessor :sha, :message, :repo_internal_path, :repo, :url,
6
5
  :author_name, :author_email, :branch
7
6
 
@@ -10,12 +10,7 @@ module Lolcommits
10
10
  #
11
11
  # IF --ENABLE, DO ENABLE
12
12
  #
13
- def self.do_enable
14
- unless File.directory?('.git')
15
- fatal "You don't appear to be in the base directory of a git project."
16
- exit 1
17
- end
18
-
13
+ def self.do_enable(capture_args = '')
19
14
  # its possible a hooks dir doesnt exist, so create it if so
20
15
  Dir.mkdir(HOOK_DIR) unless File.directory?(HOOK_DIR)
21
16
 
@@ -39,7 +34,7 @@ module Lolcommits
39
34
 
40
35
  File.open(HOOK_PATH, add_shebang ? 'w' : 'a') do |f|
41
36
  f.write("#!/bin/sh\n") if add_shebang
42
- f.write(hook_script)
37
+ f.write(hook_script(capture_args))
43
38
  end
44
39
 
45
40
  FileUtils.chmod 0o755, HOOK_PATH
@@ -63,7 +58,7 @@ module Lolcommits
63
58
  end
64
59
  end
65
60
 
66
- def self.hook_script
61
+ def self.hook_script(capture_args = '')
67
62
  ruby_path = Lolcommits::Platform.command_which('ruby', true)
68
63
  imagick_path = Lolcommits::Platform.command_which('identify', true)
69
64
 
@@ -74,13 +69,12 @@ module Lolcommits
74
69
  hook_export = "export PATH=\"#{ruby_path}:#{imagick_path}:$PATH\"\n"
75
70
  end
76
71
 
77
- capture_cmd = 'lolcommits --capture'
78
- capture_args = " #{ARGV[1..-1].join(' ')}" if ARGV.length > 1
72
+ capture_cmd = 'lolcommits --capture'
79
73
 
80
74
  <<-EOS
81
75
  ### lolcommits hook (begin) ###
82
76
  if [ ! -d "$GIT_DIR/rebase-merge" ]; then
83
- #{locale_export}#{hook_export}#{capture_cmd}#{capture_args}
77
+ #{locale_export}#{hook_export}#{capture_cmd} #{capture_args}
84
78
  fi
85
79
  ### lolcommits hook (end) ###
86
80
  EOS
@@ -10,12 +10,7 @@ module Lolcommits
10
10
  #
11
11
  # IF --ENABLE, DO ENABLE
12
12
  #
13
- def self.do_enable
14
- unless File.directory?('.hg')
15
- fatal "You don't appear to be in the base directory of a mercurial project."
16
- exit 1
17
- end
18
-
13
+ def self.do_enable(capture_args = '')
19
14
  if lolcommits_hook_exists?
20
15
  # clear away any existing lolcommits hook
21
16
  remove_existing_hook!
@@ -23,7 +18,7 @@ module Lolcommits
23
18
 
24
19
  config = repository.config
25
20
  HOOK_OPERATIONS.each do |op|
26
- config.add_setting(HOOK_SECTION, "post-#{op}.lolcommits", hook_script)
21
+ config.add_setting(HOOK_SECTION, "post-#{op}.lolcommits", hook_script(capture_args))
27
22
  end
28
23
  config.path
29
24
  end
@@ -43,7 +38,7 @@ module Lolcommits
43
38
  end
44
39
  end
45
40
 
46
- def self.hook_script
41
+ def self.hook_script(capture_args = '')
47
42
  ruby_path = Lolcommits::Platform.command_which('ruby', true)
48
43
  imagick_path = Lolcommits::Platform.command_which('identify', true)
49
44
  capture_cmd = 'lolcommits --capture'
@@ -56,7 +51,6 @@ module Lolcommits
56
51
  capture_cmd = "#{locale_export} #{hook_export} #{capture_cmd}"
57
52
  end
58
53
 
59
- capture_args = ARGV[1..-1].join(' ') if ARGV.length > 1
60
54
  "#{capture_cmd} #{capture_args}"
61
55
  end
62
56
 
@@ -1,7 +1,6 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Lolcommits
3
3
  class MercurialInfo < VCSInfo
4
- include Methadone::CLILogging
5
4
  attr_accessor :sha, :message, :repo_internal_path, :repo, :url,
6
5
  :author_name, :author_email, :branch
7
6
 
@@ -1,8 +1,6 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Lolcommits
3
3
  class Capturer
4
- include Methadone::CLILogging
5
-
6
4
  attr_accessor :capture_device, :capture_delay, :snapshot_location,
7
5
  :video_location, :frames_location, :animated_duration
8
6
 
@@ -0,0 +1,4 @@
1
+ require 'lolcommits/cli/fatals'
2
+ require 'lolcommits/cli/launcher'
3
+ require 'lolcommits/cli/process_runner'
4
+ require 'lolcommits/cli/timelapse_gif'
@@ -7,7 +7,6 @@ module Lolcommits
7
7
  # Helper methods for failing on error conditions in the lolcommits CLI.
8
8
  module Fatals
9
9
  include Lolcommits
10
- include Methadone::CLILogging
11
10
 
12
11
  # Check for platform related conditions that could prevent lolcommits from
13
12
  # working properly.
@@ -15,8 +15,6 @@ module Lolcommits
15
15
  # Runs the history timeline animator task thingy
16
16
  # param args [String] the arg passed to the gif command on CLI (optional)
17
17
  def run(args = nil)
18
- Fatals.die_if_not_vcs_repo!
19
-
20
18
  case args
21
19
  when 'today'
22
20
  lolimages = @configuration.jpg_images_today
@@ -67,12 +67,12 @@ module Lolcommits
67
67
  File.join(loldir, 'tmp_frames')
68
68
  end
69
69
 
70
- def puts_plugins
71
- puts "Available plugins: #{Lolcommits::Runner.plugins.map(&:name).join(', ')}"
70
+ def plugins_list
71
+ "Available plugins: \n * #{Lolcommits::Runner.plugins.map(&:name).join("\n * ")}"
72
72
  end
73
73
 
74
74
  def ask_for_plugin_name
75
- puts_plugins
75
+ puts plugins_list
76
76
  print 'Name of plugin to configure: '
77
77
  STDIN.gets.strip
78
78
  end
@@ -83,10 +83,11 @@ module Lolcommits
83
83
  end
84
84
 
85
85
  puts "Unable to find plugin: '#{plugin_name}'"
86
- puts_plugins
86
+ puts plugins_list
87
87
  end
88
88
 
89
89
  def do_configure!(plugin_name)
90
+ $stdout.sync = true
90
91
  plugin_name = ask_for_plugin_name if plugin_name.to_s.strip.empty?
91
92
 
92
93
  plugin = find_plugin(plugin_name)
@@ -18,8 +18,9 @@ module Lolcommits
18
18
  #
19
19
  # IF --ENABLE, DO ENABLE
20
20
  #
21
- def self.do_enable
22
- path = backend.do_enable
21
+ def self.do_enable(options = {})
22
+ capture_args = extract_capture_args(options)
23
+ path = backend.do_enable(capture_args)
23
24
 
24
25
  info 'installed lolcommit hook to:'
25
26
  info " -> #{File.expand_path(path)}"
@@ -34,5 +35,20 @@ module Lolcommits
34
35
  def self.do_disable
35
36
  backend.do_disable
36
37
  end
38
+
39
+ # Extract any command line capture args from the parsed options hash, will
40
+ # be appended to the capture command within the commit hook script
41
+ #
42
+ # @return [String]
43
+ def self.extract_capture_args(options)
44
+ options.map do |k, v|
45
+ next unless %w(device animate delay stealth fork).include?(k)
46
+ if k == 'device'
47
+ "--device '#{v}'"
48
+ else
49
+ "--#{k}#{v == true ? '' : " #{v}"}"
50
+ end
51
+ end.compact.join(' ')
52
+ end
37
53
  end
38
54
  end
@@ -1,8 +1,6 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Lolcommits
3
3
  class Plugin
4
- include Methadone::CLILogging
5
-
6
4
  attr_accessor :runner, :options
7
5
 
8
6
  def initialize(runner)
@@ -40,12 +40,12 @@ module Lolcommits
40
40
  string.upcase! if config_option(type, :uppercase)
41
41
 
42
42
  image.combine_options do |c|
43
- c.strokewidth runner.animate? ? '1' : '2'
43
+ c.strokewidth runner.capture_animated? ? '1' : '2'
44
44
  c.interline_spacing(-(config_option(type, :size) / 5))
45
45
  c.stroke config_option(type, :stroke_color)
46
46
  c.fill config_option(type, :color)
47
47
  c.gravity transformed_position
48
- c.pointsize runner.animate? ? (config_option(type, :size) / 2) : config_option(type, :size)
48
+ c.pointsize runner.capture_animated? ? (config_option(type, :size) / 2) : config_option(type, :size)
49
49
  c.font config_option(type, :font)
50
50
  c.annotate annotate_location, string
51
51
  end
@@ -7,8 +7,6 @@ module Lolcommits
7
7
  :sha, :snapshot_loc, :main_image, :config, :vcs_info,
8
8
  :capture_animate
9
9
 
10
- include Methadone::CLILogging
11
-
12
10
  def initialize(attributes = {})
13
11
  attributes.each do |attr, val|
14
12
  send("#{attr}=", val)
@@ -85,7 +83,7 @@ module Lolcommits
85
83
  self.snapshot_loc = config.raw_image(image_file_type)
86
84
  self.main_image = config.main_image(sha, image_file_type)
87
85
 
88
- capturer = Platform.capturer_class(animate?).new(
86
+ capturer = Platform.capturer_class(capture_animated?).new(
89
87
  capture_device: capture_device,
90
88
  capture_delay: capture_delay,
91
89
  snapshot_location: snapshot_loc,
@@ -96,46 +94,39 @@ module Lolcommits
96
94
  capturer.capture
97
95
  end
98
96
 
99
- def animate?
100
- capture_animate && (capture_animate.to_i > 0)
97
+ def capture_animated?
98
+ capture_animate > 0
101
99
  end
102
100
 
103
101
  private
104
102
 
105
- # def capturer_class
106
- # capturer_module = 'Lolcommits'
107
- # Object.const_get(capturer_module).const_get(Platform.capturer_class(animate?))
108
- # end
109
-
110
103
  def image_file_type
111
- animate? ? 'gif' : 'jpg'
104
+ capture_animated? ? 'gif' : 'jpg'
112
105
  end
113
- end
114
106
 
115
- protected
116
-
117
- def resize_snapshot!
118
- debug 'Runner: resizing snapshot'
119
- image = MiniMagick::Image.open(snapshot_loc)
120
- if image[:width] > 640 || image[:height] > 480
121
- # this is ghetto resize-to-fill
122
- image.combine_options do |c|
123
- c.resize '640x480^'
124
- c.gravity 'center'
125
- c.extent '640x480'
107
+ def resize_snapshot!
108
+ debug 'Runner: resizing snapshot'
109
+ image = MiniMagick::Image.open(snapshot_loc)
110
+ if image[:width] > 640 || image[:height] > 480
111
+ # this is ghetto resize-to-fill
112
+ image.combine_options do |c|
113
+ c.resize '640x480^'
114
+ c.gravity 'center'
115
+ c.extent '640x480'
116
+ end
117
+ debug "Runner: writing resized image to #{snapshot_loc}"
118
+ image.write snapshot_loc
126
119
  end
127
- debug "Runner: writing resized image to #{snapshot_loc}"
128
- image.write snapshot_loc
120
+ debug "Runner: copying resized image to #{main_image}"
121
+ FileUtils.cp(snapshot_loc, main_image)
129
122
  end
130
- debug "Runner: copying resized image to #{main_image}"
131
- FileUtils.cp(snapshot_loc, main_image)
132
- end
133
123
 
134
- def cleanup!
135
- debug 'Runner: running cleanup'
136
- # clean up the captured image and any other raw assets
137
- FileUtils.rm(snapshot_loc)
138
- FileUtils.rm_f(config.video_loc)
139
- FileUtils.rm_rf(config.frames_loc)
124
+ def cleanup!
125
+ debug 'Runner: running cleanup'
126
+ # clean up the captured image and any other raw assets
127
+ FileUtils.rm(snapshot_loc)
128
+ FileUtils.rm_f(config.video_loc)
129
+ FileUtils.rm_rf(config.frames_loc)
130
+ end
140
131
  end
141
132
  end
@@ -2,7 +2,6 @@
2
2
  module Lolcommits
3
3
  # base class ala plugin.rb
4
4
  class VCSInfo
5
- include Methadone::CLILogging
6
5
  attr_accessor :sha, :message, :repo_internal_path, :repo, :url,
7
6
  :author_name, :author_email, :branch
8
7
 
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Lolcommits
3
- VERSION = '0.9.0'.freeze
3
+ VERSION = '0.9.1.pre1'.freeze
4
4
  end
data/lolcommits.gemspec CHANGED
@@ -36,7 +36,6 @@ Gem::Specification.new do |s|
36
36
 
37
37
  # core
38
38
  s.add_runtime_dependency('methadone', '~> 1.9.3')
39
- s.add_runtime_dependency('choice', '~> 0.2.0')
40
39
  s.add_runtime_dependency('mercurial-ruby', '~> 0.7.12')
41
40
  s.add_runtime_dependency('mini_magick', '~> 4.6.0')
42
41
  s.add_runtime_dependency('launchy', '~> 2.4.3')
@@ -11,6 +11,7 @@ $LOAD_PATH.unshift(File.dirname(__FILE__))
11
11
  require 'lolcommits'
12
12
 
13
13
  include Lolcommits
14
+ include Methadone::CLILogging
14
15
 
15
16
  class LolTest < MiniTest::Test
16
17
  #
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.9.0
4
+ version: 0.9.1.pre1
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: 2016-12-14 00:00:00.000000000 Z
12
+ date: 2016-12-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: aruba
@@ -81,20 +81,6 @@ dependencies:
81
81
  - - "~>"
82
82
  - !ruby/object:Gem::Version
83
83
  version: 1.9.3
84
- - !ruby/object:Gem::Dependency
85
- name: choice
86
- requirement: !ruby/object:Gem::Requirement
87
- requirements:
88
- - - "~>"
89
- - !ruby/object:Gem::Version
90
- version: 0.2.0
91
- type: :runtime
92
- prerelease: false
93
- version_requirements: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - "~>"
96
- - !ruby/object:Gem::Version
97
- version: 0.2.0
98
84
  - !ruby/object:Gem::Dependency
99
85
  name: mercurial-ruby
100
86
  requirement: !ruby/object:Gem::Requirement
@@ -358,6 +344,7 @@ files:
358
344
  - lib/lolcommits/capturer/capture_mac.rb
359
345
  - lib/lolcommits/capturer/capture_mac_animated.rb
360
346
  - lib/lolcommits/capturer/capture_windows.rb
347
+ - lib/lolcommits/cli.rb
361
348
  - lib/lolcommits/cli/fatals.rb
362
349
  - lib/lolcommits/cli/launcher.rb
363
350
  - lib/lolcommits/cli/process_runner.rb
@@ -408,9 +395,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
408
395
  version: '2.0'
409
396
  required_rubygems_version: !ruby/object:Gem::Requirement
410
397
  requirements:
411
- - - ">="
398
+ - - ">"
412
399
  - !ruby/object:Gem::Version
413
- version: '0'
400
+ version: 1.3.1
414
401
  requirements:
415
402
  - imagemagick
416
403
  - a webcam