railties 4.2.7 → 4.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/lib/rails/application/configuration.rb +4 -0
- data/lib/rails/application.rb +1 -1
- data/lib/rails/commands/dbconsole.rb +1 -1
- data/lib/rails/gem_version.rb +1 -1
- data/lib/rails/generators/app_base.rb +1 -1
- data/lib/rails/generators/rails/app/app_generator.rb +5 -0
- data/lib/rails/generators/rails/app/templates/config/initializers/to_time_preserves_timezone.rb +10 -0
- metadata +10 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d6db4314ee1cc768ba5567543f68183ed22e335
|
4
|
+
data.tar.gz: 8794dfec9adbd5d8a7513f7c64e3849696295996
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b18815ac581e1a7235e35792c1f1264f9c8c9c80dacc827a0744133fc4ab639df31ccae2c775b6711e18aa42820c3c9227a3b37ab9521a4fd9829a4ee2e7960
|
7
|
+
data.tar.gz: b42e0695e18e0ca24e09a4a0d983611b7aa9292139aa0bb52ba1ab494618a2382887b580c630e5ee45f21d84be309f5e84a478fd64fe74687ae68b1045c9b6aa
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,27 @@
|
|
1
|
+
## Rails 4.2.8 (February 21, 2017) ##
|
2
|
+
|
3
|
+
* Add `config/initializers/to_time_preserves_timezone.rb`, which tells
|
4
|
+
Active Support to preserve the receiver's timezone when calling `to_time`.
|
5
|
+
This matches the new behavior that will be part of Ruby 2.4.
|
6
|
+
|
7
|
+
Fixes #24617.
|
8
|
+
|
9
|
+
*Andrew White*
|
10
|
+
|
11
|
+
* Reset a new session directly after its creation in ActionDispatch::IntegrationTest#open_session
|
12
|
+
|
13
|
+
Fixes Issue #22742
|
14
|
+
|
15
|
+
*Tawan Sierek*
|
16
|
+
|
17
|
+
* Run `before_configuration` callbacks as soon as application constant
|
18
|
+
inherits from `Rails::Application`.
|
19
|
+
|
20
|
+
Fixes #19880.
|
21
|
+
|
22
|
+
*Yuji Yaginuma*
|
23
|
+
|
24
|
+
|
1
25
|
## Rails 4.2.7 (July 12, 2016) ##
|
2
26
|
|
3
27
|
* Do not run `bundle install` when generating a new plugin.
|
data/lib/rails/application.rb
CHANGED
@@ -90,6 +90,7 @@ module Rails
|
|
90
90
|
super
|
91
91
|
Rails.app_class = base
|
92
92
|
add_lib_to_load_path!(find_root(base.called_from))
|
93
|
+
ActiveSupport.run_load_hooks(:before_configuration, base)
|
93
94
|
end
|
94
95
|
|
95
96
|
def instance
|
@@ -145,7 +146,6 @@ module Rails
|
|
145
146
|
def run_load_hooks! # :nodoc:
|
146
147
|
return self if @ran_load_hooks
|
147
148
|
@ran_load_hooks = true
|
148
|
-
ActiveSupport.run_load_hooks(:before_configuration, self)
|
149
149
|
|
150
150
|
@initial_variable_values.each do |variable_name, value|
|
151
151
|
if INITIAL_VARIABLES.include?(variable_name)
|
@@ -178,7 +178,7 @@ module Rails
|
|
178
178
|
found = commands.detect do |cmd|
|
179
179
|
dirs_on_path.detect do |path|
|
180
180
|
full_path_command = File.join(path, cmd)
|
181
|
-
File.executable?
|
181
|
+
File.file?(full_path_command) && File.executable?(full_path_command)
|
182
182
|
end
|
183
183
|
end
|
184
184
|
|
data/lib/rails/gem_version.rb
CHANGED
@@ -68,7 +68,7 @@ module Rails
|
|
68
68
|
class_option :skip_test_unit, type: :boolean, aliases: '-T', default: false,
|
69
69
|
desc: 'Skip Test::Unit files'
|
70
70
|
|
71
|
-
class_option :rc, type: :string, default:
|
71
|
+
class_option :rc, type: :string, default: nil,
|
72
72
|
desc: "Path to file containing extra configuration options for rails command"
|
73
73
|
|
74
74
|
class_option :no_rc, type: :boolean, default: false,
|
@@ -88,12 +88,17 @@ module Rails
|
|
88
88
|
|
89
89
|
def config_when_updating
|
90
90
|
cookie_serializer_config_exist = File.exist?('config/initializers/cookies_serializer.rb')
|
91
|
+
to_time_preserves_timezone_config_exist = File.exist?('config/initializers/to_time_preserves_timezone.rb')
|
91
92
|
|
92
93
|
config
|
93
94
|
|
94
95
|
unless cookie_serializer_config_exist
|
95
96
|
gsub_file 'config/initializers/cookies_serializer.rb', /json/, 'marshal'
|
96
97
|
end
|
98
|
+
|
99
|
+
unless to_time_preserves_timezone_config_exist
|
100
|
+
remove_file 'config/initializers/to_time_preserves_timezone.rb'
|
101
|
+
end
|
97
102
|
end
|
98
103
|
|
99
104
|
def database_yml
|
data/lib/rails/generators/rails/app/templates/config/initializers/to_time_preserves_timezone.rb
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Preserve the timezone of the receiver when calling to `to_time`.
|
4
|
+
# Ruby 2.4 will change the behavior of `to_time` to preserve the timezone
|
5
|
+
# when converting to an instance of `Time` instead of the previous behavior
|
6
|
+
# of converting to the local system timezone.
|
7
|
+
#
|
8
|
+
# Rails 5.0 introduced this config option so that apps made with earlier
|
9
|
+
# versions of Rails are not affected when upgrading.
|
10
|
+
ActiveSupport.to_time_preserves_timezone = true
|
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.
|
4
|
+
version: 4.2.8
|
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:
|
11
|
+
date: 2017-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.2.
|
19
|
+
version: 4.2.8
|
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.
|
26
|
+
version: 4.2.8
|
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.
|
33
|
+
version: 4.2.8
|
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.
|
40
|
+
version: 4.2.8
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -78,14 +78,14 @@ dependencies:
|
|
78
78
|
requirements:
|
79
79
|
- - '='
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: 4.2.
|
81
|
+
version: 4.2.8
|
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.
|
88
|
+
version: 4.2.8
|
89
89
|
description: 'Rails internals: application bootup, plugins, generators, and rake tasks.'
|
90
90
|
email: david@loudthinking.com
|
91
91
|
executables:
|
@@ -199,6 +199,7 @@ files:
|
|
199
199
|
- lib/rails/generators/rails/app/templates/config/initializers/inflections.rb
|
200
200
|
- lib/rails/generators/rails/app/templates/config/initializers/mime_types.rb
|
201
201
|
- lib/rails/generators/rails/app/templates/config/initializers/session_store.rb.tt
|
202
|
+
- lib/rails/generators/rails/app/templates/config/initializers/to_time_preserves_timezone.rb
|
202
203
|
- lib/rails/generators/rails/app/templates/config/initializers/wrap_parameters.rb.tt
|
203
204
|
- lib/rails/generators/rails/app/templates/config/locales/en.yml
|
204
205
|
- lib/rails/generators/rails/app/templates/config/routes.rb
|
@@ -357,7 +358,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
357
358
|
version: '0'
|
358
359
|
requirements: []
|
359
360
|
rubyforge_project:
|
360
|
-
rubygems_version: 2.
|
361
|
+
rubygems_version: 2.6.10
|
361
362
|
signing_key:
|
362
363
|
specification_version: 4
|
363
364
|
summary: Tools for creating, working with, and running Rails applications.
|