cardano_wallet 0.1.2 → 0.1.3

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: e29845cb4672d029153cec037844d2092a542c6513bfdd5a8d05288e85ad1f24
4
- data.tar.gz: 5584f5d87039805b91bac5e39842c08b1ace6b79d732f9feba3e138c2f4983e9
3
+ metadata.gz: 18f7c7b3b86013c1d54155e315cc55618607d3966fed126a32041f59db989e43
4
+ data.tar.gz: 327110f84584c66842d1fd2d5fd89e55711a01c5372b93585763f7dac0eb3a19
5
5
  SHA512:
6
- metadata.gz: 7feb9ac4fbb80c4f27bf7c3a454b2b89e03bbb99916374484f37ce8fcb36ea0b088def659aea7a36ffe16a833565d12905583deec04eb9761417880d263b1749
7
- data.tar.gz: 701838da0b5377578b46b45a8051ca1661eb1f89a1829a272206ec9e6d01be23a2ae40f773992955e4a67b369a7387247a898a2daa1238809b6ba96aa482e89c
6
+ metadata.gz: 591537d49cd9665a1e162435e6e72e6fe41b2515e47dde9a0894e1593572efcab01fb567879fe3bbc7a75050397fbce1a40b67687b6d7745cccd0be40268ebc9
7
+ data.tar.gz: 4fe2f473246fafb52bde69d8c85b9140a66fd40bc024a8307dde779fbe291a6a7aa9fa89f396ec3c65c0c47d63eaa457fb5f2db20bea0ad7dda0752f6a225795
@@ -0,0 +1,34 @@
1
+ name: Nightly
2
+
3
+ on:
4
+ schedule:
5
+ - cron: "0 21 * * *"
6
+
7
+ jobs:
8
+ test:
9
+
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - name: Set up cardano-wallet
15
+ run: NODE_CONFIG_PATH=`pwd`/spec/shelley-testnet docker-compose -f docker-compose-shelley.yml up --detach
16
+ - name: Set up Ruby
17
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
18
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
19
+ # uses: ruby/setup-ruby@v1
20
+ uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
21
+ with:
22
+ ruby-version: 2.6
23
+ - name: Install dependencies
24
+ run: bundle install
25
+ - name: Wait until node is synced
26
+ run: bundle exec rake wait_until_node_synced
27
+ - name: Run all tests
28
+ run: bundle exec rspec
29
+ env:
30
+ CI: true
31
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
32
+ NETWORK: testnet
33
+ WALLET: dev-master-shelley
34
+ NODE: master
@@ -31,11 +31,11 @@ jobs:
31
31
  ruby-version: 2.6
32
32
  - name: Install dependencies
33
33
  run: bundle install
34
- - name: Run tests
35
- run: bundle exec rake
34
+ - name: Run all tests except nighlty
35
+ run: bundle exec rspec . -t ~nightly
36
36
  env:
37
37
  CI: true
38
38
  CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
39
39
  NETWORK: testnet
40
40
  WALLET: dev-master-shelley
41
- NODE: 1.13.0
41
+ NODE: master
data/README.md CHANGED
@@ -11,6 +11,9 @@
11
11
  <a href="https://github.com/piotr-iohk/cardano-wallet-rb/actions?query=workflow%3ATests">
12
12
  <img src="https://github.com/piotr-iohk/cardano-wallet-rb/workflows/Tests/badge.svg" />
13
13
  </a>
14
+ <a href="https://github.com/piotr-iohk/cardano-wallet-rb/actions?query=workflow%3ANightly">
15
+ <img src="https://github.com/piotr-iohk/cardano-wallet-rb/workflows/Nightly/badge.svg" />
16
+ </a>
14
17
 
15
18
  # cardano-wallet-rb
16
19
 
data/Rakefile CHANGED
@@ -4,3 +4,13 @@ require "rspec/core/rake_task"
4
4
  RSpec::Core::RakeTask.new(:spec)
5
5
 
6
6
  task :default => :spec
7
+
8
+ require_relative "lib/cardano_wallet"
9
+ task :wait_until_node_synced do
10
+ desc "Wait for node to be synced"
11
+ network = CardanoWallet.new.misc.network
12
+ while network.information["sync_progress"]["status"] == "syncing" do
13
+ puts "Syncing... #{network.information["sync_progress"]["progress"]["quantity"]}%"
14
+ sleep 15
15
+ end
16
+ end
@@ -230,8 +230,9 @@ module CardanoWallet
230
230
 
231
231
  # List all stake pools
232
232
  # @see https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/listStakePools
233
- def list(wid)
234
- self.class.get("/wallets/#{wid}/stake-pools")
233
+ def list(stake = {})
234
+ stake.empty? ? query = '' : query = Utils.to_query(stake)
235
+ self.class.get("/stake-pools#{query}")
235
236
  end
236
237
 
237
238
  # Join stake pool
@@ -1,3 +1,3 @@
1
1
  module CardanoWallet
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cardano_wallet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Stachyra
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-06-14 00:00:00.000000000 Z
11
+ date: 2020-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -102,6 +102,7 @@ extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
104
  - ".github/workflows/gem-push.yml"
105
+ - ".github/workflows/nightly.yml"
105
106
  - ".github/workflows/tests.yml"
106
107
  - ".gitignore"
107
108
  - ".rakeTasks"