response_mate 0.3.1 → 0.3.2
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.
- data/Gemfile +1 -1
- data/Gemfile.lock +10 -10
- data/lib/response_mate/cli.rb +20 -10
- data/lib/response_mate/exporters/postman/environment.rb +3 -1
- data/lib/response_mate/version.rb +1 -1
- metadata +3 -3
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
response_mate (0.3.
|
4
|
+
response_mate (0.3.2)
|
5
5
|
activesupport
|
6
6
|
addressable
|
7
7
|
awesome_print
|
@@ -15,7 +15,7 @@ PATH
|
|
15
15
|
GEM
|
16
16
|
remote: https://rubygems.org/
|
17
17
|
specs:
|
18
|
-
activesupport (4.1.
|
18
|
+
activesupport (4.1.8)
|
19
19
|
i18n (~> 0.6, >= 0.6.9)
|
20
20
|
json (~> 1.7, >= 1.7.7)
|
21
21
|
minitest (~> 5.1)
|
@@ -42,7 +42,7 @@ GEM
|
|
42
42
|
debugger-linecache (1.2.0)
|
43
43
|
debugger-ruby_core_source (1.3.5)
|
44
44
|
diff-lcs (1.2.5)
|
45
|
-
docile (1.1.
|
45
|
+
docile (1.1.5)
|
46
46
|
fakeweb (1.2.8)
|
47
47
|
faraday (0.9.0)
|
48
48
|
multipart-post (>= 1.2, < 3)
|
@@ -72,10 +72,10 @@ GEM
|
|
72
72
|
lumberjack (1.0.5)
|
73
73
|
method_source (0.8.2)
|
74
74
|
mime-types (2.0)
|
75
|
-
minitest (5.4.
|
76
|
-
multi_json (1.
|
75
|
+
minitest (5.4.3)
|
76
|
+
multi_json (1.10.1)
|
77
77
|
multipart-post (2.0.0)
|
78
|
-
mustache (0.99.
|
78
|
+
mustache (0.99.6)
|
79
79
|
parser (2.1.9)
|
80
80
|
ast (>= 1.1, < 3.0)
|
81
81
|
slop (~> 3.4, >= 3.4.5)
|
@@ -109,9 +109,9 @@ GEM
|
|
109
109
|
rainbow (>= 1.99.1, < 3.0)
|
110
110
|
ruby-progressbar (~> 1.4)
|
111
111
|
ruby-progressbar (1.5.1)
|
112
|
-
simplecov (0.
|
112
|
+
simplecov (0.9.1)
|
113
113
|
docile (~> 1.1.0)
|
114
|
-
multi_json
|
114
|
+
multi_json (~> 1.0)
|
115
115
|
simplecov-html (~> 0.8.0)
|
116
116
|
simplecov-html (0.8.0)
|
117
117
|
slop (3.5.0)
|
@@ -121,7 +121,7 @@ GEM
|
|
121
121
|
thread_safe (0.3.4)
|
122
122
|
timers (1.1.0)
|
123
123
|
tins (0.13.1)
|
124
|
-
tzinfo (1.2.
|
124
|
+
tzinfo (1.2.2)
|
125
125
|
thread_safe (~> 0.1)
|
126
126
|
|
127
127
|
PLATFORMS
|
@@ -138,4 +138,4 @@ DEPENDENCIES
|
|
138
138
|
response_mate!
|
139
139
|
rspec (~> 2.14.0)
|
140
140
|
rubocop
|
141
|
-
simplecov (~> 0.
|
141
|
+
simplecov (~> 0.9)
|
data/lib/response_mate/cli.rb
CHANGED
@@ -4,9 +4,12 @@ module ResponseMate
|
|
4
4
|
package_name 'response_mate'
|
5
5
|
|
6
6
|
desc 'record', 'Perform requests and record their output'
|
7
|
-
method_option :requests_manifest, aliases: '-r'
|
8
|
-
|
9
|
-
method_option :
|
7
|
+
method_option :requests_manifest, aliases: '-r', banner:
|
8
|
+
'requests.yml'
|
9
|
+
method_option :output_dir, aliases: '-o', type: :string, banner:
|
10
|
+
'./a_dir_to_place_the_recordings'
|
11
|
+
method_option :keys, aliases: '-k', type: :array, default: [], banner:
|
12
|
+
'key_to_record1 key_to_record2'
|
10
13
|
def record
|
11
14
|
ResponseMate::Commands::Record.new(args, options).run
|
12
15
|
rescue ResponseMate::KeysNotFound => e
|
@@ -14,13 +17,15 @@ module ResponseMate
|
|
14
17
|
end
|
15
18
|
|
16
19
|
desc 'inspect [key1,key2]', 'Perform requests and print their output'
|
17
|
-
method_option :requests_manifest, aliases: '-r'
|
20
|
+
method_option :requests_manifest, aliases: '-r', banner:
|
21
|
+
'requests.yml'
|
18
22
|
def inspect(*keys) # rubocop:disable Lint/UnusedMethodArgument
|
19
23
|
ResponseMate::Commands::Inspect.new(args, options).run
|
20
24
|
end
|
21
25
|
|
22
26
|
desc 'list', 'List available keys to record or inspect'
|
23
|
-
method_option :requests_manifest, aliases: '-r'
|
27
|
+
method_option :requests_manifest, aliases: '-r', banner:
|
28
|
+
'requests.yml'
|
24
29
|
def list # rubocop:disable Lint/UnusedMethodArgument
|
25
30
|
ResponseMate::Commands::List.new(args, options).run
|
26
31
|
end
|
@@ -32,11 +37,16 @@ module ResponseMate
|
|
32
37
|
map ['--version'] => :version
|
33
38
|
|
34
39
|
desc 'export', 'Export manifest or environment to one of the available formats'
|
35
|
-
method_option :requests_manifest, aliases: '-r'
|
36
|
-
|
37
|
-
method_option :
|
38
|
-
|
39
|
-
method_option :
|
40
|
+
method_option :requests_manifest, aliases: '-r', banner:
|
41
|
+
'requests.yml'
|
42
|
+
method_option :format, required: true, aliases: '-f', default: 'postman', banner:
|
43
|
+
'postman'
|
44
|
+
method_option :pretty, aliases: '-p', default: false, banner:
|
45
|
+
'true(Formats Output)|false'
|
46
|
+
method_option :resource, required: true, aliases: '-res', default: 'manifest', banner:
|
47
|
+
'environment(variables)|manifest(requests)'
|
48
|
+
method_option :upload, type: :boolean, aliases: '-u', banner:
|
49
|
+
'true(Uploads and displays the link)'
|
40
50
|
def export
|
41
51
|
ResponseMate::Commands::Export.new(args, options).run
|
42
52
|
end
|
@@ -20,9 +20,11 @@ class ResponseMate::Exporters::Postman
|
|
20
20
|
private
|
21
21
|
|
22
22
|
def build_structure
|
23
|
+
timestamp = Time.now.strftime("%Y%m%d%H%M%S")
|
24
|
+
|
23
25
|
out.merge!(
|
24
26
|
id: SecureRandom.uuid,
|
25
|
-
name: '
|
27
|
+
name: "#{timestamp}_#{environment.env['environment_name'] || 'unnamed' }",
|
26
28
|
values: [],
|
27
29
|
timestamp: Time.now.to_i
|
28
30
|
)
|
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.3.
|
4
|
+
version: 0.3.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-12-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -288,7 +288,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
288
288
|
version: '0'
|
289
289
|
requirements: []
|
290
290
|
rubyforge_project:
|
291
|
-
rubygems_version: 1.8.23
|
291
|
+
rubygems_version: 1.8.23
|
292
292
|
signing_key:
|
293
293
|
specification_version: 3
|
294
294
|
summary: A cli tool for browsing and recording api requests with ease
|