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: '01187babccb4805b3932c7d8c0fbefb349fecf45e829108b44538dfb3c8f7fe4'
4
- data.tar.gz: b8770f4cfb4740c2c7cbaa5ca3daa78d82ec8f5e2ff29e864428bd5ebaf40052
3
+ metadata.gz: 81decbc66abeba86a607d1a66667bbe9da1509fbb4d41f5965fc432d650cd308
4
+ data.tar.gz: d36a2c6a8cb1dabd51c264a308c26b1e0f92e399107ad0911dd0bbdbe18824be
5
5
  SHA512:
6
- metadata.gz: be9c1dd319f104c400cfcd08ae25318a95ecc6591af0a903dd212ef00fb2659d32e36d2b7c4208fd363124d835646b41f9efc7171336e800d9cf6406017b2460
7
- data.tar.gz: 65819b692aaf3b25e6f03bea50cbe2807a320e9f4ac85d00f35567c4710bbcb34fb05d5205b9cb967f87784fd8ab43edc65093cb3b2b7953f8086e27ff3f1898
6
+ metadata.gz: b5c956da517a75a8cc80ce492b2bbe2671367bd02c31bf87c59b76c1ab578432b61701032c6cc1cfbb1826d54dae87491faf8716f019b066f0013f5d2e7a7d4e
7
+ data.tar.gz: 4fb5ce9e341174f174a8ad88e2ba7eee820186eb9eefaba29d086e371aefd3fa583e80f2beed3a09d44d7565dfd187086d8641717953bb0e93362eadcfaf0512
@@ -13,8 +13,8 @@ jobs:
13
13
  runs-on: ubuntu-latest
14
14
  strategy:
15
15
  matrix:
16
- ruby_version: [2.7.7, 3.0.5, 3.1.3, 3.2.0]
17
- bridgetown_version: [1.2.0]
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.5
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
@@ -9,4 +9,4 @@ group :test do
9
9
  gem "minitest"
10
10
  gem "minitest-profile"
11
11
  gem "minitest-reporters"
12
- end
12
+ end
@@ -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", ">= 1.2.0", "< 2.0"
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
- mattr_reader :policies, default: {}
4
+ @policies ||= {}
5
5
 
6
6
  def self.configure(name, &block)
7
- @@policies[name.to_sym] = BridgetownContentSecurityPolicy::Policy.new(&block)
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|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BridgetownContentSecurityPolicy
4
- VERSION = "2.0.0"
4
+ VERSION = "3.0.0"
5
5
  end
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: 2.0.0
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: 2023-01-25 00:00:00.000000000 Z
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: 1.2.0
18
+ version: '2.0'
20
19
  - - "<"
21
20
  - !ruby/object:Gem::Version
22
- version: '2.0'
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: 1.2.0
28
+ version: '2.0'
30
29
  - - "<"
31
30
  - !ruby/object:Gem::Version
32
- version: '2.0'
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.33
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: []