cns 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -5
- data/lib/cns/bigquery.rb +37 -36
- data/lib/cns/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: 014ea62e8e58d2b652f5e814f446b9894215f56ffc79399b9d5f15c828c85ff9
|
4
|
+
data.tar.gz: 9bb4dba34b5c53fb5daa9fe84fc6c3a68d2138d4df1ece9bc97a48d5fbee934e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 779ffef3648acbada200479d4f8f0c0fadd64d6323be8729c64903410ce3e1653ee386691832c98048f45ffcde47f8e1f1f9b02ca3aa23a9283e01fe5670780e
|
7
|
+
data.tar.gz: b3c5fb68a478d1342ce4b655ad7495a6fd6917d71fd8ab8bab486f5f0d58d3558f5ca8bba2246531e5736dc3ab5f9078d8dcd340eb760b5a43a7b446eb27e84a
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cns (0.4.
|
4
|
+
cns (0.4.5)
|
5
5
|
curb
|
6
6
|
faraday
|
7
7
|
google-cloud-bigquery
|
@@ -20,12 +20,12 @@ GEM
|
|
20
20
|
curb (1.0.5)
|
21
21
|
declarative (0.0.20)
|
22
22
|
e2mmap (0.1.0)
|
23
|
-
faraday (2.7.
|
23
|
+
faraday (2.7.12)
|
24
24
|
base64
|
25
25
|
faraday-net_http (>= 2.0, < 3.1)
|
26
26
|
ruby2_keywords (>= 0.0.4)
|
27
27
|
faraday-net_http (3.0.2)
|
28
|
-
google-apis-bigquery_v2 (0.
|
28
|
+
google-apis-bigquery_v2 (0.61.0)
|
29
29
|
google-apis-core (>= 0.11.0, < 2.a)
|
30
30
|
google-apis-core (0.11.2)
|
31
31
|
addressable (~> 2.5, >= 2.5.1)
|
@@ -64,14 +64,14 @@ GEM
|
|
64
64
|
kwalify (0.7.2)
|
65
65
|
mini_mime (1.1.5)
|
66
66
|
multi_json (1.15.0)
|
67
|
-
nokogiri (1.15.
|
67
|
+
nokogiri (1.15.5-x86_64-linux)
|
68
68
|
racc (~> 1.4)
|
69
69
|
os (1.1.4)
|
70
70
|
parallel (1.23.0)
|
71
71
|
parser (2.7.2.0)
|
72
72
|
ast (~> 2.4.1)
|
73
73
|
psych (3.3.4)
|
74
|
-
public_suffix (5.0.
|
74
|
+
public_suffix (5.0.4)
|
75
75
|
racc (1.7.3)
|
76
76
|
rainbow (3.1.1)
|
77
77
|
rake (12.3.3)
|
data/lib/cns/bigquery.rb
CHANGED
@@ -41,16 +41,6 @@ module Cns
|
|
41
41
|
#apibc.mostra_resumo
|
42
42
|
end
|
43
43
|
|
44
|
-
# insere (caso existam) dados novos kraken/bitcoinde/paymium/therock/etherscan/greymass/beaconchain no bigquery
|
45
|
-
def processa_tudo
|
46
|
-
processa_us
|
47
|
-
processa_de
|
48
|
-
#processa_frmt
|
49
|
-
processa_eth
|
50
|
-
processa_eos
|
51
|
-
#processa_bc
|
52
|
-
end
|
53
|
-
|
54
44
|
# mostra situacao completa entre kraken/etherscan & bigquery
|
55
45
|
def mostra_skrk
|
56
46
|
apius.mostra_resumo
|
@@ -62,57 +52,68 @@ module Cns
|
|
62
52
|
apies.mostra_resumo
|
63
53
|
end
|
64
54
|
|
55
|
+
# insere (caso existam) dados novos kraken/bitcoinde/paymium/therock/etherscan/greymass/beaconchain no bigquery
|
56
|
+
def processa_tudo
|
57
|
+
puts(Time.now.strftime("%d-%m-%Y %H:%M TRANSACOES ") + processa_us + ", " + processa_de + ", " + processa_eth + ", " + processa_eos)
|
58
|
+
end
|
59
|
+
|
65
60
|
# insere (caso existam) dados novos kraken/etherscan no bigquery
|
66
61
|
def processa_wkrk
|
67
|
-
processa_us
|
68
|
-
processa_eth
|
62
|
+
puts(Time.now.strftime("%d-%m-%Y %H:%M TRANSACOES ") + processa_us + ", " + processa_eth)
|
69
63
|
end
|
70
64
|
|
71
65
|
# insere (caso existam) dados novos etherscan no bigquery
|
72
66
|
def processa_weth
|
73
|
-
processa_eth
|
67
|
+
puts(Time.now.strftime("%d-%m-%Y %H:%M TRANSACOES ") + processa_eth)
|
74
68
|
end
|
75
69
|
|
70
|
+
private
|
71
|
+
|
76
72
|
# insere transacoes blockchain novas nas tabelas etht (norml), ethi (internas), ethp (block), ethw (withdrawals), ethk (token)
|
77
73
|
def processa_eth
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
74
|
+
str = "ETH"
|
75
|
+
str << format(" %<n>i etht", n: dml(etht_ins)) if apies.novtx.count > 0
|
76
|
+
str << format(" %<n>i ethi", n: dml(ethi_ins)) if apies.novix.count > 0
|
77
|
+
str << format(" %<n>i ethp", n: dml(ethp_ins)) if apies.novpx.count > 0
|
78
|
+
str << format(" %<n>i ethw", n: dml(ethw_ins)) if apies.novwx.count > 0
|
79
|
+
str << format(" %<n>i ethk", n: dml(ethk_ins)) if apies.novkx.count > 0
|
80
|
+
str
|
83
81
|
end
|
84
82
|
|
85
|
-
private
|
86
|
-
|
87
83
|
# insere transacoes exchange kraken novas nas tabelas ust (trades), usl (ledger)
|
88
84
|
def processa_us
|
89
|
-
|
90
|
-
|
85
|
+
str = "KRAKEN"
|
86
|
+
str << format(" %<n>i ust", n: dml(ust_ins)) if apius.trades.count > 0
|
87
|
+
str << format(" %<n>i usl", n: dml(usl_ins)) if apius.ledger.count > 0
|
88
|
+
str
|
91
89
|
end
|
92
90
|
|
93
91
|
# insere transacoes exchange bitcoinde novas nas tabelas det (trades), del (ledger)
|
94
92
|
def processa_de
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
# insere transacoes exchange paymium/therock novas na tabela fr/mt (ledger)
|
100
|
-
def processa_frmt
|
101
|
-
puts(format("%<n>4i LEDGER\tPAYMIUM\t\tINSERIDAS fr", n: apifr.ledger.empty? ? 0 : dml(frl_ins)))
|
102
|
-
puts(format("%<n>4i LEDGER\tTHEROCK\t\tINSERIDAS mt", n: apimt.ledger.empty? ? 0 : dml(mtl_ins)))
|
93
|
+
str = "BITCOINDE"
|
94
|
+
str << format(" %<n>i det", n: dml(det_ins)) if apide.trades.count > 0
|
95
|
+
str << format(" %<n>i del", n: dml(del_ins)) if apide.ledger.count > 0
|
96
|
+
str
|
103
97
|
end
|
104
98
|
|
105
99
|
# insere transacoes blockchain novas na tabela eos
|
106
100
|
def processa_eos
|
107
|
-
|
101
|
+
str = "EOS"
|
102
|
+
str << format(" %<n>i eos ", n: dml(eost_ins)) if apigm.novax.count > 0
|
103
|
+
str
|
108
104
|
end
|
109
105
|
|
106
|
+
# insere transacoes exchange paymium/therock novas na tabela fr/mt (ledger)
|
107
|
+
# def processa_frmt
|
108
|
+
# puts(format("%<n>4i LEDGER\tPAYMIUM\t\tINSERIDAS fr", n: apifr.ledger.empty? ? 0 : dml(frl_ins)))
|
109
|
+
# puts(format("%<n>4i LEDGER\tTHEROCK\t\tINSERIDAS mt", n: apimt.ledger.empty? ? 0 : dml(mtl_ins)))
|
110
|
+
# end
|
110
111
|
# insere historico sados novos na tabela eth2bh
|
111
|
-
def processa_bc
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
end
|
112
|
+
# def processa_bc
|
113
|
+
# puts(format("%<n>4i ATTESTATIONS INSERIDAS eth2at", n: apibc.novtx.empty? ? 0 : dml(eth2at_ins)))
|
114
|
+
# puts(format("%<n>4i PROPOSALS INSERIDAS eth2pr", n: apibc.novkx.empty? ? 0 : dml(eth2pr_ins)))
|
115
|
+
# puts(format("%<n>4i BALANCES\tETH2\t\tINSERIDOS eth2bh", n: apibc.nov.empty? ? 0 : dml(eth2bh_ins)))
|
116
|
+
# end
|
116
117
|
|
117
118
|
# cria job bigquery & verifica execucao
|
118
119
|
#
|
data/lib/cns/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cns
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hernâni Rodrigues Vaz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|