intranet-pictures 1.0.6 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/intranet/pictures/json_db_provider.rb +41 -71
- data/lib/intranet/pictures/responder.rb +127 -89
- data/lib/intranet/pictures/version.rb +1 -1
- data/lib/intranet/resources/haml/pictures_browse.haml +8 -8
- data/lib/intranet/resources/haml/pictures_home.haml +18 -19
- data/lib/intranet/resources/locales/en.yml +0 -1
- data/lib/intranet/resources/locales/fr.yml +0 -1
- data/lib/intranet/resources/www/jpictures.js +32 -14
- data/lib/intranet/resources/www/photoswipe/photoswipe-dynamic-caption-plugin.css +47 -0
- data/lib/intranet/resources/www/photoswipe/photoswipe-dynamic-caption-plugin.esm.js +400 -0
- data/lib/intranet/resources/www/photoswipe/photoswipe-lightbox.esm.js +1382 -0
- data/lib/intranet/resources/www/photoswipe/photoswipe-lightbox.esm.js.map +1 -0
- data/lib/intranet/resources/www/photoswipe/photoswipe-lightbox.esm.min.js +5 -0
- data/lib/intranet/resources/www/photoswipe/photoswipe.css +383 -142
- data/lib/intranet/resources/www/photoswipe/photoswipe.esm.js +5279 -0
- data/lib/intranet/resources/www/photoswipe/photoswipe.esm.js.map +1 -0
- data/lib/intranet/resources/www/photoswipe/photoswipe.esm.min.js +5 -0
- data/lib/intranet/resources/www/style.css +13 -0
- data/spec/intranet/pictures/json_db_provider_spec.rb +52 -147
- data/spec/intranet/pictures/responder_spec.rb +176 -191
- data/spec/intranet/pictures/sample-db.json +28 -38
- data/spec/spec_helper.rb +6 -8
- metadata +26 -28
- data/lib/intranet/resources/haml/pictures_photoswipe.haml +0 -23
- data/lib/intranet/resources/www/photoswipe/LICENSE +0 -21
- data/lib/intranet/resources/www/photoswipe/default-skin/default-skin.css +0 -484
- data/lib/intranet/resources/www/photoswipe/default-skin/default-skin.png +0 -0
- data/lib/intranet/resources/www/photoswipe/default-skin/default-skin.svg +0 -1
- data/lib/intranet/resources/www/photoswipe/default-skin/preloader.gif +0 -0
- data/lib/intranet/resources/www/photoswipe/photoswipe-ui-default.js +0 -861
- data/lib/intranet/resources/www/photoswipe/photoswipe-ui-default.min.js +0 -4
- data/lib/intranet/resources/www/photoswipe/photoswipe.js +0 -3734
- data/lib/intranet/resources/www/photoswipe/photoswipe.min.js +0 -4
@@ -1,46 +1,36 @@
|
|
1
1
|
{
|
2
2
|
"title": "My Gallery",
|
3
3
|
"groups": {
|
4
|
-
"
|
4
|
+
"author": [
|
5
5
|
{
|
6
|
-
"id": "
|
7
|
-
"title": "Group 1, Title 1",
|
6
|
+
"id": "John Doe",
|
8
7
|
"uri": "white.jpg",
|
9
|
-
"brief": "
|
8
|
+
"brief": "Best photographer ever"
|
10
9
|
},
|
11
10
|
{
|
12
|
-
"id": "
|
13
|
-
"title": "Group 1, Title 2",
|
11
|
+
"id": "Jane Doe",
|
14
12
|
"uri": "thumb12.jpg"
|
15
13
|
}
|
16
14
|
],
|
17
|
-
"
|
15
|
+
"location": [
|
18
16
|
{
|
19
|
-
"id": "
|
20
|
-
"
|
21
|
-
"uri": "alpha.png",
|
22
|
-
"value": "abcd"
|
17
|
+
"id": "New York, USA",
|
18
|
+
"uri": "alpha.png"
|
23
19
|
},
|
24
20
|
{
|
25
|
-
"id": "
|
26
|
-
"
|
27
|
-
"value": "bcde",
|
28
|
-
"brief": "brief_text_2"
|
21
|
+
"id": "Paris, France",
|
22
|
+
"brief": "The City of Light"
|
29
23
|
},
|
30
24
|
{
|
31
|
-
"id": "
|
32
|
-
"title": "Group 2, Title 3",
|
33
|
-
"value": "aabb"
|
25
|
+
"id": "Tokyo, Japan"
|
34
26
|
}
|
35
27
|
],
|
36
|
-
"
|
28
|
+
"camera": [
|
37
29
|
{
|
38
|
-
"id": "
|
39
|
-
"title": "Group 3, Title 1"
|
30
|
+
"id": "Apple iPhone 11"
|
40
31
|
},
|
41
32
|
{
|
42
|
-
"id": "
|
43
|
-
"title": "Group 3, Title 2"
|
33
|
+
"id": "Canon EOS 5D MARK IV"
|
44
34
|
}
|
45
35
|
]
|
46
36
|
},
|
@@ -48,36 +38,36 @@
|
|
48
38
|
{
|
49
39
|
"uri": "white.jpg",
|
50
40
|
"datetime": "2019:07:22 09:41:31",
|
51
|
-
"
|
52
|
-
"
|
53
|
-
"
|
41
|
+
"author": "John Doe",
|
42
|
+
"location": "Paris, France",
|
43
|
+
"camera": "Apple iPhone 11"
|
54
44
|
},
|
55
45
|
{
|
56
46
|
"uri": "./alpha.png",
|
57
47
|
"datetime": "2020:06:19 07:51:05",
|
58
|
-
"
|
59
|
-
"
|
60
|
-
"
|
48
|
+
"flash": false,
|
49
|
+
"author": "Jane Doe",
|
50
|
+
"location": "Tokyo, Japan"
|
61
51
|
},
|
62
52
|
{
|
63
53
|
"uri": "pic3.jpg",
|
64
54
|
"datetime": "2020:06:20 18:14:09",
|
65
|
-
"
|
66
|
-
"
|
67
|
-
"
|
55
|
+
"flash": true,
|
56
|
+
"author": "Jane Doe",
|
57
|
+
"location": "New York, USA"
|
68
58
|
},
|
69
59
|
{
|
70
60
|
"uri": "sample-db.json",
|
71
61
|
"datetime": "2020:06:20 06:09:54",
|
72
|
-
"
|
73
|
-
"
|
74
|
-
"
|
75
|
-
"
|
62
|
+
"flash": true,
|
63
|
+
"author": "Jane Doe",
|
64
|
+
"location": "Paris, France",
|
65
|
+
"camera": "Canon EOS 5D MARK IV"
|
76
66
|
},
|
77
67
|
{
|
78
68
|
"datetime": "2019:07:22 09:45:17",
|
79
|
-
"
|
80
|
-
"
|
69
|
+
"author": "John Doe",
|
70
|
+
"location": "Tokyo, Japan"
|
81
71
|
}
|
82
72
|
]
|
83
73
|
}
|
data/spec/spec_helper.rb
CHANGED
@@ -41,13 +41,11 @@ RSpec.configure do |config|
|
|
41
41
|
$LOAD_PATH << File.absolute_path(File.join('..', 'lib'), __dir__)
|
42
42
|
|
43
43
|
# Load and start SimpleCov to gather code coverage information
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
add_filter 'spec' # exclude 'spec' folder from coverage
|
51
|
-
end
|
44
|
+
require 'simplecov'
|
45
|
+
SimpleCov.start do
|
46
|
+
enable_coverage :branch # measure branches coverage
|
47
|
+
primary_coverage :branch
|
48
|
+
minimum_coverage line: 100, branch: 100 # minimal coverage rate to succeed
|
49
|
+
add_filter 'spec' # exclude 'spec' folder from coverage
|
52
50
|
end
|
53
51
|
end
|
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:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ebling Mis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: intranet-core
|
@@ -48,44 +48,44 @@ dependencies:
|
|
48
48
|
name: rake
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- - "
|
51
|
+
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '0'
|
53
|
+
version: '13.0'
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
|
-
- - "
|
58
|
+
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '0'
|
60
|
+
version: '13.0'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: rspec
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
|
-
- - "
|
65
|
+
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '0'
|
67
|
+
version: '3.0'
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
|
-
- - "
|
72
|
+
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '0'
|
74
|
+
version: '3.0'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: rubocop
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
|
-
- - "
|
79
|
+
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: '0'
|
81
|
+
version: '1.0'
|
82
82
|
type: :development
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
|
-
- - "
|
86
|
+
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: '0'
|
88
|
+
version: '1.0'
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: simplecov
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -104,16 +104,16 @@ dependencies:
|
|
104
104
|
name: yard
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- - "
|
107
|
+
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: '0'
|
109
|
+
version: '0.0'
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
|
-
- - "
|
114
|
+
- - "~>"
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: '0'
|
116
|
+
version: '0.0'
|
117
117
|
description:
|
118
118
|
email: ebling.mis@protonmail.com
|
119
119
|
executables: []
|
@@ -125,21 +125,19 @@ files:
|
|
125
125
|
- lib/intranet/pictures/version.rb
|
126
126
|
- lib/intranet/resources/haml/pictures_browse.haml
|
127
127
|
- lib/intranet/resources/haml/pictures_home.haml
|
128
|
-
- lib/intranet/resources/haml/pictures_photoswipe.haml
|
129
128
|
- lib/intranet/resources/locales/en.yml
|
130
129
|
- lib/intranet/resources/locales/fr.yml
|
131
130
|
- lib/intranet/resources/www/group_thumbnail.svg
|
132
131
|
- lib/intranet/resources/www/jpictures.js
|
133
|
-
- lib/intranet/resources/www/photoswipe/
|
134
|
-
- lib/intranet/resources/www/photoswipe/
|
135
|
-
- lib/intranet/resources/www/photoswipe/
|
136
|
-
- lib/intranet/resources/www/photoswipe/
|
137
|
-
- lib/intranet/resources/www/photoswipe/
|
138
|
-
- lib/intranet/resources/www/photoswipe/photoswipe-ui-default.js
|
139
|
-
- lib/intranet/resources/www/photoswipe/photoswipe-ui-default.min.js
|
132
|
+
- lib/intranet/resources/www/photoswipe/photoswipe-dynamic-caption-plugin.css
|
133
|
+
- lib/intranet/resources/www/photoswipe/photoswipe-dynamic-caption-plugin.esm.js
|
134
|
+
- lib/intranet/resources/www/photoswipe/photoswipe-lightbox.esm.js
|
135
|
+
- lib/intranet/resources/www/photoswipe/photoswipe-lightbox.esm.js.map
|
136
|
+
- lib/intranet/resources/www/photoswipe/photoswipe-lightbox.esm.min.js
|
140
137
|
- lib/intranet/resources/www/photoswipe/photoswipe.css
|
141
|
-
- lib/intranet/resources/www/photoswipe/photoswipe.js
|
142
|
-
- lib/intranet/resources/www/photoswipe/photoswipe.
|
138
|
+
- lib/intranet/resources/www/photoswipe/photoswipe.esm.js
|
139
|
+
- lib/intranet/resources/www/photoswipe/photoswipe.esm.js.map
|
140
|
+
- lib/intranet/resources/www/photoswipe/photoswipe.esm.min.js
|
143
141
|
- lib/intranet/resources/www/style.css
|
144
142
|
- spec/intranet/pictures/alpha.png
|
145
143
|
- spec/intranet/pictures/json_db_provider_spec.rb
|
@@ -1,23 +0,0 @@
|
|
1
|
-
%div.pswp{tabindex: -1, role: 'dialog', 'aria-hidden' => true}
|
2
|
-
%div.pswp__bg
|
3
|
-
%div.pswp__scroll-wrap
|
4
|
-
%div.pswp__container
|
5
|
-
%div.pswp__item
|
6
|
-
%div.pswp__item
|
7
|
-
%div.pswp__item
|
8
|
-
%div.pswp__ui.pswp__ui--hidden
|
9
|
-
%div.pswp__top-bar
|
10
|
-
%div.pswp__counter
|
11
|
-
%button.pswp__button.pswp__button--close{title: I18n.t('pictures.viewer.close') + ' (Esc)'}
|
12
|
-
%button.pswp__button.pswp__button--fs{title: I18n.t('pictures.viewer.fullscreen')}
|
13
|
-
%button.pswp__button.pswp__button--zoom{title: I18n.t('pictures.viewer.zoom')}
|
14
|
-
%div.pswp__preloader
|
15
|
-
%div.pswp__preloader__icn
|
16
|
-
%div.pswp__preloader__cut
|
17
|
-
%div.pswp__preloader__donut
|
18
|
-
%div.pswp__share-modal.pswp__share-modal--hidden.pswp__single-tap
|
19
|
-
%div.pswp__share-tooltip
|
20
|
-
%button.pswp__button.pswp__button--arrow--left{title: I18n.t('pictures.viewer.previous')}
|
21
|
-
%button.pswp__button.pswp__button--arrow--right{title: I18n.t('pictures.viewer.next')}
|
22
|
-
%div.pswp__caption
|
23
|
-
%div.pswp__caption__center
|
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2014-2019 Dmitry Semenov, http://dimsemenov.com
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|