Created
October 16, 2014 22:04
-
-
Save Romiko/3fe7ad88f1c6c86ecae5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'paperclip' | |
gem 'aws-sdk' | |
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
gem 'rails', '4.1.6' | |
# Use sqlite3 as the database for Active Record | |
gem 'sqlite3' | |
# Use SCSS for stylesheets | |
gem 'sass-rails', '~> 4.0.3' | |
# Use Uglifier as compressor for JavaScript assets | |
gem 'uglifier', '>= 1.3.0' | |
# Use CoffeeScript for .js.coffee assets and views | |
gem 'coffee-rails', '~> 4.0.0' | |
# See https://github.com/sstephenson/execjs#readme for more supported runtimes | |
# gem 'therubyracer', platforms: :ruby | |
# Use jquery as the JavaScript library | |
gem 'jquery-rails' | |
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks | |
gem 'turbolinks' | |
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder | |
gem 'jbuilder', '~> 2.0' | |
# bundle exec rake doc:rails generates the API under doc/api. | |
gem 'sdoc', '~> 0.4.0', group: :doc | |
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring | |
gem 'spring', group: :development | |
# Use ActiveModel has_secure_password | |
# gem 'bcrypt', '~> 3.1.7' | |
# Use unicorn as the app server | |
# gem 'unicorn' | |
# Use Capistrano for deployment | |
# gem 'capistrano-rails', group: :development | |
# Use debugger | |
# gem 'debugger', group: [:development, :test] | |
gem 'spree', '2.3.4' | |
gem 'spree_gateway', :git => 'https://github.com/spree/spree_gateway.git', :branch => '2-3-stable' | |
gem 'spree_auth_devise', :git => 'https://github.com/spree/spree_auth_devise.git', :branch => '2-3-stable' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/initializers/spree_images_paperclip.rb | |
bucket = "mybucket.com" | |
if Rails.env.production? | |
bucket = "mybucket.com" | |
end | |
Spree.config do |config| | |
attachment_config = { | |
s3_credentials: { | |
access_key_id: "sdfs", | |
secret_access_key: "sdfsd", | |
bucket: bucket, | |
}, | |
storage: :s3, | |
s3_headers: { "Cache-Control" => "max-age=31557600" }, | |
s3_protocol: "https", | |
bucket: bucket, | |
styles: { | |
mini: "48x48>", | |
small: "100x100>", | |
product: "240x240>", | |
large: "600x600>" | |
}, | |
path: ":rails_root/public/spree/products/:id/:style/:basename.:extension", | |
default_url: "/spree/products/:id/:style/:basename.:extension", | |
default_style: "product", | |
} | |
attachment_config.each do |key, value| | |
Spree::Image.attachment_definitions[:attachment][key.to_sym] = value | |
end | |
Spree::Image.attachment_definitions[:attachment][:url] = ':path' | |
end unless Rails.env.test? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configure Spree Preferences | |
# | |
# Note: Initializing preferences available within the Admin will overwrite any changes that were made through the user interface when you restart. | |
# If you would like users to be able to update a setting with the Admin it should NOT be set here. | |
# | |
# In order to initialize a setting do: | |
# config.setting_name = 'new value' | |
Spree.config do |config| | |
# Example: | |
# Uncomment to stop tracking inventory levels in the application | |
# config.track_inventory_levels = false | |
Spree::Image.attachment_definitions[:attachment][:url] = ':path' | |
Spree::Image.attachment_definitions[:attachment][:path] = '/spree/products/:id/:style/:basename.:extension' | |
end | |
Spree.user_class = "Spree::User" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment