geminabox 0.13.11 → 0.13.13

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: 8b2bb3c5d8d6a8c04a70e5d84f57192a076843b3
4
- data.tar.gz: fc364821e92a265b3982b734f5389d96ed848639
3
+ metadata.gz: b298fb245a0113e417fcce0bf3db9a8d6542d7ba
4
+ data.tar.gz: 1acd400111d6463f9a1ae944f3b5606711504c19
5
5
  SHA512:
6
- metadata.gz: d2e90fbc63596cfe2d2262602266cd41b92b39e838ac989d64c0125989eb152549e58efca776be2f4696d3c6b205f174a70ea37219ff22d596df88dc2546e684
7
- data.tar.gz: ee6f8ca62696a00abc25a231fc266f252e15f0400208284596105c8218348565e760e877076db41c21ccbde5fc3b5ebd4d4b12488d9c6b5cadaba129b233b32d
6
+ metadata.gz: f59863f086947b6a209f20283f5da9d207ab85498678a372ec207523d1e6ac6d873435f9a67ee492ee5fba124c00fdc7af21b686c51a589bbc6036dd05a82357
7
+ data.tar.gz: a80ccb39df9ba3f1b741cc7d4d254aea8ba917d5526d5f09ef6829e17a0f26be8c090ae353ca054d30c71ab20515c27f677b2f06fd423d19c932debec765e5ed
@@ -156,7 +156,7 @@ module Geminabox
156
156
 
157
157
  delete '/gems/*.gem' do
158
158
  unless self.class.allow_delete?
159
- error_response(403, 'Gem deletion is disabled - see https://github.com/cwninja/geminabox/issues/115')
159
+ error_response(403, 'Gem deletion is disabled - see https://github.com/geminabox/geminabox/issues/115')
160
160
  end
161
161
 
162
162
  serialize_update do
@@ -308,9 +308,8 @@ HTML
308
308
 
309
309
  helpers do
310
310
  def href(text)
311
- escaped_text = Rack::Utils.escape_html(text)
312
- if escaped_text.start_with?('http://') || escaped_text.start_with?('https://')
313
- escaped_text
311
+ if text && (text.start_with?('http://') || text.start_with?('https://'))
312
+ Rack::Utils.escape_html(text)
314
313
  else
315
314
  '#'
316
315
  end
@@ -1,3 +1,3 @@
1
1
  module Geminabox
2
- VERSION = '0.13.11' unless defined? VERSION
2
+ VERSION = '0.13.13' unless defined? VERSION
3
3
  end
data/views/gem.erb CHANGED
@@ -13,11 +13,15 @@
13
13
  <small class="platform"><%= version.platform %></small>
14
14
  <% end %>
15
15
  </p>
16
- <form class="delete-form" method="post" action="<%= url("/gems/#{version.gemfile_name}.gem") %>">
16
+ <div class="delete-form">
17
17
  <a class="download" href="<%= url("/gems/#{version.gemfile_name}.gem") %>">download</a>
18
- <input type="hidden" name="_method" value="DELETE" />
19
- <button type="submit">delete</button>
20
- </form>
18
+ <% if @allow_delete %>
19
+ <form method="post" action="<%= url("/gems/#{version.gemfile_name}.gem") %>">
20
+ <input type="hidden" name="_method" value="DELETE" />
21
+ <button type="submit">delete</button>
22
+ </form>
23
+ <% end %>
24
+ </div>
21
25
  <% end %>
22
26
 
23
27
  <div class="details">
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: geminabox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.11
4
+ version: 0.13.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Lea
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2017-11-17 00:00:00.000000000 Z
14
+ date: 2018-01-11 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: sinatra