metaboss_rails 0.1.2 → 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: 0701f516a6e2927f44b086c702099b3424b9b899985982ab10b2585f81688fea
4
- data.tar.gz: 77360223cab45097dede8fc42fabcbe469d9adcaf239d8dab4fc619cb2a2eba0
3
+ metadata.gz: f09393cbaa774c5b41df3b398373e763fb61d397fc30234139f6a17e2bc6cb8c
4
+ data.tar.gz: 5a9219c3ba04f2ae6aa2a2979e6934aae5fab630f205c73978498f825ecb37fb
5
5
  SHA512:
6
- metadata.gz: 7f7960ca899a9fd97d49558da4358cbdfba4caefc7f14793cf3f6414cfd0654f267a41885a0780eb2b66a76eac708661429c05125ce883e4b927c2f70ffb06c6
7
- data.tar.gz: 3b24285e7378dd089aa6ce3d10342e1f67245648d0000340a80f275cadf4fb713f221eb352fb17974123045564a24a4574bbab0d6478f796c37b3bedacbb7130
6
+ metadata.gz: 744b277640926367066184bc5f83351dff8969500181f9d64ee978b7b2fe7ce2c7c7bf1e79b8e8b9ad035cd77204a567804d5e7324d138b72f9a8efe4a4ba54b
7
+ data.tar.gz: ba0b9178e262e7269e38faf2cfba62420462a4e509b72c538814fac9f5874e084a8b52c600539fa6a299bcbcd405a1807359741ff923f27c29934c0326a1f7d9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- metaboss_rails (0.1.1)
4
+ metaboss_rails (0.1.4)
5
5
  thor
6
6
 
7
7
  GEM
@@ -3,16 +3,23 @@ module MetabossRails
3
3
  class Uri < Thor
4
4
  include Thor::Actions
5
5
 
6
+ def self.exit_on_failure?
7
+ false
8
+ end
9
+
6
10
  desc "Updates URI",
7
11
  "Update the metadata URI, keeping the rest of the Data struct the same."
8
- option :account, type: :string, required: true, desc: "The mint account to update the URI for."
12
+ option :account, type: :string, required: true,
13
+ desc: "The mint account to update the URI for."
9
14
  option :keypair, type: :string, required: true, desc: "The path to the keypair to use."
10
15
  option "new-uri", type: :string, required: true, desc: "The new URI with updated metadata."
11
16
  # metaboss update uri --keypair <PATH_TO_KEYPAIR> --account <MINT_ACCOUNT> --new-uri <NEW_URI>
12
17
  def uri
13
18
  method = "update uri"
14
19
  args = options.map { |k, v| "--#{k} '#{v}'" }.join(" ")
15
- puts run Metaboss.command(method, args), capture: true
20
+ success = run Metaboss.command(method, args)
21
+
22
+ raise Error, set_color("Failed to update URI.", :red) unless success
16
23
  end
17
24
  end
18
25
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MetabossRails
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.5"
5
5
  end
@@ -8,7 +8,7 @@ module MetabossRails
8
8
  class Error < StandardError; end
9
9
 
10
10
  class Metaboss < Thor
11
- EXE_PATH = File.expand_path("vendor/metaboss")
11
+ EXE_PATH = File.expand_path(File.join(__dir__, "../vendor/metaboss"))
12
12
 
13
13
  def self.command(method, args)
14
14
  "#{EXE_PATH} #{method} #{args}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metaboss_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Pham