metaboss_rails 0.1.0
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 +7 -0
- data/.rubocop.yml +52 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +30 -0
- data/README.md +35 -0
- data/Rakefile +4 -0
- data/bin/console +15 -0
- data/bin/metaboss_rails +6 -0
- data/bin/setup +8 -0
- data/exe/metaboss +0 -0
- data/lib/metaboss_rails/update/uri.rb +19 -0
- data/lib/metaboss_rails/version.rb +5 -0
- data/lib/metaboss_rails.rb +21 -0
- data/metaboss_rails.gemspec +45 -0
- metadata +116 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 46078df5fd7ae26721003dc34f63bc25a3244c770244def0ca090a3833169ab8
|
4
|
+
data.tar.gz: f6542e35606a6254e9d499484ec28003887e6eb13e0741a020c079907455c934
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2d466b47987cef4fe000c9e9c2869440c6587db1a25cbfacf799c1734454bddebe767f09f41f9ef214f8e5b4396e0b08e21214b7dc5c281b80c5508d7f3b3e41
|
7
|
+
data.tar.gz: 5f3c20937fa6e93580461ccaf0c4bc0c3e4124510b6d12a509e095e835b5298e143cf0e000bc9248db36c885a2dcaa1771e249c9e4b027164dc6a746ee5e1ba2
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
inherit_mode:
|
2
|
+
merge:
|
3
|
+
- Exclude
|
4
|
+
|
5
|
+
AllCops:
|
6
|
+
NewCops: enable
|
7
|
+
SuggestExtensions: false
|
8
|
+
TargetRubyVersion: 3.0.0
|
9
|
+
Exclude:
|
10
|
+
- 'db/**/*'
|
11
|
+
- 'config/**/*'
|
12
|
+
- 'bin/**/*'
|
13
|
+
- Gemfile
|
14
|
+
- Rakefile
|
15
|
+
|
16
|
+
Layout/LineLength:
|
17
|
+
Max: 99
|
18
|
+
|
19
|
+
Layout/HashAlignment:
|
20
|
+
EnforcedHashRocketStyle: table
|
21
|
+
|
22
|
+
Layout/FirstHashElementIndentation:
|
23
|
+
EnforcedStyle: consistent
|
24
|
+
|
25
|
+
Style/Documentation:
|
26
|
+
Enabled: false
|
27
|
+
|
28
|
+
Style/FrozenStringLiteralComment:
|
29
|
+
Enabled: false
|
30
|
+
|
31
|
+
Style/BlockComments:
|
32
|
+
Enabled: false
|
33
|
+
|
34
|
+
Style/EmptyMethod:
|
35
|
+
EnforcedStyle: expanded
|
36
|
+
|
37
|
+
Style/StringLiterals:
|
38
|
+
EnforcedStyle: double_quotes
|
39
|
+
|
40
|
+
Style/RaiseArgs:
|
41
|
+
AllowedCompactTypes:
|
42
|
+
- OrganizationHasAlreadyBeenResetError
|
43
|
+
|
44
|
+
Metrics/BlockLength:
|
45
|
+
Exclude:
|
46
|
+
- 'spec/**/*'
|
47
|
+
|
48
|
+
Naming/VariableNumber:
|
49
|
+
EnforcedStyle: snake_case
|
50
|
+
|
51
|
+
Naming/PredicateName:
|
52
|
+
ForbiddenPrefixes: [is_]
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
metaboss_rails (0.1.0)
|
5
|
+
httparty
|
6
|
+
thor
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
httparty (0.20.0)
|
12
|
+
mime-types (~> 3.0)
|
13
|
+
multi_xml (>= 0.5.2)
|
14
|
+
mime-types (3.4.1)
|
15
|
+
mime-types-data (~> 3.2015)
|
16
|
+
mime-types-data (3.2022.0105)
|
17
|
+
multi_xml (0.6.0)
|
18
|
+
rake (13.0.6)
|
19
|
+
thor (1.2.1)
|
20
|
+
|
21
|
+
PLATFORMS
|
22
|
+
x86_64-darwin-21
|
23
|
+
|
24
|
+
DEPENDENCIES
|
25
|
+
bundler (~> 2.2.31)
|
26
|
+
metaboss_rails!
|
27
|
+
rake (~> 13.0)
|
28
|
+
|
29
|
+
BUNDLED WITH
|
30
|
+
2.2.31
|
data/README.md
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# Metaboss Rails
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/metaboss_rails` . To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
Metaboss v0.7.0
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'metaboss_rails'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle install
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install metaboss_rails
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
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 the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/metaboss_rails.
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "bundler/setup"
|
5
|
+
require "metaboss_rails"
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
# require "pry"
|
12
|
+
# Pry.start
|
13
|
+
|
14
|
+
require "irb"
|
15
|
+
IRB.start(__FILE__)
|
data/bin/metaboss_rails
ADDED
data/bin/setup
ADDED
data/exe/metaboss
ADDED
Binary file
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module MetabossRails
|
2
|
+
module Update
|
3
|
+
class Uri < Thor
|
4
|
+
include Thor::Actions
|
5
|
+
|
6
|
+
desc "Updates URI",
|
7
|
+
"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."
|
9
|
+
option :keypair, type: :string, required: true, desc: "The path to the keypair to use."
|
10
|
+
option "new-uri", type: :string, required: true, desc: "The new URI with updated metadata."
|
11
|
+
# metaboss update uri --keypair <PATH_TO_KEYPAIR> --account <MINT_ACCOUNT> --new-uri <NEW_URI>
|
12
|
+
def uri
|
13
|
+
method = "update uri"
|
14
|
+
args = options.map { |k, v| "--#{k} '#{v}'" }.join(" ")
|
15
|
+
puts run Metaboss.command(method, args), capture: true
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "thor"
|
4
|
+
require_relative "metaboss_rails/version"
|
5
|
+
require "metaboss_rails/update/uri"
|
6
|
+
|
7
|
+
module MetabossRails
|
8
|
+
class Error < StandardError; end
|
9
|
+
|
10
|
+
class Metaboss < Thor
|
11
|
+
EXE_PATH = File.expand_path("exe/metaboss")
|
12
|
+
|
13
|
+
def self.command(method, args)
|
14
|
+
"#{EXE_PATH} #{method} #{args}"
|
15
|
+
end
|
16
|
+
|
17
|
+
desc "Update various aspects of an NFT.",
|
18
|
+
"Warning: These commands modify your NFT and are for advanced users. Use with caution."
|
19
|
+
subcommand "update", MetabossRails::Update::Uri
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/metaboss_rails/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "metaboss_rails"
|
7
|
+
spec.version = MetabossRails::VERSION
|
8
|
+
spec.authors = ["Danny Pham"]
|
9
|
+
spec.email = ["dannynpham11@gmail.com"]
|
10
|
+
|
11
|
+
spec.summary = "Rails gem for Metaboss"
|
12
|
+
# spec.description = "TODO: Write a longer description or delete this line."
|
13
|
+
spec.homepage = "https://github.com/dannynpham/metaboss_rails.git"
|
14
|
+
spec.required_ruby_version = ">= 3.0.1.64"
|
15
|
+
|
16
|
+
# spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"
|
17
|
+
|
18
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
19
|
+
spec.metadata["source_code_uri"] = "https://github.com/dannynpham/metaboss_rails.git"
|
20
|
+
spec.metadata["changelog_uri"] = "https://github.com/dannynpham/metaboss_rails.git"
|
21
|
+
|
22
|
+
# Specify which files should be added to the gem when it is released.
|
23
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
24
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
25
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
26
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
27
|
+
end
|
28
|
+
end
|
29
|
+
spec.bindir = "exe"
|
30
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
31
|
+
spec.require_paths = ["lib"]
|
32
|
+
|
33
|
+
# Uncomment to register a new dependency of your gem
|
34
|
+
# spec.add_dependency "example-gem", "~> 1.0"
|
35
|
+
|
36
|
+
spec.add_dependency "httparty"
|
37
|
+
spec.add_dependency "thor"
|
38
|
+
|
39
|
+
spec.add_development_dependency "bundler", "~> 2.2.31"
|
40
|
+
spec.add_development_dependency "rake"
|
41
|
+
|
42
|
+
# For more information and examples about making a new gem, checkout our
|
43
|
+
# guide at: https://bundler.io/guides/creating_gem.html
|
44
|
+
spec.metadata["rubygems_mfa_required"] = "true"
|
45
|
+
end
|
metadata
ADDED
@@ -0,0 +1,116 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: metaboss_rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Danny Pham
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2022-06-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: httparty
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: thor
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 2.2.31
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 2.2.31
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description:
|
70
|
+
email:
|
71
|
+
- dannynpham11@gmail.com
|
72
|
+
executables:
|
73
|
+
- metaboss
|
74
|
+
extensions: []
|
75
|
+
extra_rdoc_files: []
|
76
|
+
files:
|
77
|
+
- ".rubocop.yml"
|
78
|
+
- Gemfile
|
79
|
+
- Gemfile.lock
|
80
|
+
- README.md
|
81
|
+
- Rakefile
|
82
|
+
- bin/console
|
83
|
+
- bin/metaboss_rails
|
84
|
+
- bin/setup
|
85
|
+
- exe/metaboss
|
86
|
+
- lib/metaboss_rails.rb
|
87
|
+
- lib/metaboss_rails/update/uri.rb
|
88
|
+
- lib/metaboss_rails/version.rb
|
89
|
+
- metaboss_rails.gemspec
|
90
|
+
homepage: https://github.com/dannynpham/metaboss_rails.git
|
91
|
+
licenses: []
|
92
|
+
metadata:
|
93
|
+
homepage_uri: https://github.com/dannynpham/metaboss_rails.git
|
94
|
+
source_code_uri: https://github.com/dannynpham/metaboss_rails.git
|
95
|
+
changelog_uri: https://github.com/dannynpham/metaboss_rails.git
|
96
|
+
rubygems_mfa_required: 'true'
|
97
|
+
post_install_message:
|
98
|
+
rdoc_options: []
|
99
|
+
require_paths:
|
100
|
+
- lib
|
101
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - ">="
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: 3.0.1.64
|
106
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
requirements: []
|
112
|
+
rubygems_version: 3.2.15
|
113
|
+
signing_key:
|
114
|
+
specification_version: 4
|
115
|
+
summary: Rails gem for Metaboss
|
116
|
+
test_files: []
|