- 浏览: 849753 次
- 性别:
- 来自: lanzhou
文章分类
最新评论
-
liu346435400:
楼主讲了实话啊,中国程序员的现状,也是只见中国程序员拼死拼活的 ...
中国的程序员为什么这么辛苦 -
qw8226718:
国内ASP.NET下功能比较完善,优化比较好的Spacebui ...
国内外开源sns源码大全 -
dotjar:
敢问兰州的大哥,Prism 现在在12.04LTS上可用么?我 ...
最佳 Ubuntu 下 WebQQ 聊天体验 -
coralsea:
兄弟,卫星通信不是这么简单的,单向接收卫星广播信号不需要太大的 ...
Google 上网 -
txin0814:
我成功安装chrome frame后 在IE地址栏前加上cf: ...
IE中使用Google Chrome Frame运行HTML 5
Here's a list of handy shortcuts for BugMashers. If you're having trouble getting the Rails source code set up on your computer, use our Pre-flight Checklist as a guide, or drop by #railsbridge on Freenode IRC to ask for help. You can generate a quick sample application from the Rails source code tree by This will create a new application named rails at the root of your Rails repository. (NOTE: As of Sept 26, rake dev appears to be busted. https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/3261-rake-dev-not-working-on-master has a fix.) If you wish to test patches on Active Record, you'll have to generate test databases for MySQL. Otherwise, most of the Active Record tests won't pass. You should run these tasks in the activerecord directory. There is also a PostgreSQL task for doing the same job given you have PostgreSQL installed on your system. When you're done testing patches, you can delete the generated databases. There are also useful tasks for deleting and regenerating databases if you need to refresh. If you're writing new tests for ActiveRecord, please try to reuse the existing test models instead of adding new ones. Running the whole test suite takes a lot of time? You can run tests in the individual Rails frameworks also. Just cd into the library you wish to test and rake test. Running rake test for Active Record will run tests for MySQL, SQLite3 and PostgreSQL. To run test individually based on different adapters: You should test all three of these widely-used database adapters if you're contributing to Active Record. See rake -T for all the adapters Rails supports, as this is only a fraction of them. Better yet, you can test a separate file for a speed boost. If testing ActiveRecord and you've changed the schema, you have to initialize the database before running the test: First, follow above to create a patch for master. If the same patch applies cleanly to 2-3-stable, just say so in the Lighthouse ticket and the committer will apply it to both. Otherwise, you'll need to generate a separate patch for 2-3-stable (assuming that this issue should be patched on both branches). The first thing to try is just cherry-picking your patch over to 2-3-stable: As a last resort, you can write a completely separate patch for 2.3: NOTE Please keep in mind the core workflow here for Rails itself: Editing someone else's patch: First, apply the existing patch: Then if you need to make changes to the patch (perhaps because Rails has moved on), follow this advice from core: For updating others' patches: preserving authorship is a common courtesy we encourage. The simplest is to assign authorship of the fixed commit to the original author and sign off on it. You can Another scenario is building on an incomplete patch. Rather than apply the patch and commit it as yourself, apply it as the original author. Then do subsequent commits as yourself. This preserves the full history and authorship.Required software
Generating a Rails app on master branch
cd railties
rake dev
Testing Active Record
rake mysql:build_databases
rake postgresql:build_databases
rake mysql:drop_databases
rake postgresql:drop_databases
rake mysql:rebuild_databases
rake postgresql:rebuild_databases
Testing specified frameworks only
cd activesupport
rake test
Testing Active Record
rake test_mysql
rake test_postgresql
rake test_sqlite3
Testing Individual Files
rake test TEST=test/ordered_options_test.rb
rake test_mysql TEST=test/cases/aaa_create_tables_test.rb # update the schema
rake test_mysql
TEST=test/cases/associations/has_many_through_associations_test.rb
Working with Rails and git
Getting the Rails source:
git clone git://github.com/rails/rails.git
cd rails
git checkout -b 2-3-stable origin/2-3-stable # this will leave you on the 2-3-stable branch
(you can also do: git checkout -t origin/2-3-stable # this will also leave you on the 2-3-stable branch)
Working on the master (3.0) branch:
git checkout master
Working on the 2-3-stable branch:
git checkout 2-3-stable
Creating your own feature branch:
git checkout -b my_feature_branch
Apply a patch:
git apply <patch file>
Creating a patch:
git checkout master
git checkout -b my_feature_branch
(write and test code)
git commit -a -m "This is my great patch"
git checkout master
git pull
git checkout my_feature_branch
git rebase master
rake (to be sure tests still patch)
git format-patch master --stdout > my_great_patch.diff
Patching both master and 2-3-stable:
git checkout -b my-feature-2-3 2-3-stable
git cherry-pick <revision of change made to master>
rake test
git format-patch 2-3-stable --stdout > my_great_patch_for_rails23.diff
git checkout 2-3-stable
git checkout -b my_feature_branch
(write and test code)
git commit -a -m "This is my great patch"
git checkout 2-3-stable
git pull
git checkout my_feature_branch
git rebase 2-3-stable
rake (to be sure tests still patch)
git format-patch 2-3-stable --stdout > my_great_patch.diff
git checkout stable
git apply <patch file>
git commit --author "Foo Bar <foobar@example.com>" --signoff
to make a commit this way, or even git commit --amend --author ... --signoff
to change the author and add a signoff to the previous commit.
发表评论
-
Rails 3 Beta版本月将出 Merb融合带来选择
2010-01-11 09:48 1419Rails 3,目前流行Web开发框架Rails的一个升级版 ... -
MerbAdmin:Merb数据管理好帮手
2010-01-11 09:43 907Merb中要加入类似Django的Admin功能早有传闻,如今 ... -
rails cms
2009-12-28 20:29 1669Rails CMS alternatives ======= ... -
Generating Thousands of PDFs on EC2 with Ruby
2009-12-24 18:01 1038The Problem For about two mont ... -
Shrink your JavaScript with the Google Compiler Rails Plugin
2009-11-16 11:27 933Like it or not, JavaScript has ... -
Thank you, Rails
2009-11-06 18:21 567It’s fashionable, or perhaps in ... -
Top 50 Ruby on Rails Websites
2009-10-31 15:18 944We’re big fans of Ruby on Rails ... -
Let a human test your app, not (just) unit tests
2009-10-31 09:26 853I’m a big believer in unit test ... -
Heroku Gets Add-Ons: Serious Ruby Webapp Hosting Made Easy
2009-10-30 07:37 913Heroku is a Ruby webapp hosti ... -
Rails + Google Analytics = easy goal tracking
2009-10-29 20:38 892Google Analytics is an indis ... -
Integrating Flickr into your rails website
2009-10-29 20:37 1067In this post I’m going to show ... -
Ruby on Rails Roadshow in Austin Thursday
2009-10-29 14:25 809Justin Britten founded Prefine ... -
Ruby on Rails and the importance of being stupid
2009-10-21 08:13 806A tale of two servers… Server ... -
How a 1-Engineer Rails Site Scaled to 10 Million Requests Per Day
2009-10-20 14:49 775Ravelry is an online knitting ... -
Installing Rails on CentOS 5
2009-10-20 14:24 1191Note: Since this post origina ... -
CentOS配置lighttpd和rails
2009-10-20 14:22 1123lighttpd版本:1.4.18 fastcgi版本: ... -
Cells:将组件开发带入Ruby2.3
2009-10-20 09:17 1118cells "将使得面向组 ... -
High Quality Ruby on Rails Example Applications
2009-10-15 16:34 1461Sometimes to best way to get ... -
Install Passenger on Ubuntu
2009-10-07 10:17 806Phusion Passenger is one of the ... -
Installing Ruby on Rails with Apache on Ubuntu 9.04 (Jaunty)
2009-10-07 10:00 1015Installing Passenger and Depe ...
相关推荐
"CheatSheet for Mac"就是一款专为Mac用户设计的快捷键查看工具,它能够帮助用户快速了解并记忆系统及应用中的快捷键组合,提升操作效率。这款软件的版本号是1.0.1,且提供免费下载,使得更多用户得以轻松享受便捷的...
标题中的“cheatsheet for mac”指的是Mac操作系统中的一种实用工具,它可以帮助用户快速了解并记忆各种应用程序的快捷键。快捷键是提高工作效率的关键,尤其是在使用计算机时,熟练掌握快捷键能够大大提升工作速度...
《CheatSheet_1.2.9 for MacOS:掌握Mac系统的高效快捷键操作》 在数字化办公的时代,熟练掌握计算机快捷键是提升工作效率的关键。针对Mac操作系统,有一款名为"CheatSheet"的实用工具,其版本1.2.9特别为Mac用户...
标题中的"CheatSheet_1.2.7 最新中文版"指的是CheatSheet这款软件的最新版本1.2.7,它是一款专为Mac操作系统设计的实用工具。CheatSheet的主要功能是帮助用户快速掌握并记忆各种应用程序的快捷键,从而提高在Mac系统...
《CheatSheet_1.3.1:提升软件使用效率的快捷键指南》 在数字化时代,高效使用各种软件已经成为日常工作中不可或缺的技能。而掌握软件的快捷键,无疑是提升工作效率的一大法宝。CheatSheet_1.3.1,这款实用工具,...
标题中的"CheatSheet.app.zip"表明这是一个用于Mac操作系统的应用程序,它被压缩成ZIP格式以方便下载和分发。这个应用程序的主要功能是提供一个快捷键的清单,帮助用户快速了解和使用各种系统及应用的快捷键。 在...
clojure-cheatsheet, 用于Emacs的Clojure Cheatsheet 用于Emacs的难以置信方便的 Clojure Cheatsheet,更新为 Clojure,打包成简单,快速,可以搜索的离线形式: 状态准备使用基于 Clojure 1.7.0.安装如果你连接到 ...
conda cheat sheet,4.6.1 版本。有了这份 conda cheat sheet 再配合 help 命令,基本能解决 conda 使用中的大部分问题。这份 cheat sheet 从官网搬运,上传到 CSDN 资源主要是为了网络环境不太理想的 Python 学习者...
markdown-cheatsheet, 用于 Github README.md的Markdown Cheatsheet Markdown Heading HeadingMarkup : # Heading 1 #-OR-Markup : ============= (below H1 text)标题 2Mark
Python 3 Cheat Sheet 2012-2013 - Laurent Pointal Mémento v1.2.1bis Official Python documentation on http://docs.python.o
CheatSheet for Mac是专门用来查看应用程序快捷键的工具,安装好cheatsheet软件后,在软件界面长按Command键即可快速查看快捷键列表,非常的便捷,想要了解更多关于软件的快捷键,那就赶紧试试cheatsheet for mac吧...
opencv_cheatsheet
x86 assembly cheatsheet
Machine Learning Super VIP Cheatsheet
第18章 备忘单(CheatSheet),swt,eclipse插件开发学习笔记 第18章 备忘单(CheatSheet),swt,eclipse插件开发学习笔记 第18章 备忘单(CheatSheet),swt,eclipse插件开发学习笔记 第18章 备忘单(CheatSheet...
在RAPIDS的cheatsheet中,通常会包括以下几个方面的知识点: 1. 数据操作基础:RAPIDS利用 cudf 库来执行类似Pandas的DataFrame操作。例如,`gdf.sort_values('mpg')`和`gdf.sort_values('mpg', ascending=False)`...
为了提高工作效率和编写更流畅的代码,开发者们常常会使用一些快捷方式或者技巧,这些内容被整理成“cheatsheet”(速查表),以供快速查阅和参考。这次我们讨论的“R cheatsheet advanced”涉及到在使用R语言进行...
**CSS3 CHM版手册和CSS3 Cheat Sheet打包**提供了全面深入学习CSS3的重要资源,这两份资料旨在帮助开发者快速掌握和应用CSS3的各种新特性。CHM版手册和Cheat Sheet结合使用,能有效提升理解和实践能力。 **CSS3 CHM...
Vim cheatsheet中文版 绝对珍藏版 很不错的
标题《CheatSheet合集1.pdf》中包含的知识点: - CheatSheet是一种速查手册,为程序员提供快速查阅各种编程语言和技术的要点、函数、方法和快捷键等重要信息。 - 本合集涵盖了多种编程语言和技术的常见用法和快捷...