-
Notifications
You must be signed in to change notification settings - Fork 909
Publish a Gem
Sylhare edited this page May 19, 2020
·
2 revisions
Ok leaving here some more insight.
First to test that the gem gets all the required documents:
gem build type-on-strap.gemspec
gem unpack type-on-strap-x.x.gem
Then the part that changed, I have removed that "git" thing because it was trouble some. Instead I start with all of the documents and I select the repository and files I want:
spec.files = Dir.glob("**/{*,.*}").select do |f|
f.match(%r{^(assets|pages|_(portfolio|includes|layouts|sass)/|(LICENSE|Gemfile|_config.yml|index.html)((\.(txt|md|markdown)|$)))}i)
end
I could have used a .reject
to remove some files, or a &
after end
to add manually a directory/page with Dir[file, directory/**]
.
No I want to push the gem online and test it from there.
# Push the gem online
gem push type-on-strap-x.x.gem
# Delete the gem online
gem yank type-on-strap -v x-x
Powered by Jekyll with Type on Strap