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.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +14 -14
  3. data/Changelog.md +13 -2
  4. data/LICENSE.txt +1 -1
  5. data/README.md +6 -12
  6. data/Rakefile +12 -3
  7. data/lib/roadie/rails/asset_pipeline_provider.rb +9 -1
  8. data/lib/roadie/rails/version.rb +1 -1
  9. data/roadie-rails.gemspec +2 -2
  10. data/setup.sh +6 -13
  11. data/spec/integration_spec.rb +4 -15
  12. data/spec/railsapps/rails_42/Gemfile +1 -1
  13. data/spec/railsapps/rails_42/app/assets +1 -0
  14. data/spec/railsapps/rails_42/app/mailers +1 -0
  15. data/spec/railsapps/rails_42/app/views +1 -0
  16. data/spec/railsapps/rails_42_sprockets_rails_3/Gemfile +2 -2
  17. data/spec/railsapps/rails_42_sprockets_rails_3/app/assets +1 -0
  18. data/spec/railsapps/rails_42_sprockets_rails_3/app/mailers +1 -0
  19. data/spec/railsapps/rails_42_sprockets_rails_3/app/views +1 -0
  20. data/spec/railsapps/rails_50/Gemfile +1 -2
  21. data/spec/railsapps/rails_50/app/assets +1 -0
  22. data/spec/railsapps/rails_50/app/views +1 -0
  23. data/spec/railsapps/rails_50/bin/rails +0 -5
  24. data/spec/railsapps/rails_50/config/application.rb +4 -1
  25. data/spec/railsapps/rails_50/config/environments/development.rb +0 -1
  26. data/spec/railsapps/{rails_41 → rails_51}/.gitignore +8 -7
  27. data/spec/railsapps/rails_51/Gemfile +8 -0
  28. data/spec/railsapps/{rails_30/public → rails_51/app/assets}/images/rails.png +0 -0
  29. data/spec/railsapps/rails_51/app/assets/stylesheets/email.css.scss +2 -0
  30. data/spec/railsapps/rails_51/app/mailers/auto_mailer.rb +27 -0
  31. data/spec/railsapps/rails_51/app/mailers/mailer.rb +17 -0
  32. data/spec/railsapps/rails_51/app/views/auto_mailer/normal_email.html.erb +11 -0
  33. data/spec/railsapps/rails_51/app/views/auto_mailer/normal_email.text +1 -0
  34. data/spec/railsapps/rails_51/app/views/mailer/normal_email.html.erb +11 -0
  35. data/spec/railsapps/rails_51/app/views/mailer/normal_email.text +1 -0
  36. data/spec/railsapps/{rails_40_no_pipeline → rails_51}/bin/rails +1 -1
  37. data/spec/railsapps/{rails_41 → rails_51}/config.ru +2 -1
  38. data/spec/railsapps/rails_51/config/application.rb +16 -0
  39. data/spec/railsapps/rails_51/config/boot.rb +3 -0
  40. data/spec/railsapps/rails_51/config/environment.rb +5 -0
  41. data/spec/railsapps/rails_51/config/environments/development.rb +51 -0
  42. data/spec/railsapps/rails_51/config/environments/production.rb +83 -0
  43. data/spec/railsapps/rails_51/config/environments/test.rb +42 -0
  44. data/spec/railsapps/rails_51/config/initializers/application_controller_renderer.rb +6 -0
  45. data/spec/railsapps/rails_51/config/initializers/assets.rb +11 -0
  46. data/spec/railsapps/rails_51/config/initializers/backtrace_silencers.rb +7 -0
  47. data/spec/railsapps/rails_51/config/initializers/cookies_serializer.rb +5 -0
  48. data/spec/railsapps/rails_51/config/initializers/filter_parameter_logging.rb +4 -0
  49. data/spec/railsapps/rails_51/config/initializers/inflections.rb +16 -0
  50. data/spec/railsapps/rails_51/config/initializers/mime_types.rb +4 -0
  51. data/spec/railsapps/rails_51/config/initializers/new_framework_defaults.rb +21 -0
  52. data/spec/railsapps/rails_51/config/initializers/session_store.rb +3 -0
  53. data/spec/railsapps/rails_51/config/initializers/wrap_parameters.rb +9 -0
  54. data/spec/railsapps/rails_51/config/locales/en.yml +23 -0
  55. data/spec/railsapps/rails_51/config/routes.rb +3 -0
  56. data/spec/railsapps/{rails_40_no_pipeline/log/dee → rails_51/log/.keep} +0 -0
  57. data/spec/railsapps/shared/all/app/views/auto_mailer +1 -0
  58. data/spec/spec_helper.rb +2 -1
  59. data/spec/support/rails_app.rb +13 -10
  60. metadata +89 -171
  61. data/spec/railsapps/rails_30/.gitignore +0 -2
  62. data/spec/railsapps/rails_30/Gemfile +0 -4
  63. data/spec/railsapps/rails_30/config/application.rb +0 -19
  64. data/spec/railsapps/rails_30/config/boot.rb +0 -6
  65. data/spec/railsapps/rails_30/config/environment.rb +0 -5
  66. data/spec/railsapps/rails_30/config/environments/development.rb +0 -10
  67. data/spec/railsapps/rails_30/config/initializers/secret_token.rb +0 -1
  68. data/spec/railsapps/rails_30/config/initializers/session_store.rb +0 -1
  69. data/spec/railsapps/rails_30/config/routes.rb +0 -2
  70. data/spec/railsapps/rails_30/public/stylesheets/email.css +0 -2
  71. data/spec/railsapps/rails_30/script/rails +0 -6
  72. data/spec/railsapps/rails_31/.gitignore +0 -2
  73. data/spec/railsapps/rails_31/Gemfile +0 -8
  74. data/spec/railsapps/rails_31/config/application.rb +0 -22
  75. data/spec/railsapps/rails_31/config/boot.rb +0 -6
  76. data/spec/railsapps/rails_31/config/environment.rb +0 -5
  77. data/spec/railsapps/rails_31/config/environments/development.rb +0 -11
  78. data/spec/railsapps/rails_31/config/initializers/secret_token.rb +0 -1
  79. data/spec/railsapps/rails_31/config/initializers/session_store.rb +0 -1
  80. data/spec/railsapps/rails_31/config/initializers/wrap_parameters.rb +0 -4
  81. data/spec/railsapps/rails_31/config/routes.rb +0 -2
  82. data/spec/railsapps/rails_31/script/rails +0 -6
  83. data/spec/railsapps/rails_32/.gitignore +0 -2
  84. data/spec/railsapps/rails_32/Gemfile +0 -8
  85. data/spec/railsapps/rails_32/config/application.rb +0 -22
  86. data/spec/railsapps/rails_32/config/boot.rb +0 -6
  87. data/spec/railsapps/rails_32/config/environment.rb +0 -5
  88. data/spec/railsapps/rails_32/config/environments/development.rb +0 -11
  89. data/spec/railsapps/rails_32/config/initializers/secret_token.rb +0 -1
  90. data/spec/railsapps/rails_32/config/initializers/session_store.rb +0 -1
  91. data/spec/railsapps/rails_32/config/initializers/wrap_parameters.rb +0 -4
  92. data/spec/railsapps/rails_32/config/routes.rb +0 -2
  93. data/spec/railsapps/rails_32/script/rails +0 -6
  94. data/spec/railsapps/rails_40/Gemfile +0 -6
  95. data/spec/railsapps/rails_40/bin/rails +0 -4
  96. data/spec/railsapps/rails_40/config/application.rb +0 -18
  97. data/spec/railsapps/rails_40/config/boot.rb +0 -4
  98. data/spec/railsapps/rails_40/config/environment.rb +0 -5
  99. data/spec/railsapps/rails_40/config/environments/development.rb +0 -9
  100. data/spec/railsapps/rails_40/config/initializers/secret_token.rb +0 -1
  101. data/spec/railsapps/rails_40/config/initializers/session_store.rb +0 -1
  102. data/spec/railsapps/rails_40/config/routes.rb +0 -2
  103. data/spec/railsapps/rails_40_no_pipeline/Gemfile +0 -6
  104. data/spec/railsapps/rails_40_no_pipeline/config/application.rb +0 -19
  105. data/spec/railsapps/rails_40_no_pipeline/config/boot.rb +0 -4
  106. data/spec/railsapps/rails_40_no_pipeline/config/environment.rb +0 -5
  107. data/spec/railsapps/rails_40_no_pipeline/config/environments/development.rb +0 -9
  108. data/spec/railsapps/rails_40_no_pipeline/config/initializers/secret_token.rb +0 -1
  109. data/spec/railsapps/rails_40_no_pipeline/config/initializers/session_store.rb +0 -1
  110. data/spec/railsapps/rails_40_no_pipeline/config/routes.rb +0 -2
  111. data/spec/railsapps/rails_40_no_pipeline/public/images/rails.png +0 -0
  112. data/spec/railsapps/rails_40_no_pipeline/public/stylesheets/email.css +0 -2
  113. data/spec/railsapps/rails_40_precompiled/Gemfile +0 -6
  114. data/spec/railsapps/rails_40_precompiled/Rakefile +0 -6
  115. data/spec/railsapps/rails_40_precompiled/bin/rails +0 -4
  116. data/spec/railsapps/rails_40_precompiled/config/application.rb +0 -20
  117. data/spec/railsapps/rails_40_precompiled/config/boot.rb +0 -4
  118. data/spec/railsapps/rails_40_precompiled/config/environment.rb +0 -5
  119. data/spec/railsapps/rails_40_precompiled/config/environments/development.rb +0 -13
  120. data/spec/railsapps/rails_40_precompiled/config/initializers/secret_token.rb +0 -1
  121. data/spec/railsapps/rails_40_precompiled/config/initializers/session_store.rb +0 -1
  122. data/spec/railsapps/rails_40_precompiled/config/routes.rb +0 -2
  123. data/spec/railsapps/rails_40_precompiled/public/assets/email-fad0c62b8f82e2835c1d0bdc19894257.css +0 -5
  124. data/spec/railsapps/rails_40_precompiled/public/assets/email-fad0c62b8f82e2835c1d0bdc19894257.css.gz +0 -0
  125. data/spec/railsapps/rails_40_precompiled/public/assets/manifest-8a3d16aeb2a40fe5057dd998c3edab10.json +0 -1
  126. data/spec/railsapps/rails_40_precompiled/public/assets/rails-231a680f23887d9dd70710ea5efd3c62.png +0 -0
  127. data/spec/railsapps/rails_41/Gemfile +0 -5
  128. data/spec/railsapps/rails_41/bin/rails +0 -4
  129. data/spec/railsapps/rails_41/config/application.rb +0 -13
  130. data/spec/railsapps/rails_41/config/boot.rb +0 -4
  131. data/spec/railsapps/rails_41/config/environment.rb +0 -5
  132. data/spec/railsapps/rails_41/config/environments/development.rb +0 -9
  133. data/spec/railsapps/rails_41/config/initializers/secret_token.rb +0 -1
  134. data/spec/railsapps/rails_41/config/initializers/session_store.rb +0 -1
  135. data/spec/railsapps/rails_41/config/routes.rb +0 -2
  136. 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: 23523540a5595e05e87e99d0ec6f1d051d74ab5d
4
- data.tar.gz: ced896acf8c012884325285a1a1924245f0b7be9
3
+ metadata.gz: d6b1af48e15cf35a4cc3944b04a7fce6b312c6b0
4
+ data.tar.gz: 13e9195d7c3fced4ef36a87a48ae1cb876132dfd
5
5
  SHA512:
6
- metadata.gz: 7ff9e72292f4d00ef1bc2ce60c5b179686ffb54245779fb8e361f653f9aa0c09c9a1bba83956588eaf46f409e84b7af10bdbb74df27cc1c4939ee5d93dc56ea5
7
- data.tar.gz: 530b44fd39cbc10c1ba06bdef7a553e66a57377032552d69f23e43c29cfc51e0bcda0496faf5313feeb302c5714026c1951cab8404ae41b93d1f0611600d6455
6
+ metadata.gz: e5d05a556b483d2450029585eaa7493cfc880ae12a41853ef78b4f199ee7840c1d4467b2efc2d3900738f0e477e5584c871461faafe69da2ad4a4184e65ed718
7
+ data.tar.gz: b6caa2c97ef3a25daea516fa7e0a1ad51156f48b2979b5e022ab3073438d7966add5ddad165ab6adcda1337d39f013bf1b4b2af70a4e9579565904839d8084a4
@@ -1,22 +1,22 @@
1
1
  sudo: false
2
+ dist: trusty
2
3
  language: ruby
3
4
  rvm:
4
- - 1.9.3
5
- - 2.0
6
- - 2.1
7
- - 2.2
8
- - 2.3.0
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: bundler
21
- bundler_args: --without guard
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"
@@ -1,10 +1,21 @@
1
1
  ### development version
2
2
 
3
- [full changelog](https://github.com/Mange/roadie-rails/compare/v1.1.1...master)
3
+ [full changelog](https://github.com/Mange/roadie-rails/compare/v1.2.0...master)
4
4
 
5
5
  * Nothing yet.
6
6
 
7
- ### 1.1.0
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
 
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013-2016 Magnus Bergmark, and contributors.
1
+ Copyright (c) 2013-2017 Magnus Bergmark, and contributors.
2
2
 
3
3
  MIT License
4
4
 
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.0
280
+ * MRI 2.3
281
+ * MRI 2.4
284
282
  * JRuby (latest)
285
- * Rubinius (failures on Rubinius will not fail the build due to a long history of instability in `rbx`)
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 (but only on Ruby 2.2+)
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-2016 [Magnus Bergmark](https://github.com/Mange) <magnus.bergmark@gmail.com>, et. al.
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
- sh "./setup.sh install #{RUBY_VERSION}"
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: Install gems and run specs"
14
- task :default => [:install_gems, :spec]
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.pathname} (live compiled)", asset.to_s)
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)]
@@ -1,5 +1,5 @@
1
1
  module Roadie
2
2
  module Rails
3
- VERSION = "1.1.1"
3
+ VERSION = "1.2.0"
4
4
  end
5
5
  end
@@ -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.1"
23
+ spec.add_dependency "railties", ">= 3.0", "< 5.2"
24
24
 
25
- spec.add_development_dependency "rails", ">= 3.0", "< 5.1"
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) with ruby $ruby_version"
40
-
41
- if [[ $app_path == *rails_50 ]] && [[ $ruby_version != "2.2.2" ]] && [[ $ruby_version != "2.3.0" ]]; then
42
- echo "Skipping installing gems for $(basename $app_path) because dependencies are not support for ruby version $ruby_version"
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 ""
@@ -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, sprockets3: 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.sprockets3?
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'
@@ -1,5 +1,5 @@
1
1
  source 'https://rubygems.org'
2
- gem 'rails', '4.2.0'
2
+ gem 'rails', '~> 4.2.8'
3
3
  gem 'sass-rails'
4
4
 
5
5
  gem 'roadie-rails', :path => '../../..'
@@ -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
@@ -1,6 +1,6 @@
1
1
  source 'https://rubygems.org'
2
- gem 'rails', '4.2.0'
2
+ gem 'rails', '~> 4.2.8'
3
3
  gem 'sass-rails'
4
- gem 'sprockets-rails', '3.0.0.beta2'
4
+ gem 'sprockets-rails', '~> 3.2.0'
5
5
 
6
6
  gem 'roadie-rails', :path => '../../..'
@@ -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
@@ -1,7 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'rails', '>= 5.0.0.beta3', '< 5.1'
4
- gem 'sqlite3'
3
+ gem 'rails', '~> 5.0.2'
5
4
  gem 'sass-rails'
6
5
  gem 'sprockets-rails'
7
6
 
@@ -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 'rails/all'
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 http://help.github.com/ignore-files/ for more about ignoring files.
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/*.log
16
- /tmp
11
+ /log/*
12
+ /tmp/*
13
+ !/log/.keep
14
+ !/tmp/.keep
15
+
16
+ # Ignore Byebug command history file.
17
+ .byebug_history
@@ -0,0 +1,8 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'rails', '~> 5.1.0'
4
+ gem 'sass-rails'
5
+ gem 'sprockets-rails'
6
+ gem 'listen'
7
+
8
+ gem 'roadie-rails', path: '../../..'
@@ -0,0 +1,2 @@
1
+ body { background-color: green; }
2
+ .image { background: image-url("rails.png"); }
@@ -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
@@ -0,0 +1,11 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
5
+ <%= stylesheet_link_tag "email" %>
6
+ </head>
7
+ <body>
8
+ <h1>Normal email</h1>
9
+ <div class="image"></div>
10
+ </body>
11
+ </html>