create_tests 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (7) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +5 -0
  3. data/LICENSE +21 -0
  4. data/README.md +126 -0
  5. data/bin/create_tests +38 -0
  6. data/lib/create_tests.rb +377 -0
  7. metadata +115 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: a615c53cdb13474c288476a703af9892273a1101f9f59e09868e946936dd1405
4
+ data.tar.gz: 5a0e66501f3d56f64b986d6d0a26471d009a0c89ddc72917b25fcf5236ac1a46
5
+ SHA512:
6
+ metadata.gz: 9b5bd11485c8bcc6e956c1273d1d3e944b8761da13de7809227de17209dfcb4362e0e0d3774c23a1773774bd3e6297de7e3547a0e954a234ec4502a2b89f4cfe
7
+ data.tar.gz: 9261e37cd606b616391c4061c0bd44fae437598bd3e604c960a7de24d1466014bc8f395385effe9f6a81584bc0ecaa79d16b68c20796cbe82f7d4cb2e2c0688e
data/.yardopts ADDED
@@ -0,0 +1,5 @@
1
+ --readme README.md
2
+ --title 'create_tests -- Create Tests automatically from a Requests file. Perfect to be used with the result from importing a Swagger file using the open_api_import gem'
3
+ --charset utf-8
4
+ --markup markdown
5
+ 'lib/*.rb' - '*.md' - 'LICENSE'
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2019 Mario Ruiz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,126 @@
1
+ # CreateTests
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/create_tests.svg)](https://rubygems.org/gems/create_tests)
4
+ [![Build Status](https://travis-ci.com/MarioRuiz/create_tests.svg?branch=master)](https://github.com/MarioRuiz/create_tests)
5
+ [![Coverage Status](https://coveralls.io/repos/github/MarioRuiz/create_tests/badge.svg?branch=master)](https://coveralls.io/github/MarioRuiz/create_tests?branch=master)
6
+
7
+ Create Tests automatically from a Requests file. Perfect to be used with the result from importing a Swagger file using the open_api_import gem. Now we are supporting RSpec.
8
+
9
+ More info about the Request Hashes: https://github.com/MarioRuiz/Request-Hash
10
+
11
+ If you want to know how to import Swagger / Open API files in just a couple of seconds and transform them into Request Ruby Hashes: https://github.com/MarioRuiz/open_api_import
12
+
13
+ We strongly recommend to use nice_http gem for your tests: https://github.com/MarioRuiz/nice_http
14
+
15
+
16
+ ## Installation
17
+
18
+ Install it yourself as:
19
+
20
+ $ gem install create_tests
21
+
22
+
23
+ Take in consideration create_tests gem is using the 'rufo' gem that executes in command line the `rufo` command. In case you experience any trouble with it, visit: https://github.com/ruby-formatter/rufo
24
+
25
+ ## Usage
26
+
27
+ After installation you can run using command line executable or just from Ruby.
28
+
29
+ The execution will create an spec folder where you will have all the RSpec tests. Also it will be added to that file a `helper.rb` file.
30
+
31
+ Also a `settings` folder that will contain a `general.rb` file that will be required by the tests.
32
+
33
+ ### Executable
34
+
35
+ For help and see the options, run in command line / bash: `create_tests -h`
36
+
37
+ Example:
38
+ ```bash
39
+ create_tests ./requests/uber.yaml.rb
40
+ ```
41
+
42
+ ### Ruby file
43
+ Write your ruby code on a file and in command line/bash: `ruby my_file.rb`
44
+
45
+ This is an example:
46
+
47
+ ```ruby
48
+ require 'create_tests'
49
+
50
+ CreateTests.from "./requests/uber.yaml.rb"
51
+
52
+ ```
53
+
54
+ ## Example
55
+
56
+ On this example we will be creating tests for the Uber API using the Swagger / Open API file.
57
+
58
+ 1. Create a folder in your computer called for example `create_tests_example`
59
+
60
+ 2. Copy the file that we have on `./example/requests/uber.yaml` into a folder called `requests` inside `create_tests_example folder`.
61
+
62
+ 3. First we will convert this Swagger file into Requests Hashes by running from `create_tests_example` folder:
63
+ ```bash
64
+ open_api_import ./requests/uber.yaml -fT
65
+ ```
66
+ Now all the Request files were created on the `requests` folder:
67
+ ```
68
+ ** Generated files that contain the code of the requests after importing the Swagger file:
69
+ - requests/uber.yaml_Products.rb
70
+ - requests/uber.yaml_Estimates.rb
71
+ - requests/uber.yaml_User.rb
72
+ ** File that contains all the requires for all Request files:
73
+ - requests/uber.yaml.rb
74
+ ```
75
+
76
+ 4. Now we will create the tests by running:
77
+ ```bash
78
+ create_tests ./requests/uber.yaml.rb
79
+ ```
80
+
81
+ 5. All your tests will be on `spec` folder, and a `general.rb` file inside `settings` folder was created and also take a look at your `helper.rb` file on `spec` folder.
82
+ ```
83
+ - Logs: ./requests/uber.yaml.rb_create_tests.log
84
+ ** Pay attention, if any of the test files exist or the help file exist only will be added the tests, methods that are missing.
85
+ - Settings: ./settings/general.rb
86
+ - Test created: ./spec/User/profile_user_spec.rb
87
+ - Test created: ./spec/User/activity_user_spec.rb
88
+ - Test created: ./spec/Products/list_products_spec.rb
89
+ - Test created: ./spec/Estimates/price_estimates_spec.rb
90
+ - Test created: ./spec/Estimates/time_estimates_spec.rb
91
+ - Helper: ./spec/helper.rb
92
+ ```
93
+
94
+ You can see a reproduction of what we did before on here: https://github.com/MarioRuiz/create_tests/example
95
+
96
+ ## Parameters
97
+
98
+ The parameters can be supplied alone or with other parameters. In case a parameter is not supplied then it will be used the default value.
99
+
100
+ ### mode
101
+
102
+ Accepts three different options: :overwrite, :dont_overwrite and :append. By default :append.
103
+
104
+ append: In case the test file already exists will be only adding those tests that are missing from that file. If the test file doesn't exist, will be created and added all tests.
105
+
106
+ dont_overwrite: In case the test file exists any change will be done. If it doesn't exist then it will be created.
107
+
108
+ overwrite: In case the file exist you will loose the current code and a new code will be created. Take in consideration that all previous content will be deleted.
109
+ If it doesn't exist the test file then it will be created.
110
+
111
+ ```ruby
112
+ require 'create_tests'
113
+
114
+ CreateTests.from "./requests/uber.yaml.rb", mode: :overwrite
115
+
116
+ ```
117
+
118
+
119
+ ## Contributing
120
+
121
+ Bug reports and pull requests are welcome on GitHub at https://github.com/marioruiz/create_tests.
122
+
123
+
124
+ ## License
125
+
126
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/bin/create_tests ADDED
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env ruby
2
+ require 'optparse'
3
+ require 'create_tests'
4
+
5
+ options = {
6
+ mode: :append
7
+ }
8
+
9
+ optparse = OptionParser.new do |opts|
10
+ opts.banner = "Usage: create_tests [requests_file] [options]\n"
11
+ opts.banner+= "Generate tests from the requests file.\n"
12
+ opts.banner+= "More info: https://github.com/MarioRuiz/create_tests\n\n"
13
+ opts.banner+= "In case no options supplied: \n"
14
+ opts.banner+= " * It will be adding the tests that are missing if the test file already exists\n"
15
+
16
+ opts.on("-n", "--dont_overwrite", "In case the test file exists it won't change anything") do
17
+ options[:mode] = :dont_overwrite
18
+ end
19
+
20
+ opts.on("-w", "--overwrite", "In case the test file exists it will be ovewritten, so the previous content will deleted") do
21
+ options[:mode] = :overwrite
22
+ end
23
+
24
+ opts.on("-a", "--append", "In case the test file exists it will be ovewritten, so the previous content will deleted") do
25
+ options[:mode] = :append
26
+ end
27
+
28
+ end
29
+
30
+ optparse.parse!
31
+
32
+ filename = ARGV.pop
33
+ if filename.to_s==''
34
+ puts optparse
35
+ puts "** Need to specify at least a requests file."
36
+ else
37
+ CreateTests.from filename, options
38
+ end
@@ -0,0 +1,377 @@
1
+
2
+ require "logger"
3
+
4
+ ##############################################################################
5
+ #
6
+ ##############################################################################
7
+ class CreateTests
8
+
9
+ ##############################################################################
10
+ # Generate tests from a file that contains Request Hashes.
11
+ # More info about Request Hashes: https://github.com/MarioRuiz/Request-Hash
12
+ # @param requests_file [String]. Path and file name. Could be absolute or relative to project root folder.
13
+ # @param type [Symbol]. (default :request_hash). The kind of content that requests_file contains.
14
+ # @param test [Symbol]. (default :rspec). What kind of tests we want to create
15
+ # @param mode [Symbol]. (default :append). :overwrite, :append, :dont_overwrite. How we want to create the tests.
16
+ # :overwrite, it will overwrite the test, settings, helper... files in case they exist so you will loose your original source code.
17
+ # :dont_overwrite, it will create only the files that don't exist previously
18
+ # :append, it will append or create the tests or helpers that corrently don't exist on every file, but it won't modify any other code.
19
+ ##############################################################################
20
+ def self.from(requests_file, type: :request_hash, test: :rspec, mode: :append)
21
+ begin
22
+ f = File.new("#{requests_file}_create_tests.log", "w")
23
+ f.sync = true
24
+ @logger = Logger.new f
25
+ puts "- Logs: #{requests_file}_create_tests.log"
26
+ rescue StandardError => e
27
+ warn "** Not possible to create the Logger file"
28
+ warn e
29
+ @logger = Logger.new nil
30
+ end
31
+ @logger.info "requests_file: #{requests_file}, type: #{type}, test: #{test}, mode: #{mode}"
32
+ requests_file_orig = requests_file
33
+
34
+ requests_file = if requests_file["./"].nil?
35
+ requests_file
36
+ else
37
+ Dir.pwd.to_s + "/" + requests_file.gsub("./", "")
38
+ end
39
+ unless File.exist?(requests_file)
40
+ message = "** The file #{requests_file} doesn't exist"
41
+ @logger.fatal message
42
+ raise message
43
+ end
44
+
45
+ unless [:request_hash].include?(type)
46
+ message = "** Wrong type parameter: #{type}"
47
+ @logger.fatal message
48
+ raise message
49
+ end
50
+
51
+ unless [:rspec].include?(test)
52
+ message = "** Wrong test parameter: #{test}"
53
+ @logger.fatal message
54
+ raise message
55
+ end
56
+
57
+ unless [:overwrite, :dont_overwrite, :append].include?(mode)
58
+ message = "** Wrong mode parameter: #{mode}"
59
+ @logger.fatal message
60
+ raise message
61
+ end
62
+
63
+ if mode == :overwrite
64
+ message = "** Pay attention, if any of the files exist, will be overwritten"
65
+ @logger.warn message
66
+ warn message
67
+ elsif mode == :append
68
+ message = "** Pay attention, if any of the test files exist or the help file exist only will be added the tests, methods that are missing."
69
+ @logger.warn message
70
+ warn message
71
+ end
72
+
73
+ @params = Array.new
74
+
75
+ Dir.mkdir "./spec" unless test != :rspec or Dir.exist?("./spec")
76
+
77
+ add_settings = true
78
+ settings_file = "./settings/general.rb"
79
+ helper_file = './spec/helper.rb'
80
+ Dir.mkdir "./settings" unless Dir.exist?("./settings")
81
+ if File.exist?(settings_file) and mode!=:overwrite
82
+ message = "** The file #{settings_file} already exists so no content will be added to it.\n"
83
+ message += " Remove the settings file to be able to be generated by create_tests or set mode: :overwrite"
84
+ @logger.warn message
85
+ warn message
86
+ add_settings = false
87
+ end
88
+ add_helper = true
89
+ helper_txt = ""
90
+ if File.exist?(helper_file)
91
+ if mode == :dont_overwrite
92
+ message = "** The file #{helper_file} already exists so no content will be added to it.\n"
93
+ message += " Remove the helper file to be able to be generated by create_tests or set mode: :overwrite or :append"
94
+ @logger.warn message
95
+ warn message
96
+ add_helper = false
97
+ elsif mode == :append
98
+ helper_txt = File.read(helper_file)
99
+ end
100
+ end
101
+
102
+ begin
103
+ eval("require '#{requests_file}'")
104
+ rescue Exception => stack
105
+ message = "\n\n** Error evaluating the ruby file containing the requests: \n" + stack.to_s
106
+ @logger.fatal message
107
+ raise message
108
+ end
109
+
110
+ if Kernel.const_defined?(:Swagger)
111
+ first_module = Swagger
112
+ elsif Kernel.const_defined?(:OpenApi)
113
+ first_module = OpenApi
114
+ elsif Kernel.const_defined?(:Requests)
115
+ first_module = Requests
116
+ else
117
+ message = "** The requests need to be inside a module named Swagger, OpenApi or Requests. For example:\n"
118
+ message += " module Swagger\n module UberApi\n module Products\n def self.list_products\n"
119
+ @logger.fatal message
120
+ raise message
121
+ end
122
+
123
+ modules = get_modules(first_module)
124
+ modules.uniq!
125
+
126
+ if add_settings
127
+ mods_to_include = []
128
+ modules.each do |m|
129
+ mods_to_include << m.scan(/^(.+)::/).join
130
+ end
131
+ mods_to_include.uniq!
132
+ File.open(settings_file, "w") { |file| file.write(create_settings(requests_file_orig, mods_to_include)) }
133
+ message = "- Settings: #{settings_file}"
134
+ @logger.info message
135
+ puts message
136
+ `rufo #{settings_file}`
137
+ end
138
+
139
+ modules.each do |mod_txt|
140
+ mod_name = mod_txt.scan(/::(\w+)$/).join
141
+ folder = "./spec/#{mod_name}"
142
+ unless Dir.exist?(folder)
143
+ Dir.mkdir folder
144
+ @logger.info "Created folder: #{folder}"
145
+ end
146
+ mod_obj = eval("#{mod_txt}")
147
+ mod_methods_txt = eval ("#{mod_txt}.methods(false)")
148
+ mod_methods_txt.each do |method_txt|
149
+ test_file = "#{folder}/#{method_txt}_spec.rb"
150
+ if File.exist?(test_file) and mode==:dont_overwrite
151
+ message = "** The file #{test_file} already exists so no content will be added to it.\n"
152
+ message += " Remove the test file to be able to be generated by create_tests or set mode: :overwrite, or mode: :append"
153
+ @logger.warn message
154
+ warn message
155
+ else
156
+ if File.exist?(test_file) and mode == :append
157
+ test_txt = File.read(test_file)
158
+ else
159
+ test_txt = ''
160
+ end
161
+ modified, txt = create_test(mod_txt, method_txt, mod_obj.method(method_txt),test_txt)
162
+ File.open(test_file, "w") { |file| file.write(txt) }
163
+ `rufo #{test_file}`
164
+ if test_txt == ""
165
+ message = "- Test created: #{test_file}"
166
+ elsif modified
167
+ message = "- Test updated: #{test_file}"
168
+ else
169
+ message = "- Test without changes: #{test_file}"
170
+ end
171
+ @logger.info message
172
+ unless message.include?("without changes")
173
+ puts message
174
+ end
175
+ end
176
+ end
177
+ end
178
+
179
+ if add_helper
180
+ @params.uniq!
181
+ File.open(helper_file, "w") { |file| file.write(create_helper(@params, helper_txt)) }
182
+ message = "- Helper: #{helper_file}"
183
+ @logger.info message
184
+ puts message
185
+ `rufo #{helper_file}`
186
+ end
187
+
188
+
189
+ end
190
+
191
+ class << self
192
+ # Returns array with the modules that include the http methods
193
+ # fex: ['Swagger::UberApi::V1_0_0::Products', 'Swagger::UberApi::V1_0_0::Cities']
194
+ private def get_modules(mod)
195
+ modules = []
196
+ mod = eval(mod) if mod.kind_of?(String)
197
+ mod.constants.each do |m|
198
+ o = eval ("#{mod}::#{m}.constants")
199
+ if o.size == 0
200
+ modules << "#{mod}::#{m}"
201
+ else
202
+ modules = get_modules("#{mod}::#{m}")
203
+ end
204
+ end
205
+ modules
206
+ end
207
+
208
+ # Create the settings file
209
+ private def create_settings(requests_file_orig, modules_to_include)
210
+ output = "# required libraries
211
+ require 'nice_http'
212
+ require 'nice_hash'
213
+ require 'string_pattern'
214
+ require 'pathname'
215
+
216
+ # Root directory for the project
217
+ ROOT_DIR = Pathname.new(__FILE__).join('..').join('..')
218
+
219
+ # Global settings
220
+ # in case supplied HOST=XXXXX in command line or added to ENV variables
221
+ # fex: HOST=myhosttotest
222
+ ENV['HOST'] ||= 'defaulthost'
223
+ NiceHttp.host = ENV['HOST']
224
+ # Add here the headers for authentication for example
225
+ NiceHttp.headers = {
226
+ Auhentication: 'Token'
227
+ }
228
+
229
+ # Requests
230
+ require_relative '.#{requests_file_orig}'\n
231
+ require_relative '../spec/helper.rb'\n"
232
+
233
+ modules_to_include.each do |m|
234
+ output += "include #{m}\n"
235
+ end
236
+ output
237
+ end
238
+
239
+ # Create the helper file
240
+ private def create_helper(params, helper_txt)
241
+ if helper_txt == ""
242
+ output = "# for the case we want to use it standalone, not inside the project
243
+ require '../settings/general' unless defined?(ROOT_DIR)
244
+
245
+ # On the methods you can pass the active http connection or none, then it will be created a new one.
246
+ # Examples from tests:
247
+ # Helper.the_method_i_call(@http)
248
+ # Helper.the_method_i_call()
249
+ module Helper\n"
250
+ else
251
+ output = helper_txt
252
+ output.gsub!(/\s*end\s*\Z/,"\n")
253
+ end
254
+
255
+ params.each do |p|
256
+ unless output.include?("def self.#{p.gsub("@","")}(")
257
+ @logger.info "= Helper: added method #{p.gsub("@","")}" unless helper_txt == ""
258
+ output += "def self.#{p.gsub("@","")}(http = NiceHttp.new())\n"
259
+ output += 'http.logger.info "Helper.#{__method__}"'
260
+ output += "\n\n"
261
+ output += "return ''"
262
+ output += "end\n"
263
+ end
264
+ end
265
+
266
+ output += "\nend"
267
+
268
+ end
269
+
270
+ # Return true or false and the test source code
271
+ private def create_test(module_txt, method_txt, method_obj, test_txt)
272
+ modified = false
273
+ mod_name = module_txt.scan(/::(\w+)$/).join
274
+ req_txt = "#{method_txt}("
275
+ params = []
276
+ method_obj.parameters.each do |p|
277
+ if p[0] == :req #required
278
+ params << "@#{p[1]}"
279
+ end
280
+ end
281
+ req_txt += params.join(", ")
282
+ req_txt += ")"
283
+ request = eval("#{module_txt}.#{req_txt}")
284
+
285
+ req_txt = "#{mod_name}.#{req_txt}"
286
+ params_declaration_txt = ""
287
+ ## todo: add param in case of :append
288
+ params.each do |p|
289
+ params_declaration_txt << "#{p} = Helper.#{p.gsub('@','')}(@http)\n"
290
+ @params << p
291
+ end
292
+
293
+ if test_txt ==""
294
+ modified = true
295
+ output = "
296
+ require_relative '../../settings/general'
297
+
298
+ RSpec.describe #{mod_name}, '##{method_txt}' do
299
+ before do
300
+ # create connection on default host and store the logs on the_name_of_file.rb.log
301
+ @http = NiceHttp.new({log: \"\#{__FILE__}.log\"})
302
+
303
+ #{params_declaration_txt}@request = #{req_txt}
304
+ end\n"
305
+ else
306
+ output = test_txt
307
+ output.gsub!(/\s*end\s*\Z/,"\n")
308
+ end
309
+
310
+
311
+ tests = Hash.new()
312
+
313
+ # first response on responses is the one expected to be returned when success
314
+ if request.key?(:responses) and request[:responses].size > 0
315
+ code = request[:responses].keys[0]
316
+ tests["it 'has correct structure in succesful response' "] = "do
317
+ resp = @http.#{request[:method]}(@request)
318
+ expect(resp.code).to eq #{code}
319
+ expect(NiceHash.compare_structure(@request.responses._#{code}.data, resp.data.json, true)).to be true
320
+ end
321
+ "
322
+ end
323
+
324
+ tests["it 'doesn\\'t retrieve data if not authenticated'"] = "do
325
+ @http.headers = {}
326
+ resp = @http.#{request[:method]}(@request)
327
+ expect(resp.code).to be_between('400', '499')
328
+ expect(NiceHash.compare_structure(@request.responses[resp.code.to_sym].data, resp.data.json)).to eq true
329
+ expect(resp.message).to eq @request.responses[resp.code.to_sym].message
330
+ end
331
+ "
332
+ if params.size > 0
333
+ missing_param = ""
334
+ params.each do |p|
335
+ r = req_txt.gsub(/#{p}([),])/, '""\1')
336
+ missing_param += "
337
+ request = #{r}
338
+ resp = @http.#{request[:method]}(request)
339
+ expect(resp.code).to be_between('400', '499')
340
+ expect(resp.message).to match /\#{request.responses[resp.code.to_sym].message}/i
341
+ "
342
+ end
343
+ missing_param += "end\n"
344
+ tests["it 'returns error if required parameter missing' "] = "do\n#{missing_param}"
345
+ end
346
+
347
+ if request.key?(:data) and request.key?(:data_required)
348
+ missing_param_data = ""
349
+ missing_param_data += "
350
+ @request[:data_required].each do |p|
351
+ @request.values_for = { p => '' }
352
+ resp = @http.#{request[:method]}(@request)
353
+ expect(resp.code).not_to be_between('200', '299')
354
+ if @request.responses.key?(resp.code.to_sym)
355
+ expect(resp.message).to match /\#{@request.responses[resp.code.to_sym].message}/i
356
+ end
357
+ end
358
+ "
359
+ missing_param_data += "end\n"
360
+ tests["it 'returns error if required parameter on data missing' do\n"] = missing_param_data
361
+ end
362
+
363
+ tests.each do |k,v|
364
+ unless output.include?(k.gsub(" '",' "').gsub("' ",'" ')) or
365
+ output.include?(k.gsub(' "'," '").gsub('" ',"' "))
366
+ modified = true
367
+ message = " = test added #{k} for #{method_txt}"
368
+ @logger.info message
369
+ puts message unless test_txt == ''
370
+ output += "#{k}#{v}"
371
+ end
372
+ end
373
+ output += "\nend"
374
+ return modified, output
375
+ end
376
+ end
377
+ end
metadata ADDED
@@ -0,0 +1,115 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: create_tests
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Mario Ruiz
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-03-02 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rufo
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.4'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.4.1
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '0.4'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 0.4.1
33
+ - !ruby/object:Gem::Dependency
34
+ name: rspec
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '3.8'
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 3.8.0
43
+ type: :development
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - "~>"
48
+ - !ruby/object:Gem::Version
49
+ version: '3.8'
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: 3.8.0
53
+ - !ruby/object:Gem::Dependency
54
+ name: coveralls
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '0.8'
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: 0.8.22
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '0.8'
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ version: 0.8.22
73
+ description: CreateTests -- Create Tests automatically from a Requests file. Perfect
74
+ to be used with the result from importing a Swagger file using the open_api_import
75
+ gem
76
+ email: marioruizs@gmail.com
77
+ executables:
78
+ - create_tests
79
+ extensions: []
80
+ extra_rdoc_files:
81
+ - LICENSE
82
+ - README.md
83
+ files:
84
+ - ".yardopts"
85
+ - LICENSE
86
+ - README.md
87
+ - bin/create_tests
88
+ - lib/create_tests.rb
89
+ homepage: https://github.com/MarioRuiz/create_tests
90
+ licenses:
91
+ - MIT
92
+ metadata: {}
93
+ post_install_message: Thanks for installing! Visit us on https://github.com/MarioRuiz/create_tests
94
+ rdoc_options: []
95
+ require_paths:
96
+ - lib
97
+ required_ruby_version: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: '2.3'
102
+ required_rubygems_version: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ version: '0'
107
+ requirements: []
108
+ rubyforge_project:
109
+ rubygems_version: 2.7.6
110
+ signing_key:
111
+ specification_version: 4
112
+ summary: CreateTests -- Create Tests automatically from a Requests file. Perfect to
113
+ be used with the result from importing a Swagger file using the open_api_import
114
+ gem
115
+ test_files: []