Snapshot resource and rubocop fix