cns 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/cns/bigquery.rb +14 -1
- data/lib/cns/version.rb +1 -1
- data/lib/cns.rb +16 -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: ecd6c6f2d56a62e7cb1a64e9026e8201994261b81d537b38906850290794a4ba
|
4
|
+
data.tar.gz: 1403714b61b45a630032a3579bd469cd033a9aa0bc40291d5d2687bd4701425e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 996a15cebd8abaa76f8e459b0149513369453ddd5b05eaa8dfaec9f15bae5f0b24596c4103baaa66b7aff266790f06a1ea0c0cd02e389f364d027a1f7fdc452e
|
7
|
+
data.tar.gz: 9beca3e56a939497c50bbd7d39b3d10fedf6a6017123d83a6ac060304c1fe07aae75491bfd6b0a68c01f0429dc4e3fd6edfea31a9afb1009925e022cc78a86d6
|
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.2)
|
5
5
|
curb
|
6
6
|
faraday
|
7
7
|
google-cloud-bigquery
|
@@ -10,7 +10,7 @@ PATH
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
addressable (2.8.
|
13
|
+
addressable (2.8.5)
|
14
14
|
public_suffix (>= 2.0.2, < 6.0)
|
15
15
|
ast (2.4.2)
|
16
16
|
backport (1.2.0)
|
data/lib/cns/bigquery.rb
CHANGED
@@ -41,6 +41,12 @@ module Cns
|
|
41
41
|
#apibc.mostra_resumo
|
42
42
|
end
|
43
43
|
|
44
|
+
# mostra situacao completa entre kraken/etherscan & bigquery
|
45
|
+
def mostra_skrk
|
46
|
+
apius.mostra_resumo
|
47
|
+
apies.mostra_resumo
|
48
|
+
end
|
49
|
+
|
44
50
|
# insere (caso existam) dados novos kraken/bitcoinde/paymium/therock/etherscan/greymass/beaconchain no bigquery
|
45
51
|
def processa_tudo
|
46
52
|
processa_us
|
@@ -51,6 +57,12 @@ module Cns
|
|
51
57
|
#processa_bc
|
52
58
|
end
|
53
59
|
|
60
|
+
# insere (caso existam) dados novos kraken/etherscan/ no bigquery
|
61
|
+
def processa_wkrk
|
62
|
+
processa_us
|
63
|
+
processa_eth
|
64
|
+
end
|
65
|
+
|
54
66
|
# insere transacoes blockchain novas nas tabelas etht (norml), ethi (internas), ethp (block), ethw (withdrawals), ethk (token)
|
55
67
|
def processa_eth
|
56
68
|
puts(format("%<n>4i TRANSACOES ETH NORMAIS\tINSERIDAS etht", n: apies.novtx.empty? ? 0 : dml(etht_ins)))
|
@@ -62,7 +74,8 @@ module Cns
|
|
62
74
|
|
63
75
|
# insere transacoes blockchain novas nas tabelas etht (norml), ethi (internas), ethp (block), ethw (withdrawals), ethk (token)
|
64
76
|
def processa_weth
|
65
|
-
puts(format("%<m>16s etht %<t>4i NORMAIS\t;ethi %<i>4i INTERNAS\t;ethp %<p>4i BLOCK\t;ethw %<w>4i WITHDRAWALS\t;ethk %<k>4i TOKENS", m: Time.now.strftime("%Y-%m-%d %k:%M"), t: apies.novtx.empty? ? 0 : dml(etht_ins), i: apies.novix.empty? ? 0 : dml(ethi_ins), p: apies.novpx.empty? ? 0 : dml(ethp_ins), w: apies.novwx.empty? ? 0 : dml(ethw_ins), k: apies.novkx.empty? ? 0 : dml(ethk_ins)))
|
77
|
+
#puts(format("%<m>16s etht %<t>4i NORMAIS\t;ethi %<i>4i INTERNAS\t;ethp %<p>4i BLOCK\t;ethw %<w>4i WITHDRAWALS\t;ethk %<k>4i TOKENS", m: Time.now.strftime("%Y-%m-%d %k:%M"), t: apies.novtx.empty? ? 0 : dml(etht_ins), i: apies.novix.empty? ? 0 : dml(ethi_ins), p: apies.novpx.empty? ? 0 : dml(ethp_ins), w: apies.novwx.empty? ? 0 : dml(ethw_ins), k: apies.novkx.empty? ? 0 : dml(ethk_ins)))
|
78
|
+
processa_eth
|
66
79
|
end
|
67
80
|
|
68
81
|
private
|
data/lib/cns/version.rb
CHANGED
data/lib/cns.rb
CHANGED
@@ -23,6 +23,13 @@ module Cns
|
|
23
23
|
Bigquery.new(options).processa_weth
|
24
24
|
end
|
25
25
|
|
26
|
+
desc 'wkrk', 'carrega transacoes kraken/eth no bigquery'
|
27
|
+
option :h, type: :hash, default: {}, desc: 'configuracao ajuste reposicionamento temporal'
|
28
|
+
# carrega transacoes kraken/eth no bigquery
|
29
|
+
def wkrk
|
30
|
+
Bigquery.new(options).processa_wkrk
|
31
|
+
end
|
32
|
+
|
26
33
|
desc 'work', 'carrega transacoes novas no bigquery'
|
27
34
|
option :h, type: :hash, default: {}, desc: 'configuracao ajuste reposicionamento temporal'
|
28
35
|
# carrega transacoes novas no bigquery
|
@@ -38,6 +45,14 @@ module Cns
|
|
38
45
|
Bigquery.new(options).mostra_tudo
|
39
46
|
end
|
40
47
|
|
41
|
-
|
48
|
+
desc 'skrk', 'mostra kraken/eth transacoes'
|
49
|
+
option :v, type: :boolean, default: true, desc: 'mostra transacoes'
|
50
|
+
option :t, type: :boolean, default: false, desc: 'mostra transacoes todas ou somente novas'
|
51
|
+
# mostra kraken/eth transacoes
|
52
|
+
def skrk
|
53
|
+
Bigquery.new(options).mostra_skrk
|
54
|
+
end
|
55
|
+
|
56
|
+
default_task :skrk
|
42
57
|
end
|
43
58
|
end
|
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.2
|
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-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|