We will clone the project rspec-github-actions and use Bundler to initialize the project:
$ git clone https://github.com/okeeffed/rspec-github-actions.git
$ cd rspec-github-actions
# Checkout the starting point
$ git checkout 1-rspec-with-github-actions
# Make the related gemspec
$ touch contrived_math.gemspec
At this stage, our project is now ready to start working with.
Updating our Gemspec file
Details about our Gem will be added into the contrived_math.gemspec file that was created.
I have filled out my details, and so it looks like so:
Gem::Specification.new do |s|
s.name = 'contrived_math'
s.version = '0.0.0'
s.summary = 'Hello, World!'
s.description = 'A simple hello world gem'
s.authors = ["Dennis O'Keeffe"]
s.email = 'hello@dennisokeeffe.com'
s.files = ['lib/contrived_math.rb']
s.homepage =
'https://rubygems.org/gems/contrived_math'
s.license = 'MIT'
end
At this point, we can build the gem locally.
Building the gem
We can build the gem with a simple gem build command.