mirror of
https://github.com/internetee/registry.git
synced 2025-05-20 19:29:39 +02:00
deploy and bins scripts now rubocop friendly
This commit is contained in:
parent
1f2c12d7da
commit
d25b5ef29e
6 changed files with 21 additions and 22 deletions
|
@ -6,8 +6,6 @@ AllCops:
|
||||||
# stuff generated by AR and rails
|
# stuff generated by AR and rails
|
||||||
- 'db/schema.rb'
|
- 'db/schema.rb'
|
||||||
- 'db/migrate/*'
|
- 'db/migrate/*'
|
||||||
# spring generated stuff
|
|
||||||
- 'bin/*'
|
|
||||||
# epp support files until 'complexity issues' will be solved
|
# epp support files until 'complexity issues' will be solved
|
||||||
- 'spec/support/epp.rb'
|
- 'spec/support/epp.rb'
|
||||||
- 'spec/support/epp_contact_xml_builder.rb'
|
- 'spec/support/epp_contact_xml_builder.rb'
|
||||||
|
|
1
Gemfile
1
Gemfile
|
@ -115,4 +115,3 @@ group :development, :test do
|
||||||
# For unique IDs (used by the epp gem)
|
# For unique IDs (used by the epp gem)
|
||||||
gem 'uuidtools', '~> 2.1.4'
|
gem 'uuidtools', '~> 2.1.4'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
begin
|
begin
|
||||||
load File.expand_path('../spring', __FILE__)
|
load File.expand_path('../spring', __FILE__)
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
|
puts 'no spring'
|
||||||
end
|
end
|
||||||
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
||||||
require_relative '../config/boot'
|
require_relative '../config/boot'
|
||||||
|
|
1
bin/rake
1
bin/rake
|
@ -2,6 +2,7 @@
|
||||||
begin
|
begin
|
||||||
load File.expand_path('../spring', __FILE__)
|
load File.expand_path('../spring', __FILE__)
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
|
puts 'no spring'
|
||||||
end
|
end
|
||||||
require_relative '../config/boot'
|
require_relative '../config/boot'
|
||||||
require 'rake'
|
require 'rake'
|
||||||
|
|
|
@ -7,9 +7,10 @@ unless defined?(Spring)
|
||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
require 'bundler'
|
require 'bundler'
|
||||||
|
|
||||||
if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ spring \((.*?)\)$.*?^$/m)
|
match = Bundler.default_lockfile.read.match(/^GEM$.*?^ spring \((.*?)\)$.*?^$/m)
|
||||||
|
if match
|
||||||
ENV['GEM_PATH'] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR)
|
ENV['GEM_PATH'] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR)
|
||||||
ENV['GEM_HOME'] = ''
|
ENV['GEM_HOME'] = nil
|
||||||
Gem.paths = ENV
|
Gem.paths = ENV
|
||||||
|
|
||||||
gem 'spring', match[1]
|
gem 'spring', match[1]
|
||||||
|
|
|
@ -42,25 +42,25 @@ end
|
||||||
# Put any custom mkdir's in here for when `mina setup` is ran.
|
# Put any custom mkdir's in here for when `mina setup` is ran.
|
||||||
# For Rails apps, we'll make some of the shared paths that are shared between
|
# For Rails apps, we'll make some of the shared paths that are shared between
|
||||||
# all releases.
|
# all releases.
|
||||||
task :setup => :environment do
|
task setup: :environment do
|
||||||
queue! %[mkdir -p "#{deploy_to}/shared/log"]
|
queue! %(mkdir -p "#{deploy_to}/shared/log")
|
||||||
queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/log"]
|
queue! %(chmod g+rx,u+rwx "#{deploy_to}/shared/log")
|
||||||
|
|
||||||
queue! %[mkdir -p "#{deploy_to}/shared/config"]
|
queue! %(mkdir -p "#{deploy_to}/shared/config")
|
||||||
queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/config"]
|
queue! %(chmod g+rx,u+rwx "#{deploy_to}/shared/config")
|
||||||
|
|
||||||
queue! %[mkdir -p "#{deploy_to}/shared/public"]
|
queue! %(mkdir -p "#{deploy_to}/shared/public")
|
||||||
queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/public"]
|
queue! %(chmod g+rx,u+rwx "#{deploy_to}/shared/public")
|
||||||
|
|
||||||
queue! %[mkdir -p "#{deploy_to}/shared/public/system"]
|
queue! %(mkdir -p "#{deploy_to}/shared/public/system")
|
||||||
queue! %[chmod g+rx,u+rwx "#{deploy_to}/shared/public/system"]
|
queue! %(chmod g+rx,u+rwx "#{deploy_to}/shared/public/system")
|
||||||
|
|
||||||
queue! %[touch "#{deploy_to}/shared/config/database.yml"]
|
queue! %(touch "#{deploy_to}/shared/config/database.yml")
|
||||||
queue %[echo "-----> Be sure to edit 'shared/config/database.yml'."]
|
queue %(echo '-----> Be sure to edit 'shared/config/database.yml'.')
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Deploys the current version to the server."
|
desc 'Deploys the current version to the server.'
|
||||||
task :deploy => :environment do
|
task deploy: :environment do
|
||||||
deploy do
|
deploy do
|
||||||
# Put things that will set up an empty directory into a fully set-up
|
# Put things that will set up an empty directory into a fully set-up
|
||||||
# instance of your project.
|
# instance of your project.
|
||||||
|
@ -82,4 +82,3 @@ end
|
||||||
# - http://nadarei.co/mina/tasks
|
# - http://nadarei.co/mina/tasks
|
||||||
# - http://nadarei.co/mina/settings
|
# - http://nadarei.co/mina/settings
|
||||||
# - http://nadarei.co/mina/helpers
|
# - http://nadarei.co/mina/helpers
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue