Mange / roadie

Making HTML emails comfortable for the Ruby rockstars

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nokogiri 1.4.1 is not compatible with roadie

jasonkim opened this issue · comments

Fails with strip called on nokogiri node(?). Gemspec/gemfile should be updated to be more strict and enforce the correct version of nokogiri.

I get no spec failures when using 1.4.4. You have to be more specific than this.

mange 10:44:34 ~roadie 1.9.2 › grep "nokogiri (" Gemfile.lock
    nokogiri (1.4.4)
mange 10:44:41 ~roadie 1.9.2 › rake spec
(in /Users/mange/Projects/roadie)
/Users/mange/.rvm/rubies/ruby-1.9.2-p180/bin/ruby -S bundle exec rspec -c spec/integration_spec.rb spec/lib/roadie/action_mailer_extensions_spec.rb spec/lib/roadie/css_file_not_found_spec.rb spec/lib/roadie/inliner_spec.rb spec/lib/roadie/style_declaration_spec.rb spec/lib/roadie_spec.rb
.....................................................

Finished in 0.33603 seconds
53 examples, 0 failures

It works fine with 1.4.4. The problem is when Roadie is used within a project with lower version of Nokogiri(I've had problem with 1.4.1). If roadie is not compatible with previous version of Nokogiri, it would be nice to document or enforce the restriction.

On Jun 13, 2011, at 1:45 AM, Mangereply@reply.github.com wrote:

I get no spec failures when using 1.4.4. You have to be more specific than this.

mange 10:44:34 ~roadie 1.9.2 › grep "nokogiri (" Gemfile.lock
   nokogiri (1.4.4)
mange 10:44:41 ~roadie 1.9.2 › rake spec
(in /Users/mange/Projects/roadie)
/Users/mange/.rvm/rubies/ruby-1.9.2-p180/bin/ruby -S bundle exec rspec -c spec/integration_spec.rb spec/lib/roadie/action_mailer_extensions_spec.rb spec/lib/roadie/css_file_not_found_spec.rb spec/lib/roadie/inliner_spec.rb spec/lib/roadie/style_declaration_spec.rb spec/lib/roadie_spec.rb
.....................................................

Finished in 0.33603 seconds
53 examples, 0 failures

Reply to this email directly or view it on GitHub:
#5 (comment)

Using nokogiri 1.4.1

jkim-01:~/roadie> gem list nokogiri

*** LOCAL GEMS ***

nokogiri (1.4.1)
jkim-01:~/roadie> rake spec
(in /Users/jkim/roadie)
/Users/jkim/.rvm/rubies/ruby-1.9.2-p0/bin/ruby -S bundle exec rspec -c spec/integration_spec.rb spec/lib/roadie/action_mailer_extensions_spec.rb spec/lib/roadie/css_file_not_found_spec.rb spec/lib/roadie/inliner_spec.rb spec/lib/roadie/style_declaration_spec.rb spec/lib/roadie_spec.rb
WARNING: Nokogiri was built against LibXML version 2.7.7, but has dynamically loaded 2.7.3
FFF...........FFFFFFFFFF.....FFFFFFFFFFFF............

Failures:

  1. roadie integration should inline styles for an email
    Failure/Error: mail(:subject => 'Notification for you', :to => to) { |format| format.html; format.text }
    NoMethodError:
    undefined method `strip' for #<Nokogiri::XML::Element:0x81702f0c name="head">

    ./lib/roadie/inliner.rb:78:in`add_missing_structure'

    ./lib/roadie/inliner.rb:41:in `block in execute'

    ./lib/roadie/inliner.rb:66:in`block in adjust_html'

    ./lib/roadie/inliner.rb:65:in `tap'

    ./lib/roadie/inliner.rb:65:in`adjust_html'

    ./lib/roadie/inliner.rb:39:in `execute'

    ./lib/roadie.rb:5:in`inline_css'

    ./lib/roadie/action_mailer_extensions.rb:41:in `inline_style_response'

    ./lib/roadie/action_mailer_extensions.rb:27:in`block in collect_responses_and_parts_order_with_inline_styles'

    ./lib/roadie/action_mailer_extensions.rb:27:in `map'

    ./lib/roadie/action_mailer_extensions.rb:27:in`collect_responses_and_parts_order_with_inline_styles'

    ./lib/roadie/action_mailer_extensions.rb:20:in `mail_with_inline_styles'

    ./spec/integration_spec.rb:16:in`notification'

    ./spec/integration_spec.rb:31:in `block (2 levels) in <top (required)>'

  2. roadie integration should not add headers for the roadie options
    Failure/Error: mail(:subject => 'Notification for you', :to => to) { |format| format.html; format.text }
    NoMethodError:
    undefined method `strip' for #<Nokogiri::XML::Element:0x816e054c name="head">

    ./lib/roadie/inliner.rb:78:in`add_missing_structure'

    ./lib/roadie/inliner.rb:41:in `block in execute'

    ./lib/roadie/inliner.rb:66:in`block in adjust_html'

    ./lib/roadie/inliner.rb:65:in `tap'

    ./lib/roadie/inliner.rb:65:in`adjust_html'

    ./lib/roadie/inliner.rb:39:in `execute'

    ./lib/roadie.rb:5:in`inline_css'

    ./lib/roadie/action_mailer_extensions.rb:41:in `inline_style_response'

    ./lib/roadie/action_mailer_extensions.rb:27:in`block in collect_responses_and_parts_order_with_inline_styles'

    ./lib/roadie/action_mailer_extensions.rb:27:in `map'

    ./lib/roadie/action_mailer_extensions.rb:27:in`collect_responses_and_parts_order_with_inline_styles'

    ./lib/roadie/action_mailer_extensions.rb:20:in `mail_with_inline_styles'

    ./spec/integration_spec.rb:16:in`notification'

    ./spec/integration_spec.rb:54:in `block (2 levels) in <top (required)>'

  3. roadie integration should keep custom headers in place
    Failure/Error: mail(:subject => 'Buy cheap v1agra', :to => to)
    NoMethodError:
    undefined method `strip' for #<Nokogiri::XML::Element:0x816bfd24 name="head">

    ./lib/roadie/inliner.rb:78:in`add_missing_structure'

    ./lib/roadie/inliner.rb:41:in `block in execute'

    ./lib/roadie/inliner.rb:66:in`block in adjust_html'

    ./lib/roadie/inliner.rb:65:in `tap'

    ./lib/roadie/inliner.rb:65:in`adjust_html'

    ./lib/roadie/inliner.rb:39:in `execute'

    ./lib/roadie.rb:5:in`inline_css'

    ./lib/roadie/action_mailer_extensions.rb:41:in `inline_style_response'

    ./lib/roadie/action_mailer_extensions.rb:27:in`block in collect_responses_and_parts_order_with_inline_styles'

    ./lib/roadie/action_mailer_extensions.rb:27:in `map'

    ./lib/roadie/action_mailer_extensions.rb:27:in`collect_responses_and_parts_order_with_inline_styles'

    ./lib/roadie/action_mailer_extensions.rb:20:in `mail_with_inline_styles'

    ./spec/integration_spec.rb:21:in`marketing'

    ./spec/integration_spec.rb:59:in `block (2 levels) in <top (required)>'

  4. Roadie::Inliner inlining styles should inline simple attributes
    Failure/Error: Nokogiri::HTML.parse Roadie::Inliner.new(@css, html, url_options).execute
    NoMethodError:
    undefined method `strip' for #<Nokogiri::XML::Element:0x80cd8b1c name="head">

    ./lib/roadie/inliner.rb:78:in`add_missing_structure'

    ./lib/roadie/inliner.rb:41:in `block in execute'

    ./lib/roadie/inliner.rb:66:in`block in adjust_html'

    ./lib/roadie/inliner.rb:65:in `tap'

    ./lib/roadie/inliner.rb:65:in`adjust_html'

    ./lib/roadie/inliner.rb:39:in `execute'

    ./spec/lib/roadie/inliner_spec.rb:8:in`rendering'

    ./spec/lib/roadie/inliner_spec.rb:20:in `block (3 levels) in <top (required)>'

  5. Roadie::Inliner inlining styles should keep the order of the styles that was inlined
    Failure/Error: Nokogiri::HTML.parse Roadie::Inliner.new(@css, html, url_options).execute
    NoMethodError:
    undefined method `strip' for #<Nokogiri::XML::Element:0x80cd2924 name="head">

    ./lib/roadie/inliner.rb:78:in`add_missing_structure'

    ./lib/roadie/inliner.rb:41:in `block in execute'

    ./lib/roadie/inliner.rb:66:in`block in adjust_html'

    ./lib/roadie/inliner.rb:65:in `tap'

    ./lib/roadie/inliner.rb:65:in`adjust_html'

    ./lib/roadie/inliner.rb:39:in `execute'

    ./spec/lib/roadie/inliner_spec.rb:8:in`rendering'

    ./spec/lib/roadie/inliner_spec.rb:25:in `block (3 levels) in <top (required)>'

  6. Roadie::Inliner inlining styles should combine multiple selectors into one
    Failure/Error: Nokogiri::HTML.parse Roadie::Inliner.new(@css, html, url_options).execute
    NoMethodError:
    undefined method `strip' for #<Nokogiri::XML::Element:0x80cd1240 name="head">

    ./lib/roadie/inliner.rb:78:in`add_missing_structure'

    ./lib/roadie/inliner.rb:41:in `block in execute'

    ./lib/roadie/inliner.rb:66:in`block in adjust_html'

    ./lib/roadie/inliner.rb:65:in `tap'

    ./lib/roadie/inliner.rb:65:in`adjust_html'

    ./lib/roadie/inliner.rb:39:in `execute'

    ./spec/lib/roadie/inliner_spec.rb:8:in`rendering'

    ./spec/lib/roadie/inliner_spec.rb:31:in `block (3 levels) in <top (required)>'

  7. Roadie::Inliner inlining styles should use the ones attributes with the highest specificality when conflicts arises
    Failure/Error: Nokogiri::HTML.parse Roadie::Inliner.new(@css, html, url_options).execute
    NoMethodError:
    undefined method `strip' for #<Nokogiri::XML::Element:0x80ccf418 name="head">

    ./lib/roadie/inliner.rb:78:in`add_missing_structure'

    ./lib/roadie/inliner.rb:41:in `block in execute'

    ./lib/roadie/inliner.rb:66:in`block in adjust_html'

    ./lib/roadie/inliner.rb:65:in `tap'

    ./lib/roadie/inliner.rb:65:in`adjust_html'

    ./lib/roadie/inliner.rb:39:in `execute'

    ./spec/lib/roadie/inliner_spec.rb:8:in`rendering'

    ./spec/lib/roadie/inliner_spec.rb:37:in `block (3 levels) in <top (required)>'

  8. Roadie::Inliner inlining styles should sort styles by specificity order
    Failure/Error: Nokogiri::HTML.parse Roadie::Inliner.new(@css, html, url_options).execute
    NoMethodError:
    undefined method `strip' for #<Nokogiri::XML::Element:0x80cc9004 name="head">

    ./lib/roadie/inliner.rb:78:in`add_missing_structure'

    ./lib/roadie/inliner.rb:41:in `block in execute'

    ./lib/roadie/inliner.rb:66:in`block in adjust_html'

    ./lib/roadie/inliner.rb:65:in `tap'

    ./lib/roadie/inliner.rb:65:in`adjust_html'

    ./lib/roadie/inliner.rb:39:in `execute'

    ./spec/lib/roadie/inliner_spec.rb:8:in`rendering'

    ./spec/lib/roadie/inliner_spec.rb:45:in `block (3 levels) in <top (required)>'

  9. Roadie::Inliner inlining styles should support multiple selectors for the same rules
    Failure/Error: Nokogiri::HTML.parse Roadie::Inliner.new(@css, html, url_options).execute
    NoMethodError:
    undefined method `strip' for #<Nokogiri::XML::Element:0x80c98878 name="head">

    ./lib/roadie/inliner.rb:78:in`add_missing_structure'

    ./lib/roadie/inliner.rb:41:in `block in execute'

    ./lib/roadie/inliner.rb:66:in`block in adjust_html'

    ./lib/roadie/inliner.rb:65:in `tap'

    ./lib/roadie/inliner.rb:65:in`adjust_html'

    ./lib/roadie/inliner.rb:39:in `execute'

    ./spec/lib/roadie/inliner_spec.rb:8:in`rendering'

    ./spec/lib/roadie/inliner_spec.rb:56:in `block (3 levels) in <top (required)>'

  10. Roadie::Inliner inlining styles should respect !important properties
    Failure/Error: Nokogiri::HTML.parse Roadie::Inliner.new(@css, html, url_options).execute
    NoMethodError:
    undefined method strip' for #<Nokogiri::XML::Element:0x80c50064 name="head"> # ./lib/roadie/inliner.rb:78:inadd_missing_structure'
    # ./lib/roadie/inliner.rb:41:in block in execute' # ./lib/roadie/inliner.rb:66:inblock in adjust_html'
    # ./lib/roadie/inliner.rb:65:in tap' # ./lib/roadie/inliner.rb:65:inadjust_html'
    # ./lib/roadie/inliner.rb:39:in execute' # ./spec/lib/roadie/inliner_spec.rb:8:inrendering'
    # ./spec/lib/roadie/inliner_spec.rb:65:in `block (3 levels) in <top (required)>'

  11. Roadie::Inliner inlining styles should combine with already present inline styles
    Failure/Error: Nokogiri::HTML.parse Roadie::Inliner.new(@css, html, url_options).execute
    NoMethodError:
    undefined method strip' for #<Nokogiri::XML::Element:0x80c42270 name="head"> # ./lib/roadie/inliner.rb:78:inadd_missing_structure'
    # ./lib/roadie/inliner.rb:41:in block in execute' # ./lib/roadie/inliner.rb:66:inblock in adjust_html'
    # ./lib/roadie/inliner.rb:65:in tap' # ./lib/roadie/inliner.rb:65:inadjust_html'
    # ./lib/roadie/inliner.rb:39:in execute' # ./spec/lib/roadie/inliner_spec.rb:8:inrendering'
    # ./spec/lib/roadie/inliner_spec.rb:70:in `block (3 levels) in <top (required)>'

  12. Roadie::Inliner inlining styles should not touch already present inline styles
    Failure/Error: Nokogiri::HTML.parse Roadie::Inliner.new(@css, html, url_options).execute
    NoMethodError:
    undefined method strip' for #<Nokogiri::XML::Element:0x80c3087c name="head"> # ./lib/roadie/inliner.rb:78:inadd_missing_structure'
    # ./lib/roadie/inliner.rb:41:in block in execute' # ./lib/roadie/inliner.rb:66:inblock in adjust_html'
    # ./lib/roadie/inliner.rb:65:in tap' # ./lib/roadie/inliner.rb:65:inadjust_html'
    # ./lib/roadie/inliner.rb:39:in execute' # ./spec/lib/roadie/inliner_spec.rb:8:inrendering'
    # ./spec/lib/roadie/inliner_spec.rb:75:in `block (3 levels) in <top (required)>'

  13. Roadie::Inliner inlining styles should ignore selectors with :psuedo-classes
    Failure/Error: Nokogiri::HTML.parse Roadie::Inliner.new(@css, html, url_options).execute
    NoMethodError:
    undefined method strip' for #<Nokogiri::XML::Element:0x80c2344c name="head"> # ./lib/roadie/inliner.rb:78:inadd_missing_structure'
    # ./lib/roadie/inliner.rb:41:in block in execute' # ./lib/roadie/inliner.rb:66:inblock in adjust_html'
    # ./lib/roadie/inliner.rb:65:in tap' # ./lib/roadie/inliner.rb:65:inadjust_html'
    # ./lib/roadie/inliner.rb:39:in execute' # ./spec/lib/roadie/inliner_spec.rb:8:inrendering'
    # ./spec/lib/roadie/inliner_spec.rb:80:in `block (3 levels) in <top (required)>'

  14. Roadie::Inliner making urls absolute should work on image sources
    Failure/Error: Nokogiri::HTML.parse Roadie::Inliner.new(@css, html, url_options).execute
    NoMethodError:
    undefined method strip' for #<Nokogiri::XML::Element:0x807abec8 name="head"> # ./lib/roadie/inliner.rb:78:inadd_missing_structure'
    # ./lib/roadie/inliner.rb:41:in block in execute' # ./lib/roadie/inliner.rb:66:inblock in adjust_html'
    # ./lib/roadie/inliner.rb:65:in tap' # ./lib/roadie/inliner.rb:65:inadjust_html'
    # ./lib/roadie/inliner.rb:39:in execute' # ./spec/lib/roadie/inliner_spec.rb:8:inrendering'
    # ./spec/lib/roadie/inliner_spec.rb:141:in `block (3 levels) in <top (required)>'

  15. Roadie::Inliner making urls absolute should not touch image sources that are already absolute
    Failure/Error: Nokogiri::HTML.parse Roadie::Inliner.new(@css, html, url_options).execute
    NoMethodError:
    undefined method strip' for #<Nokogiri::XML::Element:0x807a9aec name="head"> # ./lib/roadie/inliner.rb:78:inadd_missing_structure'
    # ./lib/roadie/inliner.rb:41:in block in execute' # ./lib/roadie/inliner.rb:66:inblock in adjust_html'
    # ./lib/roadie/inliner.rb:65:in tap' # ./lib/roadie/inliner.rb:65:inadjust_html'
    # ./lib/roadie/inliner.rb:39:in execute' # ./spec/lib/roadie/inliner_spec.rb:8:inrendering'
    # ./spec/lib/roadie/inliner_spec.rb:147:in `block (3 levels) in <top (required)>'

  16. Roadie::Inliner making urls absolute should work on inlined style attributes
    Failure/Error: Nokogiri::HTML.parse Roadie::Inliner.new(@css, html, url_options).execute
    NoMethodError:
    undefined method strip' for #<Nokogiri::XML::Element:0x807a6f2c name="head"> # ./lib/roadie/inliner.rb:78:inadd_missing_structure'
    # ./lib/roadie/inliner.rb:41:in block in execute' # ./lib/roadie/inliner.rb:66:inblock in adjust_html'
    # ./lib/roadie/inliner.rb:65:in tap' # ./lib/roadie/inliner.rb:65:inadjust_html'
    # ./lib/roadie/inliner.rb:39:in execute' # ./spec/lib/roadie/inliner_spec.rb:8:inrendering'
    # ./spec/lib/roadie/inliner_spec.rb:151:in `block (3 levels) in <top (required)>'

  17. Roadie::Inliner making urls absolute should work on external style declarations
    Failure/Error: Nokogiri::HTML.parse Roadie::Inliner.new(@css, html, url_options).execute
    NoMethodError:
    undefined method strip' for #<Nokogiri::XML::Element:0x80791bb8 name="head"> # ./lib/roadie/inliner.rb:78:inadd_missing_structure'
    # ./lib/roadie/inliner.rb:41:in block in execute' # ./lib/roadie/inliner.rb:66:inblock in adjust_html'
    # ./lib/roadie/inliner.rb:65:in tap' # ./lib/roadie/inliner.rb:65:inadjust_html'
    # ./lib/roadie/inliner.rb:39:in execute' # ./spec/lib/roadie/inliner_spec.rb:8:inrendering'
    # ./spec/lib/roadie/inliner_spec.rb:159:in `block (3 levels) in <top (required)>'

  18. Roadie::Inliner making urls absolute should not touch style urls that are already absolute
    Failure/Error: Nokogiri::HTML.parse Roadie::Inliner.new(@css, html, url_options).execute
    NoMethodError:
    undefined method strip' for #<Nokogiri::XML::Element:0x8078dae0 name="head"> # ./lib/roadie/inliner.rb:78:inadd_missing_structure'
    # ./lib/roadie/inliner.rb:41:in block in execute' # ./lib/roadie/inliner.rb:66:inblock in adjust_html'
    # ./lib/roadie/inliner.rb:65:in tap' # ./lib/roadie/inliner.rb:65:inadjust_html'
    # ./lib/roadie/inliner.rb:39:in execute' # ./spec/lib/roadie/inliner_spec.rb:8:inrendering'
    # ./spec/lib/roadie/inliner_spec.rb:167:in `block (3 levels) in <top (required)>'

  19. Roadie::Inliner making urls absolute should not touch the urls when no url options are defined
    Failure/Error: Nokogiri::HTML.parse Roadie::Inliner.new(@css, html, url_options).execute
    NoMethodError:
    undefined method strip' for #<Nokogiri::XML::Element:0x807a6644 name="head"> # ./lib/roadie/inliner.rb:78:inadd_missing_structure'
    # ./lib/roadie/inliner.rb:41:in block in execute' # ./lib/roadie/inliner.rb:66:inblock in adjust_html'
    # ./lib/roadie/inliner.rb:65:in tap' # ./lib/roadie/inliner.rb:65:inadjust_html'
    # ./lib/roadie/inliner.rb:39:in execute' # ./spec/lib/roadie/inliner_spec.rb:8:inrendering'
    # ./spec/lib/roadie/inliner_spec.rb:173:in `block (3 levels) in <top (required)>'

  20. Roadie::Inliner making urls absolute should support port and protocol settings
    Failure/Error: Nokogiri::HTML.parse Roadie::Inliner.new(@css, html, url_options).execute
    NoMethodError:
    undefined method strip' for #<Nokogiri::XML::Element:0x807d6b28 name="head"> # ./lib/roadie/inliner.rb:78:inadd_missing_structure'
    # ./lib/roadie/inliner.rb:41:in block in execute' # ./lib/roadie/inliner.rb:66:inblock in adjust_html'
    # ./lib/roadie/inliner.rb:65:in tap' # ./lib/roadie/inliner.rb:65:inadjust_html'
    # ./lib/roadie/inliner.rb:39:in execute' # ./spec/lib/roadie/inliner_spec.rb:8:inrendering'
    # ./spec/lib/roadie/inliner_spec.rb:181:in `block (3 levels) in <top (required)>'

  21. Roadie::Inliner making urls absolute should not touch data: URIs
    Failure/Error: Nokogiri::HTML.parse Roadie::Inliner.new(@css, html, url_options).execute
    NoMethodError:
    undefined method strip' for #<Nokogiri::XML::Element:0x807f13b0 name="head"> # ./lib/roadie/inliner.rb:78:inadd_missing_structure'
    # ./lib/roadie/inliner.rb:41:in block in execute' # ./lib/roadie/inliner.rb:66:inblock in adjust_html'
    # ./lib/roadie/inliner.rb:65:in tap' # ./lib/roadie/inliner.rb:65:inadjust_html'
    # ./lib/roadie/inliner.rb:39:in execute' # ./spec/lib/roadie/inliner_spec.rb:8:inrendering'
    # ./spec/lib/roadie/inliner_spec.rb:189:in `block (3 levels) in <top (required)>'

  22. Roadie::Inliner inserting tags should insert a doctype if not present
    Failure/Error: Nokogiri::HTML.parse Roadie::Inliner.new(@css, html, url_options).execute
    NoMethodError:
    undefined method strip' for #<Nokogiri::XML::Element:0x80d0a158 name="head"> # ./lib/roadie/inliner.rb:78:inadd_missing_structure'
    # ./lib/roadie/inliner.rb:41:in block in execute' # ./lib/roadie/inliner.rb:66:inblock in adjust_html'
    # ./lib/roadie/inliner.rb:65:in tap' # ./lib/roadie/inliner.rb:65:inadjust_html'
    # ./lib/roadie/inliner.rb:39:in execute' # ./spec/lib/roadie/inliner_spec.rb:8:inrendering'
    # ./spec/lib/roadie/inliner_spec.rb:195:in `block (3 levels) in <top (required)>'

  23. Roadie::Inliner inserting tags should set xmlns of to that of XHTML
    Failure/Error: Nokogiri::HTML.parse Roadie::Inliner.new(@css, html, url_options).execute
    NoMethodError:
    undefined method strip' for #<Nokogiri::XML::Element:0x80dc80a4 name="head"> # ./lib/roadie/inliner.rb:78:inadd_missing_structure'
    # ./lib/roadie/inliner.rb:41:in block in execute' # ./lib/roadie/inliner.rb:66:inblock in adjust_html'
    # ./lib/roadie/inliner.rb:65:in tap' # ./lib/roadie/inliner.rb:65:inadjust_html'
    # ./lib/roadie/inliner.rb:39:in execute' # ./spec/lib/roadie/inliner_spec.rb:8:inrendering'
    # ./spec/lib/roadie/inliner_spec.rb:200:in `block (3 levels) in <top (required)>'

  24. Roadie::Inliner inserting tags should insert basic html structure if not present
    Failure/Error: Nokogiri::HTML.parse Roadie::Inliner.new(@css, html, url_options).execute
    NoMethodError:
    undefined method strip' for #<Nokogiri::XML::Element:0x816800fc name="head"> # ./lib/roadie/inliner.rb:78:inadd_missing_structure'
    # ./lib/roadie/inliner.rb:41:in block in execute' # ./lib/roadie/inliner.rb:66:inblock in adjust_html'
    # ./lib/roadie/inliner.rb:65:in tap' # ./lib/roadie/inliner.rb:65:inadjust_html'
    # ./lib/roadie/inliner.rb:39:in execute' # ./spec/lib/roadie/inliner_spec.rb:8:inrendering'
    # ./spec/lib/roadie/inliner_spec.rb:204:in `block (3 levels) in <top (required)>'

  25. Roadie::Inliner inserting tags should insert if not present
    Failure/Error: Nokogiri::HTML.parse Roadie::Inliner.new(@css, html, url_options).execute
    NoMethodError:
    undefined method strip' for #<Nokogiri::XML::Element:0x816e0588 name="head"> # ./lib/roadie/inliner.rb:78:inadd_missing_structure'
    # ./lib/roadie/inliner.rb:41:in block in execute' # ./lib/roadie/inliner.rb:66:inblock in adjust_html'
    # ./lib/roadie/inliner.rb:65:in tap' # ./lib/roadie/inliner.rb:65:inadjust_html'
    # ./lib/roadie/inliner.rb:39:in execute' # ./spec/lib/roadie/inliner_spec.rb:8:inrendering'
    # ./spec/lib/roadie/inliner_spec.rb:208:in `block (3 levels) in <top (required)>'

Finished in 0.27609 seconds
53 examples, 25 failures
ruby(42763,0x7fff7022fca0) malloc: *** error for object 0x101250008: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
rake aborted!
ruby -S bundle exec rspec -c spec/integration_spec.rb spec/lib/roadie/action_mailer_extensions_spec.rb spec/lib/roadie/css_file_not_found_spec.rb spec/lib/roadie/inliner_spec.rb spec/lib/roadie/style_declaration_spec.rb spec/lib/roadie_spec.rb failed

(See full trace by running task with --trace)

I see. Thanks for the detailed report!

I've released 1.0.1 with this restriction enforced. Thanks for the report!