roadie-rails-1.3.0/0000755000004100000410000000000013322307136014116 5ustar www-datawww-dataroadie-rails-1.3.0/.travis.yml0000644000004100000410000000057213322307136016233 0ustar www-datawww-datasudo: false language: ruby rvm: - 2.2 - 2.3 - 2.4 matrix: fast_finish: true cache: directories: - .bundle - spec/railsapps/rails_42/.bundle - spec/railsapps/rails_42_sprockets_rails_3/.bundle - spec/railsapps/rails_50/.bundle - spec/railsapps/rails_51/.bundle - spec/railsapps/rails_52/.bundle bundler_args: --without guard --path=.bundle script: "rake" roadie-rails-1.3.0/README.md0000644000004100000410000002347313322307136015406 0ustar www-datawww-data# roadie-rails [![Build history and status](https://secure.travis-ci.org/Mange/roadie-rails.png)](http://travis-ci.org/#!/Mange/roadie-rails) [![Code Climate](https://codeclimate.com/github/Mange/roadie-rails.png)](https://codeclimate.com/github/Mange/roadie-rails) [![Code coverage status](https://codecov.io/github/Mange/roadie-rails/coverage.svg?branch=master)](https://codecov.io/github/Mange/roadie-rails?branch=master) [![Gem](https://img.shields.io/gem/v/roadie-rails.svg)](https://rubygems.org/gems/roadie-rails) [![Passive maintenance](https://img.shields.io/badge/maintenance-Passive-yellow.svg)][passive] ||| |---|---| | :warning: | This gem is now in [passive maintenance mode][passive] together with `roadie`. [(more)][passive] | > Making HTML emails comfortable for the Rails rockstars. This gem hooks up your Rails application with Roadie to help you generate HTML emails. ## Installation ## [Add this gem to your Gemfile as recommended by Rubygems][gem] and run `bundle install`. ```ruby gem 'roadie-rails', '~> 0.0' ``` ## Usage ## `roadie-rails` have two primary means of usage. The first on is the "Automatic usage", which does almost everything automatically. It's the easiest way to hit the ground running in order to see if `roadie` would be a good fit for your application. As soon as you require some more "advanced" features (congratulations!), you should migrate to the "Manual usage" which entails that you do some things by yourself. ### Automatic usage ### Include the `Roadie::Rails::Automatic` module inside your mailer. Roadie will do its magic when you try to deliver the message: ```ruby class NewsletterMailer < ActionMailer::Base include Roadie::Rails::Automatic def user_newsletter(user) mail to: user.email, subject: subject_for_user(user) end private def subject_for_user(user) I18n.translate 'emails.user_newsletter.subject', name: user.name end end # email has the original body; Roadie has not been invoked yet email = NewsletterMailer.user_newsletter(User.first) # This triggers Roadie inlining and will deliver the email with inlined styles email.deliver ``` By overriding the `#roadie_options` method in the mailer you can disable inlining in certain cases: ```ruby class NewsletterMailer < ActionMailer::Base include Roadie::Rails::Automatic private def roadie_options super unless Rails.env.test? end end ``` Another way: ```ruby describe YourMailer do describe "email contents" do before do # Disable inlining YourMailer.any_instance.stub(:roadie_options).and_return(nil) end # ... end describe "inlined email contents" do # ... end end ``` If you need the extra flexibility, look at the "Manual usage" below. ### Manual usage ### Include the `Roadie::Rails::Mailer` module inside your `ActionMailer` and call `roadie_mail` with the same options that you would pass to `mail`. ```ruby class NewsletterMailer < ActionMailer::Base include Roadie::Rails::Mailer def user_newsletter(user) roadie_mail to: user.email, subject: subject_for_user(user) end private def subject_for_user(user) I18n.translate 'emails.user_newsletter.subject', name: user.name end end ``` This will inline the stylesheets right away, which sadly decreases performance for your tests where you might only want to inline in one of them. The upside is that you can selectively inline yourself. ```ruby class NewsletterMailer < ActionMailer::Base include Roadie::Rails::Mailer def subscriber_newsletter(subscriber, options = {}) use_roadie = options.fetch :use_roadie, true mail_factory(use_roadie, normal_mail_options) end private def mail_factory(use_roadie, options) if use_roadie roadie_mail options else mail options end end end # tests describe NewsletterMailer do it "is emailed to the subscriber's email" do email = NewsletterMailer.subscriber_newsletter(subscriber, use_roadie: false) email.to.should == subscriber.email end it "inlines the emails by default" do email = NewsletterMailer.subscriber_newsletter(subscriber) email.should be_good_and_cool_and_all_that_jazz end end ``` Or, perhaps by doing this: ```ruby describe YourMailer do describe "email contents" do before do # Redirect all roadie mail calls to the normal mail method YourMailer.any_instance.stub(:roadie_mail) { |*args, &block| YourMailer.mail(*args, &block) } end # ... end describe "inlined email contents" do # ... end end ``` ### Configuration ### Roadie can be configured in three places, depending on how specific you want to be: 1. `Rails.application.config.roadie` (global, static). 2. `YourMailer#roadie_options` (mailer, dynamic). 3. Second argument to the `roadie_mail` (mail, specific and custom). You can override at any level in the chain, depending on how specific you need to be. Only the first two methods are available to you if you use the `Automatic` module. ```ruby # config/environments/production.rb config.roadie.url_options = {host: "my-app.com", scheme: "https"} # app/mailer/my_mailer.rb class MyMailer include Roadie::Rails::Mailer protected def roadie_options super.merge(url_options: {host: Product.current.host}) end end # app/mailer/my_other_mailer.rb class MyOtherMailer include Roadie::Rails::Mailer def some_mail(user) roadie_email {to: "foo@example.com"}, roadie_options_for(user) end private def roadie_options_for(user) roadie_options.combine({ asset_providers: [MyCustomProvider.new(user)], url_options: {host: user.subdomain_with_host}, }) end end ``` If you `#merge` you will replace the older value outright: ```ruby def roadie_options original = super original.url_options # => {protocol: "https", host: "foo.com"} new = original.merge(url_options: {host: "bar.com"}) new.url_options # => {host: "bar.com"} new end ``` If you want to combine two values, use `#combine`. `#combine` is closer to `Hash#deep_merge`: ```ruby def roadie_options original = super original.url_options # => {protocol: "https", host: "foo.com"} new = original.combine(url_options: {host: "bar.com"}) new.url_options # => {protocol: "https", host: "bar.com"} new end ``` `#combine` is smarter than `Hash#deep_merge`, though. It can combine callback `proc`s (so both get called) and `Roadie::ProviderList`s as well. If you want to see the available configuration options, see the [Roadie gem][roadie]. ### Templates ### Use normal `stylesheet_link_tag` and `foo_path` methods when generating your email and Roadie will look for the precompiled files on your filesystem, or by asking the asset pipeline to compile the files for you if it cannot be found. ### Previewing ### You can create a controller that gets the email and then renders the body from it. ```ruby class Admin::EmailsController < AdminController def user_newsletter render_email NewsletterMailer.user_newsletter(current_user) end def subscriber_newsletter render_email NewsletterMailer.subscriber_newsletter(Subscriber.first || Subscriber.new) end private def render_email(email) respond_to do |format| format.html { render html: email.html_part.decoded.html_safe } format.text { render text: email.text_part.decoded } end end end ``` ## Known issues ## Roadie will not be able to find your stylesheets if you have an `asset_host` configured and will ignore those lines when inlining. A workaround for this is to not use `asset_host` in your mailers: ```ruby config.action_controller.asset_host = # ... config.action_mailer.asset_host = nil # or class MyMailer < ActionMailer::Base self.asset_host = nil end ``` ## Build status ## Tested with [Travis CI](http://travis-ci.org) using [almost all combinations of](http://travis-ci.org/#!/Mange/roadie-rails): * Ruby: * MRI 2.2 * MRI 2.3 * MRI 2.4 * Rails * 4.2 * 5.0 * 5.1 * 5.2 Let me know if you want any other combination supported officially. ### Versioning ### This project follows [Semantic Versioning][semver]. ## Documentation ## * [Online documentation for gem](https://www.omniref.com/ruby/gems/roadie-rails) * [Online documentation for master](https://www.omniref.com/github/Mange/roadie-rails) * [Changelog](https://github.com/Mange/roadie-rails/blob/master/Changelog.md) ## Running specs ## The default `rake` task will take care of the setup for you. ```bash rake ``` After running `rake` for the first time and you want to keep running tests without having to install all dependencies, you may run `guard`, `rspec` or `rake spec` depending on what you prefer. ## License ## (The MIT License) Copyright © 2013-2018 [Magnus Bergmark](https://github.com/Mange) , et. al. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. [roadie]: http://rubygems.org/gems/roadie [semver]: http://semver.org/ [gem]: http://rubygems.org/gems/roadie-rails [passive]: https://github.com/Mange/roadie/issues/155 roadie-rails-1.3.0/setup.sh0000755000004100000410000000237413322307136015623 0ustar www-datawww-data#!/bin/bash # This cannot be executed from within a Ruby-based environment (like Rake) # since Bundler will affect the subshell environments. set -e function header() { echo -e "\n$(tput setaf 5)$(tput smul)$1:$(tput sgr0)" } function green() { echo $(tput setaf 2)$@$(tput sgr0) } function update() { bundle config --local path .bundle bundle update | grep -ve "^Using " } function install() { bundle install --quiet --path=.bundle && green " OK" } root=$(dirname $0) # Set by Travis CI; interferes with the nested repos unset BUNDLE_GEMFILE if [[ $1 == "install" ]]; then header "Installing gem dependencies" install for app_path in $root/spec/railsapps/rails_*; do ( header "Rails app $(basename $app_path)" cd $app_path echo "Installing gems for $(basename $app_path)" install ) done echo "" elif [[ $1 == "update" ]]; then header "Updating gem dependencies" update for app_path in $root/spec/railsapps/rails_*; do ( cd $app_path header "Updating $(basename $app_path)" update ) done echo "" else echo "Usage: $0 [install|update]" echo "" echo " Install: Install all bundled updates." echo " Update: Run bundle update on all bundles." echo "" exit 127 fi roadie-rails-1.3.0/.gitignore0000644000004100000410000000026113322307136016105 0ustar www-datawww-data*.gem *.rbc .bundle .config .yardoc .ruby-version Gemfile.lock InstalledFiles _yardoc coverage doc/ lib/bundler/man pkg rdoc spec/reports test/tmp test/version_tmp tmp **/*.log roadie-rails-1.3.0/Rakefile0000644000004100000410000000067613322307136015574 0ustar www-datawww-datarequire "bundler/gem_tasks" desc "Install gems for embedded Rails apps" task :install_gems do Bundler.with_clean_env do sh "./setup.sh install" end end desc "Update gems for embedded Rails apps" task :update_gems do Bundler.with_clean_env do sh "./setup.sh update" end end desc "Run specs" task :spec do sh "bundle exec rspec -f progress" end desc "Default: Update gems and run specs" task :default => [:update_gems, :spec] roadie-rails-1.3.0/lib/0000755000004100000410000000000013322307136014664 5ustar www-datawww-dataroadie-rails-1.3.0/lib/roadie-rails.rb0000644000004100000410000000002713322307136017563 0ustar www-datawww-datarequire 'roadie/rails' roadie-rails-1.3.0/lib/roadie/0000755000004100000410000000000013322307136016127 5ustar www-datawww-dataroadie-rails-1.3.0/lib/roadie/rails/0000755000004100000410000000000013322307136017241 5ustar www-datawww-dataroadie-rails-1.3.0/lib/roadie/rails/mailer.rb0000644000004100000410000000044213322307136021037 0ustar www-datawww-datamodule Roadie module Rails module Mailer def roadie_mail(options = {}, &block) email = mail(options, &block) MailInliner.new(email, roadie_options).execute end def roadie_options ::Rails.application.config.roadie end end end end roadie-rails-1.3.0/lib/roadie/rails/version.rb0000644000004100000410000000007513322307136021255 0ustar www-datawww-datamodule Roadie module Rails VERSION = "1.3.0" end end roadie-rails-1.3.0/lib/roadie/rails/railtie.rb0000644000004100000410000000161513322307136021222 0ustar www-datawww-datarequire 'rails' module Roadie module Rails class Railtie < ::Rails::Railtie config.roadie = Roadie::Rails::Options.new initializer "roadie-rails.setup" do |app| config.roadie.asset_providers = [ Roadie::FilesystemProvider.new(::Rails.root.join("public").to_s), ] # Saying config.assets.enabled here does not work in Rails 3.1-3.2, but # APP.config.assets work. There is a difference between "config" and # "app.config" on those versions. if app.config.respond_to?(:assets) && app.config.assets.enabled != false if app.assets config.roadie.asset_providers << AssetPipelineProvider.new(app.assets) else app.config.assets.configure do |env| config.roadie.asset_providers << AssetPipelineProvider.new(env) end end end end end end end roadie-rails-1.3.0/lib/roadie/rails/document_builder.rb0000644000004100000410000000032013322307136023105 0ustar www-datawww-datamodule Roadie module Rails class DocumentBuilder def self.build(html, options) document = Document.new(html) options.apply_to document document end end end end roadie-rails-1.3.0/lib/roadie/rails/asset_pipeline_provider.rb0000644000004100000410000000307513322307136024511 0ustar www-datawww-datamodule Roadie module Rails class AssetPipelineProvider include Roadie::AssetProvider attr_reader :pipeline def initialize(pipeline) raise ArgumentError, "You need to pass a pipeline to initialize AssetPipelineProvider" unless pipeline super() @pipeline = pipeline end def find_stylesheet(name) if (asset = find_asset_in_pipeline(name)) Stylesheet.new("#{filename(asset)} (live compiled)", asset.to_s) end end private def filename(asset) if asset.respond_to?(:filename) # sprockets 4 or later asset.filename else asset.pathname end end def find_asset_in_pipeline(name) normalized_name = normalize_asset_name(name) @pipeline[normalized_name] || @pipeline[remove_asset_digest(normalized_name)] end def normalize_asset_name(href) remove_asset_prefix(href.split('?').first) end DIGEST_PATTERN = / - # Digest comes after a dash (?: [a-z0-9]{32} | # Old style is 32 character hash [a-z0-9]{64} # New style is 64 characters ) \. # Dot for the file extension /x.freeze def remove_asset_digest(path) path.gsub(DIGEST_PATTERN, '.') end def remove_asset_prefix(path) path.sub(Regexp.new("^#{Regexp.quote(asset_prefix)}/?"), "") end def asset_prefix ::Rails.application.try(:config).try(:assets).try(:prefix) || "/assets" end end end end roadie-rails-1.3.0/lib/roadie/rails/options.rb0000644000004100000410000001054613322307136021267 0ustar www-datawww-datamodule Roadie module Rails class Options ATTRIBUTE_NAMES = [ :after_transformation, :asset_providers, :before_transformation, :external_asset_providers, :keep_uninlinable_css, :url_options, ] private_constant :ATTRIBUTE_NAMES attr_reader(*ATTRIBUTE_NAMES) def initialize(options = {}) complain_about_unknown_keys options.keys self.after_transformation = options[:after_transformation] self.asset_providers = options[:asset_providers] self.before_transformation = options[:before_transformation] self.external_asset_providers = options[:external_asset_providers] self.keep_uninlinable_css = options[:keep_uninlinable_css] self.url_options = options[:url_options] end def url_options=(options) @url_options = options end def before_transformation=(callback) @before_transformation = callback end def after_transformation=(callback) @after_transformation = callback end def keep_uninlinable_css=(bool) @keep_uninlinable_css = bool end def asset_providers=(providers) if providers @asset_providers = ProviderList.wrap providers # TODO: Raise an error when setting to nil in order to make this not a silent error. # else # raise ArgumentError, "Cannot set asset_providers to nil. Set to Roadie::NullProvider if you want no external assets inlined." end end def external_asset_providers=(providers) if providers @external_asset_providers = ProviderList.wrap providers # TODO: Raise an error when setting to nil in order to make this not a silent error. # else # raise ArgumentError, "Cannot set asset_providers to nil. Set to Roadie::NullProvider if you want no external assets inlined." end end def apply_to(document) document.url_options = url_options document.before_transformation = before_transformation document.after_transformation = after_transformation document.asset_providers = asset_providers if asset_providers document.external_asset_providers = external_asset_providers if external_asset_providers document.keep_uninlinable_css = keep_uninlinable_css unless keep_uninlinable_css.nil? end def merge(options) dup.merge! options end def merge!(options) ATTRIBUTE_NAMES.each do |attribute| send "#{attribute}=", options.fetch(attribute, send(attribute)) end self end def combine(options) dup.combine! options end def combine!(options) self.after_transformation = combine_callable( after_transformation, options[:after_transformation] ) self.asset_providers = combine_providers( asset_providers, options[:asset_providers] ) self.before_transformation = combine_callable( before_transformation, options[:before_transformation] ) self.external_asset_providers = combine_providers( external_asset_providers, options[:external_asset_providers] ) self.keep_uninlinable_css = options[:keep_uninlinable_css] if options.has_key?(:keep_uninlinable_css) self.url_options = combine_hash( url_options, options[:url_options] ) self end private def combine_hash(first, second) combine_nilable(first, second) do |a, b| a.merge(b) end end def combine_callable(first, second) combine_nilable(first, second) do |a, b| proc { |*args| a.call(*args); b.call(*args) } end end def combine_providers(first, second) combine_nilable(first, second) do |a, b| ProviderList.new(a.to_a + Array.wrap(b)) end end def combine_nilable(first, second) if first && second yield first, second else first ? first : second end end def complain_about_unknown_keys(keys) invalid_keys = keys - ATTRIBUTE_NAMES if invalid_keys.size > 0 raise ArgumentError, "Unknown configuration parameters: #{invalid_keys}", caller(1) end end end end end roadie-rails-1.3.0/lib/roadie/rails/automatic.rb0000644000004100000410000000050513322307136021554 0ustar www-datawww-datamodule Roadie module Rails module Automatic def mail(*args, &block) super.tap do |email| email.extend InlineOnDelivery email.roadie_options = roadie_options.try(:dup) end end def roadie_options ::Rails.application.config.roadie end end end end roadie-rails-1.3.0/lib/roadie/rails/mail_inliner.rb0000644000004100000410000000132513322307136022231 0ustar www-datawww-datamodule Roadie module Rails class MailInliner attr_reader :email, :options def initialize(email, options) @email = email @options = options end def execute if options improve_body if email.content_type =~ /^text\/html/ improve_html_part(email.html_part) if email.html_part end email end private def improve_body email.body = transform_html(email.body.decoded) end def improve_html_part(html_part) html_part.body = transform_html(html_part.body.decoded) end def transform_html(old_html) DocumentBuilder.build(old_html, options).transform end end end end roadie-rails-1.3.0/lib/roadie/rails/inline_on_delivery.rb0000644000004100000410000000107013322307136023441 0ustar www-datawww-datamodule Roadie module Rails # Extend instances of Mail with this to have it inlined automatically when # delivered. You'll need to assign some #roadie_options for it to actually # do anything. module InlineOnDelivery attr_accessor :roadie_options def deliver inline_styles super end def deliver! inline_styles super end private def inline_styles if (options = roadie_options) MailInliner.new(self, options).execute end end end end end roadie-rails-1.3.0/lib/roadie/rails.rb0000644000004100000410000000060013322307136017562 0ustar www-datawww-datamodule Roadie module Rails end end require "roadie" require "roadie/rails/version" require "roadie/rails/options" require "roadie/rails/document_builder" require "roadie/rails/mail_inliner" require "roadie/rails/asset_pipeline_provider" require "roadie/rails/mailer" require "roadie/rails/automatic" require "roadie/rails/inline_on_delivery" require "roadie/rails/railtie" roadie-rails-1.3.0/Guardfile0000644000004100000410000000057713322307136015754 0ustar www-datawww-datarspec_options = { cmd: 'rspec -f documentation', fail_mode: :keep, all_after_pass: true, all_on_start: true, run_all: {cmd: 'rspec -f progress'} } guard :rspec, rspec_options do watch(%r{^spec/.+_spec\.rb$}) watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } watch('spec/spec_helper.rb') { "spec" } watch(%r{^spec/support/.+\.rb$}) { "spec" } end roadie-rails-1.3.0/Gemfile0000644000004100000410000000065013322307136015412 0ustar www-datawww-datasource 'https://rubygems.org' # Specify your gem's dependencies in roadie-rails.gemspec gemspec # Additional development dependencies I use but don't want to declare in the # gemfile since they aren't required to develop this codebase. group :development do gem 'guard' gem 'guard-rspec' end # Added here so it does not show up on the Gemspec; I only want it for CI builds gem 'codecov', group: :test, require: false roadie-rails-1.3.0/Upgrading.md0000644000004100000410000000365513322307136016371 0ustar www-datawww-data# Upgrading from Roadie 2 ## Project Start by adding `roadie-rails` to your `Gemfile`. Remember to specify version requirements! You'll need to change your configuration too. The main change is that Roadie now uses its own configuration for URL options: ```ruby config.roadie.url_options = {host: "myapp.com"} ``` Most other options should be easy to convert: ```ruby config.roadie.enabled => Removed # Override `#roadie_options` in the mailers to control enabling (if using Automatic) or do it manually (if using Mailer). config.roadie.before_inlining => config.roadie.before_transformation config.roadie.provider => config.roadie.asset_providers ``` ## Mailers Next, find all mailers that you want to inline and include the `Roadie::Rails::Automatic` module: ```ruby class MyMailer < ActionMailer::Base include Roadie::Rails::Automatic def cool_mail mail(options) end end ``` You'll also need to remove any uses of the `:css` option to `mail` and `default_options`. Include CSS files by using `stylesheet_link_tag` instead. **Before:** ```ruby class MyMailer < ActionMailer::Base defaults css: :email def cool mail(css: [:email, :cool]) end end ``` **After:** ```erb <%= stylesheet_link_tag :email, :cool %> ``` ## Views Search through your templates after uses of `data-immutable` and change them to `data-roadie-ignore`. ## Tests If your tests relied on the styles being applied, they will fail unless you deliver the email. `Roadie::Rails::Automatic` does not inline stylesheets when you don't deliver the email. Either change how your tests work, or call `deliver` on the generated emails where you need it. If the problem is major, switch from `Roadie::Rails::Automatic` to `Roadie::Rails::Mailer` and follow the instructions in the documentation. ## Custom asset providers The API has changed a bit. Read the new examples in the README and you should be able to convert without any great effort. roadie-rails-1.3.0/roadie-rails.gemspec0000644000004100000410000000251013322307136020034 0ustar www-datawww-data# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'roadie/rails/version' Gem::Specification.new do |spec| spec.name = "roadie-rails" spec.version = Roadie::Rails::VERSION spec.authors = ["Magnus Bergmark"] spec.email = ["magnus.bergmark@gmail.com"] spec.homepage = 'http://github.com/Mange/roadie-rails' spec.summary = %q{Making HTML emails comfortable for the Rails rockstars} spec.description = %q{Hooks Roadie into your Rails application to help with email generation.} spec.license = "MIT" spec.required_ruby_version = ">= 2.2" spec.files = `git ls-files | grep -v ^spec`.split($/) spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.extra_rdoc_files = %w[README.md Changelog.md LICENSE.txt] spec.require_paths = ["lib"] spec.add_dependency "roadie", "~> 3.1" spec.add_dependency "railties", ">= 3.0", "< 5.3" spec.add_development_dependency "rails", ">= 4.2", "< 5.3" spec.add_development_dependency "bundler", "~> 1.6" spec.add_development_dependency "rspec", "~> 3.0" spec.add_development_dependency "rspec-rails" spec.add_development_dependency "rspec-collection_matchers" end roadie-rails-1.3.0/LICENSE.txt0000644000004100000410000000211013322307136015733 0ustar www-datawww-dataCopyright (c) 2013-2017 Magnus Bergmark, and contributors. MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. roadie-rails-1.3.0/Changelog.md0000644000004100000410000000726513322307136016341 0ustar www-datawww-data### development version [full changelog](https://github.com/Mange/roadie-rails/compare/v1.3.0...master) * Nothing yet. ### 1.3.0 [full changelog](https://github.com/Mange/roadie-rails/compare/v1.2.1...v1.3.0) * Dropped support for Rubunius and JRuby. * They do not have many users and are a constant source of problems. If this is a problem for you, let me know and I might reconsider. * Add support for Rails 5.2. ### 1.2.1 [full changelog](https://github.com/Mange/roadie-rails/compare/v1.2.0...v1.2.1) * Don't allow installation in Ruby < 2.2. * Fix install on Windows machines. * Less bloat in gem file, making it much smaller. ### 1.2.0 [full changelog](https://github.com/Mange/roadie-rails/compare/v1.1.1...v1.2.0) **Note:** Support for Rails < 4.2 is now dropped. **Note:** Support for Ruby < 2.2 is now dropped. * Sprockets 4.0 support (#60) - [Miklós Fazekas (mfazekas)](https://github.com/mfazekas) * Rails 5.1 support (#70) - [Gleb Mazovetskiy (glebm)](https://github.com/glebm) ### 1.1.1 [full changelog](https://github.com/Mange/roadie-rails/compare/v1.1.0...v1.1.1) * Add support for Rails 5.0 (#50) — [Scott Ringwelski (sgringwe)](https://github.com/sgringwe) * Also build on Ruby 2.3.0. ### 1.1.0 [full changelog](https://github.com/Mange/roadie-rails/compare/v1.1.0.rc2...v1.1.0) * Bug fixes: * Support for sprockets-rails 3 (#46) — [Rafael Mendonça França (rafaelfranca)](https://github.com/rafaelfranca) * Support `Mailer#deliver!` in `AutomaticMailer` (#47) — [Julien Vanier (monkbroc)](https://github.com/monkbroc) ### 1.1.0.rc2 [full changelog](https://github.com/Mange/roadie-rails/compare/v1.1.0.rc1...v1.1.0.rc2) * Add support for `roadie`'s `external_asset_providers` option. ### 1.1.0.rc1 [full changelog](https://github.com/Mange/roadie-rails/compare/v1.0.6...v1.1.0.rc1) * Add support for `roadie`'s `keep_uninlinable_css` option. ### 1.0.6 [full changelog](https://github.com/Mange/roadie-rails/compare/v1.0.5...v1.0.6) * Bug fixes: * Support Sprockets 3's new hash length (#41) ### 1.0.5 [full changelog](https://github.com/Mange/roadie-rails/compare/v1.0.4...v1.0.5) * Enhancements: * Remove dependency on `rails` in favor of `railties` — [Mark J. Titorenko (mjtko)](https://github.com/mjtko) * Bug fixes: * Support for Rails 4.2 default configuration — [Tomas Celizna (tomasc)](https://github.com/tomasc) * It's possible to inline assets with a digest (hash at the end of the filename), which is how Rails 4.2 defaults to, even when assets are not stored on disk. ### 1.0.4 [full changelog](https://github.com/Mange/roadie-rails/compare/v1.0.3...v1.0.4) * Enhancements: * Support for Rails 4.2 — [Ryunosuke SATO (tricknotes)](https://github.com/tricknotes) ### 1.0.3 [full changelog](https://github.com/Mange/roadie-rails/compare/v1.0.2...v1.0.3) * Bug fixes * Don't change `asset_providers` of a `Roadie::Document` when applying Options with no `asset_providers` set. * Support assets inside subdirectories. * Don't add `AssetPipelineProvider` when asset pipeline is unavailable (e.g. inside Rails engines). * Raise error when initializing `AssetPipelineProvider` with `nil` provider. ### 1.0.2 [full changelog](https://github.com/Mange/roadie-rails/compare/v1.0.1...v1.0.2) * Bug fixes * Don't crash on `nil` `roadie_options` ### 1.0.1 [full changelog](https://github.com/Mange/roadie-rails/compare/v1.0.0...v1.0.1) * Bug fixes * Inline HTML in emails without a plaintext part ### 1.0.0 [full changelog](https://github.com/Mange/roadie-rails/compare/v1.0.0.pre1...v1.0.0) * Use released version of Roadie 3.0.0 ### 1.0.0.pre1 [full changelog](https://github.com/Mange/roadie-rails/compare/0000000...v1.0.0.pre1) * First implementation roadie-rails-1.3.0/codecov.yml0000644000004100000410000000010113322307136016253 0ustar www-datawww-dataignore: - ".bundle/**/*" - "./spec/railsapps/*/.bundle/**/*"