gemstash 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +9 -9
- data/docs/deploy.md +1 -1
- data/docs/multiple_sources.md +6 -6
- data/docs/private_gems.md +1 -1
- data/docs/reference.md +1 -1
- data/lib/gemstash/configuration.rb +5 -5
- data/lib/gemstash/gem_source/upstream_source.rb +13 -2
- data/lib/gemstash/upstream.rb +2 -1
- data/lib/gemstash/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe7e58da58c18944e118fc19063e7f4c730b8d9d
|
4
|
+
data.tar.gz: ed5e51504ea2fe809bbc01a6305351d9e73a6811
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87f204c3e9f05fc452889a42a16063553c77abe937fed20a71646e3eea3740c960ecb3949c634e181ad5709b7288664f80db7f72d9ba9e41f4fcc6c6c1097f25
|
7
|
+
data.tar.gz: 305da0681b3c5b7bfd6be10534c490a7dfde10f55ac30add6cbdfd816c66f6cc49ae1c897cd42a53aa863fd4141300510e988ad28a52f99fb8c4029dc13be1ee
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## 1.0.2 (2016-07-07)
|
2
|
+
|
3
|
+
### Bugfixes
|
4
|
+
|
5
|
+
- Fix broken JRuby build ([#91](https://github.com/bundler/gemstash/pull/91), [@smellsblue](https://github.com/smellsblue))
|
6
|
+
- Drop www.rubygems.org in favor of rubygems.org ([#101](https://github.com/bundler/gemstash/pull/101), [@smellsblue](https://github.com/smellsblue))
|
7
|
+
- Redirect /versions and /info/* to index.rubygems.org ([#102](https://github.com/bundler/gemstash/pull/102), [@smellsblue](https://github.com/smellsblue))
|
8
|
+
|
1
9
|
## 1.0.1 (2016-02-23)
|
2
10
|
|
3
11
|
### Bugfixes
|
data/README.md
CHANGED
@@ -4,8 +4,8 @@
|
|
4
4
|
|
5
5
|
## What is Gemstash?
|
6
6
|
|
7
|
-
Gemstash is both a cache for remote servers such as https://
|
8
|
-
|
7
|
+
Gemstash is both a cache for remote servers such as https://rubygems.org, and a
|
8
|
+
private gem source.
|
9
9
|
|
10
10
|
If you are using [bundler](http://bundler.io/) across many machines that have
|
11
11
|
access to a server within your control, you might want to use Gemstash.
|
@@ -16,7 +16,7 @@ you might want to use Gemstash.
|
|
16
16
|
If you frequently bundle the same set of gems across multiple projects, you
|
17
17
|
might want to use Gemstash.
|
18
18
|
|
19
|
-
Are you only using gems from https://
|
19
|
+
Are you only using gems from https://rubygems.org, and don't bundle the same
|
20
20
|
gems frequently? Well, maybe you don't need Gemstash... yet.
|
21
21
|
|
22
22
|
## Quickstart Guide
|
@@ -67,11 +67,11 @@ otherwise Gemstash will have nothing to stash. Now bundle:
|
|
67
67
|
$ bundle install --path .bundle
|
68
68
|
```
|
69
69
|
|
70
|
-
Your Gemstash server has fetched the gems from https://
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
70
|
+
Your Gemstash server has fetched the gems from https://rubygems.org and cached
|
71
|
+
them for you! To prove this, you can disable your Internet connection and try
|
72
|
+
again. The gem dependencies from https://rubygems.org are cached for 30 minutes,
|
73
|
+
so if you bundle again before that, you can successfully bundle without an
|
74
|
+
Internet connection:
|
75
75
|
|
76
76
|
```
|
77
77
|
$ # Disable your Internet first!
|
@@ -112,7 +112,7 @@ Gemstash temporarily caches things like gem dependencies in memory. Anything
|
|
112
112
|
cached in memory will last for 30 minutes before being retrieved again. You can
|
113
113
|
[use memcached](docs/config.md#cache) instead of caching in memory. Gem files
|
114
114
|
are always cached permanently, so bundling with a `Gemfile.lock` with all gems
|
115
|
-
cached will never call out to https://
|
115
|
+
cached will never call out to https://rubygems.org.
|
116
116
|
|
117
117
|
The server you ran is provided via [Puma](http://puma.io/) and
|
118
118
|
[Rack](http://rack.github.io/), however they are not customizable at this point.
|
data/docs/deploy.md
CHANGED
data/docs/multiple_sources.md
CHANGED
@@ -8,8 +8,8 @@ Gemstash server.
|
|
8
8
|
|
9
9
|
When you don't provide an explicit source (as with the [Quickstart
|
10
10
|
Guide](../README.md#quickstart-guide)), your gems will be fetched from
|
11
|
-
https://
|
12
|
-
|
11
|
+
https://rubygems.org. This default source is not set in stone. To change it, you
|
12
|
+
need only edit the Gemstash configuration found at `~/.gemstash/config.yml`:
|
13
13
|
```yaml
|
14
14
|
# ~/.gemstash/config.yml
|
15
15
|
---
|
@@ -30,9 +30,9 @@ separate location, ensuring different sources won't leak between each other.
|
|
30
30
|
## Bundling with Multiple Sources
|
31
31
|
|
32
32
|
Changing the default source won't help you if you need to bundle against
|
33
|
-
https://
|
34
|
-
|
35
|
-
|
33
|
+
https://rubygems.org along with additional sources. If you need to bundle with
|
34
|
+
multiple gem sources, Gemstash doesn't need to be specially configured. Your
|
35
|
+
Gemstash server will honor any gem source specified via a specialized URL.
|
36
36
|
Consider the following `Gemfile`:
|
37
37
|
```ruby
|
38
38
|
# ./Gemfile
|
@@ -58,7 +58,7 @@ your `Gemfile` like so:
|
|
58
58
|
```ruby
|
59
59
|
# ./Gemfile
|
60
60
|
require "cgi"
|
61
|
-
source "http://localhost:9292/redirect/#{CGI.escape("https://
|
61
|
+
source "http://localhost:9292/redirect/#{CGI.escape("https://rubygems.org")}"
|
62
62
|
gem "rubywarrior"
|
63
63
|
```
|
64
64
|
|
data/docs/private_gems.md
CHANGED
@@ -36,7 +36,7 @@ $ gemstash authorize --key e374e237fdf5fa5718d2a21bd63dc911
|
|
36
36
|
```
|
37
37
|
|
38
38
|
With the key generated, you'll need to tell Rubygems about your new key. If
|
39
|
-
you've pushed a gem to https://
|
39
|
+
you've pushed a gem to https://rubygems.org, then you will already have a
|
40
40
|
credentials file to add the key to. If not, run the following commands before
|
41
41
|
modifying the credentials file:
|
42
42
|
```
|
data/docs/reference.md
CHANGED
@@ -4,11 +4,11 @@ module Gemstash
|
|
4
4
|
#:nodoc:
|
5
5
|
class Configuration
|
6
6
|
DEFAULTS = {
|
7
|
-
:
|
8
|
-
:
|
9
|
-
:
|
10
|
-
:
|
11
|
-
:
|
7
|
+
cache_type: "memory",
|
8
|
+
base_path: File.expand_path("~/.gemstash"),
|
9
|
+
db_adapter: "sqlite3",
|
10
|
+
bind: "tcp://0.0.0.0:9292",
|
11
|
+
rubygems_url: "https://rubygems.org"
|
12
12
|
}.freeze
|
13
13
|
|
14
14
|
DEFAULT_FILE = File.expand_path("~/.gemstash/config.yml").freeze
|
@@ -60,11 +60,11 @@ module Gemstash
|
|
60
60
|
end
|
61
61
|
|
62
62
|
def serve_versions
|
63
|
-
redirect
|
63
|
+
redirect index_upstream.url("versions", request.query_string)
|
64
64
|
end
|
65
65
|
|
66
66
|
def serve_info(name)
|
67
|
-
redirect
|
67
|
+
redirect index_upstream.url("info/#{name}", request.query_string)
|
68
68
|
end
|
69
69
|
|
70
70
|
def serve_marshal(id)
|
@@ -97,6 +97,17 @@ module Gemstash
|
|
97
97
|
@upstream ||= Gemstash::Upstream.new(env["gemstash.upstream"],
|
98
98
|
user_agent: env["gemstash.user-agent"])
|
99
99
|
end
|
100
|
+
|
101
|
+
def index_upstream
|
102
|
+
@index_upstream ||=
|
103
|
+
if upstream.uri.host == "rubygems.org"
|
104
|
+
uri = upstream.uri.dup
|
105
|
+
uri.host = "index.rubygems.org"
|
106
|
+
Gemstash::Upstream.new(uri, user_agent: upstream.user_agent)
|
107
|
+
else
|
108
|
+
upstream
|
109
|
+
end
|
110
|
+
end
|
100
111
|
end
|
101
112
|
|
102
113
|
# GemSource for gems in an upstream server.
|
data/lib/gemstash/upstream.rb
CHANGED
data/lib/gemstash/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gemstash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andre Arko
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dalli
|