[Caution] I didn't take the time to investigate, scrutinize, and confirm this article, so please read it in half.
--Files used to manage the library
――The difference between these is
--Rewrite Gemfile
and my_rubygem.gemspec
by yourself
--Rails dependency library management edits Gemfile
-** Edit my_rubygem.gemspec
for gem dependency library management **
--Gemfile.lock
can be rewritten by $ bundle install
These are included in the files created by bundle gem my_ruby gem
.
my_rubygem/lib/my_rubygem.rb
my_rubygem/lib/my_rubygem/version.rb
my_rubygem/my_rubygem.gemspec
Of these, rewrite as follows
my_rubygem/lib/my_rubygem/version.rb
module MyRubygem
VERSION = "0.20.0"
end
my_rubygem/gemfile.gemspec
require "my_rubygem/version"
Gem::Specification.new do |spec|
spec.name = "MyRubygem"
spec.version = MyRubygem::VERSION
spec.authors = ["John Lennon"]
spec.email = ["[email protected]"]
.....
end
Recommended Posts