blertr 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/config/mail_config.yaml +1 -1
- data/lib/blertr/blacklist.rb +3 -1
- data/lib/blertr/options.rb +7 -1
- data/lib/blertr/version.rb +1 -1
- metadata +1 -1
data/config/mail_config.yaml
CHANGED
data/lib/blertr/blacklist.rb
CHANGED
data/lib/blertr/options.rb
CHANGED
|
@@ -6,7 +6,9 @@ module Blertr
|
|
|
6
6
|
def self.options_for name
|
|
7
7
|
rtn = {}
|
|
8
8
|
if File.exists? config_file_for(name)
|
|
9
|
-
|
|
9
|
+
file = File.open(config_file_for(name),'r')
|
|
10
|
+
yaml_data = YAML::load(file)
|
|
11
|
+
file.close
|
|
10
12
|
if yaml_data
|
|
11
13
|
rtn = Hash[yaml_data.map {|k,v| [k.to_sym, v]}]
|
|
12
14
|
end
|
|
@@ -15,10 +17,14 @@ module Blertr
|
|
|
15
17
|
end
|
|
16
18
|
|
|
17
19
|
def self.save_options_for name, new_options
|
|
20
|
+
begin
|
|
18
21
|
file = config_file_for name
|
|
19
22
|
File.open(file, 'w') do |file|
|
|
20
23
|
file.puts(YAML::dump(new_options))
|
|
21
24
|
end
|
|
25
|
+
rescue
|
|
26
|
+
puts "problem saving options"
|
|
27
|
+
end
|
|
22
28
|
end
|
|
23
29
|
|
|
24
30
|
def self.remove_optons_for name
|
data/lib/blertr/version.rb
CHANGED