apidragon 1.4.4 → 1.4.5

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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 44bb4be6262015a0aa0ff2dba46b53287fc0b850
4
- data.tar.gz: e0d111a9314736c705ce63c019becbd979f288ba
3
+ metadata.gz: ba5645d669bed63e76fa86bb835fc5f0ab27b874
4
+ data.tar.gz: bf3ff860f629dd508006626bee57bff1685583f2
5
5
  SHA512:
6
- metadata.gz: 18ed7633a06eea950570edb21a0ee5753730d2f2608a806136730f573d0c55150ee582e568b52927aceca09061bfa1988e6d702ccfa99fb9495e1fc985f63071
7
- data.tar.gz: caf38194a06121ad8129c4accf4347e9b2ea114565c689895b947037e26bc0bf1d7b449e497591d374565b1eb0a5141fbfa7ce8c735b4175dfdb5390a3264700
6
+ metadata.gz: fdf4c6a02cc8f8fec3e89e7345c46af29f6b1118ca8f5b1c5f4a0c5cbbd317b4c250c2aef10b6fb55787d8c1eacb356ff2c920abd9debe6b3c8266093df5ce8d
7
+ data.tar.gz: 26c6832181e0a17d7754d7e40559e77ccebb4a97bb8f2623db9b565de46a38289412c597b42a453de4e0308438b4edb80ed6b7b174a018c6e9fd6ba5495e9762
data/README.md CHANGED
@@ -113,7 +113,9 @@ Each call can have a `record` option, where you can specify what output variable
113
113
  ```
114
114
 
115
115
  ## Qualifier variables
116
- Further, for more specific output parsing, you can specify a qualifier variable. As long as responses are returned as `xml` or `json`, output variables can be associated with one of your pre-defined values for cases like parsing lists of values that have several attribute fields.
116
+ apidragon automatically returns the first instance it finds of the specified output variable in the response.
117
+
118
+ For more specific output parsing, you can specify a qualifier variable. As long as responses are returned as `xml` or `json`, output variables can be associated with one of your pre-defined values for cases like parsing lists of values that have several attribute fields.
117
119
 
118
120
  - e.g.:
119
121
  ```yaml
@@ -125,12 +127,12 @@ Further, for more specific output parsing, you can specify a qualifier variable.
125
127
  So if the call returns a list like this: `[{username => bob, id => 1234}, {username => alice, id => 5678}]`, you can always return the `id` associated with the `username` variable defined in the `vars` section.
126
128
 
127
129
  ## logging
128
- For each call, set `logging` to `true` to enable or `false` to disable. (Note: must explicitly set `logging: false` if a previous call has it set to `true`. Still trying to figure out why this is)
130
+ Loggin can be disabled by specifying `logging` to be `false`, as per below.
129
131
 
130
132
  - e.g.:
131
133
  ```yaml
132
134
  testcall:
133
- logging: true
135
+ logging: false
134
136
  ```
135
137
 
136
138
  ## plugin
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.4
1
+ 1.4.5
data/bin/apidragon CHANGED
@@ -6,7 +6,7 @@ require_relative '../lib/apidragon.rb'
6
6
 
7
7
  Commander.configure do
8
8
  program :name, 'apidragon'
9
- program :version, '1.4.4'
9
+ program :version, '1.4.5'
10
10
  program :description, 'CLI for automating api requests'
11
11
  program :help, 'Author', 'Isaiah Thiessen <isaiah.thiessen@telus.com>'
12
12
 
@@ -99,10 +99,11 @@ class Call < ArgBucket
99
99
  end
100
100
 
101
101
  def xml_to_json
102
- @response = JSON.parse(Hash.from_xml(@response).to_json) unless !@response.include?('<?xml')
102
+ @response = Hash.from_xml(@response).to_json unless !@response.include?('<?xml')
103
103
  end
104
104
 
105
105
  def parse_response
106
+ @response = JSON.parse @response
106
107
  @output.each do |var|
107
108
  if var.is_a? String
108
109
  parser = Parser.new(var, nil, @response)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apidragon
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.4
4
+ version: 1.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - isaiah thiessen