dust-deploy 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/changelog.md +6 -0
- data/lib/dust/recipes/iptables.rb +5 -2
- data/lib/dust/version.rb +1 -1
- metadata +2 -2
data/changelog.md
CHANGED
@@ -184,12 +184,15 @@ class Iptables < Thor
|
|
184
184
|
with_dashes.values.each { |a| result = result.combine a }
|
185
185
|
|
186
186
|
# make sure the options are sorted in a way that works.
|
187
|
-
# protocol and match first, jump last
|
188
187
|
sorted = []
|
189
188
|
result.each do |r|
|
189
|
+
# bring to the front
|
190
190
|
r = r.sort_by { |x| if x.include? '--match' then -1 else 1 end }
|
191
191
|
r = r.sort_by { |x| if x.include? '--protocol' then -1 else 1 end }
|
192
|
-
|
192
|
+
# shift to the end
|
193
|
+
r = r.sort_by { |x| if x.include? '--jump' then 1 else -1 end }
|
194
|
+
r = r.sort_by { |x| if x.include? '--to-port' then 1 else -1 end }
|
195
|
+
sorted.push r
|
193
196
|
end
|
194
197
|
|
195
198
|
sorted
|
data/lib/dust/version.rb
CHANGED