git clone git@github.com:jasonleonhard/geminate.git
git clone https://github.com/jasonleonhard/geminate.git
cd geminate
git checkout -b 0.0.0
-
Rename your repo and folder
-
Change all of the files named "geminate" to what your gem will be called
-
When you see the word "geminate" anywhere, for the rest of this guide, I will assume you have/will change the name to match your intented new gem name
class geminate
def self.how
puts "Geminate: the gem I made to teach you how to build your own gems!"
puts "Learn how at: https://github.com/jasonleonhard/geminate"
end
end
The above file holds the class methods you are creating for others to use, when they use your gem later, feel free to modify the method name and what it does before we continue
Gem::Specification.new do |s|
s.name = 'geminate'
s.authors = ["jasonleonhard"]
s.email = ['devbrights@gmail.com']
s.files = ["lib/geminate.rb"]
s.summary = "Geminate: 1. to double or repeat 2. to make or become doubled or paired."
s.description = "Geminate the gem I made to teach you how to make your own gems!"
s.homepage = 'http://rubygems.org/gems/geminate'
s.license = 'MIT'
s.version = '0.0.0'
end
-
name, authors, email, summary, description, homepage, files
-
Consider if you want to release your gem under an MIT or GPL licence
-
Make certain your version is 0.0.0 the first time you are creating a gem
git add .
git commit -am "version 0.0.0 ready"
git push 0.0.0
git checkout master
git merge 0.0.0
https://rubygems.org/api/v1/api_key.yaml
Save the yaml file into: ~/.gem/
mv ~/Downloads/api_key.yaml ~/.gem/api_key.yaml
https://rubygems.org/profile/edit
Your API key is
You will want to run the curl command they suggest to create a ~/.gem/credentials
gem push geminate-0.0.0.gem
enter your username
enter your password
gem list -r geminate
- Warning:
- To change any gem you own, after it has been uploaded to rubygems, you must version it
Gem::Specification.new do |s|
s.name = 'geminate'
s.authors = ["jasonleonhard"]
s.email = ['devbrights@gmail.com']
s.files = ["lib/geminate.rb"]
s.summary = "geminate!"
s.description = "Geminate the gem I made to teach you how to make your own gems!"
s.homepage = 'http://rubygems.org/gems/geminate'
s.license = 'MIT'
s.version = '0.0.1' # notice this version increased from 0.0.0
end
gem build geminate.gemspec
ls -G -latrh
gem push geminate-0.0.1.gem
https://rubygems.org/gems/geminate
gem install ./geminate-0.0.1.gem
gem install geminate
gem list -r geminate
pry
irb
require 'geminate'
Geminate.how
Geminate.methods(false)
http://guides.rubygems.org/rubygems-org-api/
<script async defer src="https://buttons.github.io/buttons.js"></script> <script async defer src="https://buttons.github.io/buttons.js"></script>
Open your terminal and type
git clone git@github.com:jasonleonhard/geminate.git
Open your terminal and type
git clone https://github.com/jasonleonhard/geminate.git