dust-deploy 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
data/changelog.md
CHANGED
@@ -7,7 +7,7 @@ class Debsecan < Thor
|
|
7
7
|
::Dust.print_msg 'configuring debsecan'
|
8
8
|
|
9
9
|
# if config is simply set to "true", use defaults
|
10
|
-
config = {} unless config.
|
10
|
+
config = {} unless config.is_a? Hash
|
11
11
|
|
12
12
|
# setting default config variables (unless already set)
|
13
13
|
config['report'] ||= false
|
@@ -63,7 +63,7 @@ class Iptables < Thor
|
|
63
63
|
rule['protocol'] ||= ['tcp'] if rule['dport'] or rule['sport']
|
64
64
|
|
65
65
|
# convert non-array variables to array, so we won't get hickups when using .each and .combine
|
66
|
-
rule.each { |k, v| rule[k] = [ rule[k] ]
|
66
|
+
rule.each { |k, v| rule[k] = [ rule[k] ] unless rule[k].is_a? Array }
|
67
67
|
|
68
68
|
next unless check_ipversion rule, ipv
|
69
69
|
|
@@ -164,17 +164,30 @@ class Iptables < Thor
|
|
164
164
|
# make sure the options are sorted in a way that works.
|
165
165
|
sorted = []
|
166
166
|
result.each do |r|
|
167
|
-
#
|
168
|
-
r = r.sort_by
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
167
|
+
# sort rules so it makes sense
|
168
|
+
r = r.sort_by do |x|
|
169
|
+
if x.include? '--match'
|
170
|
+
-1
|
171
|
+
elsif x.include? '--protocol'
|
172
|
+
-2
|
173
|
+
elsif x.include? '--jump'
|
174
|
+
1
|
175
|
+
elsif x.include? '--to-port'
|
176
|
+
2
|
177
|
+
elsif x.include? '--to-destination'
|
178
|
+
3
|
179
|
+
elsif x.include? '--to-source'
|
180
|
+
4
|
181
|
+
elsif x.include? '--ttl-set'
|
182
|
+
5
|
183
|
+
elsif x.include? '--clamp-mss-to-pmtu'
|
184
|
+
6
|
185
|
+
elsif x.include? '--reject-with'
|
186
|
+
7
|
187
|
+
else
|
188
|
+
0
|
189
|
+
end
|
190
|
+
end
|
178
191
|
sorted.push r
|
179
192
|
end
|
180
193
|
|
@@ -11,7 +11,7 @@ class Repositories < Thor
|
|
11
11
|
puts
|
12
12
|
|
13
13
|
# if repo is present but not a hash use defaults
|
14
|
-
repo = {} unless repo.
|
14
|
+
repo = {} unless repo.is_a? Hash
|
15
15
|
|
16
16
|
# setting defaults
|
17
17
|
repo['url'] ||= 'http://ftp.debian.org/debian/' if node.is_debian? true
|
@@ -4,7 +4,7 @@ class ResolvConf < Thor
|
|
4
4
|
::Dust.print_msg "configuring resolv.conf\n"
|
5
5
|
|
6
6
|
# if config is just true, create empty hash and use defaults
|
7
|
-
config = {} unless config.
|
7
|
+
config = {} unless config.is_a? Hash
|
8
8
|
|
9
9
|
# setting default config variables (unless already set)
|
10
10
|
config['nameservers'] ||= [ '208.67.222.222', '208.67.220.220' ] # opendns
|
data/lib/dust/version.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 0.2.
|
8
|
+
- 3
|
9
|
+
version: 0.2.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- kris kechagia
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2012-01-
|
17
|
+
date: 2012-01-08 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|