Commit 4f88d4ba authored by Utkarsh Gupta's avatar Utkarsh Gupta

New upstream version 5.2.2.1+dfsg

parent 7c85e481
......@@ -26,63 +26,63 @@ GIT
PATH
remote: .
specs:
actioncable (5.2.2)
actionpack (= 5.2.2)
actioncable (5.2.2.1)
actionpack (= 5.2.2.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.2)
actionpack (= 5.2.2)
actionview (= 5.2.2)
activejob (= 5.2.2)
actionmailer (5.2.2.1)
actionpack (= 5.2.2.1)
actionview (= 5.2.2.1)
activejob (= 5.2.2.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.2)
actionview (= 5.2.2)
activesupport (= 5.2.2)
actionpack (5.2.2.1)
actionview (= 5.2.2.1)
activesupport (= 5.2.2.1)
rack (~> 2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.2)
activesupport (= 5.2.2)
actionview (5.2.2.1)
activesupport (= 5.2.2.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.2.2)
activesupport (= 5.2.2)
activejob (5.2.2.1)
activesupport (= 5.2.2.1)
globalid (>= 0.3.6)
activemodel (5.2.2)
activesupport (= 5.2.2)
activerecord (5.2.2)
activemodel (= 5.2.2)
activesupport (= 5.2.2)
activemodel (5.2.2.1)
activesupport (= 5.2.2.1)
activerecord (5.2.2.1)
activemodel (= 5.2.2.1)
activesupport (= 5.2.2.1)
arel (>= 9.0)
activestorage (5.2.2)
actionpack (= 5.2.2)
activerecord (= 5.2.2)
activestorage (5.2.2.1)
actionpack (= 5.2.2.1)
activerecord (= 5.2.2.1)
marcel (~> 0.3.1)
activesupport (5.2.2)
activesupport (5.2.2.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
rails (5.2.2)
actioncable (= 5.2.2)
actionmailer (= 5.2.2)
actionpack (= 5.2.2)
actionview (= 5.2.2)
activejob (= 5.2.2)
activemodel (= 5.2.2)
activerecord (= 5.2.2)
activestorage (= 5.2.2)
activesupport (= 5.2.2)
rails (5.2.2.1)
actioncable (= 5.2.2.1)
actionmailer (= 5.2.2.1)
actionpack (= 5.2.2.1)
actionview (= 5.2.2.1)
activejob (= 5.2.2.1)
activemodel (= 5.2.2.1)
activerecord (= 5.2.2.1)
activestorage (= 5.2.2.1)
activesupport (= 5.2.2.1)
bundler (>= 1.3.0)
railties (= 5.2.2)
railties (= 5.2.2.1)
sprockets-rails (>= 2.0.0)
railties (5.2.2)
actionpack (= 5.2.2)
activesupport (= 5.2.2)
railties (5.2.2.1)
actionpack (= 5.2.2.1)
activesupport (= 5.2.2.1)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
......@@ -211,7 +211,7 @@ GEM
http_parser.rb (>= 0.6.0)
em-socksify (0.3.2)
eventmachine (>= 1.0.0.beta.4)
erubi (1.7.1)
erubi (1.8.0)
et-orbi (1.1.2)
tzinfo
event_emitter (0.2.6)
......@@ -239,7 +239,7 @@ GEM
fugit (1.1.1)
et-orbi (~> 1.1, >= 1.1.1)
raabro (~> 1.1)
globalid (0.4.1)
globalid (0.4.2)
activesupport (>= 4.2.0)
google-api-client (0.19.8)
addressable (~> 2.5, >= 2.5.1)
......@@ -269,7 +269,7 @@ GEM
hiredis (0.6.1-java)
http_parser.rb (0.6.0)
httpclient (2.8.3)
i18n (1.1.1)
i18n (1.6.0)
concurrent-ruby (~> 1.0)
io-like (0.3.0)
jdbc-mysql (5.1.46)
......@@ -304,7 +304,7 @@ GEM
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mimemagic (0.3.2)
mimemagic (0.3.3)
mini_magick (4.8.0)
mini_mime (1.0.0)
mini_portile2 (2.3.0)
......@@ -329,6 +329,7 @@ GEM
mysql2 (0.5.1-x64-mingw32)
mysql2 (0.5.1-x86-mingw32)
nio4r (2.3.1)
nio4r (2.3.1-java)
nokogiri (1.8.2)
mini_portile2 (~> 2.3.0)
nokogiri (1.8.2-java)
......@@ -486,6 +487,8 @@ GEM
websocket (1.2.8)
websocket-driver (0.7.0)
websocket-extensions (>= 0.1.0)
websocket-driver (0.7.0-java)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3)
xpath (3.1.0)
nokogiri (~> 1.8)
......
## Rails 5.2.2.1 (March 11, 2019) ##
* No changes.
## Rails 5.2.2 (December 04, 2018) ##
* No changes.
......
......@@ -10,7 +10,7 @@ module VERSION
MAJOR = 5
MINOR = 2
TINY = 2
PRE = nil
PRE = "1"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
......
{
"name": "actioncable",
"version": "5.2.2",
"version": "5.2.2-1",
"description": "WebSocket framework for Ruby on Rails.",
"main": "lib/assets/compiled/action_cable.js",
"files": [
......
## Rails 5.2.2.1 (March 11, 2019) ##
* No changes.
## Rails 5.2.2 (December 04, 2018) ##
* No changes.
......
......@@ -10,7 +10,7 @@ module VERSION
MAJOR = 5
MINOR = 2
TINY = 2
PRE = nil
PRE = "1"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
......
## Rails 5.2.2.1 (March 11, 2019) ##
* No changes.
## Rails 5.2.2 (December 04, 2018) ##
* Reset Capybara sessions if failed system test screenshot raising an exception.
......
......@@ -74,6 +74,11 @@ def formats
else
[Mime[:html]]
end
v = v.select do |format|
format.symbol || format.ref == "*/*"
end
set_header k, v
end
end
......
......@@ -29,9 +29,10 @@ module Session
#
# Rails.application.config.session_store :cookie_store, key: '_your_app_session'
#
# By default, your secret key base is derived from your application name in
# the test and development environments. In all other environments, it is stored
# encrypted in the <tt>config/credentials.yml.enc</tt> file.
# In the development and test environments your application's secret key base is
# generated by Rails and stored in a temporary file in <tt>tmp/development_secret.txt</tt>.
# In all other environments, it is stored encrypted in the
# <tt>config/credentials.yml.enc</tt> file.
#
# If your application was not updated to Rails 5.2 defaults, the secret_key_base
# will be found in the old <tt>config/secrets.yml</tt> file.
......
......@@ -10,7 +10,7 @@ module VERSION
MAJOR = 5
MINOR = 2
TINY = 2
PRE = nil
PRE = "1"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
......
......@@ -105,7 +105,7 @@ def made_for_content_type
def custom_type_handling
respond_to do |type|
type.html { render body: "HTML" }
type.custom("application/crazy-xml") { render body: "Crazy XML" }
type.custom("application/fancy-xml") { render body: "Fancy XML" }
type.all { render body: "Nothing" }
end
end
......@@ -294,12 +294,14 @@ def setup
@request.host = "www.example.com"
Mime::Type.register_alias("text/html", :iphone)
Mime::Type.register("text/x-mobile", :mobile)
Mime::Type.register("application/fancy-xml", :fancy_xml)
end
def teardown
super
Mime::Type.unregister(:iphone)
Mime::Type.unregister(:mobile)
Mime::Type.unregister(:fancy_xml)
end
def test_html
......@@ -455,10 +457,10 @@ def test_synonyms
end
def test_custom_types
@request.accept = "application/crazy-xml"
@request.accept = "application/fancy-xml"
get :custom_type_handling
assert_equal "application/crazy-xml", @response.content_type
assert_equal "Crazy XML", @response.body
assert_equal "application/fancy-xml", @response.content_type
assert_equal "Fancy XML", @response.body
@request.accept = "text/html"
get :custom_type_handling
......
......@@ -20,9 +20,19 @@ class TestContentNegotiation < Rack::TestCase
assert_body "Hello world */*!"
end
test "Not all mimes are converted to symbol" do
test "A js or */* Accept header will return HTML" do
get "/content_negotiation/basic/hello", headers: { "HTTP_ACCEPT" => "text/javascript, */*" }
assert_body "Hello world text/html!"
end
test "A js or */* Accept header on xhr will return HTML" do
get "/content_negotiation/basic/hello", headers: { "HTTP_ACCEPT" => "text/javascript, */*" }, xhr: true
assert_body "Hello world text/javascript!"
end
test "Unregistered mimes are ignored" do
get "/content_negotiation/basic/all", headers: { "HTTP_ACCEPT" => "text/plain, mime/another" }
assert_body '[:text, "mime/another"]'
assert_body '[:text]'
end
end
end
## Rails 5.2.2.1 (March 11, 2019) ##
* No changes.
## Rails 5.2.2 (December 04, 2018) ##
* No changes.
......
......@@ -10,7 +10,7 @@ module VERSION
MAJOR = 5
MINOR = 2
TINY = 2
PRE = nil
PRE = "1"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
......
{
"name": "rails-ujs",
"version": "5.2.2",
"version": "5.2.2-1",
"description": "Ruby on Rails unobtrusive scripting adapter",
"main": "lib/assets/compiled/rails-ujs.js",
"files": [
......
## Rails 5.2.2.1 (March 11, 2019) ##
* No changes.
## Rails 5.2.2 (December 04, 2018) ##
* Make sure `assert_enqueued_with()` & `assert_performed_with()` work reliably with hash arguments.
......
......@@ -10,7 +10,7 @@ module VERSION
MAJOR = 5
MINOR = 2
TINY = 2
PRE = nil
PRE = "1"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
......
## Rails 5.2.2.1 (March 11, 2019) ##
* No changes.
## Rails 5.2.2 (December 04, 2018) ##
* Fix numericality validator to still use value before type cast except Active Record.
......
......@@ -10,7 +10,7 @@ module VERSION
MAJOR = 5
MINOR = 2
TINY = 2
PRE = nil
PRE = "1"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
......
## Rails 5.2.2.1 (March 11, 2019) ##
* No changes.
## Rails 5.2.2 (December 04, 2018) ##
* Do not ignore the scoping with query methods in the scope block.
......
......@@ -10,7 +10,7 @@ module VERSION
MAJOR = 5
MINOR = 2
TINY = 2
PRE = nil
PRE = "1"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
......
## Rails 5.2.2.1 (March 11, 2019) ##
* No changes.
## Rails 5.2.2 (December 04, 2018) ##
* Support multiple submit buttons in Active Storage forms.
......
......@@ -10,7 +10,7 @@ module VERSION
MAJOR = 5
MINOR = 2
TINY = 2
PRE = nil
PRE = "1"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
......
{
"name": "activestorage",
"version": "5.2.2",
"version": "5.2.2-1",
"description": "Attach cloud and local files in Rails applications",
"main": "app/assets/javascripts/activestorage.js",
"files": [
......
## Rails 5.2.2.1 (March 11, 2019) ##
* No changes.
## Rails 5.2.2 (December 04, 2018) ##
* Fix bug where `#to_options` for `ActiveSupport::HashWithIndifferentAccess`
......
......@@ -10,7 +10,7 @@ module VERSION
MAJOR = 5
MINOR = 2
TINY = 2
PRE = nil
PRE = "1"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
......
## Rails 5.2.2.1 (March 11, 2019) ##
* No changes.
## Rails 5.2.2 (December 04, 2018) ##
* No changes.
......
## Rails 5.2.2.1 (March 11, 2019) ##
* No changes.
## Rails 5.2.2 (December 04, 2018) ##
* Disable content security policy for mailer previews.
......
......@@ -426,8 +426,8 @@ def secrets=(secrets) #:nodoc:
# then credentials.secret_key_base, and finally secrets.secret_key_base. For most applications,
# the correct place to store it is in the encrypted credentials file.
def secret_key_base
if Rails.env.test? || Rails.env.development?
secrets.secret_key_base || Digest::MD5.hexdigest(self.class.name)
if Rails.env.development? || Rails.env.test?
secrets.secret_key_base ||= generate_development_secret
else
validate_secret_key_base(
ENV["SECRET_KEY_BASE"] || credentials.secret_key_base || secrets.secret_key_base
......@@ -588,6 +588,21 @@ def validate_secret_key_base(secret_key_base)
private
def generate_development_secret
if secrets.secret_key_base.nil?
key_file = Rails.root.join("tmp/development_secret.txt")
if !File.exist?(key_file)
random_key = SecureRandom.hex(64)
File.binwrite(key_file, random_key)
end
secrets.secret_key_base = File.binread(key_file)
end
secrets.secret_key_base
end
def build_request(env)
req = super
env["ORIGINAL_FULLPATH"] = req.fullpath
......
......@@ -10,7 +10,7 @@ module VERSION
MAJOR = 5
MINOR = 2
TINY = 2
PRE = nil
PRE = "1"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
......
......@@ -513,6 +513,27 @@ def index
end
test "application will generate secret_key_base in tmp file if blank in development" do
app_file "config/initializers/secret_token.rb", <<-RUBY
Rails.application.credentials.secret_key_base = nil
RUBY
app "development"
assert_not_nil app.secrets.secret_key_base
assert File.exist?(app_path("tmp/development_secret.txt"))
end
test "application will not generate secret_key_base in tmp file if blank in production" do
app_file "config/initializers/secret_token.rb", <<-RUBY
Rails.application.credentials.secret_key_base = nil
RUBY
assert_raises ArgumentError do
app "production"
end
end
test "raises when secret_key_base is blank" do
app_file "config/initializers/secret_token.rb", <<-RUBY
Rails.application.credentials.secret_key_base = nil
......@@ -550,7 +571,6 @@ def index
test "application verifier can build different verifiers" do
make_basic_app do |application|
application.credentials.secret_key_base = "b3c631c314c0bbca50c1b2843150fe33"
application.config.session_store :disabled
end
......
......@@ -155,6 +155,7 @@ def self.name; "RailtiesTestApp"; end
@app.config.active_support.deprecation = :log
@app.config.active_support.test_order = :random
@app.config.log_level = :info
@app.secrets.secret_key_base = "b3c631c314c0bbca50c1b2843150fe33"
yield @app if block_given?
@app.initialize!
......
......@@ -10,7 +10,7 @@ module VERSION
MAJOR = 5
MINOR = 2
TINY = 2
PRE = nil
PRE = "1"
STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment