ordinare 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ordinare.rb +6 -2
- data/lib/ordinare/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb185750f4b23bbdec925ff6b38a33f74094c32b
|
4
|
+
data.tar.gz: d0119b694f3e421366a139327f1c90446042b7aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e348f905c418e5913a8d077b3d3316032c5404860b6f26636c7f3a310ece18fa6d9709ed8c339b681b3671994be5d1075cfe6edb297cafa44eb93d9657a53b82
|
7
|
+
data.tar.gz: e7c8c7c8d47df594dba57a498bfd2b946fdf92a03e01bc817e8f823a3bbbba63d2601e47868b5d1ff4694146df1575b85a4552783b77f4c13b644b37b011908a
|
data/lib/ordinare.rb
CHANGED
@@ -64,11 +64,15 @@ module Ordinare
|
|
64
64
|
|
65
65
|
if gem && !gems[index - 1]
|
66
66
|
current_range[:start_index] = index
|
67
|
+
current_range[:end_index] = index if index == gems.length - 1
|
67
68
|
|
68
|
-
ranges_to_sort << current_range
|
69
|
+
ranges_to_sort << current_range unless ranges_to_sort.any? { |range| range[:start_index] == index }
|
69
70
|
elsif gem && gems[index - 1] && !gems[index + 1]
|
70
71
|
ranges_to_sort.map do |range|
|
71
|
-
range[:start_index] == start_index
|
72
|
+
if range[:start_index] == start_index
|
73
|
+
range[:end_index] = index
|
74
|
+
end
|
75
|
+
|
72
76
|
range
|
73
77
|
end
|
74
78
|
end
|
data/lib/ordinare/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ordinare
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nikola Đuza
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|