positioning 0.2.3 → 0.2.4
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/positioning/mechanisms.rb +11 -12
- data/lib/positioning/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02113cf1d0279ee7f3b304429eb5af8a4e6e46254f2397cae704191900cfd0a5
|
4
|
+
data.tar.gz: b248f330a5b3373b396f487bb11008a14cdf1c6f292b6c63a7000dd1150cfa8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 94333e70ecd013a4970c4667fb715e91fca7450bcb6c52dd57706d8134c8a02ab8fc698a4a2abcb34bbe69dac640f528cce45df351a2bb2d42958e2a77468f23
|
7
|
+
data.tar.gz: f273602f9fff96622aa9d9d7706570629de601468b782e186df71936084053a2368595cf116827d4c1f86775cfa4ca150eef0e662895bf79c3afd6560d3002b0
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.2.4] - 2024-07-31
|
4
|
+
|
5
|
+
- Avoid unnecessary SQL queries when the position hasn't changed.
|
6
|
+
|
3
7
|
## [0.2.3] - 2024-07-06
|
4
8
|
|
5
9
|
- Advisory Lock can now be optionally turned off via `advisory_lock: false` on your `positioned` call. See the README for more details. Advisory Lock remains on by default. Thanks @joaomarcos96!
|
@@ -20,21 +20,20 @@ module Positioning
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def update_position
|
23
|
+
return unless positioning_scope_changed? || position_changed?
|
24
|
+
|
23
25
|
clear_position if positioning_scope_changed? && !position_changed?
|
24
26
|
|
25
27
|
solidify_position
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
else
|
36
|
-
contract(positioning_scope, position_was..position)
|
37
|
-
end
|
28
|
+
move_out_of_the_way
|
29
|
+
|
30
|
+
if positioning_scope_changed?
|
31
|
+
contract(positioning_scope_was, position_was..)
|
32
|
+
expand(positioning_scope, position..)
|
33
|
+
elsif position_was > position
|
34
|
+
expand(positioning_scope, position..position_was)
|
35
|
+
else
|
36
|
+
contract(positioning_scope, position_was..position)
|
38
37
|
end
|
39
38
|
end
|
40
39
|
|
data/lib/positioning/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: positioning
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brendon Muir
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|