upfluence-utils 0.11.1 → 0.11.3
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: 9013ce0511178b0b0f2bbfd16704d016e41ef8126c0632fdc8289a6f2928dabd
|
|
4
|
+
data.tar.gz: '09dc43555bf935fe12be76168692d24b72b4ae064f7a7edc27a1e52b0e0acdcb'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0bf6d2d6b2ea5398ebed18ed22e21951414a35f67a7bc4c8b8461b55600337c0e7e88ace3cc040c7e3c4affafbe7f0c702cfadd490b317dd63f3747081ed9d4e
|
|
7
|
+
data.tar.gz: ac825fd4f3bcb4bd5e8dd33b512bd53c7e61f8cd5049ef427a53960f8f4dc9108f66fe70e80e768aa2c58f02a0fc1d4854e9f42a290803e7455a4d77c4a7609a
|
|
@@ -83,7 +83,7 @@ module Upfluence
|
|
|
83
83
|
|
|
84
84
|
path = Rack::Request.new(env).path
|
|
85
85
|
|
|
86
|
-
splitted_template = route.split
|
|
86
|
+
splitted_template = route.split.last.split('/').reject do |v|
|
|
87
87
|
v.eql?('')
|
|
88
88
|
end.reverse
|
|
89
89
|
|
|
@@ -93,7 +93,7 @@ module Upfluence
|
|
|
93
93
|
end
|
|
94
94
|
|
|
95
95
|
def parse_route_default(env, code)
|
|
96
|
-
return 'unexpected-route' if code.eql? 404
|
|
96
|
+
return 'unexpected-route' if code.to_s.eql? '404'
|
|
97
97
|
|
|
98
98
|
Rack::Request.new(env).path.gsub(%r{/\d+(/|$)}, '/:id\\1')
|
|
99
99
|
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Upfluence
|
|
2
|
+
module Utils
|
|
3
|
+
class IntervalExecutor
|
|
4
|
+
DEFAULT_INTERVAL = 60*60*6
|
|
5
|
+
|
|
6
|
+
class << self
|
|
7
|
+
def start(interval = DEFAULT_INTERVAL)
|
|
8
|
+
Thread.new do
|
|
9
|
+
loop do
|
|
10
|
+
yield
|
|
11
|
+
|
|
12
|
+
sleep(interval)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
data/lib/upfluence/utils.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: upfluence-utils
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.11.
|
|
4
|
+
version: 0.11.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Upfluence
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-03-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -278,6 +278,7 @@ files:
|
|
|
278
278
|
- lib/upfluence/resources/countries.rb
|
|
279
279
|
- lib/upfluence/utils.rb
|
|
280
280
|
- lib/upfluence/utils/http/middleware/null.rb
|
|
281
|
+
- lib/upfluence/utils/interval_executor.rb
|
|
281
282
|
- lib/upfluence/utils/semaphore.rb
|
|
282
283
|
- lib/upfluence/utils/thrift.rb
|
|
283
284
|
- lib/upfluence/utils/thrift/middleware.rb
|