inforouter 0.2.6 → 0.2.7
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,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
MDAzODA3YTcxOWNkYmUwOWFhMzUzNzZhYTg2MmEyZWZmZGQyZTA5MA==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
YWJhNjFkZWY2YjZlMjJkODBlNmE5Y2U3ZWZlY2QxMzcwYWI1MTEyMw==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
NTExZmY5MmFmYjdkNGUxNGFhMjRlZGJlMDE0YmZmODE4NzA0YmQ1MGQzMjJk
|
|
10
|
+
MWJhZWQxMmE4Y2NlYzFkOWQ2MWNlZTg1OTU3YThiNTRiNDI4Y2JmNDIyOWE2
|
|
11
|
+
YTkxYmZkZDc3N2M2OGIyNjk4MTIyN2I5MTkxZmIwNGM0ZWMyYTY=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
ZTMyZjc4ZTIwOWUxZmRmOWJhZTE0OGIyYzQyMGNkZWNhMzM1MDM3YjIwZDAw
|
|
14
|
+
Yjc4Y2VlYWVkM2UyZDUxNTg2MWViMGI5ZjAxMGM3ZjY3MzFmZDIzNzM2M2Q2
|
|
15
|
+
ZmZiOTNjNDY3OTk2NWJkMDZiMzgwN2NlNWI0NzRkNmUxZjhkNTg=
|
data/lib/inforouter/folder.rb
CHANGED
|
@@ -33,6 +33,13 @@ module Inforouter #:nodoc:
|
|
|
33
33
|
super params
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
# Find by path.
|
|
37
|
+
def self.find(options = {})
|
|
38
|
+
folder = Folder.new(options)
|
|
39
|
+
response = Inforouter.client.request :get_folder, folder.send(:folder_params)
|
|
40
|
+
Inforouter::Responses::Folder.parse response
|
|
41
|
+
end
|
|
42
|
+
|
|
36
43
|
def description
|
|
37
44
|
@description ||= begin
|
|
38
45
|
response = Inforouter.client.request :get_folder, folder_params
|
|
@@ -15,8 +15,9 @@ module Inforouter #:nodoc:
|
|
|
15
15
|
# @return [Array<Inforouter::Document>]
|
|
16
16
|
def parse(savon_response)
|
|
17
17
|
response = new(savon_response)
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
data = response.match('get_documents1_response/get_documents1_result/response')
|
|
19
|
+
return [] if data[:@itemcount].to_i == 0
|
|
20
|
+
data[:d].map do |document|
|
|
20
21
|
Inforouter::Document.new(
|
|
21
22
|
id: document[:@id].to_i,
|
|
22
23
|
name: document[:@n].strip,
|
|
@@ -15,7 +15,9 @@ module Inforouter #:nodoc:
|
|
|
15
15
|
# @return [Inforouter::Folder]
|
|
16
16
|
def parse(savon_response)
|
|
17
17
|
response = new(savon_response)
|
|
18
|
-
|
|
18
|
+
data = response.match('get_folder_response/get_folder_result/response')
|
|
19
|
+
return nil if data[:folder].nil?
|
|
20
|
+
folder = data[:folder]
|
|
19
21
|
Inforouter::Folder.new(
|
|
20
22
|
id: folder[:@folder_id].to_i,
|
|
21
23
|
parent_id: folder[:@parent_id].to_i,
|
|
@@ -15,8 +15,9 @@ module Inforouter #:nodoc:
|
|
|
15
15
|
# @return [Array<Inforouter::Folder>]
|
|
16
16
|
def parse(savon_response)
|
|
17
17
|
response = new(savon_response)
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
data = response.match('get_folders1_response/get_folders1_result/response')
|
|
19
|
+
return [] if data[:@itemcount].to_i == 0
|
|
20
|
+
data[:f].map do |folder|
|
|
20
21
|
Inforouter::Folder.new(
|
|
21
22
|
id: folder[:@id].to_i,
|
|
22
23
|
name: folder[:@n].strip
|
data/lib/inforouter/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: inforouter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tom Fenton
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-02
|
|
11
|
+
date: 2015-03-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: nokogiri
|