pax_global_header00006660000000000000000000000064147137450010014514gustar00rootroot0000000000000052 comment=349dca79e6a6868a00a2528720da2c4b420da47f roadie-rails-3.3.0/000077500000000000000000000000001471374500100140725ustar00rootroot00000000000000roadie-rails-3.3.0/.github/000077500000000000000000000000001471374500100154325ustar00rootroot00000000000000roadie-rails-3.3.0/.github/workflows/000077500000000000000000000000001471374500100174675ustar00rootroot00000000000000roadie-rails-3.3.0/.github/workflows/main.yml000066400000000000000000000031141471374500100211350ustar00rootroot00000000000000name: Main on: schedule: # Run on the first day of every month # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule - cron: '0 0 1 * *' # Allow running manually # For more details: https://docs.github.com/en/actions/using-workflows/manually-running-a-workflow?tool=webui workflow_dispatch: push: branches: - main - master paths-ignore: - '**.md' - '**.txt' pull_request: types: [opened, synchronize, reopened] jobs: base: name: Ruby ${{ matrix.ruby }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: ruby: - "2.7" - "3.0" - "3.1" - "3.2" - "3.3" steps: - name: Checkout code uses: actions/checkout@v4 # This setup is not compatible with the way Travis CI was # setup, so the cache will only work for the root folder. - name: Setup Ruby uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} bundler-cache: true - name: Rake run: bundle exec rake - uses: codecov/codecov-action@v4 lint: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v4 # This setup is not compatible with the way Travis CI was # setup, so the cache will only work for the root folder. - name: Setup Ruby uses: ruby/setup-ruby@v1 with: ruby-version: "3.3" bundler-cache: true - name: standardrb run: bundle exec standardrb roadie-rails-3.3.0/.gitignore000066400000000000000000000002611471374500100160610ustar00rootroot00000000000000*.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-3.3.0/.rubocop.yml000066400000000000000000000025571471374500100163550ustar00rootroot00000000000000AllCops: TargetRubyVersion: 2.5 Exclude: - spec/railsapps/**/* Naming/FileName: Exclude: # This is named intentionally this way (the gem name), in case someone # includes it instead of "roadie/rails". - lib/roadie-rails.rb Style/StringLiterals: EnforcedStyle: double_quotes Style/TrailingCommaInHashLiteral: EnforcedStyleForMultiline: comma Style/TrailingCommaInArguments: EnforcedStyleForMultiline: comma Style/TrailingCommaInArrayLiteral: EnforcedStyleForMultiline: consistent_comma Layout/SpaceInsideHashLiteralBraces: EnforcedStyle: no_space Style/Documentation: Enabled: false Layout/FirstArrayElementIndentation: EnforcedStyle: consistent Layout/MultilineMethodCallIndentation: EnforcedStyle: indented Layout/EmptyLinesAroundAccessModifier: Enabled: false Style/GuardClause: Enabled: false Style/IfUnlessModifier: Enabled: false Style/SignalException: Enabled: false Style/BlockDelimiters: Enabled: true EnforcedStyle: braces_for_chaining Exclude: - 'spec/**/*' Metrics/BlockLength: ExcludedMethods: - refine - describe - context - shared_examples Exclude: - 'Rakefile' - '**/*.rake' - 'spec/*_spec.rb' - 'spec/**/*_spec.rb' - 'spec/shared_examples/*.rb' Layout/LineLength: IgnoredPatterns: - '^\s*it\s' # Test names can be long Exclude: - roadie-rails.gemspec roadie-rails-3.3.0/.solargraph.yml000066400000000000000000000003321471374500100170330ustar00rootroot00000000000000--- include: - "**/*.rb" exclude: - spec/**/* - test/**/* - vendor/**/* - ".bundle/**/*" require: [] domains: [] plugins: - solargraph-standardrb reporters: - standardrb require_paths: [] max_files: 5000 roadie-rails-3.3.0/.standard.yml000066400000000000000000000000411471374500100164660ustar00rootroot00000000000000ruby_version: 2.6 parallel: true roadie-rails-3.3.0/Changelog.md000066400000000000000000000134111471374500100163030ustar00rootroot00000000000000### development version [full changelog](https://github.com/Mange/roadie-rails/compare/v3.3.0...master) ### 3.3.0 [full changelog](https://github.com/Mange/roadie-rails/compare/v3.2.0...v3.3.0) - Add support for Rails 8.0 - [Andrea Fomera](https://github.com/afomera) ### 3.2.0 [full changelog](https://github.com/Mange/roadie-rails/compare/v3.1.0...v3.2.0) - Support [Propshaft](https://github.com/rails/propshaft) - [Juani Villarejo](https://github.com/jvillarejo) [#114](https://github.com/Mange/roadie-rails/pull/114) - Add support (CI) for Ruby 3.3. - Last version for supporting Ruby 2.6 (EoL). ### 3.1.0 [full changelog](https://github.com/Mange/roadie-rails/compare/v3.0.0...v3.1.0) - Support Rails 7.1 - [Frederik Spang](https://github.com/frederikspang) - Add support for Ruby 3.2. Development changes: - Fix Github CI lint job with standardrb. ### 3.0.0 [full changelog](https://github.com/Mange/roadie-rails/compare/v2.3.0...v3.0.0) - Drop support for Ruby versions < 2.6. - Add support for Ruby 3.0 and 3.1. Development changes: - Replace Travis CI with Github CI. ### 2.3.0 [full changelog](https://github.com/Mange/roadie-rails/compare/v2.2.0...v2.3.0) - Support Rails 7.0 - [Sean Floyd (SeanLF)](https://github.com/SeanLF) - Drop support for Ruby 2.5 (EoL). ### 2.2.0 [full changelog](https://github.com/Mange/roadie-rails/compare/v2.1.1...v2.2.0) - Support Rails 6.1 - [A. Fomera (afomera)](https://github.com/afomera) ### 2.1.1 [full changelog](https://github.com/Mange/roadie-rails/compare/v2.1.0...v2.1.1) - Relax Roadie dependency to allow v4.x Development changes: - Updated embedded Rails apps (used in tests) to work with new Sprockets 4. - Updated Rubocop config to work with newer Rubocop versions. ### 2.1.0 [full changelog](https://github.com/Mange/roadie-rails/compare/v2.0.0...v2.1.0) - Rails 6 support (#88) - [Gleb Mazovetskiy (glebm)](https://github.com/glebm) ### 2.0.0 [full changelog](https://github.com/Mange/roadie-rails/compare/v1.3.0...v2.0.0) - Drop support for Ruby before 2.5. - Drop support for Rails before 5.1. - Add support for Ruby 2.5. - Add support for Ruby 2.6. - Fix arity of `Roadie::Rails::Mailer#roadie_mail` - [Adrian Lehmann (ownadi)](https://github.com/ownadi) ### 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-3.3.0/Gemfile000066400000000000000000000007341471374500100153710ustar00rootroot00000000000000# frozen_string_literal: true source "https://rubygems.org" # Specify your gem's dependencies in roadie-rails.gemspec gemspec # Added here so it does not show up on the Gemspec; I only want it for CI builds gem "simplecov", group: :test, require: false gem "simplecov-cobertura", group: :test, require: false # Not actually required to run the tests for the gem, but a real convenience # for local development. gem "standard", group: [:test, :development], require: false roadie-rails-3.3.0/LICENSE.txt000066400000000000000000000021101471374500100157070ustar00rootroot00000000000000Copyright (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-3.3.0/README.md000066400000000000000000000237451471374500100153640ustar00rootroot00000000000000# roadie-rails [![Build history and status](https://github.com/Mange/roadie-rails/actions/workflows/main.yml/badge.svg)](https://github.com/Mange/roadie-rails/actions/workflows/main.yml) [![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' ``` ## 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_mail {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 Github Actions on multiple Ruby and Rails versions: * Ruby: See [Workflow Matrix](/.github/workflows/main.yml) * Rails See [Integration Spec File](/spec/integration_spec.rb) Please note that [all Rails-versions are not compatible with all Ruby-versions](https://www.fastruby.io/blog/ruby/rails/versions/compatibility-table.html). 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-2022 [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-3.3.0/Rakefile000066400000000000000000000007411471374500100155410ustar00rootroot00000000000000# frozen_string_literal: true require "bundler/gem_tasks" desc "Install gems for embedded Rails apps" task :install_gems do Bundler.with_unbundled_env do sh "./setup.sh install" end end desc "Update gems for embedded Rails apps" task :update_gems do Bundler.with_unbundled_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: %i[update_gems spec] roadie-rails-3.3.0/Upgrading.md000066400000000000000000000036551471374500100163450ustar00rootroot00000000000000# 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-3.3.0/codecov.yml000066400000000000000000000001011471374500100162270ustar00rootroot00000000000000ignore: - ".bundle/**/*" - "./spec/railsapps/*/.bundle/**/*" roadie-rails-3.3.0/flake.lock000066400000000000000000000027261471374500100160350ustar00rootroot00000000000000{ "nodes": { "flake-utils": { "inputs": { "systems": "systems" }, "locked": { "lastModified": 1726560853, "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", "owner": "numtide", "repo": "flake-utils", "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", "type": "github" }, "original": { "owner": "numtide", "repo": "flake-utils", "type": "github" } }, "nixpkgs": { "locked": { "lastModified": 1730963269, "narHash": "sha256-rz30HrFYCHiWEBCKHMffHbMdWJ35hEkcRVU0h7ms3x0=", "owner": "NixOS", "repo": "nixpkgs", "rev": "83fb6c028368e465cd19bb127b86f971a5e41ebc", "type": "github" }, "original": { "owner": "NixOS", "ref": "nixos-24.05", "repo": "nixpkgs", "type": "github" } }, "root": { "inputs": { "flake-utils": "flake-utils", "nixpkgs": "nixpkgs" } }, "systems": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "owner": "nix-systems", "repo": "default", "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "type": "github" }, "original": { "owner": "nix-systems", "repo": "default", "type": "github" } } }, "root": "root", "version": 7 } roadie-rails-3.3.0/flake.nix000066400000000000000000000006571471374500100157040ustar00rootroot00000000000000{ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; flake-utils.url = "github:numtide/flake-utils"; }; outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; in { devShell = with pkgs; mkShell { buildInputs = [ ruby_3_2 libyaml ]; }; }); } roadie-rails-3.3.0/lib/000077500000000000000000000000001471374500100146405ustar00rootroot00000000000000roadie-rails-3.3.0/lib/roadie-rails.rb000066400000000000000000000000661471374500100175420ustar00rootroot00000000000000# frozen_string_literal: true require "roadie/rails" roadie-rails-3.3.0/lib/roadie/000077500000000000000000000000001471374500100161035ustar00rootroot00000000000000roadie-rails-3.3.0/lib/roadie/rails.rb000066400000000000000000000007541471374500100175500ustar00rootroot00000000000000# frozen_string_literal: true module Roadie module Rails end end require "roadie" require "roadie/rails/version" require "roadie/rails/utils" require "roadie/rails/options" require "roadie/rails/document_builder" require "roadie/rails/mail_inliner" require "roadie/rails/asset_pipeline_provider" require "roadie/rails/asset_propshaft_provider" require "roadie/rails/mailer" require "roadie/rails/automatic" require "roadie/rails/inline_on_delivery" require "roadie/rails/railtie" roadie-rails-3.3.0/lib/roadie/rails/000077500000000000000000000000001471374500100172155ustar00rootroot00000000000000roadie-rails-3.3.0/lib/roadie/rails/asset_pipeline_provider.rb000066400000000000000000000032341471374500100244620ustar00rootroot00000000000000# frozen_string_literal: true module Roadie module Rails class AssetPipelineProvider include Roadie::AssetProvider attr_reader :pipeline def initialize(pipeline) unless pipeline raise( ArgumentError, "You need to pass a pipeline to initialize AssetPipelineProvider" ) end 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 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-3.3.0/lib/roadie/rails/asset_propshaft_provider.rb000066400000000000000000000022401471374500100246570ustar00rootroot00000000000000# frozen_string_literal: true module Roadie module Rails class AssetPropshaftProvider include Roadie::AssetProvider def initialize(assembly) @assembly = assembly @stylesheets = {} end def find_stylesheet(stylesheet_asset_path) stylesheet = @stylesheets[stylesheet_asset_path] return stylesheet if stylesheet.present? path, digest = extract_path_and_digest(stylesheet_asset_path) asset = @assembly.load_path.find(path) if asset.present? && asset.fresh?(digest) compiled_content = @assembly.compilers.compile(asset) stylesheet = Stylesheet.new(stylesheet_asset_path, compiled_content.force_encoding("UTF-8")) @stylesheets[stylesheet_asset_path] = stylesheet end stylesheet end private def extract_path_and_digest(stylesheet_asset_path) full_path = stylesheet_asset_path.sub(%r{#{::Rails.configuration.assets.prefix}/}, "") digest = full_path[/-([0-9a-zA-Z]{7,128})\.(?!digested)[^.]+\z/, 1] path = digest ? full_path.sub("-#{digest}", "") : full_path [path, digest] end end end end roadie-rails-3.3.0/lib/roadie/rails/automatic.rb000066400000000000000000000005441471374500100215330ustar00rootroot00000000000000# frozen_string_literal: true module 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-3.3.0/lib/roadie/rails/document_builder.rb000066400000000000000000000003571471374500100230730ustar00rootroot00000000000000# frozen_string_literal: true module 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-3.3.0/lib/roadie/rails/inline_on_delivery.rb000066400000000000000000000011271471374500100234200ustar00rootroot00000000000000# frozen_string_literal: true module 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-3.3.0/lib/roadie/rails/mail_inliner.rb000066400000000000000000000013731471374500100222100ustar00rootroot00000000000000# frozen_string_literal: true module 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 %r{^text/html}.match?(email.content_type) 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-3.3.0/lib/roadie/rails/mailer.rb000066400000000000000000000010101471374500100210030ustar00rootroot00000000000000# frozen_string_literal: true module Roadie module Rails module Mailer # Generate an email and run Roadie on it. Will use #roadie_options to get # default options if not passed in. def roadie_mail( options = {}, final_roadie_options = roadie_options, &block ) email = mail(options, &block) MailInliner.new(email, final_roadie_options).execute end def roadie_options ::Rails.application.config.roadie end end end end roadie-rails-3.3.0/lib/roadie/rails/options.rb000066400000000000000000000064461471374500100212470ustar00rootroot00000000000000# frozen_string_literal: true module Roadie module Rails class Options ATTRIBUTE_NAMES = %i[ after_transformation asset_providers before_transformation external_asset_providers keep_uninlinable_css url_options ].freeze private_constant :ATTRIBUTE_NAMES attr_reader(*ATTRIBUTE_NAMES) attr_writer( :url_options, :before_transformation, :after_transformation, :keep_uninlinable_css ) def initialize(options = {}) complain_about_unknown_keys options.keys options.each_pair do |name, value| self[name] = value end end def asset_providers=(providers) # TODO: Raise an error when setting to nil in order to make this not a # silent error. if providers @asset_providers = ProviderList.wrap providers end end def external_asset_providers=(providers) # TODO: Raise an error when setting to nil in order to make this not a # silent error. if providers @external_asset_providers = ProviderList.wrap providers 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 if external_asset_providers document.external_asset_providers = external_asset_providers end unless keep_uninlinable_css.nil? document.keep_uninlinable_css = keep_uninlinable_css end end def merge(options) dup.merge! options end def merge!(options) ATTRIBUTE_NAMES.each do |attribute| self[attribute] = options.fetch(attribute, self[attribute]) end self end def combine(options) dup.combine! options end def combine!(options) %i[after_transformation before_transformation].each do |name| self[name] = Utils.combine_callable(self[name], options[name]) end %i[asset_providers external_asset_providers].each do |name| self[name] = Utils.combine_providers(self[name], options[name]) end if options.key?(:keep_uninlinable_css) self.keep_uninlinable_css = options[:keep_uninlinable_css] end self.url_options = Utils.combine_hash( url_options, options[:url_options] ) self end def [](option) if ATTRIBUTE_NAMES.include?(option) public_send(option) else raise ArgumentError, "#{option.inspect} is not a valid option" end end def []=(option, value) if ATTRIBUTE_NAMES.include?(option) public_send(:"#{option}=", value) else raise ArgumentError, "#{option.inspect} is not a valid option" end end private def complain_about_unknown_keys(keys) invalid_keys = keys - ATTRIBUTE_NAMES unless invalid_keys.empty? raise( ArgumentError, "Unknown configuration parameters: #{invalid_keys}", caller(1) ) end end end end end roadie-rails-3.3.0/lib/roadie/rails/railtie.rb000066400000000000000000000016321471374500100211750ustar00rootroot00000000000000# frozen_string_literal: true require "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) ] if app.config.respond_to?(:assets) && app.config.assets if app.assets config.roadie.asset_providers << AssetPipelineProvider.new(app.assets) elsif defined?(Propshaft) config.after_initialize do |app| config.roadie.asset_providers << AssetPropshaftProvider.new(app.assets) end else app.config.assets.configure do |env| config.roadie.asset_providers << AssetPipelineProvider.new(env) end end end end end end end roadie-rails-3.3.0/lib/roadie/rails/utils.rb000066400000000000000000000033601471374500100207040ustar00rootroot00000000000000# frozen_string_literal: true module Roadie module Rails module Utils module_function # Combine two hashes, or return the non-nil hash if either is nil. # Returns nil if both are nil. def combine_hash(first, second) combine_nilable(first, second) do |a, b| a.merge(b) end end # Return a callable that will call both inputs. If either is nil, then # just return the other. # # The result from the second one will be the result of the combined # callable. # # ```ruby # combine_callable(-> { 1 }, -> { 2 }).call # => 2 # combine_callable(-> { 1 }, nil).call # => 1 # combine_callable(nil, nil).nil? # => true # ``` def combine_callable(first, second) combine_nilable(first, second) do |a, b| lambda do |*args| a.call(*args) b.call(*args) end end end # Combine two Provider ducks into a ProviderList. If either is nil, pick # the non-nil value instead. def combine_providers(first, second) combine_nilable(first, second) do |a, b| ProviderList.new(a.to_a + Array.wrap(b)) end end # Discard the nil value. If neither is nil, then yield both and return # the result from the block. # # ```ruby # combine_nilable(nil, 5) { |a, b| a+b } # => 5 # combine_nilable(7, nil) { |a, b| a+b } # => 7 # combine_nilable(nil, nil) { |a, b| a+b } # => nil # combine_nilable(7, 5) { |a, b| a+b } # => 12 # ``` def combine_nilable(first, second) if first && second yield first, second else first || second end end end end end roadie-rails-3.3.0/lib/roadie/rails/version.rb000066400000000000000000000001341471374500100212250ustar00rootroot00000000000000# frozen_string_literal: true module Roadie module Rails VERSION = "3.3.0" end end roadie-rails-3.3.0/roadie-rails.gemspec000066400000000000000000000025551471374500100200210ustar00rootroot00000000000000# frozen_string_literal: true lib = File.expand_path("lib", __dir__) $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 = "https://github.com/Mange/roadie-rails" spec.summary = "Making HTML emails comfortable for the Rails rockstars" spec.description = "Hooks Roadie into your Rails application to help with email generation." spec.license = "MIT" spec.required_ruby_version = ">= 2.7" spec.files = `git ls-files | grep -v ^spec`.split($INPUT_RECORD_SEPARATOR) spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } spec.extra_rdoc_files = %w[README.md Changelog.md LICENSE.txt] spec.require_paths = ["lib"] spec.add_dependency "railties", ">= 5.1", "< 8.1" spec.add_dependency "roadie", "~> 5.0" spec.add_development_dependency "bundler", "~> 2.2" spec.add_development_dependency "rails", ">= 5.1", "< 8.1" spec.add_development_dependency "rspec", "~> 3.10" spec.add_development_dependency "rspec-collection_matchers" spec.add_development_dependency "rspec-rails" spec.add_development_dependency "standard" spec.post_install_message = "This would be the last version that supports ruby 2.7" end roadie-rails-3.3.0/setup.sh000077500000000000000000000025031471374500100155710ustar00rootroot00000000000000#!/usr/bin/env 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") # Previously needed by Travis CI; might still be needed at Github Actions # due to 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 -n "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-3.3.0/spec/000077500000000000000000000000001471374500100150245ustar00rootroot00000000000000roadie-rails-3.3.0/spec/integration_spec.rb000066400000000000000000000135361471374500100207160ustar00rootroot00000000000000# frozen_string_literal: true require "spec_helper" require "tempfile" require "mail" describe "Integrations" do def parse_html_in_email(mail) Nokogiri::HTML.parse mail.html_part.body.decoded end rails_apps = [ RailsApp.new("Rails 5.1", "rails_51", max_ruby_version: "2.7"), RailsApp.new("Rails 5.2", "rails_52", max_ruby_version: "2.7"), RailsApp.new("Rails 6.0", "rails_60", max_ruby_version: "3.0"), RailsApp.new("Rails 6.1", "rails_61", max_ruby_version: "3.0"), RailsApp.new("Rails 7.0", "rails_70", min_ruby_version: "2.7"), RailsApp.new("Rails 7.1 with sprockets", "rails_71", min_ruby_version: "2.7"), RailsApp.new("Rails 7.1 with propshaft", "rails_71_with_propshaft", min_ruby_version: "2.7", asset_pipeline: :propshaft), RailsApp.new("Rails 8.0 with propshaft", "rails_80_with_propshaft", min_ruby_version: "3.2", asset_pipeline: :propshaft), ] shared_examples "generates valid email" do |message| it "inlines styles #{message}" do expect(email.to).to eq(["example@example.org"]) expect(email.from).to eq(["john@example.com"]) expect(email).to have(2).parts expect(email.text_part.body.decoded).not_to match(/<.*>/) html = email.html_part.body.decoded expect(html).to include " "url(#{expected_image_url})" ).at_selector(".image") # If we deliver mails we can catch weird problems with headers being # invalid email.delivery_method :test email.deliver end end rails_apps.select(&:supported?).select(&:with_sprockets?).each do |app| describe "with #{app}" do before { app.reset } include_examples "generates valid email", "for multipart emails" do let(:email) { app.read_email(:normal_email) } end include_examples "generates valid email", "with automatic mailer" do let(:email) { app.read_delivered_email(:normal_email) } end include_examples( "generates valid email", "with automatic mailer and forced delivery" ) do let(:email) do app.read_delivered_email(:normal_email, force_delivery: true) end end it "inlines no styles when roadie_options are nil" do email = app.read_delivered_email(:disabled_email) expect(email.to).to eq(["example@example.org"]) expect(email.from).to eq(["john@example.com"]) expect(email).to have(2).parts document = parse_html_in_email(email) expect(document).to have_no_styling.at_selector(".image") # If we deliver mails we can catch weird problems with headers being # invalid email.delivery_method :test email.deliver end it "has a AssetPipelineProvider together with a FilesystemProvider" do expect(app.read_providers).to eq( %w[ Roadie::FilesystemProvider Roadie::Rails::AssetPipelineProvider ] ) end end end rails_apps.select(&:supported?).select(&:with_propshaft?).each do |app| describe "with #{app}" do before { app.reset } it "inlines styles for multipart emails" do email = app.read_email(:normal_email) expect(email.to).to eq(["example@example.org"]) expect(email.from).to eq(["john@example.com"]) expect(email).to have(2).parts expect(email.text_part.body.decoded).not_to match(/<.*>/) html = email.html_part.body.decoded expect(html).to include " "green" ).at_selector("body") expected_image_url = "https://example.app.org/assets/rails-fbe4356d.png" expect(document).to have_styling( "background" => "url(\"#{expected_image_url}\")" ).at_selector(".image") # If we deliver mails we can catch weird problems with headers being # invalid email.delivery_method :test email.deliver end it "inlines styles with automatic mailer" do email = app.read_delivered_email(:normal_email) expect(email.to).to eq(["example@example.org"]) expect(email.from).to eq(["john@example.com"]) expect(email).to have(2).parts expect(email.text_part.body.decoded).not_to match(/<.*>/) html = email.html_part.body.decoded expect(html).to include " "green" ).at_selector("body") expected_image_url = "https://example.app.org/assets/rails-fbe4356d.png" expect(document).to have_styling( "background" => "url(\"#{expected_image_url}\")" ).at_selector(".image") # If we deliver mails we can catch weird problems with headers being # invalid email.delivery_method :test email.deliver end it "has a AssetPropshaftProvider together with a FilesystemProvider" do expect(app.read_providers).to eq( %w[ Roadie::FilesystemProvider Roadie::Rails::AssetPropshaftProvider ] ) end end end end roadie-rails-3.3.0/spec/lib/000077500000000000000000000000001471374500100155725ustar00rootroot00000000000000roadie-rails-3.3.0/spec/lib/roadie/000077500000000000000000000000001471374500100170355ustar00rootroot00000000000000roadie-rails-3.3.0/spec/lib/roadie/rails/000077500000000000000000000000001471374500100201475ustar00rootroot00000000000000roadie-rails-3.3.0/spec/lib/roadie/rails/asset_pipeline_provider_spec.rb000066400000000000000000000060071471374500100264270ustar00rootroot00000000000000# frozen_string_literal: true require "spec_helper" require "roadie/rspec" module Roadie module Rails describe AssetPipelineProvider do let(:pipeline) { FakePipeline.new } it "requires a passed pipeline" do expect { AssetPipelineProvider.new(nil) }.to raise_error(ArgumentError) end it_behaves_like( "roadie asset provider", valid_name: "existing.css", invalid_name: "bad.css" ) do subject { AssetPipelineProvider.new(pipeline) } before do pipeline.add_asset "existing.css", "existing.css", "" end end describe "finding stylesheets" do it "searches the asset pipeline" do pipeline.add_asset( "good.css", "/path/to/good.css.scss", "body { color: red; }" ) provider = AssetPipelineProvider.new(pipeline) stylesheet = provider.find_stylesheet("good.css") expect(stylesheet.name).to eq( "/path/to/good.css.scss (live compiled)" ) expect(stylesheet.to_s).to eq("body{color:red}") end it "ignores query string and asset prefix" do pipeline.add_asset "good.css", "good.css.scss", "" provider = AssetPipelineProvider.new(pipeline) expect( provider.find_stylesheet("/assets/good.css?body=1") ).not_to be_nil end it "ignores asset digest" do pipeline.add_asset "good.css", "good.css.scss", "" provider = AssetPipelineProvider.new(pipeline) # Old digest length expect( provider.find_stylesheet( "/assets/good-a1b605c3ff85456f0bf7bbbe3f59030a.css" ) ).not_to be_nil # New digest length expect( provider.find_stylesheet( "/assets/good-00acbfe0213dff8c5ba7232e3dabb3584c9e216bdb" \ "489f69d7aa20e0e101f3e6.css" ) ).not_to be_nil end it "will still find assets actually named with a hash at the end" do pipeline.add_asset( "vendor-a1b605c3ff85456f0bf7bbbe3f59030a.css", "vendor-a1b605c3ff85456f0bf7bbbe3f59030a.css", "" ) provider = AssetPipelineProvider.new(pipeline) expect( provider.find_stylesheet( "/assets/vendor-a1b605c3ff85456f0bf7bbbe3f59030a.css" ) ).not_to be_nil end it "supports stylesheets inside subdirectories" do pipeline.add_asset( "sub/deep.css", "/path/to/sub/deep.css.scss", "body { color: green; }" ) provider = AssetPipelineProvider.new(pipeline) stylesheet = provider.find_stylesheet("sub/deep.css") expect(stylesheet.name).to eq( "/path/to/sub/deep.css.scss (live compiled)" ) expect(stylesheet.to_s).to eq("body{color:green}") end end end end end roadie-rails-3.3.0/spec/lib/roadie/rails/automatic_spec.rb000066400000000000000000000031341471374500100234750ustar00rootroot00000000000000# frozen_string_literal: true require "spec_helper" require "mail" module Roadie module Rails describe Automatic do base_mailer = Class.new do def initialize(email = nil) @email = email end def mail(_options = {}) @email end end some_mailer = Class.new(base_mailer) do include Automatic end describe "#roadie_options" do it "returns Rails' roadie config" do allow(::Rails).to receive_message_chain( :application, :config, :roadie ).and_return("roadie config") expect(some_mailer.new.roadie_options).to eq("roadie config") end end describe "#mail" do let(:email) { Mail.new(to: "foo@example.com", from: "me@example.com") } let(:instance) { some_mailer.new(email) } it "extends the email with InlineOnDelivery and assigns roadie options" do options = Options.new(url_options: {host: "somehost.com"}) allow(instance).to receive(:roadie_options).and_return options email = instance.mail expect(email).to be_kind_of(InlineOnDelivery) expect(email.roadie_options).not_to be_nil expect(email.roadie_options.url_options).to eq options.url_options end it "assigns nil roadie options if no options are present" do allow(instance).to receive(:roadie_options).and_return nil email = instance.mail expect(email).to be_kind_of(InlineOnDelivery) expect(email.roadie_options).to be_nil end end end end end roadie-rails-3.3.0/spec/lib/roadie/rails/document_builder_spec.rb000066400000000000000000000011011471374500100250230ustar00rootroot00000000000000# frozen_string_literal: true require "spec_helper" module Roadie module Rails describe DocumentBuilder do it "builds documents with the given HTML" do document = DocumentBuilder.build("foo", Options.new) expect(document.html).to eq("foo") end it "applies the options to the document" do options = Options.new allow(options).to receive(:apply_to).and_call_original DocumentBuilder.build("", options) expect(options).to have_received(:apply_to).with(instance_of(Document)) end end end end roadie-rails-3.3.0/spec/lib/roadie/rails/inline_on_delivery_spec.rb000066400000000000000000000022301471374500100253600ustar00rootroot00000000000000# frozen_string_literal: true require "spec_helper" require "mail" module Roadie module Rails describe InlineOnDelivery do it "inlines on #delivery" do inliner = instance_double(MailInliner, execute: nil) options = instance_double(Options) mail = FakeMail.new allow(MailInliner).to receive(:new).and_return(inliner) mail.extend(InlineOnDelivery) mail.roadie_options = options expect { mail.deliver }.to change(mail, :delivered?).to(true) expect(MailInliner).to have_received(:new).with(mail, options) expect(inliner).to have_received(:execute) end it "inlines on #delivery!" do inliner = instance_double(MailInliner, execute: nil) options = instance_double(Options) mail = FakeMail.new allow(MailInliner).to receive(:new).and_return(inliner) mail.extend(InlineOnDelivery) mail.roadie_options = options expect { mail.deliver! }.to change(mail, :delivered?).to(true) expect(MailInliner).to have_received(:new).with(mail, options) expect(inliner).to have_received(:execute) end end end end roadie-rails-3.3.0/spec/lib/roadie/rails/mail_inliner_spec.rb000066400000000000000000000054671471374500100241640ustar00rootroot00000000000000# frozen_string_literal: true require "spec_helper" require "mail" module Roadie module Rails describe MailInliner do let(:email) { Mail.new } let(:options) { Options.new } subject(:inliner) { MailInliner.new(email, options) } it "takes an email and options" do inliner = MailInliner.new(email, options) expect(inliner.email).to eq(email) expect(inliner.options).to eq(options) end context "with an plaintext email" do let(:email) do Mail.new do body "Hello world" end end it "returns the email without doing anything" do expect(inliner.execute).to eq(email) expect(email.html_part).to be_nil expect(email.body.decoded).to eq("Hello world") end it "does nothing when given nil options" do inliner = MailInliner.new(email, nil) expect { inliner.execute }.to_not raise_error end end context "with an HTML email" do let(:html) { "

Hello world!

" } let(:email) do html_string = html Mail.new do content_type "text/html; charset=UTF-8" body html_string end end it "adjusts the html part using Roadie" do document = double "A document", transform: "transformed HTML" allow(DocumentBuilder).to receive(:build).and_return(document) inliner.execute expect(email.body.decoded).to eq("transformed HTML") expect(DocumentBuilder).to have_received(:build).with( html, instance_of(Options) ) end it "does nothing when given nil options" do inliner = MailInliner.new(email, nil) expect { inliner.execute }.to_not raise_error end end context "with an multipart email" do let(:html) { "

Hello world!

" } let(:email) do html_string = html Mail.new do text_part { body "Hello world" } html_part { body html_string } end end it "returns the email" do expect(inliner.execute).to eq(email) end it "adjusts the html part using Roadie" do document = double "A document", transform: "transformed HTML" allow(DocumentBuilder).to receive(:build).and_return(document) inliner.execute expect(email.html_part.body.decoded).to eq("transformed HTML") expect(DocumentBuilder).to have_received(:build).with( html, instance_of(Options) ) end it "does nothing when given nil options" do inliner = MailInliner.new(email, nil) expect { inliner.execute }.to_not raise_error end end end end end roadie-rails-3.3.0/spec/lib/roadie/rails/mailer_spec.rb000066400000000000000000000043561471374500100227670ustar00rootroot00000000000000# frozen_string_literal: true require "spec_helper" require "mail" module Roadie module Rails describe Mailer do some_mailer = Class.new do include Mailer def initialize(email = nil) @email = email end def mail(_options = {}) @email end end describe "#roadie_options" do it "returns Rails' roadie config" do allow(::Rails).to receive_message_chain( :application, :config, :roadie ).and_return("roadie config") expect(some_mailer.new.roadie_options).to eq("roadie config") end end describe "#roadie_mail" do let(:email) { Mail.new } let(:instance) { some_mailer.new(email) } before do allow(instance).to receive(:roadie_options).and_return(Options.new) end before do inliner = double "Mail inliner" allow(inliner).to receive(:execute) { |email| email } allow(MailInliner).to receive(:new).and_return(inliner) end it "calls the original mail method with all options and the block" do expect(instance).to receive(:mail) do |options, &block| expect(options).to eq(some: "option") expect(block).not_to be_nil email end instance.roadie_mail(some: "option") {} end it "inlines the email" do inliner = instance_double(MailInliner, execute: "inlined email") allow(MailInliner).to receive(:new).and_return(inliner) expect(instance.roadie_mail).to eq("inlined email") expect(MailInliner).to have_received(:new).with( email, instance_of(Options) ) expect(inliner).to have_received(:execute) end it "allows to override roadie options" do inliner = instance_double(MailInliner, execute: "inlined email") allow(MailInliner).to receive(:new).and_return(inliner) expect( instance.roadie_mail({}, foo: "bar") ).to eq("inlined email") expect(MailInliner).to have_received(:new).with(email, foo: "bar") expect(inliner).to have_received(:execute) end end end end end roadie-rails-3.3.0/spec/lib/roadie/rails/options_spec.rb000066400000000000000000000151631471374500100232070ustar00rootroot00000000000000# frozen_string_literal: true require "spec_helper" require "ostruct" module Roadie module Rails describe Options do it "raises errors when constructed with unknown options" do expect { Options.new(unknown_option: "maybe a misspelling?") }.to raise_error(ArgumentError, /unknown_option/) end it "raises errors when setting or reading unknown options" do options = Options.new expect { options[:foo] }.to raise_error(ArgumentError, /foo/) expect { options[:foo] = true }.to raise_error(ArgumentError, /foo/) end shared_examples_for "attribute" do |name| describe name do it "defaults to nil" do expect(Options.new[name]).to be_nil end it "can be set in the constructor" do options = Options.new(name => valid_value) expect(options[name]).to eq(valid_value) end it "can be changed using setter" do options = Options.new options.send :"#{name}=", valid_value expect(options[name]).to eq(valid_value) end it "can be changed using brackets" do options = Options.new options[name] = valid_value expect(options[name]).to eq(valid_value) end it "can be applied to documents" do fake_document = OpenStruct.new options = Options.new(name => valid_value) options.apply_to(fake_document) expect(fake_document[name]).to eq(valid_value) end describe "merging" do it "replaces values" do options = Options.new(name => valid_value) merged = options.merge(name => other_valid_value) expect(merged[name]).to eq(other_valid_value) end it "does not mutate instance" do options = Options.new(name => valid_value) options.merge(name => other_valid_value) expect(options[name]).to eq(valid_value) end end describe "destructive merging" do it "replaces values" do options = Options.new(name => valid_value) merged = options.merge(name => other_valid_value) expect(merged[name]).to eq(other_valid_value) end end describe "combining" do it "combines the old and the new value" do options = Options.new(name => valid_value) combined = options.combine(name => other_valid_value) expect_combinated_value(combined[name]) end it "does not mutate instance" do options = Options.new(name => valid_value) options.combine(name => other_valid_value) expect(options[name]).to eq(valid_value) end it "does not touch initial value if no new value is passed" do options = Options.new(name => valid_value) combined = options.combine({}) expect(combined[name]).to eq(valid_value) end end describe "destructive combining" do it "combines the old and the new value in the instance" do options = Options.new(name => valid_value) options.combine!(name => other_valid_value) expect_combinated_value(options[name]) end end end end it_behaves_like "attribute", :url_options do let(:valid_value) { {host: "foo.com", port: 3000} } let(:other_valid_value) { {host: "bar.com", scheme: "https"} } def expect_combinated_value(value) expect(value).to eq(host: "bar.com", port: 3000, scheme: "https") end end it_behaves_like "attribute", :keep_uninlinable_css do let(:valid_value) { true } let(:other_valid_value) { false } def expect_combinated_value(value) expect(value).to eq other_valid_value end end it_behaves_like "attribute", :before_transformation do let(:valid_value) { -> {} } let(:other_valid_value) { -> {} } def expect_combinated_value(value) allow(valid_value).to receive(:call).and_return 1 allow(other_valid_value).to receive(:call).and_return 2 expect(value.call).to eq(2) expect(valid_value).to have_received(:call).once.ordered expect(other_valid_value).to have_received(:call).once.ordered end end it_behaves_like "attribute", :after_transformation do let(:valid_value) { -> {} } let(:other_valid_value) { -> {} } def expect_combinated_value(value) allow(valid_value).to receive(:call).and_return 1 allow(other_valid_value).to receive(:call).and_return 2 expect(value.call).to eq(2) expect(valid_value).to have_received(:call).once.ordered expect(other_valid_value).to have_received(:call).once.ordered end end it_behaves_like "attribute", :asset_providers do let(:provider1) { double "Asset provider 1" } let(:provider2) { double "Asset provider 2" } let(:valid_value) { ProviderList.new([provider1]) } let(:other_valid_value) { ProviderList.new([provider2]) } def expect_combinated_value(value) expect(value).to be_instance_of(ProviderList) expect(value.to_a).to eq([provider1, provider2]) end end it_behaves_like "attribute", :external_asset_providers do let(:provider1) { double "Asset provider 1" } let(:provider2) { double "Asset provider 2" } let(:valid_value) { ProviderList.new([provider1]) } let(:other_valid_value) { ProviderList.new([provider2]) } def expect_combinated_value(value) expect(value).to be_instance_of(ProviderList) expect(value.to_a).to eq([provider1, provider2]) end end describe "asset_providers" do it "automatically wraps values in a ProviderList" do provider = double "Asset provider" options = Options.new(asset_providers: [provider]) expect(options.asset_providers).to be_instance_of(ProviderList) expect(options.asset_providers.to_a).to eq([provider]) end end describe "applying to a document" do it "does not change the default asset_providers if option is never set" do fake_document = OpenStruct.new(asset_providers: "original") Options.new.apply_to(fake_document) expect(fake_document.asset_providers).to eq("original") end end end end end roadie-rails-3.3.0/spec/lib/roadie/rails/railtie_spec.rb000066400000000000000000000045541471374500100231470ustar00rootroot00000000000000# frozen_string_literal: true require "spec_helper" module Roadie module Rails describe Railtie do let(:rails_application) do double("Application", config: ::Rails::Railtie::Configuration.new) end before do allow(::Rails).to receive(:root).and_return Pathname.new("rails-root") allow(::Rails).to receive(:application).and_return rails_application end def run_initializer # Hack to make the Railtie able to be initialized again # Railties are global state, after all, stored on the classes. Railtie.instance_variable_set(:@instance, nil) # Embrace me, Cthulhu! Railtie.instance_variable_set(:@ran, nil) Railtie.run_initializers :default, rails_application end describe "asset providers" do it "has filesystem providers to common asset paths if asset pipeline is disabled" do run_initializer providers = Railtie.config.roadie.asset_providers.to_a expect(providers).to have(1).item expect(providers[0]).to be_instance_of(FilesystemProvider) expect(providers[0].path).to eq("rails-root/public") end it "also gets a AssetPipelineProvider if assets are enabled" do rails_application.config.assets = ActiveSupport::OrderedOptions.new asset_pipeline = double "The asset pipeline" allow(rails_application).to receive(:assets).and_return asset_pipeline run_initializer providers = Railtie.config.roadie.asset_providers.to_a expect(providers).to have(2).items expect(providers[0]).to be_instance_of(FilesystemProvider) expect(providers[1]).to be_instance_of(AssetPipelineProvider) expect(providers[1].pipeline).to eq(asset_pipeline) end # This happens inside a Rails engine as the parent app is the one # holding on to the pipeline. it "gets no AssetPipelineProvider if assets are enabled but not available" do rails_application.config.assets = ActiveSupport::OrderedOptions.new allow(rails_application).to receive(:assets).and_return nil run_initializer providers = Railtie.config.roadie.asset_providers.to_a expect(providers).to have(1).item expect(providers[0]).to be_instance_of(FilesystemProvider) end end end end end roadie-rails-3.3.0/spec/railsapps/000077500000000000000000000000001471374500100170225ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/README.md000066400000000000000000000044111471374500100203010ustar00rootroot00000000000000# How to add another Rails app You need to follow certain steps in order to construct a proper integration with a new version of Rails. First, a quick summary: 1. Install the correct version of the `rails` gem 2. Using that version of `rails`, generate a new app 3. Strip out things we don't need from the app 4. Copy the mailers and templates to the app 5. Apply Roadie options and add Roadie to the Gemfile 6. Add it to `integration_spec.rb` ## Installing Rails ```bash gem install rails -v x.y.z ``` ## Generate Rails app ```bash APP_DIR=rails_xy rails _x.y.z._ new $APP_DIR --skip-javascript --skip-keeps --skip-active-record --skip-test-unit ``` ## Clean up the app ```bash cd $APP_DIR ``` The next step is of course specific to each Rails version. One of the easiest methods is to just start by deleting directories you know you have no use for, like `tmp`, `log` and `README.md`. ```bash rm -rf README.* tmp log db app/controllers app/helpers app/views/layouts public doc ``` You should also go through the initializers under `config` and remove the ones that don't apply; only keep the `development` environment. You should also strip away documentation comments and similar from all the files under `config`. Make them compact and only keep what is needed. After doing this, run `git add .` and inspect the list of added files. If there's any file there you didn't intend to add, just remove it with `git rm -f`. ## Copy mailer and templates ```bash cd .. rm -rf $APP_DIR/app/assets $APP_DIR/app/mailers $APP_DIR/app/views ln -s ../../shared/pipeline/app/assets $APP_DIR/app/assets ln -s ../../shared/all/app/mailers $APP_DIR/app/mailers ln -s ../../shared/all/app/views $APP_DIR/app/views ``` ## Apply options and add gem Add the following line to `config/initializers/assets.rb`: ```ruby Rails.application.config.assets.precompile += %w( email.css ) ``` Open up `config/application.rb` and add the following options: ```ruby config.roadie.url_options = {host: 'example.app.org'} ``` Then open up the `Gemfile` and add: ```ruby gem 'roadie-rails', :path => '../../..' ``` ## Add to integration_spec.rb Add the information needed in `spec/integration_spec.rb` and run `setup.sh` before finally running the tests themselves. When everything's good, `git add` everything and commit. roadie-rails-3.3.0/spec/railsapps/rails_51/000077500000000000000000000000001471374500100204415ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_51/.gitignore000066400000000000000000000007241471374500100224340ustar00rootroot00000000000000# See https://help.github.com/articles/ignoring-files for more about ignoring files. # # If you find yourself ignoring temporary files generated by your text editor # or operating system, you probably want to add a global ignore instead: # git config --global core.excludesfile '~/.gitignore_global' # Ignore bundler config. /.bundle # Ignore all logfiles and tempfiles. /log/* /tmp/* !/log/.keep !/tmp/.keep # Ignore Byebug command history file. .byebug_history roadie-rails-3.3.0/spec/railsapps/rails_51/Gemfile000066400000000000000000000002601471374500100217320ustar00rootroot00000000000000# frozen_string_literal: true source "https://rubygems.org" gem "rails", "~> 5.1.0" gem "sass-rails" gem "sprockets-rails" gem "listen" gem "roadie-rails", path: "../../.." roadie-rails-3.3.0/spec/railsapps/rails_51/app/000077500000000000000000000000001471374500100212215ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_51/app/assets/000077500000000000000000000000001471374500100225235ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_51/app/assets/config/000077500000000000000000000000001471374500100237705ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_51/app/assets/config/manifest.js000066400000000000000000000000771471374500100261400ustar00rootroot00000000000000//= link_tree ../images //= link_directory ../stylesheets .css roadie-rails-3.3.0/spec/railsapps/rails_51/app/assets/images/000077500000000000000000000000001471374500100237705ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_51/app/assets/images/rails.png000066400000000000000000000147661471374500100256260ustar00rootroot00000000000000PNG  IHDR2@X${tEXtSoftwareAdobe ImageReadyqe<IDATxڬ[ \eR֮^;Iwga@`gGgDgtqDFqFDqF@NRU]˫|_-Qy^Ǹ.݋0W_6k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IC}m ٽO?eb%ːٰStB|Aznaz*FlQ/K uu*1wDvE֯SJTK;(4kƣ;v2P9`k{?~_[hʢ^9фǡ;m|]o9<#jz\wD,8V]]%K9er懇0n^FcI>`Ub+kօO1|NO]t+,Ȑl_ˮ6 ĒDbrz^pe7^[aþo確jN+xsNC߅wμ7|za2, omrbZ~,pN>;?Y,z[u◿jq 4aqڶNu6Zid@h!!F9#,#UrOa0=Då ,,,bE#ȮX3ªޏ=a< =&_~ ٵѽacj񫒆LsXuXB (wzEk_QIف*4'ѣSl{.,p۵2`jp^؇nZXPź^]wމ]aQ-oI5O3a] _wb ŭL]$"|sԩȬ= VсLIUbYY搮͢I$tf$2|r;~'GSXkᇦԭF4b4 xo[,04F~<}ۭR%myb׾\mlO.4}tE\7}M)tՉ13xF [-26t䢄&E"9;ٜrq e)K!:bwY }g;Jר)5D$!Kɤ9߫-K$$ hlDUFF J{s2R6rC&&0;@>]/Z3E,k;( 2^09 <%= stylesheet_link_tag "email" %>

Normal email

roadie-rails-3.3.0/spec/railsapps/rails_51/app/views/auto_mailer/normal_email.text000066400000000000000000000000151471374500100302200ustar00rootroot00000000000000Normal email roadie-rails-3.3.0/spec/railsapps/rails_51/app/views/mailer/000077500000000000000000000000001471374500100236275ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_51/app/views/mailer/normal_email.html.erb000066400000000000000000000003541471374500100277250ustar00rootroot00000000000000 <%= stylesheet_link_tag "email" %>

Normal email

roadie-rails-3.3.0/spec/railsapps/rails_51/app/views/mailer/normal_email.text000066400000000000000000000000151471374500100271700ustar00rootroot00000000000000Normal email roadie-rails-3.3.0/spec/railsapps/rails_51/bin/000077500000000000000000000000001471374500100212115ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_51/bin/rails000077500000000000000000000002601471374500100222470ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true APP_PATH = File.expand_path("../../config/application", __FILE__) require_relative "../config/boot" require "rails/commands" roadie-rails-3.3.0/spec/railsapps/rails_51/config.ru000066400000000000000000000002411471374500100222530ustar00rootroot00000000000000# frozen_string_literal: true # This file is used by Rack-based servers to start the application. require_relative "config/environment" run Rails.application roadie-rails-3.3.0/spec/railsapps/rails_51/config/000077500000000000000000000000001471374500100217065ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_51/config/application.rb000066400000000000000000000007051471374500100245400ustar00rootroot00000000000000# frozen_string_literal: true require_relative "boot" require "action_controller/railtie" require "action_mailer/railtie" require "action_view/railtie" require "sprockets/railtie" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module Rails51 class Application < Rails::Application config.roadie.url_options = {host: "example.app.org"} end end roadie-rails-3.3.0/spec/railsapps/rails_51/config/boot.rb000066400000000000000000000002371471374500100232000ustar00rootroot00000000000000# frozen_string_literal: true ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) require "bundler/setup" # Set up gems listed in the Gemfile. roadie-rails-3.3.0/spec/railsapps/rails_51/config/environment.rb000066400000000000000000000002371471374500100246010ustar00rootroot00000000000000# frozen_string_literal: true # Load the Rails application. require_relative "application" # Initialize the Rails application. Rails.application.initialize! roadie-rails-3.3.0/spec/railsapps/rails_51/config/environments/000077500000000000000000000000001471374500100244355ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_51/config/environments/development.rb000066400000000000000000000034031471374500100273040ustar00rootroot00000000000000# frozen_string_literal: true Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. config.cache_classes = false # Do not eager load code on boot. config.eager_load = false # Show full error reports. config.consider_all_requests_local = true # Enable/disable caching. By default caching is disabled. if Rails.root.join("tmp/caching-dev.txt").exist? config.action_controller.perform_caching = true config.cache_store = :memory_store config.public_file_server.headers = { "Cache-Control" => "public, max-age=172800" } else config.action_controller.perform_caching = false config.cache_store = :null_store end # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false config.action_mailer.perform_caching = false # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log # Debug mode disables concatenation and preprocessing of assets. # This option may cause significant delays in view rendering with a large # number of complex assets. config.assets.debug = true # Suppress logger output for asset requests. config.assets.quiet = true # Raises error for missing translations # config.action_view.raise_on_missing_translations = true # Use an evented file watcher to asynchronously detect changes in source code, # routes, locales, etc. This feature depends on the listen gem. config.file_watcher = ActiveSupport::EventedFileUpdateChecker end roadie-rails-3.3.0/spec/railsapps/rails_51/config/environments/production.rb000066400000000000000000000066461471374500100271640ustar00rootroot00000000000000# frozen_string_literal: true Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded web servers # and those relying on copy on write to perform better. # Rake tasks automatically ignore this option for performance. config.eager_load = true # Full error reports are disabled and caching is turned on. config.consider_all_requests_local = false config.action_controller.perform_caching = true # Disable serving static files from the `/public` folder by default since # Apache or NGINX already handles this. config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? # Compress JavaScripts and CSS. config.assets.js_compressor = :uglifier # config.assets.css_compressor = :sass # Do not fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb # Enable serving of images, stylesheets, and JavaScripts from an asset server. # config.action_controller.asset_host = 'http://assets.example.com' # Specifies the header that your server uses for sending files. # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX # Mount Action Cable outside main process or domain # config.action_cable.mount_path = nil # config.action_cable.url = 'wss://example.com/cable' # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true # Use the lowest log level to ensure availability of diagnostic information # when problems arise. config.log_level = :debug # Prepend all log lines with the following tags. config.log_tags = [:request_id] # Use a different cache store in production. # config.cache_store = :mem_cache_store # Use a real queuing backend for Active Job (and separate queues per environment) # config.active_job.queue_adapter = :resque # config.active_job.queue_name_prefix = "rails_51_#{Rails.env}" config.action_mailer.perform_caching = false # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. # config.action_mailer.raise_delivery_errors = false # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # the I18n.default_locale when a translation cannot be found). config.i18n.fallbacks = true # Send deprecation notices to registered listeners. config.active_support.deprecation = :notify # Use default logging formatter so that PID and timestamp are not suppressed. config.log_formatter = ::Logger::Formatter.new # Use a different logger for distributed setups. # require 'syslog/logger' # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') if ENV["RAILS_LOG_TO_STDOUT"].present? logger = ActiveSupport::Logger.new($stdout) logger.formatter = config.log_formatter config.logger = ActiveSupport::TaggedLogging.new(logger) end end roadie-rails-3.3.0/spec/railsapps/rails_51/config/environments/test.rb000066400000000000000000000033551471374500100257470ustar00rootroot00000000000000# frozen_string_literal: true Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped # and recreated between test runs. Don't rely on the data there! config.cache_classes = true # Do not eager load code on boot. This avoids loading your whole application # just for the purpose of running a single test. If you are using a tool that # preloads Rails for running tests, you may have to set it to true. config.eager_load = false # Configure public file server for tests with Cache-Control for performance. config.public_file_server.enabled = true config.public_file_server.headers = { "Cache-Control" => "public, max-age=3600" } # Show full error reports and disable caching. config.consider_all_requests_local = true config.action_controller.perform_caching = false # Raise exceptions instead of rendering exception templates. config.action_dispatch.show_exceptions = false # Disable request forgery protection in test environment. config.action_controller.allow_forgery_protection = false config.action_mailer.perform_caching = false # Tell Action Mailer not to deliver emails to the real world. # The :test delivery method accumulates sent emails in the # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr # Raises error for missing translations # config.action_view.raise_on_missing_translations = true end roadie-rails-3.3.0/spec/railsapps/rails_51/config/initializers/000077500000000000000000000000001471374500100244145ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_51/config/initializers/application_controller_renderer.rb000066400000000000000000000003011471374500100333670ustar00rootroot00000000000000# frozen_string_literal: true # Be sure to restart your server when you modify this file. # ApplicationController.renderer.defaults.merge!( # http_host: 'example.org', # https: false # ) roadie-rails-3.3.0/spec/railsapps/rails_51/config/initializers/assets.rb000066400000000000000000000010011471374500100262330ustar00rootroot00000000000000# frozen_string_literal: true # 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" # Add additional assets to the asset load path # Rails.application.config.assets.paths << Emoji.images_path # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. Rails.application.config.assets.precompile += %w[email.css] roadie-rails-3.3.0/spec/railsapps/rails_51/config/initializers/backtrace_silencers.rb000066400000000000000000000006631471374500100307340ustar00rootroot00000000000000# frozen_string_literal: true # Be sure to restart your server when you modify this file. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. # Rails.backtrace_cleaner.remove_silencers! roadie-rails-3.3.0/spec/railsapps/rails_51/config/initializers/cookies_serializer.rb000066400000000000000000000004231471374500100306250ustar00rootroot00000000000000# frozen_string_literal: true # Be sure to restart your server when you modify this file. # Specify a serializer for the signed and encrypted cookie jars. # Valid options are :json, :marshal, and :hybrid. Rails.application.config.action_dispatch.cookies_serializer = :json roadie-rails-3.3.0/spec/railsapps/rails_51/config/initializers/filter_parameter_logging.rb000066400000000000000000000003411471374500100317720ustar00rootroot00000000000000# frozen_string_literal: true # Be sure to restart your server when you modify this file. # Configure sensitive parameters which will be filtered from the log file. Rails.application.config.filter_parameters += [:password] roadie-rails-3.3.0/spec/railsapps/rails_51/config/initializers/inflections.rb000066400000000000000000000012461471374500100272610ustar00rootroot00000000000000# frozen_string_literal: true # Be sure to restart your server when you modify this file. # Add new inflection rules using the following format. Inflections # are locale specific, and you may define rules for as many different # locales as you wish. All of these examples are active by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.plural /^(ox)$/i, '\1en' # inflect.singular /^(ox)en/i, '\1' # inflect.irregular 'person', 'people' # inflect.uncountable %w( fish sheep ) # end # These inflection rules are supported but not enabled by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.acronym 'RESTful' # end roadie-rails-3.3.0/spec/railsapps/rails_51/config/initializers/mime_types.rb000066400000000000000000000002731471374500100271160ustar00rootroot00000000000000# frozen_string_literal: true # Be sure to restart your server when you modify this file. # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf roadie-rails-3.3.0/spec/railsapps/rails_51/config/initializers/new_framework_defaults.rb000066400000000000000000000017321471374500100315010ustar00rootroot00000000000000# frozen_string_literal: true # Be sure to restart your server when you modify this file. # # This file contains migration options to ease your Rails 5.0 upgrade. # # Read the Guide for Upgrading Ruby on Rails for more info on each option. # Enable per-form CSRF tokens. Previous versions had false. Rails.application.config.action_controller.per_form_csrf_tokens = true # Enable origin-checking CSRF mitigation. Previous versions had false. Rails.application.config.action_controller.forgery_protection_origin_check = true # Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`. # Previous versions had false. ActiveSupport.to_time_preserves_timezone = true # Do not halt callback chains when a callback returns false. Previous versions had true. ActiveSupport.halt_callback_chains_on_return_false = false # Configure SSL options to enable HSTS with subdomains. Previous versions had false. Rails.application.config.ssl_options = {hsts: {subdomains: true}} roadie-rails-3.3.0/spec/railsapps/rails_51/config/initializers/session_store.rb000066400000000000000000000002531471374500100276400ustar00rootroot00000000000000# frozen_string_literal: true # Be sure to restart your server when you modify this file. Rails.application.config.session_store :cookie_store, key: "_rails_51_session" roadie-rails-3.3.0/spec/railsapps/rails_51/config/initializers/wrap_parameters.rb000066400000000000000000000005621471374500100301400ustar00rootroot00000000000000# frozen_string_literal: true # Be sure to restart your server when you modify this file. # This file contains settings for ActionController::ParamsWrapper which # is enabled by default. # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:action_controller) do wrap_parameters format: [:json] end roadie-rails-3.3.0/spec/railsapps/rails_51/config/locales/000077500000000000000000000000001471374500100233305ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_51/config/locales/en.yml000066400000000000000000000011721471374500100244560ustar00rootroot00000000000000# Files in the config/locales directory are used for internationalization # and are automatically loaded by Rails. If you want to use locales other # than English, add the necessary files in this directory. # # To use the locales, use `I18n.t`: # # I18n.t 'hello' # # In views, this is aliased to just `t`: # # <%= t('hello') %> # # To use a different locale, set it with `I18n.locale`: # # I18n.locale = :es # # This would use the information in config/locales/es.yml. # # To learn more, please read the Rails Internationalization guide # available at http://guides.rubyonrails.org/i18n.html. en: hello: "Hello world" roadie-rails-3.3.0/spec/railsapps/rails_51/config/routes.rb000066400000000000000000000002521471374500100235530ustar00rootroot00000000000000# frozen_string_literal: true Rails.application.routes.draw do # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html end roadie-rails-3.3.0/spec/railsapps/rails_51/log/000077500000000000000000000000001471374500100212225ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_51/log/.keep000066400000000000000000000000001471374500100221350ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_52/000077500000000000000000000000001471374500100204425ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_52/.gitignore000066400000000000000000000007241471374500100224350ustar00rootroot00000000000000# See https://help.github.com/articles/ignoring-files for more about ignoring files. # # If you find yourself ignoring temporary files generated by your text editor # or operating system, you probably want to add a global ignore instead: # git config --global core.excludesfile '~/.gitignore_global' # Ignore bundler config. /.bundle # Ignore all logfiles and tempfiles. /log/* /tmp/* !/log/.keep !/tmp/.keep # Ignore Byebug command history file. .byebug_history roadie-rails-3.3.0/spec/railsapps/rails_52/Gemfile000066400000000000000000000002601471374500100217330ustar00rootroot00000000000000# frozen_string_literal: true source "https://rubygems.org" gem "rails", "~> 5.2.0" gem "sass-rails" gem "sprockets-rails" gem "listen" gem "roadie-rails", path: "../../.." roadie-rails-3.3.0/spec/railsapps/rails_52/app/000077500000000000000000000000001471374500100212225ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_52/app/assets/000077500000000000000000000000001471374500100225245ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_52/app/assets/config/000077500000000000000000000000001471374500100237715ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_52/app/assets/config/manifest.js000066400000000000000000000000771471374500100261410ustar00rootroot00000000000000//= link_tree ../images //= link_directory ../stylesheets .css roadie-rails-3.3.0/spec/railsapps/rails_52/app/assets/images/000077500000000000000000000000001471374500100237715ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_52/app/assets/images/rails.png000066400000000000000000000147661471374500100256270ustar00rootroot00000000000000PNG  IHDR2@X${tEXtSoftwareAdobe ImageReadyqe<IDATxڬ[ \eR֮^;Iwga@`gGgDgtqDFqFDqF@NRU]˫|_-Qy^Ǹ.݋0W_6kbf̻ܸ6<4 w5~*r?9m&"M7@vm' {_S)Vi\WG?իjMd@ lDLX鸺W-TU+@EPo\&*Rnn, fDWrX|3M=\EJB[d6A'=tx^$a86̈{, ϱPepN*_W_3o;ޥ(0E:i6eXnhGf"L|S+(+.gФg=Ych=m#V_#}Ǫ|tR D8VՄM~xg!ni%Dy( B,{(Np$3iر$h.@e[a'eJԂyϠ4>H*MHQ(Jgt-֢QI ^d„@s-'- 51{'0 |n4ۉh{V@ܩw"BT =rzqPpBHȃ?ň ]-qpgsPiSӪg`jn)m 御B2L.x!jJP! K/\ ʮRB[09Trӈu. uH$ DDQ+:ݘٻ 3/nލ%Sjm2!&D/[EHwW A-RR!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GSXkᇦԭF4b4 xo[,04F~<}ۭR%myb׾\mlO.4}tE\7}M)tՉ13xF [-26t䢄&E"9;ٜrq e)K!:bwY }g;Jר)5D$!Kɤ9߫-K$$ hlDUFF J{s2R6rC&&0;@>]/Z3E,k;( 2^09 <%= stylesheet_link_tag "email" %>

Normal email

roadie-rails-3.3.0/spec/railsapps/rails_52/app/views/auto_mailer/normal_email.text000066400000000000000000000000151471374500100302210ustar00rootroot00000000000000Normal email roadie-rails-3.3.0/spec/railsapps/rails_52/app/views/mailer/000077500000000000000000000000001471374500100236305ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_52/app/views/mailer/normal_email.html.erb000066400000000000000000000003541471374500100277260ustar00rootroot00000000000000 <%= stylesheet_link_tag "email" %>

Normal email

roadie-rails-3.3.0/spec/railsapps/rails_52/app/views/mailer/normal_email.text000066400000000000000000000000151471374500100271710ustar00rootroot00000000000000Normal email roadie-rails-3.3.0/spec/railsapps/rails_52/bin/000077500000000000000000000000001471374500100212125ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_52/bin/rails000077500000000000000000000002601471374500100222500ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true APP_PATH = File.expand_path("../../config/application", __FILE__) require_relative "../config/boot" require "rails/commands" roadie-rails-3.3.0/spec/railsapps/rails_52/config.ru000066400000000000000000000002411471374500100222540ustar00rootroot00000000000000# frozen_string_literal: true # This file is used by Rack-based servers to start the application. require_relative "config/environment" run Rails.application roadie-rails-3.3.0/spec/railsapps/rails_52/config/000077500000000000000000000000001471374500100217075ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_52/config/application.rb000066400000000000000000000007051471374500100245410ustar00rootroot00000000000000# frozen_string_literal: true require_relative "boot" require "action_controller/railtie" require "action_mailer/railtie" require "action_view/railtie" require "sprockets/railtie" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module Rails52 class Application < Rails::Application config.roadie.url_options = {host: "example.app.org"} end end roadie-rails-3.3.0/spec/railsapps/rails_52/config/boot.rb000066400000000000000000000002371471374500100232010ustar00rootroot00000000000000# frozen_string_literal: true ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) require "bundler/setup" # Set up gems listed in the Gemfile. roadie-rails-3.3.0/spec/railsapps/rails_52/config/environment.rb000066400000000000000000000002371471374500100246020ustar00rootroot00000000000000# frozen_string_literal: true # Load the Rails application. require_relative "application" # Initialize the Rails application. Rails.application.initialize! roadie-rails-3.3.0/spec/railsapps/rails_52/config/environments/000077500000000000000000000000001471374500100244365ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_52/config/environments/development.rb000066400000000000000000000034031471374500100273050ustar00rootroot00000000000000# frozen_string_literal: true Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. config.cache_classes = false # Do not eager load code on boot. config.eager_load = false # Show full error reports. config.consider_all_requests_local = true # Enable/disable caching. By default caching is disabled. if Rails.root.join("tmp/caching-dev.txt").exist? config.action_controller.perform_caching = true config.cache_store = :memory_store config.public_file_server.headers = { "Cache-Control" => "public, max-age=172800" } else config.action_controller.perform_caching = false config.cache_store = :null_store end # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false config.action_mailer.perform_caching = false # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log # Debug mode disables concatenation and preprocessing of assets. # This option may cause significant delays in view rendering with a large # number of complex assets. config.assets.debug = true # Suppress logger output for asset requests. config.assets.quiet = true # Raises error for missing translations # config.action_view.raise_on_missing_translations = true # Use an evented file watcher to asynchronously detect changes in source code, # routes, locales, etc. This feature depends on the listen gem. config.file_watcher = ActiveSupport::EventedFileUpdateChecker end roadie-rails-3.3.0/spec/railsapps/rails_52/config/environments/production.rb000066400000000000000000000066461471374500100271650ustar00rootroot00000000000000# frozen_string_literal: true Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Code is not reloaded between requests. config.cache_classes = true # Eager load code on boot. This eager loads most of Rails and # your application in memory, allowing both threaded web servers # and those relying on copy on write to perform better. # Rake tasks automatically ignore this option for performance. config.eager_load = true # Full error reports are disabled and caching is turned on. config.consider_all_requests_local = false config.action_controller.perform_caching = true # Disable serving static files from the `/public` folder by default since # Apache or NGINX already handles this. config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? # Compress JavaScripts and CSS. config.assets.js_compressor = :uglifier # config.assets.css_compressor = :sass # Do not fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb # Enable serving of images, stylesheets, and JavaScripts from an asset server. # config.action_controller.asset_host = 'http://assets.example.com' # Specifies the header that your server uses for sending files. # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX # Mount Action Cable outside main process or domain # config.action_cable.mount_path = nil # config.action_cable.url = 'wss://example.com/cable' # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. # config.force_ssl = true # Use the lowest log level to ensure availability of diagnostic information # when problems arise. config.log_level = :debug # Prepend all log lines with the following tags. config.log_tags = [:request_id] # Use a different cache store in production. # config.cache_store = :mem_cache_store # Use a real queuing backend for Active Job (and separate queues per environment) # config.active_job.queue_adapter = :resque # config.active_job.queue_name_prefix = "rails_51_#{Rails.env}" config.action_mailer.perform_caching = false # Ignore bad email addresses and do not raise email delivery errors. # Set this to true and configure the email server for immediate delivery to raise delivery errors. # config.action_mailer.raise_delivery_errors = false # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # the I18n.default_locale when a translation cannot be found). config.i18n.fallbacks = true # Send deprecation notices to registered listeners. config.active_support.deprecation = :notify # Use default logging formatter so that PID and timestamp are not suppressed. config.log_formatter = ::Logger::Formatter.new # Use a different logger for distributed setups. # require 'syslog/logger' # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') if ENV["RAILS_LOG_TO_STDOUT"].present? logger = ActiveSupport::Logger.new($stdout) logger.formatter = config.log_formatter config.logger = ActiveSupport::TaggedLogging.new(logger) end end roadie-rails-3.3.0/spec/railsapps/rails_52/config/environments/test.rb000066400000000000000000000033551471374500100257500ustar00rootroot00000000000000# frozen_string_literal: true Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped # and recreated between test runs. Don't rely on the data there! config.cache_classes = true # Do not eager load code on boot. This avoids loading your whole application # just for the purpose of running a single test. If you are using a tool that # preloads Rails for running tests, you may have to set it to true. config.eager_load = false # Configure public file server for tests with Cache-Control for performance. config.public_file_server.enabled = true config.public_file_server.headers = { "Cache-Control" => "public, max-age=3600" } # Show full error reports and disable caching. config.consider_all_requests_local = true config.action_controller.perform_caching = false # Raise exceptions instead of rendering exception templates. config.action_dispatch.show_exceptions = false # Disable request forgery protection in test environment. config.action_controller.allow_forgery_protection = false config.action_mailer.perform_caching = false # Tell Action Mailer not to deliver emails to the real world. # The :test delivery method accumulates sent emails in the # ActionMailer::Base.deliveries array. config.action_mailer.delivery_method = :test # Print deprecation notices to the stderr. config.active_support.deprecation = :stderr # Raises error for missing translations # config.action_view.raise_on_missing_translations = true end roadie-rails-3.3.0/spec/railsapps/rails_52/config/initializers/000077500000000000000000000000001471374500100244155ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_52/config/initializers/application_controller_renderer.rb000066400000000000000000000003011471374500100333700ustar00rootroot00000000000000# frozen_string_literal: true # Be sure to restart your server when you modify this file. # ApplicationController.renderer.defaults.merge!( # http_host: 'example.org', # https: false # ) roadie-rails-3.3.0/spec/railsapps/rails_52/config/initializers/assets.rb000066400000000000000000000010011471374500100262340ustar00rootroot00000000000000# frozen_string_literal: true # 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" # Add additional assets to the asset load path # Rails.application.config.assets.paths << Emoji.images_path # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. Rails.application.config.assets.precompile += %w[email.css] roadie-rails-3.3.0/spec/railsapps/rails_52/config/initializers/backtrace_silencers.rb000066400000000000000000000006631471374500100307350ustar00rootroot00000000000000# frozen_string_literal: true # Be sure to restart your server when you modify this file. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. # Rails.backtrace_cleaner.remove_silencers! roadie-rails-3.3.0/spec/railsapps/rails_52/config/initializers/cookies_serializer.rb000066400000000000000000000004231471374500100306260ustar00rootroot00000000000000# frozen_string_literal: true # Be sure to restart your server when you modify this file. # Specify a serializer for the signed and encrypted cookie jars. # Valid options are :json, :marshal, and :hybrid. Rails.application.config.action_dispatch.cookies_serializer = :json roadie-rails-3.3.0/spec/railsapps/rails_52/config/initializers/filter_parameter_logging.rb000066400000000000000000000003411471374500100317730ustar00rootroot00000000000000# frozen_string_literal: true # Be sure to restart your server when you modify this file. # Configure sensitive parameters which will be filtered from the log file. Rails.application.config.filter_parameters += [:password] roadie-rails-3.3.0/spec/railsapps/rails_52/config/initializers/inflections.rb000066400000000000000000000012461471374500100272620ustar00rootroot00000000000000# frozen_string_literal: true # Be sure to restart your server when you modify this file. # Add new inflection rules using the following format. Inflections # are locale specific, and you may define rules for as many different # locales as you wish. All of these examples are active by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.plural /^(ox)$/i, '\1en' # inflect.singular /^(ox)en/i, '\1' # inflect.irregular 'person', 'people' # inflect.uncountable %w( fish sheep ) # end # These inflection rules are supported but not enabled by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.acronym 'RESTful' # end roadie-rails-3.3.0/spec/railsapps/rails_52/config/initializers/mime_types.rb000066400000000000000000000002731471374500100271170ustar00rootroot00000000000000# frozen_string_literal: true # Be sure to restart your server when you modify this file. # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf roadie-rails-3.3.0/spec/railsapps/rails_52/config/initializers/new_framework_defaults.rb000066400000000000000000000015051471374500100315000ustar00rootroot00000000000000# frozen_string_literal: true # Be sure to restart your server when you modify this file. # # This file contains migration options to ease your Rails 5.0 upgrade. # # Read the Guide for Upgrading Ruby on Rails for more info on each option. # Enable per-form CSRF tokens. Previous versions had false. Rails.application.config.action_controller.per_form_csrf_tokens = true # Enable origin-checking CSRF mitigation. Previous versions had false. Rails.application.config.action_controller.forgery_protection_origin_check = true # Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`. # Previous versions had false. ActiveSupport.to_time_preserves_timezone = true # Configure SSL options to enable HSTS with subdomains. Previous versions had false. Rails.application.config.ssl_options = {hsts: {subdomains: true}} roadie-rails-3.3.0/spec/railsapps/rails_52/config/initializers/session_store.rb000066400000000000000000000002531471374500100276410ustar00rootroot00000000000000# frozen_string_literal: true # Be sure to restart your server when you modify this file. Rails.application.config.session_store :cookie_store, key: "_rails_51_session" roadie-rails-3.3.0/spec/railsapps/rails_52/config/initializers/wrap_parameters.rb000066400000000000000000000005621471374500100301410ustar00rootroot00000000000000# frozen_string_literal: true # Be sure to restart your server when you modify this file. # This file contains settings for ActionController::ParamsWrapper which # is enabled by default. # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:action_controller) do wrap_parameters format: [:json] end roadie-rails-3.3.0/spec/railsapps/rails_52/config/locales/000077500000000000000000000000001471374500100233315ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_52/config/locales/en.yml000066400000000000000000000011721471374500100244570ustar00rootroot00000000000000# Files in the config/locales directory are used for internationalization # and are automatically loaded by Rails. If you want to use locales other # than English, add the necessary files in this directory. # # To use the locales, use `I18n.t`: # # I18n.t 'hello' # # In views, this is aliased to just `t`: # # <%= t('hello') %> # # To use a different locale, set it with `I18n.locale`: # # I18n.locale = :es # # This would use the information in config/locales/es.yml. # # To learn more, please read the Rails Internationalization guide # available at http://guides.rubyonrails.org/i18n.html. en: hello: "Hello world" roadie-rails-3.3.0/spec/railsapps/rails_52/config/routes.rb000066400000000000000000000002521471374500100235540ustar00rootroot00000000000000# frozen_string_literal: true Rails.application.routes.draw do # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html end roadie-rails-3.3.0/spec/railsapps/rails_52/log/000077500000000000000000000000001471374500100212235ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_52/log/.keep000066400000000000000000000000001471374500100221360ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_60/000077500000000000000000000000001471374500100204415ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_60/.gitignore000066400000000000000000000000661471374500100224330ustar00rootroot00000000000000/.bundle /log/* /tmp/* /public/assets .byebug_history roadie-rails-3.3.0/spec/railsapps/rails_60/Gemfile000066400000000000000000000002601471374500100217320ustar00rootroot00000000000000# frozen_string_literal: true source "https://rubygems.org" gem "rails", "~> 6.0.0" gem "sass-rails" gem "sprockets-rails" gem "listen" gem "roadie-rails", path: "../../.." roadie-rails-3.3.0/spec/railsapps/rails_60/Rakefile000066400000000000000000000003431471374500100221060ustar00rootroot00000000000000# Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require_relative "config/application" Rails.application.load_tasks roadie-rails-3.3.0/spec/railsapps/rails_60/app/000077500000000000000000000000001471374500100212215ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_60/app/assets000077700000000000000000000000001471374500100301472../../shared/pipeline/app/assetsustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_60/app/mailers000077700000000000000000000000001471374500100273762../../shared/all/app/mailersustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_60/app/views000077700000000000000000000000001471374500100266002../../shared/all/app/viewsustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_60/bin/000077500000000000000000000000001471374500100212115ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_60/bin/rails000077500000000000000000000002151471374500100222470ustar00rootroot00000000000000#!/usr/bin/env ruby APP_PATH = File.expand_path("../config/application", __dir__) require_relative "../config/boot" require "rails/commands" roadie-rails-3.3.0/spec/railsapps/rails_60/config.ru000066400000000000000000000000741471374500100222570ustar00rootroot00000000000000require_relative "config/environment" run Rails.application roadie-rails-3.3.0/spec/railsapps/rails_60/config/000077500000000000000000000000001471374500100217065ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_60/config/application.rb000066400000000000000000000006221471374500100245360ustar00rootroot00000000000000require_relative "boot" require "active_model/railtie" require "action_controller/railtie" require "action_mailer/railtie" require "action_view/railtie" require "sprockets/railtie" require "rails/test_unit/railtie" Bundler.require(*Rails.groups) module Rails60 class Application < Rails::Application config.load_defaults 6.0 config.roadie.url_options = {host: "example.app.org"} end end roadie-rails-3.3.0/spec/railsapps/rails_60/config/boot.rb000066400000000000000000000001331471374500100231730ustar00rootroot00000000000000ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) require "bundler/setup" roadie-rails-3.3.0/spec/railsapps/rails_60/config/environment.rb000066400000000000000000000000751471374500100246010ustar00rootroot00000000000000require_relative "application" Rails.application.initialize! roadie-rails-3.3.0/spec/railsapps/rails_60/config/environments/000077500000000000000000000000001471374500100244355ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_60/config/environments/development.rb000066400000000000000000000014671471374500100273140ustar00rootroot00000000000000Rails.application.configure do config.cache_classes = false config.eager_load = false config.consider_all_requests_local = true if Rails.root.join("tmp", "caching-dev.txt").exist? config.action_controller.perform_caching = true config.action_controller.enable_fragment_cache_logging = true config.cache_store = :memory_store config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" } else config.action_controller.perform_caching = false config.cache_store = :null_store end config.action_mailer.raise_delivery_errors = false config.action_mailer.perform_caching = false config.active_support.deprecation = :log config.assets.debug = true config.assets.quiet = true config.file_watcher = ActiveSupport::EventedFileUpdateChecker end roadie-rails-3.3.0/spec/railsapps/rails_60/config/initializers/000077500000000000000000000000001471374500100244145ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_60/config/initializers/assets.rb000066400000000000000000000001541471374500100262430ustar00rootroot00000000000000Rails.application.config.assets.version = "1.0" Rails.application.config.assets.precompile += %w[email.css] roadie-rails-3.3.0/spec/railsapps/rails_60/config/initializers/cookies_serializer.rb000066400000000000000000000001041471374500100306210ustar00rootroot00000000000000Rails.application.config.action_dispatch.cookies_serializer = :json roadie-rails-3.3.0/spec/railsapps/rails_60/config/initializers/filter_parameter_logging.rb000066400000000000000000000000721471374500100317730ustar00rootroot00000000000000Rails.application.config.filter_parameters += [:password] roadie-rails-3.3.0/spec/railsapps/rails_60/config/initializers/wrap_parameters.rb000066400000000000000000000001231471374500100301310ustar00rootroot00000000000000ActiveSupport.on_load(:action_controller) do wrap_parameters format: [:json] end roadie-rails-3.3.0/spec/railsapps/rails_60/config/routes.rb000066400000000000000000000000451471374500100235530ustar00rootroot00000000000000Rails.application.routes.draw do end roadie-rails-3.3.0/spec/railsapps/rails_61/000077500000000000000000000000001471374500100204425ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_61/.gitignore000066400000000000000000000000711471374500100224300ustar00rootroot00000000000000/.bundle /log/* /tmp/* /public/assets /config/master.key roadie-rails-3.3.0/spec/railsapps/rails_61/Gemfile000066400000000000000000000003051471374500100217330ustar00rootroot00000000000000source "https://rubygems.org" gem "rails", "~> 6.1.0" gem "bootsnap", ">= 1.4.4", require: false gem "listen" gem "sass-rails", ">= 6" gem "sprockets-rails" gem "roadie-rails", path: "../../.." roadie-rails-3.3.0/spec/railsapps/rails_61/Rakefile000066400000000000000000000001031471374500100221010ustar00rootroot00000000000000require_relative "config/application" Rails.application.load_tasks roadie-rails-3.3.0/spec/railsapps/rails_61/app/000077500000000000000000000000001471374500100212225ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_61/app/assets000077700000000000000000000000001471374500100301502../../shared/pipeline/app/assetsustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_61/app/mailers000077700000000000000000000000001471374500100273772../../shared/all/app/mailersustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_61/app/views000077700000000000000000000000001471374500100266012../../shared/all/app/viewsustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_61/bin/000077500000000000000000000000001471374500100212125ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_61/bin/rails000077500000000000000000000002151471374500100222500ustar00rootroot00000000000000#!/usr/bin/env ruby APP_PATH = File.expand_path("../config/application", __dir__) require_relative "../config/boot" require "rails/commands" roadie-rails-3.3.0/spec/railsapps/rails_61/config.ru000066400000000000000000000001321471374500100222530ustar00rootroot00000000000000require_relative "config/environment" run Rails.application Rails.application.load_server roadie-rails-3.3.0/spec/railsapps/rails_61/config/000077500000000000000000000000001471374500100217075ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_61/config/application.rb000066400000000000000000000006421471374500100245410ustar00rootroot00000000000000require_relative "boot" require "rails" require "active_model/railtie" require "action_controller/railtie" require "action_mailer/railtie" require "action_view/railtie" require "sprockets/railtie" require "rails/test_unit/railtie" Bundler.require(*Rails.groups) module Rails61 class Application < Rails::Application config.load_defaults 6.1 config.roadie.url_options = {host: "example.app.org"} end end roadie-rails-3.3.0/spec/railsapps/rails_61/config/boot.rb000066400000000000000000000001641471374500100232000ustar00rootroot00000000000000ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) require "bundler/setup" require "bootsnap/setup" roadie-rails-3.3.0/spec/railsapps/rails_61/config/environment.rb000066400000000000000000000000751471374500100246020ustar00rootroot00000000000000require_relative "application" Rails.application.initialize! roadie-rails-3.3.0/spec/railsapps/rails_61/config/environments/000077500000000000000000000000001471374500100244365ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_61/config/environments/development.rb000066400000000000000000000017361471374500100273140ustar00rootroot00000000000000require "active_support/core_ext/integer/time" Rails.application.configure do config.cache_classes = false config.eager_load = false config.consider_all_requests_local = true if Rails.root.join("tmp", "caching-dev.txt").exist? config.action_controller.perform_caching = true config.action_controller.enable_fragment_cache_logging = true config.cache_store = :memory_store config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" } else config.action_controller.perform_caching = false config.cache_store = :null_store end config.action_mailer.raise_delivery_errors = false config.action_mailer.perform_caching = false config.active_support.deprecation = :log config.active_support.disallowed_deprecation = :raise config.active_support.disallowed_deprecation_warnings = [] config.assets.debug = true config.assets.quiet = true config.file_watcher = ActiveSupport::EventedFileUpdateChecker end roadie-rails-3.3.0/spec/railsapps/rails_61/config/initializers/000077500000000000000000000000001471374500100244155ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_61/config/initializers/assets.rb000066400000000000000000000001541471374500100262440ustar00rootroot00000000000000Rails.application.config.assets.version = "1.0" Rails.application.config.assets.precompile += %w[email.css] roadie-rails-3.3.0/spec/railsapps/rails_61/config/initializers/cookies_serializer.rb000066400000000000000000000001041471374500100306220ustar00rootroot00000000000000Rails.application.config.action_dispatch.cookies_serializer = :json roadie-rails-3.3.0/spec/railsapps/rails_61/config/initializers/filter_parameter_logging.rb000066400000000000000000000001741471374500100317770ustar00rootroot00000000000000Rails.application.config.filter_parameters += [ :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn ] roadie-rails-3.3.0/spec/railsapps/rails_61/config/initializers/wrap_parameters.rb000066400000000000000000000001231471374500100301320ustar00rootroot00000000000000ActiveSupport.on_load(:action_controller) do wrap_parameters format: [:json] end roadie-rails-3.3.0/spec/railsapps/rails_61/config/routes.rb000066400000000000000000000000451471374500100235540ustar00rootroot00000000000000Rails.application.routes.draw do end roadie-rails-3.3.0/spec/railsapps/rails_70/000077500000000000000000000000001471374500100204425ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_70/Gemfile000066400000000000000000000005001471374500100217300ustar00rootroot00000000000000source "https://rubygems.org" # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" gem "rails", "~> 7.0.0" # Reduces boot times through caching; required in config/boot.rb gem "bootsnap", ">= 1.4.4", require: false gem "sass-rails" gem "sprockets-rails" gem "roadie-rails", path: "../../.." roadie-rails-3.3.0/spec/railsapps/rails_70/Rakefile000066400000000000000000000003431471374500100221070ustar00rootroot00000000000000# Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require_relative "config/application" Rails.application.load_tasks roadie-rails-3.3.0/spec/railsapps/rails_70/app/000077500000000000000000000000001471374500100212225ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_70/app/assets000077700000000000000000000000001471374500100301502../../shared/pipeline/app/assetsustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_70/app/mailers000077700000000000000000000000001471374500100273772../../shared/all/app/mailersustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_70/app/views000077700000000000000000000000001471374500100266012../../shared/all/app/viewsustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_70/bin/000077500000000000000000000000001471374500100212125ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_70/bin/bundle000077500000000000000000000056371471374500100224240ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'bundle' is installed as part of a gem, and # this file is here to facilitate running it. # require "rubygems" m = Module.new do module_function def invoked_as_script? File.expand_path($0) == File.expand_path(__FILE__) end def env_var_version ENV["BUNDLER_VERSION"] end def cli_arg_version return unless invoked_as_script? # don't want to hijack other binstubs return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update` bundler_version = nil update_index = nil ARGV.each_with_index do |a, i| if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN bundler_version = a end next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/o bundler_version = $1 update_index = i end bundler_version end def gemfile gemfile = ENV["BUNDLE_GEMFILE"] return gemfile if gemfile && !gemfile.empty? File.expand_path("../../Gemfile", __FILE__) end def lockfile lockfile = case File.basename(gemfile) when "gems.rb" then gemfile.sub(/\.rb$/, gemfile) else "#{gemfile}.lock" end File.expand_path(lockfile) end def lockfile_version return unless File.file?(lockfile) lockfile_contents = File.read(lockfile) return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/o Regexp.last_match(1) end def bundler_requirement @bundler_requirement ||= env_var_version || cli_arg_version || bundler_requirement_for(lockfile_version) end def bundler_requirement_for(version) return "#{Gem::Requirement.default}.a" unless version bundler_gem_version = Gem::Version.new(version) requirement = bundler_gem_version.approximate_recommendation return requirement unless Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.7.0") requirement += ".a" if bundler_gem_version.prerelease? requirement end def load_bundler! ENV["BUNDLE_GEMFILE"] ||= gemfile activate_bundler end def activate_bundler gem_error = activation_error_handling do gem "bundler", bundler_requirement end return if gem_error.nil? require_error = activation_error_handling do require "bundler/version" end return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION)) warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`" exit 42 end def activation_error_handling yield nil rescue StandardError, LoadError => e e end end m.load_bundler! if m.invoked_as_script? load Gem.bin_path("bundler", "bundle") end roadie-rails-3.3.0/spec/railsapps/rails_70/bin/rails000077500000000000000000000002151471374500100222500ustar00rootroot00000000000000#!/usr/bin/env ruby APP_PATH = File.expand_path("../config/application", __dir__) require_relative "../config/boot" require "rails/commands" roadie-rails-3.3.0/spec/railsapps/rails_70/bin/rake000077500000000000000000000001321471374500100220560ustar00rootroot00000000000000#!/usr/bin/env ruby require_relative "../config/boot" require "rake" Rake.application.run roadie-rails-3.3.0/spec/railsapps/rails_70/bin/setup000077500000000000000000000014061471374500100223010ustar00rootroot00000000000000#!/usr/bin/env ruby require "fileutils" # path to your application root. APP_ROOT = File.expand_path("..", __dir__) def system!(*args) system(*args) || abort("\n== Command #{args} failed ==") end FileUtils.chdir APP_ROOT do # This script is a way to set up or update your development environment automatically. # This script is idempotent, so that you can run it at any time and get an expectable outcome. # Add necessary setup steps to this file. puts "== Installing dependencies ==" system! "gem install bundler --conservative" system("bundle check") || system!("bundle install") puts "\n== Removing old logs and tempfiles ==" system! "bin/rails log:clear tmp:clear" puts "\n== Restarting application server ==" system! "bin/rails restart" end roadie-rails-3.3.0/spec/railsapps/rails_70/config.ru000066400000000000000000000002401471374500100222530ustar00rootroot00000000000000# This file is used by Rack-based servers to start the application. require_relative "config/environment" run Rails.application Rails.application.load_server roadie-rails-3.3.0/spec/railsapps/rails_70/config/000077500000000000000000000000001471374500100217075ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_70/config/application.rb000066400000000000000000000023211471374500100245350ustar00rootroot00000000000000require_relative "boot" require "rails" # Pick the frameworks you want: # require "active_model/railtie" # require "active_job/railtie" # require "active_record/railtie" # require "active_storage/engine" require "action_controller/railtie" require "action_mailer/railtie" # require "action_mailbox/engine" # require "action_text/engine" require "action_view/railtie" # require "action_cable/engine" require "sprockets/railtie" # require "rails/test_unit/railtie" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module Rails70 class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. config.load_defaults 7.0 # Configuration for the application, engines, and railties goes here. # # These settings can be overridden in specific environments using the files # in config/environments, which are processed later. # # config.time_zone = "Central Time (US & Canada)" # config.eager_load_paths << Rails.root.join("extras") config.roadie.url_options = {host: "example.app.org"} config.action_view.preload_links_header = false end end roadie-rails-3.3.0/spec/railsapps/rails_70/config/boot.rb000066400000000000000000000003171471374500100232000ustar00rootroot00000000000000ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) require "bundler/setup" # Set up gems listed in the Gemfile. require "bootsnap/setup" # Speed up boot time by caching expensive operations. roadie-rails-3.3.0/spec/railsapps/rails_70/config/environment.rb000066400000000000000000000002001471374500100245700ustar00rootroot00000000000000# Load the Rails application. require_relative "application" # Initialize the Rails application. Rails.application.initialize! roadie-rails-3.3.0/spec/railsapps/rails_70/config/environments/000077500000000000000000000000001471374500100244365ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_70/config/environments/development.rb000066400000000000000000000037141471374500100273120ustar00rootroot00000000000000require "active_support/core_ext/integer/time" Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded any time # it changes. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. config.cache_classes = false # Do not eager load code on boot. config.eager_load = false # Show full error reports. config.consider_all_requests_local = true # Enable/disable caching. By default caching is disabled. # Run rails dev:cache to toggle caching. if Rails.root.join("tmp/caching-dev.txt").exist? config.action_controller.perform_caching = true config.action_controller.enable_fragment_cache_logging = true config.cache_store = :memory_store config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" } else config.action_controller.perform_caching = false config.cache_store = :null_store end # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false config.action_mailer.perform_caching = false # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log # Raise exceptions for disallowed deprecations. config.active_support.disallowed_deprecation = :raise # Tell Active Support which deprecation messages to disallow. config.active_support.disallowed_deprecation_warnings = [] # Suppress logger output for asset requests. config.assets.quiet = true # Raises error for missing translations. # config.i18n.raise_on_missing_translations = true # Annotate rendered view with file names. # config.action_view.annotate_rendered_view_with_filenames = true # Uncomment if you wish to allow Action Cable access from any origin. # config.action_cable.disable_request_forgery_protection = true end roadie-rails-3.3.0/spec/railsapps/rails_70/config/initializers/000077500000000000000000000000001471374500100244155ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_70/config/initializers/assets.rb000066400000000000000000000010621471374500100262430ustar00rootroot00000000000000# 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" # Add additional assets to the asset load path. # Rails.application.config.assets.paths << Emoji.images_path # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in the app/assets # folder are already added. # Rails.application.config.assets.precompile += %w( admin.js admin.css ) Rails.application.config.assets.precompile += %w[email.css] roadie-rails-3.3.0/spec/railsapps/rails_70/config/initializers/backtrace_silencers.rb000066400000000000000000000010341471374500100307260ustar00rootroot00000000000000# Be sure to restart your server when you modify this file. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. # Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) } # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code # by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'". Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"] roadie-rails-3.3.0/spec/railsapps/rails_70/config/initializers/content_security_policy.rb000066400000000000000000000023051471374500100317220ustar00rootroot00000000000000# Be sure to restart your server when you modify this file. # Define an application-wide content security policy # For further information see the following documentation # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy # Rails.application.config.content_security_policy do |policy| # policy.default_src :self, :https # policy.font_src :self, :https, :data # policy.img_src :self, :https, :data # policy.object_src :none # policy.script_src :self, :https # policy.style_src :self, :https # # Specify URI for violation reports # # policy.report_uri "/csp-violation-report-endpoint" # end # If you are using UJS then enable automatic nonce generation # Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) } # Set the nonce only to specific directives # Rails.application.config.content_security_policy_nonce_directives = %w(script-src) # Report CSP violations to a specified URI # For further information see the following documentation: # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only # Rails.application.config.content_security_policy_report_only = true roadie-rails-3.3.0/spec/railsapps/rails_70/config/initializers/filter_parameter_logging.rb000066400000000000000000000004041471374500100317730ustar00rootroot00000000000000# Be sure to restart your server when you modify this file. # Configure sensitive parameters which will be filtered from the log file. Rails.application.config.filter_parameters += [ :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn ] roadie-rails-3.3.0/spec/railsapps/rails_70/config/initializers/inflections.rb000066400000000000000000000012111471374500100272520ustar00rootroot00000000000000# Be sure to restart your server when you modify this file. # Add new inflection rules using the following format. Inflections # are locale specific, and you may define rules for as many different # locales as you wish. All of these examples are active by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.plural /^(ox)$/i, "\\1en" # inflect.singular /^(ox)en/i, "\\1" # inflect.irregular "person", "people" # inflect.uncountable %w( fish sheep ) # end # These inflection rules are supported but not enabled by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.acronym "RESTful" # end roadie-rails-3.3.0/spec/railsapps/rails_70/config/initializers/mime_types.rb000066400000000000000000000002341471374500100271140ustar00rootroot00000000000000# Be sure to restart your server when you modify this file. # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf roadie-rails-3.3.0/spec/railsapps/rails_70/config/initializers/permissions_policy.rb000066400000000000000000000006001471374500100306700ustar00rootroot00000000000000# Define an application-wide HTTP permissions policy. For further # information see https://developers.google.com/web/updates/2018/06/feature-policy # # Rails.application.config.permissions_policy do |f| # f.camera :none # f.gyroscope :none # f.microphone :none # f.usb :none # f.fullscreen :self # f.payment :self, "https://secure.example.com" # end roadie-rails-3.3.0/spec/railsapps/rails_70/config/initializers/wrap_parameters.rb000066400000000000000000000005231471374500100301360ustar00rootroot00000000000000# Be sure to restart your server when you modify this file. # This file contains settings for ActionController::ParamsWrapper which # is enabled by default. # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:action_controller) do wrap_parameters format: [:json] end roadie-rails-3.3.0/spec/railsapps/rails_70/config/routes.rb000066400000000000000000000004051471374500100235540ustar00rootroot00000000000000Rails.application.routes.draw do # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html # Almost every application defines a route for the root path ("/") at the top of this file. # root "articles#index" end roadie-rails-3.3.0/spec/railsapps/rails_71/000077500000000000000000000000001471374500100204435ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_71/Gemfile000066400000000000000000000005001471374500100217310ustar00rootroot00000000000000source "https://rubygems.org" # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" gem "rails", "~> 7.1.0" # Reduces boot times through caching; required in config/boot.rb gem "bootsnap", ">= 1.4.4", require: false gem "sass-rails" gem "sprockets-rails" gem "roadie-rails", path: "../../.." roadie-rails-3.3.0/spec/railsapps/rails_71/Rakefile000066400000000000000000000003431471374500100221100ustar00rootroot00000000000000# Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require_relative "config/application" Rails.application.load_tasks roadie-rails-3.3.0/spec/railsapps/rails_71/app/000077500000000000000000000000001471374500100212235ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_71/app/assets/000077500000000000000000000000001471374500100225255ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_71/app/assets/config/000077500000000000000000000000001471374500100237725ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_71/app/assets/config/manifest.js000066400000000000000000000000771471374500100261420ustar00rootroot00000000000000//= link_tree ../images //= link_directory ../stylesheets .css roadie-rails-3.3.0/spec/railsapps/rails_71/app/assets/images/000077500000000000000000000000001471374500100237725ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_71/app/assets/images/rails.png000066400000000000000000000147661471374500100256300ustar00rootroot00000000000000PNG  IHDR2@X${tEXtSoftwareAdobe ImageReadyqe<IDATxڬ[ \eR֮^;Iwga@`gGgDgtqDFqFDqF@NRU]˫|_-Qy^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#G et\ ,:MێÜIC}m ٽO?eb%ːٰStB|Aznaz*FlQ/K uu*1wDvE֯SJTK;(4kƣ;v2P9`k{?~_[hʢ^9фǡ;m|]o9<#jz\wD,8V]]%K9er懇0n^FcI>`Ub+kօO1|NO]t+,Ȑl_ˮ6 ĒDbrz^pe7^[aþo確jN+xsNC߅wμ7|za2, omrbZ~,pN>;?Y,z[u◿jq 4aqڶNu6Zid@h!!F9#,#UrOa0=Då ,,,bE#ȮX3ªޏ=a< =&_~ ٵѽacj񫒆LsXuXB (wzEk_QIف*4'ѣSl{.,p۵2`jp^؇nZXPź^]wމ]aQ-oI5O3a] _wb ŭL]$"|sԩȬ= VсLIUbYY搮͢I$tf$2|r;~'GSXkᇦԭF4b4 xo[,04F~<}ۭR%myb׾\mlO.4}tE\7}M)tՉ13xF [-26t䢄&E"9;ٜrq e)K!:bwY }g;Jר)5D$!Kɤ9߫-K$$ hlDUFF J{s2R6rC&&0;@>]/Z3E,k;( 2^09 <%= stylesheet_link_tag "email" %>

Normal email

roadie-rails-3.3.0/spec/railsapps/rails_71/app/views/auto_mailer/normal_email.text000066400000000000000000000000151471374500100302220ustar00rootroot00000000000000Normal email roadie-rails-3.3.0/spec/railsapps/rails_71/app/views/mailer/000077500000000000000000000000001471374500100236315ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_71/app/views/mailer/normal_email.html.erb000066400000000000000000000003541471374500100277270ustar00rootroot00000000000000 <%= stylesheet_link_tag "email" %>

Normal email

roadie-rails-3.3.0/spec/railsapps/rails_71/app/views/mailer/normal_email.text000066400000000000000000000000151471374500100271720ustar00rootroot00000000000000Normal email roadie-rails-3.3.0/spec/railsapps/rails_71/bin/000077500000000000000000000000001471374500100212135ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_71/bin/bundle000077500000000000000000000056371471374500100224250ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'bundle' is installed as part of a gem, and # this file is here to facilitate running it. # require "rubygems" m = Module.new do module_function def invoked_as_script? File.expand_path($0) == File.expand_path(__FILE__) end def env_var_version ENV["BUNDLER_VERSION"] end def cli_arg_version return unless invoked_as_script? # don't want to hijack other binstubs return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update` bundler_version = nil update_index = nil ARGV.each_with_index do |a, i| if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN bundler_version = a end next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/o bundler_version = $1 update_index = i end bundler_version end def gemfile gemfile = ENV["BUNDLE_GEMFILE"] return gemfile if gemfile && !gemfile.empty? File.expand_path("../../Gemfile", __FILE__) end def lockfile lockfile = case File.basename(gemfile) when "gems.rb" then gemfile.sub(/\.rb$/, gemfile) else "#{gemfile}.lock" end File.expand_path(lockfile) end def lockfile_version return unless File.file?(lockfile) lockfile_contents = File.read(lockfile) return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/o Regexp.last_match(1) end def bundler_requirement @bundler_requirement ||= env_var_version || cli_arg_version || bundler_requirement_for(lockfile_version) end def bundler_requirement_for(version) return "#{Gem::Requirement.default}.a" unless version bundler_gem_version = Gem::Version.new(version) requirement = bundler_gem_version.approximate_recommendation return requirement unless Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.7.0") requirement += ".a" if bundler_gem_version.prerelease? requirement end def load_bundler! ENV["BUNDLE_GEMFILE"] ||= gemfile activate_bundler end def activate_bundler gem_error = activation_error_handling do gem "bundler", bundler_requirement end return if gem_error.nil? require_error = activation_error_handling do require "bundler/version" end return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION)) warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`" exit 42 end def activation_error_handling yield nil rescue StandardError, LoadError => e e end end m.load_bundler! if m.invoked_as_script? load Gem.bin_path("bundler", "bundle") end roadie-rails-3.3.0/spec/railsapps/rails_71/bin/rails000077500000000000000000000002151471374500100222510ustar00rootroot00000000000000#!/usr/bin/env ruby APP_PATH = File.expand_path("../config/application", __dir__) require_relative "../config/boot" require "rails/commands" roadie-rails-3.3.0/spec/railsapps/rails_71/bin/rake000077500000000000000000000001321471374500100220570ustar00rootroot00000000000000#!/usr/bin/env ruby require_relative "../config/boot" require "rake" Rake.application.run roadie-rails-3.3.0/spec/railsapps/rails_71/bin/setup000077500000000000000000000014061471374500100223020ustar00rootroot00000000000000#!/usr/bin/env ruby require "fileutils" # path to your application root. APP_ROOT = File.expand_path("..", __dir__) def system!(*args) system(*args) || abort("\n== Command #{args} failed ==") end FileUtils.chdir APP_ROOT do # This script is a way to set up or update your development environment automatically. # This script is idempotent, so that you can run it at any time and get an expectable outcome. # Add necessary setup steps to this file. puts "== Installing dependencies ==" system! "gem install bundler --conservative" system("bundle check") || system!("bundle install") puts "\n== Removing old logs and tempfiles ==" system! "bin/rails log:clear tmp:clear" puts "\n== Restarting application server ==" system! "bin/rails restart" end roadie-rails-3.3.0/spec/railsapps/rails_71/config.ru000066400000000000000000000002401471374500100222540ustar00rootroot00000000000000# This file is used by Rack-based servers to start the application. require_relative "config/environment" run Rails.application Rails.application.load_server roadie-rails-3.3.0/spec/railsapps/rails_71/config/000077500000000000000000000000001471374500100217105ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_71/config/application.rb000066400000000000000000000023211471374500100245360ustar00rootroot00000000000000require_relative "boot" require "rails" # Pick the frameworks you want: # require "active_model/railtie" # require "active_job/railtie" # require "active_record/railtie" # require "active_storage/engine" require "action_controller/railtie" require "action_mailer/railtie" # require "action_mailbox/engine" # require "action_text/engine" require "action_view/railtie" # require "action_cable/engine" require "sprockets/railtie" # require "rails/test_unit/railtie" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) module Rails70 class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. config.load_defaults 7.1 # Configuration for the application, engines, and railties goes here. # # These settings can be overridden in specific environments using the files # in config/environments, which are processed later. # # config.time_zone = "Central Time (US & Canada)" # config.eager_load_paths << Rails.root.join("extras") config.roadie.url_options = {host: "example.app.org"} config.action_view.preload_links_header = false end end roadie-rails-3.3.0/spec/railsapps/rails_71/config/boot.rb000066400000000000000000000003171471374500100232010ustar00rootroot00000000000000ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) require "bundler/setup" # Set up gems listed in the Gemfile. require "bootsnap/setup" # Speed up boot time by caching expensive operations. roadie-rails-3.3.0/spec/railsapps/rails_71/config/environment.rb000066400000000000000000000002001471374500100245710ustar00rootroot00000000000000# Load the Rails application. require_relative "application" # Initialize the Rails application. Rails.application.initialize! roadie-rails-3.3.0/spec/railsapps/rails_71/config/environments/000077500000000000000000000000001471374500100244375ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_71/config/environments/development.rb000066400000000000000000000037141471374500100273130ustar00rootroot00000000000000require "active_support/core_ext/integer/time" Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded any time # it changes. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. config.cache_classes = false # Do not eager load code on boot. config.eager_load = false # Show full error reports. config.consider_all_requests_local = true # Enable/disable caching. By default caching is disabled. # Run rails dev:cache to toggle caching. if Rails.root.join("tmp/caching-dev.txt").exist? config.action_controller.perform_caching = true config.action_controller.enable_fragment_cache_logging = true config.cache_store = :memory_store config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" } else config.action_controller.perform_caching = false config.cache_store = :null_store end # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false config.action_mailer.perform_caching = false # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log # Raise exceptions for disallowed deprecations. config.active_support.disallowed_deprecation = :raise # Tell Active Support which deprecation messages to disallow. config.active_support.disallowed_deprecation_warnings = [] # Suppress logger output for asset requests. config.assets.quiet = true # Raises error for missing translations. # config.i18n.raise_on_missing_translations = true # Annotate rendered view with file names. # config.action_view.annotate_rendered_view_with_filenames = true # Uncomment if you wish to allow Action Cable access from any origin. # config.action_cable.disable_request_forgery_protection = true end roadie-rails-3.3.0/spec/railsapps/rails_71/config/initializers/000077500000000000000000000000001471374500100244165ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_71/config/initializers/assets.rb000066400000000000000000000010621471374500100262440ustar00rootroot00000000000000# 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" # Add additional assets to the asset load path. # Rails.application.config.assets.paths << Emoji.images_path # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in the app/assets # folder are already added. # Rails.application.config.assets.precompile += %w( admin.js admin.css ) Rails.application.config.assets.precompile += %w[email.css] roadie-rails-3.3.0/spec/railsapps/rails_71/config/initializers/backtrace_silencers.rb000066400000000000000000000010341471374500100307270ustar00rootroot00000000000000# Be sure to restart your server when you modify this file. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. # Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) } # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code # by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'". Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"] roadie-rails-3.3.0/spec/railsapps/rails_71/config/initializers/content_security_policy.rb000066400000000000000000000023051471374500100317230ustar00rootroot00000000000000# Be sure to restart your server when you modify this file. # Define an application-wide content security policy # For further information see the following documentation # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy # Rails.application.config.content_security_policy do |policy| # policy.default_src :self, :https # policy.font_src :self, :https, :data # policy.img_src :self, :https, :data # policy.object_src :none # policy.script_src :self, :https # policy.style_src :self, :https # # Specify URI for violation reports # # policy.report_uri "/csp-violation-report-endpoint" # end # If you are using UJS then enable automatic nonce generation # Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) } # Set the nonce only to specific directives # Rails.application.config.content_security_policy_nonce_directives = %w(script-src) # Report CSP violations to a specified URI # For further information see the following documentation: # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only # Rails.application.config.content_security_policy_report_only = true roadie-rails-3.3.0/spec/railsapps/rails_71/config/initializers/filter_parameter_logging.rb000066400000000000000000000004041471374500100317740ustar00rootroot00000000000000# Be sure to restart your server when you modify this file. # Configure sensitive parameters which will be filtered from the log file. Rails.application.config.filter_parameters += [ :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn ] roadie-rails-3.3.0/spec/railsapps/rails_71/config/initializers/inflections.rb000066400000000000000000000012111471374500100272530ustar00rootroot00000000000000# Be sure to restart your server when you modify this file. # Add new inflection rules using the following format. Inflections # are locale specific, and you may define rules for as many different # locales as you wish. All of these examples are active by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.plural /^(ox)$/i, "\\1en" # inflect.singular /^(ox)en/i, "\\1" # inflect.irregular "person", "people" # inflect.uncountable %w( fish sheep ) # end # These inflection rules are supported but not enabled by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.acronym "RESTful" # end roadie-rails-3.3.0/spec/railsapps/rails_71/config/initializers/mime_types.rb000066400000000000000000000002341471374500100271150ustar00rootroot00000000000000# Be sure to restart your server when you modify this file. # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf roadie-rails-3.3.0/spec/railsapps/rails_71/config/initializers/permissions_policy.rb000066400000000000000000000006001471374500100306710ustar00rootroot00000000000000# Define an application-wide HTTP permissions policy. For further # information see https://developers.google.com/web/updates/2018/06/feature-policy # # Rails.application.config.permissions_policy do |f| # f.camera :none # f.gyroscope :none # f.microphone :none # f.usb :none # f.fullscreen :self # f.payment :self, "https://secure.example.com" # end roadie-rails-3.3.0/spec/railsapps/rails_71/config/initializers/wrap_parameters.rb000066400000000000000000000005231471374500100301370ustar00rootroot00000000000000# Be sure to restart your server when you modify this file. # This file contains settings for ActionController::ParamsWrapper which # is enabled by default. # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:action_controller) do wrap_parameters format: [:json] end roadie-rails-3.3.0/spec/railsapps/rails_71/config/routes.rb000066400000000000000000000004051471374500100235550ustar00rootroot00000000000000Rails.application.routes.draw do # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html # Almost every application defines a route for the root path ("/") at the top of this file. # root "articles#index" end roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/000077500000000000000000000000001471374500100235645ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/Gemfile000066400000000000000000000005101471374500100250530ustar00rootroot00000000000000# frozen_string_literal: true source "https://rubygems.org" # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" gem "rails", "~> 7.1.0" # Reduces boot times through caching; required in config/boot.rb gem "bootsnap", ">= 1.4.4", require: false gem "propshaft" gem "roadie-rails", path: "../../.." roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/Rakefile000066400000000000000000000003431471374500100252310ustar00rootroot00000000000000# Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require_relative "config/application" Rails.application.load_tasks roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/app/000077500000000000000000000000001471374500100243445ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/app/assets/000077500000000000000000000000001471374500100256465ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/app/assets/builds/000077500000000000000000000000001471374500100271305ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/app/assets/builds/.gitkeep000066400000000000000000000000001471374500100305470ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/app/assets/images/000077500000000000000000000000001471374500100271135ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/app/assets/images/rails.png000066400000000000000000000147661471374500100307510ustar00rootroot00000000000000PNG  IHDR2@X${tEXtSoftwareAdobe ImageReadyqe<IDATxڬ[ \eR֮^;Iwga@`gGgDgtqDFqFDqF@NRU]˫|_-Qy^Ǹ.݋0W_6kbf̻ܸ6<4 w5~*r?9m&"M7@vm' {_S)Vi\WG?իjMd@ lDLX鸺W-TU+@EPo\&*Rnn, fDWrX|3M=\EJB[d6A'=tx^$a86̈{, ϱPepN*_W_3o;ޥ(0E:i6eXnhGf"L|S+(+.gФg=Ych=m#V_#}Ǫ|tR D8VՄM~xg!ni%Dy( B,{(Np$3iر$h.@e[a'eJԂyϠ4>H*MHQ(Jgt-֢QI ^d„@s-'- 51{'0 |n4ۉh{V@ܩw"BT =rzqPpBHȃ?ň ]-qpgsPiSӪg`jn)m 御B2L.x!jJP! K/\ ʮRB[09Trӈu. uH$ DDQ+:ݘٻ 3/nލ%Sjm2!&D/[EHwW A-RR!PeuHim"t6lFgЫ-O.1?ƞksX~VtmZJR11Nu&<⽩,Tb,`w WPx-G5 `մ/5pbAtIVJ_]0/DiH=ô#*77-3 VuQ0.pݔ%yw hљW0),2$b6&I/@bj$I(fx' JnO"`<-/LѮ%^ȫͶn2wҗ2}}XսL'Q-,m/ꤋ4#0Q&00NKrsA,Aײ)aIEC(ERK{8Ȭ[y?iI5$%f{}u F 1~;v1l'@F 'IF'm!K7"&]w 15#4Vižn[v 8Ě)>C=LBo~/3% wF4֓ʿ8>bWX@bb@IzP9IvFfQL!2cEP(se4~5RhAŽ90_? cMEteVOaOr B]pȱؓ"Eyx: NJ)bl׋hYuTdԫw=آMgwVPOFΒ25-TD[Z2>]V,xӛIOƅ)Jͺ[)?cn28p#(mk+./phʮQ6?w7HIoSj)1<#-N9O1ͰސkIKr:(ŗ;rR&<93v@w(w:~:TFSޒ" ՊTdT9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M`|![$P4ʊ$#,dɌ(?KTJR۸S%C7jHb浃j+N$,[.@˹_ ?.3ĵH"U$Z^ X02!Kc 8q.NMI6N&3n8exoWfPIJB<pREAdo$*m)e9D 5X[T$LΠ:]C$n#mC[P~Yt*d?\q^WXs!E-2#_mw8;2!vw:DUn$)GiGn3_o EZE3k-EHv.OûzE>"֛}l\/-nرQHԽab*#K׋eIƳd#G et\ ,:MێÜIC}m ٽO?eb%ːٰStB|Aznaz*FlQ/K uu*1wDvE֯SJTK;(4kƣ;v2P9`k{?~_[hʢ^9фǡ;m|]o9<#jz\wD,8V]]%K9er懇0n^FcI>`Ub+kօO1|NO]t+,Ȑl_ˮ6 ĒDbrz^pe7^[aþo確jN+xsNC߅wμ7|za2, omrbZ~,pN>;?Y,z[u◿jq 4aqڶNu6Zid@h!!F9#,#UrOa0=Då ,,,bE#ȮX3ªޏ=a< =&_~ ٵѽacj񫒆LsXuXB (wzEk_QIف*4'ѣSl{.,p۵2`jp^؇nZXPź^]wމ]aQ-oI5O3a] _wb ŭL]$"|sԩȬ= VсLIUbYY搮͢I$tf$2|r;~'GSXkᇦԭF4b4 xo[,04F~<}ۭR%myb׾\mlO.4}tE\7}M)tՉ13xF [-26t䢄&E"9;ٜrq e)K!:bwY }g;Jר)5D$!Kɤ9߫-K$$ hlDUFF J{s2R6rC&&0;@>]/Z3E,k;( 2^09 <%= stylesheet_link_tag "email" %>

Normal email

roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/app/views/auto_mailer/normal_email.text000066400000000000000000000000151471374500100333430ustar00rootroot00000000000000Normal email roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/app/views/mailer/000077500000000000000000000000001471374500100267525ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/app/views/mailer/normal_email.html.erb000066400000000000000000000003541471374500100330500ustar00rootroot00000000000000 <%= stylesheet_link_tag "email" %>

Normal email

roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/app/views/mailer/normal_email.text000066400000000000000000000000151471374500100323130ustar00rootroot00000000000000Normal email roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/bin/000077500000000000000000000000001471374500100243345ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/bin/bundle000077500000000000000000000056371471374500100255460ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'bundle' is installed as part of a gem, and # this file is here to facilitate running it. # require "rubygems" m = Module.new do module_function def invoked_as_script? File.expand_path($0) == File.expand_path(__FILE__) end def env_var_version ENV["BUNDLER_VERSION"] end def cli_arg_version return unless invoked_as_script? # don't want to hijack other binstubs return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update` bundler_version = nil update_index = nil ARGV.each_with_index do |a, i| if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN bundler_version = a end next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/o bundler_version = $1 update_index = i end bundler_version end def gemfile gemfile = ENV["BUNDLE_GEMFILE"] return gemfile if gemfile && !gemfile.empty? File.expand_path("../../Gemfile", __FILE__) end def lockfile lockfile = case File.basename(gemfile) when "gems.rb" then gemfile.sub(/\.rb$/, gemfile) else "#{gemfile}.lock" end File.expand_path(lockfile) end def lockfile_version return unless File.file?(lockfile) lockfile_contents = File.read(lockfile) return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/o Regexp.last_match(1) end def bundler_requirement @bundler_requirement ||= env_var_version || cli_arg_version || bundler_requirement_for(lockfile_version) end def bundler_requirement_for(version) return "#{Gem::Requirement.default}.a" unless version bundler_gem_version = Gem::Version.new(version) requirement = bundler_gem_version.approximate_recommendation return requirement unless Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.7.0") requirement += ".a" if bundler_gem_version.prerelease? requirement end def load_bundler! ENV["BUNDLE_GEMFILE"] ||= gemfile activate_bundler end def activate_bundler gem_error = activation_error_handling do gem "bundler", bundler_requirement end return if gem_error.nil? require_error = activation_error_handling do require "bundler/version" end return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION)) warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`" exit 42 end def activation_error_handling yield nil rescue StandardError, LoadError => e e end end m.load_bundler! if m.invoked_as_script? load Gem.bin_path("bundler", "bundle") end roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/bin/rails000077500000000000000000000002151471374500100253720ustar00rootroot00000000000000#!/usr/bin/env ruby APP_PATH = File.expand_path("../config/application", __dir__) require_relative "../config/boot" require "rails/commands" roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/bin/rake000077500000000000000000000001321471374500100252000ustar00rootroot00000000000000#!/usr/bin/env ruby require_relative "../config/boot" require "rake" Rake.application.run roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/bin/setup000077500000000000000000000014061471374500100254230ustar00rootroot00000000000000#!/usr/bin/env ruby require "fileutils" # path to your application root. APP_ROOT = File.expand_path("..", __dir__) def system!(*args) system(*args) || abort("\n== Command #{args} failed ==") end FileUtils.chdir APP_ROOT do # This script is a way to set up or update your development environment automatically. # This script is idempotent, so that you can run it at any time and get an expectable outcome. # Add necessary setup steps to this file. puts "== Installing dependencies ==" system! "gem install bundler --conservative" system("bundle check") || system!("bundle install") puts "\n== Removing old logs and tempfiles ==" system! "bin/rails log:clear tmp:clear" puts "\n== Restarting application server ==" system! "bin/rails restart" end roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/config.ru000066400000000000000000000002401471374500100253750ustar00rootroot00000000000000# This file is used by Rack-based servers to start the application. require_relative "config/environment" run Rails.application Rails.application.load_server roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/config/000077500000000000000000000000001471374500100250315ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/config/application.rb000066400000000000000000000023111471374500100276560ustar00rootroot00000000000000require_relative "boot" require "rails" # Pick the frameworks you want: # require "active_model/railtie" # require "active_job/railtie" # require "active_record/railtie" # require "active_storage/engine" require "action_controller/railtie" require "action_mailer/railtie" # require "action_mailbox/engine" # require "action_text/engine" require "action_view/railtie" # require "action_cable/engine" # require "rails/test_unit/railtie" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) require "propshaft" module Rails70 class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. config.load_defaults 7.1 # Configuration for the application, engines, and railties goes here. # # These settings can be overridden in specific environments using the files # in config/environments, which are processed later. # # config.time_zone = "Central Time (US & Canada)" # config.eager_load_paths << Rails.root.join("extras") config.roadie.url_options = {host: "example.app.org"} config.action_view.preload_links_header = false end end roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/config/boot.rb000066400000000000000000000003171471374500100263220ustar00rootroot00000000000000ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) require "bundler/setup" # Set up gems listed in the Gemfile. require "bootsnap/setup" # Speed up boot time by caching expensive operations. roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/config/environment.rb000066400000000000000000000002001471374500100277120ustar00rootroot00000000000000# Load the Rails application. require_relative "application" # Initialize the Rails application. Rails.application.initialize! roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/config/environments/000077500000000000000000000000001471374500100275605ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/config/environments/development.rb000066400000000000000000000037141471374500100324340ustar00rootroot00000000000000require "active_support/core_ext/integer/time" Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded any time # it changes. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. config.cache_classes = false # Do not eager load code on boot. config.eager_load = false # Show full error reports. config.consider_all_requests_local = true # Enable/disable caching. By default caching is disabled. # Run rails dev:cache to toggle caching. if Rails.root.join("tmp/caching-dev.txt").exist? config.action_controller.perform_caching = true config.action_controller.enable_fragment_cache_logging = true config.cache_store = :memory_store config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" } else config.action_controller.perform_caching = false config.cache_store = :null_store end # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false config.action_mailer.perform_caching = false # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log # Raise exceptions for disallowed deprecations. config.active_support.disallowed_deprecation = :raise # Tell Active Support which deprecation messages to disallow. config.active_support.disallowed_deprecation_warnings = [] # Suppress logger output for asset requests. config.assets.quiet = true # Raises error for missing translations. # config.i18n.raise_on_missing_translations = true # Annotate rendered view with file names. # config.action_view.annotate_rendered_view_with_filenames = true # Uncomment if you wish to allow Action Cable access from any origin. # config.action_cable.disable_request_forgery_protection = true end roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/config/initializers/000077500000000000000000000000001471374500100275375ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/config/initializers/backtrace_silencers.rb000066400000000000000000000010341471374500100340500ustar00rootroot00000000000000# Be sure to restart your server when you modify this file. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. # Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) } # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code # by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'". Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"] content_security_policy.rb000066400000000000000000000023051471374500100347650ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/config/initializers# Be sure to restart your server when you modify this file. # Define an application-wide content security policy # For further information see the following documentation # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy # Rails.application.config.content_security_policy do |policy| # policy.default_src :self, :https # policy.font_src :self, :https, :data # policy.img_src :self, :https, :data # policy.object_src :none # policy.script_src :self, :https # policy.style_src :self, :https # # Specify URI for violation reports # # policy.report_uri "/csp-violation-report-endpoint" # end # If you are using UJS then enable automatic nonce generation # Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) } # Set the nonce only to specific directives # Rails.application.config.content_security_policy_nonce_directives = %w(script-src) # Report CSP violations to a specified URI # For further information see the following documentation: # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only # Rails.application.config.content_security_policy_report_only = true filter_parameter_logging.rb000066400000000000000000000004041471374500100350360ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/config/initializers# Be sure to restart your server when you modify this file. # Configure sensitive parameters which will be filtered from the log file. Rails.application.config.filter_parameters += [ :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn ] roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/config/initializers/inflections.rb000066400000000000000000000012111471374500100323740ustar00rootroot00000000000000# Be sure to restart your server when you modify this file. # Add new inflection rules using the following format. Inflections # are locale specific, and you may define rules for as many different # locales as you wish. All of these examples are active by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.plural /^(ox)$/i, "\\1en" # inflect.singular /^(ox)en/i, "\\1" # inflect.irregular "person", "people" # inflect.uncountable %w( fish sheep ) # end # These inflection rules are supported but not enabled by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.acronym "RESTful" # end roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/config/initializers/mime_types.rb000066400000000000000000000002341471374500100322360ustar00rootroot00000000000000# Be sure to restart your server when you modify this file. # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/config/initializers/permissions_policy.rb000066400000000000000000000006001471374500100340120ustar00rootroot00000000000000# Define an application-wide HTTP permissions policy. For further # information see https://developers.google.com/web/updates/2018/06/feature-policy # # Rails.application.config.permissions_policy do |f| # f.camera :none # f.gyroscope :none # f.microphone :none # f.usb :none # f.fullscreen :self # f.payment :self, "https://secure.example.com" # end roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/config/initializers/wrap_parameters.rb000066400000000000000000000005231471374500100332600ustar00rootroot00000000000000# Be sure to restart your server when you modify this file. # This file contains settings for ActionController::ParamsWrapper which # is enabled by default. # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:action_controller) do wrap_parameters format: [:json] end roadie-rails-3.3.0/spec/railsapps/rails_71_with_propshaft/config/routes.rb000066400000000000000000000004051471374500100266760ustar00rootroot00000000000000Rails.application.routes.draw do # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html # Almost every application defines a route for the root path ("/") at the top of this file. # root "articles#index" end roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/000077500000000000000000000000001471374500100235645ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/Gemfile000066400000000000000000000005101471374500100250530ustar00rootroot00000000000000# frozen_string_literal: true source "https://rubygems.org" # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" gem "rails", "~> 8.0.0" # Reduces boot times through caching; required in config/boot.rb gem "bootsnap", ">= 1.4.4", require: false gem "propshaft" gem "roadie-rails", path: "../../.." roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/Rakefile000066400000000000000000000003431471374500100252310ustar00rootroot00000000000000# Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require_relative "config/application" Rails.application.load_tasks roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/app/000077500000000000000000000000001471374500100243445ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/app/assets/000077500000000000000000000000001471374500100256465ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/app/assets/builds/000077500000000000000000000000001471374500100271305ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/app/assets/builds/.gitkeep000066400000000000000000000000001471374500100305470ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/app/assets/images/000077500000000000000000000000001471374500100271135ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/app/assets/images/rails.png000066400000000000000000000147661471374500100307510ustar00rootroot00000000000000PNG  IHDR2@X${tEXtSoftwareAdobe ImageReadyqe<IDATxڬ[ \eR֮^;Iwga@`gGgDgtqDFqFDqF@NRU]˫|_-Qy^Ǹ.݋0W_6kbf̻ܸ6<4 w5~*r?9m&"M7@vm' {_S)Vi\WG?իjMd@ lDLX鸺W-TU+@EPo\&*Rnn, fDWrX|3M=\EJB[d6A'=tx^$a86̈{, ϱPepN*_W_3o;ޥ(0E:i6eXnhGf"L|S+(+.gФg=Ych=m#V_#}Ǫ|tR D8VՄM~xg!ni%Dy( B,{(Np$3iر$h.@e[a'eJԂyϠ4>H*MHQ(Jgt-֢QI ^d„@s-'- 51{'0 |n4ۉh{V@ܩw"BT =rzqPpBHȃ?ň ]-qpgsPiSӪg`jn)m 御B2L.x!jJP! K/\ ʮRB[09Trӈu. uH$ DDQ+:ݘٻ 3/nލ%Sjm2!&D/[EHwW A-RR!PeuHim"t6lFgЫ-O.1?ƞksX~VtmZJR11Nu&<⽩,Tb,`w WPx-G5 `մ/5pbAtIVJ_]0/DiH=ô#*77-3 VuQ0.pݔ%yw hљW0),2$b6&I/@bj$I(fx' JnO"`<-/LѮ%^ȫͶn2wҗ2}}XսL'Q-,m/ꤋ4#0Q&00NKrsA,Aײ)aIEC(ERK{8Ȭ[y?iI5$%f{}u F 1~;v1l'@F 'IF'm!K7"&]w 15#4Vižn[v 8Ě)>C=LBo~/3% wF4֓ʿ8>bWX@bb@IzP9IvFfQL!2cEP(se4~5RhAŽ90_? cMEteVOaOr B]pȱؓ"Eyx: NJ)bl׋hYuTd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x->V,'JU \L]l>W*r-hXf~oI Z3f玱>vN3 uZTgg}Վ363:.g /-H+"PKۉSZ4Z_GlXMc7";ҿ (5fMUCOF6 CNft>$S1VaR&4) ٗay]%W A*|gX{Qc>iTX1F M`|![$P4ʊ$#,dɌ(?KTJR۸S%C7jHb浃j+N$,[.@˹_ ?.3ĵH"U$Z^ X02!Kc 8q.NMI6N&3n8exoWfPIJB<pREAdo$*m)e9D 5X[T$LΠ:]C$n#mC[P~Yt*d?\q^WXs!E-2#_mw8;2!vw:DUn$)GiGn3_o EZE3k-EHv.OûzE>"֛}l\/-nرQHԽab*#K׋eIƳd#G et\ ,:MێÜIC}m ٽO?eb%ːٰStB|Aznaz*FlQ/K uu*1wDvE֯SJTK;(4kƣ;v2P9`k{?~_[hʢ^9фǡ;m|]o9<#jz\wD,8V]]%K9er懇0n^FcI>`Ub+kօO1|NO]t+,Ȑl_ˮ6 ĒDbrz^pe7^[aþo確jN+xsNC߅wμ7|za2, omrbZ~,pN>;?Y,z[u◿jq 4aqڶNu6Zid@h!!F9#,#UrOa0=Då ,,,bE#ȮX3ªޏ=a< =&_~ ٵѽacj񫒆LsXuXB (wzEk_QIف*4'ѣSl{.,p۵2`jp^؇nZXPź^]wމ]aQ-oI5O3a] _wb ŭL]$"|sԩȬ= VсLIUbYY搮͢I$tf$2|r;~'GSXkᇦԭF4b4 xo[,04F~<}ۭR%myb׾\mlO.4}tE\7}M)tՉ13xF [-26t䢄&E"9;ٜrq e)K!:bwY }g;Jר)5D$!Kɤ9߫-K$$ hlDUFF J{s2R6rC&&0;@>]/Z3E,k;( 2^09 <%= stylesheet_link_tag "email" %>

Normal email

roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/app/views/auto_mailer/normal_email.text000066400000000000000000000000151471374500100333430ustar00rootroot00000000000000Normal email roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/app/views/mailer/000077500000000000000000000000001471374500100267525ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/app/views/mailer/normal_email.html.erb000066400000000000000000000003541471374500100330500ustar00rootroot00000000000000 <%= stylesheet_link_tag "email" %>

Normal email

roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/app/views/mailer/normal_email.text000066400000000000000000000000151471374500100323130ustar00rootroot00000000000000Normal email roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/bin/000077500000000000000000000000001471374500100243345ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/bin/bundle000077500000000000000000000056371471374500100255460ustar00rootroot00000000000000#!/usr/bin/env ruby # frozen_string_literal: true # # This file was generated by Bundler. # # The application 'bundle' is installed as part of a gem, and # this file is here to facilitate running it. # require "rubygems" m = Module.new do module_function def invoked_as_script? File.expand_path($0) == File.expand_path(__FILE__) end def env_var_version ENV["BUNDLER_VERSION"] end def cli_arg_version return unless invoked_as_script? # don't want to hijack other binstubs return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update` bundler_version = nil update_index = nil ARGV.each_with_index do |a, i| if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN bundler_version = a end next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/o bundler_version = $1 update_index = i end bundler_version end def gemfile gemfile = ENV["BUNDLE_GEMFILE"] return gemfile if gemfile && !gemfile.empty? File.expand_path("../../Gemfile", __FILE__) end def lockfile lockfile = case File.basename(gemfile) when "gems.rb" then gemfile.sub(/\.rb$/, gemfile) else "#{gemfile}.lock" end File.expand_path(lockfile) end def lockfile_version return unless File.file?(lockfile) lockfile_contents = File.read(lockfile) return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/o Regexp.last_match(1) end def bundler_requirement @bundler_requirement ||= env_var_version || cli_arg_version || bundler_requirement_for(lockfile_version) end def bundler_requirement_for(version) return "#{Gem::Requirement.default}.a" unless version bundler_gem_version = Gem::Version.new(version) requirement = bundler_gem_version.approximate_recommendation return requirement unless Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.7.0") requirement += ".a" if bundler_gem_version.prerelease? requirement end def load_bundler! ENV["BUNDLE_GEMFILE"] ||= gemfile activate_bundler end def activate_bundler gem_error = activation_error_handling do gem "bundler", bundler_requirement end return if gem_error.nil? require_error = activation_error_handling do require "bundler/version" end return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION)) warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`" exit 42 end def activation_error_handling yield nil rescue StandardError, LoadError => e e end end m.load_bundler! if m.invoked_as_script? load Gem.bin_path("bundler", "bundle") end roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/bin/rails000077500000000000000000000002151471374500100253720ustar00rootroot00000000000000#!/usr/bin/env ruby APP_PATH = File.expand_path("../config/application", __dir__) require_relative "../config/boot" require "rails/commands" roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/bin/rake000077500000000000000000000001321471374500100252000ustar00rootroot00000000000000#!/usr/bin/env ruby require_relative "../config/boot" require "rake" Rake.application.run roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/bin/setup000077500000000000000000000014061471374500100254230ustar00rootroot00000000000000#!/usr/bin/env ruby require "fileutils" # path to your application root. APP_ROOT = File.expand_path("..", __dir__) def system!(*args) system(*args) || abort("\n== Command #{args} failed ==") end FileUtils.chdir APP_ROOT do # This script is a way to set up or update your development environment automatically. # This script is idempotent, so that you can run it at any time and get an expectable outcome. # Add necessary setup steps to this file. puts "== Installing dependencies ==" system! "gem install bundler --conservative" system("bundle check") || system!("bundle install") puts "\n== Removing old logs and tempfiles ==" system! "bin/rails log:clear tmp:clear" puts "\n== Restarting application server ==" system! "bin/rails restart" end roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/config.ru000066400000000000000000000002401471374500100253750ustar00rootroot00000000000000# This file is used by Rack-based servers to start the application. require_relative "config/environment" run Rails.application Rails.application.load_server roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/config/000077500000000000000000000000001471374500100250315ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/config/application.rb000066400000000000000000000023111471374500100276560ustar00rootroot00000000000000require_relative "boot" require "rails" # Pick the frameworks you want: # require "active_model/railtie" # require "active_job/railtie" # require "active_record/railtie" # require "active_storage/engine" require "action_controller/railtie" require "action_mailer/railtie" # require "action_mailbox/engine" # require "action_text/engine" require "action_view/railtie" # require "action_cable/engine" # require "rails/test_unit/railtie" # Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) require "propshaft" module Rails80 class Application < Rails::Application # Initialize configuration defaults for originally generated Rails version. config.load_defaults 8.0 # Configuration for the application, engines, and railties goes here. # # These settings can be overridden in specific environments using the files # in config/environments, which are processed later. # # config.time_zone = "Central Time (US & Canada)" # config.eager_load_paths << Rails.root.join("extras") config.roadie.url_options = {host: "example.app.org"} config.action_view.preload_links_header = false end end roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/config/boot.rb000066400000000000000000000003171471374500100263220ustar00rootroot00000000000000ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) require "bundler/setup" # Set up gems listed in the Gemfile. require "bootsnap/setup" # Speed up boot time by caching expensive operations. roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/config/environment.rb000066400000000000000000000002001471374500100277120ustar00rootroot00000000000000# Load the Rails application. require_relative "application" # Initialize the Rails application. Rails.application.initialize! roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/config/environments/000077500000000000000000000000001471374500100275605ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/config/environments/development.rb000066400000000000000000000037141471374500100324340ustar00rootroot00000000000000require "active_support/core_ext/integer/time" Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded any time # it changes. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. config.cache_classes = false # Do not eager load code on boot. config.eager_load = false # Show full error reports. config.consider_all_requests_local = true # Enable/disable caching. By default caching is disabled. # Run rails dev:cache to toggle caching. if Rails.root.join("tmp/caching-dev.txt").exist? config.action_controller.perform_caching = true config.action_controller.enable_fragment_cache_logging = true config.cache_store = :memory_store config.public_file_server.headers = { "Cache-Control" => "public, max-age=#{2.days.to_i}" } else config.action_controller.perform_caching = false config.cache_store = :null_store end # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false config.action_mailer.perform_caching = false # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log # Raise exceptions for disallowed deprecations. config.active_support.disallowed_deprecation = :raise # Tell Active Support which deprecation messages to disallow. config.active_support.disallowed_deprecation_warnings = [] # Suppress logger output for asset requests. config.assets.quiet = true # Raises error for missing translations. # config.i18n.raise_on_missing_translations = true # Annotate rendered view with file names. # config.action_view.annotate_rendered_view_with_filenames = true # Uncomment if you wish to allow Action Cable access from any origin. # config.action_cable.disable_request_forgery_protection = true end roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/config/initializers/000077500000000000000000000000001471374500100275375ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/config/initializers/backtrace_silencers.rb000066400000000000000000000010341471374500100340500ustar00rootroot00000000000000# Be sure to restart your server when you modify this file. # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. # Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) } # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code # by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'". Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"] content_security_policy.rb000066400000000000000000000023051471374500100347650ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/config/initializers# Be sure to restart your server when you modify this file. # Define an application-wide content security policy # For further information see the following documentation # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy # Rails.application.config.content_security_policy do |policy| # policy.default_src :self, :https # policy.font_src :self, :https, :data # policy.img_src :self, :https, :data # policy.object_src :none # policy.script_src :self, :https # policy.style_src :self, :https # # Specify URI for violation reports # # policy.report_uri "/csp-violation-report-endpoint" # end # If you are using UJS then enable automatic nonce generation # Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) } # Set the nonce only to specific directives # Rails.application.config.content_security_policy_nonce_directives = %w(script-src) # Report CSP violations to a specified URI # For further information see the following documentation: # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only # Rails.application.config.content_security_policy_report_only = true filter_parameter_logging.rb000066400000000000000000000004041471374500100350360ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/config/initializers# Be sure to restart your server when you modify this file. # Configure sensitive parameters which will be filtered from the log file. Rails.application.config.filter_parameters += [ :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn ] roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/config/initializers/inflections.rb000066400000000000000000000012111471374500100323740ustar00rootroot00000000000000# Be sure to restart your server when you modify this file. # Add new inflection rules using the following format. Inflections # are locale specific, and you may define rules for as many different # locales as you wish. All of these examples are active by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.plural /^(ox)$/i, "\\1en" # inflect.singular /^(ox)en/i, "\\1" # inflect.irregular "person", "people" # inflect.uncountable %w( fish sheep ) # end # These inflection rules are supported but not enabled by default: # ActiveSupport::Inflector.inflections(:en) do |inflect| # inflect.acronym "RESTful" # end roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/config/initializers/mime_types.rb000066400000000000000000000002341471374500100322360ustar00rootroot00000000000000# Be sure to restart your server when you modify this file. # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/config/initializers/permissions_policy.rb000066400000000000000000000006001471374500100340120ustar00rootroot00000000000000# Define an application-wide HTTP permissions policy. For further # information see https://developers.google.com/web/updates/2018/06/feature-policy # # Rails.application.config.permissions_policy do |f| # f.camera :none # f.gyroscope :none # f.microphone :none # f.usb :none # f.fullscreen :self # f.payment :self, "https://secure.example.com" # end roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/config/initializers/wrap_parameters.rb000066400000000000000000000005231471374500100332600ustar00rootroot00000000000000# Be sure to restart your server when you modify this file. # This file contains settings for ActionController::ParamsWrapper which # is enabled by default. # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. ActiveSupport.on_load(:action_controller) do wrap_parameters format: [:json] end roadie-rails-3.3.0/spec/railsapps/rails_80_with_propshaft/config/routes.rb000066400000000000000000000004051471374500100266760ustar00rootroot00000000000000Rails.application.routes.draw do # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html # Almost every application defines a route for the root path ("/") at the top of this file. # root "articles#index" end roadie-rails-3.3.0/spec/railsapps/shared/000077500000000000000000000000001471374500100202705ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/shared/all/000077500000000000000000000000001471374500100210405ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/shared/all/app/000077500000000000000000000000001471374500100216205ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/shared/all/app/mailers/000077500000000000000000000000001471374500100232545ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/shared/all/app/mailers/auto_mailer.rb000066400000000000000000000011061471374500100261000ustar00rootroot00000000000000# frozen_string_literal: true class AutoMailer < ActionMailer::Base include Roadie::Rails::Automatic default from: "john@example.com" def normal_email generate_email end def disabled_email generate_email end private def roadie_options unless /disabled/.match?(action_name) super.combine(url_options: {protocol: "https"}) end end def generate_email mail(to: "example@example.org", subject: "Notification for you") do |format| format.html { render :normal_email } format.text { render :normal_email } end end end roadie-rails-3.3.0/spec/railsapps/shared/all/app/mailers/mailer.rb000066400000000000000000000006021471374500100250500ustar00rootroot00000000000000# frozen_string_literal: true class Mailer < ActionMailer::Base include Roadie::Rails::Mailer default from: "john@example.com" def normal_email roadie_mail(to: "example@example.org", subject: "Notification for you") do |format| format.html format.text end end private def roadie_options super.combine(url_options: {protocol: "https"}) end end roadie-rails-3.3.0/spec/railsapps/shared/all/app/views/000077500000000000000000000000001471374500100227555ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/shared/all/app/views/auto_mailer000077700000000000000000000000001471374500100263702mailerustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/shared/all/app/views/mailer/000077500000000000000000000000001471374500100242265ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/shared/all/app/views/mailer/normal_email.html.erb000066400000000000000000000003541471374500100303240ustar00rootroot00000000000000 <%= stylesheet_link_tag "email" %>

Normal email

roadie-rails-3.3.0/spec/railsapps/shared/all/app/views/mailer/normal_email.text000066400000000000000000000000151471374500100275670ustar00rootroot00000000000000Normal email roadie-rails-3.3.0/spec/railsapps/shared/pipeline/000077500000000000000000000000001471374500100220755ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/shared/pipeline/app/000077500000000000000000000000001471374500100226555ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/shared/pipeline/app/assets/000077500000000000000000000000001471374500100241575ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/shared/pipeline/app/assets/config/000077500000000000000000000000001471374500100254245ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/shared/pipeline/app/assets/config/manifest.js000066400000000000000000000000771471374500100275740ustar00rootroot00000000000000//= link_tree ../images //= link_directory ../stylesheets .css roadie-rails-3.3.0/spec/railsapps/shared/pipeline/app/assets/images/000077500000000000000000000000001471374500100254245ustar00rootroot00000000000000roadie-rails-3.3.0/spec/railsapps/shared/pipeline/app/assets/images/rails.png000066400000000000000000000147661471374500100272620ustar00rootroot00000000000000PNG  I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~Yt*d?\q^WXs!E-2#_mw8;2!vw:DUn$)GiGn3_o EZE3k-EHv.OûzE>"֛}l\/-nرQHԽab*#K׋eIƳd#G et\ ,:MێÜIC}m ٽO?eb%ːٰStB|Aznaz*FlQ/K uu*1wDvE֯SJTK;(4kƣ;v2P9`k{?~_[hʢ^9фǡ;m|]o9<#jz\wD,8V]]%K9er懇0n^FcI>`Ub+kօO1|NO]t+,Ȑl_ˮ6 ĒDbrz^pe7^[aþo確jN+xsNC߅wμ7|za2, omrbZ~,pN>;?Y,z[u◿jq 4aqڶNu6Zid@h!!F9#,#UrOa0=Då ,,,bE#ȮX3ªޏ=a< =&_~ ٵѽacj񫒆LsXuXB (wzEk_QIف*4'ѣSl{.,p۵2`jp^؇nZXPź^]wމ]aQ-oI5O3a] _wb ŭL]$"|sԩȬ= VсLIUbYY搮͢I$tf$2|r;~'GSXkᇦԭF4b4 xo[,04F~<}ۭR%myb׾\mlO.4}tE\7}M)tՉ13xF [-26t䢄&E"9;ٜrq e)K!:bwY }g;Jר)5D$!Kɤ9߫-K$$ hlDUFF J{s2R6rC&&0;@>]/Z3E,k;( 2^09= minimum && version <= maximum end def with_propshaft? @asset_pipeline == :propshaft end def with_sprockets? @asset_pipeline == :sprockets end def to_s @name end def read_email(mail_name) result = run("puts Mailer.#{mail_name}.to_s") if result.strip.empty? raise "No email returned. Did the rails application crash?" end Mail.read_from_string(result) end def read_delivered_email( mail_name, options = {} ) deliver = options[:force_delivery] ? "deliver!" : "deliver" result = run(<<~RUBY) mail = AutoMailer.#{mail_name} mail.delivery_method(:test) mail.#{deliver} puts mail.to_s RUBY if result.strip.empty? raise "No email returned. Did the rails application crash?" end Mail.read_from_string(result) end def read_providers result = run(<<-RUBY).strip providers = Rails.application.config.roadie.asset_providers puts providers.map { |p| p.class.name }.join(',') RUBY raise "No output present. Did the application crash?" if result.empty? result.split(",") end def reset @extra_code = "" run_in_app_context "mkdir -p tmp" run_in_app_context "rm -rf tmp/cache" end def before_mail(code) @extra_code << "\n" << code << "\n" end private def run(code) Tempfile.open("code") do |file| file << @extra_code unless @extra_code.empty? file << code file.close run_file_in_app_context file.path end end def run_file_in_app_context(file_path) run_in_app_context "bin/rails runner #{file_path.shellescape}" end def run_in_app_context(command) Bundler.with_unbundled_env do Dir.chdir @path do IO.popen(command).read end end end end