ronin 1.0.0 → 1.1.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (169) hide show
  1. data/.yardopts +0 -1
  2. data/ChangeLog.md +67 -3
  3. data/Gemfile +20 -12
  4. data/README.md +3 -5
  5. data/gemspec.yml +5 -5
  6. data/lib/ronin/address.rb +8 -3
  7. data/lib/ronin/arch.rb +39 -14
  8. data/lib/ronin/author.rb +2 -0
  9. data/lib/ronin/auto_load.rb +67 -0
  10. data/lib/ronin/campaign.rb +15 -2
  11. data/lib/ronin/class_methods.rb +7 -1
  12. data/lib/ronin/config.rb +5 -0
  13. data/lib/ronin/credential.rb +14 -3
  14. data/lib/ronin/database/database.rb +38 -12
  15. data/lib/ronin/database/migrations.rb +3 -1
  16. data/lib/ronin/database/migrations/add_created_at_column_to_targets_table.rb +48 -0
  17. data/lib/ronin/database/migrations/add_updated_at_column_to_campaigns_table.rb +47 -0
  18. data/lib/ronin/database/migrations/create_licenses_table.rb +1 -1
  19. data/lib/ronin/database/migrations/create_passwords_table.rb +1 -1
  20. data/lib/ronin/database/migrations/{create_cached_files_table.rb → create_script_paths_table.rb} +4 -4
  21. data/lib/ronin/database/migrations/migration.rb +3 -6
  22. data/lib/ronin/database/migrations/migrations.rb +3 -3
  23. data/lib/ronin/email_address.rb +20 -3
  24. data/lib/ronin/environment.rb +0 -3
  25. data/lib/ronin/host_name.rb +20 -6
  26. data/lib/ronin/host_name_ip_address.rb +2 -3
  27. data/lib/ronin/installation.rb +92 -23
  28. data/lib/ronin/ip_address.rb +31 -8
  29. data/lib/ronin/ip_address_mac_address.rb +2 -3
  30. data/lib/ronin/license.rb +1 -1
  31. data/lib/ronin/mac_address.rb +6 -4
  32. data/lib/ronin/model/class_methods.rb +4 -0
  33. data/lib/ronin/model/has_authors/class_methods.rb +4 -0
  34. data/lib/ronin/model/has_authors/has_authors.rb +4 -0
  35. data/lib/ronin/model/has_description/class_methods.rb +2 -0
  36. data/lib/ronin/model/has_description/has_description.rb +2 -0
  37. data/lib/ronin/model/has_license/class_methods.rb +2 -0
  38. data/lib/ronin/model/has_license/has_license.rb +4 -0
  39. data/lib/ronin/model/has_name/class_methods.rb +2 -0
  40. data/lib/ronin/model/has_name/has_name.rb +4 -0
  41. data/lib/ronin/model/has_title/class_methods.rb +2 -0
  42. data/lib/ronin/model/has_title/has_title.rb +2 -0
  43. data/lib/ronin/model/has_unique_name/class_methods.rb +2 -0
  44. data/lib/ronin/model/has_unique_name/has_unique_name.rb +7 -1
  45. data/lib/ronin/model/has_version/class_methods.rb +4 -0
  46. data/lib/ronin/model/has_version/has_version.rb +2 -0
  47. data/lib/ronin/model/model.rb +2 -0
  48. data/lib/ronin/model/types.rb +1 -7
  49. data/lib/ronin/model/types/description.rb +2 -0
  50. data/lib/ronin/network/mixins/esmtp.rb +40 -25
  51. data/lib/ronin/network/mixins/http.rb +336 -73
  52. data/lib/ronin/network/mixins/imap.rb +38 -25
  53. data/lib/ronin/network/mixins/pop3.rb +34 -21
  54. data/lib/ronin/network/mixins/smtp.rb +40 -25
  55. data/lib/ronin/network/mixins/tcp.rb +66 -41
  56. data/lib/ronin/network/mixins/telnet.rb +43 -30
  57. data/lib/ronin/network/mixins/udp.rb +59 -40
  58. data/lib/ronin/open_port.rb +12 -5
  59. data/lib/ronin/organization.rb +1 -2
  60. data/lib/ronin/os.rb +10 -3
  61. data/lib/ronin/os_guess.rb +2 -3
  62. data/lib/ronin/password.rb +11 -3
  63. data/lib/ronin/port.rb +7 -2
  64. data/lib/ronin/{engine/exceptions/deploy_failed.rb → repositories.rb} +4 -6
  65. data/lib/ronin/repository.rb +110 -37
  66. data/lib/ronin/ronin.rb +4 -3
  67. data/lib/ronin/{engine.rb → script.rb} +2 -1
  68. data/lib/ronin/{engine → script}/buildable.rb +43 -29
  69. data/lib/ronin/script/class_methods.rb +84 -0
  70. data/lib/ronin/{engine → script}/deployable.rb +61 -40
  71. data/lib/ronin/{engine → script}/exceptions.rb +4 -3
  72. data/lib/ronin/script/exceptions/deploy_failed.rb +27 -0
  73. data/lib/ronin/{engine/exceptions/not_built.rb → script/exceptions/exception.rb} +2 -2
  74. data/lib/ronin/{engine/exceptions/verification_failed.rb → script/exceptions/not_built.rb} +4 -2
  75. data/lib/ronin/script/exceptions/test_failed.rb +27 -0
  76. data/lib/ronin/script/instance_methods.rb +217 -0
  77. data/lib/ronin/script/path.rb +277 -0
  78. data/lib/ronin/{engine/engine.rb → script/script.rb} +52 -15
  79. data/lib/ronin/{engine/verifiable.rb → script/testable.rb} +97 -68
  80. data/lib/ronin/service.rb +1 -2
  81. data/lib/ronin/service_credential.rb +1 -2
  82. data/lib/ronin/software.rb +3 -2
  83. data/lib/ronin/spec/database.rb +0 -4
  84. data/lib/ronin/target.rb +11 -3
  85. data/lib/ronin/tcp_port.rb +3 -2
  86. data/lib/ronin/udp_port.rb +2 -0
  87. data/lib/ronin/ui/cli/cli.rb +6 -0
  88. data/lib/ronin/ui/cli/command.rb +48 -12
  89. data/lib/ronin/ui/cli/commands/campaigns.rb +3 -3
  90. data/lib/ronin/ui/cli/commands/console.rb +2 -1
  91. data/lib/ronin/ui/cli/commands/creds.rb +3 -3
  92. data/lib/ronin/ui/cli/commands/database.rb +1 -17
  93. data/lib/ronin/ui/cli/commands/emails.rb +3 -3
  94. data/lib/ronin/ui/cli/commands/hosts.rb +3 -7
  95. data/lib/ronin/ui/cli/commands/ips.rb +3 -7
  96. data/lib/ronin/ui/cli/commands/repos.rb +5 -17
  97. data/lib/ronin/ui/cli/commands/urls.rb +3 -3
  98. data/lib/ronin/ui/cli/model_command.rb +82 -97
  99. data/lib/ronin/ui/cli/resources_command.rb +89 -0
  100. data/lib/ronin/ui/cli/script_command.rb +115 -0
  101. data/lib/ronin/ui/console.rb +17 -3
  102. data/lib/ronin/ui/output/helpers.rb +18 -0
  103. data/lib/ronin/ui/output/output.rb +20 -1
  104. data/lib/ronin/ui/output/terminal/color.rb +10 -0
  105. data/lib/ronin/ui/output/terminal/raw.rb +10 -0
  106. data/lib/ronin/ui/shell.rb +2 -0
  107. data/lib/ronin/url.rb +47 -12
  108. data/lib/ronin/url_query_param.rb +4 -0
  109. data/lib/ronin/url_scheme.rb +3 -3
  110. data/lib/ronin/user_name.rb +2 -0
  111. data/lib/ronin/version.rb +1 -1
  112. data/lib/ronin/web_credential.rb +6 -3
  113. data/spec/arch_spec.rb +3 -3
  114. data/spec/classes/my_script.rb +21 -0
  115. data/spec/helpers/repos/{test1 → installed}/ronin.yml +1 -1
  116. data/spec/helpers/repos/{hello/cache → installed/scripts}/.keep +0 -0
  117. data/spec/helpers/repos/local/lib/init.rb +1 -0
  118. data/spec/helpers/repos/{hello → local}/lib/stuff/another_test.rb +0 -0
  119. data/spec/helpers/repos/{hello → local}/lib/stuff/test.rb +0 -0
  120. data/spec/helpers/repos/{random → local}/ronin.yml +1 -1
  121. data/spec/helpers/repos/{random/cache → local/scripts}/.keep +0 -0
  122. data/spec/helpers/repos/{hello → remote}/ronin.yml +1 -1
  123. data/spec/helpers/repos/remote/scripts/.keep +0 -0
  124. data/spec/helpers/repos/{test2 → scripts}/ronin.yml +0 -0
  125. data/spec/helpers/repos/scripts/scripts/cached/cached.rb +10 -0
  126. data/spec/helpers/repos/scripts/scripts/cached/missing.rb +10 -0
  127. data/spec/helpers/repos/scripts/scripts/cached/modified.rb +10 -0
  128. data/spec/helpers/repos/scripts/scripts/cached/unmodified.rb +10 -0
  129. data/spec/helpers/repos/scripts/scripts/failures/exceptions.rb +11 -0
  130. data/spec/helpers/repos/{test2/cache/cacheable_model → scripts/scripts/failures}/load_errors.rb +3 -1
  131. data/spec/helpers/repos/{test2/cache/cacheable_model → scripts/scripts/failures}/name_errors.rb +1 -0
  132. data/spec/helpers/repos/scripts/scripts/failures/no_method_errors.rb +10 -0
  133. data/spec/helpers/repos/scripts/scripts/failures/syntax_errors.rb +11 -0
  134. data/spec/helpers/repos/scripts/scripts/failures/validation_errors.rb +11 -0
  135. data/spec/helpers/repos/scripts/scripts/my_scripts/test.rb +16 -0
  136. data/spec/model/spec_helper.rb +0 -2
  137. data/spec/repository_spec.rb +61 -81
  138. data/spec/ronin_spec.rb +2 -2
  139. data/spec/{engine → script}/buildable_spec.rb +9 -9
  140. data/spec/script/classes/buildable_class.rb +15 -0
  141. data/spec/script/classes/deployable_class.rb +13 -0
  142. data/spec/{engine/classes/engine_class.rb → script/classes/script_class.rb} +3 -3
  143. data/spec/{engine/classes/verifiable_class.rb → script/classes/testable_class.rb} +5 -5
  144. data/spec/{engine → script}/deployable_spec.rb +10 -10
  145. data/spec/{cached_file_spec.rb → script/path_spec.rb} +33 -72
  146. data/spec/script/script_spec.rb +130 -0
  147. data/spec/script/testable_spec.rb +117 -0
  148. data/spec/spec_helper.rb +15 -13
  149. metadata +114 -139
  150. data/lib/ronin/cached_file.rb +0 -247
  151. data/lib/ronin/engine/class_methods.rb +0 -135
  152. data/lib/ronin/engine/instance_methods.rb +0 -97
  153. data/lib/ronin/model/cacheable.rb +0 -21
  154. data/lib/ronin/model/cacheable/cacheable.rb +0 -273
  155. data/lib/ronin/model/cacheable/class_methods.rb +0 -60
  156. data/lib/ronin/ui/cli/engine_command.rb +0 -106
  157. data/spec/engine/classes/buildable_class.rb +0 -15
  158. data/spec/engine/classes/deployable_class.rb +0 -13
  159. data/spec/engine/engine_spec.rb +0 -55
  160. data/spec/engine/verifiable_spec.rb +0 -117
  161. data/spec/helpers/repos/hello/lib/init.rb +0 -1
  162. data/spec/helpers/repos/test1/cache/cacheable_model/one.rb +0 -15
  163. data/spec/helpers/repos/test2/cache/cacheable_model/exceptions.rb +0 -7
  164. data/spec/helpers/repos/test2/cache/cacheable_model/no_method_errors.rb +0 -9
  165. data/spec/helpers/repos/test2/cache/cacheable_model/syntax_errors.rb +0 -7
  166. data/spec/helpers/repos/test2/cache/cacheable_model/two.rb +0 -15
  167. data/spec/helpers/repos/test2/cache/cacheable_model/validation_errors.rb +0 -9
  168. data/spec/model/cacheable_spec.rb +0 -96
  169. data/spec/model/models/cacheable_model.rb +0 -13
@@ -17,66 +17,103 @@
17
17
  # along with Ronin. If not, see <http://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
- require 'ronin/engine/class_methods'
21
- require 'ronin/engine/instance_methods'
20
+ require 'ronin/script/instance_methods'
21
+ require 'ronin/script/class_methods'
22
+ require 'ronin/script/path'
22
23
  require 'ronin/model/model'
23
24
  require 'ronin/model/has_name'
24
25
  require 'ronin/model/has_description'
25
26
  require 'ronin/model/has_version'
26
27
  require 'ronin/model/has_license'
27
28
  require 'ronin/model/has_authors'
28
- require 'ronin/model/cacheable'
29
29
  require 'ronin/ui/output/helpers'
30
30
 
31
+ require 'object_loader'
32
+ require 'data_paths/finders'
31
33
  require 'parameters'
32
34
 
33
35
  module Ronin
34
- module Engine
36
+ #
37
+ # @since 1.1.0
38
+ #
39
+ module Script
35
40
  include UI::Output::Helpers
36
41
 
37
42
  #
38
43
  # Adds the following to the Class.
39
44
  #
40
- # * {Engine::InstanceMethods}
45
+ # * {Script::InstanceMethods}
41
46
  # * {Model}
42
47
  # * {Model::HasName}
43
48
  # * {Model::HasDescription}
44
49
  # * {Model::HasVersion}
45
50
  # * {Model::HasLicense}
46
51
  # * {Model::HasAuthors}
47
- # * {Model::Cacheable}
52
+ # * [ObjectLoader](http://rubydoc.info/gems/object_loader)
53
+ # * [DataPaths::Finders](http://rubydoc.info/gems/data_paths)
48
54
  # * [Parameters](http://rubydoc.info/gems/parameters)
49
55
  # * {ClassMethods}
50
56
  #
57
+ # @api semipublic
58
+ #
51
59
  def self.included(base)
52
- base.send :include, Engine::InstanceMethods,
60
+ base.send :include, InstanceMethods,
53
61
  Model,
54
62
  Model::HasName,
55
63
  Model::HasDescription,
56
64
  Model::HasVersion,
57
65
  Model::HasLicense,
58
66
  Model::HasAuthors,
59
- Model::Cacheable,
67
+ ObjectLoader,
68
+ DataPaths::Finders,
60
69
  Parameters
61
70
 
62
71
  base.send :extend, ClassMethods
72
+
73
+ base.module_eval do
74
+ # The class-name of the cached object
75
+ property :type, DataMapper::Property::Discriminator
76
+
77
+ # The cached file of the object
78
+ belongs_to :script_path, Ronin::Script::Path, :required => false
79
+ end
80
+
81
+ Path.has 1, base.relationship_name, base, :child_key => [:script_path_id]
63
82
  end
64
83
 
65
84
  #
66
- # Loads a engine from a file.
85
+ # Loads a script from a file.
67
86
  #
68
87
  # @param [String] path
69
88
  # The path to the file.
70
89
  #
71
- # @return [Engine]
72
- # The loaded engine.
90
+ # @return [Script]
91
+ # The loaded script.
73
92
  #
74
- # @see Model::Cacheable.load_from
93
+ # @see Cacheable.load_from
75
94
  #
76
- # @since 1.0.0
95
+ # @since 1.1.0
77
96
  #
78
- def Engine.load_from(path)
79
- Model::Cacheable.load_from(path)
97
+ # @api public
98
+ #
99
+ def Script.load_from(path)
100
+ path = File.expand_path(path)
101
+ script = ObjectLoader.load_objects(path).find do |obj|
102
+ obj.class < Script
103
+ end
104
+
105
+ unless script
106
+ raise("No cacheable object defined in #{path.dump}")
107
+ end
108
+
109
+ script.instance_variable_set('@script_loaded',true)
110
+ script.script_path = Path.new(
111
+ :path => path,
112
+ :timestamp => File.mtime(path),
113
+ :class_name => script.class.to_s
114
+ )
115
+
116
+ return script
80
117
  end
81
118
  end
82
119
  end
@@ -17,82 +17,95 @@
17
17
  # along with Ronin. If not, see <http://www.gnu.org/licenses/>.
18
18
  #
19
19
 
20
- require 'ronin/engine/exceptions/verification_failed'
20
+ require 'ronin/script/exceptions/test_failed'
21
+ require 'ronin/ui/output/helpers'
21
22
 
22
23
  module Ronin
23
- module Engine
24
+ module Script
24
25
  #
25
- # Adds verification methods to an {Engine}.
26
+ # Adds testing methods to an {Script}.
26
27
  #
27
- module Verifiable
28
+ # @since 1.1.0
29
+ #
30
+ module Testable
31
+ include UI::Output::Helpers
32
+
28
33
  #
29
- # Initializes the verifiable engine.
34
+ # Initializes the testable script.
30
35
  #
31
36
  # @param [Hash] attributes
32
- # Additional attributes for the engine.
37
+ # Additional attributes for the script.
33
38
  #
34
- # @since 1.0.0
39
+ # @since 1.1.0
40
+ #
41
+ # @api semipublic
35
42
  #
36
43
  def initialize(attributes={})
37
44
  super(attributes)
38
45
 
39
- @verify_blocks = []
46
+ @test_blocks = []
40
47
  end
41
48
 
42
49
  #
43
- # Verifies that the engine is properly configured.
50
+ # Tests that the script is properly configured.
44
51
  #
45
52
  # @return [true]
46
53
  # The exploit is built and ready for deployment.
47
54
  #
48
- # @see verify
55
+ # @see test
56
+ #
57
+ # @since 1.1.0
49
58
  #
50
- # @since 1.0.0
59
+ # @api semipublic
51
60
  #
52
- def verify!
53
- print_info "Verifying #{engine_name} ..."
61
+ def test!
62
+ print_info "Testing #{script_type} ..."
54
63
 
55
- @verify_blocks.each { |block| block.call() }
64
+ @test_blocks.each { |block| block.call() }
56
65
 
57
- print_info "#{engine_name} verified!"
66
+ print_info "#{script_type} tested!"
58
67
  return true
59
68
  end
60
69
 
61
70
  protected
62
71
 
63
72
  #
64
- # Flunks the verification.
73
+ # Flunks the testing process.
65
74
  #
66
75
  # @param [String] message
67
- # The message on why the verification failed.
76
+ # The message on why the testing failed.
68
77
  #
69
- # @raise [VerificationFailed]
70
- # The verification failure message.
78
+ # @raise [TestFailed]
79
+ # The testing failure message.
71
80
  #
72
- # @since 1.0.0
81
+ # @since 1.1.0
82
+ #
83
+ # @api public
73
84
  #
74
85
  def flunk(message)
75
- raise(VerificationFailed,message)
86
+ raise(TestFailed,message)
76
87
  end
77
88
 
78
89
  #
79
- # Registers a given block to be called when the engine is verified.
90
+ # Registers a given block to be called when the script is tested.
80
91
  #
81
92
  # @yield []
82
- # The given block will be called when the engine is being verified.
93
+ # The given block will be called when the script is being tested.
94
+ #
95
+ # @return [Script]
96
+ # The script.
83
97
  #
84
- # @return [Engine]
85
- # The engine.
98
+ # @since 1.1.0
86
99
  #
87
- # @since 1.0.0
100
+ # @api public
88
101
  #
89
- def verify(&block)
90
- @verify_blocks << block
102
+ def test(&block)
103
+ @test_blocks << block
91
104
  return self
92
105
  end
93
106
 
94
107
  #
95
- # Verifies an expression is true.
108
+ # Tests whether an expression is true.
96
109
  #
97
110
  # @param [String] message
98
111
  # The failure message if the expression was not true.
@@ -103,17 +116,19 @@ module Ronin
103
116
  # @return [true]
104
117
  # The expression was true.
105
118
  #
106
- # @raise [VerificationFailed]
119
+ # @raise [TestFailed]
107
120
  # The expression was not true.
108
121
  #
109
- # @since 1.0.0
122
+ # @since 1.1.0
123
+ #
124
+ # @api public
110
125
  #
111
- def verify?(message,&block)
112
- verify { flunk(message) unless block.call() }
126
+ def test?(message,&block)
127
+ test { flunk(message) unless block.call() }
113
128
  end
114
129
 
115
130
  #
116
- # Verifies a method has the expected value.
131
+ # Tests whether a method has the expected value.
117
132
  #
118
133
  # @param [Symbol] name
119
134
  # The method to call.
@@ -127,15 +142,17 @@ module Ronin
127
142
  # @return [true]
128
143
  # The method returned the expected value.
129
144
  #
130
- # @raise [VerificationFailed]
145
+ # @raise [TestFailed]
131
146
  # The method did not return the expected value.
132
147
  #
133
- # @since 1.0.0
148
+ # @since 1.1.0
134
149
  #
135
- def verify_equal(name,expected_value,message=nil)
150
+ # @api public
151
+ #
152
+ def test_equal(name,expected_value,message=nil)
136
153
  name = name.to_sym
137
154
 
138
- verify do
155
+ test do
139
156
  actual_value = self.send(name)
140
157
  message ||= "#{name} (#{actual_value.inspect}) must equal #{expected_value.inspect}"
141
158
 
@@ -144,7 +161,7 @@ module Ronin
144
161
  end
145
162
 
146
163
  #
147
- # Verifies a method does not have the unexpected value.
164
+ # Tests whether a method does not have the unexpected value.
148
165
  #
149
166
  # @param [Symbol] name
150
167
  # The method to call.
@@ -158,15 +175,17 @@ module Ronin
158
175
  # @return [true]
159
176
  # The method did not return the unexpected value.
160
177
  #
161
- # @raise [VerificationFailed]
178
+ # @raise [TestFailed]
162
179
  # The method did return the unexpected value.
163
180
  #
164
- # @since 1.0.0
181
+ # @since 1.1.0
182
+ #
183
+ # @api public
165
184
  #
166
- def verify_not_equal(name,unexpected_value,message=nil)
185
+ def test_not_equal(name,unexpected_value,message=nil)
167
186
  name = name.to_sym
168
187
 
169
- verify do
188
+ test do
170
189
  actual_value = self.send(name)
171
190
  message ||= "#{name} (#{actual_value.inspect}) cannot equal #{unexpected_value.inspect}"
172
191
 
@@ -175,7 +194,7 @@ module Ronin
175
194
  end
176
195
 
177
196
  #
178
- # Verifies a method returns a non-`nil` value.
197
+ # Tests whether a method returns a non-`nil` value.
179
198
  #
180
199
  # @param [Symbol] name
181
200
  # The method to call.
@@ -186,15 +205,17 @@ module Ronin
186
205
  # @return [true]
187
206
  # The method returned a non-`nil` value.
188
207
  #
189
- # @raise [VerificationFailed]
208
+ # @raise [TestFailed]
190
209
  # The method returned `nil`.
191
210
  #
192
- # @since 1.0.0
211
+ # @since 1.1.0
193
212
  #
194
- def verify_set(name,message=nil)
213
+ # @api public
214
+ #
215
+ def test_set(name,message=nil)
195
216
  name = name.to_sym
196
217
 
197
- verify do
218
+ test do
198
219
  actual_value = self.send(name)
199
220
  message ||= "#{name} is not set"
200
221
 
@@ -209,7 +230,7 @@ module Ronin
209
230
  end
210
231
 
211
232
  #
212
- # Verifies a method matches the pattern.
233
+ # Tests whether a method matches the pattern.
213
234
  #
214
235
  # @param [Symbol] name
215
236
  # The method to call.
@@ -223,15 +244,17 @@ module Ronin
223
244
  # @return [true]
224
245
  # The method matched the pattern.
225
246
  #
226
- # @raise [VerificationFailed]
247
+ # @raise [TestFailed]
227
248
  # The method did not match the pattern.
228
249
  #
229
- # @since 1.0.0
250
+ # @since 1.1.0
251
+ #
252
+ # @api public
230
253
  #
231
- def verify_match(name,pattern,message=nil)
254
+ def test_match(name,pattern,message=nil)
232
255
  name = name.to_sym
233
256
 
234
- verify do
257
+ test do
235
258
  actual_value = self.send(name)
236
259
  message ||= "#{name} (#{actual_value.inspect}) must match #{pattern.inspect}"
237
260
 
@@ -240,7 +263,7 @@ module Ronin
240
263
  end
241
264
 
242
265
  #
243
- # Verifies a method does not matches the pattern.
266
+ # Tests whether a method does not matches the pattern.
244
267
  #
245
268
  # @param [Symbol] name
246
269
  # The method to call.
@@ -254,15 +277,17 @@ module Ronin
254
277
  # @return [true]
255
278
  # The method matched the pattern.
256
279
  #
257
- # @raise [VerificationFailed]
280
+ # @raise [TestFailed]
258
281
  # The method did not match the pattern.
259
282
  #
260
- # @since 1.0.0
283
+ # @since 1.1.0
261
284
  #
262
- def verify_no_match(name,pattern,message=nil)
285
+ # @api public
286
+ #
287
+ def test_no_match(name,pattern,message=nil)
263
288
  name = name.to_sym
264
289
 
265
- verify do
290
+ test do
266
291
  actual_value = self.send(name)
267
292
  message ||= "#{name} (#{actual_value.inspect}) cannot match #{pattern.inspect}"
268
293
 
@@ -271,7 +296,7 @@ module Ronin
271
296
  end
272
297
 
273
298
  #
274
- # Verify a method has a value in the expected values.
299
+ # Tests a method has a value in the expected values.
275
300
  #
276
301
  # @param [Symbol] name
277
302
  # The method name.
@@ -285,15 +310,17 @@ module Ronin
285
310
  # @return [true]
286
311
  # The method returned one of the expected values.
287
312
  #
288
- # @raise [VerificationFailed]
313
+ # @raise [TestFailed]
289
314
  # The method did not return one of the expected values.
290
315
  #
291
- # @since 1.0.0
316
+ # @since 1.1.0
317
+ #
318
+ # @api public
292
319
  #
293
- def verify_in(name,expected_values,message=nil)
320
+ def test_in(name,expected_values,message=nil)
294
321
  name = name.to_sym
295
322
 
296
- verify do
323
+ test do
297
324
  actual_value = self.send(name)
298
325
  message ||= "#{name} (#{actual_value.inspect}) must be one of #{expected_values.inspect}"
299
326
 
@@ -302,7 +329,7 @@ module Ronin
302
329
  end
303
330
 
304
331
  #
305
- # Verify a method does not have a value in the unexpected values.
332
+ # Tests a method does not have a value in the unexpected values.
306
333
  #
307
334
  # @param [Symbol] name
308
335
  # The method name.
@@ -316,15 +343,17 @@ module Ronin
316
343
  # @return [true]
317
344
  # The method did not return one of the unexpected values.
318
345
  #
319
- # @raise [VerificationFailed]
346
+ # @raise [TestFailed]
320
347
  # The method did return one of the unexpected values.
321
348
  #
322
- # @since 1.0.0
349
+ # @since 1.1.0
350
+ #
351
+ # @api public
323
352
  #
324
- def verify_not_in(name,unexpected_values,message=nil)
353
+ def test_not_in(name,unexpected_values,message=nil)
325
354
  name = name.to_sym
326
355
 
327
- verify do
356
+ test do
328
357
  actual_value = self.send(name)
329
358
  message ||= "#{name} (#{actual_value.inspect}) cannot be one of #{unexpected_values.inspect}"
330
359