Skip to content

Commit

Permalink
feat: Remove Blueprint::RawHTML module
Browse files Browse the repository at this point in the history
  • Loading branch information
stephannv committed Sep 14, 2024
1 parent 31c8dcc commit f92425f
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 251 deletions.
7 changes: 2 additions & 5 deletions benchmark/benchmark.cr
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
require "benchmark"

require "./blueprint_html"
require "./blueprint_raw_html"
require "./ecr"

require "../src/blueprint/version"

blueprint_html = BlueprintHTML::Page.new.to_s
blueprint_raw_html = BlueprintRawHTML::Page.new.to_s
ecr = ECR::Page.new.to_s # ECR is here just to have a base value to compare
ecr = ECR::Page.new.to_s.chomp # ECR is here just to have a base value to compare

raise "Different results" if blueprint_html != blueprint_raw_html && blueprint_html != ecr
raise "Different results" if blueprint_html != ecr

Benchmark.ips do |x|
x.report("Blueprint::HTML #{Blueprint::VERSION}") { BlueprintHTML::Page.new.to_s }
x.report("Blueprint::RawHTML #{Blueprint::VERSION}") { BlueprintRawHTML::Page.new.to_s }
x.report("ECR") { ECR::Page.new.to_s }
end
65 changes: 0 additions & 65 deletions benchmark/blueprint_raw_html.cr

This file was deleted.

138 changes: 0 additions & 138 deletions spec/blueprint/raw_html_spec.cr

This file was deleted.

1 change: 1 addition & 0 deletions src/blueprint/html/helpers.cr
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module Blueprint::HTML::Helpers
Blueprint::SafeValue.new(value)
end

@[Experimental]
macro tokens(**conditions)
String.build do |io|
{% for key, value in conditions %}
Expand Down
43 changes: 0 additions & 43 deletions src/blueprint/raw_html.cr

This file was deleted.

0 comments on commit f92425f

Please sign in to comment.