aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Gemfile8
-rw-r--r--Gemfile.lock59
-rw-r--r--actionpack/lib/action_controller/metal/strong_parameters.rb5
-rw-r--r--activerecord/lib/active_record/attribute_set/builder.rb2
-rw-r--r--activesupport/lib/active_support/core_ext/date_and_time/zones.rb3
-rw-r--r--activesupport/lib/active_support/core_ext/string/strip.rb3
-rw-r--r--guides/source/action_controller_overview.md2
-rw-r--r--guides/source/rails_application_templates.md10
-rw-r--r--railties/lib/rails/generators/app_base.rb17
9 files changed, 61 insertions, 48 deletions
diff --git a/Gemfile b/Gemfile
index bbff1d9b42..e18780ab2a 100644
--- a/Gemfile
+++ b/Gemfile
@@ -79,7 +79,13 @@ group :test do
end
platforms :ruby do
- gem 'nokogiri', '>= 1.4.5'
+ if Bundler::WINDOWS
+ # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
+ gem 'tzinfo-data'
+ gem 'nokogiri', '>= 1.6.7.rc3'
+ else
+ gem 'nokogiri', '>= 1.4.5'
+ end
# Needed for compiling the ActionDispatch::Journey parser
gem 'racc', '>=1.4.6', require: false
diff --git a/Gemfile.lock b/Gemfile.lock
index 44fedddc04..c3b348d035 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -29,7 +29,7 @@ GIT
GIT
remote: git://github.com/rack/rack.git
- revision: 4224c028c71c4ccca7cdb3e5a10c51af797a4d4d
+ revision: c28f271d0c91f45e13bfa8f07bed445ef91f41de
branch: master
specs:
rack (2.0.0.alpha)
@@ -37,14 +37,14 @@ GIT
GIT
remote: git://github.com/rails/arel.git
- revision: d5432b4616ff43fbb14540d351eed351e21bb20e
+ revision: 77ec13b46af2926bfcfc3073685711c874b0d272
branch: master
specs:
arel (7.0.0.alpha)
GIT
remote: git://github.com/rails/globalid.git
- revision: 8178ff2dc898a8f49dd71f6eb46f2a09712462de
+ revision: 1d8fca667740570d204fd955a0bd39ac539bac7f
branch: master
specs:
globalid (0.3.6)
@@ -52,7 +52,7 @@ GIT
GIT
remote: git://github.com/rails/jquery-rails.git
- revision: 01cb69b17083c8eb8daba13a8daba4907b1c3813
+ revision: 04fcfa29b859eef9479f89b6a799d00212902385
branch: master
specs:
jquery-rails (4.0.5)
@@ -62,18 +62,18 @@ GIT
GIT
remote: git://github.com/rails/sass-rails.git
- revision: 805cb17722b8a13ff00dffe20283a6ba2c9a45dc
+ revision: a3b25261a3d31ed9ff5dd6e841b777790fc86c55
branch: master
specs:
sass-rails (6.0.0)
railties (>= 4.0.0, < 5.0)
- sass (~> 3.3)
+ sass (~> 3.4)
sprockets (>= 4.0)
sprockets-rails (< 4.0)
GIT
remote: git://github.com/rails/sprockets-rails.git
- revision: e65e088575be4f6b994823b80a277affb0a57a5e
+ revision: 600f981fe79ff2d4179baf84bd18fac5acb58b5e
branch: master
specs:
sprockets-rails (3.0.0.beta2)
@@ -83,11 +83,11 @@ GIT
GIT
remote: git://github.com/rails/sprockets.git
- revision: 408e4ad79df056f6f2199e495782363c22a95c04
+ revision: 9675919a2733c2888a236756395f08b2294631bb
branch: master
specs:
sprockets (4.0.0)
- rack (~> 2.x)
+ rack (> 1, < 3)
PATH
remote: .
@@ -160,8 +160,8 @@ GEM
beaneater (1.0.0)
benchmark-ips (2.3.0)
builder (3.2.2)
- bunny (2.0.0)
- amq-protocol (>= 1.9.2)
+ bunny (2.2.0)
+ amq-protocol (>= 2.0.0)
byebug (6.0.2)
celluloid (0.16.0)
timers (~> 4.0.0)
@@ -195,7 +195,7 @@ GEM
metaclass (0.0.4)
method_source (0.8.2)
mime-types (2.6.1)
- mini_portile (0.6.2)
+ mini_portile (0.7.0.rc4)
minitest (5.3.3)
mocha (0.14.0)
metaclass (~> 0.0.1)
@@ -204,15 +204,15 @@ GEM
mustache (1.0.2)
mysql (2.9.1)
mysql2 (0.4.0)
- nokogiri (1.6.6.2)
- mini_portile (~> 0.6.0)
- nokogiri (1.6.6.2-x64-mingw32)
- mini_portile (~> 0.6.0)
- nokogiri (1.6.6.2-x86-mingw32)
- mini_portile (~> 0.6.0)
- pg (0.18.2)
+ nokogiri (1.6.7.rc3)
+ mini_portile (~> 0.7.0.rc4)
+ nokogiri (1.6.7.rc3-x64-mingw32)
+ mini_portile (~> 0.7.0.rc4)
+ nokogiri (1.6.7.rc3-x86-mingw32)
+ mini_portile (~> 0.7.0.rc4)
+ pg (0.18.3)
psych (2.0.15)
- que (0.10.0)
+ que (0.11.2)
racc (1.4.12)
rack-cache (1.2)
rack (>= 0.4)
@@ -243,12 +243,12 @@ GEM
redis (~> 3.0)
resque (~> 1.25)
rufus-scheduler (~> 3.0)
- rufus-scheduler (3.1.3)
- sass (3.4.17)
+ rufus-scheduler (3.1.4)
+ sass (3.4.18)
sdoc (0.4.1)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
- sequel (4.25.0)
+ sequel (4.26.0)
serverengine (1.5.10)
sigdump (~> 0.2.2)
sidekiq (3.4.2)
@@ -260,8 +260,8 @@ GEM
sigdump (0.2.3)
sinatra (1.0)
rack (>= 1.0)
- sneakers (1.1.1)
- bunny (>= 1.7.0, <= 2.0.0)
+ sneakers (2.2.0)
+ bunny (~> 2.2.0)
serverengine (~> 1.5.5)
thor
thread (~> 0.1.7)
@@ -272,13 +272,15 @@ GEM
thor (0.19.1)
thread (0.1.7)
thread_safe (0.3.5)
- timers (4.0.1)
+ timers (4.0.4)
hitimes
turbolinks (2.5.3)
coffee-rails
tzinfo (1.2.2)
thread_safe (~> 0.1)
- uglifier (2.7.1)
+ tzinfo-data (1.2015.6)
+ tzinfo (>= 1.0.0)
+ uglifier (2.7.2)
execjs (>= 0.3.0)
json (>= 1.8.0)
vegas (0.1.11)
@@ -314,7 +316,7 @@ DEPENDENCIES
mocha (~> 0.14)
mysql (>= 2.9.0)
mysql2 (>= 0.4.0)
- nokogiri (>= 1.4.5)
+ nokogiri (>= 1.6.7.rc3)
pg (>= 0.18.0)
psych (~> 2.0)
qu-rails!
@@ -341,6 +343,7 @@ DEPENDENCIES
stackprof
sucker_punch
turbolinks
+ tzinfo-data
uglifier (>= 1.3.0)
w3c_validators
diff --git a/actionpack/lib/action_controller/metal/strong_parameters.rb b/actionpack/lib/action_controller/metal/strong_parameters.rb
index bf5c7003ff..903dba3eb4 100644
--- a/actionpack/lib/action_controller/metal/strong_parameters.rb
+++ b/actionpack/lib/action_controller/metal/strong_parameters.rb
@@ -97,9 +97,8 @@ module ActionController
# environment they should only be set once at boot-time and never mutated at
# runtime.
#
- # <tt>ActionController::Parameters</tt> inherits from
- # <tt>ActiveSupport::HashWithIndifferentAccess</tt>, this means
- # that you can fetch values using either <tt>:key</tt> or <tt>"key"</tt>.
+ # You can fetch values of <tt>ActionController::Parameters</tt> using either
+ # <tt>:key</tt> or <tt>"key"</tt>.
#
# params = ActionController::Parameters.new(key: 'value')
# params[:key] # => "value"
diff --git a/activerecord/lib/active_record/attribute_set/builder.rb b/activerecord/lib/active_record/attribute_set/builder.rb
index e85777c335..0c730d313f 100644
--- a/activerecord/lib/active_record/attribute_set/builder.rb
+++ b/activerecord/lib/active_record/attribute_set/builder.rb
@@ -1,3 +1,5 @@
+require 'active_record/attribute'
+
module ActiveRecord
class AttributeSet # :nodoc:
class Builder # :nodoc:
diff --git a/activesupport/lib/active_support/core_ext/date_and_time/zones.rb b/activesupport/lib/active_support/core_ext/date_and_time/zones.rb
index 96c6df9407..d29a8db5cf 100644
--- a/activesupport/lib/active_support/core_ext/date_and_time/zones.rb
+++ b/activesupport/lib/active_support/core_ext/date_and_time/zones.rb
@@ -4,7 +4,7 @@ module DateAndTime
# if Time.zone_default is set. Otherwise, it returns the current time.
#
# Time.zone = 'Hawaii' # => 'Hawaii'
- # DateTime.utc(2000).in_time_zone # => Fri, 31 Dec 1999 14:00:00 HST -10:00
+ # Time.utc(2000).in_time_zone # => Fri, 31 Dec 1999 14:00:00 HST -10:00
# Date.new(2000).in_time_zone # => Sat, 01 Jan 2000 00:00:00 HST -10:00
#
# This method is similar to Time#localtime, except that it uses <tt>Time.zone</tt> as the local zone
@@ -14,7 +14,6 @@ module DateAndTime
# and the conversion will be based on that zone instead of <tt>Time.zone</tt>.
#
# Time.utc(2000).in_time_zone('Alaska') # => Fri, 31 Dec 1999 15:00:00 AKST -09:00
- # DateTime.utc(2000).in_time_zone('Alaska') # => Fri, 31 Dec 1999 15:00:00 AKST -09:00
# Date.new(2000).in_time_zone('Alaska') # => Sat, 01 Jan 2000 00:00:00 AKST -09:00
def in_time_zone(zone = ::Time.zone)
time_zone = ::Time.find_zone! zone
diff --git a/activesupport/lib/active_support/core_ext/string/strip.rb b/activesupport/lib/active_support/core_ext/string/strip.rb
index 9fdd9d8d2e..a523e76b69 100644
--- a/activesupport/lib/active_support/core_ext/string/strip.rb
+++ b/activesupport/lib/active_support/core_ext/string/strip.rb
@@ -20,7 +20,6 @@ class String
# Technically, it looks for the least indented non-empty line
# in the whole string, and removes that amount of leading whitespace.
def strip_heredoc
- indent = scan(/^[ \t]*(?=\S)/).min.try(:size) || 0
- gsub(/^[ \t]{#{indent}}/, '')
+ gsub(/^#{scan(/^[ \t]*(?=\S)/).min}/, ''.freeze)
end
end
diff --git a/guides/source/action_controller_overview.md b/guides/source/action_controller_overview.md
index 19bdea2b8a..9ab2841619 100644
--- a/guides/source/action_controller_overview.md
+++ b/guides/source/action_controller_overview.md
@@ -1118,7 +1118,7 @@ Rails default exception handling displays a "500 Server Error" message for all e
### The Default 500 and 404 Templates
-By default a production application will render either a 404 or a 500 error message. These messages are contained in static HTML files in the `public` folder, in `404.html` and `500.html` respectively. You can customize these files to add some extra information and layout, but remember that they are static; i.e. you can't use RHTML or layouts in them, just plain HTML.
+By default a production application will render either a 404 or a 500 error message. These messages are contained in static HTML files in the `public` folder, in `404.html` and `500.html` respectively. You can customize these files to add some extra information and style, but remember that they are static HTML; i.e. you can't use ERB, SCSS, CoffeeScript, or layouts for them.
### `rescue_from`
diff --git a/guides/source/rails_application_templates.md b/guides/source/rails_application_templates.md
index b7364536c3..edd54826cf 100644
--- a/guides/source/rails_application_templates.md
+++ b/guides/source/rails_application_templates.md
@@ -78,7 +78,7 @@ gem_group :development, :test do
end
```
-### add_source(source, options = {})
+### add_source(source, options={}, &block)
Adds the given source to the generated application's `Gemfile`.
@@ -88,6 +88,14 @@ For example, if you need to source a gem from `"http://code.whytheluckystiff.net
add_source "http://code.whytheluckystiff.net"
```
+If block is given, gem entries in block are wrapped into the source group.
+
+```ruby
+add_source "http://gems.github.com/" do
+ gem "rspec-rails"
+end
+```
+
### environment/application(data=nil, options={}, &block)
Adds a line inside the `Application` class for `config/application.rb`.
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb
index 38074e80e0..0f44f4694e 100644
--- a/railties/lib/rails/generators/app_base.rb
+++ b/railties/lib/rails/generators/app_base.rb
@@ -205,24 +205,21 @@ module Rails
end
def rails_gemfile_entry
- if options.dev?
- [
- GemfileEntry.path('rails', Rails::Generators::RAILS_DEV_PATH),
+ dev_edge_common = [
GemfileEntry.github('sprockets-rails', 'rails/sprockets-rails'),
GemfileEntry.github('sprockets', 'rails/sprockets'),
GemfileEntry.github('sass-rails', 'rails/sass-rails'),
GemfileEntry.github('arel', 'rails/arel'),
GemfileEntry.github('rack', 'rack/rack')
]
+ if options.dev?
+ [
+ GemfileEntry.path('rails', Rails::Generators::RAILS_DEV_PATH)
+ ] + dev_edge_common
elsif options.edge?
[
- GemfileEntry.github('rails', 'rails/rails'),
- GemfileEntry.github('sprockets-rails', 'rails/sprockets-rails'),
- GemfileEntry.github('sprockets', 'rails/sprockets'),
- GemfileEntry.github('sass-rails', 'rails/sass-rails'),
- GemfileEntry.github('arel', 'rails/arel'),
- GemfileEntry.github('rack', 'rack/rack')
- ]
+ GemfileEntry.github('rails', 'rails/rails')
+ ] + dev_edge_common
else
[GemfileEntry.version('rails',
Rails::VERSION::STRING,