lolcommits 0.5.7 → 0.5.8

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.
Files changed (44) hide show
  1. checksums.yaml +8 -8
  2. data/.rubocop.yml +1 -0
  3. data/.rubocop_todo.yml +16 -161
  4. data/.travis.yml +11 -4
  5. data/CHANGELOG +11 -0
  6. data/Gemfile +2 -2
  7. data/Rakefile +24 -32
  8. data/bin/lolcommits +62 -125
  9. data/features/bugs.feature +24 -9
  10. data/features/lolcommits.feature +136 -145
  11. data/features/plugins.feature +16 -33
  12. data/features/step_definitions/lolcommits_steps.rb +91 -71
  13. data/features/support/env.rb +18 -48
  14. data/features/support/path_helpers.rb +9 -8
  15. data/lib/core_ext/mini_magick/utilities.rb +15 -0
  16. data/lib/lolcommits/capturer/capture_linux.rb +1 -1
  17. data/lib/lolcommits/capturer/capture_linux_animated.rb +12 -13
  18. data/lib/lolcommits/capturer/capture_mac_animated.rb +12 -13
  19. data/lib/lolcommits/capturer.rb +10 -2
  20. data/lib/lolcommits/cli/fatals.rb +77 -0
  21. data/lib/lolcommits/cli/launcher.rb +29 -0
  22. data/lib/lolcommits/cli/process_runner.rb +48 -0
  23. data/lib/lolcommits/cli/timelapse_gif.rb +45 -0
  24. data/lib/lolcommits/configuration.rb +30 -133
  25. data/lib/lolcommits/git_info.rb +58 -28
  26. data/lib/lolcommits/installation.rb +11 -21
  27. data/lib/lolcommits/platform.rb +134 -0
  28. data/lib/lolcommits/plugin.rb +2 -2
  29. data/lib/lolcommits/plugins/dot_com.rb +15 -15
  30. data/lib/lolcommits/plugins/lol_protonet.rb +68 -0
  31. data/lib/lolcommits/plugins/lol_twitter.rb +12 -15
  32. data/lib/lolcommits/plugins/lol_yammer.rb +4 -6
  33. data/lib/lolcommits/plugins/lolsrv.rb +8 -11
  34. data/lib/lolcommits/plugins/loltext.rb +7 -7
  35. data/lib/lolcommits/plugins/tranzlate.rb +70 -70
  36. data/lib/lolcommits/plugins/uploldz.rb +8 -8
  37. data/lib/lolcommits/runner.rb +36 -35
  38. data/lib/lolcommits/version.rb +1 -1
  39. data/lib/lolcommits.rb +4 -10
  40. data/lolcommits.gemspec +11 -10
  41. data/test/lolcommits_test.rb +35 -0
  42. data/test/plugins_test.rb +52 -0
  43. metadata +40 -18
  44. data/test/test_lolcommits.rb +0 -78
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MWE3MGEwZGZkZDk1ZGVhMzgyOGUzODdhMjY4OGQ5OWNjYjc4YWYwZQ==
4
+ YWM2Mjk1ZjlmYWQ4YmI1MTE0YzYxZDk0MjVkOGE1MmI3NDk2ZDBlMg==
5
5
  data.tar.gz: !binary |-
6
- ODczNTk4MGFlODMwODg5OTdjMGJkNWJhOTk1N2QwMzMyZjkwZWE1Mw==
6
+ NjE0YzAxODgxNTRmOTNhNjUzNzgxNGI5MjNiZmJhZjFmNzc4MTAxNg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NjJhYTc0YTVmY2E2ZGU4MmU3ODBkYjQyYTUyYjg2ODM1NjY5YTdiY2E0Mzli
10
- NjRhOTVlODNhMDdjNzI2NjM1MjcxN2VjN2EzYzJjNmYxMTQ4ZTU1NWQyNTk5
11
- ZDljZTc1MTQ0ODY4NzhmMjQyYjYxNTVmYTVhY2M0OTA2OGM0MDU=
9
+ ZDY3NmUwYzI2YmIwMDE4ZDRlYzlkYmJiYWQ0Y2E3OTIwN2Y0MjNlY2MxZTYy
10
+ ZDg2ZTdmZWFjOTE4NTUwZjg2ZDYwNDdkYjhkMzY4ZTY5ZGExOTE1Yzk5YmUw
11
+ MTI0ODMxNjNiMzE3MjNkYjU2OTE5NWIwZDFlNzUxMDgzOWQ4ZDc=
12
12
  data.tar.gz: !binary |-
13
- OGY4Zjg5OGU3Mzc1MGZlODg1YzQzODE0NTQ3Y2FhMGQ1ODU1YTQwODhhY2Nk
14
- ODVmOWM3ZGM5MDYyNTM2YTkzMDA5ZDhlYTE3YzQ1Y2IzNmMwM2ZjYTliNmJl
15
- NTkwZmFlYTI5ZjNlODUyM2FkODc0ZTVhNzUxMjk4YTBkN2YyMjE=
13
+ YjRjYWJlMTY3ZGNmNTc4Y2EyM2QwODk4ZjNkYWVkZDUxMmM3Yjc1MGU0YTFk
14
+ ODYyY2ZlNzQwNDkzMDcwZWYxZGRjZGUxNzRmYWU0MzI5NjFmMTE2MDY1Zjky
15
+ MDZhNWFlYWY2ZWVjNzU4Y2NlZTA2ZmFjMDRmMzZjZTExZDU0OGU=
data/.rubocop.yml CHANGED
@@ -1,6 +1,7 @@
1
1
  AllCops:
2
2
  Exclude:
3
3
  - vendor/bundle/**/*
4
+ - .bundle/**/*
4
5
 
5
6
  inherit_from: .rubocop_todo.yml
6
7
 
data/.rubocop_todo.yml CHANGED
@@ -1,202 +1,57 @@
1
1
  # This configuration was generated by `rubocop --auto-gen-config`
2
- # on 2014-12-09 17:12:22 +0000 using RuboCop version 0.27.1.
2
+ # on 2015-04-12 19:24:55 +0200 using RuboCop version 0.30.0.
3
3
  # The point is for the user to remove these configuration records
4
4
  # one by one as the offenses are removed from the code base.
5
5
  # Note that changes in the inspected code, or installation of new
6
6
  # versions of RuboCop, may require this file to be generated again.
7
7
 
8
- # Offense count: 22
9
- Lint/AmbiguousRegexpLiteral:
10
- Enabled: false
11
-
12
- # Offense count: 8
13
- # Cop supports --auto-correct.
14
- Lint/DeprecatedClassMethods:
15
- Enabled: false
16
-
17
- # Offense count: 2
18
- # Cop supports --auto-correct.
19
- Lint/StringConversionInInterpolation:
20
- Enabled: false
21
-
22
- # Offense count: 1
23
- # Cop supports --auto-correct.
24
- Lint/UnusedMethodArgument:
25
- Enabled: false
26
-
27
- # Offense count: 1
28
- Lint/UselessAccessModifier:
29
- Enabled: false
30
-
31
- # Offense count: 2
32
- Lint/UselessAssignment:
33
- Enabled: false
34
-
35
8
  # Offense count: 23
36
9
  Metrics/AbcSize:
37
- Max: 59
10
+ Max: 38
38
11
 
39
12
  # Offense count: 2
40
13
  # Configuration parameters: CountComments.
41
14
  Metrics/ClassLength:
42
- Max: 184
15
+ Max: 127
43
16
 
44
- # Offense count: 6
17
+ # Offense count: 5
45
18
  Metrics/CyclomaticComplexity:
46
- Max: 10
19
+ Max: 9
47
20
 
48
- # Offense count: 101
21
+ # Offense count: 92
49
22
  # Configuration parameters: AllowURI, URISchemes.
50
23
  Metrics/LineLength:
51
24
  Max: 157
52
25
 
53
- # Offense count: 26
26
+ # Offense count: 24
54
27
  # Configuration parameters: CountComments.
55
28
  Metrics/MethodLength:
56
- Max: 32
29
+ Max: 31
57
30
 
58
- # Offense count: 5
31
+ # Offense count: 4
59
32
  Metrics/PerceivedComplexity:
60
33
  Max: 11
61
34
 
62
- # Offense count: 3
63
- # Cop supports --auto-correct.
64
- # Configuration parameters: EnforcedStyle, SupportedStyles.
65
- Style/BarePercentLiterals:
66
- Enabled: false
67
-
68
- # Offense count: 1
69
- Style/CaseEquality:
70
- Enabled: false
71
-
72
- # Offense count: 1
73
- # Configuration parameters: IndentWhenRelativeTo, SupportedStyles, IndentOneStep.
74
- Style/CaseIndentation:
75
- Enabled: false
76
-
77
- # Offense count: 25
78
- Style/Documentation:
79
- Enabled: false
80
-
81
- # Offense count: 1
82
- Style/DoubleNegation:
83
- Enabled: false
84
-
85
35
  # Offense count: 1
86
36
  # Cop supports --auto-correct.
87
- Style/EmptyLines:
88
- Enabled: false
89
-
90
- # Offense count: 1
91
- # Configuration parameters: EnforcedStyle, SupportedStyles.
92
- Style/FormatString:
93
- Enabled: false
94
-
95
- # Offense count: 4
96
- # Configuration parameters: AllowedVariables.
97
- Style/GlobalVars:
98
- Enabled: false
99
-
100
- # Offense count: 10
101
- # Configuration parameters: MinBodyLength.
102
- Style/GuardClause:
37
+ Performance/Sample:
103
38
  Enabled: false
104
39
 
105
40
  # Offense count: 12
106
- # Configuration parameters: MaxLineLength.
107
- Style/IfUnlessModifier:
108
- Enabled: false
109
-
110
- # Offense count: 1
111
41
  # Cop supports --auto-correct.
112
42
  # Configuration parameters: EnforcedStyle, SupportedStyles.
113
- Style/IndentHash:
114
- Enabled: true
115
-
116
- # Offense count: 13
117
- # Cop supports --auto-correct.
118
- Style/LeadingCommentSpace:
119
- Enabled: false
120
-
121
- # Offense count: 7
122
- # Cop supports --auto-correct.
123
- Style/NegatedIf:
124
- Enabled: false
125
-
126
- # Offense count: 7
127
- # Cop supports --auto-correct.
128
- Style/Not:
129
- Enabled: false
130
-
131
- # Offense count: 1
132
- Style/OneLineConditional:
133
- Enabled: false
134
-
135
- # Offense count: 79
136
- # Cop supports --auto-correct.
137
- # Configuration parameters: PreferredDelimiters.
138
- Style/PercentLiteralDelimiters:
139
- Enabled: false
140
-
141
- # Offense count: 3
142
- # Cop supports --auto-correct.
143
- Style/Proc:
144
- Enabled: false
145
-
146
- # Offense count: 1
147
- # Cop supports --auto-correct.
148
- Style/RedundantBegin:
149
- Enabled: false
150
-
151
- # Offense count: 76
152
- # Cop supports --auto-correct.
153
- Style/RedundantSelf:
154
- Enabled: false
155
-
156
- # Offense count: 1
157
- Style/RegexpLiteral:
158
- MaxSlashes: 2
159
-
160
- # Offense count: 1
161
- # Cop supports --auto-correct.
162
- Style/SingleSpaceBeforeFirstArg:
163
- Enabled: false
164
-
165
- # Offense count: 2
166
- # Cop supports --auto-correct.
167
- Style/SpaceAfterComma:
43
+ Style/BarePercentLiterals:
168
44
  Enabled: false
169
45
 
170
46
  # Offense count: 1
171
- # Cop supports --auto-correct.
172
- # Configuration parameters: EnforcedStyle, SupportedStyles.
173
- Style/SpaceBeforeBlockBraces:
174
- Enabled: false
175
-
176
- # Offense count: 5
177
- # Cop supports --auto-correct.
178
- Style/SpaceInsideParens:
47
+ Style/CaseEquality:
179
48
  Enabled: false
180
49
 
181
50
  # Offense count: 1
182
- # Cop supports --auto-correct.
183
- Style/SpecialGlobalVars:
184
- Enabled: false
185
-
186
- # Offense count: 15
187
- # Cop supports --auto-correct.
188
- # Configuration parameters: EnforcedStyle, SupportedStyles.
189
- Style/StringLiterals:
51
+ # Configuration parameters: IndentWhenRelativeTo, SupportedStyles, IndentOneStep.
52
+ Style/CaseIndentation:
190
53
  Enabled: false
191
54
 
192
- # Offense count: 1
193
- # Cop supports --auto-correct.
194
- # Configuration parameters: EnforcedStyle, SupportedStyles.
195
- Style/StringLiteralsInInterpolation:
55
+ # Offense count: 28
56
+ Style/Documentation:
196
57
  Enabled: false
197
-
198
- # Offense count: 4
199
- # Cop supports --auto-correct.
200
- # Configuration parameters: WordRegex.
201
- Style/WordArray:
202
- MinSize: 3
data/.travis.yml CHANGED
@@ -1,16 +1,21 @@
1
+ sudo: false
1
2
  language: ruby
3
+ cache: bundler
2
4
  rvm:
3
5
  - 1.8.7
4
6
  - 1.9.2
5
7
  - 1.9.3
6
8
  - 2.0.0
7
9
  - 2.1.5
8
- - 2.2.0
10
+ - 2.2.2
9
11
  - ruby-head
10
12
 
11
13
  before_install:
12
- - sudo apt-get update -qq
13
- - sudo apt-get install -qq -y mplayer ffmpeg
14
+ # stub mplayer/ffmpeg so it looks like they are installed
15
+ - mkdir ~/bin
16
+ - touch ~/bin/mplayer ~/bin/ffmpeg
17
+ - chmod +x ~/bin/mplayer ~/bin/ffmpeg
18
+ - export PATH=~/bin:$PATH
14
19
 
15
20
  matrix:
16
21
  allow_failures:
@@ -21,7 +26,9 @@ branches:
21
26
  - gh-pages
22
27
 
23
28
  notifications:
24
- irc: "chat.freenode.net#lolcommits"
29
+ irc: chat.freenode.net#lolcommits
30
+ slack:
31
+ secure: BkGsQOYMJqW55j94S1QwmR17BkwuTIULKVhwzRdnv37BvVcC17y9KLMo8NH+bcao36XZx9DukXcTyaDQc6tCSlFEbG/FcPUJM8bx9EWjHUoGVg1KdpVu/nVHu+GKosrB41lM3nfJWCnF0TOSnmTXU+bV8Pwkij+L5X+gNyAT2Ns=
25
32
 
26
33
  deploy:
27
34
  provider: rubygems
data/CHANGELOG CHANGED
@@ -1,6 +1,17 @@
1
1
  0.6.0 (WIP)
2
2
  * extract plugins to seperate gems ...
3
3
 
4
+ 0.5.8 (22 April 2015)
5
+ * Fix Windows MiniMagick issue (@matthutchinson #276)
6
+ * Rubocop code clean ups (@nysthee #272)
7
+ * Fix gem issues on earlier Ruby versions (#270)
8
+ * CLI refactoring/cleanups (@mroth #254 #258 #266 #267 #266)
9
+ * Exit with -1 for bad CLI args (@williamboman #263)
10
+ * Move unit tests to MiniTest (@mroth #256)
11
+ * Add branch name to git info (@salzig #252)
12
+ * lol_protonet plugin added (@salzig #251)
13
+ * Allow local plugins in $LOLCOMMITS_DIR/.plugins (@salzig #250)
14
+
4
15
  0.5.7 (28 December 2014)
5
16
  * Uploldz plugin sends more post params (@clops #224 @matthutchinson #241)
6
17
  * More configurable twitter plugin (@woodrowbarlow #207 @matthutchinson)
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source "http://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in lolcommits.gemspec
3
+ # Specify gem dependencies in lolcommits.gemspec
4
4
  gemspec
data/Rakefile CHANGED
@@ -28,7 +28,7 @@ end
28
28
  Rake::Task[:build].prerequisites.unshift :fix_permissions
29
29
 
30
30
  Rake::TestTask.new do |t|
31
- t.pattern = 'test/test_*.rb'
31
+ t.pattern = 'test/*_test.rb'
32
32
  end
33
33
 
34
34
  Rake::FileUtilsExt.verbose(false)
@@ -36,15 +36,15 @@ CUKE_RESULTS = 'results.html'
36
36
  CLEAN << CUKE_RESULTS
37
37
  Cucumber::Rake::Task.new(:features) do |t|
38
38
  optstr = "features --format html -o #{CUKE_RESULTS} --format Fivemat -x"
39
- optstr << " --tags @#{ENV["tag"]}" unless ENV["tag"].nil?
40
- optstr << " --tags ~@unstable" if ENV["tag"].nil? #ignore unstable tests unless specifying something at CLI
39
+ optstr << " --tags @#{ENV['tag']}" unless ENV['tag'].nil?
40
+ optstr << ' --tags ~@unstable' if ENV['tag'].nil? # ignore unstable tests unless specifying something at CLI
41
41
  t.cucumber_opts = optstr
42
42
  t.fork = false
43
43
  end
44
44
 
45
45
  Rake::RDocTask.new do |rd|
46
- rd.main = "README.rdoc"
47
- rd.rdoc_files.include("README.rdoc","lib/**/*.rb","bin/**/*")
46
+ rd.main = 'README.rdoc'
47
+ rd.rdoc_files.include('README.rdoc', 'lib/**/*.rb', 'bin/**/*')
48
48
  end
49
49
 
50
50
  # only run rubocop on platforms where it is supported, sigh
@@ -56,32 +56,24 @@ else
56
56
  task :default => [:test, :features]
57
57
  end
58
58
 
59
-
60
- desc "Migrate an existing local .lolcommits directory to Dropbox"
59
+ desc 'Migrate an existing local .lolcommits directory to Dropbox'
61
60
  task :dropboxify do
62
- $home = ENV['HOME']
63
- dropbox_loldir = "#{$home}/Dropbox/lolcommits"
64
- loldir = "#{$home}/.lolcommits"
65
- backup_loldir = "#{$home}/.lolcommits.old"
66
-
67
- #check whether we've done this already
68
- if File.symlink? loldir
69
- abort "already dropboxified!"
70
- end
71
-
72
- #create dropbox folder
73
- if not File.directory? dropbox_loldir
74
- FileUtils.mkdir_p dropbox_loldir
75
- end
76
-
77
- #backup existing loldir
78
- if File.directory? loldir
79
- FileUtils.mv( loldir, backup_loldir )
80
- end
81
-
82
- #symlink dropbox to local
83
- FileUtils.ln_s( dropbox_loldir, loldir )
84
-
85
- #copy over existing files
86
- FileUtils.cp_r( "#{backup_loldir}/.", loldir)
61
+ dropbox_loldir = "#{ENV['HOME']}/Dropbox/lolcommits"
62
+ loldir = "#{ENV['HOME']}/.lolcommits"
63
+ backup_loldir = "#{ENV['HOME']}/.lolcommits.old"
64
+
65
+ # check whether we've done this already
66
+ abort 'already dropboxified!' if File.symlink? loldir
67
+
68
+ # create dropbox folder
69
+ FileUtils.mkdir_p dropbox_loldir unless File.directory? dropbox_loldir
70
+
71
+ # backup existing loldir
72
+ FileUtils.mv(loldir, backup_loldir) if File.directory? loldir
73
+
74
+ # symlink dropbox to local
75
+ FileUtils.ln_s(dropbox_loldir, loldir)
76
+
77
+ # copy over existing files
78
+ FileUtils.cp_r("#{backup_loldir}/.", loldir)
87
79
  end