lib/orats/command.rb in orats-0.3.2 vs lib/orats/command.rb in orats-0.4.0
- old
+ new
@@ -30,33 +30,47 @@
rails_template 'base' do
gsub_postgres_info
git_commit 'Change the postgres information'
+ unless @options[:redis_password].empty?
+ gsub_redis_info
+ git_commit 'Add the redis password'
+ end
+
+ gsub_project_path
+ git_commit 'Add the development project path'
+
bundle_install
git_commit 'Add gem lock file'
- run_rake 'db:create:all db:migrate db:test:prepare'
+ bundle_binstubs
+ git_commit 'Add binstubs for the important gems'
+
+ spring_binstub
+ git_commit 'Springify all of the bins'
+
+ run_rake 'db:create:all db:migrate'
git_commit 'Add the database schema file'
end
if @options[:auth]
rails_template 'auth', '--skip ' do
run_rake 'db:migrate db:seed'
end
end
- unless @options[:skip_cook] || @options[:skip_extras]
- cook_app cookbooks_path(@app_name)
+ unless @options[:skip_extras]
+ ansible_init @app_name
end
@active_path = services_path(@app_name)
foreman_init
end
- def cook
- cook_app @app_name
+ def play
+ play_app @app_name
end
def nuke
@active_path = @app_name
@@ -77,17 +91,13 @@
puts "Orats version #{VERSION}"
end
private
def active_project
- project_from_path(@active_path)
+ File.basename @active_path
end
def services_path(app_name)
@options[:skip_extras] ? app_name : "#{app_name}/services/#{active_project}"
- end
-
- def cookbooks_path(app_name)
- "#{app_name}/cookbooks/#{active_project}"
end
end
end
\ No newline at end of file