Pirateme 0.1.5 → 0.1.6
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.
- checksums.yaml +4 -4
- data/README.md +4 -5
- data/lib/Pirateme.rb +142 -11
- data/lib/Pirateme/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02d15a33e85d8608ecae92d0d47324b0539f1a9b
|
4
|
+
data.tar.gz: a133bc60c540868cd0c8244990cd36d398df4678
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e4f167bd07dc9dbee8135e369dbcf5b2e073b0454e9bb4f28ad799feeba8835bf4154ebf9c3a63fe4b93af55bb2824eea1941e40d1c8dc0a22f58a124c8b3d3
|
7
|
+
data.tar.gz: 910fff5ad945a81e71e38c1deeea011801c5ae0c16c2a8c3cd556718df796cf2fe970936650c5d1f006fcd424488815d7ab25c8985edd69124e8cf2cf902a102
|
data/README.md
CHANGED
@@ -30,6 +30,10 @@ Pirateme.hello
|
|
30
30
|
|
31
31
|
"Welcome to the coolest pirate gem!"
|
32
32
|
|
33
|
+
eg.
|
34
|
+
Pirateme.translate("Hello there!")
|
35
|
+
|
36
|
+
"Ahoy there!"
|
33
37
|
|
34
38
|
Pirateme::Fake.captian
|
35
39
|
|
@@ -47,11 +51,6 @@ Pirateme::Fake.joke
|
|
47
51
|
|
48
52
|
Return a joke by random.
|
49
53
|
|
50
|
-
##This function isn't currently working at the moment. Please check back when it is completed
|
51
|
-
eg.
|
52
|
-
Pirateme.translate("Hello there!")
|
53
|
-
|
54
|
-
"Ahoy there!"
|
55
54
|
|
56
55
|
|
57
56
|
|
data/lib/Pirateme.rb
CHANGED
@@ -6,18 +6,149 @@ module Pirateme
|
|
6
6
|
"Welcome to the coolest pirate gem!"
|
7
7
|
end
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
def self.translate(arg)
|
10
|
+
if arg.is_a?(String)
|
11
|
+
piratize(arg)
|
12
|
+
else
|
13
|
+
"Need a string matey!"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.piratize(arg)
|
18
|
+
|
19
|
+
# translator library
|
20
|
+
translator = {
|
21
|
+
"address" => "port o' call",
|
22
|
+
"admin" => "helm",
|
23
|
+
"am" => "be",
|
24
|
+
"an" => "a",
|
25
|
+
"and" => "n'",
|
26
|
+
"are" => "be",
|
27
|
+
"award" => "prize",
|
28
|
+
"beer" => "grog",
|
29
|
+
"before" => "afore",
|
30
|
+
"belief" => "creed",
|
31
|
+
"between" => "betwixt",
|
32
|
+
"big" => "vast",
|
33
|
+
"boy" => "lad",
|
34
|
+
"boss" => "admiral",
|
35
|
+
"bourbon" => "rum",
|
36
|
+
"box" => "barrel",
|
37
|
+
"bring" => "bring",
|
38
|
+
"business" => "company",
|
39
|
+
"businesses" => "companies",
|
40
|
+
"calling" => "callin'",
|
41
|
+
"canada" => "Great North",
|
42
|
+
"cash" => "doubloons",
|
43
|
+
"cheat" => "hornswaggle",
|
44
|
+
"comments" => "yer words",
|
45
|
+
"country" => "land",
|
46
|
+
"dashboard" => "shanty",
|
47
|
+
"disconnect" => "keelhaul",
|
48
|
+
"do" => "d'",
|
49
|
+
"dollar" => "doubloon",
|
50
|
+
"dude" => "pirate",
|
51
|
+
"employee" => "crew",
|
52
|
+
"everyone" => "all hands",
|
53
|
+
"eye" => "eye-patch",
|
54
|
+
"family" => "kin",
|
55
|
+
"fee" => "debt",
|
56
|
+
"female" => "wench",
|
57
|
+
"for" => "fer",
|
58
|
+
"friend" => "shipmate",
|
59
|
+
"gin" => "rum",
|
60
|
+
"girl" => "lass",
|
61
|
+
"girls" => "lassies",
|
62
|
+
"go" => "sail",
|
63
|
+
"good" => "jolly good",
|
64
|
+
"group" => "maties",
|
65
|
+
"hand" => "hook",
|
66
|
+
"hello" => "ahoy",
|
67
|
+
"hey" => "ahoy",
|
68
|
+
"hotel" => "inn",
|
69
|
+
"i'm" => "i be",
|
70
|
+
"internet" => "series o' tubes",
|
71
|
+
"invalid" => "sunk",
|
72
|
+
"is" => "be",
|
73
|
+
"island" => "isle",
|
74
|
+
"isn't" => "be not",
|
75
|
+
"it's" => "'tis",
|
76
|
+
"jail" => "brig",
|
77
|
+
"kill" => "keelhaul",
|
78
|
+
"king" => "king",
|
79
|
+
"leg" => "peg",
|
80
|
+
"lady" => "lass",
|
81
|
+
"logout" => "walk the plank",
|
82
|
+
"male" => "pirate",
|
83
|
+
"man" => "pirate",
|
84
|
+
"manager" => "admiral",
|
85
|
+
"money" => "doubloons",
|
86
|
+
"month" => "moon",
|
87
|
+
"my" => "me",
|
88
|
+
"never" => "nary",
|
89
|
+
"no" => "nay",
|
90
|
+
"of" => "o'",
|
91
|
+
"over" => "o'er",
|
92
|
+
"page" => "parchment",
|
93
|
+
"person" => "scallywag",
|
94
|
+
"posted" => "tacked to the yardarm",
|
95
|
+
"president" => "king",
|
96
|
+
"prison" => "brig",
|
97
|
+
"quickly" => "smartly",
|
98
|
+
"really" => "verily",
|
99
|
+
"relatives" => "kin",
|
100
|
+
"religion" => "creed",
|
101
|
+
"ring" => "ring",
|
102
|
+
"role" => "job",
|
103
|
+
"say" => "cry",
|
104
|
+
"seconds" => "ticks o' tha clock",
|
105
|
+
"shipping" => "cargo",
|
106
|
+
"small" => "puny",
|
107
|
+
"soldier" => "sailor",
|
108
|
+
"sorry" => "yarr",
|
109
|
+
"spouse" => "ball 'n' chain",
|
110
|
+
"state" => "land",
|
111
|
+
"supervisor" => "Cap'n",
|
112
|
+
"that's" => "that be",
|
113
|
+
"the" => "tha",
|
114
|
+
"them" => "'em",
|
115
|
+
"thing" => "thing",
|
116
|
+
"this" => "dis",
|
117
|
+
"to" => "t'",
|
118
|
+
"vodka" => "rum",
|
119
|
+
"we" => "our jolly crew",
|
120
|
+
"we're" => "we's",
|
121
|
+
"wine" => "grog",
|
122
|
+
"whiskey" => "rum",
|
123
|
+
"whisky" => "rum",
|
124
|
+
"with" => "wit'",
|
125
|
+
"woman" => "wench",
|
126
|
+
"work" => "duty",
|
127
|
+
"yah" => "aye",
|
128
|
+
"yeah" => "aye",
|
129
|
+
"yes" => "aye",
|
130
|
+
"you" => "ye",
|
131
|
+
"you're" => "you be",
|
132
|
+
"you've" => "ye",
|
133
|
+
"your" => "yer"
|
134
|
+
}
|
135
|
+
|
136
|
+
pirate_change = []
|
12
137
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
138
|
+
arg.split(" ").map do |word|
|
139
|
+
if word.downcase!
|
140
|
+
end
|
141
|
+
if translator.has_key? word
|
142
|
+
word = translator[word]
|
17
143
|
|
18
|
-
|
19
|
-
|
20
|
-
|
144
|
+
pirate_change.push(word)
|
145
|
+
else
|
146
|
+
|
147
|
+
pirate_change.push(word)
|
148
|
+
end
|
149
|
+
end
|
150
|
+
pirate_change.join(" ").capitalize
|
151
|
+
end
|
21
152
|
|
22
153
|
module Fake
|
23
154
|
def self.captian
|
@@ -60,5 +191,5 @@ module Pirateme
|
|
60
191
|
|
61
192
|
|
62
193
|
end
|
63
|
-
|
194
|
+
|
64
195
|
|
data/lib/Pirateme/version.rb
CHANGED