Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project are documented here.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.2.1] - 2026-07-01

### Changed

- Renamed the internal `ActiveMail::Core#release_the_kraken` to `#transpile`.
- Neutralised test fixtures (example URLs) and severed the upstream fork link.

## [1.2.0] - 2026-07-01

### Added
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tokens, automatic CSS inlining, generators, and test-time quality guards — so
responsive, accessible email renders **out of the box**, with every default
overridable.

A fork and modernization of the now-unmaintained `inky-rb`. Not affiliated with Rails core.
Not affiliated with Rails core.

Write this:

Expand Down Expand Up @@ -289,7 +289,7 @@ Helpers available from `Base`: `combine_classes`, `combine_attributes`,
Per-instance overrides (including replacing a built-in tag) are also possible:

```ruby
ActiveMail::Core.new(components: { 'button' => MyButton }).release_the_kraken(source)
ActiveMail::Core.new(components: { 'button' => MyButton }).transpile(source)
```

## Generators
Expand Down Expand Up @@ -356,8 +356,8 @@ Targets the real-world client landscape as of 2026:
## Programmatic use

```ruby
ActiveMail::Core.new.release_the_kraken('<container><row><columns>Hi</columns></row></container>')
ActiveMail::Core.new(column_count: 24, container_width: 480).release_the_kraken(source)
ActiveMail::Core.new.transpile('<container><row><columns>Hi</columns></row></container>')
ActiveMail::Core.new(column_count: 24, container_width: 480).transpile(source)
```

## Development
Expand All @@ -371,4 +371,4 @@ bundle exec srb tc # Sorbet

## License

MIT. See [`LICENSE.txt`](LICENSE.txt).
MIT. See [`LICENSE.txt`](LICENSE.txt), which retains the original ZURB copyright.
2 changes: 1 addition & 1 deletion lib/activemail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def initialize(options = {})

# Object, not String: ActionView::OutputBuffer is no longer a String since Rails 7.1.
sig { params(html_string: Object).returns(String) }
def release_the_kraken(html_string)
def transpile(html_string)
raws, str = extract_raws(normalize_input(html_string))
parse_cmd = ::ActiveMail.full_document?(str) ? :parse : :fragment
html = Nokogiri::HTML.public_send(parse_cmd, str)
Expand Down
2 changes: 1 addition & 1 deletion lib/activemail/rails/template_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def call(template, source = nil)
else
engine_handler.call(template)
end
"ActiveMail::Core.new.release_the_kraken(begin; #{compiled_source};end)"
"ActiveMail::Core.new.transpile(begin; #{compiled_source};end)"
end

module Composer
Expand Down
2 changes: 1 addition & 1 deletion lib/activemail/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# frozen_string_literal: true

module ActiveMail
VERSION = '1.2.0'
VERSION = '1.2.1'
end
4 changes: 2 additions & 2 deletions test/components/button_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
class ButtonTest < ActiveMailTest
def test_simple_button_is_bulletproof
assert_renders(
'<button href="http://zurb.com">Button</button>',
'<button href="https://example.com">Button</button>',
<<~HTML
<table class="button" role="presentation" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td>
<table role="presentation" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td>
<a href="http://zurb.com" style="display:inline-block;text-decoration:none;padding:12px 24px;">Button</a>
<a href="https://example.com" style="display:inline-block;text-decoration:none;padding:12px 24px;">Button</a>
</td></tr></tbody></table>
</td></tr></tbody></table>
HTML
Expand Down
4 changes: 2 additions & 2 deletions test/components/menu_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
class MenuTest < ActiveMailTest
def test_menu_with_item
assert_renders(
'<menu><item href="http://zurb.com">Item</item></menu>',
'<menu><item href="https://example.com">Item</item></menu>',
<<~HTML
<table class="menu" role="presentation" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td>
<table role="presentation" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
<th class="menu-item"><a href="http://zurb.com">Item</a></th>
<th class="menu-item"><a href="https://example.com">Item</a></th>
</tr></tbody></table>
</td></tr></tbody></table>
HTML
Expand Down
4 changes: 2 additions & 2 deletions test/rails/template_handler_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_call_wraps_the_underlying_engine_output_with_inky
template = ActionView::Template.new('<container></container>', 'test', handler, locals: [], format: :html)
compiled = handler.call(template, '<container></container>')

assert_includes compiled, 'ActiveMail::Core.new.release_the_kraken'
assert_includes compiled, 'ActiveMail::Core.new.transpile'
end

def test_engine_handler_raises_for_unknown_engine
Expand Down Expand Up @@ -64,7 +64,7 @@ def test_renders_an_inky_template_through_action_view
end

def test_output_is_html_safe_when_active_support_is_loaded
output = ActiveMail::Core.new.release_the_kraken('<row></row>')
output = ActiveMail::Core.new.transpile('<row></row>')

assert_predicate output, :html_safe?
end
Expand Down
2 changes: 1 addition & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def assert_same_html(expected, actual)
end

def render(input, **options)
ActiveMail::Core.new(options).release_the_kraken(input)
ActiveMail::Core.new(options).transpile(input)
end

def assert_renders(input, expected, **)
Expand Down
Loading