railties 4.1.0 → 4.2.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +229 -197
  3. data/RDOC_MAIN.rdoc +1 -1
  4. data/README.rdoc +6 -2
  5. data/lib/rails/all.rb +1 -0
  6. data/lib/rails/api/task.rb +7 -0
  7. data/lib/rails/app_rails_loader.rb +5 -3
  8. data/lib/rails/application/bootstrap.rb +15 -1
  9. data/lib/rails/application/configuration.rb +65 -8
  10. data/lib/rails/application/default_middleware_stack.rb +6 -2
  11. data/lib/rails/application/finisher.rb +0 -2
  12. data/lib/rails/application.rb +119 -24
  13. data/lib/rails/backtrace_cleaner.rb +9 -4
  14. data/lib/rails/code_statistics.rb +3 -4
  15. data/lib/rails/commands/commands_tasks.rb +2 -7
  16. data/lib/rails/commands/console.rb +24 -12
  17. data/lib/rails/commands/dbconsole.rb +20 -5
  18. data/lib/rails/commands/destroy.rb +2 -0
  19. data/lib/rails/commands/generate.rb +2 -0
  20. data/lib/rails/commands/plugin.rb +1 -1
  21. data/lib/rails/commands/server.rb +32 -21
  22. data/lib/rails/configuration.rb +2 -2
  23. data/lib/rails/engine/configuration.rb +1 -1
  24. data/lib/rails/engine.rb +15 -12
  25. data/lib/rails/gem_version.rb +2 -2
  26. data/lib/rails/generators/actions/create_migration.rb +4 -3
  27. data/lib/rails/generators/actions.rb +33 -12
  28. data/lib/rails/generators/app_base.rb +63 -55
  29. data/lib/rails/generators/base.rb +2 -2
  30. data/lib/rails/generators/erb/mailer/mailer_generator.rb +25 -2
  31. data/lib/rails/generators/erb/mailer/templates/layout.html.erb +5 -0
  32. data/lib/rails/generators/erb/mailer/templates/layout.text.erb +1 -0
  33. data/lib/rails/generators/erb/scaffold/templates/_form.html.erb +1 -6
  34. data/lib/rails/generators/erb/scaffold/templates/edit.html.erb +1 -1
  35. data/lib/rails/generators/erb/scaffold/templates/index.html.erb +3 -1
  36. data/lib/rails/generators/erb/scaffold/templates/new.html.erb +1 -1
  37. data/lib/rails/generators/generated_attribute.rb +28 -4
  38. data/lib/rails/generators/model_helpers.rb +28 -0
  39. data/lib/rails/generators/named_base.rb +10 -1
  40. data/lib/rails/generators/rails/app/app_generator.rb +34 -2
  41. data/lib/rails/generators/rails/app/templates/Gemfile +22 -7
  42. data/lib/rails/generators/rails/app/templates/app/assets/javascripts/application.js.tt +2 -2
  43. data/lib/rails/generators/rails/app/templates/app/assets/stylesheets/application.css +1 -1
  44. data/lib/rails/generators/rails/app/templates/bin/rails +1 -1
  45. data/lib/rails/generators/rails/app/templates/bin/setup +28 -0
  46. data/lib/rails/generators/rails/app/templates/config/application.rb +8 -1
  47. data/lib/rails/generators/rails/app/templates/config/boot.rb +1 -2
  48. data/lib/rails/generators/rails/app/templates/config/databases/ibm_db.yml +1 -3
  49. data/lib/rails/generators/rails/app/templates/config/databases/oracle.yml +1 -1
  50. data/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt +4 -0
  51. data/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt +14 -20
  52. data/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt +5 -2
  53. data/lib/rails/generators/rails/app/templates/config/initializers/assets.rb.tt +11 -0
  54. data/lib/rails/generators/rails/app/templates/config/initializers/cookies_serializer.rb +1 -1
  55. data/lib/rails/generators/rails/app/templates/config/initializers/to_time_preserves_timezone.rb +10 -0
  56. data/lib/rails/generators/rails/app/templates/config.ru +1 -1
  57. data/lib/rails/generators/rails/app/templates/gitignore +4 -1
  58. data/lib/rails/generators/rails/app/templates/test/test_helper.rb +0 -3
  59. data/lib/rails/generators/rails/controller/USAGE +0 -1
  60. data/lib/rails/generators/rails/controller/controller_generator.rb +8 -4
  61. data/lib/rails/generators/rails/helper/USAGE +0 -4
  62. data/lib/rails/generators/rails/model/USAGE +12 -3
  63. data/lib/rails/generators/rails/model/model_generator.rb +4 -0
  64. data/lib/rails/generators/rails/plugin/plugin_generator.rb +23 -1
  65. data/lib/rails/generators/rails/plugin/templates/%name%.gemspec +3 -3
  66. data/lib/rails/generators/rails/plugin/templates/Gemfile +14 -6
  67. data/lib/rails/generators/rails/plugin/templates/MIT-LICENSE +1 -1
  68. data/lib/rails/generators/rails/plugin/templates/Rakefile +4 -0
  69. data/lib/rails/generators/rails/plugin/templates/app/controllers/%name%/application_controller.rb.tt +1 -0
  70. data/lib/rails/generators/rails/plugin/templates/rails/application.rb +1 -1
  71. data/lib/rails/generators/rails/plugin/templates/rails/javascripts.js +2 -2
  72. data/lib/rails/generators/rails/plugin/templates/rails/stylesheets.css +1 -1
  73. data/lib/rails/generators/rails/plugin/templates/test/integration/navigation_test.rb +0 -4
  74. data/lib/rails/generators/rails/plugin/templates/test/test_helper.rb +13 -3
  75. data/lib/rails/generators/rails/resource_route/resource_route_generator.rb +4 -2
  76. data/lib/rails/generators/rails/scaffold/USAGE +7 -1
  77. data/lib/rails/generators/rails/scaffold_controller/scaffold_controller_generator.rb +1 -0
  78. data/lib/rails/generators/rails/scaffold_controller/templates/controller.rb +1 -1
  79. data/lib/rails/generators/resource_helpers.rb +2 -11
  80. data/lib/rails/generators/test_unit/controller/templates/functional_test.rb +6 -0
  81. data/lib/rails/generators/test_unit/helper/helper_generator.rb +1 -5
  82. data/lib/rails/generators/test_unit/job/job_generator.rb +13 -0
  83. data/lib/rails/generators/test_unit/job/templates/unit_test.rb.erb +9 -0
  84. data/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb +9 -0
  85. data/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb +4 -1
  86. data/lib/rails/generators/testing/assertions.rb +3 -1
  87. data/lib/rails/generators/testing/behaviour.rb +18 -1
  88. data/lib/rails/generators.rb +66 -15
  89. data/lib/rails/info.rb +8 -24
  90. data/lib/rails/info_controller.rb +1 -1
  91. data/lib/rails/mailers_controller.rb +20 -14
  92. data/lib/rails/paths.rb +3 -3
  93. data/lib/rails/rack/log_tailer.rb +4 -0
  94. data/lib/rails/rack/logger.rb +1 -1
  95. data/lib/rails/rack.rb +1 -1
  96. data/lib/rails/railtie.rb +3 -3
  97. data/lib/rails/ruby_version_check.rb +1 -1
  98. data/lib/rails/source_annotation_extractor.rb +25 -19
  99. data/lib/rails/tasks/framework.rake +2 -2
  100. data/lib/rails/tasks/statistics.rake +9 -2
  101. data/lib/rails/tasks.rb +3 -2
  102. data/lib/rails/templates/rails/mailers/email.html.erb +22 -4
  103. data/lib/rails/templates/rails/mailers/index.html.erb +2 -2
  104. data/lib/rails/templates/rails/mailers/mailer.html.erb +1 -1
  105. data/lib/rails/templates/rails/welcome/index.html.erb +23 -7
  106. data/lib/rails/test_help.rb +1 -0
  107. data/lib/rails/test_unit/sub_test_task.rb +2 -2
  108. data/lib/rails/test_unit/testing.rake +23 -5
  109. data/lib/rails.rb +7 -1
  110. metadata +17 -12
  111. data/lib/rails/commands/update.rb +0 -9
  112. data/lib/rails/generators/test_unit/helper/templates/helper_test.rb +0 -6
  113. data/lib/rails/rubyprof_ext.rb +0 -35
data/lib/rails/info.rb CHANGED
@@ -1,6 +1,9 @@
1
1
  require "cgi"
2
2
 
3
3
  module Rails
4
+ # This module helps build the runtime properties used to display in the
5
+ # Rails::InfoController responses. Including the active Rails version, Ruby
6
+ # version, Rack version, and so on.
4
7
  module Info
5
8
  mattr_accessor :properties
6
9
  class << (@@properties = [])
@@ -22,17 +25,6 @@ module Rails
22
25
  rescue Exception
23
26
  end
24
27
 
25
- def frameworks
26
- %w( active_record action_pack action_view action_mailer active_support )
27
- end
28
-
29
- def framework_version(framework)
30
- if Object.const_defined?(framework.classify)
31
- require "#{framework}/version"
32
- framework.classify.constantize.version.to_s
33
- end
34
- end
35
-
36
28
  def to_s
37
29
  column_width = properties.names.map {|name| name.length}.max
38
30
  info = properties.map do |name, value|
@@ -61,6 +53,11 @@ module Rails
61
53
  end
62
54
  end
63
55
 
56
+ # The Rails version.
57
+ property 'Rails version' do
58
+ Rails.version.to_s
59
+ end
60
+
64
61
  # The Ruby version and platform, e.g. "2.0.0-p247 (x86_64-darwin12.4.0)".
65
62
  property 'Ruby version' do
66
63
  "#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} (#{RUBY_PLATFORM})"
@@ -75,23 +72,10 @@ module Rails
75
72
  ::Rack.release
76
73
  end
77
74
 
78
- # The Rails version.
79
- property 'Rails version' do
80
- Rails.version.to_s
81
- end
82
-
83
75
  property 'JavaScript Runtime' do
84
76
  ExecJS.runtime.name
85
77
  end
86
78
 
87
- # Versions of each Rails framework (Active Record, Action Pack,
88
- # Action Mailer, and Active Support).
89
- frameworks.each do |framework|
90
- property "#{framework.titlecase} version" do
91
- framework_version(framework)
92
- end
93
- end
94
-
95
79
  property 'Middleware' do
96
80
  Rails.configuration.middleware.map(&:inspect)
97
81
  end
@@ -5,7 +5,7 @@ class Rails::InfoController < Rails::ApplicationController # :nodoc:
5
5
  prepend_view_path ActionDispatch::DebugExceptions::RESCUES_TEMPLATE_PATH
6
6
  layout -> { request.xhr? ? false : 'application' }
7
7
 
8
- before_filter :require_local!
8
+ before_action :require_local!
9
9
 
10
10
  def index
11
11
  redirect_to action: :routes
@@ -3,8 +3,8 @@ require 'rails/application_controller'
3
3
  class Rails::MailersController < Rails::ApplicationController # :nodoc:
4
4
  prepend_view_path ActionDispatch::DebugExceptions::RESCUES_TEMPLATE_PATH
5
5
 
6
- before_filter :require_local!
7
- before_filter :find_preview, only: :preview
6
+ before_action :require_local!, unless: :show_previews?
7
+ before_action :find_preview, only: :preview
8
8
 
9
9
  def index
10
10
  @previews = ActionMailer::Preview.all
@@ -16,10 +16,10 @@ class Rails::MailersController < Rails::ApplicationController # :nodoc:
16
16
  @page_title = "Mailer Previews for #{@preview.preview_name}"
17
17
  render action: 'mailer'
18
18
  else
19
- email = File.basename(params[:path])
19
+ @email_action = File.basename(params[:path])
20
20
 
21
- if @preview.email_exists?(email)
22
- @email = @preview.call(email)
21
+ if @preview.email_exists?(@email_action)
22
+ @email = @preview.call(@email_action)
23
23
 
24
24
  if params[:part]
25
25
  part_type = Mime::Type.lookup(params[:part])
@@ -28,19 +28,23 @@ class Rails::MailersController < Rails::ApplicationController # :nodoc:
28
28
  response.content_type = part_type
29
29
  render text: part.respond_to?(:decoded) ? part.decoded : part
30
30
  else
31
- raise AbstractController::ActionNotFound, "Email part '#{part_type}' not found in #{@preview.name}##{email}"
31
+ raise AbstractController::ActionNotFound, "Email part '#{part_type}' not found in #{@preview.name}##{@email_action}"
32
32
  end
33
33
  else
34
34
  @part = find_preferred_part(request.format, Mime::HTML, Mime::TEXT)
35
35
  render action: 'email', layout: false, formats: %w[html]
36
36
  end
37
37
  else
38
- raise AbstractController::ActionNotFound, "Email '#{email}' not found in #{@preview.name}"
38
+ raise AbstractController::ActionNotFound, "Email '#{@email_action}' not found in #{@preview.name}"
39
39
  end
40
40
  end
41
41
  end
42
42
 
43
43
  protected
44
+ def show_previews?
45
+ ActionMailer::Base.show_previews
46
+ end
47
+
44
48
  def find_preview
45
49
  candidates = []
46
50
  params[:path].to_s.scan(%r{/|$}){ candidates << $` }
@@ -54,20 +58,22 @@ class Rails::MailersController < Rails::ApplicationController # :nodoc:
54
58
  end
55
59
 
56
60
  def find_preferred_part(*formats)
57
- if @email.multipart?
58
- formats.each do |format|
59
- return find_part(format) if @email.parts.any?{ |p| p.mime_type == format }
61
+ formats.each do |format|
62
+ if part = @email.find_first_mime_type(format)
63
+ return part
60
64
  end
61
- else
65
+ end
66
+
67
+ if formats.any?{ |f| @email.mime_type == f }
62
68
  @email
63
69
  end
64
70
  end
65
71
 
66
72
  def find_part(format)
67
- if @email.multipart?
68
- @email.parts.find{ |p| p.mime_type == format }
73
+ if part = @email.find_first_mime_type(format)
74
+ part
69
75
  elsif @email.mime_type == format
70
76
  @email
71
77
  end
72
78
  end
73
- end
79
+ end
data/lib/rails/paths.rb CHANGED
@@ -101,7 +101,7 @@ module Rails
101
101
  def filter_by(&block)
102
102
  all_paths.find_all(&block).flat_map { |path|
103
103
  paths = path.existent
104
- paths - path.children.map { |p| yield(p) ? [] : p.existent }.flatten
104
+ paths - path.children.flat_map { |p| yield(p) ? [] : p.existent }
105
105
  }.uniq
106
106
  end
107
107
  end
@@ -167,8 +167,8 @@ module Rails
167
167
  @paths.concat paths
168
168
  end
169
169
 
170
- def unshift(path)
171
- @paths.unshift path
170
+ def unshift(*paths)
171
+ @paths.unshift(*paths)
172
172
  end
173
173
 
174
174
  def to_ary
@@ -1,7 +1,11 @@
1
+ require 'active_support/deprecation'
2
+
1
3
  module Rails
2
4
  module Rack
3
5
  class LogTailer
4
6
  def initialize(app, log = nil)
7
+ ActiveSupport::Deprecation.warn('LogTailer is deprecated and will be removed on Rails 5.')
8
+
5
9
  @app = app
6
10
 
7
11
  path = Pathname.new(log || "#{::File.expand_path(Rails.root)}/log/#{Rails.env}.log").cleanpath
@@ -34,7 +34,7 @@ module Rails
34
34
 
35
35
  instrumenter = ActiveSupport::Notifications.instrumenter
36
36
  instrumenter.start 'request.action_dispatch', request: request
37
- logger.info started_request_message(request)
37
+ logger.info { started_request_message(request) }
38
38
  resp = @app.call(env)
39
39
  resp[2] = ::Rack::BodyProxy.new(resp[2]) { finish(request) }
40
40
  resp
data/lib/rails/rack.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Rails
2
2
  module Rack
3
- autoload :Debugger, "rails/rack/debugger"
3
+ autoload :Debugger, "rails/rack/debugger" if RUBY_VERSION < '2.0.0'
4
4
  autoload :Logger, "rails/rack/logger"
5
5
  autoload :LogTailer, "rails/rack/log_tailer"
6
6
  end
data/lib/rails/railtie.rb CHANGED
@@ -93,7 +93,7 @@ module Rails
93
93
  # end
94
94
  # end
95
95
  #
96
- # By default, Rails load generators from your load path. However, if you want to place
96
+ # By default, Rails loads generators from your load path. However, if you want to place
97
97
  # your generators at a different location, you can specify in your Railtie a block which
98
98
  # will load them during normal generators lookup:
99
99
  #
@@ -183,8 +183,8 @@ module Rails
183
183
  end
184
184
 
185
185
  protected
186
- def generate_railtie_name(class_or_module)
187
- ActiveSupport::Inflector.underscore(class_or_module).tr("/", "_")
186
+ def generate_railtie_name(string)
187
+ ActiveSupport::Inflector.underscore(string).tr("/", "_")
188
188
  end
189
189
 
190
190
  # If the class method does not have a method, then send the method call
@@ -2,7 +2,7 @@ if RUBY_VERSION < '1.9.3'
2
2
  desc = defined?(RUBY_DESCRIPTION) ? RUBY_DESCRIPTION : "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE})"
3
3
  abort <<-end_message
4
4
 
5
- Rails 4 prefers to run on Ruby 2.0.
5
+ Rails 4 prefers to run on Ruby 2.1 or newer.
6
6
 
7
7
  You're running
8
8
  #{desc}
@@ -18,6 +18,20 @@ class SourceAnnotationExtractor
18
18
  @@directories ||= %w(app config db lib test) + (ENV['SOURCE_ANNOTATION_DIRECTORIES'] || '').split(',')
19
19
  end
20
20
 
21
+ def self.extensions
22
+ @@extensions ||= {}
23
+ end
24
+
25
+ # Registers new Annotations File Extensions
26
+ # SourceAnnotationExtractor::Annotation.register_extensions("css", "scss", "sass", "less", "js") { |tag| /\/\/\s*(#{tag}):?\s*(.*)$/ }
27
+ def self.register_extensions(*exts, &block)
28
+ extensions[/\.(#{exts.join("|")})$/] = block
29
+ end
30
+
31
+ register_extensions("builder", "rb", "rake", "yml", "yaml", "ruby") { |tag| /#\s*(#{tag}):?\s*(.*)$/ }
32
+ register_extensions("css", "js") { |tag| /\/\/\s*(#{tag}):?\s*(.*)$/ }
33
+ register_extensions("erb") { |tag| /<%\s*#\s*(#{tag}):?\s*(.*?)\s*%>/ }
34
+
21
35
  # Returns a representation of the annotation that looks like this:
22
36
  #
23
37
  # [126] [TODO] This algorithm is simple and clearly correct, make it faster.
@@ -66,9 +80,8 @@ class SourceAnnotationExtractor
66
80
 
67
81
  # Returns a hash that maps filenames under +dir+ (recursively) to arrays
68
82
  # with their annotations. Only files with annotations are included. Files
69
- # with extension +.builder+, +.rb+, +.erb+, +.haml+, +.slim+, +.css+,
70
- # +.scss+, +.js+, +.coffee+, +.rake+, +.sass+ and +.less+
71
- # are taken into account.
83
+ # with extension +.builder+, +.rb+, +.rake+, +.yml+, +.yaml+, +.ruby+,
84
+ # +.css+, +.js+ and +.erb+ are taken into account.
72
85
  def find_in(dir)
73
86
  results = {}
74
87
 
@@ -78,21 +91,14 @@ class SourceAnnotationExtractor
78
91
  if File.directory?(item)
79
92
  results.update(find_in(item))
80
93
  else
81
- pattern =
82
- case item
83
- when /\.(builder|rb|coffee|rake)$/
84
- /#\s*(#{tag}):?\s*(.*)$/
85
- when /\.(css|scss|sass|less|js)$/
86
- /\/\/\s*(#{tag}):?\s*(.*)$/
87
- when /\.erb$/
88
- /<%\s*#\s*(#{tag}):?\s*(.*?)\s*%>/
89
- when /\.haml$/
90
- /-\s*#\s*(#{tag}):?\s*(.*)$/
91
- when /\.slim$/
92
- /\/\s*\s*(#{tag}):?\s*(.*)$/
93
- else nil
94
- end
95
- results.update(extract_annotations_from(item, pattern)) if pattern
94
+ extension = Annotation.extensions.detect do |regexp, _block|
95
+ regexp.match(item)
96
+ end
97
+
98
+ if extension
99
+ pattern = extension.last.call(tag)
100
+ results.update(extract_annotations_from(item, pattern)) if pattern
101
+ end
96
102
  end
97
103
  end
98
104
 
@@ -115,7 +121,7 @@ class SourceAnnotationExtractor
115
121
  # Prints the mapping from filenames to annotations in +results+ ordered by filename.
116
122
  # The +options+ hash is passed to each annotation's +to_s+.
117
123
  def display(results, options={})
118
- options[:indent] = results.map { |f, a| a.map(&:line) }.flatten.max.to_s.size
124
+ options[:indent] = results.flat_map { |f, a| a.map(&:line) }.max.to_s.size
119
125
  results.keys.sort.each do |file|
120
126
  puts "#{file}:"
121
127
  results[file].each do |note|
@@ -3,7 +3,7 @@ namespace :rails do
3
3
  task update: [ "update:configs", "update:bin" ]
4
4
 
5
5
  desc "Applies the template supplied by LOCATION=(/path/to/template) or URL"
6
- task :template do
6
+ task template: :environment do
7
7
  template = ENV["LOCATION"]
8
8
  raise "No LOCATION value given. Please set LOCATION either as path to a file or a URL" if template.blank?
9
9
  template = File.expand_path(template) if template !~ %r{\A[A-Za-z][A-Za-z0-9+\-\.]*://}
@@ -55,7 +55,7 @@ namespace :rails do
55
55
  # desc "Update config/boot.rb from your current rails install"
56
56
  task :configs do
57
57
  invoke_from_app_generator :create_boot_file
58
- invoke_from_app_generator :create_config_files
58
+ invoke_from_app_generator :update_config_files
59
59
  end
60
60
 
61
61
  # desc "Adds new executables to the application bin/ directory"
@@ -1,6 +1,10 @@
1
+ # while having global constant is not good,
2
+ # many 3rd party tools depend on it, like rspec-rails, cucumber-rails, etc
3
+ # so if will be removed - deprecation warning is needed
1
4
  STATS_DIRECTORIES = [
2
5
  %w(Controllers app/controllers),
3
6
  %w(Helpers app/helpers),
7
+ %w(Jobs app/jobs),
4
8
  %w(Models app/models),
5
9
  %w(Mailers app/mailers),
6
10
  %w(Javascripts app/assets/javascripts),
@@ -10,12 +14,15 @@ STATS_DIRECTORIES = [
10
14
  %w(Helper\ tests test/helpers),
11
15
  %w(Model\ tests test/models),
12
16
  %w(Mailer\ tests test/mailers),
17
+ %w(Job\ tests test/jobs),
13
18
  %w(Integration\ tests test/integration),
14
19
  %w(Functional\ tests\ (old) test/functional),
15
20
  %w(Unit\ tests \ (old) test/unit)
16
- ].collect { |name, dir| [ name, "#{Rails.root}/#{dir}" ] }.select { |name, dir| File.directory?(dir) }
21
+ ].collect do |name, dir|
22
+ [ name, "#{File.dirname(Rake.application.rakefile_location)}/#{dir}" ]
23
+ end.select { |name, dir| File.directory?(dir) }
17
24
 
18
- desc "Report code statistics (KLOCs, etc) from the application"
25
+ desc "Report code statistics (KLOCs, etc) from the application or engine"
19
26
  task :stats do
20
27
  require 'rails/code_statistics'
21
28
  CodeStatistics.new(*STATS_DIRECTORIES).to_s
data/lib/rails/tasks.rb CHANGED
@@ -7,8 +7,9 @@
7
7
  middleware
8
8
  misc
9
9
  routes
10
- statistics
11
10
  tmp
12
- ).each do |task|
11
+ ).tap { |arr|
12
+ arr << 'statistics' if Rake.application.current_scope.empty?
13
+ }.each do |task|
13
14
  load "rails/tasks/#{task}.rake"
14
15
  end
@@ -2,6 +2,14 @@
2
2
  <html><head>
3
3
  <meta name="viewport" content="width=device-width" />
4
4
  <style type="text/css">
5
+ html, body, iframe {
6
+ height: 100%;
7
+ }
8
+
9
+ body {
10
+ margin: 0;
11
+ }
12
+
5
13
  header {
6
14
  width: 100%;
7
15
  padding: 10px 0 0 0;
@@ -31,10 +39,13 @@
31
39
  padding: 1px;
32
40
  }
33
41
 
42
+ dd:empty:before {
43
+ content: "\00a0"; // &nbsp;
44
+ }
45
+
34
46
  iframe {
35
47
  border: 0;
36
48
  width: 100%;
37
- height: 800px;
38
49
  }
39
50
  </style>
40
51
  </head>
@@ -77,7 +88,7 @@
77
88
  <% unless @email.attachments.nil? || @email.attachments.empty? %>
78
89
  <dt>Attachments:</dt>
79
90
  <dd>
80
- <%= @email.attachments.map { |a| a.respond_to?(:original_filename) ? a.original_filename : a.filename }.inspect %>
91
+ <%= @email.attachments.map { |a| a.respond_to?(:original_filename) ? a.original_filename : a.filename }.join(', ') %>
81
92
  </dd>
82
93
  <% end %>
83
94
 
@@ -92,7 +103,14 @@
92
103
  </dl>
93
104
  </header>
94
105
 
95
- <iframe seamless name="messageBody" src="?part=<%= Rack::Utils.escape(@part.mime_type) %>"></iframe>
106
+ <% if @part && @part.mime_type %>
107
+ <iframe seamless name="messageBody" src="?part=<%= Rack::Utils.escape(@part.mime_type) %>"></iframe>
108
+ <% else %>
109
+ <p>
110
+ You are trying to preview an email that does not have any content.
111
+ This is probably because the <em>mail</em> method has not been called in <em><%= @preview.preview_name %>#<%= @email_action %></em>.
112
+ </p>
113
+ <% end %>
96
114
 
97
115
  </body>
98
- </html>
116
+ </html>
@@ -1,8 +1,8 @@
1
1
  <% @previews.each do |preview| %>
2
- <h3><%= link_to preview.preview_name.titleize, "/rails/mailers/#{preview.preview_name}" %></h3>
2
+ <h3><%= link_to preview.preview_name.titleize, url_for(controller: "rails/mailers", action: "preview", path: preview.preview_name) %></h3>
3
3
  <ul>
4
4
  <% preview.emails.each do |email| %>
5
- <li><%= link_to email, "/rails/mailers/#{preview.preview_name}/#{email}" %></li>
5
+ <li><%= link_to email, url_for(controller: "rails/mailers", action: "preview", path: "#{preview.preview_name}/#{email}") %></li>
6
6
  <% end %>
7
7
  </ul>
8
8
  <% end %>
@@ -1,6 +1,6 @@
1
1
  <h3><%= @preview.preview_name.titleize %></h3>
2
2
  <ul>
3
3
  <% @preview.emails.each do |email| %>
4
- <li><%= link_to email, "/rails/mailers/#{@preview.preview_name}/#{email}" %></li>
4
+ <li><%= link_to email, url_for(controller: "rails/mailers", action: "preview", path: "#{@preview.preview_name}/#{email}") %></li>
5
5
  <% end %>
6
6
  </ul>
@@ -19,13 +19,13 @@
19
19
  }
20
20
 
21
21
  a {color: #03c}
22
+
22
23
  a:hover {
23
24
  background-color: #03c;
24
25
  color: white;
25
26
  text-decoration: none;
26
27
  }
27
28
 
28
-
29
29
  #page {
30
30
  background-color: #f0f0f0;
31
31
  width: 750px;
@@ -57,21 +57,21 @@
57
57
  padding-right: 30px;
58
58
  }
59
59
 
60
-
61
60
  #header {
62
61
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABACAYAAABY1SR7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAGZhJREFUeNqsWwmUXGWV/t5Sr9aurl6qO0l3Z9/DEoJh18gZQGAUxPHIyQHH7eioZ8bjnAFHZ0RndNxxRBhGcUbxoKIHBkTEcUYREIHIGpKQjUDS6U660/tSVV3Lq/fefPf/Xy2dBFGYx3npqvde/e/e/97v3u/e/8e4Lt2L8DCCAFcGwF8ZBjYbgM1rAZoO+WLwZhDMu9y4+YcOozbAqzwXNA3GdzX/5hV+KnKO2+GXFj/AvzmW8e72iG202CYiphbY403f9/k3QHZtJ9oWtyCQe7wGX79TKVb7rP9pXJPDVxf0Rz+oyxm4HNWrahFNixdk3EAJbERMWOm4ulctVODNVeEVK0DeRVDgb1wfJgcqUo6duaKnFO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QyfKXxbpejl133omfXfth7P/Fz8NRLbXgb0nGNe26GhGST5MzFmEYll2oCl+sd2IZCcWtTKxd6rokwdYVpyK9fB1z1KnIrD0NDt1WiNGB738X3kxJVapiWVmR5pCurc2iSaIkmNJ0Hr+9+WYkMu0YfHI7Dv9+J+766Eew8vSNiFP4WGsGBanhh6bw1K3fRjSdwfSel5FikTT67At4+t9vgVssojA0Rp6VwOyhfjx9262qABrfw1KaJW15YprXvsVcEG1sT5eCji40fXSURVyAvTd9TSmv6nTVifQx/uwzmHiU7kb3Clu+GC27MsY247p07+SihN0m/Kgc6EXRIjmMgDvCF9mcsXJxDgniZSnN3xFLIcc6Yormd1mhCX2QpWc7SteolNUpNUQkIUvJpDkUrsrfqy1L8ZjaFSTrJKLsCbvz6BqxaBwdBReWbJmF3kTa2NYRVYFGHEYKqqFKFXtzMg6uUhaJyzZyQ/d/FdUm8LwmAuYwO/vhQBU+m+ddmy+NpBKNWpIzF7EdRSxrOygMMl6LruUw2tQXOTy1akNFk/XtU/V70H3g6YyNNk5GtOIp/DYvlKp9LoJLWuIl2fADfJ/X71PQ8Jo2Vzbv620OAFI9jtIqCQ7tnfC/JxhNT4dShds4UKvB66s1ftPnRqOh/l13hDDqWGhxqUgTsIV1Fzg5Y7TEpKsK+B/w+sdqUWuqv1CxUN8K/MqHLMnhj/g/J/4/juDky9VSg0kh/zQj322897Pao/8nwAC+AZicLeuzngAAAABJRU5ErkJggg==);
63
62
  background-repeat: no-repeat;
64
63
  background-position: top left;
65
64
  height: 64px;
66
65
  }
66
+
67
67
  #header h1, #header h2 {margin: 0}
68
+
68
69
  #header h2 {
69
70
  color: #888;
70
71
  font-weight: normal;
71
72
  font-size: 16px;
72
73
  }
73
74
 
74
-
75
75
  #about h3 {
76
76
  margin: 0;
77
77
  margin-bottom: 10px;
@@ -84,18 +84,26 @@
84
84
  margin-left: -55px;
85
85
  margin-right: -10px;
86
86
  }
87
+
87
88
  #about-content table {
88
89
  margin-top: 10px;
89
90
  margin-bottom: 10px;
90
91
  font-size: 11px;
91
92
  border-collapse: collapse;
92
93
  }
94
+
93
95
  #about-content td {
94
96
  padding: 10px;
95
97
  padding-top: 3px;
96
98
  padding-bottom: 3px;
97
99
  }
98
- #about-content td.name {color: #555}
100
+
101
+ #about-content td.name {
102
+ font-weight: bold;
103
+ vertical-align: top;
104
+ color: #555;
105
+ }
106
+
99
107
  #about-content td.value {color: #000}
100
108
 
101
109
  #about-content ul {
@@ -107,21 +115,23 @@
107
115
  background-color: #fcc;
108
116
  border: 1px solid #f00;
109
117
  }
118
+
110
119
  #about-content.failure p {
111
120
  margin: 0;
112
121
  padding: 10px;
113
122
  }
114
123
 
115
-
116
124
  #getting-started {
117
125
  border-top: 1px solid #ccc;
118
126
  margin-top: 25px;
119
127
  padding-top: 15px;
120
128
  }
129
+
121
130
  #getting-started h1 {
122
131
  margin: 0;
123
132
  font-size: 20px;
124
133
  }
134
+
125
135
  #getting-started h2 {
126
136
  margin: 0;
127
137
  font-size: 14px;
@@ -129,40 +139,46 @@
129
139
  color: #333;
130
140
  margin-bottom: 25px;
131
141
  }
142
+
132
143
  #getting-started ol {
133
144
  margin-left: 0;
134
145
  padding-left: 0;
135
146
  }
147
+
136
148
  #getting-started li {
137
149
  font-size: 18px;
138
150
  color: #888;
139
151
  margin-bottom: 25px;
140
152
  }
153
+
141
154
  #getting-started li h2 {
142
155
  margin: 0;
143
156
  font-weight: normal;
144
157
  font-size: 18px;
145
158
  color: #333;
146
159
  }
160
+
147
161
  #getting-started li p {
148
162
  color: #555;
149
163
  font-size: 13px;
150
164
  }
151
165
 
152
-
153
166
  #sidebar ul {
154
167
  margin-left: 0;
155
168
  padding-left: 0;
156
169
  }
170
+
157
171
  #sidebar ul h3 {
158
172
  margin-top: 25px;
159
173
  font-size: 16px;
160
174
  padding-bottom: 10px;
161
175
  border-bottom: 1px solid #ccc;
162
176
  }
177
+
163
178
  #sidebar li {
164
179
  list-style-type: none;
165
180
  }
181
+
166
182
  #sidebar ul.links li {
167
183
  margin-bottom: 5px;
168
184
  }
@@ -221,7 +237,7 @@
221
237
 
222
238
  <ol>
223
239
  <li>
224
- <h2>Use <code>rails generate</code> to create your models and controllers</h2>
240
+ <h2>Use <code>bin/rails generate</code> to create your models and controllers</h2>
225
241
  <p>To see all available options, run it without parameters.</p>
226
242
  </li>
227
243
 
@@ -4,6 +4,7 @@ abort("Abort testing: Your Rails environment is running in production mode!") if
4
4
 
5
5
  require 'active_support/testing/autorun'
6
6
  require 'active_support/test_case'
7
+ require 'action_controller'
7
8
  require 'action_controller/test_case'
8
9
  require 'action_dispatch/testing/integration'
9
10
  require 'rails/generators/test_case'
@@ -7,7 +7,7 @@ module Rails
7
7
  #
8
8
  # This class takes a TestInfo class and defines the appropriate rake task
9
9
  # based on the information, then invokes it.
10
- class TestCreator
10
+ class TestCreator # :nodoc:
11
11
  def initialize(info)
12
12
  @info = info
13
13
  end
@@ -41,7 +41,7 @@ module Rails
41
41
  # to test files (or can be transformed into test files). Calling <tt>files</tt>
42
42
  # provides the set of test files and is used when initializing tests after
43
43
  # a call to <tt>rake test</tt>.
44
- class TestInfo
44
+ class TestInfo # :nodoc:
45
45
  def initialize(tasks)
46
46
  @tasks = tasks
47
47
  @files = nil