intranet-pictures 1.0.3 → 1.0.4

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
  SHA256:
3
- metadata.gz: 4c93c1b51aaf95fe8d2b1a0b36d025642b43cfb7b44f51038b586be82556f6b9
4
- data.tar.gz: 9243049346ad0b8c5894a2b1971e786102f7f7853d56458f10a4476b6d64c0a9
3
+ metadata.gz: 564df3bd8811c29b26f35a7a9a883e5af23d4092e63d616240d76cd73c77c2bd
4
+ data.tar.gz: af344718de64f2952b30ed0249cf52bddfafc30eaf45498e02378bbcb1198623
5
5
  SHA512:
6
- metadata.gz: b49d7ca5dd4179b4751aeb200a6df9596edce76302a4a74d72fc80deb704deb5657cfe4dd2b48d367a4a4b5b475556b56fe81c97402d13597650e4eb9bde11c6
7
- data.tar.gz: 0d3d8d758fc87d821dea83a56ee7435036036f105909d2b137f35d34a6d064b2dd5571a92e00b20013a0bdeaf9bfa6a5d4194d2bf50d1fd71021d44036f593ef
6
+ metadata.gz: 6a321298b67ea2822c0bc75b2bdaa5473b0cf38b9fc2dac6badb90f37f9dd1535425101f129b5f8d61c457d3611e28ee2d33e397ce792d8cf380be66c46d831d
7
+ data.tar.gz: '098fe4089fd07dd9843dc1ebd023c841be1668113c394cddc7dc0407457d1f19bcc4060342969facebeb9eea7c29c9abb484caf3d0720041971251f68bcbfe6f'
@@ -222,7 +222,7 @@ module Intranet
222
222
  group_type = path.split('/')[2].to_s
223
223
  pic = @provider.group_thumbnail(group_type, selector(query))
224
224
  if pic.nil?
225
- pic = ['image/jpeg', File.read(File.join(resources_dir, 'www', 'group_thumbnail.jpg'))]
225
+ pic = ['image/svg+xml', File.read(File.join(resources_dir, 'www', 'group_thumbnail.svg'))]
226
226
  end
227
227
  pic
228
228
  end
@@ -8,7 +8,7 @@ module Intranet
8
8
  NAME = 'intranet-pictures'
9
9
 
10
10
  # The version of the gem, according to semantic versionning.
11
- VERSION = '1.0.3'
11
+ VERSION = '1.0.4'
12
12
 
13
13
  # The URL of the gem homepage.
14
14
  HOMEPAGE_URL = 'https://rubygems.org/gems/intranet-pictures'
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="860" height="380">
3
+ <rect width="860" height="380" style="fill:rgb(226,226,226)" />
4
+ <rect x="308" y="96" width="211" height="154" rx="2" ry="2" style="fill:rgb(226,226,226);stroke-width:13.5;stroke:rgb(245,245,245)" />
5
+ <rect x="323" y="111" width="211" height="154" style="fill:rgb(226,226,226)" />
6
+ <rect x="344" y="132" width="211" height="154" rx="2" ry="2" style="fill:rgb(226,226,226);stroke-width:13.5;stroke:rgb(245,245,245)" />
7
+ <circle cx="401" cy="185" r="18" fill="rgb(245,245,245)" />
8
+ <path d="M 368 257 Q 374 223 435 231 L 469 178 L 496 219 L 511 199 L 531 257 Z" fill="rgb(245,245,245)" />
9
+ </svg>
@@ -53,12 +53,12 @@ ul.groups li figure {
53
53
  }
54
54
  ul.groups li figure div {
55
55
  height: 0px;
56
- padding-bottom: 74.075%; /* 200:270 ratio */
56
+ padding-bottom: 75%; /* 300:400 ratio */
57
57
  background: no-repeat center;
58
58
  background-size: cover;
59
59
  }
60
60
  ul.groups.wide li figure div {
61
- padding-bottom: 43.860%; /* 250:570 ratio */
61
+ padding-bottom: 44.186%; /* 380:860 ratio */
62
62
  }
63
63
  ul.groups li figcaption {
64
64
  display: block;
@@ -404,9 +404,9 @@ RSpec.describe Intranet::Pictures::Responder do
404
404
  query = { 'group2' => 'group2_title2' }
405
405
  code, mime, content = @responder.generate_page('/api/group/group2', query)
406
406
  expect(code).to eql(200)
407
- expect(mime).to eql('image/jpeg')
407
+ expect(mime).to eql('image/svg+xml')
408
408
  expect(content).to eql(
409
- File.read(File.join(__dir__, '../../../lib/intranet/resources/www/group_thumbnail.jpg'))
409
+ File.read(File.join(__dir__, '../../../lib/intranet/resources/www/group_thumbnail.svg'))
410
410
  )
411
411
 
412
412
  # Existing group with non-existant thumbnail
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: intranet-pictures
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ebling Mis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-30 00:00:00.000000000 Z
11
+ date: 2021-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: intranet-core
@@ -128,7 +128,7 @@ files:
128
128
  - lib/intranet/resources/haml/pictures_photoswipe.haml
129
129
  - lib/intranet/resources/locales/en.yml
130
130
  - lib/intranet/resources/locales/fr.yml
131
- - lib/intranet/resources/www/group_thumbnail.jpg
131
+ - lib/intranet/resources/www/group_thumbnail.svg
132
132
  - lib/intranet/resources/www/jpictures.js
133
133
  - lib/intranet/resources/www/photoswipe/LICENSE
134
134
  - lib/intranet/resources/www/photoswipe/default-skin/default-skin.css