geminabox-release 0.0.4 → 0.0.5
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/README.md +12 -1
- data/lib/geminabox-release/version.rb +1 -1
- data/lib/geminabox-release.rb +15 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d342faa148b41b6d42005e9cd37c5726ca53d8b5
|
4
|
+
data.tar.gz: 82768f7f9e81eebedc9e398a0e5db68fd6095344
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bee11d6b0497d2b9a9f26ea5aec67c64c401a648ee1bbb37f3412a5b6185e02351296b51dd17b9744e6692ac16f234877145b71d7f8bdfe38d7c7e19c303aebe
|
7
|
+
data.tar.gz: 6360a5a48f9ec4b91e3db036c628609b5a1753b6552424682d2286e500080d90ca3ec8217eef122a3ee28292c671acea6714acd0bfe62f03b214fdb51362e9a1
|
data/README.md
CHANGED
@@ -12,7 +12,16 @@ E.g.
|
|
12
12
|
|
13
13
|
```
|
14
14
|
require 'geminabox-release'
|
15
|
-
GeminaboxRelease.patch("http://localhost:4000")
|
15
|
+
GeminaboxRelease.patch(:host => "http://localhost:4000")
|
16
|
+
require 'bundler/gem_tasks'
|
17
|
+
|
18
|
+
```
|
19
|
+
|
20
|
+
or use your geminabox config file (YAML file with key :host and host url as value in ~/.gem/geminabox)
|
21
|
+
|
22
|
+
```
|
23
|
+
require 'geminabox-release'
|
24
|
+
GeminaboxRelease.patch(:use_config => true)
|
16
25
|
require 'bundler/gem_tasks'
|
17
26
|
|
18
27
|
```
|
@@ -22,6 +31,8 @@ Then you will get an rake inabox:release task.
|
|
22
31
|
The gem (theoretically) supports basic auth like geminabox in the host address. e.g. http://username:password@localhost:4000
|
23
32
|
It's untested as we didn't need it. Feel free to try it.
|
24
33
|
|
34
|
+
### Order
|
35
|
+
|
25
36
|
The order is important as requiring bunlder/gem_tasks creates the rake tasks and this gem does not modify them after that.
|
26
37
|
|
27
38
|
## Safety
|
data/lib/geminabox-release.rb
CHANGED
@@ -7,8 +7,21 @@ module GeminaboxRelease
|
|
7
7
|
@host
|
8
8
|
end
|
9
9
|
|
10
|
-
def self.patch(
|
11
|
-
|
10
|
+
def self.patch(options = {})
|
11
|
+
if options[:host]
|
12
|
+
@host = options[:host]
|
13
|
+
elsif options[:use_config]
|
14
|
+
require 'yaml'
|
15
|
+
data = YAML.load_file(File.expand_path("~/.gem/geminabox"))
|
16
|
+
if data.has_key?(:host)
|
17
|
+
@host = data[:host]
|
18
|
+
else
|
19
|
+
raise "Please set your host in your geminabox config ~/.gem/geminabox"
|
20
|
+
end
|
21
|
+
else
|
22
|
+
raise "Please provide a host to upload to."
|
23
|
+
end
|
24
|
+
|
12
25
|
|
13
26
|
Bundler::GemHelper.class_eval do
|
14
27
|
|