sbfaulkner-astrovan 0.5.2 → 0.5.3
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.rdoc +4 -2
- data/VERSION.yml +1 -1
- data/lib/astrovan/deploy.rb +18 -1
- data/lib/astrovan/update.rb +0 -2
- metadata +2 -2
    
        data/README.rdoc
    CHANGED
    
    
    
        data/VERSION.yml
    CHANGED
    
    
    
        data/lib/astrovan/deploy.rb
    CHANGED
    
    | @@ -1,3 +1,5 @@ | |
| 1 | 
            +
            require 'uri'
         | 
| 2 | 
            +
             | 
| 1 3 | 
             
            module Astrovan
         | 
| 2 4 | 
             
              module Deploy
         | 
| 3 5 | 
             
                # Deploy an application to the remote servers.
         | 
| @@ -19,7 +21,8 @@ module Astrovan | |
| 19 21 | 
             
                  original_environment = self.environment.dup
         | 
| 20 22 |  | 
| 21 23 | 
             
                  self.repository = repository
         | 
| 22 | 
            -
                  self.application = application = options[:application] || self.application || File.basename( | 
| 24 | 
            +
                  self.application = application = options[:application] || self.application || File.basename(parse_repository_uri(repository).path.split('/').last,".git")
         | 
| 25 | 
            +
             | 
| 23 26 | 
             
                  self.deploy_to = deploy_to = options[:deploy_to] || self.deploy_to || "/u/apps/#{application}"
         | 
| 24 27 | 
             
                  self.shared_path = shared_path = File.join(deploy_to, 'shared')
         | 
| 25 28 | 
             
                  self.shared_repository = shared_repository = File.join(shared_path, "#{application}.git")
         | 
| @@ -48,5 +51,19 @@ module Astrovan | |
| 48 51 | 
             
                def share(path, options = {})
         | 
| 49 52 | 
             
                  symlink "#{shared_path}/#{path}", options.merge(:to => "#{release_path}/#{path}")
         | 
| 50 53 | 
             
                end
         | 
| 54 | 
            +
             | 
| 55 | 
            +
              protected
         | 
| 56 | 
            +
                def parse_repository_uri(uri)
         | 
| 57 | 
            +
                  # [user@]host.xz:/path/to/repo.git/
         | 
| 58 | 
            +
                  # [user@]host.xz:~user/path/to/repo.git/
         | 
| 59 | 
            +
                  # [user@]host.xz:path/to/repo.git
         | 
| 60 | 
            +
                  GIT_REGEXP = %r'^(?:(\w+)@)?((?:\w+.)*\w+):([/~]?[^/].+)$'
         | 
| 61 | 
            +
             | 
| 62 | 
            +
                  if uri =~ GIT_REGEXP
         | 
| 63 | 
            +
                    URI::Generic.new(nil, $1, $2, nil, nil, $3, nil, nil, nil)
         | 
| 64 | 
            +
                  else
         | 
| 65 | 
            +
                    URI.parse(uri)
         | 
| 66 | 
            +
                  end
         | 
| 67 | 
            +
                end
         | 
| 51 68 | 
             
              end
         | 
| 52 69 | 
             
            end
         | 
    
        data/lib/astrovan/update.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: sbfaulkner-astrovan
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              version: 0.5. | 
| 4 | 
            +
              version: 0.5.3
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors: 
         | 
| 7 7 | 
             
            - S. Brent Faulkner
         | 
| @@ -9,7 +9,7 @@ autorequire: | |
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 11 |  | 
| 12 | 
            -
            date: 2009-02- | 
| 12 | 
            +
            date: 2009-02-22 00:00:00 -08:00
         | 
| 13 13 | 
             
            default_executable: 
         | 
| 14 14 | 
             
            dependencies: []
         | 
| 15 15 |  |