gruesome 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/gruesome/cli.rb +1 -1
- data/lib/gruesome/logo.rb +47 -14
- data/lib/gruesome/version.rb +1 -1
- metadata +2 -2
data/lib/gruesome/cli.rb
CHANGED
data/lib/gruesome/logo.rb
CHANGED
@@ -7,22 +7,55 @@ module Gruesome
|
|
7
7
|
# I'm just making sure this works regardless of the unicode format this
|
8
8
|
# source file is saved as...
|
9
9
|
LOGO = <<ENDLOGO
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
10
|
+
\u2584\u2584\u2584\u2584\u2584 \u2584\u2584\u2584\u2584\u2584
|
11
|
+
\u2580\u2588\u2588\u2588\u2588\u2584 \u2584\u2588\u2588\u2588\u2588\u2580
|
12
|
+
\u2580\u2588\u2588\u2588\u2588\u2584 \u2584\u2588\u2588\u2588\u2588\u2580
|
13
|
+
\u2584\u2584\u2584\u2584\u2584\u2584 \u2588\u2588\u2588\u2588\u2588\u2588\u2584 \u2584\u2584\u2584 \u2584\u2584\u2584 \u2584\u2584\u2584\u2584\u2584\u2584 \u2584\u2584\u2584\u2584\u2584\u2584 \u2584\u2588\u2588\u2588\u2588\u2580 \u2584\u2584\u2584 \u2584\u2584\u2584 \u2584\u2584\u2584\u2584\u2584\u2584
|
14
|
+
\u2584\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2584 \u2588\u2588\u2593\u2580\u2588\u2588\u2588\u2588\u2584 \u2588\u2588\u2593 \u2588\u2588\u2588 \u2584\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2584\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2584 \u2584\u2588\u2588\u2588\u2588\u2580\u2588\u2588\u2584 \u2588\u2588\u2588\u2588\u2584\u2588\u2588\u2588\u2588 \u2584\u2588\u2588\u2588\u2588\u2588\u2588\u2588
|
15
|
+
\u2588\u2588\u2593 \u2588\u2588\u2588 \u2588\u2588\u2593 \u2580\u2588\u2588\u2588 \u2588\u2588\u2593 \u2588\u2588\u2588 \u2588\u2588\u2593 \u2588\u2588\u2593 \u2588\u2588\u2588 \u2588\u2588\u2588\u2580 \u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2593
|
16
|
+
\u2588\u2588\u2593 \u2588\u2588\u2593 \u2588\u2588\u2588 \u2588\u2588\u2593 \u2588\u2588\u2588 \u2588\u2588\u2593 \u2588\u2588\u2593 \u2588\u2588\u2593 \u2588\u2588\u2588 \u2588\u2588\u2588\u2580\u2588\u2580\u2588\u2588\u2588 \u2588\u2588\u2593
|
17
|
+
\u2588\u2588\u2593 \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588 \u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2580\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2584 \u2588\u2588\u2593 \u2588\u2588\u2588 \u2588\u2588\u2593 \u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588
|
18
|
+
\u2588\u2588\u2593 \u2580\u2580\u2588\u2588\u2588 \u2580\u2588\u2588\u2593\u2580\u2580\u2580\u2588\u2584\u2584 \u2588\u2588\u2588 \u2588\u2588\u2588 \u2588\u2588\u2588\u2580\u2580\u2580\u2580\u2580 \u2580\u2580\u2580\u2580\u2580\u2588\u2588\u2588 \u2588\u2588\u2593 \u2588\u2588\u2588 \u2588\u2588\u2593 \u2588\u2588\u2588 \u2588\u2588\u2588\u2580\u2580\u2580\u2580\u2580
|
19
|
+
\u2588\u2588\u2593 \u2588\u2588\u2588 \u2588\u2588\u2593 \u2588\u2588\u2588 \u2588\u2588\u2593 \u2588\u2588\u2588 \u2588\u2588\u2593 \u2588\u2588\u2593 \u2588\u2588\u2588 \u2588\u2588\u2593 \u2588\u2588\u2588 \u2588\u2588\u2588 \u2588\u2588\u2588 \u2588\u2588\u2593
|
20
|
+
\u2580\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2580 \u2588\u2588\u2593 \u2588\u2588\u2588 \u2580\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2580 \u2580\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2580\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2580 \u2580\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2580 \u2588\u2588\u2593 \u2588\u2588\u2588 \u2580\u2588\u2588\u2588\u2588\u2588\u2588\u2588
|
21
|
+
\u2580\u2580\u2580\u2580\u2580\u2580 \u2580\u2580\u2580 \u2580\u2580\u2580 \u2580\u2580\u2580\u2580\u2580 \u2580\u2580\u2580\u2580\u2580\u2580 \u2580\u2580\u2580\u2580\u2580\u2580 \u2580\u2580\u2580\u2580\u2580 \u2580\u2580\u2580 \u2580\u2580\u2580 \u2580\u2580\u2580\u2580\u2580\u2580
|
22
22
|
ENDLOGO
|
23
23
|
|
24
|
-
def Logo.
|
25
|
-
|
24
|
+
def Logo.print_cp437
|
25
|
+
line_count = 0
|
26
|
+
LOGO.each_char do |c|
|
27
|
+
if c == "\u2580"
|
28
|
+
print 223.chr
|
29
|
+
line_count += 1
|
30
|
+
elsif c == "\u2584"
|
31
|
+
print 220.chr
|
32
|
+
line_count += 1
|
33
|
+
elsif c == "\u2588"
|
34
|
+
print 219.chr
|
35
|
+
line_count += 1
|
36
|
+
elsif c == "\u2593"
|
37
|
+
print 178.chr
|
38
|
+
line_count += 1
|
39
|
+
else
|
40
|
+
if c == "\n"
|
41
|
+
if line_count != 80
|
42
|
+
puts
|
43
|
+
end
|
44
|
+
line_count = 0
|
45
|
+
else
|
46
|
+
print c
|
47
|
+
line_count += 1
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def Logo.display
|
54
|
+
if RUBY_PLATFORM =~ /(win|w)32$/
|
55
|
+
Logo.print_cp437
|
56
|
+
else
|
57
|
+
puts LOGO
|
58
|
+
end
|
26
59
|
end
|
27
60
|
end
|
28
61
|
end
|
data/lib/gruesome/version.rb
CHANGED