lolcommits 0.4.1 → 0.4.2
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.
- data/.travis.yml +7 -7
- data/CHANGELOG +7 -2
- data/bin/lolcommits +26 -14
- data/features/bugs.feature +11 -0
- data/features/plugins.feature +1 -1
- data/lib/lolcommits/capture_mac.rb +1 -1
- data/lib/lolcommits/configuration.rb +4 -0
- data/lib/lolcommits/git_info.rb +5 -1
- data/lib/lolcommits/plugins/uploldz.rb +6 -2
- data/lib/lolcommits/runner.rb +1 -0
- data/lib/lolcommits/version.rb +1 -1
- metadata +4 -4
data/.travis.yml
CHANGED
@@ -3,17 +3,17 @@ rvm:
|
|
3
3
|
- 1.8.7
|
4
4
|
- 1.9.2
|
5
5
|
- 1.9.3
|
6
|
-
-
|
6
|
+
- 2.0.0
|
7
7
|
|
8
8
|
before_install:
|
9
|
-
#
|
9
|
+
# imagemagick is installed by default on normal travis image now
|
10
10
|
- sudo apt-get update -qq
|
11
|
-
- sudo apt-get install -qq -y mplayer
|
11
|
+
- sudo apt-get install -qq -y mplayer
|
12
|
+
# - sudo apt-get install -qq -y imagemagick libmagickwand-dev
|
12
13
|
|
13
|
-
#
|
14
|
-
|
15
|
-
|
16
|
-
- rvm: ruby-head
|
14
|
+
# matrix:
|
15
|
+
# allow_failures:
|
16
|
+
# - rvm: 2.0.0
|
17
17
|
|
18
18
|
branches:
|
19
19
|
except:
|
data/CHANGELOG
CHANGED
@@ -1,6 +1,11 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.3 (in development)
|
2
2
|
* TODO: figure out problems with GUI clients
|
3
|
-
|
3
|
+
|
4
|
+
0.4.2 (11 March 2013)
|
5
|
+
* fix ruby 2.0 compatibility (#91)
|
6
|
+
* gracefully detect upstream issue with git color.ui being set to always (#50)
|
7
|
+
* handle external capture devices with special characters in name (#93)
|
8
|
+
* fixes to the uploldz plugin (#92)
|
4
9
|
|
5
10
|
0.4.1 (17 February 2013)
|
6
11
|
* add lolsrv plugin (thx @sebastianmarr!, #82)
|
data/bin/lolcommits
CHANGED
@@ -24,24 +24,31 @@ def command?(name)
|
|
24
24
|
$?.success?
|
25
25
|
end
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
|
27
|
+
def die_on_fatal_conditions!
|
28
|
+
if Configuration.is_mac?
|
29
|
+
unless File.executable? File.join(Configuration::LOLCOMMITS_ROOT, "vendor", "ext", "imagesnap", "imagesnap")
|
30
|
+
fatal "Couldn't properly execute imagesnap for some reason, please file a bug?!"
|
31
|
+
exit 1
|
32
|
+
end
|
33
|
+
elsif Configuration.is_linux?
|
34
|
+
if not command?('mplayer')
|
35
|
+
fatal "Couldn't find mplayer in your PATH!"
|
36
|
+
exit 1
|
37
|
+
end
|
38
|
+
end
|
39
|
+
unless File.readable? File.join(Configuration::LOLCOMMITS_ROOT, "vendor", "fonts", "Impact.ttf")
|
40
|
+
fatal "Couldn't properly read Impact font from gem package, please file a bug?!"
|
30
41
|
exit 1
|
31
42
|
end
|
32
|
-
|
33
|
-
|
34
|
-
|
43
|
+
unless Configuration.valid_imagemagick_installed?
|
44
|
+
fatal "FATAL: ImageMagick does not appear to be properly installed!"
|
45
|
+
exit 1
|
46
|
+
end
|
47
|
+
if Configuration.git_config_color_always?
|
48
|
+
fatal "Due to a bug in the ruby-git library, git config for color.ui cannot be set to 'always'."
|
49
|
+
fatal "Try setting it to 'auto' instead!"
|
35
50
|
exit 1
|
36
51
|
end
|
37
|
-
end
|
38
|
-
unless File.readable? File.join(Configuration::LOLCOMMITS_ROOT, "vendor", "fonts", "Impact.ttf")
|
39
|
-
fatal "Couldn't properly read Impact font from gem package, please file a bug?!"
|
40
|
-
exit 1
|
41
|
-
end
|
42
|
-
unless Configuration.valid_imagemagick_installed?
|
43
|
-
fatal "FATAL: ImageMagick does not appear to be properly installed!"
|
44
|
-
exit 1
|
45
52
|
end
|
46
53
|
|
47
54
|
def die_if_not_git_repo!
|
@@ -274,6 +281,11 @@ if debug_mode
|
|
274
281
|
debug "Outputting at DEBUG verbosity"
|
275
282
|
end
|
276
283
|
|
284
|
+
#
|
285
|
+
# check for fatal conditions before execution
|
286
|
+
#
|
287
|
+
die_on_fatal_conditions!
|
288
|
+
|
277
289
|
#
|
278
290
|
# Handle actions manually since choice seems weird
|
279
291
|
#
|
data/features/bugs.feature
CHANGED
@@ -45,3 +45,14 @@ Feature: Bug regression testing
|
|
45
45
|
When I run `lolcommits`
|
46
46
|
Then the output should contain "ImageMagick does not appear to be properly installed"
|
47
47
|
And the exit status should be 1
|
48
|
+
|
49
|
+
#
|
50
|
+
# issue #50, https://github.com/mroth/lolcommits/issues/50
|
51
|
+
#
|
52
|
+
Scenario: catch upstream bug with ruby-git and color=always
|
53
|
+
Given I am in a git repository named "whatev" with lolcommits enabled
|
54
|
+
And I successfully run `git config color.ui always`
|
55
|
+
When I run `lolcommits`
|
56
|
+
Then the output should contain "Due to a bug in the ruby-git library, git config for color.ui cannot be set to 'always'."
|
57
|
+
And the output should contain "Try setting it to 'auto' instead!"
|
58
|
+
And the exit status should be 1
|
data/features/plugins.feature
CHANGED
@@ -137,6 +137,10 @@ module Lolcommits
|
|
137
137
|
MiniMagick::valid_version_installed?
|
138
138
|
end
|
139
139
|
|
140
|
+
def self.git_config_color_always?
|
141
|
+
`git config color.ui`.chomp =~ /always/
|
142
|
+
end
|
143
|
+
|
140
144
|
# Cross-platform way of finding an executable in the $PATH.
|
141
145
|
# idea taken from http://bit.ly/qDaTbY
|
142
146
|
#
|
data/lib/lolcommits/git_info.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Lolcommits
|
2
2
|
class GitInfo
|
3
3
|
include Methadone::CLILogging
|
4
|
-
attr_accessor :sha, :message, :repo_internal_path
|
4
|
+
attr_accessor :sha, :message, :repo_internal_path, :repo
|
5
5
|
|
6
6
|
def initialize
|
7
7
|
debug "GitInfo: attempting to read local repository"
|
@@ -13,11 +13,15 @@ module Lolcommits
|
|
13
13
|
self.message = commit.message.split("\n").first
|
14
14
|
self.sha = commit.sha[0..10]
|
15
15
|
self.repo_internal_path = g.repo.path
|
16
|
+
regex = /.*[:\/](\w*).git/
|
17
|
+
match = g.remote.url.match regex if g.remote.url
|
18
|
+
self.repo = match[1] if match
|
16
19
|
|
17
20
|
debug "GitInfo: parsed the following values from commit:"
|
18
21
|
debug "GitInfo: \t#{self.message}"
|
19
22
|
debug "GitInfo: \t#{self.sha}"
|
20
23
|
debug "GitInfo: \t#{self.repo_internal_path}"
|
24
|
+
debug "GitInfo: \t#{self.repo}"
|
21
25
|
end
|
22
26
|
end
|
23
27
|
end
|
@@ -13,12 +13,16 @@ module Lolcommits
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def run
|
16
|
+
repo = self.runner.repo.to_s
|
16
17
|
if configuration['endpoint'].empty?
|
17
18
|
puts "Endpoint URL is empty, please run lolcommits --config to add one."
|
19
|
+
elsif repo.empty?
|
20
|
+
puts "Repo is empty, skipping upload"
|
18
21
|
else
|
19
|
-
|
22
|
+
plugdebug "Calling " + configuration['endpoint'] + " with repo " + repo
|
23
|
+
RestClient.post(configuration['endpoint'],
|
20
24
|
:file => File.new(self.runner.main_image),
|
21
|
-
:repo =>
|
25
|
+
:repo => repo)
|
22
26
|
end
|
23
27
|
|
24
28
|
end
|
data/lib/lolcommits/runner.rb
CHANGED
data/lib/lolcommits/version.rb
CHANGED
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.4.
|
4
|
+
version: 0.4.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-03-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mini_magick
|
@@ -367,7 +367,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
367
367
|
version: '0'
|
368
368
|
segments:
|
369
369
|
- 0
|
370
|
-
hash:
|
370
|
+
hash: 4005532101610258654
|
371
371
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
372
372
|
none: false
|
373
373
|
requirements:
|
@@ -376,7 +376,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
376
376
|
version: '0'
|
377
377
|
segments:
|
378
378
|
- 0
|
379
|
-
hash:
|
379
|
+
hash: 4005532101610258654
|
380
380
|
requirements: []
|
381
381
|
rubyforge_project: lolcommits
|
382
382
|
rubygems_version: 1.8.25
|