sibu 0.2.8 → 0.2.9

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: 890ce1c36ae3d7831bb4c4d38d2f30c0e82f6798
4
- data.tar.gz: 0cb68649dae59842338905b43fdc6eb43df9721c
3
+ metadata.gz: 2d4de3f8c930710c6b999e42d26de51430104679
4
+ data.tar.gz: 9e185ac0d6619ebfee78ce1865bd289d3f743835
5
5
  SHA512:
6
- metadata.gz: 3d8eed0ac01640b78488126d0761bc92a6dc495c76228526960b37918f40400479059bfd3377c7a6e2528400e6da3754bf2d16be7425f940b7289f22d27b77f3
7
- data.tar.gz: 737bca593a38ab1c231bc53370d9d5a040ac7dd1eea6180349a21c2e0a6535865a724a7fd8f5d15d1dbdbc1003787b458f7dfd069aaf123d081fe496701fee65
6
+ metadata.gz: 61fb2779438814e31070d05365dcae11b054cdfd57dd78287ad239dd2a5e6e2404dada3a22bcbd496dcbf009020f22bdbe6a7c705991c65103836efded0c9d1d
7
+ data.tar.gz: 7ff856bee09b60257f62151032efd7c2bce2e1eacd9e893d5070dfcb745239c93dc33642aae5db64537900d554ca6320ee1935d1b85a7f2009cac1e481218e9f
@@ -8,5 +8,9 @@ module Sibu
8
8
  def metadata
9
9
  JSON.parse(file_data, symbolize_names: true)[:metadata]
10
10
  end
11
+
12
+ def file_name
13
+ metadata[:filename]
14
+ end
11
15
  end
12
16
  end
@@ -16,13 +16,13 @@
16
16
  <tbody>
17
17
  <% @documents.each do |doc| %>
18
18
  <tr>
19
- <td><%= doc.metadata[:filename] %></td>
19
+ <td><%= doc.file_name %></td>
20
20
  <td><%= doc.metadata[:size] > (1024 * 1024) ? "#{doc.metadata[:size] / (1024 * 1024)} Mo" : "#{doc.metadata[:size] / 1024} Ko" %></td>
21
21
  <td><%= l doc.updated_at %></td>
22
22
  <td><%= doc.file_url %></td>
23
23
  <td>
24
24
  <%= link_to 'Voir', doc.file_url, target: '_blank' %> |
25
- <%= link_to 'Supprimer', document_path(doc), method: :delete, data: {confirm: "Supprimer le document \"#{doc.metadata[:filename]}\" ?"} %>
25
+ <%= link_to 'Supprimer', document_path(doc), method: :delete, data: {confirm: "Supprimer le document \"#{doc.file_name}\" ?"} %>
26
26
  </td>
27
27
  </tr>
28
28
  <% end %>
data/lib/sibu/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sibu
2
- VERSION = '0.2.8'
2
+ VERSION = '0.2.9'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sibu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean-Baptiste Vilain