Looking for changes on website content https://projet-alice-demo.herokuapp.com/diffs/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
alice/app/lib/utils.rb

8 lines
227 B

module Utils
def self.diff(a, b, context: 3, limit: 30)
diff = Diffy::Diff.new a, b, context: context
diff = diff.to_s :color
return '...(too much diff)...'.colorize :light_red if diff.lines.size > limit
diff
end
end