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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f57754ef13ef4b4533c03ab454b2114fb35d3e168d20107c1fb39941d6af4b92
4
- data.tar.gz: 9aa4a9b8e0715d77c1ec515a114f63827e8a117e1f3b807755a59d0c0eba0c45
3
+ metadata.gz: 32a4c40ea41ed81170227708f4fa21efd9ecdc78b13aae276a28b71f70edbb8b
4
+ data.tar.gz: 7b437529392e034f4f2c9fe7b6df915faae5a284958ebd181aabb71462279106
5
5
  SHA512:
6
- metadata.gz: effa2dcecf9d3ed0de395102c893d9f1571171b4bc4d63968911f3538c27bd8ef15692df2586239e2986d1b32e4bd4ef23513245c2cd89d0d159df3d9bf79903
7
- data.tar.gz: c0f318224b4f70322af4d30b55e517b1d790b3087129eb0601d434eabf79cc65e3b8ae24262f7300812a0414dd5402d2969d0f11be1f5d0516afe1ad7474d27c
6
+ metadata.gz: 51d4278434f049e7d2c67107a947960c1407bdf4b1c133da575e5f4a829f7a25d1d0c4ef16dac399ffbc25b1fa708b8f2b7787b7a9a6171f9dd60414522a7c08
7
+ data.tar.gz: 791f6ea80a7b87b915548d6ee6688ff3eeb187bce03a77bf7fb6811645712f285880be77c763f1b947efc06f0eb5cdf1ed6b8734b9aa411f0e75a491d0c9ed76
@@ -8,7 +8,7 @@ jobs:
8
8
  strategy:
9
9
  fail-fast: false
10
10
  matrix:
11
- ruby: ["3.0", "3.1", "3.2", "3.3"]
11
+ ruby: ["3.1", "3.2", "3.3", "head"]
12
12
  runs-on: ubuntu-latest
13
13
  steps:
14
14
  - uses: actions/checkout@v4
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.16.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 (~> 2)
8
+ rack (~> 3)
9
9
  rake
10
10
  rdiscount (~> 2.1)
11
11
  sass-embedded (~> 1.58)
12
- sinatra (~> 3.1)
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.3)
19
- addressable (2.8.1)
20
- public_suffix (>= 2.0.2, < 6.0)
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
- builder (3.2.4)
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.15.5)
32
- google-protobuf (3.22.2)
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.2)
44
- mini_portile2 (2.8.5)
45
- minitest (5.18.0)
46
- minitest-reporters (1.6.0)
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.0)
60
+ mustermann (3.0.3)
57
61
  ruby2_keywords (~> 0.0.1)
58
- nokogiri (1.16.2)
62
+ nokogiri (1.16.7)
59
63
  mini_portile2 (~> 2.8.2)
60
64
  racc (~> 1.4)
61
- public_suffix (5.0.1)
62
- racc (1.7.3)
63
- rack (2.2.8.1)
64
- rack-protection (3.1.0)
65
- rack (~> 2.2, >= 2.2.4)
66
- rack-test (2.0.2)
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.0.6)
76
+ rake (13.2.1)
70
77
  rb-fsevent (0.11.2)
71
- rb-inotify (0.10.1)
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.58.3)
79
- google-protobuf (~> 3.21)
80
- rake (>= 10.0.0)
81
- sinatra (3.1.0)
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 (~> 2.2, >= 2.2.4)
84
- rack-protection (= 3.1.0)
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.0)
87
- tilt (2.1.0)
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
- # Lightweight file-based CMS and Static Site Generator
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]) or Twitter ([@grahamashton]).
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, please [create an issue] to discuss it before
73
- you start coding. I might suggest that we implement it as a [plugin] (to keep
74
- Nesta itself lean and simple), or be able to chip in with ideas on how to
75
- approach it.
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
- [create an issue]: https://github.com/gma/nesta/issues/new
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
- ''.tap do |code|
39
- lines.each_with_index do |line, i|
40
- code << ' ' * (indent_levels[i] + 2) + line
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
@@ -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)
@@ -16,7 +16,7 @@ module Nesta
16
16
  end
17
17
 
18
18
  def self.for_path(path)
19
- path.sub!(Regexp.new('^/'), '')
19
+ path = path.sub(Regexp.new('^/'), '')
20
20
  if path.empty?
21
21
  full_menu
22
22
  else
data/lib/nesta/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Nesta
2
- VERSION = '0.16.0'
2
+ VERSION = '0.17.0'
3
3
  end
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', '~> 2')
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', '~> 3.1')
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[class='current']:contains('#{model.link_text}')"
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[class='current']:contains('#{model.link_text}')"
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
- @import "mixins.sass"
2
- @import "normalize"
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-color($base-color, $red: 55, $green: 55, $blue: 55)
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: darken($link-color, 5%)
20
- $hover-link-color: darken($link-color, 15%)
21
- $active-link-color: darken($link-color, 20%)
22
- $nav-link-color: desaturate(lighten($link-color, 10%), 25%)
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.16.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-04-11 00:00:00.000000000 Z
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: '2'
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: '2'
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: '3.1'
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: '3.1'
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.3
372
+ rubygems_version: 3.5.20
373
373
  signing_key:
374
374
  specification_version: 4
375
375
  summary: Ruby CMS, written in Sinatra