inky-rb icon indicating copy to clipboard operation
inky-rb copied to clipboard

Any plan to support other than rails?

Open sjoonk opened this issue 8 years ago • 9 comments

It seems this gem run only rails env. Do you have any plan to support other than rails like Sinatra, etc.?

sjoonk avatar Jul 01 '16 06:07 sjoonk

This seems like it would be pretty easy to do. I've never created a Tilt-compliant template engine before. Sinatra's relevant docs.

shreve avatar Jul 04 '16 15:07 shreve

@sjoonk @shreve We'd happily accept a PR to do so, otherwise it may be a little while before we get this to happen.

kball avatar Jul 26 '16 20:07 kball

@kball Somewhat related followup - within rails, does it support Rails-API (4 or 5) only projects? Or does it make certain assumptions that one should be aware of?

oyeanuj avatar Sep 09 '16 04:09 oyeanuj

@oyeanuj I use it in a Rails API 5 project, the only possibly related change i had to make was to re-add support for the asset-pipeline, but I think thats to do with gem 'foundation_emails' that uses inky-rb in reality. Something to be aware of at least.

redroot avatar Sep 09 '16 08:09 redroot

@redroot thanks for your response. So did you just add sprocket-rails gem? I am having trouble with getting it to work. Do you, by any chance, remember the steps/configuration/gems you added to get this to work?

oyeanuj avatar Sep 22 '16 05:09 oyeanuj

@oyeanuj I had to uncomment / add this line at the top of application.rb near the other railties: require "sprockets/railtie" and add a new initializer called assets.rb with the following

# Be sure to restart your server when you modify this file.

 # Version of your assets, change this if you want to expire all your assets.
 Rails.application.config.assets.version = '1.0'

redroot avatar Sep 22 '16 09:09 redroot

FWIW, I've added automatic tests for Rails 3, 4 & 5. I didn't have anything special to do to make it work with either versions once my config was working with all versions.

marcandre avatar Oct 15 '16 18:10 marcandre

I'm starting to look at how to use inky in a non-web environment too, in this case a rabbitmq consuming service that sends email. It only uses actionmailer from the Rails stack. I've got the templating somewhat working by pulling the TemplateHandler class into the app, but not the inlining.

ryanwi avatar Nov 10 '16 23:11 ryanwi

@ryanwi As per the doc, for the CSS inlining use either premailer or roadie

marcandre avatar Nov 11 '16 08:11 marcandre