-
Notifications
You must be signed in to change notification settings - Fork 1
Updating The Gem
CoderDonohoe edited this page Dec 7, 2021
·
1 revision
If anyone ever needs to update the Ruby gem, I am following the official guidelines here: https://guides.rubygems.org/make-your-own-gem/
- Make your changes (to the code, or to the gemspec file to have the listing on the RubyGem page altered (https://rubygems.org/gems/urlbox))
- Update the version number in the gemspec file (https://github.com/urlbox/urlbox-ruby/blob/main/urlbox.gemspec#L6)
- Build the gem:
gem build urlbox.gemspec
- To test any changes locally:
gem install ./urlbox-NEW_VERSION_NUMBER
irb
>> require urlbox
>> urlbox_client = Urlbox::Client.new(api_key: ...)
>> urlbox_client.get(...)
- Assuming you have set up RubyGems authentication
Download https://rubygems.org/api/v1/api_key.yaml
save it as "~/.gem/credentials", and run:
chmod 0600 ~/.gem/credentials
)
...then you can just push the new version up to RubyGems:
gem push urlbox-NEW_VERSION_NUMBER
- Make sure your code/gemspec changes are also pushed up to Github.