nesta 0.16.0 → 0.17.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 +24 -0
- data/Gemfile.lock +40 -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/version.rb +1 -1
- data/nesta.gemspec +2 -2
- data/test/integration/default_theme_test.rb +2 -2
- data/views/master.sass +5 -3
- data/views/mixins.sass +6 -4
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32a4c40ea41ed81170227708f4fa21efd9ecdc78b13aae276a28b71f70edbb8b
|
4
|
+
data.tar.gz: 7b437529392e034f4f2c9fe7b6df915faae5a284958ebd181aabb71462279106
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51d4278434f049e7d2c67107a947960c1407bdf4b1c133da575e5f4a829f7a25d1d0c4ef16dac399ffbc25b1fa708b8f2b7787b7a9a6171f9dd60414522a7c08
|
7
|
+
data.tar.gz: 791f6ea80a7b87b915548d6ee6688ff3eeb187bce03a77bf7fb6811645712f285880be77c763f1b947efc06f0eb5cdf1ed6b8734b9aa411f0e75a491d0c9ed76
|
data/.github/workflows/tests.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,29 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.17.0 (6 November 2024)
|
4
|
+
|
5
|
+
* Update Sinatra to verion 4.0, to fix a vulnerability. This has also
|
6
|
+
required a jump to Rack 3. (Graham Ashton)
|
7
|
+
|
8
|
+
* Update Sass parser to sass-embedded 1.80, which (due to changes in CSS 4)
|
9
|
+
deprecates the global colour functions and the @import statement. Any Sass
|
10
|
+
code that uses these features will need updating before Dart Sass 3.0 is
|
11
|
+
released. The Sass maintainers are saying we've got about two years.
|
12
|
+
|
13
|
+
In the meantime Sass will print deprecation warnings, some of which give
|
14
|
+
hints on how you might update your code.
|
15
|
+
|
16
|
+
See the Nesta commit history for an example of the kind of changes that are
|
17
|
+
required, and these pages for more details:
|
18
|
+
|
19
|
+
- https://sass-lang.com/documentation/breaking-changes/color-functions/
|
20
|
+
- https://sass-lang.com/documentation/breaking-changes/import/
|
21
|
+
|
22
|
+
This update has also forced us to drop support for Ruby 3.0, which is no
|
23
|
+
longer supported by the sass-embedded gem.
|
24
|
+
|
25
|
+
(Graham Ashton)
|
26
|
+
|
3
27
|
## 0.16.0 (11 April 2024)
|
4
28
|
|
5
29
|
* Update Google Analytics JS code to GA4. (Matthew Bass)
|
data/Gemfile.lock
CHANGED
@@ -1,25 +1,27 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
nesta (0.
|
4
|
+
nesta (0.17.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,10 @@ GEM
|
|
40
44
|
rb-fsevent (>= 0.9.3)
|
41
45
|
rb-inotify (>= 0.9)
|
42
46
|
rb-kqueue (>= 0.2)
|
43
|
-
mini_mime (1.1.
|
44
|
-
mini_portile2 (2.8.
|
45
|
-
minitest (5.
|
46
|
-
minitest-reporters (1.
|
47
|
+
mini_mime (1.1.5)
|
48
|
+
mini_portile2 (2.8.7)
|
49
|
+
minitest (5.25.1)
|
50
|
+
minitest-reporters (1.7.1)
|
47
51
|
ansi
|
48
52
|
builder
|
49
53
|
minitest (>= 5.0)
|
@@ -53,38 +57,42 @@ GEM
|
|
53
57
|
rb-fsevent (>= 0.9)
|
54
58
|
rb-inotify (>= 0.8)
|
55
59
|
unicorn (>= 4.5)
|
56
|
-
mustermann (3.0.
|
60
|
+
mustermann (3.0.3)
|
57
61
|
ruby2_keywords (~> 0.0.1)
|
58
|
-
nokogiri (1.16.
|
62
|
+
nokogiri (1.16.7)
|
59
63
|
mini_portile2 (~> 2.8.2)
|
60
64
|
racc (~> 1.4)
|
61
|
-
public_suffix (
|
62
|
-
racc (1.
|
63
|
-
rack (
|
64
|
-
rack-protection (
|
65
|
-
|
66
|
-
|
65
|
+
public_suffix (6.0.1)
|
66
|
+
racc (1.8.1)
|
67
|
+
rack (3.1.8)
|
68
|
+
rack-protection (4.0.0)
|
69
|
+
base64 (>= 0.1.0)
|
70
|
+
rack (>= 3.0.0, < 4)
|
71
|
+
rack-session (2.0.0)
|
72
|
+
rack (>= 3.0.0)
|
73
|
+
rack-test (2.1.0)
|
67
74
|
rack (>= 1.3)
|
68
75
|
raindrops (0.20.1)
|
69
|
-
rake (13.
|
76
|
+
rake (13.2.1)
|
70
77
|
rb-fsevent (0.11.2)
|
71
|
-
rb-inotify (0.
|
78
|
+
rb-inotify (0.11.1)
|
72
79
|
ffi (~> 1.0)
|
73
80
|
rb-kqueue (0.2.8)
|
74
81
|
ffi (>= 0.5.0)
|
75
|
-
rdiscount (2.2.7)
|
82
|
+
rdiscount (2.2.7.3)
|
76
83
|
ruby-progressbar (1.13.0)
|
77
84
|
ruby2_keywords (0.0.5)
|
78
|
-
sass-embedded (1.
|
79
|
-
google-protobuf (~>
|
80
|
-
rake (>=
|
81
|
-
sinatra (
|
85
|
+
sass-embedded (1.80.6)
|
86
|
+
google-protobuf (~> 4.28)
|
87
|
+
rake (>= 13)
|
88
|
+
sinatra (4.0.0)
|
82
89
|
mustermann (~> 3.0)
|
83
|
-
rack (
|
84
|
-
rack-protection (=
|
90
|
+
rack (>= 3.0.0, < 4)
|
91
|
+
rack-protection (= 4.0.0)
|
92
|
+
rack-session (>= 2.0.0, < 3)
|
85
93
|
tilt (~> 2.0)
|
86
|
-
temple (0.10.
|
87
|
-
tilt (2.
|
94
|
+
temple (0.10.3)
|
95
|
+
tilt (2.4.0)
|
88
96
|
unicorn (6.1.0)
|
89
97
|
kgio (~> 2.6)
|
90
98
|
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/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
|
@@ -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
|
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,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nesta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Graham Ashton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: haml
|
@@ -50,14 +50,14 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
53
|
+
version: '3'
|
54
54
|
type: :runtime
|
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: '
|
60
|
+
version: '3'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: rake
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,14 +120,14 @@ dependencies:
|
|
120
120
|
requirements:
|
121
121
|
- - "~>"
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: '
|
123
|
+
version: '4.0'
|
124
124
|
type: :runtime
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
128
|
- - "~>"
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: '
|
130
|
+
version: '4.0'
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
132
|
name: tilt
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|
@@ -369,7 +369,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
369
369
|
- !ruby/object:Gem::Version
|
370
370
|
version: '0'
|
371
371
|
requirements: []
|
372
|
-
rubygems_version: 3.5.
|
372
|
+
rubygems_version: 3.5.20
|
373
373
|
signing_key:
|
374
374
|
specification_version: 4
|
375
375
|
summary: Ruby CMS, written in Sinatra
|