picky-client 3.0.0.pre5 → 3.0.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.
@@ -22,22 +22,12 @@ module Picky
22
22
  ids
23
23
  end
24
24
 
25
- # Removes all ids of each allocation.
26
- #
27
- def clear_ids
28
- allocations.each { |allocation| allocation[4].clear }
29
- end
30
-
31
25
  # Returns the allocations.
32
26
  #
33
27
  def allocations
34
- @allocations || @allocations = self[:allocations]
35
- end
36
- # Returns the number of allocations.
37
- #
38
- def allocations_size
39
- @allocations_size || @allocations_size = allocations.size
28
+ @allocations ||= self[:allocations]
40
29
  end
30
+
41
31
  # Returns the total of results.
42
32
  #
43
33
  def total
@@ -104,7 +94,7 @@ module Picky
104
94
  #
105
95
  def amend_ids_with entries # :nodoc:
106
96
  i = 0
107
- self.allocations.each do |allocation|
97
+ allocations.each do |allocation|
108
98
  allocation[5] = allocation[4].map do |_|
109
99
  e = entries[i]
110
100
  i += 1
@@ -113,5 +103,11 @@ module Picky
113
103
  end
114
104
  end
115
105
 
106
+ # Removes all ids of each allocation.
107
+ #
108
+ def clear_ids
109
+ allocations.each { |allocation| allocation[4].clear }
110
+ end
111
+
116
112
  end
117
113
  end
@@ -147,12 +147,6 @@ describe Picky::Convenience do
147
147
  end
148
148
  end
149
149
 
150
- describe 'allocations_size' do
151
- it 'should just add up the allocations of both types' do
152
- @convenience.allocations_size.should == 3
153
- end
154
- end
155
-
156
150
  # describe 'render?' do
157
151
  # context 'no ids' do
158
152
  # before(:each) do
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: picky-client
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: 6
5
- version: 3.0.0.pre5
4
+ prerelease:
5
+ version: 3.0.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Florian Hanke
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-08-11 00:00:00 +10:00
13
+ date: 2011-08-16 00:00:00 +10:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -86,9 +86,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
86
86
  required_rubygems_version: !ruby/object:Gem::Requirement
87
87
  none: false
88
88
  requirements:
89
- - - ">"
89
+ - - ">="
90
90
  - !ruby/object:Gem::Version
91
- version: 1.3.1
91
+ version: "0"
92
92
  requirements: []
93
93
 
94
94
  rubyforge_project: http://rubyforge.org/projects/picky