projectdx_pipeline 0.1.0 → 0.2.0
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/lib/projectdx_pipeline/file.rb +12 -0
- data/lib/tasks/projectdx_pipeline.rake +6 -1
- data/projectdx_pipeline.gemspec +3 -7
- data/spec/file_spec.rb +22 -0
- metadata +13 -43
    
        data/VERSION
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            0.0 | 
| 1 | 
            +
            0.2.0
         | 
| @@ -1,3 +1,5 @@ | |
| 1 | 
            +
            require 'projectdx_pipeline/file'
         | 
| 2 | 
            +
            require 'projectdx_pipeline/database_configuration_template'
         | 
| 1 3 | 
             
            namespace :pipeline do
         | 
| 2 4 | 
             
              desc "Run commit stage build and tests"
         | 
| 3 5 | 
             
              task :commit => 'commit:default'
         | 
| @@ -9,10 +11,13 @@ namespace :pipeline do | |
| 9 11 |  | 
| 10 12 | 
             
                namespace :configure do
         | 
| 11 13 | 
             
                  task :database do
         | 
| 12 | 
            -
                    require 'projectdx_pipeline/database_configuration_template'
         | 
| 13 14 | 
             
                    dct = ProjectdxPipeline::DatabaseConfigurationTemplate.new('config/database.pipeline.yml')
         | 
| 14 15 | 
             
                    dct.render_to_file('config/database.yml')
         | 
| 15 16 | 
             
                  end
         | 
| 17 | 
            +
             | 
| 18 | 
            +
                  task :cms do
         | 
| 19 | 
            +
                    ProjectdxPipeline::File.copy('config/cms_config.deploy.yml', 'config/cms_config.yml')
         | 
| 20 | 
            +
                  end
         | 
| 16 21 | 
             
                end
         | 
| 17 22 |  | 
| 18 23 | 
             
                namespace :build do
         | 
    
        data/projectdx_pipeline.gemspec
    CHANGED
    
    | @@ -5,7 +5,7 @@ | |
| 5 5 |  | 
| 6 6 | 
             
            Gem::Specification.new do |s|
         | 
| 7 7 | 
             
              s.name = %q{projectdx_pipeline}
         | 
| 8 | 
            -
              s.version = "0. | 
| 8 | 
            +
              s.version = "0.2.0"
         | 
| 9 9 |  | 
| 10 10 | 
             
              s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
         | 
| 11 11 | 
             
              s.authors = ["Renewable Funding"]
         | 
| @@ -28,10 +28,12 @@ Gem::Specification.new do |s| | |
| 28 28 | 
             
                "VERSION",
         | 
| 29 29 | 
             
                "lib/projectdx_pipeline.rb",
         | 
| 30 30 | 
             
                "lib/projectdx_pipeline/database_configuration_template.rb",
         | 
| 31 | 
            +
                "lib/projectdx_pipeline/file.rb",
         | 
| 31 32 | 
             
                "lib/projectdx_pipeline/railtie.rb",
         | 
| 32 33 | 
             
                "lib/tasks/projectdx_pipeline.rake",
         | 
| 33 34 | 
             
                "projectdx_pipeline.gemspec",
         | 
| 34 35 | 
             
                "spec/database_configuration_template_spec.rb",
         | 
| 36 | 
            +
                "spec/file_spec.rb",
         | 
| 35 37 | 
             
                "spec/spec_helper.rb"
         | 
| 36 38 | 
             
              ]
         | 
| 37 39 | 
             
              s.homepage = %q{http://github.com/projectdx/projectdx_pipeline}
         | 
| @@ -45,23 +47,17 @@ Gem::Specification.new do |s| | |
| 45 47 | 
             
                s.specification_version = 3
         | 
| 46 48 |  | 
| 47 49 | 
             
                if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
         | 
| 48 | 
            -
                  s.add_runtime_dependency(%q<capistrano>, ["~> 2.6.0"])
         | 
| 49 | 
            -
                  s.add_runtime_dependency(%q<capistrano-ext>, ["~> 1.2.1"])
         | 
| 50 50 | 
             
                  s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
         | 
| 51 51 | 
             
                  s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
         | 
| 52 52 | 
             
                  s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
         | 
| 53 53 | 
             
                  s.add_development_dependency(%q<rcov>, [">= 0"])
         | 
| 54 54 | 
             
                else
         | 
| 55 | 
            -
                  s.add_dependency(%q<capistrano>, ["~> 2.6.0"])
         | 
| 56 | 
            -
                  s.add_dependency(%q<capistrano-ext>, ["~> 1.2.1"])
         | 
| 57 55 | 
             
                  s.add_dependency(%q<rspec>, ["~> 2.3.0"])
         | 
| 58 56 | 
             
                  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
         | 
| 59 57 | 
             
                  s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
         | 
| 60 58 | 
             
                  s.add_dependency(%q<rcov>, [">= 0"])
         | 
| 61 59 | 
             
                end
         | 
| 62 60 | 
             
              else
         | 
| 63 | 
            -
                s.add_dependency(%q<capistrano>, ["~> 2.6.0"])
         | 
| 64 | 
            -
                s.add_dependency(%q<capistrano-ext>, ["~> 1.2.1"])
         | 
| 65 61 | 
             
                s.add_dependency(%q<rspec>, ["~> 2.3.0"])
         | 
| 66 62 | 
             
                s.add_dependency(%q<bundler>, ["~> 1.0.0"])
         | 
| 67 63 | 
             
                s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
         | 
    
        data/spec/file_spec.rb
    ADDED
    
    | @@ -0,0 +1,22 @@ | |
| 1 | 
            +
            require 'spec_helper'
         | 
| 2 | 
            +
            require 'projectdx_pipeline/file'
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            describe ProjectdxPipeline::File do
         | 
| 5 | 
            +
              describe '#copy' do
         | 
| 6 | 
            +
                before(:each) do
         | 
| 7 | 
            +
                  ::File.stub!(:exist? => false)
         | 
| 8 | 
            +
                  FileUtils.stub!(:cp)
         | 
| 9 | 
            +
                end
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                it 'copies the source file to the destination' do
         | 
| 12 | 
            +
                  FileUtils.should_receive(:cp).with('foo', 'bar')
         | 
| 13 | 
            +
                  ProjectdxPipeline::File.copy('foo', 'bar')
         | 
| 14 | 
            +
                end
         | 
| 15 | 
            +
             | 
| 16 | 
            +
                it 'makes a backup copy of the destination file if it already exists' do
         | 
| 17 | 
            +
                  ::File.should_receive(:exist?).with('bar').and_return(true)
         | 
| 18 | 
            +
                  FileUtils.should_receive(:cp).with('bar', 'bar.bak')
         | 
| 19 | 
            +
                  ProjectdxPipeline::File.copy('foo', 'bar')
         | 
| 20 | 
            +
                end
         | 
| 21 | 
            +
              end
         | 
| 22 | 
            +
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,13 +1,13 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: projectdx_pipeline
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              hash:  | 
| 4 | 
            +
              hash: 23
         | 
| 5 5 | 
             
              prerelease: false
         | 
| 6 6 | 
             
              segments: 
         | 
| 7 7 | 
             
              - 0
         | 
| 8 | 
            -
              -  | 
| 8 | 
            +
              - 2
         | 
| 9 9 | 
             
              - 0
         | 
| 10 | 
            -
              version: 0. | 
| 10 | 
            +
              version: 0.2.0
         | 
| 11 11 | 
             
            platform: ruby
         | 
| 12 12 | 
             
            authors: 
         | 
| 13 13 | 
             
            - Renewable Funding
         | 
| @@ -18,43 +18,11 @@ cert_chain: [] | |
| 18 18 | 
             
            date: 2011-12-07 00:00:00 -08:00
         | 
| 19 19 | 
             
            default_executable: 
         | 
| 20 20 | 
             
            dependencies: 
         | 
| 21 | 
            -
            - !ruby/object:Gem::Dependency 
         | 
| 22 | 
            -
              prerelease: false
         | 
| 23 | 
            -
              type: :runtime
         | 
| 24 | 
            -
              name: capistrano
         | 
| 25 | 
            -
              version_requirements: &id001 !ruby/object:Gem::Requirement 
         | 
| 26 | 
            -
                none: false
         | 
| 27 | 
            -
                requirements: 
         | 
| 28 | 
            -
                - - ~>
         | 
| 29 | 
            -
                  - !ruby/object:Gem::Version 
         | 
| 30 | 
            -
                    hash: 23
         | 
| 31 | 
            -
                    segments: 
         | 
| 32 | 
            -
                    - 2
         | 
| 33 | 
            -
                    - 6
         | 
| 34 | 
            -
                    - 0
         | 
| 35 | 
            -
                    version: 2.6.0
         | 
| 36 | 
            -
              requirement: *id001
         | 
| 37 | 
            -
            - !ruby/object:Gem::Dependency 
         | 
| 38 | 
            -
              prerelease: false
         | 
| 39 | 
            -
              type: :runtime
         | 
| 40 | 
            -
              name: capistrano-ext
         | 
| 41 | 
            -
              version_requirements: &id002 !ruby/object:Gem::Requirement 
         | 
| 42 | 
            -
                none: false
         | 
| 43 | 
            -
                requirements: 
         | 
| 44 | 
            -
                - - ~>
         | 
| 45 | 
            -
                  - !ruby/object:Gem::Version 
         | 
| 46 | 
            -
                    hash: 29
         | 
| 47 | 
            -
                    segments: 
         | 
| 48 | 
            -
                    - 1
         | 
| 49 | 
            -
                    - 2
         | 
| 50 | 
            -
                    - 1
         | 
| 51 | 
            -
                    version: 1.2.1
         | 
| 52 | 
            -
              requirement: *id002
         | 
| 53 21 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 54 22 | 
             
              prerelease: false
         | 
| 55 23 | 
             
              type: :development
         | 
| 56 24 | 
             
              name: rspec
         | 
| 57 | 
            -
              version_requirements: & | 
| 25 | 
            +
              version_requirements: &id001 !ruby/object:Gem::Requirement 
         | 
| 58 26 | 
             
                none: false
         | 
| 59 27 | 
             
                requirements: 
         | 
| 60 28 | 
             
                - - ~>
         | 
| @@ -65,12 +33,12 @@ dependencies: | |
| 65 33 | 
             
                    - 3
         | 
| 66 34 | 
             
                    - 0
         | 
| 67 35 | 
             
                    version: 2.3.0
         | 
| 68 | 
            -
              requirement: * | 
| 36 | 
            +
              requirement: *id001
         | 
| 69 37 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 70 38 | 
             
              prerelease: false
         | 
| 71 39 | 
             
              type: :development
         | 
| 72 40 | 
             
              name: bundler
         | 
| 73 | 
            -
              version_requirements: & | 
| 41 | 
            +
              version_requirements: &id002 !ruby/object:Gem::Requirement 
         | 
| 74 42 | 
             
                none: false
         | 
| 75 43 | 
             
                requirements: 
         | 
| 76 44 | 
             
                - - ~>
         | 
| @@ -81,12 +49,12 @@ dependencies: | |
| 81 49 | 
             
                    - 0
         | 
| 82 50 | 
             
                    - 0
         | 
| 83 51 | 
             
                    version: 1.0.0
         | 
| 84 | 
            -
              requirement: * | 
| 52 | 
            +
              requirement: *id002
         | 
| 85 53 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 86 54 | 
             
              prerelease: false
         | 
| 87 55 | 
             
              type: :development
         | 
| 88 56 | 
             
              name: jeweler
         | 
| 89 | 
            -
              version_requirements: & | 
| 57 | 
            +
              version_requirements: &id003 !ruby/object:Gem::Requirement 
         | 
| 90 58 | 
             
                none: false
         | 
| 91 59 | 
             
                requirements: 
         | 
| 92 60 | 
             
                - - ~>
         | 
| @@ -97,12 +65,12 @@ dependencies: | |
| 97 65 | 
             
                    - 6
         | 
| 98 66 | 
             
                    - 4
         | 
| 99 67 | 
             
                    version: 1.6.4
         | 
| 100 | 
            -
              requirement: * | 
| 68 | 
            +
              requirement: *id003
         | 
| 101 69 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 102 70 | 
             
              prerelease: false
         | 
| 103 71 | 
             
              type: :development
         | 
| 104 72 | 
             
              name: rcov
         | 
| 105 | 
            -
              version_requirements: & | 
| 73 | 
            +
              version_requirements: &id004 !ruby/object:Gem::Requirement 
         | 
| 106 74 | 
             
                none: false
         | 
| 107 75 | 
             
                requirements: 
         | 
| 108 76 | 
             
                - - ">="
         | 
| @@ -111,7 +79,7 @@ dependencies: | |
| 111 79 | 
             
                    segments: 
         | 
| 112 80 | 
             
                    - 0
         | 
| 113 81 | 
             
                    version: "0"
         | 
| 114 | 
            -
              requirement: * | 
| 82 | 
            +
              requirement: *id004
         | 
| 115 83 | 
             
            description: Common pipeline tasks and libraries to be used for all components of the ProjectDX platform
         | 
| 116 84 | 
             
            email: devteam@renewfund.com
         | 
| 117 85 | 
             
            executables: []
         | 
| @@ -133,10 +101,12 @@ files: | |
| 133 101 | 
             
            - VERSION
         | 
| 134 102 | 
             
            - lib/projectdx_pipeline.rb
         | 
| 135 103 | 
             
            - lib/projectdx_pipeline/database_configuration_template.rb
         | 
| 104 | 
            +
            - lib/projectdx_pipeline/file.rb
         | 
| 136 105 | 
             
            - lib/projectdx_pipeline/railtie.rb
         | 
| 137 106 | 
             
            - lib/tasks/projectdx_pipeline.rake
         | 
| 138 107 | 
             
            - projectdx_pipeline.gemspec
         | 
| 139 108 | 
             
            - spec/database_configuration_template_spec.rb
         | 
| 109 | 
            +
            - spec/file_spec.rb
         | 
| 140 110 | 
             
            - spec/spec_helper.rb
         | 
| 141 111 | 
             
            has_rdoc: true
         | 
| 142 112 | 
             
            homepage: http://github.com/projectdx/projectdx_pipeline
         |