recap 1.0.6 → 1.0.7
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/README.md +1 -1
 - data/lib/recap/tasks/bootstrap.rb +1 -1
 - data/lib/recap/tasks/deploy.rb +3 -2
 - data/lib/recap/version.rb +1 -1
 - data/spec/tasks/deploy_spec.rb +3 -0
 - metadata +4 -4
 
    
        data/README.md
    CHANGED
    
    | 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # Recap
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
            [Recap](https://github.com/freerange/recap) is an opinionated set of [Capistrano](https://github.com/capistrano/capistrano) deployment recipes,  
     | 
| 
      
 3 
     | 
    
         
            +
            [Recap](https://github.com/freerange/recap) is an opinionated set of [Capistrano](https://github.com/capistrano/capistrano) deployment recipes, that use git's strengths to deploy applications and websites in a fast and simple manner.
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         | 
| 
       6 
6 
     | 
    
         
             
            ## Features & Aims
         
     | 
| 
         @@ -55,7 +55,7 @@ fi 
     | 
|
| 
       55 
55 
     | 
    
         
             
                  end
         
     | 
| 
       56 
56 
     | 
    
         
             
                end
         
     | 
| 
       57 
57 
     | 
    
         | 
| 
       58 
     | 
    
         
            -
                # The `bootstrap:user` task sets up the personal accounts of  
     | 
| 
      
 58 
     | 
    
         
            +
                # The `bootstrap:user` task sets up the personal accounts of users who can deploy applications.
         
     | 
| 
       59 
59 
     | 
    
         
             
                # In order to deploy a particular app, the account's git configuration must be set (so
         
     | 
| 
       60 
60 
     | 
    
         
             
                # that releases can be tagged), and the account must be a member of the application group.
         
     | 
| 
       61 
61 
     | 
    
         
             
                desc 'Sets up the server account used by a deploying user'
         
     | 
    
        data/lib/recap/tasks/deploy.rb
    CHANGED
    
    | 
         @@ -68,11 +68,12 @@ module Recap::Tasks::Deploy 
     | 
|
| 
       68 
68 
     | 
    
         
             
                # task manually as it is run as part of `deploy:setup`.
         
     | 
| 
       69 
69 
     | 
    
         
             
                task :clone_code, :except => {:no_release => true} do
         
     | 
| 
       70 
70 
     | 
    
         
             
                  on_rollback { as_app "rm -fr #{deploy_to}" }
         
     | 
| 
       71 
     | 
    
         
            -
                  # Before cloning, the directory needs to exist and be both readable and  
     | 
| 
      
 71 
     | 
    
         
            +
                  # Before cloning, the directory needs to exist and be both readable and writeable by the application group
         
     | 
| 
       72 
72 
     | 
    
         
             
                  as_app "mkdir -p #{deploy_to}", "~"
         
     | 
| 
       73 
73 
     | 
    
         
             
                  as_app "chmod g+rw #{deploy_to}"
         
     | 
| 
       74 
     | 
    
         
            -
                  # Then clone the code
         
     | 
| 
      
 74 
     | 
    
         
            +
                  # Then clone the code and change to the given branch
         
     | 
| 
       75 
75 
     | 
    
         
             
                  git "clone #{repository} ."
         
     | 
| 
      
 76 
     | 
    
         
            +
                  git "reset --hard origin/#{branch}"
         
     | 
| 
       76 
77 
     | 
    
         
             
                end
         
     | 
| 
       77 
78 
     | 
    
         | 
| 
       78 
79 
     | 
    
         
             
                # The `deploy` task ensures the environment is set, updates the application code,
         
     | 
    
        data/lib/recap/version.rb
    CHANGED
    
    
    
        data/spec/tasks/deploy_spec.rb
    CHANGED
    
    | 
         @@ -131,9 +131,12 @@ describe Recap::Tasks::Deploy do 
     | 
|
| 
       131 
131 
     | 
    
         | 
| 
       132 
132 
     | 
    
         
             
                describe 'deploy:clone_code' do
         
     | 
| 
       133 
133 
     | 
    
         
             
                  it 'creates deploy_to dir, ensures it\'s group writable, then clones the repository into it' do
         
     | 
| 
      
 134 
     | 
    
         
            +
                    config.set :branch, 'given-branch'
         
     | 
| 
      
 135 
     | 
    
         
            +
             
     | 
| 
       134 
136 
     | 
    
         
             
                    namespace.expects(:as_app).with('mkdir -p ' + deploy_to, '~').in_sequence(commands)
         
     | 
| 
       135 
137 
     | 
    
         
             
                    namespace.expects(:as_app).with('chmod g+rw ' + deploy_to).in_sequence(commands)
         
     | 
| 
       136 
138 
     | 
    
         
             
                    namespace.expects(:git).with('clone ' + repository + ' .').in_sequence(commands)
         
     | 
| 
      
 139 
     | 
    
         
            +
                    namespace.expects(:git).with('reset --hard origin/given-branch').in_sequence(commands)
         
     | 
| 
       137 
140 
     | 
    
         
             
                    config.find_and_execute_task('deploy:clone_code')
         
     | 
| 
       138 
141 
     | 
    
         
             
                  end
         
     | 
| 
       139 
142 
     | 
    
         
             
                end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: recap
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.0.7
         
     | 
| 
       5 
5 
     | 
    
         
             
              prerelease: 
         
     | 
| 
       6 
6 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       7 
7 
     | 
    
         
             
            authors:
         
     | 
| 
         @@ -9,7 +9,7 @@ authors: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       10 
10 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       11 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
            date:  
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2013-01-16 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: capistrano
         
     | 
| 
         @@ -266,7 +266,7 @@ required_ruby_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       266 
266 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       267 
267 
     | 
    
         
             
                  segments:
         
     | 
| 
       268 
268 
     | 
    
         
             
                  - 0
         
     | 
| 
       269 
     | 
    
         
            -
                  hash:  
     | 
| 
      
 269 
     | 
    
         
            +
                  hash: 1151781088408316006
         
     | 
| 
       270 
270 
     | 
    
         
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         
     | 
| 
       271 
271 
     | 
    
         
             
              none: false
         
     | 
| 
       272 
272 
     | 
    
         
             
              requirements:
         
     | 
| 
         @@ -275,7 +275,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       275 
275 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       276 
276 
     | 
    
         
             
                  segments:
         
     | 
| 
       277 
277 
     | 
    
         
             
                  - 0
         
     | 
| 
       278 
     | 
    
         
            -
                  hash:  
     | 
| 
      
 278 
     | 
    
         
            +
                  hash: 1151781088408316006
         
     | 
| 
       279 
279 
     | 
    
         
             
            requirements: []
         
     | 
| 
       280 
280 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       281 
281 
     | 
    
         
             
            rubygems_version: 1.8.23
         
     |