vendi 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 19f37dec74417ace8e5980584edc2e5c9b02fb03e5480abf35f2d929126df521
4
- data.tar.gz: bc8ac9b3addadc2c10230468ed18a2081a86c42681ec2beccdd798ba6b1b311f
3
+ metadata.gz: 4b6e8fbf628bc618da176a73c2f7e77d9ff300bb022dc8dfbe672e5fe3e7e1a1
4
+ data.tar.gz: 4c1d42a3aecf7eace980b4d91c2b5ff8378cc22d5fac64ad7b671cdcabf8490f
5
5
  SHA512:
6
- metadata.gz: f7b93150c1274e0f5bf81687ba4e42ba5bd291f747397c900ad2d73aa986ac1a926cad2c5bf579aea7b78012b0b02a99ad838df4cbfdc1f152675e84566aceb2
7
- data.tar.gz: 79644c8d01cd86d11803ec04c9cc2f692537009a20bdeb2753ef679a9301317df078b913a532383d8612fc65eba85cd3ba9a597627d92d35deac88c13fd66cd4
6
+ metadata.gz: c98f5cec080dfe60b0258963a81bd2bdd17e6545b5f93b8e64819ab6827fe77e2e3d607997199543e48eaedc130b004cdde0941e9818703220e985deb78b7999
7
+ data.tar.gz: cb5354b00b067303470076e72b9368e2664b5fa2c75cb4ac7ba902b4433c1b6d7d65e7fd5aebd235f393fd11d4d3d6cfd1f95a2b7fed0927deafe617ea69e7d1
data/bin/vendi CHANGED
@@ -8,7 +8,7 @@ doc = <<~DOCOPT
8
8
  Vendi - CNFT Vending Machine.
9
9
 
10
10
  Usage:
11
- #{File.basename(__FILE__)} fill --collection <name> --price <lovelace> --nft-count <int> [--wallet-port <port>]
11
+ #{File.basename(__FILE__)} fill --collection <name> --price <lovelace> --nft-count <int> [--wallet-port <port>] [--skip-wallet-creation]
12
12
  #{File.basename(__FILE__)} serve --collection <name> [--wallet-port <port>] [--logfile <file>]
13
13
  #{File.basename(__FILE__)} -v | --version
14
14
  #{File.basename(__FILE__)} -h | --help
@@ -40,7 +40,6 @@ DOCOPT
40
40
 
41
41
  begin
42
42
  o = Docopt.docopt(doc)
43
-
44
43
  warn Vendi::VERSION if o['--version']
45
44
 
46
45
  if o['fill']
@@ -48,6 +47,7 @@ begin
48
47
  price = o['--price']
49
48
  nft_count = o['--nft-count']
50
49
  wallet_port = o['--wallet-port']
50
+ skip_wallet = o['--skip-wallet-creation']
51
51
  vendi = Vendi.init({ port: wallet_port.to_i })
52
52
  begin
53
53
  if File.directory?(File.join(vendi.config_dir, collection_name))
@@ -55,7 +55,11 @@ begin
55
55
  yn = $stdin.gets.chomp
56
56
  raise Interrupt unless %w[y Y].include?(yn)
57
57
  end
58
- vendi.fill(collection_name, price, nft_count)
58
+ if skip_wallet
59
+ vendi.fill(collection_name, price, nft_count, skip_wallet: true)
60
+ else
61
+ vendi.fill(collection_name, price, nft_count)
62
+ end
59
63
  rescue StandardError => e
60
64
  vendi.logger.error e.message
61
65
  rescue Interrupt
data/lib/vendi/machine.rb CHANGED
@@ -156,7 +156,7 @@ module Vendi
156
156
 
157
157
  txs_new = get_incoming_txs(wid)
158
158
  if txs.size < txs_new.size
159
- txs_to_check = get_transactions_to_process(tx_delta, txs)
159
+ txs_to_check = get_transactions_to_process(txs_new, txs)
160
160
  @logger.info "New txs arrived: #{txs_to_check.size}"
161
161
  @logger.info (txs_to_check.map { |t| t['id'] }).to_s
162
162
 
data/lib/vendi/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Vendi
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vendi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Stachyra