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 +3 -0
- data/lib/lolcommits/version.rb +1 -1
- data/lib/tranzlate/lolspeak.rb +1 -1
- data/test/test_lolcommits.rb +7 -0
- metadata +2 -2
data/CHANGELOG
CHANGED
data/lib/lolcommits/version.rb
CHANGED
data/lib/tranzlate/lolspeak.rb
CHANGED
@@ -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
|
data/test/test_lolcommits.rb
CHANGED
@@ -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
|
+
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-
|
12
|
+
date: 2012-06-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|