response_mate 0.1.3 → 0.1.4

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OWZhODJkYjQwYTQxNjg3NzVhM2QyNTM4NWM1ZDZiNzZjYjYzMDY2YQ==
4
+ NzI5Njg3MWQzNWU1NjI1ZjIwMzQyMDY2NTYyNzE0NzkzZjU0NWJkOA==
5
5
  data.tar.gz: !binary |-
6
- MDJiNzcxNDZiOTk1MjUxODEwN2IxYzIzZDdhMTM0ZmNiNjJhNmY2Ng==
6
+ YTg5YjUwZjVhZmRhN2JlNWFhY2RkOTU4NjQ1MTFkMTM1MzVjODEyNw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NWM5YmNhODBiODNlODYzM2UzMWEzYWZmYmZhNTdkNDU4OWIxZjE2ODQ5ZTIx
10
- M2YxYWUyYmRjNjYxNmY4ZmViNzI5MTcwNmU3MTk0ODY4YmUwMTM3NmEwZjVi
11
- OTUyMWJhMjAyNWY5MmQyYTkzZmJjZjMwZDVkNDk4YWZjZTEyY2E=
9
+ NjljNzhjMjNhNjJjZTc1ZWY5YWQ0YWNiNDU5ODhiOTg5MjhiOGEwMDgxMzQ0
10
+ NGVmYjQwYjg4ZmNmN2UxOTdmN2Y4YjY3YTNkNTQ1YTI3ZDQ4ZGUwYmQyY2I3
11
+ YjY2MzA1N2RiZjM3NGQ5ZDg5OTJmNDU0Yzg5NWVmNTNlMmJiNzI=
12
12
  data.tar.gz: !binary |-
13
- ZjI4ZWExYzg4ZTlhZjI2ZGY4ZDQ0M2VmOWE5ZTNmNzU4NjExOTFlMzRlMmNi
14
- YjNkZDY4YjZhNjEwMDAxYjUyOWI5YWU2ZjlhNGQ0MjgzMGE2OTNiOGYzYTQw
15
- ZmJhMWIyNGJlNGIzMjIxMzgzMjY3NjFmNmM1ZTE3NWE3YjdiYzM=
13
+ ZThjN2QzMmEwNzFiYzg5ZjE1M2FjMTk2ZGY1M2YxOTEwNzI5ZWI3N2FhNTli
14
+ NjE0OWQyMTVkZmUwODQ1M2QwNzU1NDJiM2RhZmRlZTEyOWFmNDc0YmNlMzE5
15
+ ZTUwNThmMzBmMGVhNGJkYzE0MjlkMGM2NGI4OWJkMTVmZjUzYmM=
@@ -57,7 +57,7 @@ module ResponseMate
57
57
  desc 'export',
58
58
  'Export to one of the available formats'
59
59
  method_option :requests_manifest, aliases: '-r'
60
- method_option :format, aliases: '-f'
60
+ method_option :format, required: true, aliases: '-f'
61
61
  method_option :pretty, aliases: '-p', default: false
62
62
  def export
63
63
  ResponseMate::Commands::Export.new(args, options).run
@@ -12,13 +12,6 @@ module ResponseMate
12
12
  end
13
13
 
14
14
  def run
15
- unless options[:format].present?
16
- @options[:format] = choose { |menu|
17
- menu.prompt = 'Please pick one of the available formats'
18
- menu.choice(:postman)
19
- }.to_s
20
- end
21
-
22
15
  output = ResponseMate::Exporter.new(options).export
23
16
  if options[:pretty]
24
17
  puts JSON.pretty_generate(output)
@@ -35,10 +35,10 @@ module ResponseMate::Exporters
35
35
  def build_requests
36
36
  manifest.requests.each do |request|
37
37
  req = ResponseMate::Manifest.parse_request(request.request)
38
- url = if req['params'].present?
39
- "#{req['path']}?#{req['params'].to_query}"
38
+ url = if req[:params].present?
39
+ "#{req[:path]}?#{req[:params].to_query}"
40
40
  else
41
- req['path']
41
+ req[:path]
42
42
  end
43
43
 
44
44
  out_req = {
@@ -46,13 +46,13 @@ module ResponseMate::Exporters
46
46
  collectionId: out[:id],
47
47
  data: [],
48
48
  description: '',
49
- method: req['verb'],
50
- name: request['key'],
49
+ method: req[:verb],
50
+ name: request.key,
51
51
  url: url,
52
52
  version: 2,
53
53
  responses: [],
54
54
  dataMode: 'params',
55
- headers: request['headers'] || manifest.default_headers
55
+ headers: request.headers || manifest.default_headers
56
56
  }
57
57
 
58
58
  out[:order] << out_req[:id]
@@ -1,5 +1,5 @@
1
1
  # coding: utf-8
2
2
 
3
3
  module ResponseMate
4
- VERSION = '0.1.3'
4
+ VERSION = '0.1.4'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: response_mate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dimitris Zorbas