drop heroku, heroku_san and associated rake tasks and files
This commit is contained in:
parent
ce728f6b7b
commit
e05c6e8897
7 changed files with 2 additions and 119 deletions
8
Gemfile
8
Gemfile
|
|
@ -1,7 +1,6 @@
|
|||
source 'http://rubygems.org'
|
||||
|
||||
gem 'bundler', '> 1.1.0'
|
||||
ruby '1.9.3' if ENV['HEROKU']
|
||||
|
||||
gem 'rails', '3.2.8'
|
||||
|
||||
|
|
@ -44,12 +43,12 @@ group :production do # we don't install these on travis to speed up test runs
|
|||
# analytics
|
||||
gem 'rack-google-analytics', '0.11.0', :require => 'rack/google-analytics'
|
||||
gem 'rack-piwik', '0.1.3', :require => 'rack/piwik', :require => false
|
||||
|
||||
end
|
||||
|
||||
# configuration
|
||||
|
||||
group :heroku do
|
||||
gem 'pg', '0.14.1'
|
||||
gem 'unicorn', '4.3.1', :require => false
|
||||
end
|
||||
|
||||
|
|
@ -124,8 +123,7 @@ group :assets do
|
|||
gem 'handlebars_assets', '0.6.5'
|
||||
gem 'uglifier', '1.3.0'
|
||||
|
||||
# asset_sync is required as needed by application.rb
|
||||
gem "asset_sync", '0.5.0', :require => nil
|
||||
gem "asset_sync", '0.5.0', :require => false
|
||||
end
|
||||
|
||||
gem 'jquery-rails', '2.1.3'
|
||||
|
|
@ -169,8 +167,6 @@ group :test, :development do
|
|||
end
|
||||
|
||||
group :development do
|
||||
gem 'heroku', '2.31.4'
|
||||
gem 'heroku_san', '3.0.4'
|
||||
gem 'capistrano', '2.12.0', :require => false
|
||||
gem 'capistrano_colors', '0.5.5', :require => false
|
||||
gem 'capistrano-ext', '1.2.1', :require => false
|
||||
|
|
|
|||
22
Gemfile.lock
22
Gemfile.lock
|
|
@ -179,19 +179,6 @@ GEM
|
|||
sprockets (>= 2.0.3)
|
||||
tilt
|
||||
hashie (1.2.0)
|
||||
heroku (2.31.4)
|
||||
heroku-api (~> 0.3.5)
|
||||
launchy (>= 0.3.2)
|
||||
netrc (~> 0.7.7)
|
||||
rest-client (~> 1.6.1)
|
||||
rubyzip
|
||||
heroku-api (0.3.5)
|
||||
excon (~> 0.16.1)
|
||||
heroku_san (3.0.4)
|
||||
activesupport
|
||||
heroku (>= 2)
|
||||
heroku-api (>= 0.1.2)
|
||||
rake
|
||||
highline (1.6.12)
|
||||
hike (1.2.1)
|
||||
hodel_3000_compliant_logger (0.1.0)
|
||||
|
|
@ -223,8 +210,6 @@ GEM
|
|||
actionpack (>= 3.0.0)
|
||||
activesupport (>= 3.0.0)
|
||||
kgio (2.7.4)
|
||||
launchy (2.1.2)
|
||||
addressable (~> 2.3)
|
||||
libwebsocket (0.1.5)
|
||||
listen (0.4.2)
|
||||
rb-fchange (~> 0.0.5)
|
||||
|
|
@ -253,7 +238,6 @@ GEM
|
|||
jruby-pageant (>= 1.1.1)
|
||||
net-ssh-gateway (1.1.0)
|
||||
net-ssh (>= 1.99.1)
|
||||
netrc (0.7.7)
|
||||
newrelic_rpm (3.3.5)
|
||||
nokogiri (1.5.5)
|
||||
oauth (0.4.6)
|
||||
|
|
@ -281,7 +265,6 @@ GEM
|
|||
multi_json (~> 1.3)
|
||||
omniauth-oauth (~> 1.0)
|
||||
orm_adapter (0.4.0)
|
||||
pg (0.14.1)
|
||||
polyglot (0.3.3)
|
||||
rack (1.4.1)
|
||||
rack-cache (1.2)
|
||||
|
|
@ -355,8 +338,6 @@ GEM
|
|||
vegas (~> 0.1.2)
|
||||
resque-timeout (1.0.0)
|
||||
resque (~> 1.0)
|
||||
rest-client (1.6.7)
|
||||
mime-types (>= 1.16)
|
||||
rpm_contrib (2.1.11)
|
||||
newrelic_rpm (>= 3.1.1)
|
||||
newrelic_rpm (>= 3.1.1)
|
||||
|
|
@ -473,8 +454,6 @@ DEPENDENCIES
|
|||
guard-spork (= 0.8.0)
|
||||
haml (= 3.1.7)
|
||||
handlebars_assets (= 0.6.5)
|
||||
heroku (= 2.31.4)
|
||||
heroku_san (= 3.0.4)
|
||||
http_accept_language (= 1.0.2)
|
||||
i18n-inflector-rails (~> 1.0)
|
||||
jasmine (= 1.2.1)
|
||||
|
|
@ -492,7 +471,6 @@ DEPENDENCIES
|
|||
omniauth-facebook (= 1.3.0)
|
||||
omniauth-tumblr (= 1.0)
|
||||
omniauth-twitter (= 0.0.11)
|
||||
pg (= 0.14.1)
|
||||
rack-cors (= 0.2.7)
|
||||
rack-google-analytics (= 0.11.0)
|
||||
rack-piwik (= 0.1.3)
|
||||
|
|
|
|||
|
|
@ -99,8 +99,3 @@ module Diaspora
|
|||
|
||||
end
|
||||
end
|
||||
|
||||
# Only load asset_sync if S3 is configured
|
||||
if RAILS_GROUPS.include?(:assets) && ENV['AWS_ACCESS_KEY_ID']
|
||||
require 'asset_sync'
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
defaults: &defaults
|
||||
HEROKU: true
|
||||
application_yml: <%= '../' + '../' +'config/' + 'diaspora.yml.example' %>
|
||||
production:
|
||||
app: production
|
||||
stack: cedar
|
||||
config:
|
||||
<<: *defaults
|
||||
BUNDLE_WITHOUT: "development:test"
|
||||
HOME_FILE: 'app/views/home/_show.html.haml'
|
||||
staging:
|
||||
app: staging
|
||||
stack: cedar
|
||||
config:
|
||||
<<: *defaults
|
||||
BUNDLE_WITHOUT: "development:test"
|
||||
HOME_FILE: 'app/views/home/_show.html.haml'
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
desc "revert custom landing page commit after heroku san deploys"
|
||||
task :after_deploy => :environment do
|
||||
|
||||
# Perform this task only if custom landing page is not present in app/views/home/_show.html.haml
|
||||
if (File.exist?(Rails.root.join("app", "views", "home", "_show.html.erb")) || File.exist?(Rails.root.join("app", "views", "home", "_show.mobile.erb"))) && system("git log | head -5 | grep 'custom\ landing\ page(s)'")
|
||||
puts "-----> resetting HEAD before custom landing page commit"
|
||||
|
||||
system("git reset HEAD^") ? true : fail
|
||||
system("git stash pop") unless @did_not_stash
|
||||
|
||||
puts "-----> done"
|
||||
end
|
||||
|
||||
end
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
desc "include custom landing page before heroku san deploys"
|
||||
task :before_deploy => :environment do
|
||||
|
||||
each_heroku_app do |stage|
|
||||
desktop_home_file = stage.config['HOME_FILE_DESKTOP']
|
||||
mobile_home_file = stage.config['HOME_FILE_MOBILE']
|
||||
# Perform this task only if custom landing page is not present in app/views/home/_show.html.haml
|
||||
if desktop_home_file.present? || mobile_home_file.present?
|
||||
puts "-----> custom landing page(s) detected..."
|
||||
puts "-----> including custom landing page(s) in a temp commit"
|
||||
|
||||
@did_not_stash = system("git stash| grep 'No local changes to save'")
|
||||
system("git add #{desktop_home_file} -f") ? true : fail
|
||||
system("git add #{mobile_home_file} -f") ? true : fail
|
||||
system("git commit -m 'adding custom landing page(s) for heroku'") ? true : fail
|
||||
|
||||
puts "-----> done"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
#Copyright (c) 2012, Diaspora Inc. This file is
|
||||
#licensed under the Affero General Public License version 3 or later. See
|
||||
#the COPYRIGHT file.
|
||||
|
||||
namespace :heroku do
|
||||
HEROKU_CONFIG_ADD_COMMAND = "heroku config:add"
|
||||
|
||||
task :generate_secret_token do
|
||||
puts "Generating and setting a new secret token"
|
||||
token = SecureRandom.hex(40) #reloads secret token every time you reload vars.... this expires cookies, and kinda sucks
|
||||
command = "#{HEROKU_CONFIG_ADD_COMMAND} SECRET_TOKEN=#{token}"
|
||||
puts command
|
||||
system command
|
||||
end
|
||||
|
||||
task :install_requirements do
|
||||
system 'heroku addons:remove logging:basic'
|
||||
system 'heroku addons:add logging:expanded'
|
||||
system 'heroku addons:add redistogo:nano'
|
||||
end
|
||||
|
||||
task :set_up_s3_sync => [:environment] do
|
||||
fog_provider = "FOG_PROVIDER=AWS"
|
||||
aws_access_key_id = "AWS_ACCESS_KEY_ID=#{AppConfig.environment.s3.key}"
|
||||
aws_secret_access_key = "AWS_SECRET_ACCESS_KEY=#{AppConfig.environment.s3.secret}"
|
||||
fog = "FOG_DIRECTORY=#{AppConfig.environment.s3.bucket}"
|
||||
asset_host = "ASSET_HOST=https://#{AppConfig.environment.s3.bucket}.s3.amazonaws.com"
|
||||
|
||||
each_heroku_app do |stage|
|
||||
system("heroku labs:enable user_env_compile -a #{stage.app}")
|
||||
stage.run('config:add', "#{fog} #{fog_provider} #{aws_secret_access_key} #{aws_access_key_id} ASSET_HOST=#{asset_host}")
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Reference in a new issue