better_html 2.0.1 → 2.0.2

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: ac75570144a95e0a5a28f54dc99f265192ec4727d96b960ada7a97fd47851194
4
- data.tar.gz: a29a57f1969999dd394336dd785facc3ca5432e326397e0c4dcfb745f7df79b9
3
+ metadata.gz: 1ac84c6b49b11f21c5195484e1534ca08499baf267b1a3ee0c8f867cfcb827a6
4
+ data.tar.gz: 07fb6f3ac263b81d2dc7f92287b051453ff69efbfa580572b6c528e329e1cba3
5
5
  SHA512:
6
- metadata.gz: 0341b84eb8f09fe099f3aefe91edad0e99064113070336d76ebc6d4ffbd341189ee6c8cb41b2011c89ca1e42c63227d2fc41db736e3c3f3ac0474db071c02cf5
7
- data.tar.gz: 725880baa643e0589c6a781dcb28f8437e3ccab29b58d7a460ea1ec4e4bb3320dc6d9ef1b1a770a40909a8c3adaacda623bdb163ef4fa96819a7ec3f40ebca0f
6
+ metadata.gz: 471d66dbf8b8571382cb316fad44c8792c93a14176a56e061e98254c6387a474219850c308f640047d1c9fcf359257c4a704eb7db868d2abd6bbc7e947dab30a
7
+ data.tar.gz: 1149ea4793a2251359e67ebbea8683298306d02cf17c8853997f0a7283247b8f269d4ee1eaf7833ebf6c139308a2c01ece8a9e157538b79a724fb095bd40509f
data/Rakefile CHANGED
@@ -8,7 +8,9 @@ rescue LoadError
8
8
  end
9
9
 
10
10
  require "rake/extensiontask"
11
+ require "ruby_memcheck"
11
12
 
13
+ RubyMemcheck.config(binary_name: "better_html_ext")
12
14
  Rake::ExtensionTask.new("better_html_ext")
13
15
 
14
16
  require "rdoc/task"
@@ -23,11 +25,15 @@ end
23
25
 
24
26
  require "rake/testtask"
25
27
 
26
- Rake::TestTask.new(:test) do |t|
28
+ test_config = lambda do |t|
27
29
  t.libs << "lib"
28
30
  t.libs << "test"
29
31
  t.pattern = "test/**/*_test.rb"
30
32
  t.verbose = false
31
33
  end
34
+ Rake::TestTask.new(test: :compile, &test_config)
35
+ namespace :test do
36
+ RubyMemcheck::TestTask.new(valgrind: :compile, &test_config)
37
+ end
32
38
 
33
39
  task default: [:compile, :test]
@@ -6,7 +6,7 @@ module BetterHtml
6
6
  module TestHelper
7
7
  module SafeErb
8
8
  class AllowedScriptType < Base
9
- VALID_JAVASCRIPT_TAG_TYPES = ["application/ld+json", "text/javascript", "text/template", "text/html"]
9
+ VALID_JAVASCRIPT_TAG_TYPES = ["application/ld+json", "text/javascript", "text/template", "text/html", "module"]
10
10
 
11
11
  def validate
12
12
  script_tags.each do |tag, _|
@@ -35,7 +35,7 @@ module BetterHtml
35
35
  buffer.source = data
36
36
  tester = Tester.new(buffer, **options)
37
37
 
38
- message = ""
38
+ message = +""
39
39
  tester.errors.each do |error|
40
40
  message << <<~EOL
41
41
  On line #{error.location.line}
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BetterHtml
4
- VERSION = "2.0.1"
4
+ VERSION = "2.0.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: better_html
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francois Chagnon
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-16 00:00:00.000000000 Z
11
+ date: 2023-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -168,7 +168,7 @@ licenses:
168
168
  metadata:
169
169
  bug_tracker_uri: https://github.com/Shopify/better-html/issues
170
170
  changelog_uri: https://github.com/Shopify/better-html/releases
171
- source_code_uri: https://github.com/Shopify/better-html/tree/v2.0.1
171
+ source_code_uri: https://github.com/Shopify/better-html/tree/v2.0.2
172
172
  allowed_push_host: https://rubygems.org
173
173
  post_install_message:
174
174
  rdoc_options: []
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
185
  - !ruby/object:Gem::Version
186
186
  version: '0'
187
187
  requirements: []
188
- rubygems_version: 3.3.3
188
+ rubygems_version: 3.4.14
189
189
  signing_key:
190
190
  specification_version: 4
191
191
  summary: Better HTML for Rails.