prontoforms 0.1.0 → 0.2.0
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 +4 -4
- data/.gitignore +2 -0
- data/lib/prontoforms/client.rb +4 -1
- data/lib/prontoforms/resource_list.rb +4 -5
- data/lib/prontoforms/version.rb +1 -1
- metadata +2 -3
- data/Gemfile.lock +0 -39
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e7c768e20e9e5d22ed71d1670d805adf5aea683eda22749b414813fd7db7e072
|
|
4
|
+
data.tar.gz: 41ce8c58c17c213b2836109cb6f61d122453c70e848004c6c554ebd129fca3f5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 900424f174118c59d4fc7879d60f062054fca5dbc5d7404a047e9737b872ed3db69d2f1eb8cff3d23770e317ada5ea0014295c46c30201e84a29b64086040523
|
|
7
|
+
data.tar.gz: 2c46e843c469f31915e19b54193804890ab88d9d4632127e84c39895587e157561917cedd35a1a927d6cd25522692675f3a4606a7e23d85301aca3c81ed269bc
|
data/.gitignore
CHANGED
data/lib/prontoforms/client.rb
CHANGED
|
@@ -22,7 +22,10 @@ module ProntoForms
|
|
|
22
22
|
query.each { |k, v| req.params[k] = v }
|
|
23
23
|
end
|
|
24
24
|
if res.success?
|
|
25
|
-
ResourceList.new(JSON.parse(res.body),
|
|
25
|
+
ResourceList.new(JSON.parse(res.body), {
|
|
26
|
+
'p' => 0,
|
|
27
|
+
's' => 100
|
|
28
|
+
}.merge(query), method, resource, self)
|
|
26
29
|
else
|
|
27
30
|
nil
|
|
28
31
|
end
|
|
@@ -2,18 +2,17 @@ require 'prontoforms/resource'
|
|
|
2
2
|
|
|
3
3
|
module ProntoForms
|
|
4
4
|
class ResourceList < Resource
|
|
5
|
-
attr_reader :
|
|
5
|
+
attr_reader :query, :method, :resource, :client, :parent
|
|
6
6
|
|
|
7
|
-
def initialize(data,
|
|
7
|
+
def initialize(data, query, method, resource, client, parent = nil)
|
|
8
8
|
super(data, client)
|
|
9
|
-
@
|
|
10
|
-
@offset = offset
|
|
9
|
+
@query = query
|
|
11
10
|
@method = method
|
|
12
11
|
@resource = resource
|
|
13
12
|
end
|
|
14
13
|
|
|
15
14
|
def next
|
|
16
|
-
client.send(method,
|
|
15
|
+
client.send(method, query: query.merge({ 'p' => query['p'] + 1}))
|
|
17
16
|
end
|
|
18
17
|
|
|
19
18
|
def items
|
data/lib/prontoforms/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: prontoforms
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Paul Holden
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-08-
|
|
11
|
+
date: 2020-08-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -78,7 +78,6 @@ files:
|
|
|
78
78
|
- ".travis.yml"
|
|
79
79
|
- CHANGELOG.md
|
|
80
80
|
- Gemfile
|
|
81
|
-
- Gemfile.lock
|
|
82
81
|
- LICENSE.txt
|
|
83
82
|
- README.md
|
|
84
83
|
- Rakefile
|
data/Gemfile.lock
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
prontoforms (0.1.0)
|
|
5
|
-
faraday (~> 1.0)
|
|
6
|
-
|
|
7
|
-
GEM
|
|
8
|
-
remote: https://rubygems.org/
|
|
9
|
-
specs:
|
|
10
|
-
diff-lcs (1.4.4)
|
|
11
|
-
faraday (1.0.1)
|
|
12
|
-
multipart-post (>= 1.2, < 3)
|
|
13
|
-
multipart-post (2.1.1)
|
|
14
|
-
rake (10.5.0)
|
|
15
|
-
rspec (3.9.0)
|
|
16
|
-
rspec-core (~> 3.9.0)
|
|
17
|
-
rspec-expectations (~> 3.9.0)
|
|
18
|
-
rspec-mocks (~> 3.9.0)
|
|
19
|
-
rspec-core (3.9.2)
|
|
20
|
-
rspec-support (~> 3.9.3)
|
|
21
|
-
rspec-expectations (3.9.2)
|
|
22
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
23
|
-
rspec-support (~> 3.9.0)
|
|
24
|
-
rspec-mocks (3.9.1)
|
|
25
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
26
|
-
rspec-support (~> 3.9.0)
|
|
27
|
-
rspec-support (3.9.3)
|
|
28
|
-
|
|
29
|
-
PLATFORMS
|
|
30
|
-
ruby
|
|
31
|
-
|
|
32
|
-
DEPENDENCIES
|
|
33
|
-
bundler (~> 2.0)
|
|
34
|
-
prontoforms!
|
|
35
|
-
rake (~> 10.0)
|
|
36
|
-
rspec (~> 3.0)
|
|
37
|
-
|
|
38
|
-
BUNDLED WITH
|
|
39
|
-
2.1.4
|