[RUBY] Try to release gem

Let's release a Ruby gem. To be precise, it was released last time in 2009, so it will be the first re-release in 11 years. For the gem release method, refer to the following. Reference: https://qiita.com/9sako6/items/72994b8b1c00af4e61fe

1. Get the previously released one

Previously released are below. In other words, you can still use it with gem install cutep.

With the disappearance of RubyForge, the homepage has disappeared and the source code can no longer be seen. Re-release on GitHub. I have the original file, but I decided to start with the same gem. Get the source code from the following.

Change the .gem extension to zip and unzip it. Then you will get data.tar.gz and metadata.gz. Unzip it to see the source.

2. Use bundle

% gem install bundler
% cd ~/dev
% bundle gem cutep -t
Creating gem 'cutep'...
Do you want to license your code permissively under the MIT license?
This means that any other developer or company will be legally allowed to use your code for free as long as they admit you created it. You can read more about the MIT license at https://choosealicense.com/licenses/mit. y/(n): y
MIT License enabled in config
Do you want to include a code of conduct in gems you generate?
Codes of conduct can increase contributions to your project by contributors who prefer collaborative, safe spaces. You can read more about the code of conduct at contributor-covenant.org. Having a code of conduct means agreeing to the responsibility of enforcing it, so be sure that you are prepared to do that. Be sure that your email address is specified as a contact in the generated code of conduct so that people know who to contact in case of a violation. For suggestions about how to enforce codes of conduct, see https://bit.ly/coc-enforcement. y/(n): y
Code of conduct enabled in config
      create  cutep/Gemfile
      create  cutep/lib/cutep.rb
      create  cutep/lib/cutep/version.rb
      create  cutep/cutep.gemspec
      create  cutep/Rakefile
      create  cutep/README.md
      create  cutep/bin/console
      create  cutep/bin/setup
      create  cutep/.gitignore
      create  cutep/.travis.yml
      create  cutep/.rspec
      create  cutep/spec/spec_helper.rb
      create  cutep/spec/cutep_spec.rb
      create  cutep/LICENSE.txt
      create  cutep/CODE_OF_CONDUCT.md
Initializing git repo in /Users/eto/dev/Day22_cutep/cutep
Gem 'cutep' was successfully created. For more information on making a RubyGem visit https://bundler.io/guides/creating_gem.html
% cd cutep

--It is automatically a git repository. Add this to GitHub. Reference: https://qiita.com/sodaihirai/items/caf8d39d314fa53db4db --New repository from + on the upper right of https://github.com/eto/. → Do not create README → Create --https://github.com/eto/cutep is created.

% git commit -m "Initialize repository"
% git remote add origin https://github.com/eto/cutep.git
% git push origin master

--If you look at https://github.com/eto/cutep again, you can see that the contents are complete.

3. Modify the source

--Match the source created by decompressing 1 above with the template created by bundler in 2 above. The version should be 1.1.0. --Here, there is a discrepancy that the gem name is cutep and the actual name is qp, so it was necessary to change it a little. % git commit -m "Adapt the old version 1.0.0 files." % git push origin master As, upload to github.

4. Test

% bundle exec rake spec

5. Prepare gemspec

It was roughly as shown on the page below, Reference: https://qiita.com/9sako6/items/72994b8b1c00af4e61fe

It was necessary to explicitly specify rubygems as follows. Has it changed? spec.metadata["allowed_push_host"] = "https://rubygems.org/"

6. Get the API key for RubyGems.org

I have a RubyGems.org account that I created earlier, so connect to it.

% curl -u eto https://rubygems.org/api/v1/api_key.yaml > ~/.gem/credentials; chmod 0600 ~/.gem/credentials

When asked for a password, enter the rubygems.org password.

7. Publish the gem

% git push --set-upstream origin master
% rake release

1.1.0 has been released as follows. https://rubygems.org/gems/cutep

done!

Recommended Posts

Try to release gem
Try Spring Boot from 0 to 100.
Try to introduce OpenCV to Android application
Try to make a simple callback
Try to implement Yubaba in Ruby
Try to implement iOS14 Widget function
Try to imitate marshmallows with MiniMagick
[Java] Try to implement using generics
Try to extract java public method
Try to create a server-client app
Try to implement Yubaba in Java
CompletableFuture Getting Started 2 (Try to make CompletableFuture)
Try to make a peepable iterator
Try "Introduction to Vert.x" on Gradle
to_ ○
Interface Try to make Java problem TypeScript 7-3
Try to organize your own object orientation
Try to solve Project Euler in Java
Try to implement n-ary addition in Java
Try to implement login function with Spring-Boot
Try moving WildFly wild-from installation to deployment-
Try deploying Rails app to EC2-Part 2 (Deploy)-
Try to implement UIAlertController by separating files
Try to use docker command without sudo.
Try changing the .erb file to .slim
Try to carry out paiza skill check
Try to sort classes by enumeration type
[Linux convenient command] Try to insert delta