nesta 0.14.0 → 0.16.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 +2 -2
- data/{CHANGES → CHANGELOG.md} +62 -22
- data/Gemfile.lock +16 -16
- data/LICENSE +1 -1
- data/README.md +42 -30
- data/RELEASING.md +5 -4
- data/lib/nesta/config.rb +5 -4
- data/lib/nesta/models/file_model.rb +195 -0
- data/lib/nesta/models/menu.rb +67 -0
- data/lib/nesta/models/page.rb +167 -0
- data/lib/nesta/models.rb +3 -421
- data/lib/nesta/overrides.rb +1 -15
- data/lib/nesta/version.rb +1 -1
- data/nesta.gemspec +2 -2
- data/templates/config/config.yml +2 -2
- data/test/integration/default_theme_test.rb +1 -1
- data/test/unit/config_test.rb +6 -0
- data/views/analytics.haml +6 -6
- metadata +14 -11
- /data/test/unit/{file_model_test.rb → models/file_model_test.rb} +0 -0
- /data/test/unit/{menu_test.rb → models/menu_test.rb} +0 -0
- /data/test/unit/{page_test.rb → models/page_test.rb} +0 -0
data/templates/config/config.yml
CHANGED
@@ -44,7 +44,7 @@ content: content
|
|
44
44
|
# scroll down a bit to set it in production even if you're not deploying
|
45
45
|
# to your own server.
|
46
46
|
#
|
47
|
-
# google_analytics_code: "
|
47
|
+
# google_analytics_code: "G-??????????"
|
48
48
|
|
49
49
|
# read_more
|
50
50
|
# When the summary of an article is displayed on the home page, or
|
@@ -64,7 +64,7 @@ content: content
|
|
64
64
|
|
65
65
|
# production:
|
66
66
|
# content: /var/apps/nesta/shared/content
|
67
|
-
# google_analytics_code: "
|
67
|
+
# google_analytics_code: "G-??????????"
|
68
68
|
|
69
69
|
# The following settings control the behaviour of the `nesta build`
|
70
70
|
# command, which is used to generate a "static" version of your site.
|
@@ -33,7 +33,7 @@ describe 'Default theme' do
|
|
33
33
|
end
|
34
34
|
|
35
35
|
it 'includes Google Analytics JavaScript when configured' do
|
36
|
-
analytics_code = { 'google_analytics_code' => '
|
36
|
+
analytics_code = { 'google_analytics_code' => 'G-1234' }
|
37
37
|
stub_config(temp_content.merge('test' => analytics_code)) do
|
38
38
|
visit '/'
|
39
39
|
assert_nil all('script').find { |s| s[:src].match /analytics\.js/ }
|
data/test/unit/config_test.rb
CHANGED
@@ -38,6 +38,12 @@ describe Nesta::Config do
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
+
it 'returns environment specific settings' do
|
42
|
+
stub_config('test' => { 'content' => 'rack_env_specific/path'}) do
|
43
|
+
assert_equal 'rack_env_specific/path', Nesta::Config.content
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
41
47
|
it 'overrides top level settings with environment specific settings' do
|
42
48
|
config = {
|
43
49
|
'content' => 'general/path',
|
data/views/analytics.haml
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
- if @google_analytics_code
|
2
2
|
:plain
|
3
|
+
<!-- Google tag (gtag.js) -->
|
4
|
+
<script async src="https://www.googletagmanager.com/gtag/js?id=#{@google_analytics_code}"></script>
|
3
5
|
<script>
|
4
|
-
|
5
|
-
(
|
6
|
-
|
7
|
-
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
6
|
+
window.dataLayer = window.dataLayer || [];
|
7
|
+
function gtag(){dataLayer.push(arguments);}
|
8
|
+
gtag('js', new Date());
|
8
9
|
|
9
|
-
|
10
|
-
ga('send', 'pageview');
|
10
|
+
gtag('config', '#{@google_analytics_code}');
|
11
11
|
</script>
|
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.16.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:
|
11
|
+
date: 2024-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: haml
|
@@ -120,28 +120,28 @@ dependencies:
|
|
120
120
|
requirements:
|
121
121
|
- - "~>"
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: '
|
123
|
+
version: '3.1'
|
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: '3.1'
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
132
|
name: tilt
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|
134
134
|
requirements:
|
135
135
|
- - "~>"
|
136
136
|
- !ruby/object:Gem::Version
|
137
|
-
version: '2.
|
137
|
+
version: '2.1'
|
138
138
|
type: :runtime
|
139
139
|
prerelease: false
|
140
140
|
version_requirements: !ruby/object:Gem::Requirement
|
141
141
|
requirements:
|
142
142
|
- - "~>"
|
143
143
|
- !ruby/object:Gem::Version
|
144
|
-
version: '2.
|
144
|
+
version: '2.1'
|
145
145
|
- !ruby/object:Gem::Dependency
|
146
146
|
name: mr-sparkle
|
147
147
|
requirement: !ruby/object:Gem::Requirement
|
@@ -234,7 +234,7 @@ files:
|
|
234
234
|
- ".github/workflows/tests.yml"
|
235
235
|
- ".gitignore"
|
236
236
|
- ".gitmodules"
|
237
|
-
-
|
237
|
+
- CHANGELOG.md
|
238
238
|
- Gemfile
|
239
239
|
- Gemfile.lock
|
240
240
|
- Guardfile
|
@@ -265,6 +265,9 @@ files:
|
|
265
265
|
- lib/nesta/env.rb
|
266
266
|
- lib/nesta/helpers.rb
|
267
267
|
- lib/nesta/models.rb
|
268
|
+
- lib/nesta/models/file_model.rb
|
269
|
+
- lib/nesta/models/menu.rb
|
270
|
+
- lib/nesta/models/page.rb
|
268
271
|
- lib/nesta/navigation.rb
|
269
272
|
- lib/nesta/overrides.rb
|
270
273
|
- lib/nesta/path.rb
|
@@ -320,9 +323,9 @@ files:
|
|
320
323
|
- test/support/test_configuration.rb
|
321
324
|
- test/test_helper.rb
|
322
325
|
- test/unit/config_test.rb
|
323
|
-
- test/unit/file_model_test.rb
|
324
|
-
- test/unit/menu_test.rb
|
325
|
-
- test/unit/page_test.rb
|
326
|
+
- test/unit/models/file_model_test.rb
|
327
|
+
- test/unit/models/menu_test.rb
|
328
|
+
- test/unit/models/page_test.rb
|
326
329
|
- test/unit/path_test.rb
|
327
330
|
- test/unit/plugin_test.rb
|
328
331
|
- test/unit/static/assets_test.rb
|
@@ -366,7 +369,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
366
369
|
- !ruby/object:Gem::Version
|
367
370
|
version: '0'
|
368
371
|
requirements: []
|
369
|
-
rubygems_version: 3.
|
372
|
+
rubygems_version: 3.5.3
|
370
373
|
signing_key:
|
371
374
|
specification_version: 4
|
372
375
|
summary: Ruby CMS, written in Sinatra
|
File without changes
|
File without changes
|
File without changes
|