geminabox-release 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +24 -4
- data/geminabox-release.gemspec +1 -1
- data/lib/geminabox-release.rb +8 -1
- data/lib/geminabox-release/version.rb +3 -1
- metadata +7 -8
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f978c57476e69b6e2dbe86be31aedb5d27bd6a3
|
4
|
+
data.tar.gz: 26e3870c6eea7a650a8e3f8d7bac928728c4c717
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9250819e966d75d38a23eb5b094dfd6ba7cdc435cbce5ae9333b45f0da45faed433bd0e351ff829bd62a517e11fe6dafa3d0513222b0430390bb7529d374d328
|
7
|
+
data.tar.gz: a6fea73dc9245f8902672dc83e830a9a01ff705f8408b7b61bdbcbec22e343fe2117106413900709bc03649eaf2d93b8f835c652e7bb68e8cb087a380d56b7f0
|
data/README.md
CHANGED
@@ -6,8 +6,8 @@ dependencies locally just to have a gem push command.
|
|
6
6
|
|
7
7
|
[![Gem Version](https://badge.fury.io/rb/geminabox-release.png)](http://badge.fury.io/rb/geminabox-release)
|
8
8
|
|
9
|
-
|
10
|
-
your geminabox server.
|
9
|
+
If you use bundler, this gem is a dependency free option to add a rake inabox:release task to bundler gem_tasks for releasing a new gem to
|
10
|
+
your geminabox server instead of rubygems.
|
11
11
|
|
12
12
|
It only uses the ruby default libaries uri and net/http and expects you are using bundler.
|
13
13
|
|
@@ -34,14 +34,27 @@ GeminaboxRelease.patch(:use_config => true)
|
|
34
34
|
|
35
35
|
```
|
36
36
|
|
37
|
-
|
37
|
+
Then you will get a rake inabox:release task.
|
38
|
+
|
39
|
+
If your geminabox server is using SSL/TLS, but you have an untrusted certificate, you can use the option `ssl_dont_verify`.
|
40
|
+
|
41
|
+
E.g.
|
42
|
+
|
43
|
+
```ruby
|
44
|
+
require 'geminabox-release'
|
45
|
+
GeminaboxRelease.patch(:host => "https://localhost:4000", :ssl_dont_verify => true)
|
46
|
+
```
|
47
|
+
|
48
|
+
However, that is _NOT_ recommended.
|
49
|
+
|
50
|
+
|
51
|
+
If you wish to remove the bundler/gem_tasks rake release task, you can by adding `:remove_release` to the patch options:
|
38
52
|
|
39
53
|
```ruby
|
40
54
|
GeminaboxRelease.patch(:remove_release => true)
|
41
55
|
|
42
56
|
```
|
43
57
|
|
44
|
-
Then you will get a rake inabox:release task.
|
45
58
|
|
46
59
|
**Ensure you do not _require "bundler/gem_tasks"_ in your rakefile anymore!**
|
47
60
|
|
@@ -67,10 +80,17 @@ To ensure you are not accidentally pushing your gem to rubygems there are two di
|
|
67
80
|
|
68
81
|
2) The gem is pushed via the HTTP POST file request geminabox expects and not via the gem push interface.
|
69
82
|
|
83
|
+
3) Optionally you can even fully remove the rake release task, if you wish to. (see above)
|
84
|
+
|
70
85
|
### Troubleshooting
|
71
86
|
|
72
87
|
If the rake tasks do not show make sure you did not require "bundler/gem_tasks" anywhere (espacially before requiring geminabox-release).
|
73
88
|
|
89
|
+
## Contributors
|
90
|
+
|
91
|
+
[Jens Hilligsøe](https://github.com/hilli)
|
92
|
+
|
93
|
+
|
74
94
|
# LICENSE
|
75
95
|
|
76
96
|
Copyright (c) 2014 Dennis-Florian Herr @ Experteer GmbH
|
data/geminabox-release.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
|
|
13
13
|
spec.license = "MIT"
|
14
14
|
|
15
15
|
spec.files = Dir["lib/**/*"]
|
16
|
-
spec.files += [".gitignore", "
|
16
|
+
spec.files += [".gitignore", "Gemfile", "geminabox-release.gemspec", "README.md", "Rakefile", "LICENSE"]
|
17
17
|
spec.require_paths = ["lib"]
|
18
18
|
|
19
19
|
end
|
data/lib/geminabox-release.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'uri'
|
2
|
-
require 'net/
|
2
|
+
require 'net/https'
|
3
3
|
|
4
4
|
module GeminaboxRelease
|
5
5
|
|
@@ -53,6 +53,9 @@ module GeminaboxRelease
|
|
53
53
|
else
|
54
54
|
raise GeminaboxRelease::NoHost
|
55
55
|
end
|
56
|
+
if options[:ssl_dont_verify]
|
57
|
+
@ssl_dont_verify = options[:ssl_dont_verify]
|
58
|
+
end
|
56
59
|
|
57
60
|
Bundler::GemHelper.class_eval do
|
58
61
|
|
@@ -122,6 +125,10 @@ module GeminaboxRelease
|
|
122
125
|
post_body << "\r\n--#{boundary}--\r\n\r\n"
|
123
126
|
|
124
127
|
http = Net::HTTP.new(uri.host, uri.port)
|
128
|
+
if uri.scheme == 'https'
|
129
|
+
http.use_ssl = true
|
130
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_NONE if @ssl_dont_verify
|
131
|
+
end
|
125
132
|
req = Net::HTTP::Post.new(uri.request_uri)
|
126
133
|
req.body = post_body.join
|
127
134
|
req.basic_auth(username, password) unless username.nil? || username.empty?
|
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.
|
4
|
+
version: 0.2.0
|
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:
|
11
|
+
date: 2016-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Dependency free rake release task for geminabox
|
14
14
|
email:
|
@@ -17,15 +17,14 @@ executables: []
|
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
|
-
- lib/geminabox-release.rb
|
21
|
-
- lib/geminabox-release/version.rb
|
22
20
|
- .gitignore
|
23
|
-
- .ruby-version
|
24
21
|
- Gemfile
|
25
|
-
-
|
22
|
+
- LICENSE
|
26
23
|
- README.md
|
27
24
|
- Rakefile
|
28
|
-
-
|
25
|
+
- geminabox-release.gemspec
|
26
|
+
- lib/geminabox-release.rb
|
27
|
+
- lib/geminabox-release/version.rb
|
29
28
|
homepage:
|
30
29
|
licenses:
|
31
30
|
- MIT
|
@@ -46,7 +45,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
46
45
|
version: '0'
|
47
46
|
requirements: []
|
48
47
|
rubyforge_project:
|
49
|
-
rubygems_version: 2.
|
48
|
+
rubygems_version: 2.5.1
|
50
49
|
signing_key:
|
51
50
|
specification_version: 4
|
52
51
|
summary: see readme
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.0.0-p481
|