gemfury 0.4.21 → 0.4.22

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: fb413d69e77ddbe538da5acd693ee57bfc1c338e
4
- data.tar.gz: a2c2b098e1cbb22486adb78bcd55412a5998b25b
3
+ metadata.gz: aba06ba54f3b96613a5ec79c5064318cae01ad29
4
+ data.tar.gz: 7dc442b3f49568981e7d3e3ec4c4428b8fa15ef3
5
5
  SHA512:
6
- metadata.gz: 33d918807ed1b445f9038450d55bbc3245c94d2f83daa0afaedabe769d8d8da148e04e2ec0cd71ccf0efe266089920ca0196a8476d7c9eba04e6bcc607a06033
7
- data.tar.gz: d42275d24606461456bfcdb565897b7bee0edba35bf658dbb51c32e3b30155eb5506e6b2a6ffc7533a5f28dcabfb5763e956ccb89a2d8ae6acd6f1b0d5c7ff1f
6
+ metadata.gz: ee08a1dfd66bff9516a20b5dc093e18eb03dbbf4daba4ea4a6229bdc4a2827f255c356729c3d9a8c11887771d321e4b3674dfd69f90734130b04eeb8da242132
7
+ data.tar.gz: ad534718c4c3cddc37a196db65cf91f72f4592c21f2f852bf1d79f77f54ee7f1117622e214f23474cbb169d38e2698390ae2923507237915f0d199584114de1d
@@ -35,8 +35,8 @@ module Gemfury
35
35
  ensure_successful_response!(response)
36
36
 
37
37
  # Notify Gemfury that the upload is ready
38
- data = { :name => File.basename(gem_file.path) }
39
- response = api2.put("uploads/#{id}", data)
38
+ options[:name] ||= File.basename(gem_file.path)
39
+ response = api2.put("uploads/#{id}", options)
40
40
  ensure_successful_response!(response)
41
41
  end
42
42
 
@@ -125,8 +125,7 @@ class Gemfury::Command::App < Thor
125
125
  end.flatten.compact)
126
126
 
127
127
  if gem_paths.empty?
128
- shell.say "Problem: No valid packages found", :red
129
- help(:migrate)
128
+ die!("Problem: No valid packages found", nil, :migrate)
130
129
  else
131
130
  shell.say "Found the following packages:"
132
131
  gem_paths.each { |p| shell.say " #{File.basename(p)}" }
@@ -155,12 +154,11 @@ private
155
154
  shell.say %q(No problem. You can also run "gem update gemfury")
156
155
  end
157
156
  rescue Gemfury::Forbidden => e
158
- shell.say "Oops! You're not allowed to access this", :red
157
+ die!("Oops! You're not allowed to access this", e)
159
158
  rescue Gemfury::NotFound => e
160
- shell.say "Oops! Doesn't look like this exists", :red
161
- rescue Exception => e
162
- shell.say "Oops! Something went wrong. Looking into it ASAP!", :red
163
- shell.say %Q(#{e.class.name}: #{e}\n#{e.backtrace.join("\n")}) if ENV['DEBUG']
159
+ die!("Oops! Doesn't look like this exists", e)
160
+ rescue StandardError => e
161
+ die!("Oops! Something went wrong. Please contact support.", e)
164
162
  end
165
163
 
166
164
  def push_files(command, gem_paths)
@@ -169,9 +167,7 @@ private
169
167
  end.compact
170
168
 
171
169
  if files.empty?
172
- shell.say "Problem: No valid packages found", :red
173
- help(command)
174
- return
170
+ die!("Problem: No valid packages found", nil, command)
175
171
  end
176
172
 
177
173
  # Let's get uploading
@@ -191,4 +187,11 @@ private
191
187
  end
192
188
  end
193
189
  end
190
+
191
+ def die!(msg, err = nil, command = nil)
192
+ shell.say msg, :red
193
+ help(command) if command
194
+ shell.say %Q(#{err.class.name}: #{err}\n#{err.backtrace.join("\n")}) if err && ENV['DEBUG']
195
+ exit(1)
196
+ end
194
197
  end
@@ -1,3 +1,3 @@
1
1
  module Gemfury
2
- VERSION = '0.4.21'
2
+ VERSION = '0.4.22'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemfury
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.21
4
+ version: 0.4.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Rykov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-31 00:00:00.000000000 Z
11
+ date: 2014-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highline
@@ -142,7 +142,8 @@ files:
142
142
  - lib/rubygems/commands/fury_command.rb
143
143
  - lib/rubygems_plugin.rb
144
144
  homepage: http://www.gemfury.com
145
- licenses: []
145
+ licenses:
146
+ - MIT
146
147
  metadata: {}
147
148
  post_install_message: |
148
149
  ************************************************************************