Continuous Integration For Rails Project
Upcoming SlideShare
Loading in...5
×
 

Continuous Integration For Rails Project

on

  • 5,683 views

introduce continuous integration into the development process. choose integrity since it’s light-weighted, easy to configure, good support for git and works for ourselves on our own install.

introduce continuous integration into the development process. choose integrity since it’s light-weighted, easy to configure, good support for git and works for ourselves on our own install.

Statistics

Views

Total Views
5,683
Views on SlideShare
5,141
Embed Views
542

Actions

Likes
15
Downloads
89
Comments
2

3 Embeds 542

http://www.in-src.com 435
http://in-src.com 73
http://www.slideshare.net 34

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • rails integration integrity
    Are you sure you want to
    Your message goes here
    Processing…
  • Wonderful speech, Thanks, Louie
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Continuous Integration For Rails Project Continuous Integration For Rails Project Presentation Transcript

  • Continuous Integration For Rails Project IN-SRC Studio Louie Zhao
  • 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
  • Firefox Tinderbox http://tinderbox.mozilla.org/showbuilds.cgi?tree=Firefox
  • 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
  • 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/
  • Integrity • light-weighted • easy to configure • good support for git • works on our own install.
  • Integrity Production developer Git Push git Build Notification developer repository developer developer CI Server Email Notification
  • Integrity - Installation • Server Configuration • SUSE Linux • Apache • Passenger • MySQL 5.x
  • Integrity - Build • The building environment is almost identical to your development environment • Standalone CI server • DB Server • rake ci WITH_PACKAGE_TEST=1
  • 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
  • Integrity - Source • local git repository • /var/git/[project-name].git • remote git repository • ssh://[user]@[hostname]/var/git/[project-name].git
  • Integrity - Git Hook Up • git post-receive • POST_RECEIVE_URL • Daemons
  • Integrity - Email Notification
  • Integrity - Build
  • Integrity - Build
  • Integrity - Build
  • Integrity • Trouble Shooting • http://www.in-src.com/ continuous_integration_for_rails_project
  • 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
  • Metric Fu - Configuration
  • Metric Fu
  • Rcov
  • Rcov
  • Churn
  • Flay
  • Flog The higher the score, the harder it is to test
  • 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
  • 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
  • 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
  • Reek
  • Roodi
  • Roodi • warns you about design issues • AssignmentInConditionalCheck • CaseMissingElseCheck • ClassLineCountCheck • ClassNameCheck • CyclomaticComplexityBlockCheck • CyclomaticComplexityMethodCheck • EmptyRescueBodyCheck • ForLoopCheck • MethodLineCountCheck • MethodNameCheck • ModuleLineCountCheck • ModuleNameCheck • ParameterNumberCheck
  • Stats
  • Thank You! louiezhao@in-src.com