inky-rb
inky-rb copied to clipboard
Any plan to support other than rails?
It seems this gem run only rails env. Do you have any plan to support other than rails like Sinatra, etc.?
This seems like it would be pretty easy to do. I've never created a Tilt-compliant template engine before. Sinatra's relevant docs.
@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 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 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 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 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'
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.
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 As per the doc, for the CSS inlining use either premailer
or roadie