railties 4.2.0.beta3 → 4.2.0.beta4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d972f0957eb28d32a58ad8fb2e4e96f853263bf2
4
- data.tar.gz: 5a69d1a60ac4a69a1c554a7a09f4fa401100e118
3
+ metadata.gz: 0762e4948920f6a4982be97cdf7941b8fba50810
4
+ data.tar.gz: afc9c44925b92fadaea2e6556f6ae29707dc98d7
5
5
  SHA512:
6
- metadata.gz: c919e20c5d95231e9417ea626c02de6ba9f44d76b056ab05c7551b8a72739c12892ad8e4074aa002cdd1f190557b895c94589fc4106c90a142060bd4242774b7
7
- data.tar.gz: bce251eaaced259b6275c2dd9c7aeaf027ae9b057b9982c4dbe30b39dc076ef94cd0e3887662148fa8cfb01152f37cd1b1149638ecb874a3a47a96ece304fc56
6
+ metadata.gz: 7f52cbcfea3201647694b0ff274dc56e84c226676f923af1525f6e35fa48696a64a815b5da8d07aa0d9bdc15a38c91dec7ca51371e8a559b4dd510eb34802190
7
+ data.tar.gz: 8ff73da75dda716b4f5218ee127129b382ae5bd2256debfa897d3a340f127d1fd13398aeab17a0af7e2b5b6e59f8b33eb5fa636580576fd9ec780245a1d69b54
@@ -1,4 +1,4 @@
1
- * Remove --skip-action-view option from Rails::Generators::AppBase
1
+ * Remove `--skip-action-view` option from `Rails::Generators::AppBase`.
2
2
 
3
3
  Fixes #17023.
4
4
 
@@ -89,13 +89,7 @@
89
89
 
90
90
  *Rafael Mendonça França*
91
91
 
92
- * Add a generic --skip-gems options to generator
93
-
94
- This option is useful if users want to remove some gems like jbuilder,
95
- turbolinks, coffee-rails, etc that don't have specific options on the
96
- generator.
97
-
98
- rails new my_app --skip-gems turbolinks coffee-rails
92
+ * Add a generic --skip-turbolinks options to generator.
99
93
 
100
94
  *Rafael Mendonça França*
101
95
 
@@ -4,12 +4,16 @@ module Rails
4
4
  class BacktraceCleaner < ActiveSupport::BacktraceCleaner
5
5
  APP_DIRS_PATTERN = /^\/?(app|config|lib|test)/
6
6
  RENDER_TEMPLATE_PATTERN = /:in `_render_template_\w*'/
7
+ EMPTY_STRING = ''.freeze
8
+ SLASH = '/'.freeze
9
+ DOT_SLASH = './'.freeze
7
10
 
8
11
  def initialize
9
12
  super
10
- add_filter { |line| line.sub("#{Rails.root}/", '') }
11
- add_filter { |line| line.sub(RENDER_TEMPLATE_PATTERN, '') }
12
- add_filter { |line| line.sub('./', '/') } # for tests
13
+ @root = "#{Rails.root}/".freeze
14
+ add_filter { |line| line.sub(@root, EMPTY_STRING) }
15
+ add_filter { |line| line.sub(RENDER_TEMPLATE_PATTERN, EMPTY_STRING) }
16
+ add_filter { |line| line.sub(DOT_SLASH, SLASH) } # for tests
13
17
 
14
18
  add_gem_filters
15
19
  add_silencer { |line| line !~ APP_DIRS_PATTERN }
@@ -21,7 +25,8 @@ module Rails
21
25
  return if gems_paths.empty?
22
26
 
23
27
  gems_regexp = %r{(#{gems_paths.join('|')})/gems/([^/]+)-([\w.]+)/(.*)}
24
- add_filter { |line| line.sub(gems_regexp, '\2 (\3) \4') }
28
+ gems_result = '\2 (\3) \4'.freeze
29
+ add_filter { |line| line.sub(gems_regexp, gems_result) }
25
30
  end
26
31
  end
27
32
  end
@@ -127,7 +127,7 @@ EOT
127
127
  require 'rails/generators'
128
128
  require_application_and_environment!
129
129
  Rails.application.load_generators
130
- require "rails/commands/#{command}"
130
+ require_command!(command)
131
131
  end
132
132
 
133
133
  # Change to the application's path if there is no config.ru file in current directory.
@@ -8,7 +8,7 @@ module Rails
8
8
  MAJOR = 4
9
9
  MINOR = 2
10
10
  TINY = 0
11
- PRE = "beta3"
11
+ PRE = "beta4"
12
12
 
13
13
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
14
14
  end
@@ -85,10 +85,10 @@ module Rails
85
85
  # environment(nil, env: "development") do
86
86
  # "config.autoload_paths += %W(#{config.root}/extras)"
87
87
  # end
88
- def environment(data=nil, options={}, &block)
88
+ def environment(data=nil, options={})
89
89
  sentinel = /class [a-z_:]+ < Rails::Application/i
90
90
  env_file_sentinel = /Rails\.application\.configure do/
91
- data = block.call if !data && block_given?
91
+ data = yield if !data && block_given?
92
92
 
93
93
  in_root do
94
94
  if options[:env].nil?
@@ -39,7 +39,7 @@ module Rails
39
39
 
40
40
  protected
41
41
 
42
- def on_conflict_behavior(&block)
42
+ def on_conflict_behavior
43
43
  options = base.options.merge(config)
44
44
  if identical?
45
45
  say_status :identical, :blue, relative_existing_migration
@@ -48,7 +48,7 @@ module Rails
48
48
  say_status :create, :green
49
49
  unless pretend?
50
50
  ::FileUtils.rm_rf(existing_migration)
51
- block.call
51
+ yield
52
52
  end
53
53
  elsif options[:skip]
54
54
  say_status :skip, :yellow
@@ -41,9 +41,6 @@ module Rails
41
41
  class_option :skip_active_record, type: :boolean, aliases: '-O', default: false,
42
42
  desc: 'Skip Active Record files'
43
43
 
44
- class_option :skip_gems, type: :array, default: [],
45
- desc: 'Skip the provided gems files'
46
-
47
44
  class_option :skip_sprockets, type: :boolean, aliases: '-S', default: false,
48
45
  desc: 'Skip Sprockets files'
49
46
 
@@ -65,6 +62,9 @@ module Rails
65
62
  class_option :edge, type: :boolean, default: false,
66
63
  desc: "Setup the #{name} with Gemfile pointing to Rails repository"
67
64
 
65
+ class_option :skip_turbolinks, type: :boolean, default: false,
66
+ desc: 'Skip turbolinks gem'
67
+
68
68
  class_option :skip_test_unit, type: :boolean, aliases: '-T', default: false,
69
69
  desc: 'Skip Test::Unit files'
70
70
 
@@ -79,7 +79,7 @@ module Rails
79
79
  end
80
80
 
81
81
  def initialize(*args)
82
- @gem_filter = lambda { |gem| !options[:skip_gems].include?(gem.name) }
82
+ @gem_filter = lambda { |gem| true }
83
83
  @extra_entries = []
84
84
  super
85
85
  convert_database_option_for_jruby
@@ -265,11 +265,11 @@ module Rails
265
265
  end
266
266
 
267
267
  def coffee_gemfile_entry
268
- comment = 'Use CoffeeScript for .js.coffee assets and views'
268
+ comment = 'Use CoffeeScript for .coffee assets and views'
269
269
  if options.dev? || options.edge?
270
270
  GemfileEntry.github 'coffee-rails', 'rails/coffee-rails', comment
271
271
  else
272
- GemfileEntry.version 'coffee-rails', '~> 4.0.0', comment
272
+ GemfileEntry.version 'coffee-rails', '~> 4.1.0', comment
273
273
  end
274
274
  end
275
275
 
@@ -287,8 +287,11 @@ module Rails
287
287
  "Use #{options[:javascript]} as the JavaScript library")
288
288
  end
289
289
 
290
- gems << GemfileEntry.version("turbolinks", nil,
291
- "Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks")
290
+ unless options[:skip_turbolinks]
291
+ gems << GemfileEntry.version("turbolinks", nil,
292
+ "Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks")
293
+ end
294
+
292
295
  gems
293
296
  end
294
297
  end
@@ -23,10 +23,11 @@ source 'https://rubygems.org'
23
23
 
24
24
  group :development, :test do
25
25
  <% unless defined?(JRUBY_VERSION) -%>
26
- # Call 'debugger' anywhere in the code to stop execution and get a debugger console
27
26
  <%- if RUBY_VERSION < '2.0.0' -%>
27
+ # Call 'debugger' anywhere in the code to stop execution and get a debugger console
28
28
  gem 'debugger'
29
29
  <%- else -%>
30
+ # Call 'byebug' anywhere in the code to stop execution and get a debugger console
30
31
  gem 'byebug'
31
32
  <%- end -%>
32
33
 
@@ -39,7 +40,7 @@ group :development, :test do
39
40
  <% end -%>
40
41
  end
41
42
 
42
- <% if RUBY_PLATFORM.match(/bccwin|cygwin|emx|mingw|mswin|wince/) -%>
43
+ <% if RUBY_PLATFORM.match(/bccwin|cygwin|emx|mingw|mswin|wince|java/) -%>
43
44
  # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
44
- gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw]
45
+ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
45
46
  <% end -%>
@@ -12,7 +12,7 @@ module Rails
12
12
 
13
13
  def add_routes
14
14
  unless options[:skip_routes]
15
- actions.reverse.each do |action|
15
+ actions.reverse_each do |action|
16
16
  route generate_routing_code(action)
17
17
  end
18
18
  end
@@ -4,6 +4,9 @@ ENV["RAILS_ENV"] = "test"
4
4
  require File.expand_path("../../<%= options[:dummy_path] -%>/config/environment.rb", __FILE__)
5
5
  <% unless options[:skip_active_record] -%>
6
6
  ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../<%= options[:dummy_path] -%>/db/migrate", __FILE__)]
7
+ <% if options[:mountable] -%>
8
+ ActiveRecord::Migrator.migrations_paths << File.expand_path('../../db/migrate', __FILE__)
9
+ <% end -%>
7
10
  <% end -%>
8
11
  require "rails/test_help"
9
12
 
@@ -6,7 +6,7 @@ module TestUnit # :nodoc:
6
6
  check_class_collision suffix: 'JobTest'
7
7
 
8
8
  def create_test_file
9
- template 'unit_test.rb.erb', File.join('test/jobs', class_path, "#{file_name}_test.rb")
9
+ template 'unit_test.rb.erb', File.join('test/jobs', class_path, "#{file_name}_job_test.rb")
10
10
  end
11
11
  end
12
12
  end
@@ -50,7 +50,7 @@ module Rails
50
50
  # class AppGeneratorTest < Rails::Generators::TestCase
51
51
  # tests AppGenerator
52
52
  # destination File.expand_path("../tmp", File.dirname(__FILE__))
53
- # teardown :cleanup_destination_root
53
+ # setup :prepare_destination
54
54
  #
55
55
  # test "database.yml is not created when skipping Active Record" do
56
56
  # run_generator %w(myapp --skip-active-record)
@@ -4,7 +4,7 @@ module Rails
4
4
  module Rack
5
5
  class LogTailer
6
6
  def initialize(app, log = nil)
7
- ActiveSupport::Deprecation.warn "LogTailer is deprecated and will be removed on Rails 5"
7
+ ActiveSupport::Deprecation.warn('LogTailer is deprecated and will be removed on Rails 5.')
8
8
 
9
9
  @app = app
10
10
 
@@ -2,6 +2,10 @@
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
+
5
9
  body {
6
10
  margin: 0;
7
11
  }
@@ -38,7 +42,6 @@
38
42
  iframe {
39
43
  border: 0;
40
44
  width: 100%;
41
- height: 800px;
42
45
  }
43
46
  </style>
44
47
  </head>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railties
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0.beta3
4
+ version: 4.2.0.beta4
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Heinemeier Hansson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-29 00:00:00.000000000 Z
11
+ date: 2014-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,60 +16,60 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 4.2.0.beta3
19
+ version: 4.2.0.beta4
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 4.2.0.beta3
26
+ version: 4.2.0.beta4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: actionpack
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 4.2.0.beta3
33
+ version: 4.2.0.beta4
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 4.2.0.beta3
40
+ version: 4.2.0.beta4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: 0.8.7
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.8.7
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: thor
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: 0.18.1
62
- - - "<"
62
+ - - <
63
63
  - !ruby/object:Gem::Version
64
64
  version: '2.0'
65
65
  type: :runtime
66
66
  prerelease: false
67
67
  version_requirements: !ruby/object:Gem::Requirement
68
68
  requirements:
69
- - - ">="
69
+ - - '>='
70
70
  - !ruby/object:Gem::Version
71
71
  version: 0.18.1
72
- - - "<"
72
+ - - <
73
73
  - !ruby/object:Gem::Version
74
74
  version: '2.0'
75
75
  - !ruby/object:Gem::Dependency
@@ -78,14 +78,14 @@ dependencies:
78
78
  requirements:
79
79
  - - '='
80
80
  - !ruby/object:Gem::Version
81
- version: 4.2.0.beta3
81
+ version: 4.2.0.beta4
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - '='
87
87
  - !ruby/object:Gem::Version
88
- version: 4.2.0.beta3
88
+ version: 4.2.0.beta4
89
89
  description: 'Rails internals: application bootup, plugins, generators, and rake tasks.'
90
90
  email: david@loudthinking.com
91
91
  executables:
@@ -122,7 +122,6 @@ files:
122
122
  - lib/rails/commands/plugin.rb
123
123
  - lib/rails/commands/runner.rb
124
124
  - lib/rails/commands/server.rb
125
- - lib/rails/commands/update.rb
126
125
  - lib/rails/configuration.rb
127
126
  - lib/rails/console/app.rb
128
127
  - lib/rails/console/helpers.rb
@@ -340,23 +339,23 @@ licenses:
340
339
  metadata: {}
341
340
  post_install_message:
342
341
  rdoc_options:
343
- - "--exclude"
344
- - "."
342
+ - --exclude
343
+ - .
345
344
  require_paths:
346
345
  - lib
347
346
  required_ruby_version: !ruby/object:Gem::Requirement
348
347
  requirements:
349
- - - ">="
348
+ - - '>='
350
349
  - !ruby/object:Gem::Version
351
350
  version: 1.9.3
352
351
  required_rubygems_version: !ruby/object:Gem::Requirement
353
352
  requirements:
354
- - - ">"
353
+ - - '>'
355
354
  - !ruby/object:Gem::Version
356
355
  version: 1.3.1
357
356
  requirements: []
358
357
  rubyforge_project:
359
- rubygems_version: 2.2.2
358
+ rubygems_version: 2.2.1
360
359
  signing_key:
361
360
  specification_version: 4
362
361
  summary: Tools for creating, working with, and running Rails applications.
@@ -1,9 +0,0 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), '..', 'generators'))
2
-
3
- if ARGV.size == 0
4
- Rails::Generators.help
5
- exit
6
- end
7
-
8
- name = ARGV.shift
9
- Rails::Generators.invoke name, ARGV, behavior: :skip