iptables-web 0.2.0.beta1 → 0.2.0.beta2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d1617382a4273d74b32143e069ed9ceec430a890
4
- data.tar.gz: 183bebac53e65517e71674382e4300d1d3e29d60
3
+ metadata.gz: 180362da3e0cbb79b049fb1de73831fae308aed0
4
+ data.tar.gz: 4ab058862b9beb3af4bd65d0fc076a11c5e89272
5
5
  SHA512:
6
- metadata.gz: 4130032a62a91def785039cad41784b5de812183f4b9937315e267592bb48cde769351f3f52b1bbb97504f6e3a0bb0a5892b079fec0b3b44e5985928bd70111c
7
- data.tar.gz: 6b316ef4967f98cc6b5b87b1a874375a677b3aa041fee4bd2f0f1a0ad7a3b9d5d61092b079bacbb9052830a63cc6d7c2066c7835caf47c662ea5e5092ad312ac
6
+ metadata.gz: 4bac97d96e69e6c553dd9f36a576c224a7257a4a5dd0bf66e183aa58ab801f58ce57e2d66cf0bd35d1d64a8c522cb9a06a42f02d72e8c30db73e225f396f6c30
7
+ data.tar.gz: 1a46012cebf935add5b0ef0ae11b7db483057629c402e1912ee5763f03e1fb9b4156c00ec85e5a67816c8be3228d50f9aaceb54dc6327086603ad21725ae9d7b
data/bin/iptables-web CHANGED
@@ -76,10 +76,10 @@ command :update do |c|
76
76
  IptablesWeb::Configuration.load(options.config) if options.config
77
77
  IptablesWeb::Model::Node.handshake do
78
78
  rules = IptablesWeb::Model::AccessRule.all
79
+ iptables = IptablesWeb::Iptables.new
79
80
  if options.print
80
- say rules.map(&:to_s).join("\n")
81
+ say iptables.render(rules)
81
82
  else
82
- iptables = IptablesWeb::Iptables.new
83
83
  iptables.restore(rules)
84
84
  end
85
85
  end
@@ -15,6 +15,7 @@ module IptablesWeb
15
15
  netmask: config[:netmask]
16
16
  })
17
17
  end
18
+ node.ips.uniq! { |ip| ip[:ip] }
18
19
  node.hostname = `hostname -f`
19
20
  if node.save && block_given?
20
21
  yield
@@ -1,3 +1,3 @@
1
1
  module IptablesWeb
2
- VERSION = '0.2.0.beta1'
2
+ VERSION = '0.2.0.beta2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iptables-web
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.beta1
4
+ version: 0.2.0.beta2
5
5
  platform: ruby
6
6
  authors:
7
7
  - NikolayMurga