diff --git a/Gemfile b/Gemfile index 08ca2e8b1..70367c347 100644 --- a/Gemfile +++ b/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 diff --git a/Gemfile.lock b/Gemfile.lock index 081e2a5cf..683bff3b3 100644 --- a/Gemfile.lock +++ b/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) diff --git a/config/application.rb b/config/application.rb index 0101be8b4..0d82c7492 100644 --- a/config/application.rb +++ b/config/application.rb @@ -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 diff --git a/config/heroku.yml.example b/config/heroku.yml.example deleted file mode 100644 index ba76bc21c..000000000 --- a/config/heroku.yml.example +++ /dev/null @@ -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' diff --git a/lib/tasks/after_deploy.rake b/lib/tasks/after_deploy.rake deleted file mode 100644 index 9a8684a34..000000000 --- a/lib/tasks/after_deploy.rake +++ /dev/null @@ -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 diff --git a/lib/tasks/before_deploy.rake b/lib/tasks/before_deploy.rake deleted file mode 100644 index d56f1f55f..000000000 --- a/lib/tasks/before_deploy.rake +++ /dev/null @@ -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 diff --git a/lib/tasks/heroku.rake b/lib/tasks/heroku.rake deleted file mode 100644 index 87ed08c09..000000000 --- a/lib/tasks/heroku.rake +++ /dev/null @@ -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