gemstash 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/lib/gemstash/cli.rb +46 -0
- data/lib/gemstash/cli/setup.rb +1 -1
- data/lib/gemstash/env.rb +5 -0
- data/lib/gemstash/man/gemstash-authorize.1 +50 -0
- data/lib/gemstash/man/gemstash-authorize.1.txt +45 -0
- data/lib/gemstash/man/gemstash-configuration.5 +133 -0
- data/lib/gemstash/man/gemstash-configuration.5.txt +121 -0
- data/lib/gemstash/man/gemstash-customize.7 +224 -0
- data/lib/gemstash/man/gemstash-customize.7.txt +137 -0
- data/lib/gemstash/man/gemstash-debugging.7 +34 -0
- data/lib/gemstash/man/gemstash-debugging.7.txt +29 -0
- data/lib/gemstash/man/gemstash-deploy.7 +40 -0
- data/lib/gemstash/man/gemstash-deploy.7.txt +34 -0
- data/lib/gemstash/man/gemstash-mirror.7 +40 -0
- data/lib/gemstash/man/gemstash-mirror.7.txt +33 -0
- data/lib/gemstash/man/gemstash-multiple-sources.7 +89 -0
- data/lib/gemstash/man/gemstash-multiple-sources.7.txt +71 -0
- data/lib/gemstash/man/gemstash-private-gems.7 +195 -0
- data/lib/gemstash/man/gemstash-private-gems.7.txt +133 -0
- data/lib/gemstash/man/gemstash-readme.7 +204 -0
- data/lib/gemstash/man/gemstash-readme.7.txt +160 -0
- data/lib/gemstash/man/gemstash-setup.1 +41 -0
- data/lib/gemstash/man/gemstash-setup.1.txt +38 -0
- data/lib/gemstash/man/gemstash-start.1 +25 -0
- data/lib/gemstash/man/gemstash-start.1.txt +25 -0
- data/lib/gemstash/man/gemstash-status.1 +19 -0
- data/lib/gemstash/man/gemstash-status.1.txt +21 -0
- data/lib/gemstash/man/gemstash-stop.1 +19 -0
- data/lib/gemstash/man/gemstash-stop.1.txt +21 -0
- data/lib/gemstash/man/gemstash-version.1 +22 -0
- data/lib/gemstash/man/gemstash-version.1.txt +21 -0
- data/lib/gemstash/storage.rb +7 -4
- data/lib/gemstash/version.rb +1 -1
- metadata +79 -48
- data/Gemfile +0 -4
- data/README.md +0 -161
- data/Rakefile +0 -25
- data/bin/console +0 -14
- data/bin/gemstash +0 -3
- data/bin/setup +0 -5
- data/docs/config.md +0 -136
- data/docs/debug.md +0 -24
- data/docs/deploy.md +0 -30
- data/docs/mirror.md +0 -30
- data/docs/multiple_sources.md +0 -68
- data/docs/private_gems.md +0 -140
- data/docs/reference.md +0 -323
- data/gemstash.gemspec +0 -49
- data/gemstash.png +0 -0
- data/rake/changelog.citrus +0 -157
- data/rake/changelog.rb +0 -201
- data/rake/table_of_contents.rb +0 -36
@@ -0,0 +1,34 @@
|
|
1
|
+
gemstash-deploy(7) gemstash-deploy(7)
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
DEPLOYING GEMSTASH
|
6
|
+
Bundler is here for the rescue to keep Gemstash up to date! Create a
|
7
|
+
Gemfile pointing to Gemstash:
|
8
|
+
|
9
|
+
# ./Gemfile
|
10
|
+
source "https://rubygems.org"
|
11
|
+
gem "gemstash"
|
12
|
+
|
13
|
+
Then bundle to create your Gemfile.lock. When you are ready to up-
|
14
|
+
grade, simply bundle update. You may need to run gemstash via bun-
|
15
|
+
dle exec. Alternatively, you can gem uninstall gemstash and gem in-
|
16
|
+
stall gemstash when you want to upgrade.
|
17
|
+
|
18
|
+
Gemstash will automatically run any necessary migrations, so updating
|
19
|
+
the gem is all that needs to be done.
|
20
|
+
|
21
|
+
It is probably wise to stop Gemstash before upgrading, then starting
|
22
|
+
again once you are done:
|
23
|
+
|
24
|
+
$ bundle exec gemstash stop
|
25
|
+
$ bundle update
|
26
|
+
$ bundle exec gemstash start
|
27
|
+
|
28
|
+
DOWNGRADING
|
29
|
+
It is not recommended to go backwards in Gemstash versions. Migrations
|
30
|
+
may have run that could leave the database in a bad state.
|
31
|
+
|
32
|
+
|
33
|
+
|
34
|
+
October 25, 2015 gemstash-deploy(7)
|
@@ -0,0 +1,40 @@
|
|
1
|
+
.\" Automatically generated by Pandoc 1.16.0.2
|
2
|
+
.\"
|
3
|
+
.TH "gemstash\-mirror" "7" "October 25, 2015" "" ""
|
4
|
+
.hy
|
5
|
+
.SH USING GEMSTASH AS A MIRROR
|
6
|
+
.PP
|
7
|
+
If you don\[aq]t have control over your \f[C]Gemfile\f[], or you
|
8
|
+
don\[aq]t want to force everyone on your team to go through the Gemstash
|
9
|
+
server, you can use Bundler mirroring to bundle against your Gemstash
|
10
|
+
server.
|
11
|
+
.PP
|
12
|
+
For each source in your \f[C]Gemfile\f[], add a mirror pointing to your
|
13
|
+
Gemstash server:
|
14
|
+
.IP
|
15
|
+
.nf
|
16
|
+
\f[C]
|
17
|
+
$\ bundle\ config\ mirror.http://rubygems.org\ http://localhost:9292
|
18
|
+
$\ bundle\ config\ mirror.https://my.gem\-source.local\ http://localhost:9292/upstream/$(ruby\ \-rcgi\ \-e\ \[aq]puts\ CGI.escape("https://my.gem\-source.local")\[aq])
|
19
|
+
\f[]
|
20
|
+
.fi
|
21
|
+
.PP
|
22
|
+
From now on, bundler will fetch gems from those sources via your
|
23
|
+
Gemstash server.
|
24
|
+
.SH SIMPLER GEMSTASH MIRRORS
|
25
|
+
.PP
|
26
|
+
\f[B]This feature requires Bundler to be at least version
|
27
|
+
\f[C]1.11.0\f[].\f[]
|
28
|
+
.PP
|
29
|
+
If you are using Bundler version \f[C]1.11.0\f[] or greater, the
|
30
|
+
mirroring becomes a bit easier:
|
31
|
+
.IP
|
32
|
+
.nf
|
33
|
+
\f[C]
|
34
|
+
$\ bundle\ config\ mirror.http://rubygems.org\ http://localhost:9292
|
35
|
+
$\ bundle\ config\ mirror.https://my.gem\-source.local\ http://localhost:9292
|
36
|
+
\f[]
|
37
|
+
.fi
|
38
|
+
.PP
|
39
|
+
Bundler will then send headers to Gemstash to indicate the correct
|
40
|
+
upstream.
|
@@ -0,0 +1,33 @@
|
|
1
|
+
gemstash-mirror(7) gemstash-mirror(7)
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
USING GEMSTASH AS A MIRROR
|
6
|
+
If you don't have control over your Gemfile, or you don't want to force
|
7
|
+
everyone on your team to go through the Gemstash server, you can use
|
8
|
+
Bundler mirroring to bundle against your Gemstash server.
|
9
|
+
|
10
|
+
For each source in your Gemfile, add a mirror pointing to your Gemstash
|
11
|
+
server:
|
12
|
+
|
13
|
+
$ bundle config mirror.http://rubygems.org http://localhost:9292
|
14
|
+
$ bundle config mirror.https://my.gem-source.local http://localhost:9292/upstream/$(ruby -rcgi -e 'puts CGI.escape("https://my.gem-source.local")')
|
15
|
+
|
16
|
+
From now on, bundler will fetch gems from those sources via your Gem-
|
17
|
+
stash server.
|
18
|
+
|
19
|
+
SIMPLER GEMSTASH MIRRORS
|
20
|
+
This feature requires Bundler to be at least version 1.11.0.
|
21
|
+
|
22
|
+
If you are using Bundler version 1.11.0 or greater, the mirroring be-
|
23
|
+
comes a bit easier:
|
24
|
+
|
25
|
+
$ bundle config mirror.http://rubygems.org http://localhost:9292
|
26
|
+
$ bundle config mirror.https://my.gem-source.local http://localhost:9292
|
27
|
+
|
28
|
+
Bundler will then send headers to Gemstash to indicate the correct up-
|
29
|
+
stream.
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
October 25, 2015 gemstash-mirror(7)
|
@@ -0,0 +1,89 @@
|
|
1
|
+
.\" Automatically generated by Pandoc 1.16.0.2
|
2
|
+
.\"
|
3
|
+
.TH "gemstash\-multiple\-sources" "7" "October 8, 2015" "" ""
|
4
|
+
.hy
|
5
|
+
.SH MULTIPLE GEM SOURCES
|
6
|
+
.PP
|
7
|
+
Gemstash will stash from any amount of gem sources.
|
8
|
+
By the end of this guide, you will be able to bundle using multiple gem
|
9
|
+
sources, all stashed within your Gemstash server.
|
10
|
+
.SS DEFAULT SOURCE
|
11
|
+
.PP
|
12
|
+
When you don\[aq]t provide an explicit source (as with the Quickstart
|
13
|
+
Guide (gemstash help readme.7)), your gems will be fetched from
|
14
|
+
https://rubygems.org.
|
15
|
+
This default source is not set in stone.
|
16
|
+
To change it, you need only edit the Gemstash configuration found at
|
17
|
+
\f[C]~/.gemstash/config.yml\f[]:
|
18
|
+
.IP
|
19
|
+
.nf
|
20
|
+
\f[C]
|
21
|
+
#\ ~/.gemstash/config.yml
|
22
|
+
\-\-\-
|
23
|
+
:rubygems_url:\ https://my.gem\-source.local
|
24
|
+
\f[]
|
25
|
+
.fi
|
26
|
+
.PP
|
27
|
+
Make sure to restart your Gemstash server after changing the config:
|
28
|
+
.IP
|
29
|
+
.nf
|
30
|
+
\f[C]
|
31
|
+
$\ gemstash\ stop
|
32
|
+
$\ gemstash\ start
|
33
|
+
\f[]
|
34
|
+
.fi
|
35
|
+
.PP
|
36
|
+
Once restarted, bundling against \f[C]http://localhost:9292\f[] will
|
37
|
+
fetch gems from \f[C]https://my.gem\-source.local\f[].
|
38
|
+
If you had bundled before making these changes, fear not; bundling with
|
39
|
+
a different default gem source will store gems in a separate location,
|
40
|
+
ensuring different sources won\[aq]t leak between each other.
|
41
|
+
.SS BUNDLING WITH MULTIPLE SOURCES
|
42
|
+
.PP
|
43
|
+
Changing the default source won\[aq]t help you if you need to bundle
|
44
|
+
against https://rubygems.org along with additional sources.
|
45
|
+
If you need to bundle with multiple gem sources, Gemstash doesn\[aq]t
|
46
|
+
need to be specially configured.
|
47
|
+
Your Gemstash server will honor any gem source specified via a
|
48
|
+
specialized URL.
|
49
|
+
Consider the following \f[C]Gemfile\f[]:
|
50
|
+
.IP
|
51
|
+
.nf
|
52
|
+
\f[C]
|
53
|
+
#\ ./Gemfile
|
54
|
+
require\ "cgi"
|
55
|
+
source\ "http://localhost:9292"
|
56
|
+
gem\ "rubywarrior"
|
57
|
+
|
58
|
+
source\ "http://localhost:9292/upstream/#{CGI.escape("https://my.gem\-source.local")}"\ do
|
59
|
+
\ \ gem\ "my\-gem"
|
60
|
+
end
|
61
|
+
\f[]
|
62
|
+
.fi
|
63
|
+
.PP
|
64
|
+
Notice the \f[C]CGI.escape\f[] call in the second source.
|
65
|
+
This is important, as it properly URL escapes the source URL so Gemstash
|
66
|
+
knows what gem source you want.
|
67
|
+
The \f[C]/upstream\f[] prefix tells Gemstash to use a gem source other
|
68
|
+
than the default source.
|
69
|
+
You can now bundle with the additional source.
|
70
|
+
.SS REDIRECTING
|
71
|
+
.PP
|
72
|
+
Gemstash supports an alternate mode of specifying your gem sources.
|
73
|
+
If you want Gemstash to redirect Bundler to your given gem sources, then
|
74
|
+
you can specify your \f[C]Gemfile\f[] like so:
|
75
|
+
.IP
|
76
|
+
.nf
|
77
|
+
\f[C]
|
78
|
+
#\ ./Gemfile
|
79
|
+
require\ "cgi"
|
80
|
+
source\ "http://localhost:9292/redirect/#{CGI.escape("https://rubygems.org")}"
|
81
|
+
gem\ "rubywarrior"
|
82
|
+
\f[]
|
83
|
+
.fi
|
84
|
+
.PP
|
85
|
+
Notice the \f[C]/redirect\f[] prefix.
|
86
|
+
This prefix tells Gemstash to redirect API calls to the provided URL.
|
87
|
+
Redirected calls like this will not be cached by Gemstash, and gem files
|
88
|
+
will not be stashed, even if they were previously cached or stashed from
|
89
|
+
the same gem source.
|
@@ -0,0 +1,71 @@
|
|
1
|
+
gemstash-multiple-sources(7) gemstash-multiple-sources(7)
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
MULTIPLE GEM SOURCES
|
6
|
+
Gemstash will stash from any amount of gem sources. By the end of this
|
7
|
+
guide, you will be able to bundle using multiple gem sources, all
|
8
|
+
stashed within your Gemstash server.
|
9
|
+
|
10
|
+
DEFAULT SOURCE
|
11
|
+
When you don't provide an explicit source (as with the Quickstart Guide
|
12
|
+
(gemstash help readme.7)), your gems will be fetched from
|
13
|
+
https://rubygems.org. This default source is not set in stone. To
|
14
|
+
change it, you need only edit the Gemstash configuration found at
|
15
|
+
~/.gemstash/config.yml:
|
16
|
+
|
17
|
+
# ~/.gemstash/config.yml
|
18
|
+
---
|
19
|
+
:rubygems_url: https://my.gem-source.local
|
20
|
+
|
21
|
+
Make sure to restart your Gemstash server after changing the config:
|
22
|
+
|
23
|
+
$ gemstash stop
|
24
|
+
$ gemstash start
|
25
|
+
|
26
|
+
Once restarted, bundling against http://localhost:9292 will fetch gems
|
27
|
+
from https://my.gem-source.local. If you had bundled before making
|
28
|
+
these changes, fear not; bundling with a different default gem source
|
29
|
+
will store gems in a separate location, ensuring different sources
|
30
|
+
won't leak between each other.
|
31
|
+
|
32
|
+
BUNDLING WITH MULTIPLE SOURCES
|
33
|
+
Changing the default source won't help you if you need to bundle
|
34
|
+
against https://rubygems.org along with additional sources. If you
|
35
|
+
need to bundle with multiple gem sources, Gemstash doesn't need to be
|
36
|
+
specially configured. Your Gemstash server will honor any gem source
|
37
|
+
specified via a specialized URL. Consider the following Gemfile:
|
38
|
+
|
39
|
+
# ./Gemfile
|
40
|
+
require "cgi"
|
41
|
+
source "http://localhost:9292"
|
42
|
+
gem "rubywarrior"
|
43
|
+
|
44
|
+
source "http://localhost:9292/upstream/#{CGI.escape("https://my.gem-source.local")}" do
|
45
|
+
gem "my-gem"
|
46
|
+
end
|
47
|
+
|
48
|
+
Notice the CGI.escape call in the second source. This is important, as
|
49
|
+
it properly URL escapes the source URL so Gemstash knows what gem
|
50
|
+
source you want. The /upstream prefix tells Gemstash to use a gem
|
51
|
+
source other than the default source. You can now bundle with the ad-
|
52
|
+
ditional source.
|
53
|
+
|
54
|
+
REDIRECTING
|
55
|
+
Gemstash supports an alternate mode of specifying your gem sources. If
|
56
|
+
you want Gemstash to redirect Bundler to your given gem sources, then
|
57
|
+
you can specify your Gemfile like so:
|
58
|
+
|
59
|
+
# ./Gemfile
|
60
|
+
require "cgi"
|
61
|
+
source "http://localhost:9292/redirect/#{CGI.escape("https://rubygems.org")}"
|
62
|
+
gem "rubywarrior"
|
63
|
+
|
64
|
+
Notice the /redirect prefix. This prefix tells Gemstash to redirect
|
65
|
+
API calls to the provided URL. Redirected calls like this will not be
|
66
|
+
cached by Gemstash, and gem files will not be stashed, even if they
|
67
|
+
were previously cached or stashed from the same gem source.
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
October 8, 2015 gemstash-multiple-sources(7)
|
@@ -0,0 +1,195 @@
|
|
1
|
+
.\" Automatically generated by Pandoc 1.16.0.2
|
2
|
+
.\"
|
3
|
+
.TH "gemstash\-private\-gems" "7" "October 8, 2015" "" ""
|
4
|
+
.hy
|
5
|
+
.SH PRIVATE GEMS
|
6
|
+
.PP
|
7
|
+
Stashing private gems in your Gemstash server requires a bit of
|
8
|
+
additional setup.
|
9
|
+
If you haven\[aq]t read through the Quickstart
|
10
|
+
Guide (gemstash help readme.7), you should do that first.
|
11
|
+
By the end of this guide, you will be able to interact with your
|
12
|
+
Gemstash server to store and retrieve your private gems.
|
13
|
+
.SS AUTHORIZING
|
14
|
+
.PP
|
15
|
+
\f[B]IMPORTANT NOTE:\f[] Do not use the actual key value in this
|
16
|
+
document, otherwise your Gemstash server will be vulnerable to anyone
|
17
|
+
who wants to try to use the key against your server.
|
18
|
+
Instead of the key value here, use whatever key is generated from
|
19
|
+
running the commands.
|
20
|
+
.PP
|
21
|
+
In order to push a gem to your Gemstash server, you need to first create
|
22
|
+
an API key.
|
23
|
+
Utilize the \f[C]gemstash\ authorize\f[] command to create the API key:
|
24
|
+
.IP
|
25
|
+
.nf
|
26
|
+
\f[C]
|
27
|
+
$\ gemstash\ authorize
|
28
|
+
Your\ new\ key\ is:\ e374e237fdf5fa5718d2a21bd63dc911
|
29
|
+
\f[]
|
30
|
+
.fi
|
31
|
+
.PP
|
32
|
+
This new key can \f[C]push\f[], \f[C]yank\f[], and \f[C]unyank\f[] gems
|
33
|
+
from your Gemstash server.
|
34
|
+
Run \f[C]gemstash\ authorize\f[] with just the permissions you want to
|
35
|
+
limit what the key will be allowed to do.
|
36
|
+
You can similarly update a specific key by providing it via the
|
37
|
+
\f[C]\-\-key\f[] option:
|
38
|
+
.IP
|
39
|
+
.nf
|
40
|
+
\f[C]
|
41
|
+
$\ gemstash\ authorize\ push\ yank\ \-\-key\ e374e237fdf5fa5718d2a21bd63dc911
|
42
|
+
\f[]
|
43
|
+
.fi
|
44
|
+
.PP
|
45
|
+
When no permissions are provided (like the first example), the key will
|
46
|
+
be authorized for all permissions.
|
47
|
+
Leave the key authorized with everything if you want to use it to try
|
48
|
+
all private gem interactions:
|
49
|
+
.IP
|
50
|
+
.nf
|
51
|
+
\f[C]
|
52
|
+
$\ gemstash\ authorize\ \-\-key\ e374e237fdf5fa5718d2a21bd63dc911
|
53
|
+
\f[]
|
54
|
+
.fi
|
55
|
+
.PP
|
56
|
+
With the key generated, you\[aq]ll need to tell Rubygems about your new
|
57
|
+
key.
|
58
|
+
If you\[aq]ve pushed a gem to https://rubygems.org, then you will
|
59
|
+
already have a credentials file to add the key to.
|
60
|
+
If not, run the following commands before modifying the credentials
|
61
|
+
file:
|
62
|
+
.IP
|
63
|
+
.nf
|
64
|
+
\f[C]
|
65
|
+
$\ mkdir\ \-p\ ~/.gem
|
66
|
+
$\ touch\ ~/.gem/credentials
|
67
|
+
$\ chmod\ 0600\ ~/.gem/credentials
|
68
|
+
\f[]
|
69
|
+
.fi
|
70
|
+
.PP
|
71
|
+
Add your new key to credentials such that it looks something like this
|
72
|
+
(but make sure not to remove any existing keys):
|
73
|
+
.IP
|
74
|
+
.nf
|
75
|
+
\f[C]
|
76
|
+
#\ ~/.gem/credentials
|
77
|
+
\-\-\-
|
78
|
+
:test_key:\ e374e237fdf5fa5718d2a21bd63dc911
|
79
|
+
\f[]
|
80
|
+
.fi
|
81
|
+
.PP
|
82
|
+
The name \f[C]test_key\f[] can be anything you want, but you will need
|
83
|
+
to remember it and use it again later in this guide for the
|
84
|
+
\f[C]\-\-key\f[] option.
|
85
|
+
.SS CREATING A TEST GEM
|
86
|
+
.PP
|
87
|
+
You\[aq]ll need a test gem before you can play with private gems on your
|
88
|
+
Gemstash server.
|
89
|
+
If you have a gem you can use, move along to the next section.
|
90
|
+
You can start by instantiating a test gem via Bundler:
|
91
|
+
.IP
|
92
|
+
.nf
|
93
|
+
\f[C]
|
94
|
+
$\ bundle\ gem\ private\-example
|
95
|
+
\f[]
|
96
|
+
.fi
|
97
|
+
.PP
|
98
|
+
You\[aq]ll need to add a summary and description to the new gem\[aq]s
|
99
|
+
gemspec file in order to successfully build it.
|
100
|
+
Once you\[aq]ve built the gem, you will be ready to push the new gem.
|
101
|
+
.IP
|
102
|
+
.nf
|
103
|
+
\f[C]
|
104
|
+
$\ cd\ private\-example
|
105
|
+
$\ rake\ build
|
106
|
+
\f[]
|
107
|
+
.fi
|
108
|
+
.PP
|
109
|
+
You will now have a gem at
|
110
|
+
\f[C]private\-example/pkg/private\-example\-0.1.0.gem\f[].
|
111
|
+
.SS PUSHING
|
112
|
+
.PP
|
113
|
+
If your Gemstash server isn\[aq]t running, go ahead and start it:
|
114
|
+
.IP
|
115
|
+
.nf
|
116
|
+
\f[C]
|
117
|
+
$\ gemstash\ start
|
118
|
+
\f[]
|
119
|
+
.fi
|
120
|
+
.PP
|
121
|
+
Push your test gem using Rubygems:
|
122
|
+
.IP
|
123
|
+
.nf
|
124
|
+
\f[C]
|
125
|
+
$\ gem\ push\ \-\-key\ test_key\ \-\-host\ http://localhost:9292/private\ pkg/private\-example\-0.1.0.gem
|
126
|
+
\f[]
|
127
|
+
.fi
|
128
|
+
.PP
|
129
|
+
The \f[C]/private\f[] portion of the \f[C]\-\-host\f[] option tells
|
130
|
+
Gemstash you are interacting with the private gems.
|
131
|
+
Gemstash will not let you push, yank, or unyank from anything except
|
132
|
+
\f[C]/private\f[].
|
133
|
+
.SS BUNDLING
|
134
|
+
.PP
|
135
|
+
Once your gem is pushed to your Gemstash server, you are ready to bundle
|
136
|
+
it.
|
137
|
+
Create a \f[C]Gemfile\f[] and specify the gem.
|
138
|
+
You will probably want to wrap the private gem in a source block, and
|
139
|
+
let the rest of Gemstash handle all other gems:
|
140
|
+
.IP
|
141
|
+
.nf
|
142
|
+
\f[C]
|
143
|
+
#\ ./Gemfile
|
144
|
+
source\ "http://localhost:9292"
|
145
|
+
gem\ "rubywarrior"
|
146
|
+
|
147
|
+
source\ "http://localhost:9292/private"\ do
|
148
|
+
\ \ gem\ "private\-example"
|
149
|
+
end
|
150
|
+
\f[]
|
151
|
+
.fi
|
152
|
+
.PP
|
153
|
+
Notice that the Gemstash server points to \f[C]/private\f[] again when
|
154
|
+
installing your private gem.
|
155
|
+
Go ahead and bundle to install your new private gem:
|
156
|
+
.IP
|
157
|
+
.nf
|
158
|
+
\f[C]
|
159
|
+
$\ bundle
|
160
|
+
\f[]
|
161
|
+
.fi
|
162
|
+
.SS YANKING
|
163
|
+
.PP
|
164
|
+
If you push a private gem by accident, you can yank the gem with
|
165
|
+
Rubygems:
|
166
|
+
.IP
|
167
|
+
.nf
|
168
|
+
\f[C]
|
169
|
+
$\ RUBYGEMS_HOST=http://localhost:9292/private\ gem\ yank\ \-\-key\ test_key\ private\-example\ \-\-version\ 0.1.0
|
170
|
+
\f[]
|
171
|
+
.fi
|
172
|
+
.PP
|
173
|
+
Like with pushing, the \f[C]/private\f[] portion of the host option
|
174
|
+
tells Gemstash you are interacting with private gems.
|
175
|
+
Gemstash will only let you yank from \f[C]/private\f[].
|
176
|
+
Unlike pushing, Rubygems doesn\[aq]t support \f[C]\-\-host\f[] for yank
|
177
|
+
and unyank (yet), so you need to specify the host via the
|
178
|
+
\f[C]RUBYGEMS_HOST\f[] environment variable.
|
179
|
+
.SS UNYANKING
|
180
|
+
.PP
|
181
|
+
If you yank a private gem by accident, you can unyank the gem with
|
182
|
+
Rubygems:
|
183
|
+
.IP
|
184
|
+
.nf
|
185
|
+
\f[C]
|
186
|
+
$\ RUBYGEMS_HOST=http://localhost:9292/private\ gem\ yank\ \-\-key\ test_key\ private\-example\ \-\-version\ 0.1.0\ \-\-undo
|
187
|
+
\f[]
|
188
|
+
.fi
|
189
|
+
.PP
|
190
|
+
Like with pushing and yanking, the \f[C]/private\f[] portion of the host
|
191
|
+
option tells Gemstash you are interacting with private gems.
|
192
|
+
Gemstash will only let you unyank from \f[C]/private\f[].
|
193
|
+
Unlike pushing, Rubygems doesn\[aq]t support \f[C]\-\-host\f[] for
|
194
|
+
unyank and yank (yet), so you need to specify the host via the
|
195
|
+
\f[C]RUBYGEMS_HOST\f[] environment variable.
|