parascope 1.0.2 → 1.0.3

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: 148749dbca46560b2b152377b8095d27fec8a1a1
4
- data.tar.gz: a449da808e60361c33b60b4ba524f272a5b83173
3
+ metadata.gz: 9ae9437f9c91dc9a6f126c16b6f3c4a2c745634d
4
+ data.tar.gz: 859be0e8b38ecc4e6af3d9fb0d379e464f54ab7e
5
5
  SHA512:
6
- metadata.gz: 9f876d869db3495232e67154fa0bcdb6089f62cc855112deb986b019f6e112c2782cc0158ffd899a1139c095c2ee0bd602e55ee6d3b7557e663a67d9caf4413c
7
- data.tar.gz: 000864ff20232cf0d0f85bc74f29febc476dfc6eb668324640962caed100578d7900cc2011b0790978d88be992eaaf80292ec729fdb7c5a46b2e17306eb9dcca
6
+ metadata.gz: 49ad2eccded8195f771ad943704a9df0fbf56c62fc52ca00474311140b366f42a98e093c55f1a5ae4c89151640747286f93464f6790ccef1a52918afd7ee15ae
7
+ data.tar.gz: 73c4988ec96e88e9973f6031d3ecd9bd48474777f3271d7f83ffd29c0ba7107dd278cc09c9dfe3ebd821684780d594b1647bd92ab2cc22670ce09c33a50e6a3d
data/CHANGELOG CHANGED
@@ -1,5 +1,9 @@
1
1
  === master
2
2
 
3
+ === 1.0.3
4
+
5
+ Explicitly apply query blocks in definition order
6
+
3
7
  === 1.0.2
4
8
 
5
9
  Remove base_scope application on sifted instance
@@ -73,7 +73,7 @@ module Parascope
73
73
 
74
74
  def resolved_scope!
75
75
  guard_all
76
- klass.query_blocks.sort{ |a, b| a.index <=> b.index }.reduce(scope) do |scope, block|
76
+ klass.sorted_query_blocks.reduce(scope) do |scope, block|
77
77
  clone_with_scope(scope, block).apply_block!.scope
78
78
  end
79
79
  end
@@ -48,5 +48,13 @@ module Parascope
48
48
  def guard_blocks
49
49
  @guard_blocks ||= []
50
50
  end
51
+
52
+ def sorted_query_blocks
53
+ query_blocks.sort do |a, b|
54
+ a.index == b.index \
55
+ ? query_blocks.index(a) <=> query_blocks.index(b)
56
+ : a.index <=> b.index
57
+ end
58
+ end
51
59
  end
52
60
  end
@@ -1,3 +1,3 @@
1
1
  module Parascope
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parascope
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artem Kuzko
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-08 00:00:00.000000000 Z
11
+ date: 2017-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie