coloredcoins 0.0.4 → 0.0.5

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
  SHA1:
3
- metadata.gz: 40f72c8e938e9f3342eef82b2056bbb8176fb433
4
- data.tar.gz: ce500a133e9c5febfacd849ad05c41e19989c9ef
3
+ metadata.gz: e3f9f320d62b619f4380823e7ed1da7696728ec2
4
+ data.tar.gz: bee587696feed4f1c7ae29e64690aee5656943ad
5
5
  SHA512:
6
- metadata.gz: 6667d99867bfb7cf98e6c6bcea8040eb8ab397209267d665b77980aa53a1b72ccb94ea50d11cd9c83ae0bf9d5dc1450224944168cd10208da25232aaa73d4936
7
- data.tar.gz: 455537aab1c344785b7aff34a1eac41169f53800475da392c55425194970aa5c74fbded32825107037a48dbf0c5a6dbfec2018af12c9da6966129181fc4675d1
6
+ metadata.gz: 9842997cdaf54e317c136c3b32214703b5d6cfc13253e8f4ee457a0a49b92a61d5d880019a80fb5dc07b7654ffd0c4a502a0531fefb2842dbf6983646ec48500
7
+ data.tar.gz: bb48333e53ffa66f0babc2e66730201b76ff9abf948ba6858c11da93edb3268361a560823e361d77e2b9efebca76063d9a058c408c8a812cd779cfe764417b25
data/.rubocop.yml CHANGED
@@ -9,3 +9,7 @@ Style/Documentation:
9
9
 
10
10
  Style/HashSyntax:
11
11
  EnforcedStyle: ruby19
12
+
13
+ Metrics/BlockLength:
14
+ Exclude:
15
+ - 'spec/**/*'
data/Gemfile CHANGED
@@ -10,6 +10,6 @@ group :development, :test do
10
10
  gem 'guard-rubocop'
11
11
  gem 'terminal-notifier-guard'
12
12
  # force gems for ruby <2.1.2
13
- gem 'ruby_dep', '1.3.1'
14
13
  gem 'listen', '3.0.8'
14
+ gem 'ruby_dep', '1.3.1'
15
15
  end
@@ -34,6 +34,11 @@ module Coloredcoins
34
34
  @connection.post('/sendasset', asset)
35
35
  end
36
36
 
37
+ # http://coloredcoins.org/documentation/#BurnAsset
38
+ def burn_asset(args)
39
+ @connection.post('/burnasset', args)
40
+ end
41
+
37
42
  # http://coloredcoins.org/documentation/#BroadcastTransaction
38
43
  def broadcast(tx_hex)
39
44
  @connection.post('/broadcast', txHex: tx_hex)
@@ -1,3 +1,3 @@
1
1
  module Coloredcoins
2
- VERSION = '0.0.4'.freeze
2
+ VERSION = '0.0.5'.freeze
3
3
  end
@@ -68,6 +68,17 @@ describe Coloredcoins::API do
68
68
  end
69
69
  end
70
70
 
71
+ describe '#burn_asset' do
72
+ it 'should call connection' do
73
+ args = {
74
+ from: ['blah'],
75
+ burn: [{ assetId: 'blah', amount: 1 }]
76
+ }
77
+ subject.burn_asset(args)
78
+ expect(subject.connection).to have_received(:post).with(/burnasset/, args)
79
+ end
80
+ end
81
+
71
82
  describe '#asset_metadata' do
72
83
  it 'should call connection' do
73
84
  subject.asset_metadata('asset_id', 'utxo:1')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coloredcoins
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genaro Madrid
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-03 00:00:00.000000000 Z
11
+ date: 2017-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client