fusuma 3.4.0 → 3.5.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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 352237ad297e7171f4e0ab18f96b1560e90ce1835b2591e01213496876388b42
|
4
|
+
data.tar.gz: 11b61f92f937ac7857800d10e6967367674e691cc883a12e81a343f084a8073b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49d73eaa0635211cb018992b4c7d8cfd238a7f7d9811db33248578873ad21b04b0cbdaaecbc7469c34d18c9205e1de574be85f47e91cc7c986460f29adb18aa4
|
7
|
+
data.tar.gz: a0beefc19aefe6cf1ffeb879b3dc070af75e65b620a5b68a0765bb9cbb09f4df3f0d689e4b67b3963f90e7ece9398a0543014874f6555abb320c19698997d3d5
|
@@ -81,18 +81,20 @@ module Fusuma
|
|
81
81
|
# Search with context from load_streamed Config
|
82
82
|
# @param context [Hash]
|
83
83
|
# @return [Object]
|
84
|
-
def with_context(context, &block)
|
85
|
-
|
84
|
+
def with_context(context = {}, &block)
|
85
|
+
before = @context
|
86
|
+
@context = context
|
86
87
|
result = block.call
|
87
|
-
|
88
|
+
ensure # NOTE: ensure is called even if return in block
|
89
|
+
@context = before
|
88
90
|
result
|
89
91
|
end
|
90
92
|
|
91
|
-
|
93
|
+
CONTEXT_SEARCH_ORDER = [:no_context, :complete_match_context, :partial_match_context]
|
92
94
|
# Return a matching context from config
|
93
95
|
# @params request_context [Hash]
|
94
96
|
# @return [Hash]
|
95
|
-
def find_context(request_context, fallbacks =
|
97
|
+
def find_context(request_context, fallbacks = CONTEXT_SEARCH_ORDER, &block)
|
96
98
|
# Search in blocks in the following order.
|
97
99
|
# 1. primary context(no context)
|
98
100
|
# 2. complete match config[:context] == request_context
|
data/lib/fusuma/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fusuma
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- iberianpig
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Fusuma is multitouch gesture recognizer. This gem makes your touchpad
|
14
14
|
on Linux able to recognize swipes or pinchs and assign command to them. Read installation
|