Sha256: 0688c4b5c42803a154f3814b72d26d6ce4efc3d8b836dd2a2ba83cee71b4a407
Contents?: true
Size: 1.07 KB
Versions: 3
Compression:
Stored size: 1.07 KB
Contents
require 'rubygems' require 'rspec' require 'rails' require 'active_record' require "carrierwave" require 'carrierwave/orm/activerecord' require 'carrierwave/processing/mini_magick' $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 # 测试的时候需要修改这个地方 ALIYUN_ACCESS_ID = "1OpWEtPTjIDv5u8q" ALIYUN_ACCESS_KEY = 'cz12XgPfEVy8Xe9F9UJJHmVdHBJ9bi' ALIYUN_BUCKET = "carrierwave-aliyun-test" 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
carrierwave-aliyun-0.4.2 | spec/spec_helper.rb |
carrierwave-aliyun-0.4.1 | spec/spec_helper.rb |
carrierwave-aliyun-0.4.0 | spec/spec_helper.rb |