Use only fog-aws with carrierwave instead of fog (#2569)
Currently dev.to is including the entire fog library just to support image uploads to AWS S3. carrierwave can be used just with fog-aws. I preserved the same exact version is currently used now.
This commit is contained in:
parent
6fbfdd02f6
commit
50ed146515
3 changed files with 5 additions and 148 deletions
2
Gemfile
2
Gemfile
|
|
@ -46,7 +46,7 @@ gem "fastly", "~> 1.15" # Client library for the Fastly acceleration system
|
|||
gem "fastly-rails", "~> 0.8" # Fastly dynamic caching integration for Rails
|
||||
gem "feedjira", "~> 2.2" # A feed fetching and parsing library
|
||||
gem "figaro", "~> 1.1" # Simple, Heroku-friendly Rails app configuration using ENV and a single YAML file
|
||||
gem "fog", "~> 1.41" # The Ruby cloud services library
|
||||
gem "fog-aws", "2.0.0" # 'fog' gem to support Amazon Web Services
|
||||
gem "front_matter_parser", "~> 0.2" # Parse a front matter from syntactically correct strings or files
|
||||
gem "gemoji", "~> 3.0.0" # Character information and metadata for standard and custom emoji
|
||||
gem "gibbon", "~> 3.2" # API wrapper for MailChimp's API
|
||||
|
|
|
|||
142
Gemfile.lock
142
Gemfile.lock
|
|
@ -18,7 +18,6 @@ GEM
|
|||
remote: https://rubygems.org/
|
||||
remote: https://rails-assets.org/
|
||||
specs:
|
||||
CFPropertyList (2.3.6)
|
||||
actioncable (5.2.3)
|
||||
actionpack (= 5.2.3)
|
||||
nio4r (~> 2.0)
|
||||
|
|
@ -332,152 +331,20 @@ GEM
|
|||
ffi (1.10.0)
|
||||
figaro (1.1.1)
|
||||
thor (~> 0.14)
|
||||
fission (0.5.0)
|
||||
CFPropertyList (~> 2.2)
|
||||
fix-db-schema-conflicts (3.0.3)
|
||||
rubocop (>= 0.38.0)
|
||||
fog (1.41.0)
|
||||
fog-aliyun (>= 0.1.0)
|
||||
fog-atmos
|
||||
fog-aws (>= 0.6.0)
|
||||
fog-brightbox (~> 0.4)
|
||||
fog-cloudatcost (~> 0.1.0)
|
||||
fog-core (~> 1.45)
|
||||
fog-digitalocean (>= 0.3.0)
|
||||
fog-dnsimple (~> 1.0)
|
||||
fog-dynect (~> 0.0.2)
|
||||
fog-ecloud (~> 0.1)
|
||||
fog-google (<= 0.1.0)
|
||||
fog-internet-archive
|
||||
fog-joyent
|
||||
fog-json
|
||||
fog-local
|
||||
fog-openstack
|
||||
fog-powerdns (>= 0.1.1)
|
||||
fog-profitbricks
|
||||
fog-rackspace
|
||||
fog-radosgw (>= 0.0.2)
|
||||
fog-riakcs
|
||||
fog-sakuracloud (>= 0.0.4)
|
||||
fog-serverlove
|
||||
fog-softlayer
|
||||
fog-storm_on_demand
|
||||
fog-terremark
|
||||
fog-vmfusion
|
||||
fog-voxel
|
||||
fog-vsphere (>= 0.4.0)
|
||||
fog-xenserver
|
||||
fog-xml (~> 0.1.1)
|
||||
ipaddress (~> 0.5)
|
||||
json (>= 1.8, < 2.0)
|
||||
fog-aliyun (0.2.0)
|
||||
fog-core (~> 1.27)
|
||||
fog-json (~> 1.0)
|
||||
ipaddress (~> 0.8)
|
||||
xml-simple (~> 1.1)
|
||||
fog-atmos (0.1.0)
|
||||
fog-core
|
||||
fog-xml
|
||||
fog-aws (2.0.0)
|
||||
fog-core (~> 1.38)
|
||||
fog-json (~> 1.0)
|
||||
fog-xml (~> 0.1)
|
||||
ipaddress (~> 0.8)
|
||||
fog-brightbox (0.14.0)
|
||||
fog-core (~> 1.22)
|
||||
fog-json
|
||||
inflecto (~> 0.0.2)
|
||||
fog-cloudatcost (0.1.2)
|
||||
fog-core (~> 1.36)
|
||||
fog-json (~> 1.0)
|
||||
fog-xml (~> 0.1)
|
||||
ipaddress (~> 0.8)
|
||||
fog-core (1.45.0)
|
||||
builder
|
||||
excon (~> 0.58)
|
||||
formatador (~> 0.2)
|
||||
fog-digitalocean (0.3.0)
|
||||
fog-core (~> 1.42)
|
||||
fog-json (>= 1.0)
|
||||
fog-xml (>= 0.1)
|
||||
ipaddress (>= 0.5)
|
||||
fog-dnsimple (1.0.0)
|
||||
fog-core (~> 1.38)
|
||||
fog-json (~> 1.0)
|
||||
fog-dynect (0.0.3)
|
||||
fog-core
|
||||
fog-json
|
||||
fog-xml
|
||||
fog-ecloud (0.3.0)
|
||||
fog-core
|
||||
fog-xml
|
||||
fog-google (0.1.0)
|
||||
fog-core
|
||||
fog-json
|
||||
fog-xml
|
||||
fog-internet-archive (0.0.1)
|
||||
fog-core
|
||||
fog-json
|
||||
fog-xml
|
||||
fog-joyent (0.0.1)
|
||||
fog-core (~> 1.42)
|
||||
fog-json (>= 1.0)
|
||||
fog-json (1.0.2)
|
||||
fog-core (~> 1.0)
|
||||
multi_json (~> 1.10)
|
||||
fog-local (0.4.0)
|
||||
fog-core (~> 1.27)
|
||||
fog-openstack (0.1.24)
|
||||
fog-core (~> 1.40)
|
||||
fog-json (>= 1.0)
|
||||
ipaddress (>= 0.8)
|
||||
fog-powerdns (0.1.1)
|
||||
fog-core (~> 1.27)
|
||||
fog-json (~> 1.0)
|
||||
fog-xml (~> 0.1)
|
||||
fog-profitbricks (4.1.1)
|
||||
fog-core (~> 1.42)
|
||||
fog-json (~> 1.0)
|
||||
fog-rackspace (0.1.5)
|
||||
fog-core (>= 1.35)
|
||||
fog-json (>= 1.0)
|
||||
fog-xml (>= 0.1)
|
||||
ipaddress (>= 0.8)
|
||||
fog-radosgw (0.0.5)
|
||||
fog-core (>= 1.21.0)
|
||||
fog-json
|
||||
fog-xml (>= 0.0.1)
|
||||
fog-riakcs (0.1.0)
|
||||
fog-core
|
||||
fog-json
|
||||
fog-xml
|
||||
fog-sakuracloud (1.7.5)
|
||||
fog-core
|
||||
fog-json
|
||||
fog-serverlove (0.1.2)
|
||||
fog-core
|
||||
fog-json
|
||||
fog-softlayer (1.1.4)
|
||||
fog-core
|
||||
fog-json
|
||||
fog-storm_on_demand (0.1.1)
|
||||
fog-core
|
||||
fog-json
|
||||
fog-terremark (0.1.0)
|
||||
fog-core
|
||||
fog-xml
|
||||
fog-vmfusion (0.1.0)
|
||||
fission
|
||||
fog-core
|
||||
fog-voxel (0.1.0)
|
||||
fog-core
|
||||
fog-xml
|
||||
fog-vsphere (1.13.1)
|
||||
fog-core
|
||||
rbvmomi (~> 1.9)
|
||||
fog-xenserver (0.3.0)
|
||||
fog-core
|
||||
fog-xml
|
||||
fog-xml (0.1.3)
|
||||
fog-core
|
||||
nokogiri (>= 1.5.11, < 2.0.0)
|
||||
|
|
@ -550,7 +417,6 @@ GEM
|
|||
i18n (1.6.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
ice_nine (0.11.2)
|
||||
inflecto (0.0.2)
|
||||
inline_svg (1.4.0)
|
||||
activesupport (>= 3.0)
|
||||
nokogiri (>= 1.6)
|
||||
|
|
@ -727,11 +593,6 @@ GEM
|
|||
rb-inotify (0.9.10)
|
||||
ffi (>= 0.5.0, < 2)
|
||||
rbtree3 (0.5.0)
|
||||
rbvmomi (1.11.6)
|
||||
builder (~> 3.0)
|
||||
json (>= 1.8)
|
||||
nokogiri (~> 1.5)
|
||||
trollop (~> 2.1)
|
||||
rdoc (6.1.1)
|
||||
recaptcha (4.14.0)
|
||||
json
|
||||
|
|
@ -948,7 +809,6 @@ GEM
|
|||
websocket-driver (0.7.0)
|
||||
websocket-extensions (>= 0.1.0)
|
||||
websocket-extensions (0.1.3)
|
||||
xml-simple (1.1.5)
|
||||
xpath (3.2.0)
|
||||
nokogiri (~> 1.8)
|
||||
yajl-ruby (1.4.1)
|
||||
|
|
@ -1004,7 +864,7 @@ DEPENDENCIES
|
|||
feedjira (~> 2.2)
|
||||
figaro (~> 1.1)
|
||||
fix-db-schema-conflicts (~> 3.0)
|
||||
fog (~> 1.41)
|
||||
fog-aws (= 2.0.0)
|
||||
foreman!
|
||||
front_matter_parser (~> 0.2)
|
||||
gemoji (~> 3.0.0)
|
||||
|
|
|
|||
|
|
@ -1,13 +1,9 @@
|
|||
require "carrierwave/storage/abstract"
|
||||
require "carrierwave/storage/file"
|
||||
require "carrierwave/storage/fog"
|
||||
|
||||
CarrierWave.configure do |config|
|
||||
if Rails.env.development? || Rails.env.test?
|
||||
config.storage = :file
|
||||
config.enable_processing = false
|
||||
else
|
||||
# config.fog_provider = 'fog-aws'
|
||||
config.storage = :fog
|
||||
config.fog_provider = "fog/aws"
|
||||
config.fog_credentials = {
|
||||
provider: "AWS",
|
||||
aws_access_key_id: ApplicationConfig["AWS_ID"],
|
||||
|
|
@ -15,5 +11,6 @@ CarrierWave.configure do |config|
|
|||
region: "us-east-1"
|
||||
}
|
||||
config.fog_directory = ApplicationConfig["AWS_BUCKET_NAME"]
|
||||
config.storage = :fog
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue