0

截屏中顯示了this的重要區別,但我正在尋找兩個版本之間的應用程序上下文文件更改的全面列表(同樣爲了升級目的)。rails 3.1.0和3.2.0之間的文件差異是什麼? (重新升級)

+0

既然你已經回答了你自己的問題,我建議你並不真的需要我們的人來回答這個給你。 – Gazler 2012-08-08 18:29:45

+0

確實。謝謝。我只是[分享知識](http://blog.stackoverflow.com/2011/07/its-ok-to-ask-and-answer-your-own-questions/),我寧願這樣做比博客.. :) – user664833 2012-08-08 18:45:47

+0

你爲什麼認爲這不是建設性的?這是我的一個實際問題,我研究了答案,然後用於從3.1.0到3.2.0的全面升級。 – user664833 2012-08-09 18:09:54

回答

0

以下是軌道3.1.0應用和軌道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 

應用程序/資產/ Java腳本/ 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. 
> // 

應用程序/資產/樣式表/ 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 . 
> */ 

應用/視圖/佈局/ application.html.erb - OPTIO加入N(here's the pull request

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" %> 

配置/ 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 
> 

配置/環境/ 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/environ發言:/ 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 

配置/環境/ 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 

配置/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)' 

公共/ 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> 

公共/ 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.rdoc(無內容差異)

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

供應商/資產/ JavaScript的 - 創建目錄(內沒有內容)

Only in rails-3.2.0/depot/vendor/assets: javascripts 
相關問題