apidragon 1.5.1 → 1.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/apidragon/macro.rb +1 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6d461ca23437492ff647bd971c44ee4f3e905de
|
4
|
+
data.tar.gz: 3b3ebe851a6b68f6906e0e85bc1a01b9fef54b72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 538084b43967af7180e2ede0e08e8078ec82ebf3357e843c60e75c351accae14832ede6e87e7163184b3003795f6431396777c0c55818aad3f048e3177d50ed3
|
7
|
+
data.tar.gz: 5e75dcee499544e2c2e4b74ac271b26efc231b2d1864997a5c760019aab101aa113ffe519479d1def9bcb56e918cc84b074f88fc820c3f8f9a85eff25c73ea75
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.5.
|
1
|
+
1.5.2
|
data/lib/apidragon/macro.rb
CHANGED
@@ -54,14 +54,13 @@ class Call < ArgBucket
|
|
54
54
|
curl_request command
|
55
55
|
@response = `#{command}`
|
56
56
|
when 'plugin'
|
57
|
-
|
57
|
+
Plugin.new(@response).run
|
58
58
|
else
|
59
59
|
puts "#{@mode} not supported."
|
60
60
|
end
|
61
61
|
if !@response.nil?
|
62
62
|
@code = @response.code unless @response.is_a? String
|
63
63
|
xml_to_json
|
64
|
-
run_plugin_script unless @plugin.nil?
|
65
64
|
log_response unless @logging == 'true'
|
66
65
|
parse_response unless @output.nil?
|
67
66
|
end
|
@@ -76,7 +75,6 @@ class Call < ArgBucket
|
|
76
75
|
end
|
77
76
|
|
78
77
|
def rest_request
|
79
|
-
puts "Making a #{@mode}: #{@function} with #{@input}"
|
80
78
|
@response = RestClient::Request.execute(method: @mode, url: @function, headers: {params: @input}) { |response, request, result, &block|
|
81
79
|
if [301, 302, 307].include? response.code
|
82
80
|
response.follow_redirection(request, result, &block)
|
@@ -90,10 +88,6 @@ class Call < ArgBucket
|
|
90
88
|
puts 'Internal Error or requested resource was not found.'
|
91
89
|
end
|
92
90
|
|
93
|
-
def run_plugin_script
|
94
|
-
Plugin.new(@response).run
|
95
|
-
end
|
96
|
-
|
97
91
|
def log_response
|
98
92
|
logger = ResponseLogger.new
|
99
93
|
logger.object_log @code, @response
|