bridgetown-content-security-policy 2.0.0 → 3.0.0
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 81decbc66abeba86a607d1a66667bbe9da1509fbb4d41f5965fc432d650cd308
|
|
4
|
+
data.tar.gz: d36a2c6a8cb1dabd51c264a308c26b1e0f92e399107ad0911dd0bbdbe18824be
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b5c956da517a75a8cc80ce492b2bbe2671367bd02c31bf87c59b76c1ab578432b61701032c6cc1cfbb1826d54dae87491faf8716f019b066f0013f5d2e7a7d4e
|
|
7
|
+
data.tar.gz: 4fb5ce9e341174f174a8ad88e2ba7eee820186eb9eefaba29d086e371aefd3fa583e80f2beed3a09d44d7565dfd187086d8641717953bb0e93362eadcfaf0512
|
data/.github/workflows/tests.yml
CHANGED
|
@@ -13,8 +13,8 @@ jobs:
|
|
|
13
13
|
runs-on: ubuntu-latest
|
|
14
14
|
strategy:
|
|
15
15
|
matrix:
|
|
16
|
-
ruby_version: [2.
|
|
17
|
-
bridgetown_version: [
|
|
16
|
+
ruby_version: [3.2.4, 3.3.6, 3.4.2]
|
|
17
|
+
bridgetown_version: [2.0.0, 2.1.0]
|
|
18
18
|
continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' }}
|
|
19
19
|
# Has to be top level to cache properly
|
|
20
20
|
env:
|
data/.rubocop.yml
CHANGED
|
@@ -4,19 +4,41 @@ inherit_gem:
|
|
|
4
4
|
rubocop-bridgetown: .rubocop.yml
|
|
5
5
|
|
|
6
6
|
AllCops:
|
|
7
|
-
TargetRubyVersion: 2.
|
|
8
|
-
Include:
|
|
9
|
-
- lib/**/*.rb
|
|
7
|
+
TargetRubyVersion: 2.7
|
|
10
8
|
|
|
11
9
|
Exclude:
|
|
12
10
|
- .gitignore
|
|
13
|
-
- .rspec
|
|
14
11
|
- .rubocop.yml
|
|
12
|
+
- "*.gemspec"
|
|
15
13
|
|
|
16
14
|
- Gemfile.lock
|
|
17
15
|
- CHANGELOG.md
|
|
18
16
|
- LICENSE.txt
|
|
19
17
|
- README.md
|
|
18
|
+
- Rakefile
|
|
19
|
+
- bridgetown.automation.rb
|
|
20
20
|
|
|
21
21
|
- script/**/*
|
|
22
|
+
- test/fixtures/**/*
|
|
22
23
|
- vendor/**/*
|
|
24
|
+
|
|
25
|
+
Layout/LineLength:
|
|
26
|
+
Max: 140
|
|
27
|
+
|
|
28
|
+
Metrics/BlockLength:
|
|
29
|
+
Enabled: false
|
|
30
|
+
|
|
31
|
+
Bundler/OrderedGems:
|
|
32
|
+
Enabled: false
|
|
33
|
+
|
|
34
|
+
Style/IfUnlessModifier:
|
|
35
|
+
Enabled: false
|
|
36
|
+
|
|
37
|
+
Layout/IndentationConsistency:
|
|
38
|
+
Enabled: false
|
|
39
|
+
|
|
40
|
+
Layout/IndentationWidth:
|
|
41
|
+
Enabled: false
|
|
42
|
+
|
|
43
|
+
Style/OptionalBooleanParameter:
|
|
44
|
+
Enabled: false
|
data/Gemfile
CHANGED
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
|
18
18
|
|
|
19
19
|
spec.required_ruby_version = ">= 2.7.0"
|
|
20
20
|
|
|
21
|
-
spec.add_dependency "bridgetown", ">=
|
|
21
|
+
spec.add_dependency "bridgetown", ">= 2.0", "< 4.0"
|
|
22
22
|
|
|
23
23
|
spec.add_development_dependency "bundler"
|
|
24
24
|
spec.add_development_dependency "nokogiri"
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module BridgetownContentSecurityPolicy
|
|
4
|
-
|
|
4
|
+
@policies ||= {}
|
|
5
5
|
|
|
6
6
|
def self.configure(name, &block)
|
|
7
|
-
|
|
7
|
+
@policies[name.to_sym] = BridgetownContentSecurityPolicy::Policy.new(&block)
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def self.policies
|
|
11
|
+
@policies || {}
|
|
8
12
|
end
|
|
9
13
|
|
|
10
14
|
class Builder < Bridgetown::Builder
|
|
@@ -12,10 +16,8 @@ module BridgetownContentSecurityPolicy
|
|
|
12
16
|
require_relative site.in_root_dir("config", "content_security_policy.config.rb")
|
|
13
17
|
|
|
14
18
|
unless default_policy
|
|
15
|
-
# rubocop:disable Layout/LineLength
|
|
16
19
|
Bridgetown.logger.error "\nDefault Content Security Policy not configured"
|
|
17
20
|
Bridgetown.logger.info "Please configure a default CSP in content_security_policy.config.rb\n"
|
|
18
|
-
# rubocop:enable Layout/LineLength
|
|
19
21
|
end
|
|
20
22
|
|
|
21
23
|
liquid_tag "content_security_policy" do |_attributes, tag|
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bridgetown-content-security-policy
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 3.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ayush Newatia
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 2026-01-29 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: bridgetown
|
|
@@ -16,20 +15,20 @@ dependencies:
|
|
|
16
15
|
requirements:
|
|
17
16
|
- - ">="
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
18
|
+
version: '2.0'
|
|
20
19
|
- - "<"
|
|
21
20
|
- !ruby/object:Gem::Version
|
|
22
|
-
version: '
|
|
21
|
+
version: '4.0'
|
|
23
22
|
type: :runtime
|
|
24
23
|
prerelease: false
|
|
25
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
26
25
|
requirements:
|
|
27
26
|
- - ">="
|
|
28
27
|
- !ruby/object:Gem::Version
|
|
29
|
-
version:
|
|
28
|
+
version: '2.0'
|
|
30
29
|
- - "<"
|
|
31
30
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: '
|
|
31
|
+
version: '4.0'
|
|
33
32
|
- !ruby/object:Gem::Dependency
|
|
34
33
|
name: bundler
|
|
35
34
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -86,7 +85,6 @@ dependencies:
|
|
|
86
85
|
- - ">="
|
|
87
86
|
- !ruby/object:Gem::Version
|
|
88
87
|
version: '0'
|
|
89
|
-
description:
|
|
90
88
|
email: ayush@hey.com
|
|
91
89
|
executables: []
|
|
92
90
|
extensions: []
|
|
@@ -110,7 +108,6 @@ homepage: https://github.com/ayushn21/bridgetown-content-security-policy
|
|
|
110
108
|
licenses:
|
|
111
109
|
- MIT
|
|
112
110
|
metadata: {}
|
|
113
|
-
post_install_message:
|
|
114
111
|
rdoc_options: []
|
|
115
112
|
require_paths:
|
|
116
113
|
- lib
|
|
@@ -125,8 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
125
122
|
- !ruby/object:Gem::Version
|
|
126
123
|
version: '0'
|
|
127
124
|
requirements: []
|
|
128
|
-
rubygems_version: 3.2
|
|
129
|
-
signing_key:
|
|
125
|
+
rubygems_version: 3.6.2
|
|
130
126
|
specification_version: 4
|
|
131
127
|
summary: Add a content security policy to your website using a convenient Ruby DSL
|
|
132
128
|
test_files: []
|