lolcommits 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'coveralls'
2
3
  Coveralls.wear!
3
4
 
@@ -11,60 +12,63 @@ require 'lolcommits'
11
12
  include Lolcommits
12
13
 
13
14
  class LolTest < Test::Unit::TestCase
14
- def test_can_parse_git
15
- assert_nothing_raised do
16
- gi = GitInfo.new
17
- assert_not_nil gi.message
18
- assert_not_nil gi.sha
19
- end
15
+ def test_can_parse_git
16
+ assert_nothing_raised do
17
+ gi = GitInfo.new
18
+ assert_not_nil gi.message
19
+ assert_not_nil gi.sha
20
20
  end
21
+ end
21
22
 
22
- #
23
- # issue #57, https://github.com/mroth/lolcommits/issues/57
24
- #
25
- def test_tranzlate
26
- [["what the hell","(WH|W)UT TEH HELL"],["seriously wtf", "SRSLEH WTF"]].each do |normal, lol|
27
- tranzlated = Lolcommits::Tranzlate.tranzlate(normal)
28
- assert_match /^#{lol}/, tranzlated
29
- end
23
+ #
24
+ # issue #57, https://github.com/mroth/lolcommits/issues/57
25
+ #
26
+ def test_tranzlate
27
+ [['what the hell', '(WH|W)UT TEH HELL'], ['seriously wtf', 'SRSLEH WTF']].each do |normal, lol|
28
+ tranzlated = Lolcommits::Tranzlate.tranzlate(normal)
29
+ assert_match /^#{lol}/, tranzlated
30
30
  end
31
+ end
31
32
 
32
- #
33
- # issue #136, https://github.com/mroth/lolcommits/issues/136
34
- def test_lol_twitter_build_tweet
35
- long_commit_message = %q{I wanna run, I want to hide, I want to tear down
33
+ #
34
+ # issue #136, https://github.com/mroth/lolcommits/issues/136
35
+ def test_lol_twitter_build_tweet
36
+ long_commit_message = %q{I wanna run, I want to hide, I want to tear down
36
37
  the walls that hold me inside. I want to reach out, and touch the flame...
37
38
  Where the streets have no name.. ah ah ah.. I want to feel sunlight on my
38
39
  face... I see the dust clouds disappear, without a trace... I want to take
39
40
  shelter... from the poison rain... where the streets have no name... oahhhhh
40
41
  where the streets have no name... where the streets have no name }.gsub("\n", ' ')
41
42
 
42
- plugin = Lolcommits::LolTwitter.new(nil)
43
- Lolcommits::LolTwitter.send(:define_method, :max_tweet_size, Proc.new { 116 })
44
- assert_match 'I wanna run, I want to hide, I want to tear down the walls that hold me inside. I want to reach out, a... #lolcommits', plugin.build_tweet(long_commit_message)
45
- end
43
+ plugin = Lolcommits::LolTwitter.new(nil)
44
+ Lolcommits::LolTwitter.send(:define_method, :max_tweet_size, Proc.new { 116 })
45
+ assert_match 'I wanna run, I want to hide, I want to tear down the walls that hold me inside. I want to reach out, a... #lolcommits', plugin.build_tweet(long_commit_message)
46
+ end
46
47
 
47
- #
48
- # issue #53, https://github.com/mroth/lolcommits/issues/53
49
- # this will test the permissions but only locally, important before building a gem package!
50
- #
51
- def test_permissions
52
- impact_perms = File.lstat(File.join(Configuration::LOLCOMMITS_ROOT, "vendor", "fonts", "Impact.ttf")).mode & 0777
53
- imagesnap_perms = File.lstat(File.join(Configuration::LOLCOMMITS_ROOT, "vendor", "ext", "imagesnap", "imagesnap")).mode & 0777
54
- videosnap_perms = File.lstat(File.join(Configuration::LOLCOMMITS_ROOT, "vendor", "ext", "videosnap", "videosnap")).mode & 0777
55
- assert impact_perms == 0644 || impact_perms == 0664,
56
- "expected perms of 644/664 but instead got #{sprintf '%o', impact_perms}"
57
- assert imagesnap_perms == 0755 || imagesnap_perms == 0775,
58
- "expected perms of 755/775 but instead got #{sprintf '%o', imagesnap_perms}"
59
- assert videosnap_perms == 0755 || videosnap_perms == 0775,
60
- "expected perms of 755/775 but instead got #{sprintf '%o', videosnap_perms}"
61
- end
48
+ #
49
+ # issue #53, https://github.com/mroth/lolcommits/issues/53
50
+ # this will test the permissions but only locally, important before building a gem package!
51
+ #
52
+ def test_permissions
53
+ impact_perms = File.lstat(File.join(Configuration::LOLCOMMITS_ROOT, 'vendor', 'fonts', 'Impact.ttf')).mode & 0777
54
+ imagesnap_perms = File.lstat(File.join(Configuration::LOLCOMMITS_ROOT, 'vendor', 'ext', 'imagesnap', 'imagesnap')).mode & 0777
55
+ videosnap_perms = File.lstat(File.join(Configuration::LOLCOMMITS_ROOT, 'vendor', 'ext', 'videosnap', 'videosnap')).mode & 0777
56
+ commandcam_perms = File.lstat(File.join(Configuration::LOLCOMMITS_ROOT, 'vendor', 'ext', 'CommandCam', 'CommandCam.exe')).mode & 0777
62
57
 
63
- # Hmm.. webcam capture breaks travis-ci tests
64
- #def test_can_capture
65
- # assert_nothing_raised do
66
- # Lolcommits.capture(0,true,'test commit message','test-sha-001')
67
- # end
68
- #end
58
+ assert impact_perms == 0644 || impact_perms == 0664,
59
+ "expected perms of 644/664 but instead got #{sprintf '%o', impact_perms}"
60
+ assert imagesnap_perms == 0755 || imagesnap_perms == 0775,
61
+ "expected perms of 755/775 but instead got #{sprintf '%o', imagesnap_perms}"
62
+ assert videosnap_perms == 0755 || videosnap_perms == 0775,
63
+ "expected perms of 755/775 but instead got #{sprintf '%o', videosnap_perms}"
64
+ assert commandcam_perms == 0755 || commandcam_perms == 0775,
65
+ "expected perms of 755/775 but instead got #{sprintf '%o', commandcam_perms}"
66
+ end
69
67
 
68
+ # Hmm.. webcam capture breaks travis-ci tests
69
+ # def test_can_capture
70
+ # assert_nothing_raised do
71
+ # Lolcommits.capture(0,true,'test commit message','test-sha-001')
72
+ # end
73
+ # end
70
74
  end
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lolcommits
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Rothenberg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-06 00:00:00.000000000 Z
11
+ date: 2014-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mini_magick
@@ -112,14 +112,14 @@ dependencies:
112
112
  name: rdoc
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - '>='
115
+ - - ! '>='
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - '>='
122
+ - - ! '>='
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
@@ -154,58 +154,86 @@ dependencies:
154
154
  name: fivemat
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - '>='
157
+ - - ! '>='
158
158
  - !ruby/object:Gem::Version
159
159
  version: '0'
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - '>='
164
+ - - ! '>='
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: faker
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - '>='
171
+ - - ! '>='
172
172
  - !ruby/object:Gem::Version
173
173
  version: '0'
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - '>='
178
+ - - ! '>='
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: travis
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - '>='
185
+ - - ! '>='
186
186
  - !ruby/object:Gem::Version
187
187
  version: '0'
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - '>='
192
+ - - ! '>='
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: coveralls
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
- - - '>='
199
+ - - ! '>='
200
200
  - !ruby/object:Gem::Version
201
201
  version: '0'
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
- - - '>='
206
+ - - ! '>='
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0'
209
+ - !ruby/object:Gem::Dependency
210
+ name: magic_encoding
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - ! '>='
214
+ - !ruby/object:Gem::Version
215
+ version: '0'
216
+ type: :development
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - ! '>='
221
+ - !ruby/object:Gem::Version
222
+ version: '0'
223
+ - !ruby/object:Gem::Dependency
224
+ name: rubocop
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - ~>
228
+ - !ruby/object:Gem::Version
229
+ version: 0.18.1
230
+ type: :development
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - ~>
235
+ - !ruby/object:Gem::Version
236
+ version: 0.18.1
209
237
  - !ruby/object:Gem::Dependency
210
238
  name: twitter
211
239
  requirement: !ruby/object:Gem::Requirement
@@ -224,42 +252,42 @@ dependencies:
224
252
  name: oauth
225
253
  requirement: !ruby/object:Gem::Requirement
226
254
  requirements:
227
- - - '>='
255
+ - - ! '>='
228
256
  - !ruby/object:Gem::Version
229
257
  version: '0'
230
258
  type: :runtime
231
259
  prerelease: false
232
260
  version_requirements: !ruby/object:Gem::Requirement
233
261
  requirements:
234
- - - '>='
262
+ - - ! '>='
235
263
  - !ruby/object:Gem::Version
236
264
  version: '0'
237
265
  - !ruby/object:Gem::Dependency
238
266
  name: rest-client
239
267
  requirement: !ruby/object:Gem::Requirement
240
268
  requirements:
241
- - - '>='
269
+ - - ! '>='
242
270
  - !ruby/object:Gem::Version
243
271
  version: '0'
244
272
  type: :runtime
245
273
  prerelease: false
246
274
  version_requirements: !ruby/object:Gem::Requirement
247
275
  requirements:
248
- - - '>='
276
+ - - ! '>='
249
277
  - !ruby/object:Gem::Version
250
278
  version: '0'
251
279
  - !ruby/object:Gem::Dependency
252
280
  name: httmultiparty
253
281
  requirement: !ruby/object:Gem::Requirement
254
282
  requirements:
255
- - - '>='
283
+ - - ! '>='
256
284
  - !ruby/object:Gem::Version
257
285
  version: '0'
258
286
  type: :runtime
259
287
  prerelease: false
260
288
  version_requirements: !ruby/object:Gem::Requirement
261
289
  requirements:
262
- - - '>='
290
+ - - ! '>='
263
291
  - !ruby/object:Gem::Version
264
292
  version: '0'
265
293
  - !ruby/object:Gem::Dependency
@@ -314,7 +342,10 @@ extensions: []
314
342
  extra_rdoc_files: []
315
343
  files:
316
344
  - .coveralls.yml
345
+ - .editorconfig
346
+ - .gitattributes
317
347
  - .gitignore
348
+ - .rubocop.yml
318
349
  - .travis.yml
319
350
  - CHANGELOG
320
351
  - CONTRIBUTING
@@ -342,6 +373,7 @@ files:
342
373
  - lib/lolcommits/capturer.rb
343
374
  - lib/lolcommits/configuration.rb
344
375
  - lib/lolcommits/git_info.rb
376
+ - lib/lolcommits/installation.rb
345
377
  - lib/lolcommits/plugin.rb
346
378
  - lib/lolcommits/plugins/dot_com.rb
347
379
  - lib/lolcommits/plugins/lol_twitter.rb
@@ -352,6 +384,7 @@ files:
352
384
  - lib/lolcommits/runner.rb
353
385
  - lib/lolcommits/version.rb
354
386
  - lolcommits.gemspec
387
+ - rubocop-todo.yml
355
388
  - test/images/test_image.jpg
356
389
  - test/test_lolcommits.rb
357
390
  - vendor/ext/CommandCam/COPYING
@@ -371,26 +404,18 @@ require_paths:
371
404
  - lib
372
405
  required_ruby_version: !ruby/object:Gem::Requirement
373
406
  requirements:
374
- - - '>='
407
+ - - ! '>='
375
408
  - !ruby/object:Gem::Version
376
409
  version: '0'
377
410
  required_rubygems_version: !ruby/object:Gem::Requirement
378
411
  requirements:
379
- - - '>='
412
+ - - ! '>='
380
413
  - !ruby/object:Gem::Version
381
414
  version: '0'
382
415
  requirements: []
383
416
  rubyforge_project: lolcommits
384
- rubygems_version: 2.0.14
417
+ rubygems_version: 2.2.2
385
418
  signing_key:
386
419
  specification_version: 4
387
420
  summary: Capture webcam image on git commit for lulz.
388
- test_files:
389
- - features/bugs.feature
390
- - features/lolcommits.feature
391
- - features/plugins.feature
392
- - features/step_definitions/lolcommits_steps.rb
393
- - features/support/env.rb
394
- - features/support/path_helpers.rb
395
- - test/images/test_image.jpg
396
- - test/test_lolcommits.rb
421
+ test_files: []