rakecap 0.0.1
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/.gitignore +4 -0
 - data/Gemfile +4 -0
 - data/Rakefile +1 -0
 - data/lib/rakecap/cap/git.rb +24 -0
 - data/lib/rakecap/version.rb +3 -0
 - data/lib/rakecap.rb +5 -0
 - data/rakecap.gemspec +20 -0
 - metadata +72 -0
 
    
        data/.gitignore
    ADDED
    
    
    
        data/Gemfile
    ADDED
    
    
    
        data/Rakefile
    ADDED
    
    | 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'bundler/gem_tasks'
         
     | 
| 
         @@ -0,0 +1,24 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            Capistrano::Configuration.instance.load do
         
     | 
| 
      
 2 
     | 
    
         
            +
              namespace :git do
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
                task :tag, :except => { :no_release => true } do
         
     | 
| 
      
 5 
     | 
    
         
            +
                  new_tag = "#{stage}_#{Time.now.strftime("%Y%m%d%H%M%S")}"
         
     | 
| 
      
 6 
     | 
    
         
            +
                  cmd = [
         
     | 
| 
      
 7 
     | 
    
         
            +
                    "git checkout #{branch}",
         
     | 
| 
      
 8 
     | 
    
         
            +
                    "git tag -a #{new_tag} -m \"rails_env: #{rails_env}, stage: #{stage}\" #{real_revision}",
         
     | 
| 
      
 9 
     | 
    
         
            +
                    "git push origin #{new_tag}",
         
     | 
| 
      
 10 
     | 
    
         
            +
                    "rake git:tags:flush",
         
     | 
| 
      
 11 
     | 
    
         
            +
                  ].join(";")
         
     | 
| 
      
 12 
     | 
    
         
            +
                  puts "Executing: #{cmd}"
         
     | 
| 
      
 13 
     | 
    
         
            +
                  `#{cmd}`
         
     | 
| 
      
 14 
     | 
    
         
            +
                end
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
                task :change_log do
         
     | 
| 
      
 17 
     | 
    
         
            +
                  last_commit_tag = `git tag -l '#{stage}*'`.split("\n").last
         
     | 
| 
      
 18 
     | 
    
         
            +
                  cmd = "git log --format=oneline --abbrev-commit #{last_commit_tag}..#{branch}"
         
     | 
| 
      
 19 
     | 
    
         
            +
                  commit_log = `#{cmd}`
         
     | 
| 
      
 20 
     | 
    
         
            +
                  Notifier.deliver_deploy_notification("Deployed #{branch} to #{stage}: commit log", commit_log)
         
     | 
| 
      
 21 
     | 
    
         
            +
                end
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
              end
         
     | 
| 
      
 24 
     | 
    
         
            +
            end
         
     | 
    
        data/lib/rakecap.rb
    ADDED
    
    
    
        data/rakecap.gemspec
    ADDED
    
    | 
         @@ -0,0 +1,20 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # -*- encoding: utf-8 -*-
         
     | 
| 
      
 2 
     | 
    
         
            +
            $:.push File.expand_path("../lib", __FILE__)
         
     | 
| 
      
 3 
     | 
    
         
            +
            require "rakecap/version"
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            Gem::Specification.new do |s|
         
     | 
| 
      
 6 
     | 
    
         
            +
              s.name        = "rakecap"
         
     | 
| 
      
 7 
     | 
    
         
            +
              s.version     = Rakecap::VERSION
         
     | 
| 
      
 8 
     | 
    
         
            +
              s.authors     = ["Sharad Jain"]
         
     | 
| 
      
 9 
     | 
    
         
            +
              s.email       = ["shaanjain@gmail.com"]
         
     | 
| 
      
 10 
     | 
    
         
            +
              s.homepage    = ""
         
     | 
| 
      
 11 
     | 
    
         
            +
              s.summary     = %q{A collection of generic useful rake tasks and capistrano recipes.}
         
     | 
| 
      
 12 
     | 
    
         
            +
              s.description = %q{A collection of generic useful rake tasks and capistrano recipes.}
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
              s.rubyforge_project = "rakecap"
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
              s.files         = `git ls-files`.split("\n")
         
     | 
| 
      
 17 
     | 
    
         
            +
              s.test_files    = `git ls-files -- {test,spec,features}/*`.split("\n")
         
     | 
| 
      
 18 
     | 
    
         
            +
              s.executables   = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
         
     | 
| 
      
 19 
     | 
    
         
            +
              s.require_paths = ["lib"]
         
     | 
| 
      
 20 
     | 
    
         
            +
            end
         
     | 
    
        metadata
    ADDED
    
    | 
         @@ -0,0 +1,72 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            --- !ruby/object:Gem::Specification 
         
     | 
| 
      
 2 
     | 
    
         
            +
            name: rakecap
         
     | 
| 
      
 3 
     | 
    
         
            +
            version: !ruby/object:Gem::Version 
         
     | 
| 
      
 4 
     | 
    
         
            +
              hash: 29
         
     | 
| 
      
 5 
     | 
    
         
            +
              prerelease: 
         
     | 
| 
      
 6 
     | 
    
         
            +
              segments: 
         
     | 
| 
      
 7 
     | 
    
         
            +
              - 0
         
     | 
| 
      
 8 
     | 
    
         
            +
              - 0
         
     | 
| 
      
 9 
     | 
    
         
            +
              - 1
         
     | 
| 
      
 10 
     | 
    
         
            +
              version: 0.0.1
         
     | 
| 
      
 11 
     | 
    
         
            +
            platform: ruby
         
     | 
| 
      
 12 
     | 
    
         
            +
            authors: 
         
     | 
| 
      
 13 
     | 
    
         
            +
            - Sharad Jain
         
     | 
| 
      
 14 
     | 
    
         
            +
            autorequire: 
         
     | 
| 
      
 15 
     | 
    
         
            +
            bindir: bin
         
     | 
| 
      
 16 
     | 
    
         
            +
            cert_chain: []
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
            date: 2011-06-18 00:00:00 Z
         
     | 
| 
      
 19 
     | 
    
         
            +
            dependencies: []
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
            description: A collection of generic useful rake tasks and capistrano recipes.
         
     | 
| 
      
 22 
     | 
    
         
            +
            email: 
         
     | 
| 
      
 23 
     | 
    
         
            +
            - shaanjain@gmail.com
         
     | 
| 
      
 24 
     | 
    
         
            +
            executables: []
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
            extensions: []
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
      
 28 
     | 
    
         
            +
            extra_rdoc_files: []
         
     | 
| 
      
 29 
     | 
    
         
            +
             
     | 
| 
      
 30 
     | 
    
         
            +
            files: 
         
     | 
| 
      
 31 
     | 
    
         
            +
            - .gitignore
         
     | 
| 
      
 32 
     | 
    
         
            +
            - Gemfile
         
     | 
| 
      
 33 
     | 
    
         
            +
            - Rakefile
         
     | 
| 
      
 34 
     | 
    
         
            +
            - lib/rakecap.rb
         
     | 
| 
      
 35 
     | 
    
         
            +
            - lib/rakecap/cap/git.rb
         
     | 
| 
      
 36 
     | 
    
         
            +
            - lib/rakecap/version.rb
         
     | 
| 
      
 37 
     | 
    
         
            +
            - rakecap.gemspec
         
     | 
| 
      
 38 
     | 
    
         
            +
            homepage: ""
         
     | 
| 
      
 39 
     | 
    
         
            +
            licenses: []
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
            post_install_message: 
         
     | 
| 
      
 42 
     | 
    
         
            +
            rdoc_options: []
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
            require_paths: 
         
     | 
| 
      
 45 
     | 
    
         
            +
            - lib
         
     | 
| 
      
 46 
     | 
    
         
            +
            required_ruby_version: !ruby/object:Gem::Requirement 
         
     | 
| 
      
 47 
     | 
    
         
            +
              none: false
         
     | 
| 
      
 48 
     | 
    
         
            +
              requirements: 
         
     | 
| 
      
 49 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 50 
     | 
    
         
            +
                - !ruby/object:Gem::Version 
         
     | 
| 
      
 51 
     | 
    
         
            +
                  hash: 3
         
     | 
| 
      
 52 
     | 
    
         
            +
                  segments: 
         
     | 
| 
      
 53 
     | 
    
         
            +
                  - 0
         
     | 
| 
      
 54 
     | 
    
         
            +
                  version: "0"
         
     | 
| 
      
 55 
     | 
    
         
            +
            required_rubygems_version: !ruby/object:Gem::Requirement 
         
     | 
| 
      
 56 
     | 
    
         
            +
              none: false
         
     | 
| 
      
 57 
     | 
    
         
            +
              requirements: 
         
     | 
| 
      
 58 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 59 
     | 
    
         
            +
                - !ruby/object:Gem::Version 
         
     | 
| 
      
 60 
     | 
    
         
            +
                  hash: 3
         
     | 
| 
      
 61 
     | 
    
         
            +
                  segments: 
         
     | 
| 
      
 62 
     | 
    
         
            +
                  - 0
         
     | 
| 
      
 63 
     | 
    
         
            +
                  version: "0"
         
     | 
| 
      
 64 
     | 
    
         
            +
            requirements: []
         
     | 
| 
      
 65 
     | 
    
         
            +
             
     | 
| 
      
 66 
     | 
    
         
            +
            rubyforge_project: rakecap
         
     | 
| 
      
 67 
     | 
    
         
            +
            rubygems_version: 1.8.4
         
     | 
| 
      
 68 
     | 
    
         
            +
            signing_key: 
         
     | 
| 
      
 69 
     | 
    
         
            +
            specification_version: 3
         
     | 
| 
      
 70 
     | 
    
         
            +
            summary: A collection of generic useful rake tasks and capistrano recipes.
         
     | 
| 
      
 71 
     | 
    
         
            +
            test_files: []
         
     | 
| 
      
 72 
     | 
    
         
            +
             
     |