cns 0.4.3 → 0.4.4

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: 1eb8b20b87c583f48d121aa34c064856359e287984a237c9c807f53391f7a93b
4
- data.tar.gz: 94b0b7971a7abaa87bbcd75807609f1ed0e175b504d26ff7d4879aaae2764347
3
+ metadata.gz: 45769e2c9873fde5f217a92be47bd9edcd0a77905ec9d27c1b82283e0213804e
4
+ data.tar.gz: 5e7b71fe4bd2f7c8dc1d2dd61728f3613782c233a36bb25081632da492f3fc00
5
5
  SHA512:
6
- metadata.gz: 87a6da8d1389c9fdf8a3c668856030c2c7b3f70f9261bbed7c5f7051eb31a703f93a9acce46356d72eaf197fdec73cca802ca11dea0bd8b2b7792a1d8194f75f
7
- data.tar.gz: 32fbe0ea5b6479784774de1efffb213314ff33ad70dbab5e8f50e64ec1250c6bc99f085961da4f243a935b4e73ae01bb4c07861f6a5d730ac137105b113a8551
6
+ metadata.gz: eb5aae58de58afb5441027c272d3e66fb3f9fe7ff7466d530abf484c2ef5e636fb69755772a08f4e1423b3cf26adee16c623b3c448bd55f25da3a990f6f5448b
7
+ data.tar.gz: 491c8dbab0204e1736c9438d84996be60bcaa8bccc1cf5592aa5d32cbabfb08d4ee1798c4af959eda2ff2762a0b5b99d43bc346cfaedf028f5d829f2aba8d094
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cns (0.4.3)
4
+ cns (0.4.4)
5
5
  curb
6
6
  faraday
7
7
  google-cloud-bigquery
data/lib/cns/bigquery.rb CHANGED
@@ -41,12 +41,6 @@ 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
-
50
44
  # insere (caso existam) dados novos kraken/bitcoinde/paymium/therock/etherscan/greymass/beaconchain no bigquery
51
45
  def processa_tudo
52
46
  processa_us
@@ -57,12 +51,28 @@ module Cns
57
51
  #processa_bc
58
52
  end
59
53
 
60
- # insere (caso existam) dados novos kraken/etherscan/ no bigquery
54
+ # mostra situacao completa entre kraken/etherscan & bigquery
55
+ def mostra_skrk
56
+ apius.mostra_resumo
57
+ apies.mostra_resumo
58
+ end
59
+
60
+ # mostra situacao completa entre etherscan & bigquery
61
+ def mostra_seth
62
+ apies.mostra_resumo
63
+ end
64
+
65
+ # insere (caso existam) dados novos kraken/etherscan no bigquery
61
66
  def processa_wkrk
62
67
  processa_us
63
68
  processa_eth
64
69
  end
65
70
 
71
+ # insere (caso existam) dados novos etherscan no bigquery
72
+ def processa_weth
73
+ processa_eth
74
+ end
75
+
66
76
  # insere transacoes blockchain novas nas tabelas etht (norml), ethi (internas), ethp (block), ethw (withdrawals), ethk (token)
67
77
  def processa_eth
68
78
  puts(format("%<n>4i TRANSACOES ETH NORMAIS\tINSERIDAS etht", n: apies.novtx.empty? ? 0 : dml(etht_ins)))
@@ -72,12 +82,6 @@ module Cns
72
82
  puts(format("%<n>4i TOKENS\tETH\t\tINSERIDAS ethk", n: apies.novkx.empty? ? 0 : dml(ethk_ins)))
73
83
  end
74
84
 
75
- # insere transacoes blockchain novas nas tabelas etht (norml), ethi (internas), ethp (block), ethw (withdrawals), ethk (token)
76
- def processa_weth
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
79
- end
80
-
81
85
  private
82
86
 
83
87
  # insere transacoes exchange kraken novas nas tabelas ust (trades), usl (ledger)
data/lib/cns/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cns
4
- VERSION = '0.4.3'
4
+ VERSION = '0.4.4'
5
5
  end
data/lib/cns.rb CHANGED
@@ -16,6 +16,14 @@ require('cns/version')
16
16
  module Cns
17
17
  # classe para carregar/mostrar dados transacoes eth & eos no bigquery
18
18
  class CLI < Thor
19
+ desc 'seth', 'mostra eth transacoes'
20
+ option :v, type: :boolean, default: true, desc: 'mostra transacoes'
21
+ option :t, type: :boolean, default: false, desc: 'mostra transacoes todas ou somente novas'
22
+ # mostra eth transacoes
23
+ def seth
24
+ Bigquery.new(options).mostra_seth
25
+ end
26
+
19
27
  desc 'weth', 'carrega transacoes eth no bigquery'
20
28
  option :h, type: :hash, default: {}, desc: 'configuracao ajuste reposicionamento temporal'
21
29
  # carrega transacoes eth no bigquery
@@ -23,6 +31,14 @@ module Cns
23
31
  Bigquery.new(options).processa_weth
24
32
  end
25
33
 
34
+ desc 'skrk', 'mostra kraken/eth transacoes'
35
+ option :v, type: :boolean, default: true, desc: 'mostra transacoes'
36
+ option :t, type: :boolean, default: false, desc: 'mostra transacoes todas ou somente novas'
37
+ # mostra kraken/eth transacoes
38
+ def skrk
39
+ Bigquery.new(options).mostra_skrk
40
+ end
41
+
26
42
  desc 'wkrk', 'carrega transacoes kraken/eth no bigquery'
27
43
  option :h, type: :hash, default: {}, desc: 'configuracao ajuste reposicionamento temporal'
28
44
  # carrega transacoes kraken/eth no bigquery
@@ -45,14 +61,6 @@ module Cns
45
61
  Bigquery.new(options).mostra_tudo
46
62
  end
47
63
 
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
64
+ default_task :seth
57
65
  end
58
66
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cns
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hernâni Rodrigues Vaz