yaccl 0.0.15 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YTEzMjljNDVmODZjNjFkMzcwZjc0MWM4OGZiOThkMDg1MThhNDU0Mw==
4
+ ODRiNTVhMzQzYzNkMDEzMmUyYWUzN2UzODI2ODMxZDI4ZDNlYjc2Mw==
5
5
  data.tar.gz: !binary |-
6
- ZTM0NmVlM2QyNTBhYWFmYWMyZDE2OTIzMDcwYzkzNWY5NmFhMzk4Nw==
6
+ NDY3ZGUwNmI5ZGExNTJjNjZhNzA1MDY0YzAyNWNjYjc3MDY3M2Y1OA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZmMxNDM1MmZlZGUxZmY0NmZlZDMwMjY4NWU5M2I5YzZmMjc4YWY0NzYyMTJi
10
- YjNhMmY4ZDJiMTNlZmZhZDkwYTcyNjM5NjI0NWZmNjcyODQ0OWI5NjlmMzky
11
- NGZhYzAxYTg5ODg4OGVmZmM3ZDgwMWE1OTRjYzhmNTdiNmNlMzU=
9
+ ZWFhNDIwMjRhYWQzNDMzZjE1MjRjMTQzNmEyOWVmYjY0NDNlZTdhNGJmZjUy
10
+ MmEyZTNlYjRlNGMzNzlmM2ZmOTI1ZDNlNjNjNDU0NjA5MWFmNzU5OWI4NGQy
11
+ YzMxY2YxOGZiODFmYzU0ZWVlNGQ2M2YxMTI5MGEwN2Q3YTYxMGE=
12
12
  data.tar.gz: !binary |-
13
- YmE2OTQwYTk3NDk3YjZjODRhODJjMDA4YTVmMzY5YTdjMmNlYjkxNjNhZjNh
14
- MjUwM2U0ZDc2ZGNjNDAxNTdmN2E0NmRkOTU2ODhlNTQ1MWY3YmIyOTI4Y2Rj
15
- M2I0M2YxNGZlMzc5ZDhlNmEwNjQwZWI5ZDQxZDY4ZmMyNTFhMzQ=
13
+ Zjk0NGUwYjYxNTI0MjU5OTEyMWQzYmZmNzkyYjE1YjE5MThiYTA2YTViYzFi
14
+ NjM3NjJkZTUwYTA3Mjg5ZDhjMmQzZWNmOWVjZmQ5NmQ0ODRmMTRjODI4YzAx
15
+ NDQzOWRhN2FiMzAxMTM0ODE5OWEwNmYyYzMzZDRlNGE3NWNjNGU=
@@ -23,13 +23,14 @@ module YACCL
23
23
  end
24
24
  end
25
25
 
26
- def children
27
- children = Services.get_children(repository_id, object_id, nil, nil, nil, nil, nil, nil, nil, nil)
28
- if children.has_key?(:objects)
29
- children[:objects].map { |o| ObjectFactory.create(repository_id, o[:object]) }
30
- else
31
- []
32
- end
26
+ def children(max_items=nil, skip_count=nil)
27
+ children = Services.get_children(repository_id, object_id, nil, nil, nil, nil, nil, nil, max_items, skip_count)
28
+ children[:objects].map! { |o| ObjectFactory.create(repository_id, o[:object]) }
29
+ children[:num_items] = children.delete(:numItems)
30
+ children[:has_more_items] = children.delete(:hasMoreItems)
31
+
32
+ yield(children) if block_given?
33
+ children[:objects]
33
34
  end
34
35
 
35
36
  def tree(depth)
@@ -105,10 +105,14 @@ module YACCL
105
105
 
106
106
  # discovery
107
107
 
108
- def query(statement)
109
- Services.query(id, statement, false, nil, nil, nil, nil, nil)[:results].map do |o|
110
- ObjectFactory.create(id, o)
111
- end
108
+ def query(statement, max_items=nil, skip_count=nil, &block)
109
+ result = Services.query(id, statement, nil, nil, nil, nil, max_items, skip_count)
110
+ result[:results].map! { |o| ObjectFactory.create(id, o) }
111
+ result[:num_items] = result.delete(:numItems)
112
+ result[:has_more_items] = result.delete(:hasMoreItems)
113
+
114
+ yield(result) if block_given?
115
+ result[:results]
112
116
  end
113
117
 
114
118
  def content_changes(change_log_token)
@@ -1,3 +1,3 @@
1
1
  module YACCL
2
- VERSION = '0.0.15'
2
+ VERSION = '0.0.17'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yaccl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenneth Geerts
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-23 00:00:00.000000000 Z
12
+ date: 2013-04-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty