Skip to content

Commit

Permalink
Add Rails 7.1 Support (#1)
Browse files Browse the repository at this point in the history
Adds and addresses the following:

* Adds Rails 7.1 to test matrix
* Addresses expected String type when rendering (zombocom#71)
  • Loading branch information
vietqhoang committed Jan 22, 2024
1 parent 965a6d3 commit 8eb0eb2
Show file tree
Hide file tree
Showing 3 changed files with 242 additions and 0 deletions.
10 changes: 10 additions & 0 deletions gemfiles/rails_7_1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "appraisal"
gem "rails", "7.1.2"
gem "sqlite3", "~> 1.4"
gem 'pry', '~> 0.14.2'

gemspec path: "../"
226 changes: 226 additions & 0 deletions gemfiles/rails_7_1.gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
PATH
remote: ..
specs:
maildown (4.0.0)
actionmailer (>= 7.0.0)
kramdown-parser-gfm

GEM
remote: https://rubygems.org/
specs:
actioncable (7.1.2)
actionpack (= 7.1.2)
activesupport (= 7.1.2)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.1.2)
actionpack (= 7.1.2)
activejob (= 7.1.2)
activerecord (= 7.1.2)
activestorage (= 7.1.2)
activesupport (= 7.1.2)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.1.2)
actionpack (= 7.1.2)
actionview (= 7.1.2)
activejob (= 7.1.2)
activesupport (= 7.1.2)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.2)
actionpack (7.1.2)
actionview (= 7.1.2)
activesupport (= 7.1.2)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.1.2)
actionpack (= 7.1.2)
activerecord (= 7.1.2)
activestorage (= 7.1.2)
activesupport (= 7.1.2)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.1.2)
activesupport (= 7.1.2)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.1.2)
activesupport (= 7.1.2)
globalid (>= 0.3.6)
activemodel (7.1.2)
activesupport (= 7.1.2)
activerecord (7.1.2)
activemodel (= 7.1.2)
activesupport (= 7.1.2)
timeout (>= 0.4.0)
activestorage (7.1.2)
actionpack (= 7.1.2)
activejob (= 7.1.2)
activerecord (= 7.1.2)
activesupport (= 7.1.2)
marcel (~> 1.0)
activesupport (7.1.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
appraisal (2.5.0)
bundler
rake
thor (>= 0.14.0)
base64 (0.2.0)
bigdecimal (3.1.5)
builder (3.2.4)
coderay (1.1.3)
concurrent-ruby (1.1.10)
connection_pool (2.4.1)
crass (1.0.6)
digest (3.1.0)
drb (2.2.0)
ruby2_keywords
erubi (1.12.0)
globalid (1.0.0)
activesupport (>= 5.0)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
io-console (0.7.1)
irb (1.11.0)
rdoc
reline (>= 0.3.8)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
loofah (2.22.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
m (1.6.0)
method_source (>= 0.6.7)
rake (>= 0.9.2.2)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (1.0.2)
method_source (1.0.0)
mini_mime (1.1.2)
minitest (5.15.0)
mutex_m (0.2.0)
net-imap (0.2.3)
digest
net-protocol
strscan
net-pop (0.1.1)
digest
net-protocol
timeout
net-protocol (0.1.3)
timeout
net-smtp (0.3.1)
digest
net-protocol
timeout
nio4r (2.7.0)
nokogiri (1.16.0-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.0-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.0-x86_64-linux)
racc (~> 1.4)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
psych (5.1.2)
stringio
racc (1.6.0)
rack (2.2.8)
rack-session (1.0.2)
rack (< 3)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rackup (1.0.0)
rack (< 3)
webrick
rails (7.1.2)
actioncable (= 7.1.2)
actionmailbox (= 7.1.2)
actionmailer (= 7.1.2)
actionpack (= 7.1.2)
actiontext (= 7.1.2)
actionview (= 7.1.2)
activejob (= 7.1.2)
activemodel (= 7.1.2)
activerecord (= 7.1.2)
activestorage (= 7.1.2)
activesupport (= 7.1.2)
bundler (>= 1.15.0)
railties (= 7.1.2)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (7.1.2)
actionpack (= 7.1.2)
activesupport (= 7.1.2)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rake (13.0.6)
rdoc (6.6.2)
psych (>= 4.0.0)
reline (0.4.1)
io-console (~> 0.5)
rexml (3.2.5)
ruby2_keywords (0.0.5)
sqlite3 (1.4.2)
stringio (3.1.0)
strscan (3.0.3)
thor (1.3.0)
timeout (0.4.1)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
webrick (1.8.1)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
zeitwerk (2.6.12)

PLATFORMS
arm64-darwin-23
x86_64-darwin-20
x86_64-darwin-21
x86_64-linux

DEPENDENCIES
appraisal
m
maildown!
pry (~> 0.14.2)
rails (= 7.1.2)
railties
rake
sqlite3 (~> 1.4)

BUNDLED WITH
2.3.26
6 changes: 6 additions & 0 deletions lib/maildown/markdown_engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,16 @@ module MarkdownEngine
@maildown_markdown_engine_text_block = nil

def self.to_html(string)
if string.is_a?(ActionView::OutputBuffer)
string = string.to_s
end
html_block.call(string)
end

def self.to_text(string)
if string.is_a?(ActionView::OutputBuffer)
string = string.to_s
end
text_block.call(string)
end

Expand Down

0 comments on commit 8eb0eb2

Please sign in to comment.