Merge branch 'master' of http://gitlab.tp.rulingcom.com/saurabh/orbit-4-2
This commit is contained in:
commit
c55d9fef9b
|
|
@ -1,5 +1,5 @@
|
||||||
class Admin::ModuleStoreController < OrbitBackendController
|
class Admin::ModuleStoreController < OrbitBackendController
|
||||||
before_filter :check_central_server_connection, :only => [:get_extensions]
|
before_filter :check_central_server_connection
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@extensions = get_extensions
|
@extensions = get_extensions
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,7 @@ class Admin::SitesController < OrbitBackendController
|
||||||
%x(git stash) unless need_stash
|
%x(git stash) unless need_stash
|
||||||
%x(git fetch origin)
|
%x(git fetch origin)
|
||||||
pull_result = %x(git pull -r --ff-only 2>&1 origin #{@branch})
|
pull_result = %x(git pull -r --ff-only 2>&1 origin #{@branch})
|
||||||
|
%x(git stash pop) unless need_stash
|
||||||
|
|
||||||
if pull_result.include? "fatal: Not possible to fast-forward, aborting."
|
if pull_result.include? "fatal: Not possible to fast-forward, aborting."
|
||||||
result = "failed"
|
result = "failed"
|
||||||
|
|
@ -138,7 +139,6 @@ class Admin::SitesController < OrbitBackendController
|
||||||
result = "success"
|
result = "success"
|
||||||
Bundler.with_clean_env { `cd #{Rails.root} && bundle install && touch tmp/restart.txt` }
|
Bundler.with_clean_env { `cd #{Rails.root} && bundle install && touch tmp/restart.txt` }
|
||||||
end
|
end
|
||||||
%x(git stash pop) unless need_stash
|
|
||||||
|
|
||||||
render :text => result
|
render :text => result
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ require 'uri'
|
||||||
require 'fileutils'
|
require 'fileutils'
|
||||||
require 'zip/zip'
|
require 'zip/zip'
|
||||||
class Admin::TemplateStoreController < OrbitBackendController
|
class Admin::TemplateStoreController < OrbitBackendController
|
||||||
before_filter :check_central_server_connection, :only => [:get_templates]
|
before_filter :check_central_server_connection
|
||||||
before_filter :set_store
|
before_filter :set_store
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
|
||||||
|
|
@ -483,7 +483,7 @@ class ApplicationController < ActionController::Base
|
||||||
if @site.site_token?
|
if @site.site_token?
|
||||||
flash[:notice]="Connected to the Store"
|
flash[:notice]="Connected to the Store"
|
||||||
else
|
else
|
||||||
redirect_to admin_register_site_index_path
|
redirect_to admin_sites_register_site_path
|
||||||
flash[:notice]="To Access the Store Please Connect It"
|
flash[:notice]="To Access the Store Please Connect It"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ class Site
|
||||||
api_key = STORE_CONFIG[:store_settings]["api_key"]
|
api_key = STORE_CONFIG[:store_settings]["api_key"]
|
||||||
self.generate_site_token
|
self.generate_site_token
|
||||||
store = Store.new(self.id.to_s,self.site_token,api_key)
|
store = Store.new(self.id.to_s,self.site_token,api_key)
|
||||||
store.post_client(self.id.to_s,self.site_token,self.name)
|
store.post_client(self.id.to_s,self.site_token,self.title)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue