lbd_sdk 0.1.4 → 0.1.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
  SHA256:
3
- metadata.gz: 938955effbd1d02f7397e594d09b20911bc35134e6e0e0f06a05e5cb27e1b026
4
- data.tar.gz: afb8bbc2bd6e5d5dee86d1e2319f56b9f0662243aea071d7b5bd284247f235a2
3
+ metadata.gz: ce658f1bab99457bca88bd4a6580d0542b1597ee2b476bbe6ff99c1079343758
4
+ data.tar.gz: 0215d9e0bff334785cb7ae4d165d6777fb5092c63e79189a81cb825021f9f6bf
5
5
  SHA512:
6
- metadata.gz: fd8d45127748646d2879765b7cddb71ae9839cedfb6eac3a2adba5897e3cc35aad929d3fa154d37ff12246e72eb2d7a6a0bed0acef664d9d0bd5d0aee0baea1d
7
- data.tar.gz: 8126c5003773417c261a08d62e2ca57a294c196b61e7d081f83c23c8777479d2d6440429379cf96ede1c58d5af8302a9d2875ee9cd951a1706bd5ef14c966d99
6
+ metadata.gz: fbfa09e390182cf084433e689c02fc30ee6b40e5ac08e3b07f9e6b13681901b82f03874103562fe6874354b871ae9a40a4026560232dff0a7fc39345c8f91573
7
+ data.tar.gz: c2297feb00a215cb64d2bb812053d78448156b9e41ba4265be4f8222184cecbe78c3df44421fb475abb3e89d7729e6d911a9e1d0930fc16736bf198a4fb708ab
data/.gitignore CHANGED
@@ -7,4 +7,5 @@
7
7
  /spec/reports/
8
8
  /tmp/
9
9
  .ruby-version
10
- node_modules/
10
+ node_modules/
11
+ tmp_console.md
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lbd_sdk (0.1.4)
4
+ lbd_sdk (0.1.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -179,6 +179,14 @@ To work prettier, run `npm i -D @prettier/plugin-ruby`.
179
179
 
180
180
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
181
181
 
182
+ ## Release
183
+
184
+ ```
185
+ bundle exec rake build
186
+ git push origin <branch>
187
+ bundle exec rake release
188
+ ```
189
+
182
190
  ## Contributing
183
191
 
184
192
  Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/lbd_sdk. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/YuheiNakasaka/lbd_sdk_rb/blob/main/CODE_OF_CONDUCT.md).
@@ -501,7 +501,7 @@ module LbdSdk
501
501
  def create_non_fungible_token(contract_id, payload = {})
502
502
  post(
503
503
  "/v1/item-tokens/#{contract_id}/non-fungibles",
504
- payload: non_fungible_token_create_update_request(payload),
504
+ payload: non_fungible_token_create_request(payload),
505
505
  )
506
506
  end
507
507
 
@@ -552,7 +552,7 @@ module LbdSdk
552
552
  def update_non_fungible_token_type(contract_id, token_type, payload = {})
553
553
  put(
554
554
  "/v1/item-tokens/#{contract_id}/non-fungibles/#{token_type}",
555
- payload: non_fungible_token_create_update_request(payload),
555
+ payload: non_fungible_token_update_request(payload),
556
556
  )
557
557
  end
558
558
 
@@ -564,7 +564,7 @@ module LbdSdk
564
564
  )
565
565
  put(
566
566
  "/v1/item-tokens/#{contract_id}/non-fungibles/#{token_type}/#{token_index}",
567
- payload: non_fungible_token_create_update_request(payload),
567
+ payload: non_fungible_token_update_request(payload),
568
568
  )
569
569
  end
570
570
 
@@ -415,9 +415,24 @@ module LbdSdk
415
415
  params
416
416
  end
417
417
 
418
- def non_fungible_token_create_update_request(options)
419
- if options[:owner_address].nil? || options[:owner_secret].nil? ||
420
- options[:name].nil?
418
+ def non_fungible_token_create_request(options)
419
+ if options[:owner_address].nil? || options[:owner_secret].nil?
420
+ raise ArgumentError,
421
+ 'owner_address and owner_secret and name are required'
422
+ end
423
+
424
+ params = {
425
+ ownerAddress: options[:owner_address],
426
+ ownerSecret: options[:owner_secret],
427
+ }
428
+
429
+ params[:name] = options[:name] if !options[:name].nil?
430
+ params[:meta] = options[:meta] if !options[:meta].nil?
431
+ params
432
+ end
433
+
434
+ def non_fungible_token_update_request(options)
435
+ if options[:owner_address].nil? || options[:owner_secret].nil?
421
436
  raise ArgumentError,
422
437
  'owner_address and owner_secret and name are required'
423
438
  end
@@ -425,9 +440,9 @@ module LbdSdk
425
440
  params = {
426
441
  ownerAddress: options[:owner_address],
427
442
  ownerSecret: options[:owner_secret],
428
- name: options[:name],
429
443
  }
430
444
 
445
+ params[:name] = options[:name] if !options[:name].nil?
431
446
  params[:meta] = options[:meta] if !options[:meta].nil?
432
447
  params
433
448
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LbdSdk
4
- VERSION = '0.1.4'
4
+ VERSION = '0.1.5'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lbd_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - YuheiNakasaka
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-07-02 00:00:00.000000000 Z
11
+ date: 2022-10-12 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: LINE Blockchain Developer SDK for Ruby. This SDK is not official LINE
14
14
  SDK.