Sha256: 72333e7eb31ac74584d62fd12008424dd20f987733f813dca6faed75860e4225
Contents?: true
Size: 936 Bytes
Versions: 7
Compression:
Stored size: 936 Bytes
Contents
# frozen_string_literal: true namespace :rspec_tracer do namespace :remote_cache do desc 'Download cache' task :download do unless system('git', 'rev-parse', 'HEAD', out: File::NULL, err: File::NULL) puts 'Not a git repository' exit end require 'rspec_tracer' RSpecTracer::RemoteCache::Cache.new.download end desc 'Upload cache' task :upload do unless system('git', 'rev-parse', 'HEAD', out: File::NULL, err: File::NULL) puts 'Not a git repository' exit end unless ENV.fetch('CI', 'false') == 'true' || ENV.fetch('RSPEC_TRACER_UPLOAD_LOCAL_CACHE', 'false') == 'true' puts 'Skipping upload from local development environment' puts 'Use RSPEC_TRACER_UPLOAD_LOCAL_CACHE=true to upload local cache' exit end require 'rspec_tracer' RSpecTracer::RemoteCache::Cache.new.upload end end end
Version data entries
7 entries across 7 versions & 1 rubygems