lolcommits 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ 0.1.5 (25 June 2012)
2
+ * fix tranzlate on ruby1.8
3
+
1
4
  0.1.4 (28 May 2012)
2
5
  * set device on mac via --device (or LOLCOMMITS_DEVICE env variable) --
3
6
  thanks @pioz (pull #51)
@@ -1,3 +1,3 @@
1
1
  module Lolcommits
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
@@ -82,7 +82,7 @@ module Lolspeak
82
82
  def self.tranzlate(str)
83
83
  lolstr = str.dup
84
84
  LOL_DICTIONARY.each do |english, lolspeak|
85
- lolstr.gsub!(english, lolspeak.sample)
85
+ lolstr.gsub!(english, lolspeak.shuffle.first) #ghetto ruby1.8/1.9 agnostic version of choice vs sample
86
86
  end
87
87
 
88
88
  lolstr << '! kthxbye!' if rand(10) == 2
@@ -14,6 +14,13 @@ class LolTest < Test::Unit::TestCase
14
14
  end
15
15
  end
16
16
 
17
+ def test_tranzlate
18
+ [["what the hell","(WH|W)UT TEH HELL"],["seriously wtf", "SRSLEH WTF"]].each do |normal, lol|
19
+ tranzlated = normal.tranzlate
20
+ assert_match /^#{lol}/, tranzlated
21
+ end
22
+ end
23
+
17
24
  # Hmm.. webcam capture breaks travis-ci tests
18
25
  #def test_can_capture
19
26
  # assert_nothing_raised do
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.1.4
4
+ version: 0.1.5
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: 2012-05-28 00:00:00.000000000 Z
12
+ date: 2012-06-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake