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 CHANGED
@@ -56,7 +56,7 @@ module Gruesome
56
56
  when 'play'
57
57
  fail unless ARGV[1]
58
58
 
59
- Gruesome::Logo.print
59
+ Gruesome::Logo.display
60
60
 
61
61
  puts
62
62
  puts "--------------------------------------------------------------------------------"
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.print
25
- puts LOGO
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
@@ -1,3 +1,3 @@
1
1
  module Grue
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 4
9
- version: 0.0.4
8
+ - 5
9
+ version: 0.0.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - Dave Wilkinson