Skip to content

Commit 1336772

Browse files
committed
Add more stuff to the config file.
- Our email address for sending mail - The delivery method used when sending mail. - Key to compose mail.
1 parent ce543ea commit 1336772

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

hatterrc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,10 @@ termbox_library_path = /usr/lib/libtermbox.so
1616
colors = { foreground => green, background => black }
1717

1818
# The keybindings for Hatter can be changed here:
19-
keys = { q => quit, r => reply, f => forward }
19+
keys = { q => quit, r => reply, f => forward, c => compose }
20+
21+
# The email address used for sending mail
22+
email_address = [email protected]
23+
24+
# The method used to send mail.
25+
mail_delivery_method = sendmail

lib/configuration.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,17 @@ class Keys < ConfigToolkit::BaseConfig
2222
add_required_param(:q, String)
2323
add_required_param(:r, String)
2424
add_required_param(:f, String)
25+
add_required_param(:c, String)
2526
end
2627

2728
add_required_param(:maildir, String)
2829
add_required_param(:maildir_format, String)
30+
31+
add_required_param(:email_address, String)
32+
add_required_param(:mail_delivery_method, String)
33+
2934
add_required_param(:termbox_library_path, String)
35+
3036
add_required_param(:colors, Colors)
37+
add_required_param(:keys, Keys)
3138
end

spec/configuration_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,9 @@
3838
config.colors.foreground.should eq "green"
3939
end
4040

41+
it "contains a nested config with keys" do
42+
config = Configuration.instance
43+
config.keys.c.should eq "compose"
44+
config.keys.q.should eq "quit"
45+
end
4146
end

0 commit comments

Comments
 (0)