0

截屏视频涵盖了重要的差异,但我正在寻找两个版本之间应用程序上下文文件更改的综合列表(再次,为了升级)。

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 添加到源链接;宝石版本更新;添加了评论;宝石“转”已移除

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 -- 注释和两个配置行不同(都添加了)

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 -- 注释和两个配置行不同(一个添加,一个删除)

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 -- 删除这一行(因为默认情况下它是不真实的;或者让它成为真实的: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 回答