roadie-rails 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +14 -14
- data/Changelog.md +13 -2
- data/LICENSE.txt +1 -1
- data/README.md +6 -12
- data/Rakefile +12 -3
- data/lib/roadie/rails/asset_pipeline_provider.rb +9 -1
- data/lib/roadie/rails/version.rb +1 -1
- data/roadie-rails.gemspec +2 -2
- data/setup.sh +6 -13
- data/spec/integration_spec.rb +4 -15
- data/spec/railsapps/rails_42/Gemfile +1 -1
- data/spec/railsapps/rails_42/app/assets +1 -0
- data/spec/railsapps/rails_42/app/mailers +1 -0
- data/spec/railsapps/rails_42/app/views +1 -0
- data/spec/railsapps/rails_42_sprockets_rails_3/Gemfile +2 -2
- data/spec/railsapps/rails_42_sprockets_rails_3/app/assets +1 -0
- data/spec/railsapps/rails_42_sprockets_rails_3/app/mailers +1 -0
- data/spec/railsapps/rails_42_sprockets_rails_3/app/views +1 -0
- data/spec/railsapps/rails_50/Gemfile +1 -2
- data/spec/railsapps/rails_50/app/assets +1 -0
- data/spec/railsapps/rails_50/app/views +1 -0
- data/spec/railsapps/rails_50/bin/rails +0 -5
- data/spec/railsapps/rails_50/config/application.rb +4 -1
- data/spec/railsapps/rails_50/config/environments/development.rb +0 -1
- data/spec/railsapps/{rails_41 → rails_51}/.gitignore +8 -7
- data/spec/railsapps/rails_51/Gemfile +8 -0
- data/spec/railsapps/{rails_30/public → rails_51/app/assets}/images/rails.png +0 -0
- data/spec/railsapps/rails_51/app/assets/stylesheets/email.css.scss +2 -0
- data/spec/railsapps/rails_51/app/mailers/auto_mailer.rb +27 -0
- data/spec/railsapps/rails_51/app/mailers/mailer.rb +17 -0
- data/spec/railsapps/rails_51/app/views/auto_mailer/normal_email.html.erb +11 -0
- data/spec/railsapps/rails_51/app/views/auto_mailer/normal_email.text +1 -0
- data/spec/railsapps/rails_51/app/views/mailer/normal_email.html.erb +11 -0
- data/spec/railsapps/rails_51/app/views/mailer/normal_email.text +1 -0
- data/spec/railsapps/{rails_40_no_pipeline → rails_51}/bin/rails +1 -1
- data/spec/railsapps/{rails_41 → rails_51}/config.ru +2 -1
- data/spec/railsapps/rails_51/config/application.rb +16 -0
- data/spec/railsapps/rails_51/config/boot.rb +3 -0
- data/spec/railsapps/rails_51/config/environment.rb +5 -0
- data/spec/railsapps/rails_51/config/environments/development.rb +51 -0
- data/spec/railsapps/rails_51/config/environments/production.rb +83 -0
- data/spec/railsapps/rails_51/config/environments/test.rb +42 -0
- data/spec/railsapps/rails_51/config/initializers/application_controller_renderer.rb +6 -0
- data/spec/railsapps/rails_51/config/initializers/assets.rb +11 -0
- data/spec/railsapps/rails_51/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/railsapps/rails_51/config/initializers/cookies_serializer.rb +5 -0
- data/spec/railsapps/rails_51/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/railsapps/rails_51/config/initializers/inflections.rb +16 -0
- data/spec/railsapps/rails_51/config/initializers/mime_types.rb +4 -0
- data/spec/railsapps/rails_51/config/initializers/new_framework_defaults.rb +21 -0
- data/spec/railsapps/rails_51/config/initializers/session_store.rb +3 -0
- data/spec/railsapps/rails_51/config/initializers/wrap_parameters.rb +9 -0
- data/spec/railsapps/rails_51/config/locales/en.yml +23 -0
- data/spec/railsapps/rails_51/config/routes.rb +3 -0
- data/spec/railsapps/{rails_40_no_pipeline/log/dee → rails_51/log/.keep} +0 -0
- data/spec/railsapps/shared/all/app/views/auto_mailer +1 -0
- data/spec/spec_helper.rb +2 -1
- data/spec/support/rails_app.rb +13 -10
- metadata +89 -171
- data/spec/railsapps/rails_30/.gitignore +0 -2
- data/spec/railsapps/rails_30/Gemfile +0 -4
- data/spec/railsapps/rails_30/config/application.rb +0 -19
- data/spec/railsapps/rails_30/config/boot.rb +0 -6
- data/spec/railsapps/rails_30/config/environment.rb +0 -5
- data/spec/railsapps/rails_30/config/environments/development.rb +0 -10
- data/spec/railsapps/rails_30/config/initializers/secret_token.rb +0 -1
- data/spec/railsapps/rails_30/config/initializers/session_store.rb +0 -1
- data/spec/railsapps/rails_30/config/routes.rb +0 -2
- data/spec/railsapps/rails_30/public/stylesheets/email.css +0 -2
- data/spec/railsapps/rails_30/script/rails +0 -6
- data/spec/railsapps/rails_31/.gitignore +0 -2
- data/spec/railsapps/rails_31/Gemfile +0 -8
- data/spec/railsapps/rails_31/config/application.rb +0 -22
- data/spec/railsapps/rails_31/config/boot.rb +0 -6
- data/spec/railsapps/rails_31/config/environment.rb +0 -5
- data/spec/railsapps/rails_31/config/environments/development.rb +0 -11
- data/spec/railsapps/rails_31/config/initializers/secret_token.rb +0 -1
- data/spec/railsapps/rails_31/config/initializers/session_store.rb +0 -1
- data/spec/railsapps/rails_31/config/initializers/wrap_parameters.rb +0 -4
- data/spec/railsapps/rails_31/config/routes.rb +0 -2
- data/spec/railsapps/rails_31/script/rails +0 -6
- data/spec/railsapps/rails_32/.gitignore +0 -2
- data/spec/railsapps/rails_32/Gemfile +0 -8
- data/spec/railsapps/rails_32/config/application.rb +0 -22
- data/spec/railsapps/rails_32/config/boot.rb +0 -6
- data/spec/railsapps/rails_32/config/environment.rb +0 -5
- data/spec/railsapps/rails_32/config/environments/development.rb +0 -11
- data/spec/railsapps/rails_32/config/initializers/secret_token.rb +0 -1
- data/spec/railsapps/rails_32/config/initializers/session_store.rb +0 -1
- data/spec/railsapps/rails_32/config/initializers/wrap_parameters.rb +0 -4
- data/spec/railsapps/rails_32/config/routes.rb +0 -2
- data/spec/railsapps/rails_32/script/rails +0 -6
- data/spec/railsapps/rails_40/Gemfile +0 -6
- data/spec/railsapps/rails_40/bin/rails +0 -4
- data/spec/railsapps/rails_40/config/application.rb +0 -18
- data/spec/railsapps/rails_40/config/boot.rb +0 -4
- data/spec/railsapps/rails_40/config/environment.rb +0 -5
- data/spec/railsapps/rails_40/config/environments/development.rb +0 -9
- data/spec/railsapps/rails_40/config/initializers/secret_token.rb +0 -1
- data/spec/railsapps/rails_40/config/initializers/session_store.rb +0 -1
- data/spec/railsapps/rails_40/config/routes.rb +0 -2
- data/spec/railsapps/rails_40_no_pipeline/Gemfile +0 -6
- data/spec/railsapps/rails_40_no_pipeline/config/application.rb +0 -19
- data/spec/railsapps/rails_40_no_pipeline/config/boot.rb +0 -4
- data/spec/railsapps/rails_40_no_pipeline/config/environment.rb +0 -5
- data/spec/railsapps/rails_40_no_pipeline/config/environments/development.rb +0 -9
- data/spec/railsapps/rails_40_no_pipeline/config/initializers/secret_token.rb +0 -1
- data/spec/railsapps/rails_40_no_pipeline/config/initializers/session_store.rb +0 -1
- data/spec/railsapps/rails_40_no_pipeline/config/routes.rb +0 -2
- data/spec/railsapps/rails_40_no_pipeline/public/images/rails.png +0 -0
- data/spec/railsapps/rails_40_no_pipeline/public/stylesheets/email.css +0 -2
- data/spec/railsapps/rails_40_precompiled/Gemfile +0 -6
- data/spec/railsapps/rails_40_precompiled/Rakefile +0 -6
- data/spec/railsapps/rails_40_precompiled/bin/rails +0 -4
- data/spec/railsapps/rails_40_precompiled/config/application.rb +0 -20
- data/spec/railsapps/rails_40_precompiled/config/boot.rb +0 -4
- data/spec/railsapps/rails_40_precompiled/config/environment.rb +0 -5
- data/spec/railsapps/rails_40_precompiled/config/environments/development.rb +0 -13
- data/spec/railsapps/rails_40_precompiled/config/initializers/secret_token.rb +0 -1
- data/spec/railsapps/rails_40_precompiled/config/initializers/session_store.rb +0 -1
- data/spec/railsapps/rails_40_precompiled/config/routes.rb +0 -2
- data/spec/railsapps/rails_40_precompiled/public/assets/email-fad0c62b8f82e2835c1d0bdc19894257.css +0 -5
- data/spec/railsapps/rails_40_precompiled/public/assets/email-fad0c62b8f82e2835c1d0bdc19894257.css.gz +0 -0
- data/spec/railsapps/rails_40_precompiled/public/assets/manifest-8a3d16aeb2a40fe5057dd998c3edab10.json +0 -1
- data/spec/railsapps/rails_40_precompiled/public/assets/rails-231a680f23887d9dd70710ea5efd3c62.png +0 -0
- data/spec/railsapps/rails_41/Gemfile +0 -5
- data/spec/railsapps/rails_41/bin/rails +0 -4
- data/spec/railsapps/rails_41/config/application.rb +0 -13
- data/spec/railsapps/rails_41/config/boot.rb +0 -4
- data/spec/railsapps/rails_41/config/environment.rb +0 -5
- data/spec/railsapps/rails_41/config/environments/development.rb +0 -9
- data/spec/railsapps/rails_41/config/initializers/secret_token.rb +0 -1
- data/spec/railsapps/rails_41/config/initializers/session_store.rb +0 -1
- data/spec/railsapps/rails_41/config/routes.rb +0 -2
- data/spec/railsapps/rails_50/config/database.yml +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d6b1af48e15cf35a4cc3944b04a7fce6b312c6b0
|
4
|
+
data.tar.gz: 13e9195d7c3fced4ef36a87a48ae1cb876132dfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5d05a556b483d2450029585eaa7493cfc880ae12a41853ef78b4f199ee7840c1d4467b2efc2d3900738f0e477e5584c871461faafe69da2ad4a4184e65ed718
|
7
|
+
data.tar.gz: b6caa2c97ef3a25daea516fa7e0a1ad51156f48b2979b5e022ab3073438d7966add5ddad165ab6adcda1337d39f013bf1b4b2af70a4e9579565904839d8084a4
|
data/.travis.yml
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
sudo: false
|
2
|
+
dist: trusty
|
2
3
|
language: ruby
|
3
4
|
rvm:
|
4
|
-
-
|
5
|
-
- 2.
|
6
|
-
- 2.1
|
7
|
-
-
|
8
|
-
-
|
9
|
-
- jruby
|
10
|
-
- rbx
|
5
|
+
- 2.2.7
|
6
|
+
- 2.3.4
|
7
|
+
- 2.4.1
|
8
|
+
- jruby-9
|
9
|
+
- rbx-3
|
11
10
|
|
12
11
|
matrix:
|
13
|
-
allow_failures:
|
14
|
-
# Rubinius has a lot of trouble and no large following, so I'm going to
|
15
|
-
# allow failures on it until it gets more stable on Travis / Real Life(tm).
|
16
|
-
# Let me know if you need it. Patches are welcome!
|
17
|
-
- rvm: rbx
|
18
12
|
fast_finish: true
|
19
13
|
|
20
|
-
cache:
|
21
|
-
|
14
|
+
cache:
|
15
|
+
directories:
|
16
|
+
- .bundle
|
17
|
+
- spec/railsapps/rails_42/.bundle
|
18
|
+
- spec/railsapps/rails_42_sprockets_rails_3/.bundle
|
19
|
+
- spec/railsapps/rails_50/.bundle
|
20
|
+
- spec/railsapps/rails_51/.bundle
|
21
|
+
bundler_args: --without guard --path=.bundle
|
22
22
|
script: "rake"
|
data/Changelog.md
CHANGED
@@ -1,10 +1,21 @@
|
|
1
1
|
### development version
|
2
2
|
|
3
|
-
[full changelog](https://github.com/Mange/roadie-rails/compare/v1.
|
3
|
+
[full changelog](https://github.com/Mange/roadie-rails/compare/v1.2.0...master)
|
4
4
|
|
5
5
|
* Nothing yet.
|
6
6
|
|
7
|
-
### 1.
|
7
|
+
### 1.2.0
|
8
|
+
|
9
|
+
[full changelog](https://github.com/Mange/roadie-rails/compare/v1.1.1...v1.2.0)
|
10
|
+
|
11
|
+
**Note:** Support for Rails < 4.2 is now dropped.
|
12
|
+
|
13
|
+
**Note:** Support for Ruby < 2.2 is now dropped.
|
14
|
+
|
15
|
+
* Sprockets 4.0 support (#60) - [Miklós Fazekas (mfazekas)](https://github.com/mfazekas)
|
16
|
+
* Rails 5.1 support (#70) - [Gleb Mazovetskiy (glebm)](https://github.com/glebm)
|
17
|
+
|
18
|
+
### 1.1.1
|
8
19
|
|
9
20
|
[full changelog](https://github.com/Mange/roadie-rails/compare/v1.1.0...v1.1.1)
|
10
21
|
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -276,21 +276,15 @@ end
|
|
276
276
|
Tested with [Travis CI](http://travis-ci.org) using [almost all combinations of](http://travis-ci.org/#!/Mange/roadie-rails):
|
277
277
|
|
278
278
|
* Ruby:
|
279
|
-
* MRI 1.9.3
|
280
|
-
* MRI 2.0
|
281
|
-
* MRI 2.1
|
282
279
|
* MRI 2.2
|
283
|
-
* MRI 2.3
|
280
|
+
* MRI 2.3
|
281
|
+
* MRI 2.4
|
284
282
|
* JRuby (latest)
|
285
|
-
* Rubinius
|
283
|
+
* Rubinius 3
|
286
284
|
* Rails
|
287
|
-
* 3.0
|
288
|
-
* 3.1
|
289
|
-
* 3.2
|
290
|
-
* 4.0
|
291
|
-
* 4.1
|
292
285
|
* 4.2
|
293
|
-
* 5.0
|
286
|
+
* 5.0
|
287
|
+
* 5.1
|
294
288
|
|
295
289
|
Let me know if you want any other combination supported officially.
|
296
290
|
|
@@ -318,7 +312,7 @@ After running `rake` for the first time and you want to keep running tests witho
|
|
318
312
|
|
319
313
|
(The MIT License)
|
320
314
|
|
321
|
-
Copyright © 2013-
|
315
|
+
Copyright © 2013-2017 [Magnus Bergmark](https://github.com/Mange) <magnus.bergmark@gmail.com>, et. al.
|
322
316
|
|
323
317
|
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:
|
324
318
|
|
data/Rakefile
CHANGED
@@ -2,7 +2,16 @@ require "bundler/gem_tasks"
|
|
2
2
|
|
3
3
|
desc "Install gems for embedded Rails apps"
|
4
4
|
task :install_gems do
|
5
|
-
|
5
|
+
Bundler.with_clean_env do
|
6
|
+
sh "./setup.sh install"
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
desc "Update gems for embedded Rails apps"
|
11
|
+
task :update_gems do
|
12
|
+
Bundler.with_clean_env do
|
13
|
+
sh "./setup.sh update"
|
14
|
+
end
|
6
15
|
end
|
7
16
|
|
8
17
|
desc "Run specs"
|
@@ -10,5 +19,5 @@ task :spec do
|
|
10
19
|
sh "bundle exec rspec -f progress"
|
11
20
|
end
|
12
21
|
|
13
|
-
desc "Default:
|
14
|
-
task :default => [:
|
22
|
+
desc "Default: Update gems and run specs"
|
23
|
+
task :default => [:update_gems, :spec]
|
@@ -12,11 +12,19 @@ module Roadie
|
|
12
12
|
|
13
13
|
def find_stylesheet(name)
|
14
14
|
if (asset = find_asset_in_pipeline(name))
|
15
|
-
Stylesheet.new("#{asset
|
15
|
+
Stylesheet.new("#{filename(asset)} (live compiled)", asset.to_s)
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
19
|
private
|
20
|
+
def filename(asset)
|
21
|
+
if asset.respond_to?(:filename) # sprockets 4 or later
|
22
|
+
asset.filename
|
23
|
+
else
|
24
|
+
asset.pathname
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
20
28
|
def find_asset_in_pipeline(name)
|
21
29
|
normalized_name = normalize_asset_name(name)
|
22
30
|
@pipeline[normalized_name] || @pipeline[remove_asset_digest(normalized_name)]
|
data/lib/roadie/rails/version.rb
CHANGED
data/roadie-rails.gemspec
CHANGED
@@ -20,9 +20,9 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
22
|
spec.add_dependency "roadie", "~> 3.1"
|
23
|
-
spec.add_dependency "railties", ">= 3.0", "< 5.
|
23
|
+
spec.add_dependency "railties", ">= 3.0", "< 5.2"
|
24
24
|
|
25
|
-
spec.add_development_dependency "rails", ">=
|
25
|
+
spec.add_development_dependency "rails", ">= 4.2", "< 5.2"
|
26
26
|
spec.add_development_dependency "bundler", "~> 1.6"
|
27
27
|
spec.add_development_dependency "rspec", "~> 3.0"
|
28
28
|
spec.add_development_dependency "rspec-rails"
|
data/setup.sh
CHANGED
@@ -14,18 +14,16 @@ function green() {
|
|
14
14
|
}
|
15
15
|
|
16
16
|
function update() {
|
17
|
+
bundle config --local path .bundle
|
17
18
|
bundle update | grep -ve "^Using "
|
18
19
|
}
|
19
20
|
|
20
21
|
function install() {
|
21
|
-
bundle install --quiet && green " OK"
|
22
|
+
bundle install --quiet --path=.bundle && green " OK"
|
22
23
|
}
|
23
24
|
|
24
25
|
|
25
26
|
root=$(dirname $0)
|
26
|
-
ruby_version=$2
|
27
|
-
|
28
|
-
[ -z "$ruby_version" ] && echo "Need to pass ruby version as second parameter. This is used to skip some installs due to lack of support of gems on certain ruby versions." && exit 1;
|
29
27
|
|
30
28
|
# Set by Travis CI; interferes with the nested repos
|
31
29
|
unset BUNDLE_GEMFILE
|
@@ -36,15 +34,10 @@ if [[ $1 == "install" ]]; then
|
|
36
34
|
|
37
35
|
for app_path in $root/spec/railsapps/rails_*; do
|
38
36
|
(
|
39
|
-
header "Rails app $(basename $app_path)
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
else
|
44
|
-
cd $app_path
|
45
|
-
echo "Installing gems for $(basename $app_path)"
|
46
|
-
install
|
47
|
-
fi
|
37
|
+
header "Rails app $(basename $app_path)"
|
38
|
+
cd $app_path
|
39
|
+
echo "Installing gems for $(basename $app_path)"
|
40
|
+
install
|
48
41
|
)
|
49
42
|
done
|
50
43
|
echo ""
|
data/spec/integration_spec.rb
CHANGED
@@ -8,23 +8,12 @@ describe "Integrations" do
|
|
8
8
|
end
|
9
9
|
|
10
10
|
rails_apps = [
|
11
|
-
RailsApp.new("Rails 3.0.x", 'rails_30', runner: :script, asset_pipeline: false, digests: false),
|
12
|
-
## We do not yet support live-compilation through asset pipeline
|
13
|
-
RailsApp.new("Rails 3.1.x", 'rails_31', runner: :script, asset_pipeline: true, digests: false),
|
14
|
-
RailsApp.new("Rails 3.2.x", 'rails_32', runner: :script, asset_pipeline: true, digests: false),
|
15
|
-
RailsApp.new("Rails 4.0.x", 'rails_40', runner: :bin, asset_pipeline: true, digests: false),
|
16
|
-
RailsApp.new("Rails 4.0.x (without asset pipeline)", 'rails_40_no_pipeline', runner: :bin, asset_pipeline: false, digests: false),
|
17
|
-
RailsApp.new("Rails 4.0.x (precompiled)", 'rails_40_precompiled', runner: :bin, asset_pipeline: true, digests: true),
|
18
|
-
RailsApp.new("Rails 4.1.x", 'rails_41', runner: :bin, asset_pipeline: true, digests: false),
|
19
11
|
RailsApp.new("Rails 4.2.x", 'rails_42', runner: :bin, asset_pipeline: true, digests: false),
|
20
|
-
RailsApp.new("Rails 4.2.x (with sprockets-rails 3)", 'rails_42_sprockets_rails_3', runner: :bin, asset_pipeline: true, digests: true,
|
12
|
+
RailsApp.new("Rails 4.2.x (with sprockets-rails 3)", 'rails_42_sprockets_rails_3', runner: :bin, asset_pipeline: true, digests: true, sprockets: 3),
|
13
|
+
RailsApp.new("Rails 5.0.x", 'rails_50', runner: :bin, asset_pipeline: true, digests: true, sprockets: 3),
|
14
|
+
RailsApp.new("Rails 5.1.0", 'rails_51', runner: :bin, asset_pipeline: true, digests: true, sprockets: 3)
|
21
15
|
]
|
22
16
|
|
23
|
-
# Rails 5 requires at least ruby version 2.2.2
|
24
|
-
if RUBY_VERSION >= "2.2.2"
|
25
|
-
rails_apps << RailsApp.new("Rails 5.0.x", 'rails_50', runner: :bin, asset_pipeline: true, digests: true, sprockets3: true)
|
26
|
-
end
|
27
|
-
|
28
17
|
rails_apps.each do |app|
|
29
18
|
describe "with #{app}" do
|
30
19
|
before { app.reset }
|
@@ -44,7 +33,7 @@ describe "Integrations" do
|
|
44
33
|
expect(document).to have_selector('body h1')
|
45
34
|
|
46
35
|
if app.digested?
|
47
|
-
if app.
|
36
|
+
if app.sprockets3_or_later?
|
48
37
|
expected_image_url = 'https://example.app.org/assets/rails-322506f9917889126e81df2833a6eecdf2e394658d53dad347e9882dd4dbf28e.png'
|
49
38
|
else
|
50
39
|
expected_image_url = 'https://example.app.org/assets/rails-231a680f23887d9dd70710ea5efd3c62.png'
|
@@ -0,0 +1 @@
|
|
1
|
+
spec/railsapps/rails_42/app/../../shared/pipeline/app/assets
|
@@ -0,0 +1 @@
|
|
1
|
+
spec/railsapps/rails_42/app/../../shared/all/app/mailers
|
@@ -0,0 +1 @@
|
|
1
|
+
spec/railsapps/rails_42/app/../../shared/all/app/views
|
@@ -0,0 +1 @@
|
|
1
|
+
spec/railsapps/rails_42_sprockets_rails_3/app/../../shared/pipeline/app/assets
|
@@ -0,0 +1 @@
|
|
1
|
+
spec/railsapps/rails_42_sprockets_rails_3/app/../../shared/all/app/mailers
|
@@ -0,0 +1 @@
|
|
1
|
+
spec/railsapps/rails_42_sprockets_rails_3/app/../../shared/all/app/views
|
@@ -0,0 +1 @@
|
|
1
|
+
spec/railsapps/rails_50/app/../../shared/pipeline/app/assets
|
@@ -0,0 +1 @@
|
|
1
|
+
spec/railsapps/rails_50/app/../../shared/all/app/views
|
@@ -1,9 +1,4 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
begin
|
3
|
-
load File.expand_path('../spring', __FILE__)
|
4
|
-
rescue LoadError => e
|
5
|
-
raise unless e.message.include?('spring')
|
6
|
-
end
|
7
2
|
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
8
3
|
require_relative '../config/boot'
|
9
4
|
require 'rails/commands'
|
@@ -1,6 +1,9 @@
|
|
1
1
|
require File.expand_path('../boot', __FILE__)
|
2
2
|
|
3
|
-
require '
|
3
|
+
require 'action_controller/railtie'
|
4
|
+
require 'action_mailer/railtie'
|
5
|
+
require 'action_view/railtie'
|
6
|
+
require 'sprockets/railtie'
|
4
7
|
|
5
8
|
# Require the gems listed in Gemfile, including any gems
|
6
9
|
# you've limited to :test, :development, or :production.
|
@@ -6,7 +6,6 @@ Rails.application.configure do
|
|
6
6
|
config.cache_store = :null_store
|
7
7
|
config.action_mailer.raise_delivery_errors = false
|
8
8
|
config.active_support.deprecation = :log
|
9
|
-
config.active_record.migration_error = :page_load
|
10
9
|
config.assets.debug = true
|
11
10
|
config.assets.digest = true
|
12
11
|
config.assets.raise_runtime_errors = true
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# See
|
1
|
+
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
|
2
2
|
#
|
3
3
|
# If you find yourself ignoring temporary files generated by your text editor
|
4
4
|
# or operating system, you probably want to add a global ignore instead:
|
@@ -7,10 +7,11 @@
|
|
7
7
|
# Ignore bundler config.
|
8
8
|
/.bundle
|
9
9
|
|
10
|
-
# Ignore the default SQLite database.
|
11
|
-
/db/*.sqlite3
|
12
|
-
/db/*.sqlite3-journal
|
13
|
-
|
14
10
|
# Ignore all logfiles and tempfiles.
|
15
|
-
/log
|
16
|
-
/tmp
|
11
|
+
/log/*
|
12
|
+
/tmp/*
|
13
|
+
!/log/.keep
|
14
|
+
!/tmp/.keep
|
15
|
+
|
16
|
+
# Ignore Byebug command history file.
|
17
|
+
.byebug_history
|
File without changes
|
@@ -0,0 +1,27 @@
|
|
1
|
+
class AutoMailer < ActionMailer::Base
|
2
|
+
include Roadie::Rails::Automatic
|
3
|
+
|
4
|
+
default from: 'john@example.com'
|
5
|
+
|
6
|
+
def normal_email
|
7
|
+
generate_email
|
8
|
+
end
|
9
|
+
|
10
|
+
def disabled_email
|
11
|
+
generate_email
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
def roadie_options
|
16
|
+
unless action_name =~ /disabled/
|
17
|
+
super.combine(url_options: {protocol: "https"})
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def generate_email
|
22
|
+
mail(to: 'example@example.org', subject: "Notification for you") do |format|
|
23
|
+
format.html { render :normal_email }
|
24
|
+
format.text { render :normal_email }
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
class Mailer < ActionMailer::Base
|
2
|
+
include Roadie::Rails::Mailer
|
3
|
+
|
4
|
+
default from: 'john@example.com'
|
5
|
+
|
6
|
+
def normal_email
|
7
|
+
roadie_mail(to: 'example@example.org', subject: "Notification for you") do |format|
|
8
|
+
format.html
|
9
|
+
format.text
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
def roadie_options
|
15
|
+
super.combine(url_options: {protocol: "https"})
|
16
|
+
end
|
17
|
+
end
|