nesta 0.16.0 → 0.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/tests.yml +1 -1
- data/CHANGELOG.md +34 -0
- data/Gemfile +0 -2
- data/Gemfile.lock +43 -32
- data/README.md +9 -13
- data/lib/nesta/commands/plugin/create.rb +4 -4
- data/lib/nesta/config_file.rb +2 -2
- data/lib/nesta/helpers.rb +2 -2
- data/lib/nesta/models/menu.rb +1 -1
- data/lib/nesta/static/site.rb +2 -2
- data/lib/nesta/version.rb +1 -1
- data/nesta.gemspec +2 -2
- data/templates/Gemfile +1 -3
- data/test/integration/default_theme_test.rb +2 -2
- data/test/support/temporary_files.rb +4 -1
- data/views/master.sass +5 -3
- data/views/mixins.sass +6 -4
- metadata +7 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12864a6defdd473b703fe553e3693bf1f697054ac2765fd7f22464f6525e5867
|
4
|
+
data.tar.gz: 1a3bfcb203d9862a10ef9691286187ef2c91f3c880bd56bea99f8f34ab0f83a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee6c78cb3046d5f93eb2dacb76107e173a51ad18d422e6195691a3fab70eac946704d984b0262febaaa69c688af761805678d67c9eedff60e992f3f56ce9c9c7
|
7
|
+
data.tar.gz: c410d3cdb2504abbd3d55b83a2799638a12d7806db20798ef00813d5fe630750f5ea74828d3b457c719fd2db822d284e3270351834a070aaf14400c1db44dfd1
|
data/.github/workflows/tests.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,39 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.18.0 (19 November 2024)
|
4
|
+
|
5
|
+
* Update Sinatra to 4.1, to fix a vulnerability.
|
6
|
+
|
7
|
+
Note that this is the same security alert that I believed I was fixing when I
|
8
|
+
released Nesta 0.17.0. In actual fact, at that point the latest version of
|
9
|
+
Sinatra (4.0.0) didn't yet include a fix.
|
10
|
+
|
11
|
+
(Graham Ashton)
|
12
|
+
|
13
|
+
## 0.17.0 (6 November 2024)
|
14
|
+
|
15
|
+
* Update Sinatra to verion 4.0, to fix a vulnerability. This has also
|
16
|
+
required a jump to Rack 3. (Graham Ashton)
|
17
|
+
|
18
|
+
* Update Sass parser to sass-embedded 1.80, which (due to changes in CSS 4)
|
19
|
+
deprecates the global colour functions and the @import statement. Any Sass
|
20
|
+
code that uses these features will need updating before Dart Sass 3.0 is
|
21
|
+
released. The Sass maintainers are saying we've got about two years.
|
22
|
+
|
23
|
+
In the meantime Sass will print deprecation warnings, some of which give
|
24
|
+
hints on how you might update your code.
|
25
|
+
|
26
|
+
See the Nesta commit history for an example of the kind of changes that are
|
27
|
+
required, and these pages for more details:
|
28
|
+
|
29
|
+
- https://sass-lang.com/documentation/breaking-changes/color-functions/
|
30
|
+
- https://sass-lang.com/documentation/breaking-changes/import/
|
31
|
+
|
32
|
+
This update has also forced us to drop support for Ruby 3.0, which is no
|
33
|
+
longer supported by the sass-embedded gem.
|
34
|
+
|
35
|
+
(Graham Ashton)
|
36
|
+
|
3
37
|
## 0.16.0 (11 April 2024)
|
4
38
|
|
5
39
|
* Update Google Analytics JS code to GA4. (Matthew Bass)
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,25 +1,27 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
nesta (0.
|
4
|
+
nesta (0.18.0)
|
5
5
|
RedCloth (~> 4.2)
|
6
6
|
haml (>= 3.1, < 6.0)
|
7
7
|
haml-contrib (>= 1.0)
|
8
|
-
rack (~>
|
8
|
+
rack (~> 3)
|
9
9
|
rake
|
10
10
|
rdiscount (~> 2.1)
|
11
11
|
sass-embedded (~> 1.58)
|
12
|
-
sinatra (~>
|
12
|
+
sinatra (~> 4.0)
|
13
13
|
tilt (~> 2.1)
|
14
14
|
|
15
15
|
GEM
|
16
16
|
remote: https://rubygems.org/
|
17
17
|
specs:
|
18
|
-
RedCloth (4.3.
|
19
|
-
addressable (2.8.
|
20
|
-
public_suffix (>= 2.0.2, <
|
18
|
+
RedCloth (4.3.4)
|
19
|
+
addressable (2.8.7)
|
20
|
+
public_suffix (>= 2.0.2, < 7.0)
|
21
21
|
ansi (1.5.0)
|
22
|
-
|
22
|
+
base64 (0.2.0)
|
23
|
+
bigdecimal (3.1.8)
|
24
|
+
builder (3.3.0)
|
23
25
|
byebug (11.1.3)
|
24
26
|
capybara (2.18.0)
|
25
27
|
addressable
|
@@ -28,8 +30,10 @@ GEM
|
|
28
30
|
rack (>= 1.0.0)
|
29
31
|
rack-test (>= 0.5.4)
|
30
32
|
xpath (>= 2.0, < 4.0)
|
31
|
-
ffi (1.
|
32
|
-
google-protobuf (
|
33
|
+
ffi (1.17.0)
|
34
|
+
google-protobuf (4.28.3)
|
35
|
+
bigdecimal
|
36
|
+
rake (>= 13)
|
33
37
|
haml (5.2.2)
|
34
38
|
temple (>= 0.8.0)
|
35
39
|
tilt
|
@@ -40,10 +44,11 @@ GEM
|
|
40
44
|
rb-fsevent (>= 0.9.3)
|
41
45
|
rb-inotify (>= 0.9)
|
42
46
|
rb-kqueue (>= 0.2)
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
minitest
|
47
|
+
logger (1.6.1)
|
48
|
+
mini_mime (1.1.5)
|
49
|
+
mini_portile2 (2.8.7)
|
50
|
+
minitest (5.25.1)
|
51
|
+
minitest-reporters (1.7.1)
|
47
52
|
ansi
|
48
53
|
builder
|
49
54
|
minitest (>= 5.0)
|
@@ -53,38 +58,44 @@ GEM
|
|
53
58
|
rb-fsevent (>= 0.9)
|
54
59
|
rb-inotify (>= 0.8)
|
55
60
|
unicorn (>= 4.5)
|
56
|
-
mustermann (3.0.
|
61
|
+
mustermann (3.0.3)
|
57
62
|
ruby2_keywords (~> 0.0.1)
|
58
|
-
nokogiri (1.16.
|
63
|
+
nokogiri (1.16.7)
|
59
64
|
mini_portile2 (~> 2.8.2)
|
60
65
|
racc (~> 1.4)
|
61
|
-
public_suffix (
|
62
|
-
racc (1.
|
63
|
-
rack (
|
64
|
-
rack-protection (
|
65
|
-
|
66
|
-
|
66
|
+
public_suffix (6.0.1)
|
67
|
+
racc (1.8.1)
|
68
|
+
rack (3.1.8)
|
69
|
+
rack-protection (4.1.0)
|
70
|
+
base64 (>= 0.1.0)
|
71
|
+
logger (>= 1.6.0)
|
72
|
+
rack (>= 3.0.0, < 4)
|
73
|
+
rack-session (2.0.0)
|
74
|
+
rack (>= 3.0.0)
|
75
|
+
rack-test (2.1.0)
|
67
76
|
rack (>= 1.3)
|
68
77
|
raindrops (0.20.1)
|
69
|
-
rake (13.
|
78
|
+
rake (13.2.1)
|
70
79
|
rb-fsevent (0.11.2)
|
71
|
-
rb-inotify (0.
|
80
|
+
rb-inotify (0.11.1)
|
72
81
|
ffi (~> 1.0)
|
73
82
|
rb-kqueue (0.2.8)
|
74
83
|
ffi (>= 0.5.0)
|
75
|
-
rdiscount (2.2.7)
|
84
|
+
rdiscount (2.2.7.3)
|
76
85
|
ruby-progressbar (1.13.0)
|
77
86
|
ruby2_keywords (0.0.5)
|
78
|
-
sass-embedded (1.
|
79
|
-
google-protobuf (~>
|
80
|
-
rake (>=
|
81
|
-
sinatra (
|
87
|
+
sass-embedded (1.80.6)
|
88
|
+
google-protobuf (~> 4.28)
|
89
|
+
rake (>= 13)
|
90
|
+
sinatra (4.1.0)
|
91
|
+
logger (>= 1.6.0)
|
82
92
|
mustermann (~> 3.0)
|
83
|
-
rack (
|
84
|
-
rack-protection (=
|
93
|
+
rack (>= 3.0.0, < 4)
|
94
|
+
rack-protection (= 4.1.0)
|
95
|
+
rack-session (>= 2.0.0, < 3)
|
85
96
|
tilt (~> 2.0)
|
86
|
-
temple (0.10.
|
87
|
-
tilt (2.
|
97
|
+
temple (0.10.3)
|
98
|
+
tilt (2.4.0)
|
88
99
|
unicorn (6.1.0)
|
89
100
|
kgio (~> 2.6)
|
90
101
|
raindrops (~> 0.7)
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# File Based CMS and Static Site Generator
|
2
2
|
|
3
3
|
Nesta is a lightweight CMS for building content sites and blogs, written in
|
4
4
|
[Sinatra].
|
@@ -54,27 +54,23 @@ your site:
|
|
54
54
|
## Support
|
55
55
|
|
56
56
|
There's plenty of information on <http://nestacms.com>. If you need some
|
57
|
-
help with anything feel free to file an issue, or contact me on Mastodon
|
58
|
-
([@gma@hachyderm.io])
|
59
|
-
|
60
|
-
If you like Nesta you can keep up with developments by following [@nestacms]
|
61
|
-
on Twitter, and on [the blog].
|
57
|
+
help with anything feel free to [file an issue], or contact me on Mastodon
|
58
|
+
([@gma@hachyderm.io]).
|
62
59
|
|
60
|
+
[file an issue]: https://github.com/gma/nesta/issues/new
|
63
61
|
[@gma@hachyderm.io]: https://hachyderm.io/@gma
|
64
|
-
[@grahamashton]: https://twitter.com/grahamashton
|
65
|
-
[@nestacms]: https://twitter.com/nestacms
|
66
62
|
[the blog]: https://nestacms.com/blog
|
67
63
|
|
68
64
|
![Tests](https://github.com/gma/nesta/actions/workflows/tests.yml/badge.svg)
|
69
65
|
|
70
66
|
## Contributing
|
71
67
|
|
72
|
-
If you want to add a new feature,
|
73
|
-
you start coding. I might
|
74
|
-
|
75
|
-
|
68
|
+
If you want to add a new feature, consider [creating an issue] so we can
|
69
|
+
have a chat before you start coding. I might be able to chip in with ideas on
|
70
|
+
how to approach it, or suggest that we implement it as a [plugin] (to keep Nesta
|
71
|
+
itself lean and simple).
|
76
72
|
|
77
|
-
[
|
73
|
+
[creating an issue]: https://github.com/gma/nesta/issues/new
|
78
74
|
[plugin]: https://nestacms.com/docs/plugins
|
79
75
|
|
80
76
|
-- Graham
|
@@ -35,11 +35,11 @@ module Nesta
|
|
35
35
|
indent_levels << indent_level
|
36
36
|
end
|
37
37
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
end
|
38
|
+
code = []
|
39
|
+
lines.each_with_index do |line, i|
|
40
|
+
code << ' ' * (indent_levels[i] + 2) + line
|
42
41
|
end
|
42
|
+
code.join("\n")
|
43
43
|
end
|
44
44
|
|
45
45
|
def make_directories
|
data/lib/nesta/config_file.rb
CHANGED
@@ -10,7 +10,7 @@ module Nesta
|
|
10
10
|
|
11
11
|
configured = false
|
12
12
|
File.open(self.class.path, 'r+') do |file|
|
13
|
-
output =
|
13
|
+
output = []
|
14
14
|
file.each_line do |line|
|
15
15
|
if configured
|
16
16
|
output << line
|
@@ -21,7 +21,7 @@ module Nesta
|
|
21
21
|
end
|
22
22
|
output << "#{replacement}\n" unless configured
|
23
23
|
file.pos = 0
|
24
|
-
file.print(output)
|
24
|
+
file.print(output.join("\n"))
|
25
25
|
file.truncate(file.pos)
|
26
26
|
end
|
27
27
|
end
|
data/lib/nesta/helpers.rb
CHANGED
@@ -90,7 +90,7 @@ module Nesta
|
|
90
90
|
# path_to(page.abspath, uri: true)
|
91
91
|
#
|
92
92
|
def path_to(page_path, options = {})
|
93
|
-
host =
|
93
|
+
host = []
|
94
94
|
if options[:uri]
|
95
95
|
host << "http#{'s' if request.ssl?}://"
|
96
96
|
if (request.env.include?("HTTP_X_FORWARDED_HOST") or
|
@@ -100,7 +100,7 @@ module Nesta
|
|
100
100
|
host << request.host
|
101
101
|
end
|
102
102
|
end
|
103
|
-
uri_parts = [host]
|
103
|
+
uri_parts = [host.join('')]
|
104
104
|
uri_parts << request.script_name.to_s if request.script_name
|
105
105
|
uri_parts << page_path
|
106
106
|
File.join(uri_parts)
|
data/lib/nesta/models/menu.rb
CHANGED
data/lib/nesta/static/site.rb
CHANGED
@@ -61,8 +61,8 @@ module Nesta
|
|
61
61
|
|
62
62
|
def set_app_root
|
63
63
|
root = ::File.expand_path('.')
|
64
|
-
['Gemfile', ].each do |expected|
|
65
|
-
if ! File.exist?(File.join(root,
|
64
|
+
['Gemfile', File.join('config', 'config.yml')].each do |expected|
|
65
|
+
if ! File.exist?(File.join(root, expected))
|
66
66
|
message = "is this a Nesta site? (expected './#{expected}')"
|
67
67
|
raise RuntimeError, message
|
68
68
|
end
|
data/lib/nesta/version.rb
CHANGED
data/nesta.gemspec
CHANGED
@@ -31,12 +31,12 @@ EOF
|
|
31
31
|
|
32
32
|
s.add_dependency('haml', '>= 3.1', '< 6.0')
|
33
33
|
s.add_dependency('haml-contrib', '>= 1.0')
|
34
|
-
s.add_dependency('rack', '~>
|
34
|
+
s.add_dependency('rack', '~> 3')
|
35
35
|
s.add_dependency('rake')
|
36
36
|
s.add_dependency('rdiscount', '~> 2.1')
|
37
37
|
s.add_dependency('RedCloth', '~> 4.2')
|
38
38
|
s.add_dependency('sass-embedded', '~> 1.58')
|
39
|
-
s.add_dependency('sinatra', '~>
|
39
|
+
s.add_dependency('sinatra', '~> 4.0')
|
40
40
|
s.add_dependency('tilt', '~> 2.1')
|
41
41
|
|
42
42
|
# Useful in development
|
data/templates/Gemfile
CHANGED
@@ -86,7 +86,7 @@ describe 'Default theme' do
|
|
86
86
|
with_temp_content_directory do
|
87
87
|
model = create_page_and_menu
|
88
88
|
visit model.path
|
89
|
-
assert_has_css "ul.menu li
|
89
|
+
assert_has_css "ul.menu li.current:contains('#{model.link_text}')"
|
90
90
|
end
|
91
91
|
end
|
92
92
|
|
@@ -100,7 +100,7 @@ describe 'Default theme' do
|
|
100
100
|
with_temp_content_directory do
|
101
101
|
model = create_page_and_menu
|
102
102
|
visit "/prefix/#{model.path}"
|
103
|
-
assert_has_css "ul.menu li
|
103
|
+
assert_has_css "ul.menu li.current:contains('#{model.link_text}')"
|
104
104
|
end
|
105
105
|
end
|
106
106
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
|
1
3
|
module TemporaryFiles
|
2
4
|
TEMP_DIR = File.expand_path('tmp', File.join(File.dirname(__FILE__), '..'))
|
3
5
|
|
@@ -21,7 +23,8 @@ module TemporaryFiles
|
|
21
23
|
|
22
24
|
def in_temporary_project(*args, &block)
|
23
25
|
FileUtils.mkdir_p(File.join(project_root, 'config'))
|
24
|
-
|
26
|
+
FileUtils.touch(File.join(project_root, 'Gemfile'))
|
27
|
+
FileUtils.touch(File.join(project_root, 'config', 'config.yml'))
|
25
28
|
Dir.chdir(project_root) { yield project_root }
|
26
29
|
ensure
|
27
30
|
remove_temp_directory
|
data/views/master.sass
CHANGED
@@ -1,5 +1,7 @@
|
|
1
|
-
@
|
2
|
-
|
1
|
+
@use "sass:color"
|
2
|
+
|
3
|
+
@use "mixins" as *
|
4
|
+
@use "normalize"
|
3
5
|
|
4
6
|
body
|
5
7
|
font: $size1 "Roboto Slab", serif
|
@@ -74,7 +76,7 @@ blockquote
|
|
74
76
|
border-left: 5px solid $tint
|
75
77
|
|
76
78
|
font-style: italic
|
77
|
-
color: adjust
|
79
|
+
color: color.adjust($base-color, $red: 55, $green: 55, $blue: 55)
|
78
80
|
|
79
81
|
pre
|
80
82
|
display: block
|
data/views/mixins.sass
CHANGED
@@ -12,14 +12,16 @@ $vertical-margin: 1.5em
|
|
12
12
|
|
13
13
|
// Colour settings
|
14
14
|
|
15
|
+
@use "sass:color"
|
16
|
+
|
15
17
|
$base-color: #313126
|
16
18
|
$tint: #EEEEC6
|
17
19
|
$border-color: #D7C28B
|
18
20
|
$link-color: #4786fd
|
19
|
-
$visited-link-color:
|
20
|
-
$hover-link-color:
|
21
|
-
$active-link-color:
|
22
|
-
$nav-link-color:
|
21
|
+
$visited-link-color: color.adjust($link-color, $lightness: -5%)
|
22
|
+
$hover-link-color: color.adjust($link-color, $lightness: -15%)
|
23
|
+
$active-link-color: color.adjust($link-color, $lightness: -20%)
|
24
|
+
$nav-link-color: color.scale(color.adjust($link-color, $lightness: 10%), $saturation: -25%)
|
23
25
|
$meta-color: #87877D
|
24
26
|
|
25
27
|
@function empx($em, $base: 16px)
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nesta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Graham Ashton
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date: 2024-
|
10
|
+
date: 2024-11-19 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: haml
|
@@ -50,14 +49,14 @@ dependencies:
|
|
50
49
|
requirements:
|
51
50
|
- - "~>"
|
52
51
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
52
|
+
version: '3'
|
54
53
|
type: :runtime
|
55
54
|
prerelease: false
|
56
55
|
version_requirements: !ruby/object:Gem::Requirement
|
57
56
|
requirements:
|
58
57
|
- - "~>"
|
59
58
|
- !ruby/object:Gem::Version
|
60
|
-
version: '
|
59
|
+
version: '3'
|
61
60
|
- !ruby/object:Gem::Dependency
|
62
61
|
name: rake
|
63
62
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,14 +119,14 @@ dependencies:
|
|
120
119
|
requirements:
|
121
120
|
- - "~>"
|
122
121
|
- !ruby/object:Gem::Version
|
123
|
-
version: '
|
122
|
+
version: '4.0'
|
124
123
|
type: :runtime
|
125
124
|
prerelease: false
|
126
125
|
version_requirements: !ruby/object:Gem::Requirement
|
127
126
|
requirements:
|
128
127
|
- - "~>"
|
129
128
|
- !ruby/object:Gem::Version
|
130
|
-
version: '
|
129
|
+
version: '4.0'
|
131
130
|
- !ruby/object:Gem::Dependency
|
132
131
|
name: tilt
|
133
132
|
requirement: !ruby/object:Gem::Requirement
|
@@ -354,7 +353,6 @@ files:
|
|
354
353
|
homepage: https://nestacms.com
|
355
354
|
licenses: []
|
356
355
|
metadata: {}
|
357
|
-
post_install_message:
|
358
356
|
rdoc_options: []
|
359
357
|
require_paths:
|
360
358
|
- lib
|
@@ -369,8 +367,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
369
367
|
- !ruby/object:Gem::Version
|
370
368
|
version: '0'
|
371
369
|
requirements: []
|
372
|
-
rubygems_version: 3.
|
373
|
-
signing_key:
|
370
|
+
rubygems_version: 3.6.0.dev
|
374
371
|
specification_version: 4
|
375
372
|
summary: Ruby CMS, written in Sinatra
|
376
373
|
test_files: []
|