Continuous Integration For Rails Project

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

1 comments

Comments 1 - 1 of 1 previous next Post a comment

  • + wxmcan Bob Wang 1 month ago
    Wonderful speech, Thanks, Louie
Post a comment
Embed Video
Edit your comment Cancel

5 Favorites

Continuous Integration For Rails Project - Presentation Transcript

  1. Continuous Integration For Rails Project IN-SRC Studio Louie Zhao
  2. Continuous Integration • A software development practice where members of a team integrate their work frequently • Each integration is verified by an automated build (including test) • significantly reduced integration problems
  3. Firefox Tinderbox http://tinderbox.mozilla.org/showbuilds.cgi?tree=Firefox
  4. Continuous Integration • Maintain a code repository • Automate the build • Every commit should be built • Make the build self-testing • Keep the build fast • Everyone can see the results
  5. CI Solutions for Rails • CruiseControl.rb http://cruisecontrolrb.thoughtworks.com/ • Cerberus http://cerberus.rubyforge.org/ • Run Code Run http://runcoderun.com/ • Integrity http://integrityapp.com/
  6. Integrity • light-weighted • easy to configure • good support for git • works on our own install.
  7. Integrity Production developer Git Push git Build Notification developer repository developer developer CI Server Email Notification
  8. Integrity - Installation • Server Configuration • SUSE Linux • Apache • Passenger • MySQL 5.x
  9. Integrity - Build • The building environment is almost identical to your development environment • Standalone CI server • DB Server • rake ci WITH_PACKAGE_TEST=1
  10. Integrity - Installation http://www.in-src.com/continuous_integration_for_rails_project • $ gem install --passenger integrity • $ integrity install [integrity-diretory] • $ integrity migrate_db config.yml
  11. Integrity - Source • local git repository • /var/git/[project-name].git • remote git repository • ssh://[user]@[hostname]/var/git/[project-name].git
  12. Integrity - Git Hook Up • git post-receive • POST_RECEIVE_URL • Daemons
  13. Integrity - Email Notification
  14. Integrity - Build
  15. Integrity - Build
  16. Integrity - Build
  17. Integrity • Trouble Shooting • http://www.in-src.com/ continuous_integration_for_rails_project
  18. Metric Fu • a set of rake tasks • Saikuro, Flog, Flay, Rcov, Reek, Roodi • sudo gem install jscruggs-metric_fu • rake metrics:all • generate metrics reports
  19. Metric Fu - Configuration
  20. Metric Fu
  21. Rcov
  22. Rcov
  23. Churn
  24. Flay
  25. Flog The higher the score, the harder it is to test
  26. Flog Code Seen as flog flog report class Test class Test Test#blah: (11.2) def blah def blah # 11.2 = 6.0: eval a = eval "1+1" a = eval "1+1" # 1.2 + 6.0 + 1.2: branch if a == 2 then if a == 2 then # 1.2 + 1.2 + 0.4 + 1.2: == puts "yay" puts "yay" # 1.2 1.2: puts end end 1.2: assignment end end 0.4: lit_fixnum end end
  27. Reek • detects common code smells might be hard to read, • Class Variable maintain or evolve, • Control Couple rather than things that are specifically • Data Clump wrong • Duplication • Feature Envy • Large Class • Long Method • Long Parameter List • Nested Iterators • Simulated Polymorphism • Uncommunicative Name • Utility Function
  28. Reek Duplication Feature Envy def double_thing() class Cart @other.thing + @other.thing def price end @item.price + @item.tax end end def double_thing() class Cart thing = @other.thing def price thing + thing @item.price_with_tax end end end class Item def price_with_tax price + tax end end
  29. Reek
  30. Roodi
  31. Roodi • warns you about design issues • AssignmentInConditionalCheck • CaseMissingElseCheck • ClassLineCountCheck • ClassNameCheck • CyclomaticComplexityBlockCheck • CyclomaticComplexityMethodCheck • EmptyRescueBodyCheck • ForLoopCheck • MethodLineCountCheck • MethodNameCheck • ModuleLineCountCheck • ModuleNameCheck • ParameterNumberCheck
  32. Stats
  33. Thank You! louiezhao@in-src.com

+ Louie ZhaoLouie Zhao, 1 month ago

custom

596 views, 5 favs, 2 embeds more stats

introduce continuous integration into the developme more

More info about this document

© All Rights Reserved

Go to text version

  • Total Views 596
    • 499 on SlideShare
    • 97 from embeds
  • Comments 1
  • Favorites 5
  • Downloads 49
Most viewed embeds
  • 85 views on http://www.in-src.com
  • 12 views on http://in-src.com

more

All embeds
  • 85 views on http://www.in-src.com
  • 12 views on http://in-src.com

less

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel
File a copyright complaint
Having problems? Go to our helpdesk?

Categories