try_api 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 302569a698388c272c2d099ef549b396ad9a05f8
|
4
|
+
data.tar.gz: 4c86fce3728fab0c9405587327b614b9a52d2a3a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 722ffabb57aa60a06aae2c6d69d57d2c49126b675d944b3b3e2e62b0c466014c2491919e8c5ff05ccfa5f2a721885a15a3b7df2f83c04cf30081306851c7d5f7
|
7
|
+
data.tar.gz: 65dd4bf232109fcbebc681c7319593bb2ccbe473fe6fe01cf1495db95921455d87a42d0fda6ee9420aa3ded6d096bb449f58250a94a7cd8eed2a46a6a6d7bc3e
|
@@ -96,10 +96,13 @@ TryApiApp.controller 'HomeController', [
|
|
96
96
|
|
97
97
|
switch method.method.toLowerCase()
|
98
98
|
when 'post', 'delete', 'put'
|
99
|
-
fd.append 'a', 'a' # TODO sending empty array causes EOFError
|
100
99
|
|
101
100
|
$.each method.parameters, (i) ->
|
102
101
|
$scope.addParameterToForm fd, this
|
102
|
+
|
103
|
+
if fd.keys().next().done
|
104
|
+
fd = {}
|
105
|
+
|
103
106
|
when 'get'
|
104
107
|
url = ''
|
105
108
|
$.each method.parameters, (i) ->
|
@@ -184,9 +187,11 @@ TryApiApp.controller 'HomeController', [
|
|
184
187
|
if status = 422
|
185
188
|
alert data.error
|
186
189
|
|
187
|
-
$scope.pathBuild = (path, next) ->
|
190
|
+
$scope.pathBuild = (path, next = '') ->
|
191
|
+
if next
|
192
|
+
next = '[' + next + ']'
|
188
193
|
if path
|
189
|
-
path +=
|
194
|
+
path += next
|
190
195
|
else
|
191
196
|
path = next
|
192
197
|
return path
|
@@ -201,7 +206,6 @@ TryApiApp.controller 'HomeController', [
|
|
201
206
|
form.append path, parameter.value || ''
|
202
207
|
|
203
208
|
$scope.addArrayToForm = (form, parameter, path = '') ->
|
204
|
-
form.append 'a', 'a' # TODO sending empty array causes EOFError
|
205
209
|
path = ($scope.pathBuild path, parameter.name) + '[]'
|
206
210
|
$.each parameter.values, ->
|
207
211
|
$.each this, ->
|
data/lib/try_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: try_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Skubenych
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|