0

重要な相違点はこのスクリーンキャストで説明されていますが、2 つのバージョン間でのアプリ コンテキスト ファイルの変更点の包括的なリストを探しています (これもアップグレードのためです)。

4

1 に答える 1

0

以下は、Rails 3.1.0アプリと Rails 3.2.0アプリの注釈付き再帰差分です。Gemfile.lockconfig/initializers/secret_token.rb

.gitignore -- 先頭にスラッシュを追加 (アプリによっては、実行時に以前に無視されたファイルが表示される場合がありgit statusます。おそらくそれらを追加する必要があります)

diff --recursive rails-3.1.0/depot/.gitignore rails-3.2.0/depot/.gitignore
1,5c1,15
< .bundle
< db/*.sqlite3
< log/*.log
< tmp/
< .sass-cache/
---
> # See http://help.github.com/ignore-files/ for more about ignoring files.
> #
> # If you find yourself ignoring temporary files generated by your text editor
> # or operating system, you probably want to add a global ignore instead:
> #   git config --global core.excludesfile ~/.gitignore_global
> 
> # Ignore bundler config
> /.bundle
> 
> # Ignore the default SQLite database.
> /db/*.sqlite3
> 
> # Ignore all logfiles and tempfiles.
> /log/*.log
> /tmp

Gemfile -- ソース リンクに https を追加。gem のバージョンが更新されました。コメントが追加されました。宝石の「ターン」が削除されました

diff --recursive rails-3.1.0/depot/Gemfile rails-3.2.0/depot/Gemfile
1c1
< source 'http://rubygems.org'
---
> source 'https://rubygems.org'
3c3
< gem 'rails', '3.1.0'
---
> gem 'rails', '3.2.0'
6c6
< # gem 'rails',     :git => 'git://github.com/rails/rails.git'
---
> # gem 'rails', :git => 'git://github.com/rails/rails.git'
14,16c14,20
<   gem 'sass-rails', "  ~> 3.1.0"
<   gem 'coffee-rails', "~> 3.1.0"
<   gem 'uglifier'
---
>   gem 'sass-rails',   '~> 3.2.3'
>   gem 'coffee-rails', '~> 3.2.1'
> 
>   # See https://github.com/sstephenson/execjs#readme for more supported runtimes
>   # gem 'therubyracer'
> 
>   gem 'uglifier', '>= 1.0.3'
20a25,30
> # To use ActiveModel has_secure_password
> # gem 'bcrypt-ruby', '~> 3.0.0'
> 
> # To use Jbuilder templates for JSON
> # gem 'jbuilder'
> 
29,33d38
< 
< group :test do
<   # Pretty printed test output
<   gem 'turn', :require => false
< end

app/assets/javascripts/application.js -- コメントが異なります

diff --recursive rails-3.1.0/depot/app/assets/javascripts/application.js rails-3.2.0/depot/app/assets/javascripts/application.js
1,3c1,6
< // This is a manifest file that'll be compiled into including all the files listed below.
< // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
< // be included in the compiled file accessible from http://example.com/assets/application.js
---
> // This is a manifest file that'll be compiled into application.js, which will include all the files
> // listed below.
> //
> // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
> // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
> //
6a10,12
> // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
> // GO AFTER THE REQUIRES BELOW.
> //

app/assets/stylesheets/application.css -- コメントが異なります

diff --recursive rails-3.1.0/depot/app/assets/stylesheets/application.css rails-3.2.0/depot/app/assets/stylesheets/application.css
2,4c2,10
<  * This is a manifest file that'll automatically include all the stylesheets available in this directory
<  * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
<  * the top of the compiled file, but it's generally better to create a new file per style scope.
---
>  * This is a manifest file that'll be compiled into application.css, which will include all the files
>  * listed below.
>  *
>  * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
>  * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
>  *
>  * You're free to add application-wide styles to this file and they'll appear at the top of the
>  * compiled file, but it's generally better to create a new file per style scope.
>  *
6,7c12,13
<  *= require_tree . 
< */
\ No newline at end of file
---
>  *= require_tree .
> */

app/views/layouts/application.html.erb -- オプションを追加 (プル リクエストはこちら)

diff --recursive rails-3.1.0/depot/app/views/layouts/application.html.erb rails-3.2.0/depot/app/views/layouts/application.html.erb
5c5
<   <%= stylesheet_link_tag    "application" %>
---
>   <%= stylesheet_link_tag    "application", :media => "all" %>

config/application.rb -- 括弧が追加され、コメントが追加されました

diff --recursive rails-3.1.0/depot/config/application.rb rails-3.2.0/depot/config/application.rb
7c7
<   Bundler.require *Rails.groups(:assets => %w(development test))
---
>   Bundler.require(*Rails.groups(:assets => %w(development test)))
41a42,52
>     # Use SQL instead of Active Record's schema dumper when creating the database.
>     # This is necessary if your schema can't be completely dumped by the schema dumper,
>     # like if you have constraints or database-specific column types
>     # config.active_record.schema_format = :sql
> 
>     # Enforce whitelist mode for mass assignment.
>     # This will create an empty whitelist of attributes available for mass-assignment for all models
>     # in your app. As such, your models will need to explicitly whitelist or blacklist accessible
>     # parameters by using an attr_accessible or attr_protected declaration.
>     # config.active_record.whitelist_attributes = true
> 

config/environments/development.rb -- コメントと 2 つの構成行が異なります (両方とも追加)

diff --recursive rails-3.1.0/depot/config/environments/development.rb rails-3.2.0/depot/config/environments/development.rb
5c5
<   # every request.  This slows down response time but is perfect for development
---
>   # every request. This slows down response time but is perfect for development
24a25,31
>   # Raise exception on mass assignment protection for Active Record models
>   config.active_record.mass_assignment_sanitizer = :strict
> 
>   # Log the query plan for queries taking more than this (works
>   # with SQLite, MySQL, and PostgreSQL)
>   config.active_record.auto_explain_threshold_in_seconds = 0.5
> 

config/environments/production.rb -- コメントが異なります

diff --recursive rails-3.1.0/depot/config/environments/production.rb rails-3.2.0/depot/config/environments/production.rb
35a36,38
>   # Prepend all log lines with the following tags
>   # config.log_tags = [ :subdomain, :uuid ]
> 
37c40
<   # config.logger = SyslogLogger.new
---
>   # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
59a63,66
> 
>   # Log the query plan for queries taking more than this (works
>   # with SQLite, MySQL, and PostgreSQL)
>   # config.active_record.auto_explain_threshold_in_seconds = 0.5

config/environments/test.rb -- コメントと 2 つの構成行が異なります (1 つが追加され、1 つが削除されました)。

diff --recursive rails-3.1.0/depot/config/environments/test.rb rails-3.2.0/depot/config/environments/test.rb
5c5
<   # test suite.  You never need to work with it otherwise.  Remember that
---
>   # test suite. You never need to work with it otherwise. Remember that
7c7
<   # and recreated between test runs.  Don't rely on the data there!
---
>   # and recreated between test runs. Don't rely on the data there!
32,35c32,33
<   # Use SQL instead of Active Record's schema dumper when creating the test database.
<   # This is necessary if your schema can't be completely dumped by the schema dumper,
<   # like if you have constraints or database-specific column types
<   # config.active_record.schema_format = :sql
---
>   # Raise exception on mass assignment protection for Active Record models
>   config.active_record.mass_assignment_sanitizer = :strict
39,41d36
< 
<   # Allow pass debug_assets=true as a query parameter to load pages with unpackaged assets
<   config.assets.allow_debugging = true

config/initializers/inflections.rb -- コメントを追加

diff --recursive rails-3.1.0/depot/config/initializers/inflections.rb rails-3.2.0/depot/config/initializers/inflections.rb
10a11,15
> #
> # These inflection rules are supported but not enabled by default:
> # ActiveSupport::Inflector.inflections do |inflect|
> #   inflect.acronym 'RESTful'
> # end

config/routes.rb -- コメントを更新 (括弧を変更)

diff --recursive rails-3.1.0/depot/config/routes.rb rails-3.2.0/depot/config/routes.rb
57c57
<   # match ':controller(/:action(/:id(.:format)))'
---
>   # match ':controller(/:action(/:id))(.:format)'

public/500.html -- この行を削除します (デフォルトでは true ではないため、または true にします: http://railscasts.com/episodes/104-exception-notifications-revised )

diff --recursive rails-3.1.0/depot/public/500.html rails-3.2.0/depot/public/500.html
23d22
<     <p>We've been notified about this issue and we'll take a look at it shortly.</p>

public/index.html -- 先頭のスラッシュを削除

diff --recursive rails-3.1.0/depot/public/index.html rails-3.2.0/depot/public/index.html
62c62
<         background-image: url("/assets/rails.png");
---
>         background-image: url("assets/rails.png");

README -- 名前を README.rdoc のみに変更 (内容の違いなし)

Only in rails-3.1.0/depot: README
Only in rails-3.2.0/depot: README.rdoc

vendor/assets/javascripts -- このディレクトリを作成します (内容なし)

Only in rails-3.2.0/depot/vendor/assets: javascripts
于 2012-08-08T18:25:52.080 に答える