Sha256: bed4069d7d531a0dbb9e075d1b981a77163bf3e560cc17f782a96dd4ece87511
Contents?: true
Size: 1.01 KB
Versions: 3
Compression:
Stored size: 1.01 KB
Contents
# frozen_string_literal: true require 'rake/testtask' task default: :spec namespace :credentials do require 'yaml' desc 'generate access_token to STDOUT' task :get_access_token do credentials = YAML.load(File.read('config/credentials.yml')) require_relative 'lib/fanswatch/fb_api' ENV['FBAPI_CLIENT_ID'] = credentials[:client_id] ENV['FBAPI_CLIENT_SECRET'] = credentials[:client_secret] puts "Access Token: #{FansWatch::FbApi.access_token}" end desc 'Export sample credentials from file to bash' task :export do credentials = YAML.load(File.read('config/credentials.yml')) puts 'Please run the following in bash:' puts "export FB_CLIENT_ID=#{credentials[:client_id]}" puts "export FB_CLIENT_SECRET=#{credentials[:client_secret]}" end end desc 'run tests' task :spec do sh 'ruby spec/fanswatch_spec.rb' end desc 'delete cassette fixtures' task :wipe do sh 'rm spec/fixtures/cassettes/*.yml' do |ok, _| puts(ok ? 'Cassettes deleted' : 'No casseettes found') end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
fanswatch-0.1.4 | Rakefile |
fanswatch-0.1.3 | Rakefile |
fanswatch-0.1.2 | Rakefile |