Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Refactor ruby code based on AST

flyerhzm
October 18, 2015

Refactor ruby code based on AST

flyerhzm

October 18, 2015

Transcript

63 slides
  1. DSL • within_file / within_files • with_node / within_node •

    if_exist_node / unless_exist_node • append / insert / insert_after / replace_with / remove • ……
  2. Demo Convert rspec to new syntax Convert rails code from

    2.3 to 3.0 Convert rails code from 3.2 to 4.0
  3. Refs CodeClimate - https://codeclimate.com/ PullReview - https://www.pullreview.com/ flay - https://github.com/seattlerb/flay

    flog - https://github.com/seattlerb/flog brakeman - https://github.com/presidentbeef/brakeman rails_best_practices - https://github.com/railsbp/ rails_best_practices
  4. Refs parsetree - https://github.com/seattlerb/parsetree ruby_parser - https://github.com/seattlerb/ruby_parser parser - https://github.com/whitequark/parser

    rubocop - https://github.com/bbatsov/rubocop transpec - https://github.com/yujinakayama/transpec synvert - https://github.com/xinminlabs/synvert

More Decks by flyerhzm

Other Decks in Programming