0.0
No release in over a year
Ruby gem for FirstGem
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 10.0
~> 0.12
~> 10.0
~> 1.0

Runtime

~> 0.7.0
< 2.0
 Project Readme

GEMFILE:

    gem 'first_gem_rb', '~> 0.1.0'

INSTALL:

    $ gem install first_gem_rb

Gem Project Basic Structure

  • bin
  • lib
    • <gem_name_file>
    • <gem_name_dir>
      • version.rb
      • <class_name>.rb
  • spec
  • .gitignore
  • .ruby-version
  • CHANGELOG.md
  • LICENSE.txt
  • README.md
  • Gemfile
  • Rakefile
  • <gem_name>.gemspec

Build Gem

   $ gem build <gem_name>.gemspec
    Successfully built RubyGem
    Name: <gem_name>
    Version: <gem_version>
    File: <gem_name>-<gem_version>.gem

Install Gem Locally

    $ gem install ./<gem_name>-<gem_version>.gem
    Successfully installed <gem_name>-<gem_version>
    1 gem installed

Test Gem Locally

    $ irb
    >> require '<gem_name>'
        => true
    >> FirstGem::Hola.hi
        Hello world!

Deploy Gem on RubyGems

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

    Enter host password for user '<user_name>':
    $ gem push <gem_name>-<gem_version>.gem
    Pushing gem to RubyGems.org...
    Successfully registered gem: <gem_name> (<gem_version>)

License

MIT License Copyright (c) 2022 Ahmed Abdelhamid