yinx_st 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/yinx_st.rb +1 -1
- data/lib/yinx_st/batches.rb +7 -5
- data/lib/yinx_st/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e8ab234762227878f0d75715bca89fdfdf4bf5f
|
4
|
+
data.tar.gz: 572d84a83d035aa11ef67d3270c87a77d43fa41d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f0aa180ab44f780120dc9988377564827acf5c5ce6a1b780f5461b6ed144bde826553a4dff7ca6bb07a016d6339a5bef317064b466c7e72bc49530a9d0a5791
|
7
|
+
data.tar.gz: 872cc17135ff110d373414c6c3fa0262b994e401c0c05322cd1804ce182b86d4f86f2afa844b5337c4effa1b43560009cf53d7830f1f0d355012246127513e22
|
data/lib/yinx_st.rb
CHANGED
data/lib/yinx_st/batches.rb
CHANGED
@@ -3,19 +3,21 @@ require 'yinx_sql/json_batch'
|
|
3
3
|
|
4
4
|
module YinxSt
|
5
5
|
class Batches
|
6
|
-
attr_reader :all_notes
|
6
|
+
attr_reader :all_notes, :smallest_batch_size
|
7
7
|
|
8
8
|
def initialize n
|
9
9
|
batches = Yinx::SQL::JsonBatch.last(n)
|
10
|
-
@
|
11
|
-
|
10
|
+
@smallest_batch_size = Float::INFINITY
|
11
|
+
@all_notes = batches.each_with_object([]) do |b, rs|
|
12
|
+
@smallest_batch_size = b.batch.size if b.batch.size < @smallest_batch_size
|
13
|
+
b.batch.each_with_object(rs) do |h, rs|
|
12
14
|
n = Yinx::NoteMeta.from_h h
|
13
15
|
n.dump_id = b.id
|
14
16
|
n.dump_at = (b.fixed_dump_date or b.created_at)
|
15
17
|
n.batches = self
|
16
|
-
n
|
18
|
+
rs << n
|
17
19
|
end
|
18
|
-
end
|
20
|
+
end
|
19
21
|
end
|
20
22
|
|
21
23
|
def of_guid guid
|
data/lib/yinx_st/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yinx_st
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ken
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-10-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|