comradefy 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.markdown +0 -0
  2. data/bin/comradefy +10 -0
  3. data/lib/comradefy.rb +15 -0
  4. metadata +69 -0
File without changes
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems'
4
+ require 'comradefy'
5
+
6
+ if ARGV[0]
7
+ puts Comradefy.report ARGV.join(' ')
8
+ else
9
+ puts Comradefy.report STDIN.read
10
+ end
@@ -0,0 +1,15 @@
1
+ ENCODING = 'UTF-8'
2
+
3
+ module Comradefy
4
+ def self.swap_map
5
+ { 'E' => 'Ǝ', 'e' => 'э', 'p' => 'р', 'P' => 'Р', 'b' => 'Ь', 't' => 'т', 'T' => 'Т', 'r' => 'г', 'm' => 'м',
6
+ 'M' => 'M', 'N' => 'И', 'y' => 'у', 'Y' => 'У', 'H' => 'Н', 'h' => 'н', 'n' => 'п', 'k' => 'ʞ', 'U' => 'Ц', 'u' => 'ц'}
7
+ end
8
+ def self.report(text)
9
+ changed_text = text.each_char.inject("") do |acc,char|
10
+ acc + (self.swap_map[char] || char)
11
+ end
12
+ '☭ ' + changed_text + ' ☭'
13
+ end
14
+
15
+ end
metadata ADDED
@@ -0,0 +1,69 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: comradefy
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 1
9
+ version: 0.0.1
10
+ platform: ruby
11
+ authors:
12
+ - tjbladez
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2010-07-29 00:00:00 -05:00
18
+ default_executable: bin/comradefy
19
+ dependencies: []
20
+
21
+ description: !binary |
22
+ V2HRgmPQvSDRg2/RhnIgbGHQv2fRhmFn0Y0sIGNvbXJhZNGN
23
+
24
+ email: tjbladez@gmail.com
25
+ executables:
26
+ - comradefy
27
+ extensions: []
28
+
29
+ extra_rdoc_files: []
30
+
31
+ files:
32
+ - bin/comradefy
33
+ - lib/comradefy.rb
34
+ - README.markdown
35
+ has_rdoc: true
36
+ homepage: http://github.com/tjbladez/comradefy
37
+ licenses: []
38
+
39
+ post_install_message: "Gr\xD1\x8D\xD1\x8Dtings COMRAD\xC6\x8E"
40
+ rdoc_options: []
41
+
42
+ require_paths:
43
+ - lib
44
+ required_ruby_version: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ segments:
49
+ - 0
50
+ version: "0"
51
+ required_rubygems_version: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ segments:
56
+ - 0
57
+ version: "0"
58
+ requirements: []
59
+
60
+ rubyforge_project:
61
+ rubygems_version: 1.3.6
62
+ signing_key:
63
+ specification_version: 3
64
+ summary: !binary |
65
+ SdC/IHNvdmnRjdGCIHLRhnNzaWEg0YLQvdGNIHdvcmRzIHdyadGC0Y0g0YNv
66
+ 0YY=
67
+
68
+ test_files: []
69
+