An open API service indexing awesome lists of open source software.

https://github.com/jruby/rubygems-servlets

webapp which hosts rubygems or a proxy to rubygems. delivers gem maven artifacts as well
https://github.com/jruby/rubygems-servlets

Last synced: 2 months ago
JSON representation

webapp which hosts rubygems or a proxy to rubygems. delivers gem maven artifacts as well

Awesome Lists containing this project

README

        

rubygems-servlets
=================

[![Build Status](https://secure.travis-ci.org/torquebox/rubygems-servlets.png)](http://travis-ci.org/torquebox/rubygems-servlets)

webapp which hosts rubygems or a proxy to rubygems. delivers gem maven artifacts as well. the proxy can be configured to be caching proxy or non-caching proxy

build
--

the regular webapp with hosted and (caching-)proxy can be built with

mvn package

or just run it in place with

mvn jetty:run

where the hosted rubygems are located under and the proxy with as source is reachable under or . and the will combine all three to on rubygems repository.

executable standalone
---

you also can start the war like this (using embedded jetty):

mvn package -Pexecutable
java -jar target/rubygems.war

and adjust the to your liking.

usage
--

add them to your gem command

* ```gem sources add ```
* ```gem sources add ```
* ```gem sources add ```
* ```gem sources add ```

or use the (caching-)proxy with bundler (example only for https://rubygems.org)

* ```bundler config mirror.https://rubygems.org http://localhost:8989/proxy```
* ```bundler config mirror.https://rubygems.org http://localhost:8989/caching```
* ```bundler config mirror.https://rubygems.org http://localhost:8989/merged```

the Gem-Artifacts are accessible via

*
*
*
*
*
*
*
*

you need a mirror declaration and in your settings.xml




gems
Rubygems
http://localhost:8989/caching/maven/releases
rubygems-releases


pregems
Rubygems Prereleases
http://localhost:8989/caching/maven/prereleases
rubygems-prereleases

since some old gem-artifacts use the those repositories (old in sense they originally came from rubygems-proxy.torquebox.org)

for more details about Gem-Artifacts see . for a solution with access control, more advanced proxy features and merging (group) to repositories see .

hosted
---

the underlying library nexus-ruby-tools can handle `gem push my-1.0.0.gem` but somehow I have not deciphered how to use rubygems.org and a local repo without manually editing the config files.

the easiest way is to use the `nexus` gem which was tailor made for the nexus-ruby-tools.

```
gem install nexus
``

then you can upload your gem with

```
gem nexus my-1.0.0.gem
```

it will prompt for the url which is http://localhost:8989/hosted from above. empty username and password will finally push the gem. since the username and passoword was empty it will be prompted again.

non-caching proxy
---

this proxy configuration does not cache the gem-files itself but instead sends a redirect to . all other files are cached the same way as the caching proxy:

mvn jetty:run -P proxy

with url

rubygems-proxy.torquebox.org (not yet installed)
--

the webapp for this rubygems-proxy is under the profile **legacy**

mvn clean package -Plegacy

which is just a proxy (mvn jetty:run -Plegacy)

*
*

tests
====

some integration tests for proxy feature can be executed with

mvn -P run-its

mvn -P run-its -Plegacy

deploy to maven central
-----------------------

mvn versions:set
git ci -m 'prepare release' pom.xml
mvn -Prelease,executable
git tag ...
mvn versions:set
git ci -m 'next dev version' pom.xml
git push
git push --tags

contributing
------------

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

meta-fu
-------

enjoy :)