Sha256: bf4b22876c0834478b5c40e543ab134df508899fb3c27d387f24d3758b88e678
Contents?: true
Size: 838 Bytes
Versions: 1
Compression:
Stored size: 838 Bytes
Contents
$LOAD_PATH.unshift(File.dirname(__FILE__)) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) require 'rubygems' require 'dropbox.rb' require 'spec' require 'spec/autorun' module ExternalKeysFileHelper def read_keys_file unless File.exist?('keys.json') raise "Please add a keys.json file to the project directory containing your Dropbox API key and secret. See keys.json.example to get started." end keys_file_contents = open("keys.json", "r").read() data = JSON.parse(keys_file_contents) unless %w( key secret email password ).all? { |key| data.include? key } raise "Your keys.json file does contain all the required information. See keys.json.example for more help." end data end end Spec::Runner.configure do |config| config.include(ExternalKeysFileHelper) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dropbox-1.1.2 | spec/spec_helper.rb |