Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 373
- Log:
Initial import of Radiant 0.9.1, which is now packaged as a gem. This is an
import of the tagged 0.9.1 source checked out from GitHub, which isn't quite
the same as the gem distribution - but it doesn't seem to be available in an
archived form and the installed gem already has modifications, so this is
the closest I can get.
- Author:
- rool
- Date:
- Mon Mar 21 13:40:05 +0000 2011
- Size:
- 1711 Bytes
1 | #!/usr/local/bin/ruby -w |
2 | |
3 | require "rubygems" |
4 | require "highline/import" |
5 | |
6 | # The old way, using ask() and say()... |
7 | choices = %w{ruby python perl} |
8 | say("This is the old way using ask() and say()...") |
9 | say("Please choose your favorite programming language:") |
10 | say(choices.map { |c| " #{c}\n" }.join) |
11 | |
12 | case ask("? ", choices) |
13 | when "ruby" |
14 | say("Good choice!") |
15 | else |
16 | say("Not from around here, are you?") |
17 | end |
18 | |
19 | # The new and improved choose()... |
20 | say("\nThis is the new mode (default)...") |
21 | choose do |menu| |
22 | menu.prompt = "Please choose your favorite programming language? " |
23 | |
24 | menu.choice :ruby do say("Good choice!") end |
25 | menu.choices(:python, :perl) do say("Not from around here, are you?") end |
26 | end |
27 | |
28 | say("\nThis is letter indexing...") |
29 | choose do |menu| |
30 | menu.index = :letter |
31 | menu.index_suffix = ") " |
32 | |
33 | menu.prompt = "Please choose your favorite programming language? " |
34 | |
35 | menu.choice :ruby do say("Good choice!") end |
36 | menu.choices(:python, :perl) do say("Not from around here, are you?") end |
37 | end |
38 | |
39 | say("\nThis is with a different layout...") |
40 | choose do |menu| |
41 | menu.layout = :one_line |
42 | |
43 | menu.header = "Languages" |
44 | menu.prompt = "Favorite? " |
45 | |
46 | menu.choice :ruby do say("Good choice!") end |
47 | menu.choices(:python, :perl) do say("Not from around here, are you?") end |
48 | end |
49 | |
50 | say("\nYou can even build shells...") |
51 | loop do |
52 | choose do |menu| |
53 | menu.layout = :menu_only |
54 | |
55 | menu.shell = true |
56 | |
57 | menu.choice(:load, "Load a file.") do |command, details| |
58 | say("Loading file with options: #{details}...") |
59 | end |
60 | menu.choice(:save, "Save a file.") do |command, details| |
61 | say("Saving file with options: #{details}...") |
62 | end |
63 | menu.choice(:quit, "Exit program.") { exit } |
64 | end |
65 | end |