Gemjar HQ
GemJar HQ is a private RubyGem hosting service that is compatible with all hosting platforms, including Heroku!
Installation
gem install gemjar
Usage
Running gemjar help
will give you a list of the available commands:
Tasks:
gemjar help [TASK] # Describe available tasks or one specific task
gemjar list # List rubygems in my GemJar
gemjar login # Sign into your GemJar account
gemjar logout # Sign out of your GemJar account
gemjar push # Push a new gem to GemJar
gemjar user:add # Add a new collaborator
gemjar user:list # List collaborators
gemjar user:remove # Remove a collaborator
gemjar version # Output GemJar version number
API Usage
With the GemJar gem you can also interact directly with the API. For this you will probably want to add GemJar to your gem file.
gem 'gemjar'
Now configure GemJar with your api_token which you can find on the overview page.
GemJar.configure do |config|
config.api_token = 'api_token'
end
Then you can create a new GemJar::Client
object.
client = GemJar::Client.new
Users
Add a collaborator to your account:
client.users.create(:email => '[email protected]')
List collaborators linked to your account:
client.users.all
# returns:
# [
# {:email => '[email protected]', :id => '50f08648cf60c9300e000001'},
# {:email => '[email protected]', :id => '50f5c1afcf60c95013000004'}
# ]
Remove a collaborator from your account:
client.users.destroy('50f5c1afcf60c95013000004')
Rubygems
List all Rubygems
client.rubygems.all
Upload a Rubygem to your GemJar
file = File.new(PATH_TO_GEM), 'rb')
client.rubygems.create(:file => file)
Contributing
Feel free to hack away and send me a pull request!
License
Copyright (c) 2013 George Drummond
MIT License
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.