Sha256: 135a0bba9f53b1dc32fcdb6bdc3e8b54a70169654ba13f94d5a957e5f3d9464f
Contents?: true
Size: 1.24 KB
Versions: 2
Compression:
Stored size: 1.24 KB
Contents
require 'rubygems' require 'rspec' require 'rails' require 'active_record' require 'carrierwave' require 'carrierwave/orm/activerecord' require 'carrierwave/processing/mini_magick' require 'open-uri' require 'net/http' $LOAD_PATH.unshift(File.dirname(__FILE__)) $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) require 'carrierwave-aliyun' module Rails class <<self def root [File.expand_path(__FILE__).split('/')[0..-3].join('/'), 'spec'].join('/') end end end ActiveRecord::Migration.verbose = false ActiveRecord::Base.raise_in_transactional_callbacks = true ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:') ALIYUN_ACCESS_ID = ENV['ALIYUN_ACCESS_ID'] || '' ALIYUN_ACCESS_KEY = ENV['ALIYUN_ACCESS_KEY'] || '' ALIYUN_BUCKET = ENV['ALIYUN_BUCKET'] || 'carrierwave-aliyun-test' ALIYUN_AREA = ENV['ALIYUN_AREA'] || 'cn-beijing' CarrierWave.configure do |config| config.storage = :aliyun config.aliyun_access_id = ALIYUN_ACCESS_ID config.aliyun_access_key = ALIYUN_ACCESS_KEY config.aliyun_bucket = ALIYUN_BUCKET config.aliyun_area = ALIYUN_AREA config.aliyun_internal = false end def load_file(fname) File.open([Rails.root, fname].join('/')) end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
carrierwave-aliyun-0.7.1 | spec/spec_helper.rb |
carrierwave-aliyun-0.7.0 | spec/spec_helper.rb |