geminabox-release 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/geminabox-release.rb +11 -5
- data/lib/geminabox-release/version.rb +1 -1
- 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: b08a918596cf45774de6897e5432b9c755593410
|
4
|
+
data.tar.gz: ab964319990db85232f5ae511e5434b8553cbc3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1c5109235dff61da9e65114ff0e0751daefe19c274827ae71d9391fd553aad6123924bece031f80bbd5094102474ad1cca77a063dcf7f0ba564fff3605b7fbf
|
7
|
+
data.tar.gz: 16802fea4c2f24f31d20a151df8667d9b46c1fa42a3f362540c41290767d5291e70b212c0f2ca89cd78c0eebebb9e4724f75e4b4f61e43b0607fa72af07eb13b
|
data/lib/geminabox-release.rb
CHANGED
@@ -28,17 +28,19 @@ module GeminaboxRelease
|
|
28
28
|
alias_method :bundler_install, :install
|
29
29
|
|
30
30
|
def install
|
31
|
+
|
31
32
|
desc "Create tag #{version_tag} and build and push #{name}-#{version}.gem to #{GeminaboxRelease.host}"
|
32
|
-
task 'inabox:release'
|
33
|
-
release_inabox
|
33
|
+
task 'inabox:release' do
|
34
|
+
release_inabox
|
34
35
|
end
|
36
|
+
|
35
37
|
bundler_install # call bunlders original install method
|
36
38
|
end
|
37
39
|
|
38
40
|
# same functionality as release_gem but calls inabox_push
|
39
|
-
def release_inabox
|
41
|
+
def release_inabox
|
40
42
|
guard_clean
|
41
|
-
built_gem_path
|
43
|
+
built_gem_path = build_gem
|
42
44
|
tag_version { git_push } unless already_tagged?
|
43
45
|
inabox_push(built_gem_path) if gem_push?
|
44
46
|
end
|
@@ -81,7 +83,11 @@ module GeminaboxRelease
|
|
81
83
|
req["Content-Type"] = "multipart/form-data; boundary=#{boundary}"
|
82
84
|
response = http.request(req)
|
83
85
|
if response.code.to_i < 300
|
84
|
-
|
86
|
+
if response.body.start_with?("Gem #{File.basename(path)} received and indexed")
|
87
|
+
Bundler.ui.confirm("Gem #{File.basename(path)} received and indexed.")
|
88
|
+
else
|
89
|
+
Bundler.ui.error "Error received\n\n#{response.body}"
|
90
|
+
end
|
85
91
|
else
|
86
92
|
raise "Error (#{response.code} received)\n\n#{response.body}"
|
87
93
|
end
|