roadie-rails-1.1.0/0000755000175000017500000000000012650457050014302 5ustar terceiroterceiroroadie-rails-1.1.0/metadata.yml0000644000175000017500000004172312650457050016614 0ustar terceiroterceiro--- !ruby/object:Gem::Specification name: roadie-rails version: !ruby/object:Gem::Version version: 1.1.0 platform: ruby authors: - Magnus Bergmark autorequire: bindir: bin cert_chain: [] date: 2015-11-17 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: roadie requirement: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version version: '3.1' type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version version: '3.1' - !ruby/object:Gem::Dependency name: railties requirement: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '3.0' - - "<" - !ruby/object:Gem::Version version: '4.3' type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '3.0' - - "<" - !ruby/object:Gem::Version version: '4.3' - !ruby/object:Gem::Dependency name: rails requirement: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '3.0' - - "<" - !ruby/object:Gem::Version version: '4.3' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '3.0' - - "<" - !ruby/object:Gem::Version version: '4.3' - !ruby/object:Gem::Dependency name: bundler requirement: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version version: '1.6' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version version: '1.6' - !ruby/object:Gem::Dependency name: rspec requirement: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version version: '3.0' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version version: '3.0' - !ruby/object:Gem::Dependency name: rspec-rails requirement: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '0' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '0' - !ruby/object:Gem::Dependency name: rspec-collection_matchers requirement: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '0' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '0' description: Hooks Roadie into your Rails application to help with email generation. email: - magnus.bergmark@gmail.com executables: [] extensions: [] extra_rdoc_files: - README.md - Changelog.md - LICENSE.txt files: - ".gitignore" - ".travis.yml" - Changelog.md - Gemfile - Guardfile - LICENSE.txt - README.md - Rakefile - Upgrading.md - lib/roadie-rails.rb - lib/roadie/rails.rb - lib/roadie/rails/asset_pipeline_provider.rb - lib/roadie/rails/automatic.rb - lib/roadie/rails/document_builder.rb - lib/roadie/rails/inline_on_delivery.rb - lib/roadie/rails/mail_inliner.rb - lib/roadie/rails/mailer.rb - lib/roadie/rails/options.rb - lib/roadie/rails/railtie.rb - lib/roadie/rails/version.rb - roadie-rails.gemspec - setup.sh - spec/integration_spec.rb - spec/lib/roadie/rails/asset_pipeline_provider_spec.rb - spec/lib/roadie/rails/automatic_spec.rb - spec/lib/roadie/rails/document_builder_spec.rb - spec/lib/roadie/rails/mail_inliner_spec.rb - spec/lib/roadie/rails/mailer_spec.rb - spec/lib/roadie/rails/options_spec.rb - spec/lib/roadie/rails/railtie_spec.rb - spec/railsapps/README.md - spec/railsapps/rails_30/.gitignore - spec/railsapps/rails_30/Gemfile - spec/railsapps/rails_30/config/application.rb - spec/railsapps/rails_30/config/boot.rb - spec/railsapps/rails_30/config/environment.rb - spec/railsapps/rails_30/config/environments/development.rb - spec/railsapps/rails_30/config/initializers/secret_token.rb - spec/railsapps/rails_30/config/initializers/session_store.rb - spec/railsapps/rails_30/config/routes.rb - spec/railsapps/rails_30/public/images/rails.png - spec/railsapps/rails_30/public/stylesheets/email.css - spec/railsapps/rails_30/script/rails - spec/railsapps/rails_31/.gitignore - spec/railsapps/rails_31/Gemfile - spec/railsapps/rails_31/config/application.rb - spec/railsapps/rails_31/config/boot.rb - spec/railsapps/rails_31/config/environment.rb - spec/railsapps/rails_31/config/environments/development.rb - spec/railsapps/rails_31/config/initializers/secret_token.rb - spec/railsapps/rails_31/config/initializers/session_store.rb - spec/railsapps/rails_31/config/initializers/wrap_parameters.rb - spec/railsapps/rails_31/config/routes.rb - spec/railsapps/rails_31/script/rails - spec/railsapps/rails_32/.gitignore - spec/railsapps/rails_32/Gemfile - spec/railsapps/rails_32/config/application.rb - spec/railsapps/rails_32/config/boot.rb - spec/railsapps/rails_32/config/environment.rb - spec/railsapps/rails_32/config/environments/development.rb - spec/railsapps/rails_32/config/initializers/secret_token.rb - spec/railsapps/rails_32/config/initializers/session_store.rb - spec/railsapps/rails_32/config/initializers/wrap_parameters.rb - spec/railsapps/rails_32/config/routes.rb - spec/railsapps/rails_32/script/rails - spec/railsapps/rails_40/Gemfile - spec/railsapps/rails_40/bin/rails - spec/railsapps/rails_40/config/application.rb - spec/railsapps/rails_40/config/boot.rb - spec/railsapps/rails_40/config/environment.rb - spec/railsapps/rails_40/config/environments/development.rb - spec/railsapps/rails_40/config/initializers/secret_token.rb - spec/railsapps/rails_40/config/initializers/session_store.rb - spec/railsapps/rails_40/config/routes.rb - spec/railsapps/rails_40_no_pipeline/Gemfile - spec/railsapps/rails_40_no_pipeline/bin/rails - spec/railsapps/rails_40_no_pipeline/config/application.rb - spec/railsapps/rails_40_no_pipeline/config/boot.rb - spec/railsapps/rails_40_no_pipeline/config/environment.rb - spec/railsapps/rails_40_no_pipeline/config/environments/development.rb - spec/railsapps/rails_40_no_pipeline/config/initializers/secret_token.rb - spec/railsapps/rails_40_no_pipeline/config/initializers/session_store.rb - spec/railsapps/rails_40_no_pipeline/config/routes.rb - spec/railsapps/rails_40_no_pipeline/log/dee - spec/railsapps/rails_40_no_pipeline/public/images/rails.png - spec/railsapps/rails_40_no_pipeline/public/stylesheets/email.css - spec/railsapps/rails_40_precompiled/Gemfile - spec/railsapps/rails_40_precompiled/Rakefile - spec/railsapps/rails_40_precompiled/bin/rails - spec/railsapps/rails_40_precompiled/config/application.rb - spec/railsapps/rails_40_precompiled/config/boot.rb - spec/railsapps/rails_40_precompiled/config/environment.rb - spec/railsapps/rails_40_precompiled/config/environments/development.rb - spec/railsapps/rails_40_precompiled/config/initializers/secret_token.rb - spec/railsapps/rails_40_precompiled/config/initializers/session_store.rb - spec/railsapps/rails_40_precompiled/config/routes.rb - spec/railsapps/rails_40_precompiled/public/assets/email-fad0c62b8f82e2835c1d0bdc19894257.css - spec/railsapps/rails_40_precompiled/public/assets/email-fad0c62b8f82e2835c1d0bdc19894257.css.gz - spec/railsapps/rails_40_precompiled/public/assets/manifest-8a3d16aeb2a40fe5057dd998c3edab10.json - spec/railsapps/rails_40_precompiled/public/assets/rails-231a680f23887d9dd70710ea5efd3c62.png - spec/railsapps/rails_41/.gitignore - spec/railsapps/rails_41/Gemfile - spec/railsapps/rails_41/bin/rails - spec/railsapps/rails_41/config.ru - spec/railsapps/rails_41/config/application.rb - spec/railsapps/rails_41/config/boot.rb - spec/railsapps/rails_41/config/environment.rb - spec/railsapps/rails_41/config/environments/development.rb - spec/railsapps/rails_41/config/initializers/secret_token.rb - spec/railsapps/rails_41/config/initializers/session_store.rb - spec/railsapps/rails_41/config/routes.rb - spec/railsapps/rails_42/.gitignore - spec/railsapps/rails_42/Gemfile - spec/railsapps/rails_42/bin/rails - spec/railsapps/rails_42/config.ru - spec/railsapps/rails_42/config/application.rb - spec/railsapps/rails_42/config/boot.rb - spec/railsapps/rails_42/config/environment.rb - spec/railsapps/rails_42/config/environments/development.rb - spec/railsapps/rails_42/config/initializers/secret_token.rb - spec/railsapps/rails_42/config/initializers/session_store.rb - spec/railsapps/rails_42/config/routes.rb - spec/railsapps/rails_42_sprockets_rails_3/.gitignore - spec/railsapps/rails_42_sprockets_rails_3/Gemfile - spec/railsapps/rails_42_sprockets_rails_3/bin/rails - spec/railsapps/rails_42_sprockets_rails_3/config.ru - spec/railsapps/rails_42_sprockets_rails_3/config/application.rb - spec/railsapps/rails_42_sprockets_rails_3/config/boot.rb - spec/railsapps/rails_42_sprockets_rails_3/config/environment.rb - spec/railsapps/rails_42_sprockets_rails_3/config/environments/development.rb - spec/railsapps/rails_42_sprockets_rails_3/config/initializers/assets.rb - spec/railsapps/rails_42_sprockets_rails_3/config/initializers/secret_token.rb - spec/railsapps/rails_42_sprockets_rails_3/config/initializers/session_store.rb - spec/railsapps/rails_42_sprockets_rails_3/config/routes.rb - spec/railsapps/shared/all/app/mailers/auto_mailer.rb - spec/railsapps/shared/all/app/mailers/mailer.rb - spec/railsapps/shared/all/app/views/mailer/normal_email.html.erb - spec/railsapps/shared/all/app/views/mailer/normal_email.text - spec/railsapps/shared/pipeline/app/assets/images/rails.png - spec/railsapps/shared/pipeline/app/assets/stylesheets/email.css.scss - spec/spec_helper.rb - spec/support/have_no_styling_matcher.rb - spec/support/have_selector_matcher.rb - spec/support/have_styling_matcher.rb - spec/support/rails_app.rb homepage: http://github.com/Mange/roadie-rails licenses: - MIT metadata: {} post_install_message: rdoc_options: [] require_paths: - lib required_ruby_version: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '0' required_rubygems_version: !ruby/object:Gem::Requirement requirements: - - ">=" - !ruby/object:Gem::Version version: '0' requirements: [] rubyforge_project: rubygems_version: 2.2.2 signing_key: specification_version: 4 summary: Making HTML emails comfortable for the Rails rockstars test_files: - spec/integration_spec.rb - spec/lib/roadie/rails/asset_pipeline_provider_spec.rb - spec/lib/roadie/rails/automatic_spec.rb - spec/lib/roadie/rails/document_builder_spec.rb - spec/lib/roadie/rails/mail_inliner_spec.rb - spec/lib/roadie/rails/mailer_spec.rb - spec/lib/roadie/rails/options_spec.rb - spec/lib/roadie/rails/railtie_spec.rb - spec/railsapps/README.md - spec/railsapps/rails_30/.gitignore - spec/railsapps/rails_30/Gemfile - spec/railsapps/rails_30/config/application.rb - spec/railsapps/rails_30/config/boot.rb - spec/railsapps/rails_30/config/environment.rb - spec/railsapps/rails_30/config/environments/development.rb - spec/railsapps/rails_30/config/initializers/secret_token.rb - spec/railsapps/rails_30/config/initializers/session_store.rb - spec/railsapps/rails_30/config/routes.rb - spec/railsapps/rails_30/public/images/rails.png - spec/railsapps/rails_30/public/stylesheets/email.css - spec/railsapps/rails_30/script/rails - spec/railsapps/rails_31/.gitignore - spec/railsapps/rails_31/Gemfile - spec/railsapps/rails_31/config/application.rb - spec/railsapps/rails_31/config/boot.rb - spec/railsapps/rails_31/config/environment.rb - spec/railsapps/rails_31/config/environments/development.rb - spec/railsapps/rails_31/config/initializers/secret_token.rb - spec/railsapps/rails_31/config/initializers/session_store.rb - spec/railsapps/rails_31/config/initializers/wrap_parameters.rb - spec/railsapps/rails_31/config/routes.rb - spec/railsapps/rails_31/script/rails - spec/railsapps/rails_32/.gitignore - spec/railsapps/rails_32/Gemfile - spec/railsapps/rails_32/config/application.rb - spec/railsapps/rails_32/config/boot.rb - spec/railsapps/rails_32/config/environment.rb - spec/railsapps/rails_32/config/environments/development.rb - spec/railsapps/rails_32/config/initializers/secret_token.rb - spec/railsapps/rails_32/config/initializers/session_store.rb - spec/railsapps/rails_32/config/initializers/wrap_parameters.rb - spec/railsapps/rails_32/config/routes.rb - spec/railsapps/rails_32/script/rails - spec/railsapps/rails_40/Gemfile - spec/railsapps/rails_40/bin/rails - spec/railsapps/rails_40/config/application.rb - spec/railsapps/rails_40/config/boot.rb - spec/railsapps/rails_40/config/environment.rb - spec/railsapps/rails_40/config/environments/development.rb - spec/railsapps/rails_40/config/initializers/secret_token.rb - spec/railsapps/rails_40/config/initializers/session_store.rb - spec/railsapps/rails_40/config/routes.rb - spec/railsapps/rails_40_no_pipeline/Gemfile - spec/railsapps/rails_40_no_pipeline/bin/rails - spec/railsapps/rails_40_no_pipeline/config/application.rb - spec/railsapps/rails_40_no_pipeline/config/boot.rb - spec/railsapps/rails_40_no_pipeline/config/environment.rb - spec/railsapps/rails_40_no_pipeline/config/environments/development.rb - spec/railsapps/rails_40_no_pipeline/config/initializers/secret_token.rb - spec/railsapps/rails_40_no_pipeline/config/initializers/session_store.rb - spec/railsapps/rails_40_no_pipeline/config/routes.rb - spec/railsapps/rails_40_no_pipeline/log/dee - spec/railsapps/rails_40_no_pipeline/public/images/rails.png - spec/railsapps/rails_40_no_pipeline/public/stylesheets/email.css - spec/railsapps/rails_40_precompiled/Gemfile - spec/railsapps/rails_40_precompiled/Rakefile - spec/railsapps/rails_40_precompiled/bin/rails - spec/railsapps/rails_40_precompiled/config/application.rb - spec/railsapps/rails_40_precompiled/config/boot.rb - spec/railsapps/rails_40_precompiled/config/environment.rb - spec/railsapps/rails_40_precompiled/config/environments/development.rb - spec/railsapps/rails_40_precompiled/config/initializers/secret_token.rb - spec/railsapps/rails_40_precompiled/config/initializers/session_store.rb - spec/railsapps/rails_40_precompiled/config/routes.rb - spec/railsapps/rails_40_precompiled/public/assets/email-fad0c62b8f82e2835c1d0bdc19894257.css - spec/railsapps/rails_40_precompiled/public/assets/email-fad0c62b8f82e2835c1d0bdc19894257.css.gz - spec/railsapps/rails_40_precompiled/public/assets/manifest-8a3d16aeb2a40fe5057dd998c3edab10.json - spec/railsapps/rails_40_precompiled/public/assets/rails-231a680f23887d9dd70710ea5efd3c62.png - spec/railsapps/rails_41/.gitignore - spec/railsapps/rails_41/Gemfile - spec/railsapps/rails_41/bin/rails - spec/railsapps/rails_41/config.ru - spec/railsapps/rails_41/config/application.rb - spec/railsapps/rails_41/config/boot.rb - spec/railsapps/rails_41/config/environment.rb - spec/railsapps/rails_41/config/environments/development.rb - spec/railsapps/rails_41/config/initializers/secret_token.rb - spec/railsapps/rails_41/config/initializers/session_store.rb - spec/railsapps/rails_41/config/routes.rb - spec/railsapps/rails_42/.gitignore - spec/railsapps/rails_42/Gemfile - spec/railsapps/rails_42/bin/rails - spec/railsapps/rails_42/config.ru - spec/railsapps/rails_42/config/application.rb - spec/railsapps/rails_42/config/boot.rb - spec/railsapps/rails_42/config/environment.rb - spec/railsapps/rails_42/config/environments/development.rb - spec/railsapps/rails_42/config/initializers/secret_token.rb - spec/railsapps/rails_42/config/initializers/session_store.rb - spec/railsapps/rails_42/config/routes.rb - spec/railsapps/rails_42_sprockets_rails_3/.gitignore - spec/railsapps/rails_42_sprockets_rails_3/Gemfile - spec/railsapps/rails_42_sprockets_rails_3/bin/rails - spec/railsapps/rails_42_sprockets_rails_3/config.ru - spec/railsapps/rails_42_sprockets_rails_3/config/application.rb - spec/railsapps/rails_42_sprockets_rails_3/config/boot.rb - spec/railsapps/rails_42_sprockets_rails_3/config/environment.rb - spec/railsapps/rails_42_sprockets_rails_3/config/environments/development.rb - spec/railsapps/rails_42_sprockets_rails_3/config/initializers/assets.rb - spec/railsapps/rails_42_sprockets_rails_3/config/initializers/secret_token.rb - spec/railsapps/rails_42_sprockets_rails_3/config/initializers/session_store.rb - spec/railsapps/rails_42_sprockets_rails_3/config/routes.rb - spec/railsapps/shared/all/app/mailers/auto_mailer.rb - spec/railsapps/shared/all/app/mailers/mailer.rb - spec/railsapps/shared/all/app/views/mailer/normal_email.html.erb - spec/railsapps/shared/all/app/views/mailer/normal_email.text - spec/railsapps/shared/pipeline/app/assets/images/rails.png - spec/railsapps/shared/pipeline/app/assets/stylesheets/email.css.scss - spec/spec_helper.rb - spec/support/have_no_styling_matcher.rb - spec/support/have_selector_matcher.rb - spec/support/have_styling_matcher.rb - spec/support/rails_app.rb roadie-rails-1.1.0/.travis.yml0000644000175000017500000000024012650457050016407 0ustar terceiroterceirolanguage: ruby rvm: - 1.9.3 - 2.0 - 2.1 - 2.2 - jruby - rbx bundler_args: --without guard script: "rake" matrix: allow_failures: - rvm: rbx roadie-rails-1.1.0/Changelog.md0000644000175000017500000000514512650457050016520 0ustar terceiroterceiro### development version [full changelog](https://github.com/Mange/roadie-rails/compare/v1.1.0...master) * Nothing yet. ### 1.1.0 [full changelog](https://github.com/Mange/roadie-rails/compare/v1.1.0.rc2...v1.1.0) * Bug fixes: * Support for sprockets-rails 3 (#46) — [Rafael Mendonça França (rafaelfranca)](https://github.com/rafaelfranca) * Support `Mailer#deliver!` in `AutomaticMailer` (#47) — [Julien Vanier (monkbroc)](https://github.com/monkbroc) ### 1.1.0.rc2 [full changelog](https://github.com/Mange/roadie-rails/compare/v1.1.0.rc1...v1.1.0.rc2) * Add support for `roadie`'s `external_asset_providers` option. ### 1.1.0.rc1 [full changelog](https://github.com/Mange/roadie-rails/compare/v1.0.6...v1.1.0.rc1) * Add support for `roadie`'s `keep_uninlinable_css` option. ### 1.0.6 [full changelog](https://github.com/Mange/roadie-rails/compare/v1.0.5...v1.0.6) * Bug fixes: * Support Sprockets 3's new hash length (#41) ### 1.0.5 [full changelog](https://github.com/Mange/roadie-rails/compare/v1.0.4...v1.0.5) * Enhancements: * Remove dependency on `rails` in favor of `railties` — [Mark J. Titorenko (mjtko)](https://github.com/mjtko) * Bug fixes: * Support for Rails 4.2 default configuration — [Tomas Celizna (tomasc)](https://github.com/tomasc) * It's possible to inline assets with a digest (hash at the end of the filename), which is how Rails 4.2 defaults to, even when assets are not stored on disk. ### 1.0.4 [full changelog](https://github.com/Mange/roadie-rails/compare/v1.0.3...v1.0.4) * Enhancements: * Support for Rails 4.2 — [Ryunosuke SATO (tricknotes)](https://github.com/tricknotes) ### 1.0.3 [full changelog](https://github.com/Mange/roadie-rails/compare/v1.0.2...v1.0.3) * Bug fixes * Don't change `asset_providers` of a `Roadie::Document` when applying Options with no `asset_providers` set. * Support assets inside subdirectories. * Don't add `AssetPipelineProvider` when asset pipeline is unavailable (e.g. inside Rails engines). * Raise error when initializing `AssetPipelineProvider` with `nil` provider. ### 1.0.2 [full changelog](https://github.com/Mange/roadie-rails/compare/v1.0.1...v1.0.2) * Bug fixes * Don't crash on `nil` `roadie_options` ### 1.0.1 [full changelog](https://github.com/Mange/roadie-rails/compare/v1.0.0...v1.0.1) * Bug fixes * Inline HTML in emails without a plaintext part ### 1.0.0 [full changelog](https://github.com/Mange/roadie-rails/compare/v1.0.0.pre1...v1.0.0) * Use released version of Roadie 3.0.0 ### 1.0.0.pre1 [full changelog](https://github.com/Mange/roadie-rails/compare/0000000...v1.0.0.pre1) * First implementation roadie-rails-1.1.0/setup.sh0000755000175000017500000000223212650457050016000 0ustar terceiroterceiro#!/bin/bash # This cannot be executed from within a Ruby-based environment (like Rake) # since Bundler will affect the subshell environments. set -e function header() { echo -e "\n$(tput setaf 5)$(tput smul)$1:$(tput sgr0)" } function green() { echo $(tput setaf 2)$@$(tput sgr0) } function update() { bundle update | grep -ve "^Using " } function install() { bundle install --quiet && green " OK" } root=$(dirname $0) # Set by Travis CI; interferes with the nested repos unset BUNDLE_GEMFILE if [[ $1 == "install" ]]; then header "Installing gem dependencies" install for app_path in $root/spec/railsapps/rails_*; do ( cd $app_path header "Installing gems for $(basename $app_path)" install ) done echo "" elif [[ $1 == "update" ]]; then header "Updating gem dependencies" update for app_path in $root/spec/railsapps/rails_*; do ( cd $app_path header "Updating $(basename $app_path)" update ) done echo "" else echo "Usage: $0 [install|update]" echo "" echo " Install: Install all bundled updates." echo " Update: Run bundle update on all bundles." echo "" exit 127 fi roadie-rails-1.1.0/Guardfile0000644000175000017500000000057712650457050016140 0ustar terceiroterceirorspec_options = { cmd: 'rspec -f documentation', fail_mode: :keep, all_after_pass: true, all_on_start: true, run_all: {cmd: 'rspec -f progress'} } guard :rspec, rspec_options do watch(%r{^spec/.+_spec\.rb$}) watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } watch('spec/spec_helper.rb') { "spec" } watch(%r{^spec/support/.+\.rb$}) { "spec" } end roadie-rails-1.1.0/lib/0000755000175000017500000000000012650457050015050 5ustar terceiroterceiroroadie-rails-1.1.0/lib/roadie/0000755000175000017500000000000012650457050016313 5ustar terceiroterceiroroadie-rails-1.1.0/lib/roadie/rails/0000755000175000017500000000000012650457050017425 5ustar terceiroterceiroroadie-rails-1.1.0/lib/roadie/rails/options.rb0000644000175000017500000001054612650457050021453 0ustar terceiroterceiromodule Roadie module Rails class Options ATTRIBUTE_NAMES = [ :after_transformation, :asset_providers, :before_transformation, :external_asset_providers, :keep_uninlinable_css, :url_options, ] private_constant :ATTRIBUTE_NAMES attr_reader(*ATTRIBUTE_NAMES) def initialize(options = {}) complain_about_unknown_keys options.keys self.after_transformation = options[:after_transformation] self.asset_providers = options[:asset_providers] self.before_transformation = options[:before_transformation] self.external_asset_providers = options[:external_asset_providers] self.keep_uninlinable_css = options[:keep_uninlinable_css] self.url_options = options[:url_options] end def url_options=(options) @url_options = options end def before_transformation=(callback) @before_transformation = callback end def after_transformation=(callback) @after_transformation = callback end def keep_uninlinable_css=(bool) @keep_uninlinable_css = bool end def asset_providers=(providers) if providers @asset_providers = ProviderList.wrap providers # TODO: Raise an error when setting to nil in order to make this not a silent error. # else # raise ArgumentError, "Cannot set asset_providers to nil. Set to Roadie::NullProvider if you want no external assets inlined." end end def external_asset_providers=(providers) if providers @external_asset_providers = ProviderList.wrap providers # TODO: Raise an error when setting to nil in order to make this not a silent error. # else # raise ArgumentError, "Cannot set asset_providers to nil. Set to Roadie::NullProvider if you want no external assets inlined." end end def apply_to(document) document.url_options = url_options document.before_transformation = before_transformation document.after_transformation = after_transformation document.asset_providers = asset_providers if asset_providers document.external_asset_providers = external_asset_providers if external_asset_providers document.keep_uninlinable_css = keep_uninlinable_css unless keep_uninlinable_css.nil? end def merge(options) dup.merge! options end def merge!(options) ATTRIBUTE_NAMES.each do |attribute| send "#{attribute}=", options.fetch(attribute, send(attribute)) end self end def combine(options) dup.combine! options end def combine!(options) self.after_transformation = combine_callable( after_transformation, options[:after_transformation] ) self.asset_providers = combine_providers( asset_providers, options[:asset_providers] ) self.before_transformation = combine_callable( before_transformation, options[:before_transformation] ) self.external_asset_providers = combine_providers( external_asset_providers, options[:external_asset_providers] ) self.keep_uninlinable_css = options[:keep_uninlinable_css] if options.has_key?(:keep_uninlinable_css) self.url_options = combine_hash( url_options, options[:url_options] ) self end private def combine_hash(first, second) combine_nilable(first, second) do |a, b| a.merge(b) end end def combine_callable(first, second) combine_nilable(first, second) do |a, b| proc { |*args| a.call(*args); b.call(*args) } end end def combine_providers(first, second) combine_nilable(first, second) do |a, b| ProviderList.new(a.to_a + Array.wrap(b)) end end def combine_nilable(first, second) if first && second yield first, second else first ? first : second end end def complain_about_unknown_keys(keys) invalid_keys = keys - ATTRIBUTE_NAMES if invalid_keys.size > 0 raise ArgumentError, "Unknown configuration parameters: #{invalid_keys}", caller(1) end end end end end roadie-rails-1.1.0/lib/roadie/rails/railtie.rb0000644000175000017500000000161512650457050021406 0ustar terceiroterceirorequire 'rails' module Roadie module Rails class Railtie < ::Rails::Railtie config.roadie = Roadie::Rails::Options.new initializer "roadie-rails.setup" do |app| config.roadie.asset_providers = [ Roadie::FilesystemProvider.new(::Rails.root.join("public").to_s), ] # Saying config.assets.enabled here does not work in Rails 3.1-3.2, but # APP.config.assets work. There is a difference between "config" and # "app.config" on those versions. if app.config.respond_to?(:assets) && app.config.assets.enabled != false if app.assets config.roadie.asset_providers << AssetPipelineProvider.new(app.assets) else app.config.assets.configure do |env| config.roadie.asset_providers << AssetPipelineProvider.new(env) end end end end end end end roadie-rails-1.1.0/lib/roadie/rails/version.rb0000644000175000017500000000007512650457050021441 0ustar terceiroterceiromodule Roadie module Rails VERSION = "1.1.0" end end roadie-rails-1.1.0/lib/roadie/rails/asset_pipeline_provider.rb0000644000175000017500000000261512650457050024674 0ustar terceiroterceiromodule Roadie module Rails class AssetPipelineProvider include Roadie::AssetProvider attr_reader :pipeline def initialize(pipeline) raise ArgumentError, "You need to pass a pipeline to initialize AssetPipelineProvider" unless pipeline super() @pipeline = pipeline end def find_stylesheet(name) if (asset = find_asset_in_pipeline(name)) Stylesheet.new("#{asset.pathname} (live compiled)", asset.to_s) end end private def find_asset_in_pipeline(name) normalized_name = normalize_asset_name(name) @pipeline[normalized_name] || @pipeline[remove_asset_digest(normalized_name)] end def normalize_asset_name(href) remove_asset_prefix(href.split('?').first) end DIGEST_PATTERN = / - # Digest comes after a dash (?: [a-z0-9]{32} | # Old style is 32 character hash [a-z0-9]{64} # New style is 64 characters ) \. # Dot for the file extension /x.freeze def remove_asset_digest(path) path.gsub(DIGEST_PATTERN, '.') end def remove_asset_prefix(path) path.sub(Regexp.new("^#{Regexp.quote(asset_prefix)}/?"), "") end def asset_prefix ::Rails.application.try(:config).try(:assets).try(:prefix) || "/assets" end end end end roadie-rails-1.1.0/lib/roadie/rails/document_builder.rb0000644000175000017500000000032012650457050023271 0ustar terceiroterceiromodule Roadie module Rails class DocumentBuilder def self.build(html, options) document = Document.new(html) options.apply_to document document end end end end roadie-rails-1.1.0/lib/roadie/rails/automatic.rb0000644000175000017500000000050512650457050021740 0ustar terceiroterceiromodule Roadie module Rails module Automatic def mail(*args, &block) super.tap do |email| email.extend InlineOnDelivery email.roadie_options = roadie_options.try(:dup) end end def roadie_options ::Rails.application.config.roadie end end end end roadie-rails-1.1.0/lib/roadie/rails/mail_inliner.rb0000644000175000017500000000132512650457050022415 0ustar terceiroterceiromodule Roadie module Rails class MailInliner attr_reader :email, :options def initialize(email, options) @email = email @options = options end def execute if options improve_body if email.content_type =~ /^text\/html/ improve_html_part(email.html_part) if email.html_part end email end private def improve_body email.body = transform_html(email.body.decoded) end def improve_html_part(html_part) html_part.body = transform_html(html_part.body.decoded) end def transform_html(old_html) DocumentBuilder.build(old_html, options).transform end end end end roadie-rails-1.1.0/lib/roadie/rails/mailer.rb0000644000175000017500000000044212650457050021223 0ustar terceiroterceiromodule Roadie module Rails module Mailer def roadie_mail(options = {}, &block) email = mail(options, &block) MailInliner.new(email, roadie_options).execute end def roadie_options ::Rails.application.config.roadie end end end end roadie-rails-1.1.0/lib/roadie/rails/inline_on_delivery.rb0000644000175000017500000000107012650457050023625 0ustar terceiroterceiromodule Roadie module Rails # Extend instances of Mail with this to have it inlined automatically when # delivered. You'll need to assign some #roadie_options for it to actually # do anything. module InlineOnDelivery attr_accessor :roadie_options def deliver inline_styles super end def deliver! inline_styles super end private def inline_styles if (options = roadie_options) MailInliner.new(self, options).execute end end end end end roadie-rails-1.1.0/lib/roadie/rails.rb0000644000175000017500000000060012650457050017746 0ustar terceiroterceiromodule Roadie module Rails end end require "roadie" require "roadie/rails/version" require "roadie/rails/options" require "roadie/rails/document_builder" require "roadie/rails/mail_inliner" require "roadie/rails/asset_pipeline_provider" require "roadie/rails/mailer" require "roadie/rails/automatic" require "roadie/rails/inline_on_delivery" require "roadie/rails/railtie" roadie-rails-1.1.0/lib/roadie-rails.rb0000644000175000017500000000002712650457050017747 0ustar terceiroterceirorequire 'roadie/rails' roadie-rails-1.1.0/LICENSE.txt0000644000175000017500000000206012650457050016123 0ustar terceiroterceiroCopyright (c) 2013 Magnus Bergmark MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. roadie-rails-1.1.0/Rakefile0000644000175000017500000000043212650457050015746 0ustar terceiroterceirorequire "bundler/gem_tasks" desc "Install gems for embedded Rails apps" task :install_gems do sh "./setup.sh install" end desc "Run specs" task :spec do sh "bundle exec rspec -f progress" end desc "Default: Install gems and run specs" task :default => [:install_gems, :spec] roadie-rails-1.1.0/README.md0000644000175000017500000002306612650457050015570 0ustar terceiroterceiro# roadie-rails [![Build history and status](https://secure.travis-ci.org/Mange/roadie-rails.png)](http://travis-ci.org/#!/Mange/roadie-rails) [![Code Climate](https://codeclimate.com/github/Mange/roadie-rails.png)](https://codeclimate.com/github/Mange/roadie-rails) [![Coverage Status](https://coveralls.io/repos/Mange/roadie-rails/badge.png?branch=master)](https://coveralls.io/r/Mange/roadie-rails?branch=master) [![Gem Version](https://badge.fury.io/rb/roadie-rails.png)](http://badge.fury.io/rb/roadie-rails) [![Dependency Status](https://gemnasium.com/Mange/roadie-rails.png)](https://gemnasium.com/Mange/roadie-rails) > 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', '~> 1.0' ``` ## Usage ## `roadie-rails` have two primary means of usage. The first on is the "Automatic usage", which does almost everything automatically. It's the easiest way to hit the ground running in order to see if `roadie` would be a good fit for your application. As soon as you require some more "advanced" features (congratulations!), you should migrate to the "Manual usage" which entails that you do some things by yourself. ### Automatic usage ### Include the `Roadie::Rails::Automatic` module inside your mailer. Roadie will do its magic when you try to deliver the message: ```ruby class NewsletterMailer < ActionMailer::Base include Roadie::Rails::Automatic def user_newsletter(user) mail to: user.email, subject: subject_for_user(user) end private def subject_for_user(user) I18n.translate 'emails.user_newsletter.subject', name: user.name end end # email has the original body; Roadie has not been invoked yet email = NewsletterMailer.user_newsletter(User.first) # This triggers Roadie inlining and will deliver the email with inlined styles email.deliver ``` By overriding the `#roadie_options` method in the mailer you can disable inlining in certain cases: ```ruby class NewsletterMailer < ActionMailer::Base include Roadie::Rails::Automatic private def roadie_options super unless Rails.env.test? end end ``` Another way: ```ruby describe YourMailer do describe "email contents" do before do # Disable inlining YourMailer.any_instance.stub(:roadie_options).and_return(nil) end # ... end describe "inlined email contents" do # ... end end ``` If you need the extra flexibility, look at the "Manual usage" below. ### Manual usage ### Include the `Roadie::Rails::Mailer` module inside your `ActionMailer` and call `roadie_mail` with the same options that you would pass to `mail`. ```ruby class NewsletterMailer < ActionMailer::Base include Roadie::Rails::Mailer def user_newsletter(user) roadie_mail to: user.email, subject: subject_for_user(user) end private def subject_for_user(user) I18n.translate 'emails.user_newsletter.subject', name: user.name end end ``` This will inline the stylesheets right away, which sadly decreases performance for your tests where you might only want to inline in one of them. The upside is that you can selectively inline yourself. ```ruby class NewsletterMailer < ActionMailer::Base include Roadie::Rails::Mailer def subscriber_newsletter(subscriber, options = {}) use_roadie = options.fetch :use_roadie, true mail_factory(use_roadie, normal_mail_options) end private def mail_factory(use_roadie, options) if use_roadie roadie_mail options else mail options end end end # tests describe NewsletterMailer do it "is emailed to the subscriber's email" do email = NewsletterMailer.subscriber_newsletter(subscriber, use_roadie: false) email.to.should == subscriber.email end it "inlines the emails by default" do email = NewsletterMailer.subscriber_newsletter(subscriber) email.should be_good_and_cool_and_all_that_jazz end end ``` Or, perhaps by doing this: ```ruby describe YourMailer do describe "email contents" do before do # Redirect all roadie mail calls to the normal mail method YourMailer.any_instance.stub(:roadie_mail) { |*args, &block| YourMailer.mail(*args, &block) } end # ... end describe "inlined email contents" do # ... end end ``` ### Configuration ### Roadie can be configured in three places, depending on how specific you want to be: 1. `Rails.application.config.roadie` (global, static). 2. `YourMailer#roadie_options` (mailer, dynamic). 3. Second argument to the `roadie_mail` (mail, specific and custom). You can override at any level in the chain, depending on how specific you need to be. Only the first two methods are available to you if you use the `Automatic` module. ```ruby # config/environments/production.rb config.roadie.url_options = {host: "my-app.com", scheme: "https"} # app/mailer/my_mailer.rb class MyMailer include Roadie::Rails::Mailer protected def roadie_options super.merge(url_options: {host: Product.current.host}) end end # app/mailer/my_other_mailer.rb class MyOtherMailer include Roadie::Rails::Mailer def some_mail(user) roadie_email {to: "foo@example.com"}, roadie_options_for(user) end private def roadie_options_for(user) roadie_options.combine({ asset_providers: [MyCustomProvider.new(user)], url_options: {host: user.subdomain_with_host}, }) end end ``` If you `#merge` you will replace the older value outright: ```ruby def roadie_options original = super original.url_options # => {protocol: "https", host: "foo.com"} new = original.merge(url_options: {host: "bar.com"}) new.url_options # => {host: "bar.com"} new end ``` If you want to combine two values, use `#combine`. `#combine` is closer to `Hash#deep_merge`: ```ruby def roadie_options original = super original.url_options # => {protocol: "https", host: "foo.com"} new = original.combine(url_options: {host: "bar.com"}) new.url_options # => {protocol: "https", host: "bar.com"} new end ``` `#combine` is smarter than `Hash#deep_merge`, though. It can combine callback `proc`s (so both get called) and `Roadie::ProviderList`s as well. If you want to see the available configuration options, see the [Roadie gem][roadie]. ### Templates ### Use normal `stylesheet_link_tag` and `foo_path` methods when generating your email and Roadie will look for the precompiled files on your filesystem, or by asking the asset pipeline to compile the files for you if it cannot be found. ### Previewing ### You can create a controller that gets the email and then renders the body from it. ```ruby class Admin::EmailsController < AdminController def user_newsletter render_email NewsletterMailer.user_newsletter(current_user) end def subscriber_newsletter render_email NewsletterMailer.subscriber_newsletter(Subscriber.first || Subscriber.new) end private def render_email(email) respond_to do |format| format.html { render html: email.html_part.decoded.html_safe } format.text { render text: email.text_part.decoded } end end end ``` ## Known issues ## Roadie will not be able to find your stylesheets if you have an `asset_host` configured and will ignore those lines when inlining. A workaround for this is to not use `asset_host` in your mailers: ```ruby config.action_controller.asset_host = # ... config.action_mailer.asset_host = nil # or class MyMailer < ActionMailer::Base self.asset_host = nil end ``` ## Build status ## Tested with [Travis CI](http://travis-ci.org) using [almost all combinations of](http://travis-ci.org/#!/Mange/roadie-rails): * Ruby: * MRI 1.9.3 * MRI 2.0 * MRI 2.1 * MRI 2.2 * JRuby (latest) * Rubinius (experimental) * Rails * 3.0 * 3.1 * 3.2 * 4.0 * 4.1 * 4.2 Let me know if you want any other combination supported officially. ### Versioning ### This project follows [Semantic Versioning][semver]. ## Documentation ## * [Online documentation for gem](https://www.omniref.com/ruby/gems/roadie-rails) * [Online documentation for master](https://www.omniref.com/github/Mange/roadie-rails) * [Changelog](https://github.com/Mange/roadie-rails/blob/master/Changelog.md) ## Running specs ## Start by setting up your machine, then you can run the specs like normal: ```bash ./setup.sh install rake spec ``` ## License ## (The MIT License) Copyright © 2013-2015 * [Magnus Bergmark](https://github.com/Mange) 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 roadie-rails-1.1.0/Upgrading.md0000644000175000017500000000365512650457050016555 0ustar terceiroterceiro# Upgrading from Roadie 2 ## Project Start by adding `roadie-rails` to your `Gemfile`. Remember to specify version requirements! You'll need to change your configuration too. The main change is that Roadie now uses its own configuration for URL options: ```ruby config.roadie.url_options = {host: "myapp.com"} ``` Most other options should be easy to convert: ```ruby config.roadie.enabled => Removed # Override `#roadie_options` in the mailers to control enabling (if using Automatic) or do it manually (if using Mailer). config.roadie.before_inlining => config.roadie.before_transformation config.roadie.provider => config.roadie.asset_providers ``` ## Mailers Next, find all mailers that you want to inline and include the `Roadie::Rails::Automatic` module: ```ruby class MyMailer < ActionMailer::Base include Roadie::Rails::Automatic def cool_mail mail(options) end end ``` You'll also need to remove any uses of the `:css` option to `mail` and `default_options`. Include CSS files by using `stylesheet_link_tag` instead. **Before:** ```ruby class MyMailer < ActionMailer::Base defaults css: :email def cool mail(css: [:email, :cool]) end end ``` **After:** ```erb <%= stylesheet_link_tag :email, :cool %> ``` ## Views Search through your templates after uses of `data-immutable` and change them to `data-roadie-ignore`. ## Tests If your tests relied on the styles being applied, they will fail unless you deliver the email. `Roadie::Rails::Automatic` does not inline stylesheets when you don't deliver the email. Either change how your tests work, or call `deliver` on the generated emails where you need it. If the problem is major, switch from `Roadie::Rails::Automatic` to `Roadie::Rails::Mailer` and follow the instructions in the documentation. ## Custom asset providers The API has changed a bit. Read the new examples in the README and you should be able to convert without any great effort. roadie-rails-1.1.0/spec/0000755000175000017500000000000012650457050015234 5ustar terceiroterceiroroadie-rails-1.1.0/spec/integration_spec.rb0000644000175000017500000000770612650457050021130 0ustar terceiroterceirorequire 'spec_helper' require 'tempfile' require 'mail' describe "Integrations" do def parse_html_in_email(mail) Nokogiri::HTML.parse mail.html_part.body.decoded end [ RailsApp.new("Rails 3.0.x", 'rails_30', runner: :script, asset_pipeline: false, digests: false), ## We do not yet support live-compilation through asset pipeline RailsApp.new("Rails 3.1.x", 'rails_31', runner: :script, asset_pipeline: true, digests: false), RailsApp.new("Rails 3.2.x", 'rails_32', runner: :script, asset_pipeline: true, digests: false), RailsApp.new("Rails 4.0.x", 'rails_40', runner: :bin, asset_pipeline: true, digests: false), RailsApp.new("Rails 4.0.x (without asset pipeline)", 'rails_40_no_pipeline', runner: :bin, asset_pipeline: false, digests: false), RailsApp.new("Rails 4.0.x (precompiled)", 'rails_40_precompiled', runner: :bin, asset_pipeline: true, digests: true), RailsApp.new("Rails 4.1.x", 'rails_41', runner: :bin, asset_pipeline: true, digests: false), RailsApp.new("Rails 4.2.x", 'rails_42', runner: :bin, asset_pipeline: true, digests: false), RailsApp.new("Rails 4.2.x (with sprockets-rails 3)", 'rails_42_sprockets_rails_3', runner: :bin, asset_pipeline: true, digests: true, sprockets3: true), ].each do |app| describe "with #{app}" do before { app.reset } def validate_email(app, 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 ' "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 for multipart emails" do validate_email app, app.read_email(:normal_email) end it "automatically inlines styles with automatic mailer" do validate_email app, app.read_delivered_email(:normal_email) end it "automatically inlines styles with automatic mailer and forced delivery" do validate_email app, app.read_delivered_email(:normal_email, force_delivery: true) 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 if app.using_asset_pipeline? || app.digested? it "has a AssetPipelineProvider together with a FilesystemProvider" do expect(app.read_providers).to eq(%w[Roadie::FilesystemProvider Roadie::Rails::AssetPipelineProvider]) end else it "only has a FilesystemProvider" do expect(app.read_providers).to eq(["Roadie::FilesystemProvider"]) end end end end end roadie-rails-1.1.0/spec/railsapps/0000755000175000017500000000000012650457050017232 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/shared/0000755000175000017500000000000012650457050020500 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/shared/all/0000755000175000017500000000000012650457050021250 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/shared/all/app/0000755000175000017500000000000012650457050022030 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/shared/all/app/views/0000755000175000017500000000000012650457050023165 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/shared/all/app/views/mailer/0000755000175000017500000000000012650457050024436 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/shared/all/app/views/mailer/normal_email.html.erb0000644000175000017500000000035412650457050030534 0ustar terceiroterceiro <%= stylesheet_link_tag "email" %>

Normal email

roadie-rails-1.1.0/spec/railsapps/shared/all/app/views/mailer/normal_email.text0000644000175000017500000000001512650457050027777 0ustar terceiroterceiroNormal email roadie-rails-1.1.0/spec/railsapps/shared/all/app/mailers/0000755000175000017500000000000012650457050023464 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/shared/all/app/mailers/auto_mailer.rb0000644000175000017500000000104112650457050026306 0ustar terceiroterceiroclass 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 action_name =~ /disabled/ 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-1.1.0/spec/railsapps/shared/all/app/mailers/mailer.rb0000644000175000017500000000054212650457050025263 0ustar terceiroterceiroclass 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-1.1.0/spec/railsapps/shared/pipeline/0000755000175000017500000000000012650457050022305 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/shared/pipeline/app/0000755000175000017500000000000012650457050023065 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/shared/pipeline/app/assets/0000755000175000017500000000000012650457050024367 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/shared/pipeline/app/assets/images/0000755000175000017500000000000012650457050025634 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/shared/pipeline/app/assets/images/rails.png0000644000175000017500000001476612650457050027472 0ustar terceiroterceiroPNG  IHDR2@X${tEXtSoftwareAdobe ImageReadyqe<IDATxڬ[ \e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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 %w(development test))) end module Rails31 class Application < Rails::Application config.encoding = "utf-8" config.assets.enabled = true config.assets.version = '1.0' config.roadie.url_options = {host: 'example.app.org'} end end roadie-rails-1.1.0/spec/railsapps/rails_31/config/routes.rb0000644000175000017500000000005012650457050023755 0ustar terceiroterceiroRails31::Application.routes.draw do end roadie-rails-1.1.0/spec/railsapps/rails_31/config/boot.rb0000644000175000017500000000027712650457050023412 0ustar terceiroterceirorequire 'rubygems' # Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) roadie-rails-1.1.0/spec/railsapps/rails_31/.gitignore0000644000175000017500000000001012650457050022626 0ustar terceiroterceirolog tmp roadie-rails-1.1.0/spec/railsapps/rails_31/Gemfile0000644000175000017500000000022112650457050022135 0ustar terceiroterceirosource 'http://rubygems.org' gem 'rails', '3.1.11' gem 'roadie-rails', path: '../../../' group :assets do gem 'sass-rails', '~> 3.1.5' end roadie-rails-1.1.0/spec/railsapps/rails_42_sprockets_rails_3/0000755000175000017500000000000012650457050024362 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_42_sprockets_rails_3/config.ru0000644000175000017500000000023212650457050026174 0ustar terceiroterceiro# This file is used by Rack-based servers to start the application. require ::File.expand_path('../config/environment', __FILE__) run Rails.application roadie-rails-1.1.0/spec/railsapps/rails_42_sprockets_rails_3/config/0000755000175000017500000000000012650457050025627 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_42_sprockets_rails_3/config/environment.rb0000644000175000017500000000023112650457050030514 0ustar terceiroterceiro# Load the Rails application. require File.expand_path('../application', __FILE__) # Initialize the Rails application. Rails42::Application.initialize! roadie-rails-1.1.0/spec/railsapps/rails_42_sprockets_rails_3/config/initializers/0000755000175000017500000000000012650457050030335 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_42_sprockets_rails_3/config/initializers/assets.rb0000644000175000017500000000007612650457050032167 0ustar terceiroterceiroRails.application.config.assets.precompile += %w( email.css ) roadie-rails-1.1.0/spec/railsapps/rails_42_sprockets_rails_3/config/initializers/session_store.rb0000644000175000017500000000012212650457050033554 0ustar terceiroterceiroRails42::Application.config.session_store :cookie_store, key: '_rails_42_session' roadie-rails-1.1.0/spec/railsapps/rails_42_sprockets_rails_3/config/initializers/secret_token.rb0000644000175000017500000000026112650457050033346 0ustar terceiroterceiroRails42::Application.config.secret_key_base = '4fc45a45fecece06ff370f3271d9c2f29cdd0b029bde255d77318418e5066681d42c706f5e504b9298f2b5ccbd2c013c39d474e6521ef4c4f056b1368ce22c8f' roadie-rails-1.1.0/spec/railsapps/rails_42_sprockets_rails_3/config/environments/0000755000175000017500000000000012650457050030356 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_42_sprockets_rails_3/config/environments/development.rb0000644000175000017500000000050312650457050033223 0ustar terceiroterceiroRails42::Application.configure do config.cache_classes = false config.eager_load = false config.consider_all_requests_local = true config.action_controller.perform_caching = false config.action_mailer.raise_delivery_errors = false config.active_support.deprecation = :log config.assets.debug = true end roadie-rails-1.1.0/spec/railsapps/rails_42_sprockets_rails_3/config/application.rb0000644000175000017500000000046212650457050030461 0ustar terceiroterceirorequire File.expand_path('../boot', __FILE__) require "action_controller/railtie" require "action_mailer/railtie" require "sprockets/railtie" Bundler.require(:default, Rails.env) module Rails42 class Application < Rails::Application config.roadie.url_options = {host: 'example.app.org'} end end roadie-rails-1.1.0/spec/railsapps/rails_42_sprockets_rails_3/config/routes.rb0000644000175000017500000000005012650457050027470 0ustar terceiroterceiroRails42::Application.routes.draw do end roadie-rails-1.1.0/spec/railsapps/rails_42_sprockets_rails_3/config/boot.rb0000644000175000017500000000025312650457050027117 0ustar terceiroterceiro# Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) roadie-rails-1.1.0/spec/railsapps/rails_42_sprockets_rails_3/.gitignore0000644000175000017500000000070712650457050026356 0ustar terceiroterceiro# See http://help.github.com/ignore-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 the default SQLite database. /db/*.sqlite3 /db/*.sqlite3-journal # Ignore all logfiles and tempfiles. /log/*.log /tmp roadie-rails-1.1.0/spec/railsapps/rails_42_sprockets_rails_3/Gemfile0000644000175000017500000000022212650457050025651 0ustar terceiroterceirosource 'https://rubygems.org' gem 'rails', '4.2.0' gem 'sass-rails' gem 'sprockets-rails', '3.0.0.beta2' gem 'roadie-rails', :path => '../../..' roadie-rails-1.1.0/spec/railsapps/rails_42_sprockets_rails_3/bin/0000755000175000017500000000000012650457050025132 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_42_sprockets_rails_3/bin/rails0000755000175000017500000000022212650457050026166 0ustar terceiroterceiro#!/usr/bin/env ruby APP_PATH = File.expand_path('../../config/application', __FILE__) require_relative '../config/boot' require 'rails/commands' roadie-rails-1.1.0/spec/railsapps/rails_40_no_pipeline/0000755000175000017500000000000012650457050023230 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_40_no_pipeline/log/0000755000175000017500000000000012650457050024011 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_40_no_pipeline/log/dee0000644000175000017500000000000012650457050024457 0ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_40_no_pipeline/public/0000755000175000017500000000000012650457050024506 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_40_no_pipeline/public/images/0000755000175000017500000000000012650457050025753 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_40_no_pipeline/public/images/rails.png0000644000175000017500000001476612650457050027611 0ustar terceiroterceiroPNG  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 V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)5D$!Kɤ9߫-K$$ hlDUFF J{s2R6rC&&0;@>]/Z3E,k;( 2^09 4.0.0' gem 'roadie-rails', :path => '../../..' roadie-rails-1.1.0/spec/railsapps/rails_40_no_pipeline/bin/0000755000175000017500000000000012650457050024000 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_40_no_pipeline/bin/rails0000755000175000017500000000022212650457050025034 0ustar terceiroterceiro#!/usr/bin/env ruby APP_PATH = File.expand_path('../../config/application', __FILE__) require_relative '../config/boot' require 'rails/commands' roadie-rails-1.1.0/spec/railsapps/rails_40_precompiled/0000755000175000017500000000000012650457050023232 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_40_precompiled/public/0000755000175000017500000000000012650457050024510 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_40_precompiled/public/assets/0000755000175000017500000000000012650457050026012 5ustar terceiroterceiro././@LongLink0000644000000000000000000000016000000000000011600 Lustar rootrootroadie-rails-1.1.0/spec/railsapps/rails_40_precompiled/public/assets/email-fad0c62b8f82e2835c1d0bdc19894257.cssroadie-rails-1.1.0/spec/railsapps/rails_40_precompiled/public/assets/email-fad0c62b8f82e2835c1d0bdc10000644000175000017500000000016712650457050032616 0ustar terceiroterceirobody { background-color: green; } .image { background: url(/assets/rails-231a680f23887d9dd70710ea5efd3c62.png); } ././@LongLink0000644000000000000000000000016000000000000011600 Lustar rootrootroadie-rails-1.1.0/spec/railsapps/rails_40_precompiled/public/assets/rails-231a680f23887d9dd70710ea5efd3c62.pngroadie-rails-1.1.0/spec/railsapps/rails_40_precompiled/public/assets/rails-231a680f23887d9dd70710ea50000644000175000017500000001476612650457050032310 0ustar terceiroterceiroPNG  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+@E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{?~_[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 4.0.0' gem 'roadie-rails', :path => '../../..' roadie-rails-1.1.0/spec/railsapps/rails_40_precompiled/bin/0000755000175000017500000000000012650457050024002 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_40_precompiled/bin/rails0000755000175000017500000000022212650457050025036 0ustar terceiroterceiro#!/usr/bin/env ruby APP_PATH = File.expand_path('../../config/application', __FILE__) require_relative '../config/boot' require 'rails/commands' roadie-rails-1.1.0/spec/railsapps/rails_40/0000755000175000017500000000000012650457050020647 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_40/config/0000755000175000017500000000000012650457050022114 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_40/config/environment.rb0000644000175000017500000000023112650457050025001 0ustar terceiroterceiro# Load the Rails application. require File.expand_path('../application', __FILE__) # Initialize the Rails application. Rails40::Application.initialize! roadie-rails-1.1.0/spec/railsapps/rails_40/config/initializers/0000755000175000017500000000000012650457050024622 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_40/config/initializers/session_store.rb0000644000175000017500000000012212650457050030041 0ustar terceiroterceiroRails40::Application.config.session_store :cookie_store, key: '_rails_40_session' roadie-rails-1.1.0/spec/railsapps/rails_40/config/initializers/secret_token.rb0000644000175000017500000000026112650457050027633 0ustar terceiroterceiroRails40::Application.config.secret_key_base = '62c740bbc79cd7fa4dfabc7365c0f7ec98204cfae45a41d2e1423d6084bb762e9310acf46fc7e4cc6215a90c7aeef4107b9f1c7e3b68623fd11af43b716ccf5e' roadie-rails-1.1.0/spec/railsapps/rails_40/config/environments/0000755000175000017500000000000012650457050024643 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_40/config/environments/development.rb0000644000175000017500000000050312650457050027510 0ustar terceiroterceiroRails40::Application.configure do config.cache_classes = false config.eager_load = false config.consider_all_requests_local = true config.action_controller.perform_caching = false config.action_mailer.raise_delivery_errors = false config.active_support.deprecation = :log config.assets.debug = true end roadie-rails-1.1.0/spec/railsapps/rails_40/config/application.rb0000644000175000017500000000101212650457050024736 0ustar terceiroterceirorequire File.expand_path('../boot', __FILE__) # Pick the frameworks you want: # require "active_record/railtie" require "action_controller/railtie" require "action_mailer/railtie" 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(:default, Rails.env) module Rails40 class Application < Rails::Application config.roadie.url_options = {host: 'example.app.org'} end end roadie-rails-1.1.0/spec/railsapps/rails_40/config/routes.rb0000644000175000017500000000005012650457050023755 0ustar terceiroterceiroRails40::Application.routes.draw do end roadie-rails-1.1.0/spec/railsapps/rails_40/config/boot.rb0000644000175000017500000000025312650457050023404 0ustar terceiroterceiro# Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) roadie-rails-1.1.0/spec/railsapps/rails_40/Gemfile0000644000175000017500000000017212650457050022142 0ustar terceiroterceirosource 'https://rubygems.org' gem 'rails', '4.0.0' gem 'sass-rails', '~> 4.0.0' gem 'roadie-rails', :path => '../../..' roadie-rails-1.1.0/spec/railsapps/rails_40/bin/0000755000175000017500000000000012650457050021417 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_40/bin/rails0000755000175000017500000000022212650457050022453 0ustar terceiroterceiro#!/usr/bin/env ruby APP_PATH = File.expand_path('../../config/application', __FILE__) require_relative '../config/boot' require 'rails/commands' roadie-rails-1.1.0/spec/railsapps/rails_41/0000755000175000017500000000000012650457050020650 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_41/config.ru0000644000175000017500000000023212650457050022462 0ustar terceiroterceiro# This file is used by Rack-based servers to start the application. require ::File.expand_path('../config/environment', __FILE__) run Rails.application roadie-rails-1.1.0/spec/railsapps/rails_41/config/0000755000175000017500000000000012650457050022115 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_41/config/environment.rb0000644000175000017500000000023112650457050025002 0ustar terceiroterceiro# Load the Rails application. require File.expand_path('../application', __FILE__) # Initialize the Rails application. Rails41::Application.initialize! roadie-rails-1.1.0/spec/railsapps/rails_41/config/initializers/0000755000175000017500000000000012650457050024623 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_41/config/initializers/session_store.rb0000644000175000017500000000012212650457050030042 0ustar terceiroterceiroRails41::Application.config.session_store :cookie_store, key: '_rails_41_session' roadie-rails-1.1.0/spec/railsapps/rails_41/config/initializers/secret_token.rb0000644000175000017500000000026112650457050027634 0ustar terceiroterceiroRails41::Application.config.secret_key_base = '4fc45a45fecece06ff370f3271d9c2f29cdd0b029bde255d77318418e5066681d42c706f5e504b9298f2b5ccbd2c013c39d474e6521ef4c4f056b1368ce22c8f' roadie-rails-1.1.0/spec/railsapps/rails_41/config/environments/0000755000175000017500000000000012650457050024644 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_41/config/environments/development.rb0000644000175000017500000000050312650457050027511 0ustar terceiroterceiroRails41::Application.configure do config.cache_classes = false config.eager_load = false config.consider_all_requests_local = true config.action_controller.perform_caching = false config.action_mailer.raise_delivery_errors = false config.active_support.deprecation = :log config.assets.debug = true end roadie-rails-1.1.0/spec/railsapps/rails_41/config/application.rb0000644000175000017500000000046212650457050024747 0ustar terceiroterceirorequire File.expand_path('../boot', __FILE__) require "action_controller/railtie" require "action_mailer/railtie" require "sprockets/railtie" Bundler.require(:default, Rails.env) module Rails41 class Application < Rails::Application config.roadie.url_options = {host: 'example.app.org'} end end roadie-rails-1.1.0/spec/railsapps/rails_41/config/routes.rb0000644000175000017500000000005012650457050023756 0ustar terceiroterceiroRails41::Application.routes.draw do end roadie-rails-1.1.0/spec/railsapps/rails_41/config/boot.rb0000644000175000017500000000025312650457050023405 0ustar terceiroterceiro# Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) roadie-rails-1.1.0/spec/railsapps/rails_41/.gitignore0000644000175000017500000000070712650457050022644 0ustar terceiroterceiro# See http://help.github.com/ignore-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 the default SQLite database. /db/*.sqlite3 /db/*.sqlite3-journal # Ignore all logfiles and tempfiles. /log/*.log /tmp roadie-rails-1.1.0/spec/railsapps/rails_41/Gemfile0000644000175000017500000000017112650457050022142 0ustar terceiroterceirosource 'https://rubygems.org' gem 'rails', '4.1.0' gem 'sass-rails', '~> 4.0.0' gem 'roadie-rails', :path => '../../..' roadie-rails-1.1.0/spec/railsapps/rails_41/bin/0000755000175000017500000000000012650457050021420 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_41/bin/rails0000755000175000017500000000022212650457050022454 0ustar terceiroterceiro#!/usr/bin/env ruby APP_PATH = File.expand_path('../../config/application', __FILE__) require_relative '../config/boot' require 'rails/commands' roadie-rails-1.1.0/spec/railsapps/rails_42/0000755000175000017500000000000012650457050020651 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_42/config.ru0000644000175000017500000000023212650457050022463 0ustar terceiroterceiro# This file is used by Rack-based servers to start the application. require ::File.expand_path('../config/environment', __FILE__) run Rails.application roadie-rails-1.1.0/spec/railsapps/rails_42/config/0000755000175000017500000000000012650457050022116 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_42/config/environment.rb0000644000175000017500000000023112650457050025003 0ustar terceiroterceiro# Load the Rails application. require File.expand_path('../application', __FILE__) # Initialize the Rails application. Rails42::Application.initialize! roadie-rails-1.1.0/spec/railsapps/rails_42/config/initializers/0000755000175000017500000000000012650457050024624 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_42/config/initializers/session_store.rb0000644000175000017500000000012212650457050030043 0ustar terceiroterceiroRails42::Application.config.session_store :cookie_store, key: '_rails_42_session' roadie-rails-1.1.0/spec/railsapps/rails_42/config/initializers/secret_token.rb0000644000175000017500000000026112650457050027635 0ustar terceiroterceiroRails42::Application.config.secret_key_base = '4fc45a45fecece06ff370f3271d9c2f29cdd0b029bde255d77318418e5066681d42c706f5e504b9298f2b5ccbd2c013c39d474e6521ef4c4f056b1368ce22c8f' roadie-rails-1.1.0/spec/railsapps/rails_42/config/environments/0000755000175000017500000000000012650457050024645 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_42/config/environments/development.rb0000644000175000017500000000050312650457050027512 0ustar terceiroterceiroRails42::Application.configure do config.cache_classes = false config.eager_load = false config.consider_all_requests_local = true config.action_controller.perform_caching = false config.action_mailer.raise_delivery_errors = false config.active_support.deprecation = :log config.assets.debug = true end roadie-rails-1.1.0/spec/railsapps/rails_42/config/application.rb0000644000175000017500000000046212650457050024750 0ustar terceiroterceirorequire File.expand_path('../boot', __FILE__) require "action_controller/railtie" require "action_mailer/railtie" require "sprockets/railtie" Bundler.require(:default, Rails.env) module Rails42 class Application < Rails::Application config.roadie.url_options = {host: 'example.app.org'} end end roadie-rails-1.1.0/spec/railsapps/rails_42/config/routes.rb0000644000175000017500000000005012650457050023757 0ustar terceiroterceiroRails42::Application.routes.draw do end roadie-rails-1.1.0/spec/railsapps/rails_42/config/boot.rb0000644000175000017500000000025312650457050023406 0ustar terceiroterceiro# Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) roadie-rails-1.1.0/spec/railsapps/rails_42/.gitignore0000644000175000017500000000070712650457050022645 0ustar terceiroterceiro# See http://help.github.com/ignore-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 the default SQLite database. /db/*.sqlite3 /db/*.sqlite3-journal # Ignore all logfiles and tempfiles. /log/*.log /tmp roadie-rails-1.1.0/spec/railsapps/rails_42/Gemfile0000644000175000017500000000015512650457050022145 0ustar terceiroterceirosource 'https://rubygems.org' gem 'rails', '4.2.0' gem 'sass-rails' gem 'roadie-rails', :path => '../../..' roadie-rails-1.1.0/spec/railsapps/rails_42/bin/0000755000175000017500000000000012650457050021421 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_42/bin/rails0000755000175000017500000000022212650457050022455 0ustar terceiroterceiro#!/usr/bin/env ruby APP_PATH = File.expand_path('../../config/application', __FILE__) require_relative '../config/boot' require 'rails/commands' roadie-rails-1.1.0/spec/railsapps/rails_32/0000755000175000017500000000000012650457050020650 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_32/script/0000755000175000017500000000000012650457050022154 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_32/script/rails0000755000175000017500000000044712650457050023221 0ustar terceiroterceiro#!/usr/bin/env ruby # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. APP_PATH = File.expand_path('../../config/application', __FILE__) require File.expand_path('../../config/boot', __FILE__) require 'rails/commands' roadie-rails-1.1.0/spec/railsapps/rails_32/config/0000755000175000017500000000000012650457050022115 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_32/config/environment.rb0000644000175000017500000000022712650457050025007 0ustar terceiroterceiro# Load the rails application require File.expand_path('../application', __FILE__) # Initialize the rails application Rails32::Application.initialize! roadie-rails-1.1.0/spec/railsapps/rails_32/config/initializers/0000755000175000017500000000000012650457050024623 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_32/config/initializers/session_store.rb0000644000175000017500000000012212650457050030042 0ustar terceiroterceiroRails32::Application.config.session_store :cookie_store, key: '_rails_32_session' roadie-rails-1.1.0/spec/railsapps/rails_32/config/initializers/secret_token.rb0000644000175000017500000000025612650457050027640 0ustar terceiroterceiroRails32::Application.config.secret_token = '506c2be1264e1aa444583bb216a31f8b52e7de11b5e158112c2ad1cf182c077eb9b378919431b9f4f401e41ccdff2140540aa59cad3a7f5ee200367a352469f1' roadie-rails-1.1.0/spec/railsapps/rails_32/config/initializers/wrap_parameters.rb0000644000175000017500000000012412650457050030341 0ustar terceiroterceiroActiveSupport.on_load(:action_controller) do wrap_parameters format: [:json] end roadie-rails-1.1.0/spec/railsapps/rails_32/config/environments/0000755000175000017500000000000012650457050024644 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_32/config/environments/development.rb0000644000175000017500000000063612650457050027520 0ustar terceiroterceiroRails32::Application.configure do config.cache_classes = false config.whiny_nils = true config.consider_all_requests_local = true config.action_controller.perform_caching = false config.action_mailer.raise_delivery_errors = false config.active_support.deprecation = :log config.action_dispatch.best_standards_support = :builtin config.assets.compress = false config.assets.debug = true end roadie-rails-1.1.0/spec/railsapps/rails_32/config/application.rb0000644000175000017500000000112112650457050024740 0ustar terceiroterceirorequire File.expand_path('../boot', __FILE__) # Pick the frameworks you want: # require "active_record/railtie" require "action_controller/railtie" require "action_mailer/railtie" require "active_resource/railtie" require "sprockets/railtie" # require "rails/test_unit/railtie" if defined?(Bundler) Bundler.require(*Rails.groups(:assets => %w(development test))) end module Rails32 class Application < Rails::Application config.encoding = "utf-8" config.assets.enabled = true config.assets.version = '1.0' config.roadie.url_options = {host: 'example.app.org'} end end roadie-rails-1.1.0/spec/railsapps/rails_32/config/routes.rb0000644000175000017500000000005012650457050023756 0ustar terceiroterceiroRails32::Application.routes.draw do end roadie-rails-1.1.0/spec/railsapps/rails_32/config/boot.rb0000644000175000017500000000027712650457050023413 0ustar terceiroterceirorequire 'rubygems' # Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) roadie-rails-1.1.0/spec/railsapps/rails_32/.gitignore0000644000175000017500000000001012650457050022627 0ustar terceiroterceirolog tmp roadie-rails-1.1.0/spec/railsapps/rails_32/Gemfile0000644000175000017500000000022212650457050022137 0ustar terceiroterceirosource 'https://rubygems.org' gem 'rails', '3.2.12' gem 'roadie-rails', path: '../../../' group :assets do gem 'sass-rails', '~> 3.2.3' end roadie-rails-1.1.0/spec/railsapps/rails_30/0000755000175000017500000000000012650457050020646 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_30/public/0000755000175000017500000000000012650457050022124 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_30/public/images/0000755000175000017500000000000012650457050023371 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_30/public/images/rails.png0000644000175000017500000001476612650457050025227 0ustar terceiroterceiroPNG  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_#}Ǫ|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NC߅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 '_rails_30_session' roadie-rails-1.1.0/spec/railsapps/rails_30/config/initializers/secret_token.rb0000644000175000017500000000025612650457050027636 0ustar terceiroterceiroRails30::Application.config.secret_token = '8087604e8a128679494a9271966613b91c3ae5b57cea4089e0ffc6c92cd4ad36c3a3033865c3595d8436985b7d812cfe18e2aa0f06b3c7ebaaec66885a4927b2' roadie-rails-1.1.0/spec/railsapps/rails_30/config/environments/0000755000175000017500000000000012650457050024642 5ustar terceiroterceiroroadie-rails-1.1.0/spec/railsapps/rails_30/config/environments/development.rb0000644000175000017500000000054112650457050027511 0ustar terceiroterceiroRails30::Application.configure do config.cache_classes = false config.whiny_nils = true config.consider_all_requests_local = true config.action_controller.perform_caching = false config.action_mailer.raise_delivery_errors = false config.active_support.deprecation = :log config.action_dispatch.best_standards_support = :builtin end roadie-rails-1.1.0/spec/railsapps/rails_30/config/application.rb0000644000175000017500000000112312650457050024740 0ustar terceiroterceirorequire File.expand_path('../boot', __FILE__) # Pick the frameworks you want: # require "active_record/railtie" require "action_controller/railtie" require "action_mailer/railtie" require "active_resource/railtie" require "rails/test_unit/railtie" # If you have a Gemfile, require the gems listed there, including any gems # you've limited to :test, :development, or :production. Bundler.require(:default, Rails.env) if defined?(Bundler) module Rails30 class Application < Rails::Application config.encoding = "utf-8" config.roadie.url_options = {host: 'example.app.org'} end end roadie-rails-1.1.0/spec/railsapps/rails_30/config/routes.rb0000644000175000017500000000005012650457050023754 0ustar terceiroterceiroRails30::Application.routes.draw do end roadie-rails-1.1.0/spec/railsapps/rails_30/config/boot.rb0000644000175000017500000000027712650457050023411 0ustar terceiroterceirorequire 'rubygems' # Set up gems listed in the Gemfile. ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) roadie-rails-1.1.0/spec/railsapps/rails_30/.gitignore0000644000175000017500000000001012650457050022625 0ustar terceiroterceirolog tmp roadie-rails-1.1.0/spec/railsapps/rails_30/Gemfile0000644000175000017500000000013512650457050022140 0ustar terceiroterceirosource 'http://rubygems.org' gem 'rails', '~> 3.0.17' gem 'roadie-rails', path: '../../../' roadie-rails-1.1.0/spec/railsapps/README.md0000644000175000017500000000414312650457050020513 0ustar terceiroterceiro# 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 rails _x.y.z._ new rails_x_y --skip-javascript --skip-keeps --skip-active-record --skip-test-unit ``` ## Clean up the app ```bash cd rails_x_y ``` 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 rails_x_y/app/assets rails_x_y/app/views ln -s ../../shared/pipeline/app/assets rails_x_y/app/assets ln -s ../../shared/all/app/mailers rails_x_y/app/mailers ln -s ../../shared/all/app/views rails_x_y/app/views ``` ## Apply options and add gem 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-1.1.0/spec/support/0000755000175000017500000000000012650457050016750 5ustar terceiroterceiroroadie-rails-1.1.0/spec/support/rails_app.rb0000644000175000017500000000413712650457050021254 0ustar terceiroterceiroclass RailsApp def initialize(name, path, options = {}) @name = name @path = File.expand_path("../../railsapps/#{path}", __FILE__) @runner = options.fetch(:runner) @using_asset_pipeline = options.fetch(:asset_pipeline) @digests = options.fetch(:digests) @sprockets3 = options[:sprockets3] reset end def to_s() @name end def using_asset_pipeline?() @using_asset_pipeline end def digested?() @digests end def sprockets3?() @sprockets3 end def read_email(mail_name) result = run("puts Mailer.#{mail_name}.to_s") raise "No email returned. Did the rails application crash?" if result.strip.empty? Mail.read_from_string(result) end def read_delivered_email(mail_name, options = {}) deliver = options[:force_delivery] ? "deliver!" : "deliver" result = run("mail = AutoMailer.#{mail_name}; mail.delivery_method(:test); mail.#{deliver}; puts mail.to_s") raise "No email returned. Did the rails application crash?" if result.strip.empty? 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 = "" 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) # Unset environment variables set by Bundler to get a clean slate IO.popen(<<-SH).read unset BUNDLE_GEMFILE; unset RUBYOPT; export RAILS_ENV=development cd #{@path.shellescape} && #{runner_script} #{file_path.shellescape} SH end def runner_script case @runner when :script then "script/rails runner" when :bin then "bin/rails runner" else raise "Unknown runner type: #{@runner}" end end end roadie-rails-1.1.0/spec/support/have_no_styling_matcher.rb0000644000175000017500000000117212650457050024171 0ustar terceiroterceiroRSpec::Matchers.define :have_no_styling do chain(:at_selector) { |selector| @selector = selector } match { |document| @selector ||= 'body > *:first' styles_at_selector(document).empty? } description { "have no styles at selector #{@selector.inspect}" } failure_message { |document| "expected no styles at #{@selector.inspect} but had:\n#{styles_at_selector(document)}" } failure_message_when_negated { "expected #{@selector.inspect} to have styles" } def styles_at_selector(document) expect(document).to have_selector(@selector) document.at_css(@selector)['style'] || "" end end roadie-rails-1.1.0/spec/support/have_styling_matcher.rb0000644000175000017500000000300212650457050023467 0ustar terceiroterceiroRSpec::Matchers.define :have_styling do |rules| normalized_rules = StylingExpectation.new(rules) chain(:at_selector) { |selector| @selector = selector } match { |document| @selector ||= 'body > *:first' normalized_rules == styles_at_selector(document) } description { "have styles #{normalized_rules.inspect} at selector #{@selector.inspect}" } failure_message { |document| "expected styles at #{@selector.inspect} to be:\n#{normalized_rules}\nbut was:\n#{styles_at_selector(document)}" } failure_message_when_negated { "expected styles at #{@selector.inspect} to not be:\n#{normalized_rules}" } def styles_at_selector(document) expect(document).to have_selector(@selector) style = document.at_css(@selector)['style'] StylingExpectation.new(style || "") end end class StylingExpectation def initialize(styling) case styling when String then @rules = parse_rules(styling) when Array then @rules = styling when Hash then @rules = styling.to_a else fail "I don't understand #{styling.inspect}!" end end def ==(other) rules == other.rules end def to_s() rules.to_s end protected attr_reader :rules private def parse_rules(css) css.split(';').map { |property| parse_property(property) } end def parse_property(property) rule, value = property.split(':', 2).map(&:strip) [rule, normalize_quotes(value)] end # JRuby's Nokogiri encodes quotes def normalize_quotes(string) string.gsub '%22', '"' end end roadie-rails-1.1.0/spec/support/have_selector_matcher.rb0000644000175000017500000000013612650457050023623 0ustar terceiroterceiroRSpec::Matchers.define :have_selector do |selector| match { |dom| dom.at_css selector } end roadie-rails-1.1.0/spec/lib/0000755000175000017500000000000012650457050016002 5ustar terceiroterceiroroadie-rails-1.1.0/spec/lib/roadie/0000755000175000017500000000000012650457050017245 5ustar terceiroterceiroroadie-rails-1.1.0/spec/lib/roadie/rails/0000755000175000017500000000000012650457050020357 5ustar terceiroterceiroroadie-rails-1.1.0/spec/lib/roadie/rails/automatic_spec.rb0000644000175000017500000000304312650457050023704 0ustar terceiroterceirorequire '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-1.1.0/spec/lib/roadie/rails/asset_pipeline_provider_spec.rb0000644000175000017500000000571612650457050026645 0ustar terceiroterceirorequire '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-00acbfe0213dff8c5ba7232e3dabb3584c9e216bdb489f69d7aa20e0e101f3e6.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 class FakePipeline # Interface def [](name) @files.find { |file| file.matching_name == name } end # Test helpers def initialize() @files = [] end def add_asset(matching_name, path, content) @files << AssetFile.new(matching_name, path, content) end private AssetFile = Struct.new(:matching_name, :pathname, :to_s) end end end end roadie-rails-1.1.0/spec/lib/roadie/rails/document_builder_spec.rb0000644000175000017500000000077712650457050025255 0ustar terceiroterceiro# encoding: UTF-8 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 expect(options).to receive(:apply_to).with(instance_of Document).and_call_original DocumentBuilder.build("", options) end end end end roadie-rails-1.1.0/spec/lib/roadie/rails/mailer_spec.rb0000644000175000017500000000320112650457050023163 0ustar terceiroterceirorequire '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 { allow(instance).to receive(:roadie_options).and_return(Options.new) } 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 = double "Inliner" expect(MailInliner).to receive(:new).with(email, instance_of(Options)).and_return inliner expect(inliner).to receive(:execute).and_return "inlined email" expect(instance.roadie_mail).to eq("inlined email") end end end end end roadie-rails-1.1.0/spec/lib/roadie/rails/options_spec.rb0000644000175000017500000001365212650457050023420 0ustar terceiroterceiro# encoding: UTF-8 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 shared_examples_for "attribute" do |name| describe name do it "defaults to nil" do expect(Options.new.send(name)).to be_nil end it "can be set in the constructor" do expect(Options.new(name => valid_value).send(name)).to eq(valid_value) end it "can be changed using setter" do options = Options.new options.send :"#{name}=", valid_value expect(options.send(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.send(name)).to eq(valid_value) end describe "merging" do it "replaces values" do options = Options.new(name => valid_value) expect(options.merge(name => other_valid_value).send(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.send(name)).to eq(valid_value) end end describe "destructive merging" do it "replaces values" do options = Options.new(name => valid_value) expect(options.merge(name => other_valid_value).send(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.send(name) end it "does not mutate instance" do options = Options.new(name => valid_value) options.combine(name => other_valid_value) expect(options.send(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.send(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.send(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) { Proc.new { } } let(:other_valid_value) { Proc.new { } } def expect_combinated_value(value) expect(valid_value).to receive(:call).ordered.and_return 1 expect(other_valid_value).to receive(:call).ordered.and_return 2 expect(value.call).to eq(2) end end it_behaves_like "attribute", :after_transformation do let(:valid_value) { Proc.new { } } let(:other_valid_value) { Proc.new { } } def expect_combinated_value(value) expect(valid_value).to receive(:call).ordered.and_return 1 expect(other_valid_value).to receive(:call).ordered.and_return 2 expect(value.call).to eq(2) 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-1.1.0/spec/lib/roadie/rails/railtie_spec.rb0000644000175000017500000000451712650457050023356 0ustar terceiroterceiro# encoding: UTF-8 require 'spec_helper' module Roadie module Rails describe Railtie do let(:rails_application) { double "Application", config: ::Rails::Railtie::Configuration.new } 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" 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(enabled: true) 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(enabled: true) 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-1.1.0/spec/lib/roadie/rails/mail_inliner_spec.rb0000644000175000017500000000515412650457050024365 0ustar terceiroterceiro# encoding: UTF-8 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" expect(DocumentBuilder).to receive(:build).with(html, instance_of(Options)).and_return document inliner.execute expect(email.body.decoded).to eq("transformed HTML") 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" expect(DocumentBuilder).to receive(:build).with(html, instance_of(Options)).and_return document inliner.execute expect(email.html_part.body.decoded).to eq("transformed HTML") 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-1.1.0/spec/spec_helper.rb0000644000175000017500000000040412650457050020050 0ustar terceiroterceirorequire "rspec/collection_matchers" if ENV['CI'] require 'coveralls' Coveralls.wear! end require 'roadie-rails' RSpec.configure do |config| config.run_all_when_everything_filtered = true end Dir['./spec/support/**/*.rb'].each { |file| require file } roadie-rails-1.1.0/roadie-rails.gemspec0000644000175000017500000000241712650457050020226 0ustar terceiroterceiro# coding: utf-8 lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'roadie/rails/version' Gem::Specification.new do |spec| spec.name = "roadie-rails" spec.version = Roadie::Rails::VERSION spec.authors = ["Magnus Bergmark"] spec.email = ["magnus.bergmark@gmail.com"] spec.homepage = 'http://github.com/Mange/roadie-rails' spec.summary = %q{Making HTML emails comfortable for the Rails rockstars} spec.description = %q{Hooks Roadie into your Rails application to help with email generation.} spec.license = "MIT" spec.files = `git ls-files`.split($/) spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.extra_rdoc_files = %w[README.md Changelog.md LICENSE.txt] spec.require_paths = ["lib"] spec.add_dependency "roadie", "~> 3.1" spec.add_dependency "railties", ">= 3.0", "< 4.3" spec.add_development_dependency "rails", ">= 3.0", "< 4.3" spec.add_development_dependency "bundler", "~> 1.6" spec.add_development_dependency "rspec", "~> 3.0" spec.add_development_dependency "rspec-rails" spec.add_development_dependency "rspec-collection_matchers" end roadie-rails-1.1.0/.gitignore0000644000175000017500000000026112650457050016271 0ustar terceiroterceiro*.gem *.rbc .bundle .config .yardoc .ruby-version Gemfile.lock InstalledFiles _yardoc coverage doc/ lib/bundler/man pkg rdoc spec/reports test/tmp test/version_tmp tmp **/*.log roadie-rails-1.1.0/Gemfile0000644000175000017500000000065012650457050015576 0ustar terceiroterceirosource 'https://rubygems.org' # Specify your gem's dependencies in roadie-rails.gemspec gemspec # Additional development dependencies I use but don't want to declare in the # gemfile since they aren't required to develop this codebase. group :development do gem 'guard' gem 'guard-rspec' end # Added here so it does not show up on the Gemspec; I only want it for CI builds gem 'coveralls', group: :test, require: nil