ruby-nmap 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/.document ADDED
@@ -0,0 +1,3 @@
1
+ -
2
+ ChangeLog.md
3
+ LICENSE.txt
data/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ doc
2
+ pkg
3
+ .DS_Store
4
+ .yardoc
5
+ *.db
6
+ *.log
7
+ *.swp
8
+ *~
data/.yardopts CHANGED
@@ -1 +1 @@
1
- --markup markdown --title 'Ruby Nmap Documentation' --protected --files ChangeLog.md,LICENSE.txt
1
+ --markup markdown --title 'Ruby Nmap Documentation' --protected
data/ChangeLog.md CHANGED
@@ -1,3 +1,8 @@
1
+ ### 0.5.1 / 2012-05-27
2
+
3
+ * Replaced ore-tasks with
4
+ [rubygems-tasks](https://github.com/postmodern/rubygems-tasks#readme).
5
+
1
6
  ### 0.5.0 / 2011-04-11
2
7
 
3
8
  * Require nokogiri ~> 1.3.
data/LICENSE.txt CHANGED
@@ -1,6 +1,4 @@
1
- (The MIT License)
2
-
3
- Copyright (c) 2009-2010 Hal Brodigan
1
+ Copyright (c) 2009-2012 Postmodern
4
2
 
5
3
  Permission is hereby granted, free of charge, to any person obtaining
6
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # ruby-nmap
2
2
 
3
- * [Source](http://github.com/sophsec/ruby-nmap/)
4
- * [Issues](http://github.com/sophsec/ruby-nmap/issues)
5
- * [Documentation](http://rubydoc.info/gems/ruby-nmap/file/README.md)
6
- * Postmodern (postmodern.mod3 at gmail.com)
3
+ * [Source](https://github.com/sophsec/ruby-nmap/)
4
+ * [Issues](https://github.com/sophsec/ruby-nmap/issues)
5
+ * [Documentation](http://rubydoc.info/gems/ruby-nmap/frames)
6
+ * [Email](mailto:postmodern.mod3 at gmail.com)
7
7
 
8
8
  ## Description
9
9
 
@@ -75,13 +75,14 @@ Print NSE script output from an XML scan file:
75
75
 
76
76
  * [nmap](http://www.insecure.org/) >= 5.00
77
77
  * [nokogiri](http://nokogiri.rubyforge.org/) ~> 1.3
78
- * [rprogram](http://github.com/postmodern/rprogram) ~> 0.3
78
+ * [rprogram](https://github.com/postmodern/rprogram) ~> 0.3
79
79
 
80
80
  ## Install
81
81
 
82
- $ sudo gem install ruby-nmap
82
+ $ gem install ruby-nmap
83
83
 
84
84
  ## License
85
85
 
86
- See {file:LICENSE.txt} for license information.
86
+ Copyright (c) 2009-2012 Postmodern
87
87
 
88
+ See {file:LICENSE.txt} for license information.
data/Rakefile CHANGED
@@ -1,14 +1,16 @@
1
+ # encoding: utf-8
2
+
1
3
  require 'rubygems'
2
4
  require 'rake'
3
5
 
4
6
  begin
5
- gem 'ore-tasks', '~> 0.4'
6
- require 'ore/tasks'
7
+ gem 'rubygems-tasks', '~> 0.1'
8
+ require 'rubygems/tasks'
7
9
 
8
- Ore::Tasks.new
10
+ Gem::Tasks.new
9
11
  rescue LoadError => e
10
- STDERR.puts e.message
11
- STDERR.puts "Run `gem install ore-tasks` to install 'ore/tasks'."
12
+ warn e.message
13
+ warn "Run `gem install rubygems-tasks` to install 'rubygems/tasks'."
12
14
  end
13
15
 
14
16
  begin
@@ -21,11 +23,12 @@ rescue LoadError => e
21
23
  abort "Please run `gem install rspec` to install RSpec."
22
24
  end
23
25
  end
26
+
27
+ task :test => :spec
24
28
  task :default => :spec
25
- task :test => :spec
26
29
 
27
30
  begin
28
- gem 'yard', '~> 0.6.0'
31
+ gem 'yard', '~> 0.7'
29
32
  require 'yard'
30
33
 
31
34
  YARD::Rake::YardocTask.new
@@ -34,3 +37,4 @@ rescue LoadError => e
34
37
  abort "Please run `gem install yard` to install YARD."
35
38
  end
36
39
  end
40
+ task :doc => :yard
data/gemspec.yml CHANGED
@@ -7,7 +7,7 @@ description:
7
7
  license: MIT
8
8
  authors: Postmodern
9
9
  email: postmodern.mod3@gmail.com
10
- homepage: http://github.com/sophsec/ruby-nmap
10
+ homepage: https://github.com/sophsec/ruby-nmap#readme
11
11
  has_yard: true
12
12
 
13
13
  requirements: nmap >= 5.00
@@ -17,6 +17,6 @@ dependencies:
17
17
  rprogram: ~> 0.3
18
18
 
19
19
  development_dependencies:
20
- ore-tasks: ~> 0.4
20
+ rubygems-tasks: ~> 0.1
21
21
  rspec: ~> 2.4
22
- yard: ~> 0.6.0
22
+ yard: ~> 0.7
data/lib/nmap/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Nmap
2
2
  # ruby-nmap version
3
- VERSION = '0.5.0'
3
+ VERSION = '0.5.1'
4
4
  end
data/ruby-nmap.gemspec CHANGED
@@ -1,15 +1,105 @@
1
- # -*- encoding: utf-8 -*-
2
-
3
- begin
4
- Ore::Specification.new do |gemspec|
5
- # custom logic here
6
- end
7
- rescue NameError
8
- begin
9
- require 'ore/specification'
10
- retry
11
- rescue LoadError
12
- STDERR.puts "The 'ruby-nmap.gemspec' file requires Ore."
13
- STDERR.puts "Run `gem install ore-core` to install Ore."
1
+ # encoding: utf-8
2
+
3
+ require 'yaml'
4
+
5
+ Gem::Specification.new do |gemspec|
6
+ root = File.dirname(__FILE__)
7
+ lib_dir = File.join(root,'lib')
8
+ files = `git ls-files`.split($/)
9
+
10
+ filter_files = lambda { |paths|
11
+ files & case paths
12
+ when Array
13
+ paths
14
+ when String
15
+ Dir[paths]
16
+ end
17
+ }
18
+
19
+ version = {
20
+ :file => 'nmap/version',
21
+ :constant => 'Nmap::VERSION'
22
+ }
23
+
24
+ defaults = {
25
+ 'name' => File.basename(root),
26
+ 'files' => files,
27
+ 'require_paths' => ['ext', 'lib'].select { |dir| File.directory?(dir) },
28
+ 'executables' => filter_files['bin/*'].map { |path| File.basename(path) },
29
+ 'test_files' => filter_files['{test/{**/}*_test.rb,spec/{**/}*_spec.rb}'],
30
+ 'doc_files' => filter_files['*.{txt,rdoc,md,markdown,tt,textile}'],
31
+ 'extra_doc_files' => filter_files['*.{txt,rdoc,md,markdown,tt,textile}']
32
+ }
33
+
34
+ metadata = defaults.merge(YAML.load_file('gemspec.yml'))
35
+
36
+ gemspec.name = metadata['name']
37
+ gemspec.version = if metadata['version']
38
+ metadata['version']
39
+ else
40
+ $LOAD_PATH << lib_dir unless $LOAD_PATH.include?(lib_dir)
41
+
42
+ require version[:file]
43
+ eval(version[:constant])
44
+ end
45
+
46
+ gemspec.summary = metadata.fetch('summary',metadata['description'])
47
+ gemspec.description = metadata.fetch('description',metadata['summary'])
48
+
49
+ gemspec.licenses = Array(metadata['license'])
50
+ gemspec.authors = Array(metadata['authors'])
51
+
52
+ gemspec.email = metadata['email']
53
+ gemspec.homepage = metadata['homepage']
54
+
55
+ gemspec.require_paths = Array(metadata['require_paths'])
56
+ gemspec.files = filter_files[metadata['files']]
57
+ gemspec.files += Array(metadata['generated_files'])
58
+ gemspec.executables = metadata['executables']
59
+ gemspec.extensions = metadata['extensions']
60
+
61
+ if Gem::VERSION < '1.7.'
62
+ gemspec.default_executable = gemspec.executables.first
63
+ end
64
+
65
+ gemspec.test_files = filter_files[metadata['test_files']]
66
+ gemspec.extra_rdoc_files = Array(metadata['extra_doc_files'])
67
+
68
+ gemspec.post_install_message = metadata['post_install_message']
69
+ gemspec.requirements = metadata['requirements']
70
+
71
+ if gemspec.respond_to?(:required_ruby_version=)
72
+ gemspec.required_ruby_version = metadata['required_ruby_version']
73
+ end
74
+
75
+ if gemspec.respond_to?(:required_rubygems_version=)
76
+ gemspec.required_rubygems_version = metadata['required_ruby_version']
77
+ end
78
+
79
+ parse_versions = lambda { |versions|
80
+ case versions
81
+ when Array
82
+ versions.map { |v| v.to_s }
83
+ when String
84
+ versions.split(/,\s*/)
85
+ end
86
+ }
87
+
88
+ if metadata['dependencies']
89
+ metadata['dependencies'].each do |name,versions|
90
+ gemspec.add_dependency(name,parse_versions[versions])
91
+ end
92
+ end
93
+
94
+ if metadata['runtime_dependencies']
95
+ metadata['runtime_dependencies'].each do |name,versions|
96
+ gemspec.add_runtime_dependency(name,parse_versions[versions])
97
+ end
98
+ end
99
+
100
+ if metadata['development_dependencies']
101
+ metadata['development_dependencies'].each do |name,versions|
102
+ gemspec.add_development_dependency(name,parse_versions[versions])
103
+ end
14
104
  end
15
105
  end
metadata CHANGED
@@ -1,83 +1,108 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ruby-nmap
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.5.1
4
5
  prerelease:
5
- version: 0.5.0
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Postmodern
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-04-11 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
12
+ date: 2012-05-28 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
16
15
  name: nokogiri
17
- prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
19
17
  none: false
20
- requirements:
18
+ requirements:
21
19
  - - ~>
22
- - !ruby/object:Gem::Version
23
- version: "1.3"
20
+ - !ruby/object:Gem::Version
21
+ version: '1.3'
24
22
  type: :runtime
25
- version_requirements: *id001
26
- - !ruby/object:Gem::Dependency
27
- name: rprogram
28
23
  prerelease: false
29
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
30
25
  none: false
31
- requirements:
26
+ requirements:
32
27
  - - ~>
33
- - !ruby/object:Gem::Version
34
- version: "0.3"
28
+ - !ruby/object:Gem::Version
29
+ version: '1.3'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rprogram
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: '0.3'
35
38
  type: :runtime
36
- version_requirements: *id002
37
- - !ruby/object:Gem::Dependency
38
- name: ore-tasks
39
39
  prerelease: false
40
- requirement: &id003 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '0.3'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rubygems-tasks
48
+ requirement: !ruby/object:Gem::Requirement
41
49
  none: false
42
- requirements:
50
+ requirements:
43
51
  - - ~>
44
- - !ruby/object:Gem::Version
45
- version: "0.4"
52
+ - !ruby/object:Gem::Version
53
+ version: '0.1'
46
54
  type: :development
47
- version_requirements: *id003
48
- - !ruby/object:Gem::Dependency
49
- name: rspec
50
55
  prerelease: false
51
- requirement: &id004 !ruby/object:Gem::Requirement
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '0.1'
62
+ - !ruby/object:Gem::Dependency
63
+ name: rspec
64
+ requirement: !ruby/object:Gem::Requirement
52
65
  none: false
53
- requirements:
66
+ requirements:
54
67
  - - ~>
55
- - !ruby/object:Gem::Version
56
- version: "2.4"
68
+ - !ruby/object:Gem::Version
69
+ version: '2.4'
57
70
  type: :development
58
- version_requirements: *id004
59
- - !ruby/object:Gem::Dependency
60
- name: yard
61
71
  prerelease: false
62
- requirement: &id005 !ruby/object:Gem::Requirement
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: '2.4'
78
+ - !ruby/object:Gem::Dependency
79
+ name: yard
80
+ requirement: !ruby/object:Gem::Requirement
63
81
  none: false
64
- requirements:
82
+ requirements:
65
83
  - - ~>
66
- - !ruby/object:Gem::Version
67
- version: 0.6.0
84
+ - !ruby/object:Gem::Version
85
+ version: '0.7'
68
86
  type: :development
69
- version_requirements: *id005
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: '0.7'
70
94
  description: A Ruby interface to Nmap, the exploration tool and security / port scanner.
71
- email:
72
- - postmodern.mod3@gmail.com
95
+ email: postmodern.mod3@gmail.com
73
96
  executables: []
74
-
75
97
  extensions: []
76
-
77
- extra_rdoc_files:
98
+ extra_rdoc_files:
99
+ - ChangeLog.md
100
+ - LICENSE.txt
78
101
  - README.md
79
- files:
102
+ files:
103
+ - .document
80
104
  - .gemtest
105
+ - .gitignore
81
106
  - .rspec
82
107
  - .yardopts
83
108
  - ChangeLog.md
@@ -116,38 +141,37 @@ files:
116
141
  - spec/spec_helper.rb
117
142
  - spec/task_spec.rb
118
143
  - spec/xml_spec.rb
119
- homepage: http://github.com/sophsec/ruby-nmap
120
- licenses:
144
+ homepage: https://github.com/sophsec/ruby-nmap#readme
145
+ licenses:
121
146
  - MIT
122
147
  post_install_message:
123
148
  rdoc_options: []
124
-
125
- require_paths:
149
+ require_paths:
126
150
  - lib
127
- required_ruby_version: !ruby/object:Gem::Requirement
151
+ required_ruby_version: !ruby/object:Gem::Requirement
128
152
  none: false
129
- requirements:
130
- - - ">="
131
- - !ruby/object:Gem::Version
132
- version: "0"
133
- required_rubygems_version: !ruby/object:Gem::Requirement
153
+ requirements:
154
+ - - ! '>='
155
+ - !ruby/object:Gem::Version
156
+ version: '0'
157
+ required_rubygems_version: !ruby/object:Gem::Requirement
134
158
  none: false
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- version: "0"
139
- requirements:
159
+ requirements:
160
+ - - ! '>='
161
+ - !ruby/object:Gem::Version
162
+ version: '0'
163
+ requirements:
140
164
  - nmap >= 5.00
141
- rubyforge_project: ruby-nmap
142
- rubygems_version: 1.7.2
165
+ rubyforge_project:
166
+ rubygems_version: 1.8.24
143
167
  signing_key:
144
168
  specification_version: 3
145
169
  summary: A Ruby interface to Nmap.
146
- test_files:
170
+ test_files:
147
171
  - spec/host_spec.rb
148
- - spec/port_spec.rb
149
172
  - spec/nmap_spec.rb
150
- - spec/sequence_spec.rb
151
173
  - spec/os_spec.rb
152
- - spec/xml_spec.rb
174
+ - spec/port_spec.rb
175
+ - spec/sequence_spec.rb
153
176
  - spec/task_spec.rb
177
+ - spec/xml_spec.rb