geminabox-release 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -2
- data/lib/geminabox-release.rb +16 -15
- data/lib/geminabox-release/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: a3efb7ecdce531ed8b2b7c3a53671e552e1fd268
|
4
|
+
data.tar.gz: 5677bbb9dba8e618669f5256e602a6e1c724a930
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57c29b86dd5d936f7fa5a2ade9dc4ee2267b72ad8bef43c798a0b8c975633e3d87157b908ba2da834dd0f09d50d647ec8f030666df7e552bcb1e0a798d125bae
|
7
|
+
data.tar.gz: 8424ff895b0be18e70b143b5ed66beab2f52d91213b6d20bb80ae536f3c46cacb210a8e08288003576b284e46f13101dcf7d02b0360e84380d1c4603e456b3cd
|
data/README.md
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
geminabox-release
|
2
2
|
=================
|
3
3
|
|
4
|
-
This gem is a dependency free option to
|
4
|
+
This gem is a dependency free option to add a rake inabox:release task that mirrors bundler's rake release task for your
|
5
|
+
geminabox server.
|
5
6
|
|
6
7
|
## How to use
|
7
8
|
|
@@ -16,13 +17,20 @@ require 'bundler/gem_tasks'
|
|
16
17
|
|
17
18
|
```
|
18
19
|
|
19
|
-
Then
|
20
|
+
Then you will get an rake inabox:release task.
|
20
21
|
|
21
22
|
The gem (theoretically) supports basic auth like geminabox in the host address. e.g. http://username:password@localhost:4000
|
22
23
|
It's untested as we didn't need it. Feel free to try it.
|
23
24
|
|
24
25
|
The order is important as requiring bunlder/gem_tasks creates the rake tasks and this gem does not modify them after that.
|
25
26
|
|
27
|
+
## Safety
|
28
|
+
|
29
|
+
To ensure you are not accidently pushing your gem to rubygems there are two distinct safety measures.
|
30
|
+
|
31
|
+
1) The rake task has another name. Do not use rake release if you want to push to your geminabox server!
|
32
|
+
|
33
|
+
2) The gem is pushed via the HTTP POST file request geminabox expects and not via the gem push interface.
|
26
34
|
|
27
35
|
# LICENSE
|
28
36
|
|
data/lib/geminabox-release.rb
CHANGED
@@ -11,28 +11,29 @@ module GeminaboxRelease
|
|
11
11
|
@host = host
|
12
12
|
|
13
13
|
Bundler::GemHelper.class_eval do
|
14
|
-
def install
|
15
|
-
built_gem_path = nil
|
16
|
-
|
17
|
-
desc "Build #{name}-#{version}.gem into the pkg directory."
|
18
|
-
task 'build' do
|
19
|
-
built_gem_path = build_gem
|
20
|
-
end
|
21
14
|
|
22
|
-
|
23
|
-
task 'install' => 'build' do
|
24
|
-
install_gem(built_gem_path)
|
25
|
-
end
|
15
|
+
alias_method :bundler_install, :install
|
26
16
|
|
17
|
+
def install
|
27
18
|
desc "Create tag #{version_tag} and build and push #{name}-#{version}.gem to #{GeminaboxRelease.host}"
|
28
|
-
task 'release
|
29
|
-
|
19
|
+
task 'inabox:release' => 'build' do
|
20
|
+
release_inabox(built_gem_path)
|
30
21
|
end
|
22
|
+
bundler_install # call bunlders original install method
|
23
|
+
end
|
31
24
|
|
32
|
-
|
25
|
+
# same functionality as release_gem but calls inabox_push
|
26
|
+
def release_inabox(built_gem_path=nil)
|
27
|
+
guard_clean
|
28
|
+
built_gem_path ||= build_gem
|
29
|
+
tag_version { git_push } unless already_tagged?
|
30
|
+
inabox_push(built_gem_path) if gem_push?
|
33
31
|
end
|
34
32
|
|
35
|
-
|
33
|
+
protected
|
34
|
+
|
35
|
+
# pushes to geminabox
|
36
|
+
def inabox_push(path)
|
36
37
|
uri = URI.parse(GeminaboxRelease.host)
|
37
38
|
username = uri.user
|
38
39
|
password = uri.password
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: geminabox-release
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dennis-Florian Herr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Dependency free rake release task for geminabox
|
14
14
|
email:
|