Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

removed trailing spaces and tabs

  • Loading branch information...
commit eb89da4d5b942db3cac2f4c95a745d01a7856bac 1 parent f78ed1d
@thomasritz thomasritz authored committed
View
4 deploy.rb.sample
@@ -8,6 +8,6 @@ hosts = ['hooters', 'geni']
#user = 'deploy'
#ssh_opts = ''
#branch = 'master'
-#sudo = false
+#sudo = false
#cache_dirs = %w(public/cache)
-#skip_steps = nil
+#skip_steps = nil
View
6 lib/inploy/deploy.rb
@@ -28,12 +28,12 @@ def configure
if file = configuration_file
deploy = self
eval file.read
- local_variables.each do |variable|
- send "#{variable}=", eval(variable) rescue nil
+ local_variables.each do |variable|
+ send "#{variable}=", eval(variable) rescue nil
end
end
end
-
+
def remote_install(opts)
remote_run "bash < <(wget -O- #{opts[:from]})"
end
View
4 lib/inploy/helper.rb
@@ -11,7 +11,7 @@ def skip_step?(step)
def skip_steps_cmd
" skip_steps=#{skip_steps.join(',')}" unless skip_steps.nil?
end
-
+
def clear_cache
unless skip_step?('clear_cache')
cache_dirs.each do |dir|
@@ -37,7 +37,7 @@ def application_path
end
def copy_sample_files
- ["example", "sample"].each do |extension|
+ ["example", "sample"].each do |extension|
Dir.glob("config/*.#{extension}").each do |file|
secure_copy file, file.gsub(".#{extension}", '')
end
View
2  lib/inploy/servers/thin.rb
@@ -5,7 +5,7 @@ def restart_server
run "thin --pid tmp/pids/thin.pid stop"
run "thin --rackup config.ru --daemonize\
--log log/thin.log --pid tmp/pids/thin.pid --environment production\
- --port 4500 start"
+ --port 4500 start"
end
end
end
View
2  lib/tasks/inploy.rake
@@ -31,7 +31,7 @@ namespace :inploy do
end
desc "Remote Update"
- task :update do
+ task :update do
deploy.remote_update
end
end
View
2  spec/cli_spec.rb
@@ -25,6 +25,6 @@
@deploy.should_receive(:remote_install).with(:from => 'url')
subject.class.execute %w(install from=url)
end
-
+
end
end
View
18 spec/deploy_spec.rb
@@ -27,7 +27,7 @@ def setup(subject)
mute subject
end
- it "should not include sudo when not true" do
+ it "should not include sudo when not true" do
expect_command "ls"
subject.run "ls"
end
@@ -64,7 +64,7 @@ def setup(subject)
it "should use production as the default environment" do
subject.environment.should eql("production")
end
-
+
it "should use deploy as the default user" do
subject.user.should eql("deploy")
end
@@ -76,9 +76,9 @@ def setup(subject)
context "configured" do
before :each do
setup subject
- subject.ssh_opts = @ssh_opts = "-A"
- subject.branch = @branch = "onions"
- subject.environment = @environment = "staging"
+ subject.ssh_opts = @ssh_opts = "-A"
+ subject.branch = @branch = "onions"
+ subject.environment = @environment = "staging"
end
context "on remote setup" do
@@ -93,7 +93,7 @@ def setup(subject)
end
it "should pass skip_steps params to local setup" do
- subject.skip_steps = %w(migrate_database gems_install)
+ subject.skip_steps = %w(migrate_database gems_install)
expect_setup_with @branch, @environment, subject.skip_steps
subject.remote_setup
end
@@ -142,14 +142,14 @@ def setup(subject)
context "on configure" do
it "should evaluate config/deploy.rb by default" do
- file_exists "config/deploy.rb", :content => "application = 'my_application';user = 'my_user'"
+ file_exists "config/deploy.rb", :content => "application = 'my_application';user = 'my_user'"
subject.configure
subject.user.should eql("my_user")
end
it "should evaluate deploy.rb case config/deploy.rb doesnt exists" do
file_doesnt_exists "config/deploy.rb"
- file_exists "deploy.rb", :content => "application = 'my_application';user = 'my_user'"
+ file_exists "deploy.rb", :content => "application = 'my_application';user = 'my_user'"
subject.configure
subject.user.should eql("my_user")
end
@@ -161,7 +161,7 @@ def setup(subject)
end
it "should accept the old school config file 'deploy.lorem = ipsum'" do
- file_exists "config/deploy.rb", :content => "deploy.application = 'my_application';deploy.user = 'my_user'"
+ file_exists "config/deploy.rb", :content => "deploy.application = 'my_application';deploy.user = 'my_user'"
subject.configure
subject.user.should eql("my_user")
end
View
8 spec/shared_examples.rb
@@ -8,7 +8,7 @@
expect_command "rake db:migrate RAILS_ENV=#{subject.environment}"
subject.local_setup
end
-
+
it "should not run migrations if it's on skip_steps" do
subject.skip_steps = ['migrate_database']
dont_accept_command "rake db:migrate RAILS_ENV=#{subject.environment}"
@@ -64,7 +64,7 @@
expect_command "rake gems:install RAILS_ENV=#{subject.environment}"
subject.local_setup
end
-
+
it "should not install gems if it's on skip_steps" do
subject.environment = "en3"
subject.skip_steps = ['install_gems']
@@ -187,7 +187,7 @@
end
subject.local_update
end
-
+
it "should not clean the cache if it's on skip_steps" do
subject.skip_steps = ['clear_cache']
subject.cache_dirs.each do |dir|
@@ -288,7 +288,7 @@
dont_accept_command "whenever --update-crontab #{subject.application} --set 'environment=#{subject.environment}'"
subject.local_update
end
-
+
it "should not update crontab with whenever if update_crontab is in the skip steps" do
file_exists "config/schedule.rb"
subject.skip_steps = %w(update_crontab)
Please sign in to comment.
Something went wrong with that request. Please try again.