From 0b9258798495f20e21e6b0871e367f316c016727 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Tue, 3 Jul 2012 22:33:16 -0400 Subject: [PATCH] i can't spell --- bin/{personal_diety => personal_deity} | 8 +-- lib/{personal_diety.rb => personal_deity.rb} | 2 +- lib/personal_diety/capistrano.rb | 68 +++++++++---------- lib/personal_diety/version.rb | 2 +- ...al_diety.gemspec => personal_deity.gemspec | 6 +- skel/capistrano/god.conf | 2 +- 6 files changed, 44 insertions(+), 44 deletions(-) rename bin/{personal_diety => personal_deity} (75%) rename lib/{personal_diety.rb => personal_deity.rb} (92%) rename personal_diety.gemspec => personal_deity.gemspec (79%) diff --git a/bin/personal_diety b/bin/personal_deity similarity index 75% rename from bin/personal_diety rename to bin/personal_deity index 205bc4c..935462c 100755 --- a/bin/personal_diety +++ b/bin/personal_deity @@ -1,13 +1,13 @@ #!/usr/bin/env ruby require 'thor' -require 'personal_diety' +require 'personal_deity' -module PersonalDiety +module PersonalDeity class Cli < Thor include Thor::Actions - def self.source_root ; PersonalDiety.skel.bin ; end + def self.source_root ; PersonalDeity.skel.bin ; end desc "install", "Install personal_diety hooks into Capistrano deployment" def install @@ -23,4 +23,4 @@ module PersonalDiety end end -PersonalDiety::Cli.start +PersonalDeity::Cli.start diff --git a/lib/personal_diety.rb b/lib/personal_deity.rb similarity index 92% rename from lib/personal_diety.rb rename to lib/personal_deity.rb index b6a6fba..43d1922 100644 --- a/lib/personal_diety.rb +++ b/lib/personal_deity.rb @@ -1,6 +1,6 @@ require "personal_diety/version" -module PersonalDiety +module PersonalDeity class Skel def self.root Pathname(File.expand_path('../../skel', __FILE__)) diff --git a/lib/personal_diety/capistrano.rb b/lib/personal_diety/capistrano.rb index 33df589..63736d3 100644 --- a/lib/personal_diety/capistrano.rb +++ b/lib/personal_diety/capistrano.rb @@ -1,5 +1,5 @@ require 'capistrano' -require 'personal_diety' +require 'personal_deity' require 'erb' Capistrano::Configuration.instance(true).load do @@ -9,98 +9,98 @@ Capistrano::Configuration.instance(true).load do _cset(:god_port) { 23132 } _cset(:god_log_level) { :warn } - _cset(:personal_diety_local_app_config) { 'config/god.conf' } + _cset(:personal_deity_local_app_config) { 'config/god.conf' } - def personal_diety_target - @personal_diety_target ||= Pathname(capture("echo $HOME/personal_diety").strip) + def personal_deity_target + @personal_deity_target ||= Pathname(capture("echo $HOME/personal_deity").strip) end - def personal_diety_config_dir - Pathname("#{personal_diety_target}/god.d") + def personal_deity_config_dir + Pathname("#{personal_deity_target}/god.d") end - def personal_diety_command - personal_diety_target.join("god") + def personal_deity_command + personal_deity_target.join("god") end - def generate_personal_diety_command(*args) - "cd #{personal_diety_target} && #{personal_diety_command} #{args.join(' ')}" + def generate_personal_deity_command(*args) + "cd #{personal_deity_target} && #{personal_deity_command} #{args.join(' ')}" end - def run_personal_diety_command(*args) - run generate_personal_diety_command(*args) + "; true" + def run_personal_deity_command(*args) + run generate_personal_deity_command(*args) + "; true" end - namespace :personal_diety do + namespace :personal_deity do desc "Install the God config for this app" task :install do - template = ERB.new(File.read(personal_diety_local_app_config)).result(binding) - upload_target = personal_diety_config_dir.join("#{application}.god") + template = ERB.new(File.read(personal_deity_local_app_config)).result(binding) + upload_target = personal_deity_config_dir.join("#{application}.god") top.upload StringIO.new(template), upload_target.to_s - run_personal_diety_command :load, upload_target.to_s + run_personal_deity_command :load, upload_target.to_s end namespace :service do desc "Set up a copy of God to run for this user" task :setup do - run "mkdir -p #{personal_diety_config_dir.to_s}" + run "mkdir -p #{personal_deity_config_dir.to_s}" - config_path = "#{personal_diety_target}/god.conf" + config_path = "#{personal_deity_target}/god.conf" - PersonalDiety.skel.capistrano.find do |file| + Personaldeity.skel.capistrano.find do |file| if file.file? template = ERB.new(file.read).result(binding) - upload_target = personal_diety_target.join(file.relative_path_from(PersonalDiety.skel.capistrano)) + upload_target = personal_deity_target.join(file.relative_path_from(Personaldeity.skel.capistrano)) top.upload StringIO.new(template), upload_target.to_s run "chmod #{file.stat.mode.to_s(8)[-3..-1]} #{upload_target}" end end - run "cd #{personal_diety_target} && bundle install --path gems" - run "cd #{personal_diety_target} && bundle exec whenever -i god -f schedule.rb" + run "cd #{personal_deity_target} && bundle install --path gems" + run "cd #{personal_deity_target} && bundle exec whenever -i god -f schedule.rb" end desc "Stop the God service" task :stop do - run_personal_diety_command :quit + run_personal_deity_command :quit end desc "Start the God service" task :start do - run_personal_diety_command + run_personal_deity_command end desc "Restart the God service" task :restart do - top.personal_diety.service.stop - top.personal_diety.service.start + top.personal_deity.service.stop + top.personal_deity.service.start end end desc "Stop the God process for this application" task :stop do - run_personal_diety_command :stop, application + run_personal_deity_command :stop, application end desc "Start the God process for this application" task :start do - run_personal_diety_command :start, application + run_personal_deity_command :start, application end desc "Restart the God process for this application" task :restart do - run_personal_diety_command :restart, application + run_personal_deity_command :restart, application end end - before 'deploy:update_symlink', 'personal_diety:install' - before 'deploy:symlink', 'personal_diety:install' + before 'deploy:update_symlink', 'personal_deity:install' + before 'deploy:symlink', 'personal_deity:install' namespace :deploy do - task(:stop) { top.personal_diety.stop } - task(:start) { top.personal_diety.start } - task(:restart) { top.personal_diety.restart } + task(:stop) { top.personal_deity.stop } + task(:start) { top.personal_deity.start } + task(:restart) { top.personal_deity.restart } end end diff --git a/lib/personal_diety/version.rb b/lib/personal_diety/version.rb index 9eb1266..953c757 100644 --- a/lib/personal_diety/version.rb +++ b/lib/personal_diety/version.rb @@ -1,3 +1,3 @@ -module PersonalDiety +module PersonalDeity VERSION = "0.0.1" end diff --git a/personal_diety.gemspec b/personal_deity.gemspec similarity index 79% rename from personal_diety.gemspec rename to personal_deity.gemspec index 6b32b12..04b05ba 100644 --- a/personal_diety.gemspec +++ b/personal_deity.gemspec @@ -1,5 +1,5 @@ # -*- encoding: utf-8 -*- -require File.expand_path('../lib/personal_diety/version', __FILE__) +require File.expand_path('../lib/personal_deity/version', __FILE__) Gem::Specification.new do |gem| gem.authors = ["John Bintz"] @@ -11,9 +11,9 @@ Gem::Specification.new do |gem| gem.files = `git ls-files`.split($\) gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) } gem.test_files = gem.files.grep(%r{^(test|spec|features)/}) - gem.name = "personal_diety" + gem.name = "personal_deity" gem.require_paths = ["lib"] - gem.version = PersonalDiety::VERSION + gem.version = PersonalDeity::VERSION gem.add_dependency 'god' gem.add_dependency 'thin' diff --git a/skel/capistrano/god.conf b/skel/capistrano/god.conf index 680fc67..db560a3 100644 --- a/skel/capistrano/god.conf +++ b/skel/capistrano/god.conf @@ -1,2 +1,2 @@ -Dir["<%= personal_diety_config_dir.to_s %>/*.god"].each { |file| load file } +Dir["<%= personal_deity_config_dir.to_s %>/*.god"].each { |file| load file }