four_two_seven 0.0.1 → 1.04.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f21ef41892a861082cc589cf27e9c2a1cc991a24
4
- data.tar.gz: f58b9e8f37947934836f04e079acb2c0d568774a
3
+ metadata.gz: f665d174ac8968e8543b94ea10b1b5c33aadbb05
4
+ data.tar.gz: 774ef901e30d2c23b76e1a855720baa806369f0c
5
5
  SHA512:
6
- metadata.gz: 9b05e7372f78652e80aca3ce2d2cadca5c13c620777e2d7f4b716744f41fd414386884bbb3edebc396f782e36c8d4fce774a9a0fcdb2fe57e2ff77e8271dd4d3
7
- data.tar.gz: e3638d887f0c7a459dc03d734262c2bf8788f53d9176edddf21586a06393d6d3e83de5d242142c66cf7b43150d37a7df25ab1c43bcc1dbc4c87543d67d2f6eaf
6
+ metadata.gz: 9ea1891da372a0c0c45cf0f5e0c912fe0ddae58c628ce7a1f808c632aec30b7c7c67b510c86e8e30d916d7465b3e104806829485349514bd657e48a59685d060
7
+ data.tar.gz: cd95ac5301aab20ff22c44f8b7f0226f5de699c4689b09d0db5d843793045b666d10dc4864d5190ec99b7a427cf285d1c081ec308f4d557f7c2f1504400ca388
data/README.md CHANGED
@@ -8,6 +8,9 @@
8
8
 
9
9
  Now you get to be the new Employee 427 ;)
10
10
 
11
+
12
+ ![](example.png)
13
+
11
14
  ## Installation
12
15
 
13
16
  ```bash
@@ -27,3 +30,4 @@ And follow the commands. Quickly, of course. Slacking off won't be tolerated.
27
30
  ## Todo
28
31
 
29
32
  - Get the long keypresses to work. Keypresses stack up and get used for future commands, breaking the entire thing.
33
+
data/bin/427 CHANGED
@@ -12,7 +12,13 @@ include Curses
12
12
  include FourTwoSeven
13
13
  include Timeout
14
14
 
15
+
16
+ height, width = *IO.console.winsize
17
+
15
18
  DEFAULT_COLORS = 1
19
+ TITLE_BAR_LEFT = "> Employee #427 Terminal Prompt"
20
+ TITLE_BAR_RIGHT = "v. #{VERSION}".rjust(width - TITLE_BAR_LEFT.length)
21
+
16
22
 
17
23
  begin
18
24
  noecho
@@ -22,13 +28,20 @@ begin
22
28
  nonl
23
29
 
24
30
  init_pair(DEFAULT_COLORS, COLOR_GREEN, COLOR_BLACK)
25
- window = Window.new(0, 0, 0, 0)
31
+ window = Window.new(height - 1, width, 1, 0)
26
32
 
27
33
  window.scrollok(true)
28
34
  window.idlok(true)
29
35
  window.color_set(DEFAULT_COLORS)
30
36
 
31
- window << "Welcome, Employee 427."
37
+ title_bar = Window.new(1, width, 0, 0)
38
+ title_bar.color_set(DEFAULT_COLORS)
39
+ title_bar.box(0, ?_)
40
+ title_bar << (TITLE_BAR_LEFT + TITLE_BAR_RIGHT)
41
+ title_bar.refresh
42
+
43
+ window.setpos(height - 1, 0)
44
+ window.scroll
32
45
  window << Command::SEPARATOR
33
46
 
34
47
  prev_cmd = nil
data/example.png ADDED
Binary file
data/lib/427/command.rb CHANGED
@@ -10,7 +10,7 @@ module FourTwoSeven
10
10
 
11
11
  DURATION = 0..15
12
12
 
13
- PROMPT = "Please PRESS '%s' on your KEYBOARD for %ss.\n"
13
+ PROMPT = "> Please PRESS '%s' on your KEYBOARD for %ss.\n"
14
14
 
15
15
  SEPARATOR = "\n\n- - -\n"
16
16
 
data/lib/427/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module FourTwoSeven
2
- VERSION = "0.0.1"
2
+ VERSION = "1.04.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: four_two_seven
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 1.04.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Machin
@@ -67,6 +67,7 @@ files:
67
67
  - README.md
68
68
  - Rakefile
69
69
  - bin/427
70
+ - example.png
70
71
  - lib/427.rb
71
72
  - lib/427/command.rb
72
73
  - lib/427/version.rb