geminabox-release 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a3efb7ecdce531ed8b2b7c3a53671e552e1fd268
4
- data.tar.gz: 5677bbb9dba8e618669f5256e602a6e1c724a930
3
+ metadata.gz: d342faa148b41b6d42005e9cd37c5726ca53d8b5
4
+ data.tar.gz: 82768f7f9e81eebedc9e398a0e5db68fd6095344
5
5
  SHA512:
6
- metadata.gz: 57c29b86dd5d936f7fa5a2ade9dc4ee2267b72ad8bef43c798a0b8c975633e3d87157b908ba2da834dd0f09d50d647ec8f030666df7e552bcb1e0a798d125bae
7
- data.tar.gz: 8424ff895b0be18e70b143b5ed66beab2f52d91213b6d20bb80ae536f3c46cacb210a8e08288003576b284e46f13101dcf7d02b0360e84380d1c4603e456b3cd
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
@@ -1,4 +1,4 @@
1
1
  module GeminaboxRelease
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
4
4
 
@@ -7,8 +7,21 @@ module GeminaboxRelease
7
7
  @host
8
8
  end
9
9
 
10
- def self.patch(host)
11
- @host = host
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geminabox-release
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dennis-Florian Herr