xrbp 0.2.7 → 0.2.8
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/lib/xrbp/model/account.rb +7 -2
- data/lib/xrbp/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: b68319257ee3db7f21eb9b900d2df871cc85e974124e0606501055fd192a795c
|
|
4
|
+
data.tar.gz: 71a9e1f2118e6fe767ef652629ba5b28528d41d68821497130f7b70981eaacb5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 81e61dacd24b1a67a2f93f20b038e1912d67d180a02cb0d2bcb4186f6bbf5a32562b80c6d5b609de34341a2e2ea311a9137dc869276eab51f8976e72e1535552
|
|
7
|
+
data.tar.gz: c4365fcf0fc32018f4029525a9edb7df2840049ced91fc94fa90f19f492250f886fa5538b262f990901b141716fec96c6113c11851c605de96721b4a01dfe38d
|
data/lib/xrbp/model/account.rb
CHANGED
|
@@ -64,7 +64,7 @@ module XRBP
|
|
|
64
64
|
# start at last marker
|
|
65
65
|
marker = File.exist?("#{cache}/marker") ?
|
|
66
66
|
File.read("#{cache}/marker") : nil
|
|
67
|
-
marker = nil if marker
|
|
67
|
+
marker = nil if marker&.strip&.empty?
|
|
68
68
|
|
|
69
69
|
# load start time, if set
|
|
70
70
|
start = File.exist?("#{cache}/start") ?
|
|
@@ -87,14 +87,17 @@ module XRBP
|
|
|
87
87
|
break if connection.force_quit?
|
|
88
88
|
break unless res[:accounts] && !res[:accounts].empty?
|
|
89
89
|
|
|
90
|
+
page = marker || start.strftime("%Y%m%d%H%M%S")
|
|
91
|
+
|
|
90
92
|
# Cache data
|
|
91
|
-
cache_file = "#{cache}/#{
|
|
93
|
+
cache_file = "#{cache}/#{page}"
|
|
92
94
|
File.write(cache_file, res[:accounts].to_json)
|
|
93
95
|
|
|
94
96
|
# Emit signal
|
|
95
97
|
res[:accounts].each { |acct|
|
|
96
98
|
break if connection.force_quit?
|
|
97
99
|
connection.emit :account, acct
|
|
100
|
+
# TODO yield account
|
|
98
101
|
}
|
|
99
102
|
|
|
100
103
|
break if connection.force_quit?
|
|
@@ -105,6 +108,8 @@ module XRBP
|
|
|
105
108
|
# Store state, eval exit condition
|
|
106
109
|
File.write("#{cache}/marker", marker.to_s)
|
|
107
110
|
finished = !marker
|
|
111
|
+
|
|
112
|
+
connection.emit :account_page, page
|
|
108
113
|
end
|
|
109
114
|
|
|
110
115
|
# Store state for next run
|
data/lib/xrbp/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: xrbp
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dev Null Productions
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-04-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: json
|