From 6ee6a62f925f27f844f133e5dc0c44babf04b7dc Mon Sep 17 00:00:00 2001 From: Soumya Ray Date: Sun, 12 Nov 2017 19:33:41 +0800 Subject: [PATCH] Add env variable fix for production --- Gemfile | 1 - config/environment.rb | 2 +- infrastructure/gitrepo/git_repo.rb | 3 ++- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index b482058..e08ccca 100644 --- a/Gemfile +++ b/Gemfile @@ -33,7 +33,6 @@ group :test do gem 'minitest' gem 'minitest-rg' gem 'rack-test' - gem 'rake' gem 'simplecov' gem 'vcr' gem 'webmock' diff --git a/config/environment.rb b/config/environment.rb index 80f7f2f..da472f7 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -12,7 +12,7 @@ class Api < Roda Econfig.env = environment.to_s Econfig.root = '.' - configure :development do + configure :development do # Allows running reload! in pry to restart entire app def self.reload! exec 'pry -r ./spec/test_load_all' diff --git a/infrastructure/gitrepo/git_repo.rb b/infrastructure/gitrepo/git_repo.rb index 2ab8ea2..de8c21b 100644 --- a/infrastructure/gitrepo/git_repo.rb +++ b/infrastructure/gitrepo/git_repo.rb @@ -41,9 +41,10 @@ class LocalRepo def initialize(remote, repostore_path) @remote = remote @repo_path = [repostore_path, @remote.unique_id].join('/') + clone_remote unless exists? end - def clone_remote(remote) + def clone_remote @remote.local_clone(@repo_path) self end