pax_global_header 0000666 0000000 0000000 00000000064 14333112262 0014507 g ustar 00root root 0000000 0000000 52 comment=33287e89f7a330e1a2c55d15a59ab8ebab72d92f premailer-rails-1.12.0/ 0000775 0000000 0000000 00000000000 14333112262 0014660 5 ustar 00root root 0000000 0000000 premailer-rails-1.12.0/.github/ 0000775 0000000 0000000 00000000000 14333112262 0016220 5 ustar 00root root 0000000 0000000 premailer-rails-1.12.0/.github/workflows/ 0000775 0000000 0000000 00000000000 14333112262 0020255 5 ustar 00root root 0000000 0000000 premailer-rails-1.12.0/.github/workflows/test.yml 0000664 0000000 0000000 00000002675 14333112262 0021771 0 ustar 00root root 0000000 0000000 name: Test on: push: branches: - "*" pull_request: branches: - "*" # Enable triggering CI runs manually. workflow_dispatch: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: test: runs-on: ubuntu-latest continue-on-error: ${{ matrix.experimental }} strategy: fail-fast: false matrix: ruby: - '2.7' - '3.1' action_mailer_version: - 5 - 6 - 7 propshaft: - false - true experimental: - false exclude: - ruby: '3.1' action_mailer_version: 5 - action_mailer_version: 5 propshaft: true - action_mailer_version: 6 propshaft: true include: - ruby: head action_mailer_version: head propshaft: false experimental: true - ruby: head action_mailer_version: head propshaft: true experimental: true steps: - uses: actions/checkout@v3 - name: Set env vars run: | echo "ACTION_MAILER_VERSION=${{ matrix.action_mailer_version }}" >> $GITHUB_ENV echo "PROPSHAFT=${{ matrix.propshaft }}" >> $GITHUB_ENV - uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} bundler-cache: true - run: bundle exec rake premailer-rails-1.12.0/.gitignore 0000664 0000000 0000000 00000000143 14333112262 0016646 0 ustar 00root root 0000000 0000000 *.gem doc/ Gemfile.lock coverage/ spec/rails_app/log/* spec/rails_app/tmp/* .ruby-version /.bundle premailer-rails-1.12.0/.rspec 0000664 0000000 0000000 00000000025 14333112262 0015772 0 ustar 00root root 0000000 0000000 --format doc --color premailer-rails-1.12.0/CHANGELOG.md 0000664 0000000 0000000 00000007121 14333112262 0016472 0 ustar 00root root 0000000 0000000 # Changelog ## v1.12.0 - Lazily load actionmailer (@c960657, #260) - HTTP request for CSS files now have an `Accept: text/css` header (@ElMassimo, #261) - Added support for [Propshaft](https://github.com/rails/propshaft) (@Intrepidd, #277) ## v1.11.1 - Check if `Rails.application` is defined (@pabloh, #250) ## v1.11.0 - Remove `force_encoding!` ## v1.10.3 - Remove upper version constraint for actionmailer ## v1.10.2 - Explicitly check for assets_manifest (@derekwheel, #214) ## v1.10.1 - Catch error when sprockets can't find asset (@kirs, #209) ## v1.10.0 - Drop support for hpricot now that premailer-rails also doesn't support it - Use `Rails.application.assets_manifest` instead of `Rails.application.assets` in Asset Pipeline loader (@kirs, #201) - Introduce `:strategies` config option that allows to control CSS fetching stragies ## v1.9.7 - Use `Rails.root` in `FileSystemLoader` (@stanhu, #195) ## v1.9.6 - Handle `relative_url_root` in when loading CSS from file system ## v1.9.5 - Mention license in gemspec ## v1.9.4 - Improve check for Rails module - Preserve body encoding to prevent garbled mails ## v1.9.3 - Add support for rails' `relative_url_root` config - Fix link tag removal under Hpricot - Pass url to `asset_host` if it responds to `call` - Fixed issue where urls may conflict with folder names. ## v1.9.2 - Update rails dependency to allow rails 5 ## v1.9.1 - Respect data-premailer="ignore" on link tags - Ensure content-transfer-encoding is maintained ## v1.9.0 - Improved CSS loading and caching. - Fixed incompatibility with newer rails and sprockets versions. ## v1.8.2 - `Premailer::Rails::CSSLoaders::NetworkLoader` is more resilient and works even if the Rails asset host is set without a URI scheme. (panthomakos) - Remove stylesheet links from the HTML that have been processed. ## v1.8.1 - Add support for longer fingerprint generated by sprocket 3. ## v1.8.0 - `ActionMailer` interceptors are registered after Rails initialization and no longer when loading this gem. If you were using this gem outside Rails, you'll need to call `Premailer::Rails.register_interceptors` manually. ## v1.7.0 - Register preview hook for the new previewing functionality introduced in rails 4.1.0 - Add example rails application ## v1.6.1 - Remove Nokogiri unicode fix since it's working properly without it by now - Make sure html part comes before text part ## v1.6.0 - Only use asset pipeline if Rails is defined and if compile is true - Depend on actionmailer instead of rails - Check whether `::Rails` is defined before using it - Add ability to skip premailer - Test against multiple action mailer versions on travis - Ensure CSS strings are always UTF-8 encoded - Require premailer version >= 1.7.9 ## v1.5.1 - Prefer precompiled assets over asset pipeline - Improve construction of file URL when requesting from CDN - No longer use open-uri - Remove gzip unzipping after requesting file ## v1.5.0 - No longer support ruby 1.8 - Find linked stylesheets by `rel='stylesheet'` attribute instead of `type='text/css'` - Don't test hpricot on JRuby due to incompatibility ## v1.4.0 - Fix attachments ## v1.3.2 - Rename gem to premailer-rails (drop the 3) - Add support for rails 4 - Refactor code - Add support for precompiled assets - No longer include default `email.css` ## v1.1.0 - Fixed several bugs - Strip asset digest from CSS path - Improve nokogiri support - Request CSS file if asset is not found locally This allows you to host all your assets on a CDN and deploy the app without the `app/assets` folder. Thanks to everyone who contributed! premailer-rails-1.12.0/Gemfile 0000664 0000000 0000000 00000001047 14333112262 0016155 0 ustar 00root root 0000000 0000000 source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } gemspec rails_version = ENV.fetch('ACTION_MAILER_VERSION', '7') if rails_version == 'head' gem 'rails', github: 'rails/rails' if ENV['PROPSHAFT'] == 'true' gem 'propshaft', github: 'rails/propshaft' else gem 'sprockets-rails', github: 'rails/sprockets-rails' end else gem 'rails', "~> #{rails_version}" if ENV['PROPSHAFT'] == 'true' gem 'propshaft' else gem 'sprockets-rails' if rails_version >= '7' end end gem 'byebug' premailer-rails-1.12.0/LICENSE 0000664 0000000 0000000 00000002060 14333112262 0015663 0 ustar 00root root 0000000 0000000 Copyright (C) 2011-2012 Philipe Fatio (fphilipe) 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. premailer-rails-1.12.0/README.md 0000664 0000000 0000000 00000016617 14333112262 0016152 0 ustar 00root root 0000000 0000000 # premailer-rails CSS styled emails without the hassle. [![Build Status][build-image]][build-link] [![Gem Version][gem-image]][gem-link] [![Code Climate][gpa-image]][gpa-link] ## Introduction This gem is a drop in solution for styling HTML emails with CSS without having to do the hard work yourself. Styling emails is not just a matter of linking to a stylesheet. Most clients, especially web clients, ignore linked stylesheets or `
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.