page_up 0.0.6 → 0.0.7

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: 25cee297252e1890fee9581a045870bd1078a21c
4
- data.tar.gz: 040ff9c75bf0bca6dcc7056d8d22fc2b8cf8c119
3
+ metadata.gz: 520aa3608f8c93a7891b4610ecdef4d8c9c837a3
4
+ data.tar.gz: 18a9e35575f9e29a0d071389a4d399b5f0244319
5
5
  SHA512:
6
- metadata.gz: d5d94c283e9d892987380ea389536675ac6088ce27ffb2dd5ef4af218d1e155779d96a5d138b6dedc1543abb8690c7cba16acd508c621d3b945f0b5aec694ea4
7
- data.tar.gz: 0564ede6189738f140d0538029a98edc028a28f78ac00b8da618139ae554cdafffd1a4ec30287ac0fc298d4bdcaf9e1013a3ee021cbf5bc2d37d8146f46f017b
6
+ metadata.gz: 84bd728ef04a9684f96b2ecbe8ab22804f5cd4f40873918c3ef98bd942a45db0a8124a0418130a29b9afc2fc6ebff78216501a297c5f9762ed4cbf45dddb23bc
7
+ data.tar.gz: 8bd51972898e7bae3762a46cea8f84ec98c7989f4a792ff9e050094da80b4eac25572c99ef1e55dee5881a32a93056dbd53761ae5a2d196be9ebafc8157cbbc7
checksums.yaml.gz.sig CHANGED
Binary file
@@ -14,11 +14,12 @@ module PageUp
14
14
  until covers? range
15
15
  next_page = page_for(range)
16
16
  result = @callback.call next_page, @per_page
17
- result.each_with_index do |value, index|
17
+ @per_page.times do |index|
18
+ value = result[index]
18
19
  @fragment[index + offset(next_page)] = value
19
20
  end
20
21
  end
21
- @fragment[range]
22
+ @fragment[range].compact
22
23
  end
23
24
 
24
25
  def use &block
@@ -1,3 +1,3 @@
1
1
  module PageUp
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -46,6 +46,12 @@ describe 'fragmented pages' do
46
46
  it 'will return the desired fragment' do
47
47
  expect(pages[70...90]).to eq (71..90).to_a
48
48
  end
49
+
50
+ it 'protects against ranges that exceed the existing data' do
51
+ Timeout.timeout(0.3) do
52
+ expect(pages[90...110]).to eq (91..100).to_a
53
+ end
54
+ end
49
55
  end
50
56
 
51
57
  end
data.tar.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- 7��κ(��VM�ԇ�B����?�$���*�����{Z�jKҖR�<�?�c�\i%C���֤��l������DO5L�"����ǰ����q��e��D�t/D��H��7)����Fl$t��YI�&h���5u4
2
- �WfR@m��\\PgU�R��RR!����l2ape/�!p)Y����b5,s�w�a+a�{�Q��)���v�w7���j�eW�~�a .�*�WN���;W5�_D����)u"'�
1
+ ?�+��;fTY��5�=�!�j8��Yg@��i�e1��'�̞yy��Z�g#���I�%��zW����.n�u`{���_E����^��"��M��g��8l,����z��B�=d2��ª�KY��rZ��x �?��p=�zv���.�� x"^��2ϖ����@9e���6[E<�W�H�0� ����bJ���-<׊�.`�cX����5��B$�
2
+ �R�[����Bp���ct�j�XyU����p�^
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: page_up
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Rowe
metadata.gz.sig CHANGED
Binary file