Update sample.rb to use v1beta2