gemfury 0.4.10 → 0.4.11
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.
- data/README.md +5 -2
- data/lib/gemfury.rb +1 -0
- data/lib/gemfury/client.rb +2 -0
- data/lib/gemfury/client/middleware.rb +12 -0
- data/lib/gemfury/command/app.rb +5 -2
- data/lib/gemfury/error.rb +3 -0
- data/lib/gemfury/version.rb +1 -1
- metadata +3 -2
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
|
-
Gemfury
|
2
|
-
|
1
|
+
Gemfury CLI
|
2
|
+
===========
|
3
|
+
|
4
|
+
[](http://badge.fury.io/rb/gemfury)
|
5
|
+
[](https://travis-ci.org/gemfury/gemfury)
|
3
6
|
|
4
7
|
Gemfury is your personal cloud for your private and custom RubyGems.
|
5
8
|
Once you upload your RubyGem and enable Gemfury as a source, you can
|
data/lib/gemfury.rb
CHANGED
data/lib/gemfury/client.rb
CHANGED
@@ -114,6 +114,7 @@ module Gemfury
|
|
114
114
|
builder.use Faraday::Request::UrlEncoded
|
115
115
|
#builder.use Faraday::Response::Logger
|
116
116
|
builder.use Faraday::Response::ParseJson
|
117
|
+
builder.use Handle503
|
117
118
|
builder.adapter :net_http
|
118
119
|
end
|
119
120
|
end
|
@@ -124,6 +125,7 @@ module Gemfury
|
|
124
125
|
error_class = case response.status
|
125
126
|
when 401 then Gemfury::Unauthorized
|
126
127
|
when 404 then Gemfury::NotFound
|
128
|
+
when 503 then Gemfury::TimeoutError
|
127
129
|
when 400
|
128
130
|
case error['type']
|
129
131
|
when 'Forbidden' then Gemfury::Forbidden
|
data/lib/gemfury/command/app.rb
CHANGED
@@ -113,7 +113,7 @@ class Gemfury::Command::App < Thor
|
|
113
113
|
desc "migrate DIR", "Upload all gems within a directory"
|
114
114
|
def migrate(*paths)
|
115
115
|
with_checks_and_rescues do
|
116
|
-
gem_paths = Dir
|
116
|
+
gem_paths = Dir.glob(paths.map do |p|
|
117
117
|
if File.directory?(p)
|
118
118
|
"#{p}/**/*.gem"
|
119
119
|
elsif File.file?(p)
|
@@ -121,7 +121,7 @@ class Gemfury::Command::App < Thor
|
|
121
121
|
else
|
122
122
|
nil
|
123
123
|
end
|
124
|
-
end.compact)
|
124
|
+
end.compact)
|
125
125
|
|
126
126
|
if gem_paths.empty?
|
127
127
|
shell.say "Problem: No valid gems found", :red
|
@@ -181,6 +181,9 @@ private
|
|
181
181
|
shell.say "- done"
|
182
182
|
rescue Gemfury::CorruptGemFile
|
183
183
|
shell.say "- problem processing this gem", :red
|
184
|
+
rescue Gemfury::TimeoutError, Errno::EPIPE
|
185
|
+
shell.say "- this file is too much to handle", :red
|
186
|
+
shell.say " Visit http://www.gemfury.com/large-package for more info"
|
184
187
|
rescue => e
|
185
188
|
shell.say "- oops", :red
|
186
189
|
throw e
|
data/lib/gemfury/error.rb
CHANGED
data/lib/gemfury/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gemfury
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.11
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-01-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: highline
|
@@ -130,6 +130,7 @@ files:
|
|
130
130
|
- bin/gemfury
|
131
131
|
- lib/faraday/request/multipart_with_file.rb
|
132
132
|
- lib/gemfury/client/filters.rb
|
133
|
+
- lib/gemfury/client/middleware.rb
|
133
134
|
- lib/gemfury/client.rb
|
134
135
|
- lib/gemfury/command/app.rb
|
135
136
|
- lib/gemfury/command/authorization.rb
|