factorylabs-fdlcap 0.3.16 → 0.3.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
 - data/fdlcap.gemspec +3 -2
 - data/lib/fdlcap/recipes/rolling_restart.rb +31 -0
 - metadata +5 -3
 
    
        data/VERSION
    CHANGED
    
    | 
         @@ -1 +1 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            0.3. 
     | 
| 
      
 1 
     | 
    
         
            +
            0.3.17
         
     | 
    
        data/fdlcap.gemspec
    CHANGED
    
    | 
         @@ -5,11 +5,11 @@ 
     | 
|
| 
       5 
5 
     | 
    
         | 
| 
       6 
6 
     | 
    
         
             
            Gem::Specification.new do |s|
         
     | 
| 
       7 
7 
     | 
    
         
             
              s.name = %q{fdlcap}
         
     | 
| 
       8 
     | 
    
         
            -
              s.version = "0.3. 
     | 
| 
      
 8 
     | 
    
         
            +
              s.version = "0.3.17"
         
     | 
| 
       9 
9 
     | 
    
         | 
| 
       10 
10 
     | 
    
         
             
              s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
         
     | 
| 
       11 
11 
     | 
    
         
             
              s.authors = ["Factory Design Labs"]
         
     | 
| 
       12 
     | 
    
         
            -
              s.date = %q{2009- 
     | 
| 
      
 12 
     | 
    
         
            +
              s.date = %q{2009-09-01}
         
     | 
| 
       13 
13 
     | 
    
         
             
              s.default_executable = %q{fdlcap}
         
     | 
| 
       14 
14 
     | 
    
         
             
              s.email = %q{interactive@factorylabs.com}
         
     | 
| 
       15 
15 
     | 
    
         
             
              s.executables = ["fdlcap"]
         
     | 
| 
         @@ -45,6 +45,7 @@ Gem::Specification.new do |s| 
     | 
|
| 
       45 
45 
     | 
    
         
             
                 "lib/fdlcap/recipes/passenger.rb",
         
     | 
| 
       46 
46 
     | 
    
         
             
                 "lib/fdlcap/recipes/performance.rb",
         
     | 
| 
       47 
47 
     | 
    
         
             
                 "lib/fdlcap/recipes/rake.rb",
         
     | 
| 
      
 48 
     | 
    
         
            +
                 "lib/fdlcap/recipes/rolling_restart.rb",
         
     | 
| 
       48 
49 
     | 
    
         
             
                 "lib/fdlcap/recipes/rsync.rb",
         
     | 
| 
       49 
50 
     | 
    
         
             
                 "lib/fdlcap/recipes/ruby_inline.rb",
         
     | 
| 
       50 
51 
     | 
    
         
             
                 "lib/fdlcap/recipes/sass.rb",
         
     | 
| 
         @@ -0,0 +1,31 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            Capistrano::Configuration.instance(:must_exist).load do
         
     | 
| 
      
 2 
     | 
    
         
            +
              define_recipe :rolling_restart do
         
     | 
| 
      
 3 
     | 
    
         
            +
                
         
     | 
| 
      
 4 
     | 
    
         
            +
                # Define the rolling_restart task for mongrel
         
     | 
| 
      
 5 
     | 
    
         
            +
                namespace :mongrel do
         
     | 
| 
      
 6 
     | 
    
         
            +
                  desc <<-DESC
         
     | 
| 
      
 7 
     | 
    
         
            +
                  Do a rolling restart of mongrels, one app server at a time.
         
     | 
| 
      
 8 
     | 
    
         
            +
                  DESC
         
     | 
| 
      
 9 
     | 
    
         
            +
                  task :rolling_restart do
         
     | 
| 
      
 10 
     | 
    
         
            +
                    find_servers(:roles => :app).each do |server|
         
     | 
| 
      
 11 
     | 
    
         
            +
                      ENV['HOSTS'] = "#{server.host}:#{server.port}"
         
     | 
| 
      
 12 
     | 
    
         
            +
                      nginx.stop
         
     | 
| 
      
 13 
     | 
    
         
            +
                      puts "Waiting 10 seconds for mongrels to finish processing on #{ENV['HOSTS']}."
         
     | 
| 
      
 14 
     | 
    
         
            +
                      sleep 10
         
     | 
| 
      
 15 
     | 
    
         
            +
                      mongrel.restart
         
     | 
| 
      
 16 
     | 
    
         
            +
                      puts "Waiting 30 seconds for mongrels to come back up on #{ENV['HOSTS']}."
         
     | 
| 
      
 17 
     | 
    
         
            +
                      sleep 30
         
     | 
| 
      
 18 
     | 
    
         
            +
                      nginx.start
         
     | 
| 
      
 19 
     | 
    
         
            +
                    end
         
     | 
| 
      
 20 
     | 
    
         
            +
                  end
         
     | 
| 
      
 21 
     | 
    
         
            +
                end
         
     | 
| 
      
 22 
     | 
    
         
            +
                
         
     | 
| 
      
 23 
     | 
    
         
            +
                # Use a rolling restart by default.  Theoretically, if we're doing migrations we should be using deploy:long anyway
         
     | 
| 
      
 24 
     | 
    
         
            +
                namespace :deploy do
         
     | 
| 
      
 25 
     | 
    
         
            +
                  task :restart do
         
     | 
| 
      
 26 
     | 
    
         
            +
                    mongrel.rolling_restart
         
     | 
| 
      
 27 
     | 
    
         
            +
                  end
         
     | 
| 
      
 28 
     | 
    
         
            +
                end
         
     | 
| 
      
 29 
     | 
    
         
            +
                
         
     | 
| 
      
 30 
     | 
    
         
            +
              end
         
     | 
| 
      
 31 
     | 
    
         
            +
            end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification 
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: factorylabs-fdlcap
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version 
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.3. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.3.17
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors: 
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Factory Design Labs
         
     | 
| 
         @@ -9,7 +9,7 @@ autorequire: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
     | 
    
         
            -
            date: 2009- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2009-09-01 00:00:00 -07:00
         
     | 
| 
       13 
13 
     | 
    
         
             
            default_executable: fdlcap
         
     | 
| 
       14 
14 
     | 
    
         
             
            dependencies: 
         
     | 
| 
       15 
15 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
         @@ -89,6 +89,7 @@ files: 
     | 
|
| 
       89 
89 
     | 
    
         
             
            - lib/fdlcap/recipes/passenger.rb
         
     | 
| 
       90 
90 
     | 
    
         
             
            - lib/fdlcap/recipes/performance.rb
         
     | 
| 
       91 
91 
     | 
    
         
             
            - lib/fdlcap/recipes/rake.rb
         
     | 
| 
      
 92 
     | 
    
         
            +
            - lib/fdlcap/recipes/rolling_restart.rb
         
     | 
| 
       92 
93 
     | 
    
         
             
            - lib/fdlcap/recipes/rsync.rb
         
     | 
| 
       93 
94 
     | 
    
         
             
            - lib/fdlcap/recipes/ruby_inline.rb
         
     | 
| 
       94 
95 
     | 
    
         
             
            - lib/fdlcap/recipes/sass.rb
         
     | 
| 
         @@ -107,6 +108,7 @@ files: 
     | 
|
| 
       107 
108 
     | 
    
         
             
            - test/test_helper.rb
         
     | 
| 
       108 
109 
     | 
    
         
             
            has_rdoc: false
         
     | 
| 
       109 
110 
     | 
    
         
             
            homepage: http://github.com/factorylabs/fdlcap
         
     | 
| 
      
 111 
     | 
    
         
            +
            licenses: 
         
     | 
| 
       110 
112 
     | 
    
         
             
            post_install_message: 
         
     | 
| 
       111 
113 
     | 
    
         
             
            rdoc_options: 
         
     | 
| 
       112 
114 
     | 
    
         
             
            - --charset=UTF-8
         
     | 
| 
         @@ -127,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       127 
129 
     | 
    
         
             
            requirements: []
         
     | 
| 
       128 
130 
     | 
    
         | 
| 
       129 
131 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       130 
     | 
    
         
            -
            rubygems_version: 1. 
     | 
| 
      
 132 
     | 
    
         
            +
            rubygems_version: 1.3.5
         
     | 
| 
       131 
133 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       132 
134 
     | 
    
         
             
            specification_version: 3
         
     | 
| 
       133 
135 
     | 
    
         
             
            summary: a set of capistrano recipies we use regularly at Factory Design Labs
         
     |