comradefy 0.0.1 → 0.0.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.
Files changed (3) hide show
  1. data/README.markdown +1 -0
  2. data/lib/comradefy.rb +5 -2
  3. metadata +6 -3
@@ -0,0 +1 @@
1
+ ☭ gэm iпsтall comгadэfy ☭
@@ -3,13 +3,16 @@ ENCODING = 'UTF-8'
3
3
  module Comradefy
4
4
  def self.swap_map
5
5
  { 'E' => 'Ǝ', 'e' => 'э', 'p' => 'р', 'P' => 'Р', 'b' => 'Ь', 't' => 'т', 'T' => 'Т', 'r' => 'г', 'm' => 'м',
6
- 'M' => 'M', 'N' => 'И', 'y' => 'у', 'Y' => 'У', 'H' => 'Н', 'h' => 'н', 'n' => 'п', 'k' => 'ʞ', 'U' => 'Ц', 'u' => 'ц'}
6
+ 'M' => 'M', 'N' => 'И', 'y' => 'у', 'Y' => 'У', 'H' => 'Н', 'h' => 'н', 'n' => 'п', 'U' => 'Ц', 'u' => 'ц'}
7
7
  end
8
8
  def self.report(text)
9
9
  changed_text = text.each_char.inject("") do |acc,char|
10
- acc + (self.swap_map[char] || char)
10
+ acc + self.random_swap(char)
11
11
  end
12
12
  '☭ ' + changed_text + ' ☭'
13
13
  end
14
14
 
15
+ def self.random_swap(char)
16
+ (self.swap_map[char] && rand(2).even?) ? self.swap_map[char] : char
17
+ end
15
18
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 1
9
- version: 0.0.1
8
+ - 2
9
+ version: 0.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - tjbladez
@@ -36,7 +36,10 @@ has_rdoc: true
36
36
  homepage: http://github.com/tjbladez/comradefy
37
37
  licenses: []
38
38
 
39
- post_install_message: "Gr\xD1\x8D\xD1\x8Dtings COMRAD\xC6\x8E"
39
+ post_install_message: !binary |
40
+ SdC/IHNvdmnRjdGCIHLRhnNzaWEg0YLQvdGNIHdvcmRzIHdyadGC0Y0g0YNv
41
+ 0YY=
42
+
40
43
  rdoc_options: []
41
44
 
42
45
  require_paths: