capistrano-bundle_rsync 0.4.4 → 0.4.5
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.
- checksums.yaml +4 -4
 - data/.rspec +2 -0
 - data/CHANGELOG.md +6 -0
 - data/README.md +1 -0
 - data/capistrano-bundle_rsync.gemspec +2 -1
 - data/lib/capistrano/bundle_rsync/bundler.rb +5 -1
 - data/lib/capistrano/bundle_rsync/config.rb +17 -0
 - data/spec/capistrano/bundle_rsync/config_spec.rb +34 -0
 - data/spec/spec_helper.rb +4 -0
 - metadata +22 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 3e1b31c3c581bb221734015655f831538c5a83c6
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: f443ff26b43d5a6138fee451d4f977d0c4bd6da0
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 0b570dd79cc62ac32e4ea1309b46edfa3b273a083e8e777b53729f7343caf9a9da1e8c8a5de596fa102eda52e113ecc971eae3e2df6bacbfd0960b2dad0c68df
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 837b4087b1eee2491263402676623ce072da92644777122a105e46a5c0265d6deb11eeaed0fbd08339c94355ab9a5e26090fab5bbde762211634dc939edde54f
         
     | 
    
        data/.rspec
    ADDED
    
    
    
        data/CHANGELOG.md
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | 
         @@ -65,6 +65,7 @@ bundle_rsync_rsync_options | `-az --delete` | Configuration of rsync options. 
     | 
|
| 
       65 
65 
     | 
    
         
             
            bundle_rsync_config_files | `nil` | Additional files to rsync. Specified files are copied into `config` directory.
         
     | 
| 
       66 
66 
     | 
    
         
             
            bundle_rsync_shared_dirs | `nil` | Additional directories to rsync. Specified directories are copied into `shared` directory.
         
     | 
| 
       67 
67 
     | 
    
         
             
            bundle_rsync_skip_bundle | false | (Secret option) Do not `bundle` and rsync bundle.
         
     | 
| 
      
 68 
     | 
    
         
            +
            bundle_rsync_bundle_install_standalone | `nil` | bundle install with --standalone option. Set one of `true`, `false`, an `Array` of groups, or a white space separated `String`.
         
     | 
| 
       68 
69 
     | 
    
         | 
| 
       69 
70 
     | 
    
         
             
            ## Task Orders
         
     | 
| 
       70 
71 
     | 
    
         | 
| 
         @@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) 
     | 
|
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         
             
            Gem::Specification.new do |spec|
         
     | 
| 
       6 
6 
     | 
    
         
             
              spec.name          = "capistrano-bundle_rsync"
         
     | 
| 
       7 
     | 
    
         
            -
              spec.version       = "0.4. 
     | 
| 
      
 7 
     | 
    
         
            +
              spec.version       = "0.4.5"
         
     | 
| 
       8 
8 
     | 
    
         
             
              spec.authors       = ["sonots", "tohae"]
         
     | 
| 
       9 
9 
     | 
    
         
             
              spec.email         = ["sonots@gmail.com", "tohaechan@gmail.com"]
         
     | 
| 
       10 
10 
     | 
    
         
             
              spec.description   = %q{Deploy an application and bundled gems via rsync}
         
     | 
| 
         @@ -21,4 +21,5 @@ Gem::Specification.new do |spec| 
     | 
|
| 
       21 
21 
     | 
    
         
             
              spec.add_dependency 'parallel'
         
     | 
| 
       22 
22 
     | 
    
         
             
              spec.add_development_dependency "bundler", "~> 1.3"
         
     | 
| 
       23 
23 
     | 
    
         
             
              spec.add_development_dependency "rake"
         
     | 
| 
      
 24 
     | 
    
         
            +
              spec.add_development_dependency "rspec", "~> 3"
         
     | 
| 
       24 
25 
     | 
    
         
             
            end
         
     | 
| 
         @@ -5,7 +5,11 @@ class Capistrano::BundleRsync::Bundler < Capistrano::BundleRsync::Base 
     | 
|
| 
       5 
5 
     | 
    
         
             
              def install
         
     | 
| 
       6 
6 
     | 
    
         
             
                Bundler.with_clean_env do
         
     | 
| 
       7 
7 
     | 
    
         
             
                  with bundle_app_config: config.local_base_path do
         
     | 
| 
       8 
     | 
    
         
            -
                     
     | 
| 
      
 8 
     | 
    
         
            +
                    opts = "--gemfile #{config.local_release_path}/Gemfile --deployment --quiet --path #{config.local_bundle_path} --without development test"
         
     | 
| 
      
 9 
     | 
    
         
            +
                    if standalone = config.bundle_install_standalone_option
         
     | 
| 
      
 10 
     | 
    
         
            +
                      opts += " #{standalone}"
         
     | 
| 
      
 11 
     | 
    
         
            +
                    end
         
     | 
| 
      
 12 
     | 
    
         
            +
                    execute :bundle, opts
         
     | 
| 
       9 
13 
     | 
    
         
             
                    execute :rm, "#{config.local_base_path}/config"
         
     | 
| 
       10 
14 
     | 
    
         
             
                  end
         
     | 
| 
       11 
15 
     | 
    
         
             
                end
         
     | 
| 
         @@ -92,5 +92,22 @@ module Capistrano::BundleRsync 
     | 
|
| 
       92 
92 
     | 
    
         
             
                def self.skip_bundle
         
     | 
| 
       93 
93 
     | 
    
         
             
                  fetch(:bundle_rsync_skip_bundle)
         
     | 
| 
       94 
94 
     | 
    
         
             
                end
         
     | 
| 
      
 95 
     | 
    
         
            +
             
     | 
| 
      
 96 
     | 
    
         
            +
                def self.bundle_install_standalone
         
     | 
| 
      
 97 
     | 
    
         
            +
                  fetch(:bundle_rsync_bundle_install_standalone)
         
     | 
| 
      
 98 
     | 
    
         
            +
                end
         
     | 
| 
      
 99 
     | 
    
         
            +
             
     | 
| 
      
 100 
     | 
    
         
            +
                def self.bundle_install_standalone_option
         
     | 
| 
      
 101 
     | 
    
         
            +
                  case value = self.bundle_install_standalone
         
     | 
| 
      
 102 
     | 
    
         
            +
                  when true
         
     | 
| 
      
 103 
     | 
    
         
            +
                    "--standalone"
         
     | 
| 
      
 104 
     | 
    
         
            +
                  when Array
         
     | 
| 
      
 105 
     | 
    
         
            +
                    "--standalone #{value.join(' ')}"
         
     | 
| 
      
 106 
     | 
    
         
            +
                  when String
         
     | 
| 
      
 107 
     | 
    
         
            +
                    "--standalone #{value}"
         
     | 
| 
      
 108 
     | 
    
         
            +
                  else
         
     | 
| 
      
 109 
     | 
    
         
            +
                    nil
         
     | 
| 
      
 110 
     | 
    
         
            +
                  end
         
     | 
| 
      
 111 
     | 
    
         
            +
                end
         
     | 
| 
       95 
112 
     | 
    
         
             
              end
         
     | 
| 
       96 
113 
     | 
    
         
             
            end
         
     | 
| 
         @@ -0,0 +1,34 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'spec_helper'
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            describe Capistrano::BundleRsync::Config do
         
     | 
| 
      
 4 
     | 
    
         
            +
              describe '.bundle_install_standalone_option' do
         
     | 
| 
      
 5 
     | 
    
         
            +
                before {
         
     | 
| 
      
 6 
     | 
    
         
            +
                  allow(described_class).to receive(:fetch).with(:bundle_rsync_bundle_install_standalone).and_return(value)
         
     | 
| 
      
 7 
     | 
    
         
            +
                }
         
     | 
| 
      
 8 
     | 
    
         
            +
                subject { described_class.bundle_install_standalone_option }
         
     | 
| 
      
 9 
     | 
    
         
            +
                context "`set :bundle_rsync_bundle_install_standalone, nil` or the case that it does not be configured" do
         
     | 
| 
      
 10 
     | 
    
         
            +
                  let(:value) { nil }
         
     | 
| 
      
 11 
     | 
    
         
            +
                  it { should eq nil }
         
     | 
| 
      
 12 
     | 
    
         
            +
                end
         
     | 
| 
      
 13 
     | 
    
         
            +
                context "`set :bundle_rsync_bundle_install_standalone, true`" do
         
     | 
| 
      
 14 
     | 
    
         
            +
                  let(:value) { true }
         
     | 
| 
      
 15 
     | 
    
         
            +
                  it { should eq "--standalone" }
         
     | 
| 
      
 16 
     | 
    
         
            +
                end
         
     | 
| 
      
 17 
     | 
    
         
            +
                context "`set :bundle_rsync_bundle_install_standalone, false`" do
         
     | 
| 
      
 18 
     | 
    
         
            +
                  let(:value) { false }
         
     | 
| 
      
 19 
     | 
    
         
            +
                  it { should eq nil }
         
     | 
| 
      
 20 
     | 
    
         
            +
                end
         
     | 
| 
      
 21 
     | 
    
         
            +
                context "`set :bundle_rsync_bundle_install_standalone, ['foo', 'bar']" do
         
     | 
| 
      
 22 
     | 
    
         
            +
                  let(:value) { %w(foo bar) }
         
     | 
| 
      
 23 
     | 
    
         
            +
                  it { should eq "--standalone foo bar" }
         
     | 
| 
      
 24 
     | 
    
         
            +
                end
         
     | 
| 
      
 25 
     | 
    
         
            +
                context "`set :bundle_rsync_bundle_install_standalone, [:foo, :bar]" do
         
     | 
| 
      
 26 
     | 
    
         
            +
                  let(:value) { [:foo, :bar] }
         
     | 
| 
      
 27 
     | 
    
         
            +
                  it { should eq "--standalone foo bar" }
         
     | 
| 
      
 28 
     | 
    
         
            +
                end
         
     | 
| 
      
 29 
     | 
    
         
            +
                context "`set :bundle_rsync_bundle_install_standalone, 'foo bar'" do
         
     | 
| 
      
 30 
     | 
    
         
            +
                  let(:value) { 'foo bar' }
         
     | 
| 
      
 31 
     | 
    
         
            +
                  it { should eq "--standalone foo bar" }
         
     | 
| 
      
 32 
     | 
    
         
            +
                end
         
     | 
| 
      
 33 
     | 
    
         
            +
              end
         
     | 
| 
      
 34 
     | 
    
         
            +
            end
         
     | 
    
        data/spec/spec_helper.rb
    ADDED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: capistrano-bundle_rsync
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.4. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.4.5
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - sonots
         
     | 
| 
         @@ -9,7 +9,7 @@ authors: 
     | 
|
| 
       9 
9 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       10 
10 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       11 
11 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
     | 
    
         
            -
            date: 2015- 
     | 
| 
      
 12 
     | 
    
         
            +
            date: 2015-08-06 00:00:00.000000000 Z
         
     | 
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: capistrano
         
     | 
| 
         @@ -67,6 +67,20 @@ dependencies: 
     | 
|
| 
       67 
67 
     | 
    
         
             
                - - ">="
         
     | 
| 
       68 
68 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       69 
69 
     | 
    
         
             
                    version: '0'
         
     | 
| 
      
 70 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency
         
     | 
| 
      
 71 
     | 
    
         
            +
              name: rspec
         
     | 
| 
      
 72 
     | 
    
         
            +
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
      
 73 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 74 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 75 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 76 
     | 
    
         
            +
                    version: '3'
         
     | 
| 
      
 77 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 78 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 79 
     | 
    
         
            +
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
      
 80 
     | 
    
         
            +
                requirements:
         
     | 
| 
      
 81 
     | 
    
         
            +
                - - "~>"
         
     | 
| 
      
 82 
     | 
    
         
            +
                  - !ruby/object:Gem::Version
         
     | 
| 
      
 83 
     | 
    
         
            +
                    version: '3'
         
     | 
| 
       70 
84 
     | 
    
         
             
            description: Deploy an application and bundled gems via rsync
         
     | 
| 
       71 
85 
     | 
    
         
             
            email:
         
     | 
| 
       72 
86 
     | 
    
         
             
            - sonots@gmail.com
         
     | 
| 
         @@ -76,6 +90,7 @@ extensions: [] 
     | 
|
| 
       76 
90 
     | 
    
         
             
            extra_rdoc_files: []
         
     | 
| 
       77 
91 
     | 
    
         
             
            files:
         
     | 
| 
       78 
92 
     | 
    
         
             
            - ".gitignore"
         
     | 
| 
      
 93 
     | 
    
         
            +
            - ".rspec"
         
     | 
| 
       79 
94 
     | 
    
         
             
            - CHANGELOG.md
         
     | 
| 
       80 
95 
     | 
    
         
             
            - Gemfile
         
     | 
| 
       81 
96 
     | 
    
         
             
            - LICENSE.txt
         
     | 
| 
         @@ -98,6 +113,8 @@ files: 
     | 
|
| 
       98 
113 
     | 
    
         
             
            - lib/capistrano/bundle_rsync/local_git.rb
         
     | 
| 
       99 
114 
     | 
    
         
             
            - lib/capistrano/bundle_rsync/scm.rb
         
     | 
| 
       100 
115 
     | 
    
         
             
            - lib/capistrano/tasks/bundle_rsync.rake
         
     | 
| 
      
 116 
     | 
    
         
            +
            - spec/capistrano/bundle_rsync/config_spec.rb
         
     | 
| 
      
 117 
     | 
    
         
            +
            - spec/spec_helper.rb
         
     | 
| 
       101 
118 
     | 
    
         
             
            homepage: https://github.com/sonots/capistrano-bundle_rsync
         
     | 
| 
       102 
119 
     | 
    
         
             
            licenses:
         
     | 
| 
       103 
120 
     | 
    
         
             
            - MIT
         
     | 
| 
         @@ -122,4 +139,6 @@ rubygems_version: 2.2.2 
     | 
|
| 
       122 
139 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       123 
140 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       124 
141 
     | 
    
         
             
            summary: Deploy an application and bundled gems via rsync.
         
     | 
| 
       125 
     | 
    
         
            -
            test_files: 
     | 
| 
      
 142 
     | 
    
         
            +
            test_files:
         
     | 
| 
      
 143 
     | 
    
         
            +
            - spec/capistrano/bundle_rsync/config_spec.rb
         
     | 
| 
      
 144 
     | 
    
         
            +
            - spec/spec_helper.rb
         
     |