dronebl.rb 0.0.5.pre.1 → 0.0.6
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 +4 -4
- data/bin/dronebl-add +3 -3
- data/lib/dronebl-client.rb +3 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 379138ce46c0c464447e92e60fa002cdc580db63
|
4
|
+
data.tar.gz: 1213dc5cebb786b9565ee7961b57f36d763589ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff35d03b19a0cf1bfdcdd1153ffe823ecc62d1549d791be3ef1a437790ba9f29c2f30a3e96f5f5a6318207a0402bbc1e07622d1281a3cdc5ef0d95f2361a2964
|
7
|
+
data.tar.gz: 32bbd489797d86c413099ecae2d739d580cab1b66d1f464e3ef98d0b34bbe741d1c5439b4fb87852b17cd1a4f1b2a56221eb99979adcad2a592bbfa6bb247e22
|
data/bin/dronebl-add
CHANGED
@@ -97,9 +97,9 @@ if @dry_run
|
|
97
97
|
puts DroneBL::gen_add_query valid
|
98
98
|
puts "#{valid.count} IPs will be added as type #{opts.type}#{" with comment 'opts.comment if opts.comment}'"}."
|
99
99
|
else
|
100
|
-
response = DroneBL::add(valid, type, comment)
|
101
|
-
|
102
|
-
puts "#{valid.count} IPs
|
100
|
+
response = DroneBL::add(valid, opts.type, opts.comment)
|
101
|
+
puts response
|
102
|
+
puts "#{valid.count} IPs added as type #{opts.type}#{" with comment '#{opts.comment}'" if opts.comment}"
|
103
103
|
end
|
104
104
|
unless invalid.empty?
|
105
105
|
puts "IPs not valid for lookup: "
|
data/lib/dronebl-client.rb
CHANGED
@@ -37,6 +37,7 @@ module DroneBL
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def gen_lookup_query ips, archived=false
|
40
|
+
archived ||= false
|
40
41
|
<<EOF
|
41
42
|
<?xml version='1.0'?>
|
42
43
|
<request key='#{key}'>
|
@@ -45,9 +46,10 @@ module DroneBL
|
|
45
46
|
EOF
|
46
47
|
end
|
47
48
|
def gen_add_query ips, type, comment=''
|
49
|
+
comment ||= ''
|
48
50
|
"<?xml version='1.0'?>
|
49
51
|
<request key='#{key}'>
|
50
|
-
#{ips.map { |ip| "<add ip='#{ip}' type='#{type}'#{ " comment='#{comment}'" unless comment.empty?}>"}.join("\n")}
|
52
|
+
#{ips.map { |ip| "<add ip='#{ip}' type='#{type}'#{ " comment='#{comment}'" unless comment.nil? || comment.empty?}>"}.join("\n")}
|
51
53
|
</request>"
|
52
54
|
end
|
53
55
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dronebl.rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rylee Fowler
|
@@ -36,9 +36,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
36
36
|
version: '0'
|
37
37
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - "
|
39
|
+
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version:
|
41
|
+
version: '0'
|
42
42
|
requirements: []
|
43
43
|
rubyforge_project:
|
44
44
|
rubygems_version: 2.2.2
|