m1key_gallery_generator 0.3.21 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +66 -63
- data/Rakefile +3 -2
- data/bin/console +5 -4
- data/lib/m1key_gallery_generator/gallery_config.rb +1 -1
- data/lib/m1key_gallery_generator/gallery_mutators.rb +9 -0
- data/lib/m1key_gallery_generator/template.erb +26 -26
- data/lib/m1key_gallery_generator/version.rb +1 -1
- data/lib/m1key_gallery_generator/viewable_gallery.rb +4 -4
- data/m1key_gallery_generator.gemspec +8 -7
- metadata +195 -147
- data/.github/workflows/ruby.yml +0 -38
- data/.gitignore +0 -38
- data/.rspec +0 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 820584c6c827a1be776e5f04db3546e9d1909960d8be6bf6f952759c8bcf61db
|
|
4
|
+
data.tar.gz: 03773782aa511c1af2cc0a3c911461fc7124eaba851115230cd13886027ae812
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0cb4254b4613b5b384d4375a964a1bb050d64e44abbf43bdb7e3811afb96a97dec1f923bcbd14811df96075ff2f0a3356f73f3da2bc87b4bb6f292a5fa7b89fb
|
|
7
|
+
data.tar.gz: 5140e3526bd1853285f98d7f0e9501915600e48a36aa64b3ae7c6d6e0ed80cd88d9979f9fefb32559537fd0217b8fb0b98459fcc653f8adcc0169db0a78fe637
|
data/README.md
CHANGED
|
@@ -1,66 +1,96 @@
|
|
|
1
1
|
# M1keyGalleryGenerator
|
|
2
2
|
|
|
3
|
-
This Ruby script generates www.m1key.me
|
|
3
|
+
This Ruby script generates [m1key.me](https://www.m1key.me)-style galleries based on a `gallery.yaml` file.
|
|
4
|
+
The `gallery.yaml` file title, blurb, descriptions should escape HTML tags.
|
|
4
5
|
|
|
5
|
-
A sample gallery
|
|
6
|
+
A sample gallery: https://www.m1key.me/photography/mauritania_part_2/
|
|
6
7
|
|
|
7
8
|
## Status
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
Maintained, used, going strong.
|
|
10
11
|
|
|
11
12
|
## Set up
|
|
12
13
|
|
|
13
|
-
### Fedora
|
|
14
|
+
### Fedora
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
This was most recently tested on Fedora 43 Workstation ARM.
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
Install rbenv using this command (the one shipped with the system is out of date):
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
```
|
|
21
|
+
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash
|
|
22
|
+
```
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
Then install Ruby:
|
|
24
25
|
|
|
26
|
+
```
|
|
27
|
+
rbenv install 4.0.2
|
|
28
|
+
rbenv global 4.0.2
|
|
29
|
+
gem install bundler
|
|
30
|
+
```
|
|
25
31
|
|
|
26
32
|
### Ubuntu
|
|
27
33
|
|
|
28
|
-
|
|
34
|
+
This was most recently tested on Ubuntu 24.04 AMD.
|
|
35
|
+
|
|
36
|
+
Install rbenv using this command (the one shipped with the system is out of date):
|
|
29
37
|
|
|
30
|
-
|
|
38
|
+
```
|
|
39
|
+
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Rbenv hackery:
|
|
31
43
|
|
|
32
|
-
|
|
44
|
+
```
|
|
45
|
+
apt install libffi-dev
|
|
46
|
+
apt install libyaml-dev
|
|
47
|
+
```
|
|
33
48
|
|
|
34
|
-
|
|
49
|
+
Then install Ruby:
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
rbenv install 4.0.2
|
|
53
|
+
rbenv global 4.0.2
|
|
54
|
+
gem install bundler
|
|
55
|
+
```
|
|
35
56
|
|
|
36
57
|
### Windows
|
|
37
58
|
|
|
38
|
-
|
|
59
|
+
This was most recently tested on Windows 11.
|
|
39
60
|
|
|
40
|
-
Install
|
|
61
|
+
Install Ruby 4.0.10-1 using rubyinstaller.org. Then run:
|
|
41
62
|
|
|
42
|
-
|
|
63
|
+
```
|
|
64
|
+
gem install bundler
|
|
65
|
+
```
|
|
43
66
|
|
|
44
67
|
### All
|
|
45
68
|
|
|
46
69
|
Install dependencies:
|
|
47
70
|
|
|
48
|
-
|
|
71
|
+
```
|
|
72
|
+
bundle install
|
|
73
|
+
```
|
|
49
74
|
|
|
50
75
|
## Tests
|
|
51
76
|
|
|
52
|
-
|
|
53
|
-
This assumes there is a valid gallery.yaml file present in the current folder,
|
|
54
|
-
and the photos themselves in the format DSC_1234.jpg.
|
|
55
|
-
*This is required to run tests.*
|
|
77
|
+
### Setup
|
|
56
78
|
|
|
57
|
-
|
|
79
|
+
```
|
|
80
|
+
ruby -Ilib bin/console test/data
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Synthetic gallery tests
|
|
58
84
|
|
|
59
|
-
|
|
85
|
+
```
|
|
86
|
+
rake
|
|
87
|
+
```
|
|
60
88
|
|
|
61
|
-
|
|
89
|
+
### Code-level tests
|
|
62
90
|
|
|
63
|
-
|
|
91
|
+
```
|
|
92
|
+
rspec spec
|
|
93
|
+
```
|
|
64
94
|
|
|
65
95
|
## Usage
|
|
66
96
|
|
|
@@ -70,15 +100,21 @@ Clone the project.
|
|
|
70
100
|
|
|
71
101
|
Build the gem.
|
|
72
102
|
|
|
73
|
-
|
|
103
|
+
```
|
|
104
|
+
gem build m1key_gallery_generator.gemspec
|
|
105
|
+
```
|
|
74
106
|
|
|
75
107
|
Install the gem.
|
|
76
108
|
|
|
77
|
-
|
|
109
|
+
```
|
|
110
|
+
gem install m1key_gallery_generator-0.4.1.gem
|
|
111
|
+
```
|
|
78
112
|
|
|
79
|
-
In your gallery directory, have a file called generate.bat that looks like this:
|
|
113
|
+
In your gallery directory, have a file called `generate.bat` that looks like this:
|
|
80
114
|
|
|
81
|
-
|
|
115
|
+
```
|
|
116
|
+
ruby c:\Ruby40-x64\lib\ruby\gems\4.0.0\gems\m1key_gallery_generator-0.4.1\bin\console . wait_on_error
|
|
117
|
+
```
|
|
82
118
|
|
|
83
119
|
## Development
|
|
84
120
|
|
|
@@ -88,36 +124,3 @@ To release a new version, update the version number in `version.rb`,
|
|
|
88
124
|
commit your changes,
|
|
89
125
|
and then run `bundle exec rake release` to create a git tag for the version,
|
|
90
126
|
push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
91
|
-
|
|
92
|
-
### Gem
|
|
93
|
-
|
|
94
|
-
To build gem:
|
|
95
|
-
> gem build m1key_gallery_generator.gemspec
|
|
96
|
-
|
|
97
|
-
To install gem:
|
|
98
|
-
> gem install m1key_gallery_generator-0.3.21.gem
|
|
99
|
-
|
|
100
|
-
To test gem:
|
|
101
|
-
> irb
|
|
102
|
-
|
|
103
|
-
> require 'm1key_gallery_generator'
|
|
104
|
-
|
|
105
|
-
### Installation
|
|
106
|
-
|
|
107
|
-
Add this line to your application's Gemfile:
|
|
108
|
-
|
|
109
|
-
```ruby
|
|
110
|
-
gem 'm1key_gallery_generator'
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
And then execute:
|
|
114
|
-
|
|
115
|
-
$ bundle
|
|
116
|
-
|
|
117
|
-
Or install it yourself as:
|
|
118
|
-
|
|
119
|
-
$ gem install m1key_gallery_generator
|
|
120
|
-
|
|
121
|
-
## Gotchas
|
|
122
|
-
|
|
123
|
-
Do not edit the templates in Atom due to its whitespace magic. I used vi instead.
|
data/Rakefile
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
require 'bundler/gem_tasks'
|
|
2
2
|
require 'rake/testtask'
|
|
3
|
+
require 'rspec/core/rake_task'
|
|
3
4
|
|
|
4
|
-
Rake::TestTask.new do |t|
|
|
5
|
+
Rake::TestTask.new(:minitest) do |t|
|
|
5
6
|
t.libs << 'test'
|
|
6
7
|
end
|
|
7
8
|
|
|
8
9
|
desc 'Run tests'
|
|
9
|
-
task default: :
|
|
10
|
+
task default: [:minitest, :spec]
|
data/bin/console
CHANGED
|
@@ -34,13 +34,14 @@ begin
|
|
|
34
34
|
if update_date.to_s == ''
|
|
35
35
|
update_date = Date.today.strftime('%Y-%m-%d')
|
|
36
36
|
end
|
|
37
|
-
gallery = ViewableGallery.new(gallery_config.title, gallery_config.description, gallery_config.slug,
|
|
38
|
-
gallery_config.sources, gallery_config.upload_date, gallery_config.map_url, gallery_config.map_title,
|
|
39
|
-
gallery_config.year, viewable_photos, gallery_config.small_print, gallery_config.blurb, gallery_config.genre,
|
|
40
|
-
update_date).
|
|
37
|
+
gallery = ViewableGallery.new(title: gallery_config.title, description: gallery_config.description, slug: gallery_config.slug,
|
|
38
|
+
sources: gallery_config.sources, upload_date: gallery_config.upload_date, map_url: gallery_config.map_url, map_title: gallery_config.map_title,
|
|
39
|
+
year: gallery_config.year, viewable_photos: viewable_photos, small_print: gallery_config.small_print, blurb: gallery_config.blurb, genre: gallery_config.genre,
|
|
40
|
+
update_date: update_date).
|
|
41
41
|
update_using(
|
|
42
42
|
add_tabs_before_every_description_line(3),
|
|
43
43
|
add_links_to_descriptions,
|
|
44
|
+
add_links_to_small_print,
|
|
44
45
|
for_each_photo(&add_links_to_descriptions),
|
|
45
46
|
for_each_photo(&remove_final_empty_line_from_description))
|
|
46
47
|
|
|
@@ -9,7 +9,7 @@ module GalleryGenerator
|
|
|
9
9
|
|
|
10
10
|
def initialize(yaml_config_file_name)
|
|
11
11
|
puts "Attempting to parse #{yaml_config_file_name} to read gallery configuration..."
|
|
12
|
-
gallery_configuration = YAML.safe_load_file(yaml_config_file_name, permitted_classes: [Date
|
|
12
|
+
gallery_configuration = YAML.safe_load_file(yaml_config_file_name, permitted_classes: [Date])
|
|
13
13
|
puts 'Parsed, seemingly.'
|
|
14
14
|
puts
|
|
15
15
|
|
|
@@ -15,6 +15,15 @@ module GalleryGenerator
|
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
+
def add_links_to_small_print
|
|
19
|
+
lambda do |mutable_viewable_content|
|
|
20
|
+
if mutable_viewable_content.small_print
|
|
21
|
+
mutable_viewable_content.small_print = add_links_to_sources(mutable_viewable_content.small_print)
|
|
22
|
+
end
|
|
23
|
+
mutable_viewable_content
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
18
27
|
def remove_final_empty_line_from_description
|
|
19
28
|
lambda do |mutable_viewable_content|
|
|
20
29
|
mutable_viewable_content.description = remove_final_empty_line(mutable_viewable_content.description)
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
<head>
|
|
5
5
|
<meta charset="utf-8" />
|
|
6
6
|
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
|
7
|
-
<
|
|
8
|
-
<
|
|
7
|
+
<meta name="generator" content="M1keyGalleryGenerator v<%= M1keyGalleryGenerator::VERSION %>" />
|
|
8
|
+
<title><%= title %> — Photography and Art Portfolio by Michal Huniewicz</title>
|
|
9
|
+
<meta name="description" content="<%= blurb.gsub('"', '\\"') %>" />
|
|
9
10
|
<meta name="author" content="Michal Huniewicz" />
|
|
10
11
|
<meta name="robots" content="index, follow" />
|
|
11
12
|
<meta name="referrer" content="strict-origin-when-cross-origin" />
|
|
@@ -16,11 +17,9 @@
|
|
|
16
17
|
<link rel="dns-prefetch" href="https://fonts.googleapis.com" />
|
|
17
18
|
<link rel="dns-prefetch" href="https://fonts.gstatic.com" />
|
|
18
19
|
|
|
19
|
-
<link href="https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;500;600;700&display=swap"
|
|
20
|
-
rel="preload" as="style" />
|
|
21
|
-
<link href="https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;500;600;700&display=swap"
|
|
20
|
+
<link href="https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;500;600;700&display=swap"
|
|
22
21
|
rel="stylesheet" />
|
|
23
|
-
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@800;900&display=swap" rel="stylesheet" />
|
|
22
|
+
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@800;900&display=swap" rel="stylesheet" />
|
|
24
23
|
|
|
25
24
|
<link rel="stylesheet" href="../../styles/base_responsive.css" />
|
|
26
25
|
|
|
@@ -36,24 +35,25 @@
|
|
|
36
35
|
|
|
37
36
|
<meta property="og:locale" content="en_GB" />
|
|
38
37
|
<meta property="og:type" content="website" />
|
|
39
|
-
<meta property="og:title" content="<%= title %> by Michal Huniewicz" />
|
|
40
|
-
<meta property="og:description" content="<%= blurb %>" />
|
|
38
|
+
<meta property="og:title" content="<%= title.gsub('"', '\\"') %> by Michal Huniewicz" />
|
|
39
|
+
<meta property="og:description" content="<%= blurb.gsub('"', '\\"') %>" />
|
|
41
40
|
<meta property="og:url" content="https://www.m1key.me/<%= genre %>/<%= slug %>/" />
|
|
42
41
|
<meta property="og:image" content="https://www.m1key.me/<%= genre %>/<%= slug %>/<%= slug %>_01.jpg" />
|
|
43
|
-
<meta property="og:image:alt" content="<%= title %> by Michal Huniewicz" />
|
|
42
|
+
<meta property="og:image:alt" content="<%= title.gsub('"', '\\"') %> by Michal Huniewicz" />
|
|
44
43
|
<meta property="og:site_name" content="M1key.me" />
|
|
45
44
|
|
|
46
45
|
<meta name="twitter:card" content="summary_large_image" />
|
|
47
|
-
<meta name="twitter:title" content="<%= title %> by Michal Huniewicz" />
|
|
48
|
-
<meta name="twitter:description" content="<%= blurb %>" />
|
|
46
|
+
<meta name="twitter:title" content="<%= title.gsub('"', '\\"') %> by Michal Huniewicz" />
|
|
47
|
+
<meta name="twitter:description" content="<%= blurb.gsub('"', '\\"') %>" />
|
|
49
48
|
<meta name="twitter:image" content="https://www.m1key.me/<%= genre %>/<%= slug %>/<%= slug %>_01.jpg" />
|
|
49
|
+
<meta name="twitter:image:alt" content="<%= title.gsub('"', '\\"') %> by Michal Huniewicz" />
|
|
50
50
|
|
|
51
|
-
<!--
|
|
51
|
+
<!-- Image gallery structured data for SEO -->
|
|
52
52
|
<script type="application/ld+json">
|
|
53
53
|
{
|
|
54
54
|
"@context": "https://schema.org",
|
|
55
55
|
"@type": "ImageGallery",
|
|
56
|
-
"name": "<%= title %> by Michal Huniewicz",
|
|
56
|
+
"name": "<%= HTMLEntities.new.decode(title).gsub('"', '\\"') %> by Michal Huniewicz",
|
|
57
57
|
"url": "https://www.m1key.me/<%= genre %>/<%= slug %>/",
|
|
58
58
|
"datePublished": "<%= upload_date %>",
|
|
59
59
|
"dateModified": "<%= update_date %>",
|
|
@@ -70,14 +70,14 @@
|
|
|
70
70
|
{
|
|
71
71
|
"@type": "ImageObject",
|
|
72
72
|
"contentUrl" : "https://www.m1key.me/<%= genre %>/<%= slug %>/<%= slug %>_<%= photo.id %>.jpg",
|
|
73
|
-
"caption": "<%= HTMLEntities.new.decode(photo.title) %>",
|
|
73
|
+
"caption": "<%= HTMLEntities.new.decode(photo.title).gsub('"', '\\"') %>",
|
|
74
74
|
"width": <%= photo.metadata.width %>,
|
|
75
75
|
"height": <%= photo.metadata.height %>
|
|
76
76
|
}<% if (index + 1) == photos.size %><% else %>,<% end -%>
|
|
77
77
|
<% end %>
|
|
78
78
|
],
|
|
79
|
-
"description": "<%= blurb %>",
|
|
80
|
-
"keywords": "photography, art, portfolio, Michal Huniewicz, m1key.me, <%= title %>"
|
|
79
|
+
"description": "<%= HTMLEntities.new.decode(blurb).gsub('"', '\\"') %>",
|
|
80
|
+
"keywords": "photography, art, portfolio, Michal Huniewicz, m1key.me, <%= HTMLEntities.new.decode(title).gsub('"', '\\"') %>"
|
|
81
81
|
}
|
|
82
82
|
</script>
|
|
83
83
|
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
{
|
|
102
102
|
"@type": "ListItem",
|
|
103
103
|
"position": 3,
|
|
104
|
-
"name": "<%= HTMLEntities.new.decode(title) %>",
|
|
104
|
+
"name": "<%= HTMLEntities.new.decode(title).gsub('"', '\\"') %>",
|
|
105
105
|
"item": "https://www.m1key.me/<%= genre %>/<%= slug %>/"
|
|
106
106
|
}
|
|
107
107
|
]
|
|
@@ -120,24 +120,24 @@
|
|
|
120
120
|
</nav>
|
|
121
121
|
|
|
122
122
|
<header class="site-header">
|
|
123
|
-
<h1 class="page-title"><%=
|
|
123
|
+
<h1 class="page-title"><%= title %> by Michal Huniewicz</h1>
|
|
124
124
|
</header>
|
|
125
125
|
|
|
126
126
|
<section class="information" aria-labelledby="info-heading">
|
|
127
127
|
<h2 id="info-heading" class="visually-hidden">About this shoot</h2>
|
|
128
128
|
<%= description -%>
|
|
129
129
|
<% if small_print.to_s != '' %>
|
|
130
|
-
<p class="
|
|
131
|
-
<p class="
|
|
130
|
+
<p class="small_print"><%= small_print -%></p><% end %>
|
|
131
|
+
<p class="small_print">Uploaded on: <%= upload_date %>. Updated on: <%= update_date %>.</p>
|
|
132
132
|
</section>
|
|
133
133
|
<% if map_url.to_s != '' %>
|
|
134
134
|
<figure class="map">
|
|
135
|
-
<a href="<%= map_url %>"
|
|
135
|
+
<a href="<%= HTMLEntities.new.encode(map_url) %>"
|
|
136
136
|
target="_blank" rel="noopener noreferrer">
|
|
137
|
-
<img src="<%= slug %>_map.png" alt="Map showing <%=
|
|
138
|
-
title="<%=
|
|
137
|
+
<img src="<%= slug %>_map.png" alt="Map showing <%= map_title %> location"
|
|
138
|
+
title="<%= map_title %>" width="320" height="240" />
|
|
139
139
|
</a>
|
|
140
|
-
<figcaption class="visually-hidden">Map showing <%=
|
|
140
|
+
<figcaption class="visually-hidden">Map showing <%= map_title %> location</figcaption>
|
|
141
141
|
</figure><% end %>
|
|
142
142
|
<% photos.each_with_index do |photo, index| %>
|
|
143
143
|
<article class="photo" id="<%= photo.id %>">
|
|
@@ -157,8 +157,8 @@
|
|
|
157
157
|
<% if sources %>
|
|
158
158
|
<details class="sources" id="sources">
|
|
159
159
|
<summary>Sources</summary>
|
|
160
|
-
<ul class="
|
|
161
|
-
<li><%= index + 1 %>: <a href="<%= source %>" rel="noopener noreferrer" class="nav-link"><% if source.length > 100 %><%= source[0..50] %>[...]<%= source[-30..-1] %><% else %><%= source %><% end -%></a></li><% end %>
|
|
160
|
+
<ul class="small_print"><% sources.each_with_index do |source, index| %>
|
|
161
|
+
<li><%= index + 1 %>: <a href="<%= HTMLEntities.new.encode(source) %>" target="_blank" rel="noopener noreferrer" class="nav-link"><% if source.length > 100 %><%= HTMLEntities.new.encode(source[0..50]) %>[...]<%= HTMLEntities.new.encode(source[-30..-1]) %><% else %><%= HTMLEntities.new.encode(source) %><% end -%></a></li><% end %>
|
|
162
162
|
</ul>
|
|
163
163
|
</details>
|
|
164
164
|
<% end -%>
|
|
@@ -3,7 +3,7 @@ require_relative 'string_utils'
|
|
|
3
3
|
module GalleryGenerator
|
|
4
4
|
class ViewableGallery
|
|
5
5
|
attr_reader :title, :description, :slug, :sources, :upload_date, :map_url, :map_title, :year, :photos, :small_print, :blurb, :genre, :update_date
|
|
6
|
-
def initialize(title
|
|
6
|
+
def initialize(title:, description:, slug:, sources:, upload_date:, map_url:, map_title:, year:, viewable_photos:, small_print:, blurb:, genre:, update_date:)
|
|
7
7
|
@title = String.new(title)
|
|
8
8
|
@description = description
|
|
9
9
|
@slug = slug
|
|
@@ -30,9 +30,9 @@ module GalleryGenerator
|
|
|
30
30
|
updated_gallery = update_function.call(updated_gallery)
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
-
ViewableGallery.new(updated_gallery.title, updated_gallery.description, updated_gallery.slug,
|
|
34
|
-
updated_gallery.sources, updated_gallery.upload_date, updated_gallery.map_url,
|
|
35
|
-
updated_gallery.map_title, updated_gallery.year, to_viewable_photos(updated_gallery.photos), updated_gallery.small_print, updated_gallery.blurb, updated_gallery.genre, updated_gallery.update_date)
|
|
33
|
+
ViewableGallery.new(title: updated_gallery.title, description: updated_gallery.description, slug: updated_gallery.slug,
|
|
34
|
+
sources: updated_gallery.sources, upload_date: updated_gallery.upload_date, map_url: updated_gallery.map_url,
|
|
35
|
+
map_title: updated_gallery.map_title, year: updated_gallery.year, viewable_photos: to_viewable_photos(updated_gallery.photos), small_print: updated_gallery.small_print, blurb: updated_gallery.blurb, genre: updated_gallery.genre, update_date: updated_gallery.update_date)
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
def to_viewable_photos(mutable_viewable_photos)
|
|
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
|
|
|
7
7
|
spec.version = M1keyGalleryGenerator::VERSION
|
|
8
8
|
spec.authors = ['Michal Huniewicz']
|
|
9
9
|
spec.email = ['REDACTED']
|
|
10
|
-
spec.required_ruby_version = '>=
|
|
10
|
+
spec.required_ruby_version = '>= 4.0'
|
|
11
11
|
|
|
12
12
|
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
|
13
13
|
|
|
@@ -16,17 +16,18 @@ Gem::Specification.new do |spec|
|
|
|
16
16
|
spec.homepage = 'https://github.com/m1key/m1key_gallery_generator'
|
|
17
17
|
spec.license = 'MIT'
|
|
18
18
|
|
|
19
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
19
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) || f.start_with?('.') }
|
|
20
20
|
spec.bindir = 'exe'
|
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
22
22
|
spec.require_paths = ['lib']
|
|
23
23
|
|
|
24
|
-
spec.add_runtime_dependency 'exifr', '~> 1.
|
|
24
|
+
spec.add_runtime_dependency 'exifr', '~> 1.5', '>= 1.5.1'
|
|
25
|
+
spec.add_runtime_dependency 'logger', '~> 1.7'
|
|
25
26
|
|
|
26
|
-
spec.add_development_dependency 'bundler', '~>
|
|
27
|
-
spec.add_development_dependency 'rake', '~> 13.
|
|
28
|
-
spec.add_development_dependency 'minitest', '~>
|
|
29
|
-
spec.add_development_dependency 'rspec', '~>
|
|
27
|
+
spec.add_development_dependency 'bundler', '~> 4.1', '>= 4.1.0'
|
|
28
|
+
spec.add_development_dependency 'rake', '~> 13.4', '>= 13.4.2'
|
|
29
|
+
spec.add_development_dependency 'minitest', '~> 6.1', '>= 6.1.0'
|
|
30
|
+
spec.add_development_dependency 'rspec', '~> 4.0.0.beta1'
|
|
30
31
|
spec.add_development_dependency 'fiddle', '~> 1.1.8'
|
|
31
32
|
spec.add_development_dependency 'htmlentities', '~> 4.4.2'
|
|
32
33
|
end
|
metadata
CHANGED
|
@@ -1,173 +1,221 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: m1key_gallery_generator
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
- Michal Huniewicz
|
|
7
|
+
- Michal Huniewicz
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
|
-
- !ruby/object:Gem::Dependency
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
- !ruby/object:Gem::Dependency
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
- !ruby/object:Gem::
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: exifr
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
-
|
|
17
|
+
- ~>
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: "1.5"
|
|
20
|
+
-
|
|
21
|
+
- ">="
|
|
22
|
+
- !ruby/object:Gem::Version
|
|
23
|
+
version: 1.5.1
|
|
24
|
+
type: :runtime
|
|
25
|
+
prerelease: false
|
|
26
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
27
|
+
requirements:
|
|
28
|
+
-
|
|
29
|
+
- ~>
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: "1.5"
|
|
32
|
+
-
|
|
33
|
+
- ">="
|
|
34
|
+
- !ruby/object:Gem::Version
|
|
35
|
+
version: 1.5.1
|
|
36
|
+
- !ruby/object:Gem::Dependency
|
|
37
|
+
name: logger
|
|
38
|
+
requirement: !ruby/object:Gem::Requirement
|
|
39
|
+
requirements:
|
|
40
|
+
-
|
|
41
|
+
- ~>
|
|
42
|
+
- !ruby/object:Gem::Version
|
|
43
|
+
version: "1.7"
|
|
44
|
+
type: :runtime
|
|
45
|
+
prerelease: false
|
|
46
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
47
|
+
requirements:
|
|
48
|
+
-
|
|
49
|
+
- ~>
|
|
50
|
+
- !ruby/object:Gem::Version
|
|
51
|
+
version: "1.7"
|
|
52
|
+
- !ruby/object:Gem::Dependency
|
|
53
|
+
name: bundler
|
|
54
|
+
requirement: !ruby/object:Gem::Requirement
|
|
55
|
+
requirements:
|
|
56
|
+
-
|
|
57
|
+
- ~>
|
|
58
|
+
- !ruby/object:Gem::Version
|
|
59
|
+
version: "4.1"
|
|
60
|
+
-
|
|
61
|
+
- ">="
|
|
62
|
+
- !ruby/object:Gem::Version
|
|
63
|
+
version: 4.1.0
|
|
64
|
+
type: :development
|
|
65
|
+
prerelease: false
|
|
66
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
67
|
+
requirements:
|
|
68
|
+
-
|
|
69
|
+
- ~>
|
|
70
|
+
- !ruby/object:Gem::Version
|
|
71
|
+
version: "4.1"
|
|
72
|
+
-
|
|
73
|
+
- ">="
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: 4.1.0
|
|
76
|
+
- !ruby/object:Gem::Dependency
|
|
77
|
+
name: rake
|
|
78
|
+
requirement: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
-
|
|
81
|
+
- ~>
|
|
82
|
+
- !ruby/object:Gem::Version
|
|
83
|
+
version: "13.4"
|
|
84
|
+
-
|
|
85
|
+
- ">="
|
|
86
|
+
- !ruby/object:Gem::Version
|
|
87
|
+
version: 13.4.2
|
|
88
|
+
type: :development
|
|
89
|
+
prerelease: false
|
|
90
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
91
|
+
requirements:
|
|
92
|
+
-
|
|
93
|
+
- ~>
|
|
94
|
+
- !ruby/object:Gem::Version
|
|
95
|
+
version: "13.4"
|
|
96
|
+
-
|
|
97
|
+
- ">="
|
|
98
|
+
- !ruby/object:Gem::Version
|
|
99
|
+
version: 13.4.2
|
|
100
|
+
- !ruby/object:Gem::Dependency
|
|
101
|
+
name: minitest
|
|
102
|
+
requirement: !ruby/object:Gem::Requirement
|
|
103
|
+
requirements:
|
|
104
|
+
-
|
|
105
|
+
- ~>
|
|
106
|
+
- !ruby/object:Gem::Version
|
|
107
|
+
version: "6.1"
|
|
108
|
+
-
|
|
109
|
+
- ">="
|
|
110
|
+
- !ruby/object:Gem::Version
|
|
111
|
+
version: 6.1.0
|
|
112
|
+
type: :development
|
|
113
|
+
prerelease: false
|
|
114
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
115
|
+
requirements:
|
|
116
|
+
-
|
|
117
|
+
- ~>
|
|
118
|
+
- !ruby/object:Gem::Version
|
|
119
|
+
version: "6.1"
|
|
120
|
+
-
|
|
121
|
+
- ">="
|
|
122
|
+
- !ruby/object:Gem::Version
|
|
123
|
+
version: 6.1.0
|
|
124
|
+
- !ruby/object:Gem::Dependency
|
|
125
|
+
name: rspec
|
|
126
|
+
requirement: !ruby/object:Gem::Requirement
|
|
127
|
+
requirements:
|
|
128
|
+
-
|
|
129
|
+
- ~>
|
|
130
|
+
- !ruby/object:Gem::Version
|
|
131
|
+
version: 4.0.0.beta1
|
|
132
|
+
type: :development
|
|
133
|
+
prerelease: true
|
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
135
|
+
requirements:
|
|
136
|
+
-
|
|
137
|
+
- ~>
|
|
138
|
+
- !ruby/object:Gem::Version
|
|
139
|
+
version: 4.0.0.beta1
|
|
140
|
+
- !ruby/object:Gem::Dependency
|
|
141
|
+
name: fiddle
|
|
142
|
+
requirement: !ruby/object:Gem::Requirement
|
|
143
|
+
requirements:
|
|
144
|
+
-
|
|
145
|
+
- ~>
|
|
146
|
+
- !ruby/object:Gem::Version
|
|
147
|
+
version: 1.1.8
|
|
148
|
+
type: :development
|
|
149
|
+
prerelease: false
|
|
150
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
151
|
+
requirements:
|
|
152
|
+
-
|
|
153
|
+
- ~>
|
|
154
|
+
- !ruby/object:Gem::Version
|
|
155
|
+
version: 1.1.8
|
|
156
|
+
- !ruby/object:Gem::Dependency
|
|
157
|
+
name: htmlentities
|
|
158
|
+
requirement: !ruby/object:Gem::Requirement
|
|
159
|
+
requirements:
|
|
160
|
+
-
|
|
161
|
+
- ~>
|
|
162
|
+
- !ruby/object:Gem::Version
|
|
163
|
+
version: 4.4.2
|
|
164
|
+
type: :development
|
|
165
|
+
prerelease: false
|
|
166
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
167
|
+
requirements:
|
|
168
|
+
-
|
|
169
|
+
- ~>
|
|
170
|
+
- !ruby/object:Gem::Version
|
|
171
|
+
version: 4.4.2
|
|
172
|
+
description: This gem allows you to generate a m1key.me-style gallery based on the JPG files in the working directory.
|
|
124
173
|
email:
|
|
125
|
-
- REDACTED
|
|
174
|
+
- REDACTED
|
|
126
175
|
executables: []
|
|
127
176
|
extensions: []
|
|
128
177
|
extra_rdoc_files: []
|
|
129
178
|
files:
|
|
130
|
-
-
|
|
131
|
-
-
|
|
132
|
-
-
|
|
133
|
-
-
|
|
134
|
-
-
|
|
135
|
-
-
|
|
136
|
-
-
|
|
137
|
-
-
|
|
138
|
-
-
|
|
139
|
-
- lib/m1key_gallery_generator.rb
|
|
140
|
-
- lib/m1key_gallery_generator/
|
|
141
|
-
- lib/m1key_gallery_generator/
|
|
142
|
-
- lib/m1key_gallery_generator/
|
|
143
|
-
- lib/m1key_gallery_generator/
|
|
144
|
-
- lib/m1key_gallery_generator/
|
|
145
|
-
- lib/m1key_gallery_generator/
|
|
146
|
-
- lib/m1key_gallery_generator/
|
|
147
|
-
-
|
|
148
|
-
|
|
149
|
-
- lib/m1key_gallery_generator/viewable_photo_metadata.rb
|
|
150
|
-
- m1key_gallery_generator.gemspec
|
|
151
|
-
homepage: https://github.com/m1key/m1key_gallery_generator
|
|
179
|
+
- Gemfile
|
|
180
|
+
- LICENSE.txt
|
|
181
|
+
- README.md
|
|
182
|
+
- Rakefile
|
|
183
|
+
- bin/console
|
|
184
|
+
- bin/setup
|
|
185
|
+
- lib/m1key_gallery_generator.rb
|
|
186
|
+
- lib/m1key_gallery_generator/console_utils.rb
|
|
187
|
+
- lib/m1key_gallery_generator/gallery_config.rb
|
|
188
|
+
- lib/m1key_gallery_generator/gallery_mutators.rb
|
|
189
|
+
- lib/m1key_gallery_generator/photos_utils.rb
|
|
190
|
+
- lib/m1key_gallery_generator/string_utils.rb
|
|
191
|
+
- lib/m1key_gallery_generator/template.erb
|
|
192
|
+
- lib/m1key_gallery_generator/version.rb
|
|
193
|
+
- lib/m1key_gallery_generator/viewable_gallery.rb
|
|
194
|
+
- lib/m1key_gallery_generator/viewable_photo.rb
|
|
195
|
+
- lib/m1key_gallery_generator/viewable_photo_metadata.rb
|
|
196
|
+
- m1key_gallery_generator.gemspec
|
|
197
|
+
homepage: "https://github.com/m1key/m1key_gallery_generator"
|
|
152
198
|
licenses:
|
|
153
|
-
- MIT
|
|
199
|
+
- MIT
|
|
154
200
|
metadata:
|
|
155
|
-
allowed_push_host: https://rubygems.org
|
|
201
|
+
allowed_push_host: "https://rubygems.org"
|
|
156
202
|
rdoc_options: []
|
|
157
203
|
require_paths:
|
|
158
|
-
- lib
|
|
204
|
+
- lib
|
|
159
205
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
160
206
|
requirements:
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
207
|
+
-
|
|
208
|
+
- ">="
|
|
209
|
+
- !ruby/object:Gem::Version
|
|
210
|
+
version: "4.0"
|
|
164
211
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
165
212
|
requirements:
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
213
|
+
-
|
|
214
|
+
- ">="
|
|
215
|
+
- !ruby/object:Gem::Version
|
|
216
|
+
version: "0"
|
|
169
217
|
requirements: []
|
|
170
|
-
rubygems_version:
|
|
218
|
+
rubygems_version: 4.1.0
|
|
171
219
|
specification_version: 4
|
|
172
220
|
summary: m1key.me-style gallery generator.
|
|
173
221
|
test_files: []
|
data/.github/workflows/ruby.yml
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# This workflow uses actions that are not certified by GitHub.
|
|
2
|
-
# They are provided by a third-party and are governed by
|
|
3
|
-
# separate terms of service, privacy policy, and support
|
|
4
|
-
# documentation.
|
|
5
|
-
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
|
6
|
-
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
|
7
|
-
|
|
8
|
-
name: Ruby
|
|
9
|
-
|
|
10
|
-
on:
|
|
11
|
-
push:
|
|
12
|
-
branches: [ "master" ]
|
|
13
|
-
pull_request:
|
|
14
|
-
branches: [ "master" ]
|
|
15
|
-
|
|
16
|
-
permissions:
|
|
17
|
-
contents: read
|
|
18
|
-
|
|
19
|
-
jobs:
|
|
20
|
-
test:
|
|
21
|
-
|
|
22
|
-
runs-on: ubuntu-latest
|
|
23
|
-
strategy:
|
|
24
|
-
matrix:
|
|
25
|
-
ruby-version: ['3.2.2']
|
|
26
|
-
|
|
27
|
-
steps:
|
|
28
|
-
- uses: actions/checkout@v4
|
|
29
|
-
- name: Set up Ruby
|
|
30
|
-
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
|
31
|
-
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
|
32
|
-
uses: ruby/setup-ruby@v1
|
|
33
|
-
# uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
|
|
34
|
-
with:
|
|
35
|
-
ruby-version: ${{ matrix.ruby-version }}
|
|
36
|
-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
|
37
|
-
- name: Run tests
|
|
38
|
-
run: bundle exec rake
|
data/.gitignore
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
index.html
|
|
2
|
-
uzbekistan*
|
|
3
|
-
*.gem
|
|
4
|
-
*.rbc
|
|
5
|
-
/.config
|
|
6
|
-
/coverage/
|
|
7
|
-
/InstalledFiles
|
|
8
|
-
/pkg/
|
|
9
|
-
/spec/reports/
|
|
10
|
-
/test/tmp/
|
|
11
|
-
/test/version_tmp/
|
|
12
|
-
/tmp/
|
|
13
|
-
.idea
|
|
14
|
-
*.iml
|
|
15
|
-
.rakeTasks
|
|
16
|
-
vendor
|
|
17
|
-
|
|
18
|
-
## Specific to RubyMotion:
|
|
19
|
-
.dat*
|
|
20
|
-
.repl_history
|
|
21
|
-
build/
|
|
22
|
-
|
|
23
|
-
## Documentation cache and generated files:
|
|
24
|
-
/.yardoc/
|
|
25
|
-
/_yardoc/
|
|
26
|
-
/doc/
|
|
27
|
-
/rdoc/
|
|
28
|
-
|
|
29
|
-
## Environment normalisation:
|
|
30
|
-
/.bundle/
|
|
31
|
-
/lib/bundler/man/
|
|
32
|
-
|
|
33
|
-
Gemfile.lock
|
|
34
|
-
.ruby-version
|
|
35
|
-
.ruby-gemset
|
|
36
|
-
|
|
37
|
-
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
|
38
|
-
.rvmrc
|
data/.rspec
DELETED