capistrano-rails-console 0.2.0 → 0.3.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.
- checksums.yaml +4 -4
 - data/lib/capistrano/rails/console/tasks/remote.cap +15 -24
 - data/lib/capistrano/rails/console/version.rb +1 -1
 - metadata +3 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 12ac4916b3376899cefd7d6fdb4ba4d6e5c72058
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 5fa379cd8467643b4e9920f3ff78bdfb27d6d2ad
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: e4b191d98a4bf4ed5e31bab04a5318f44e184d6278340a2ff0b4556d5886059915a6d3c4c4970ca538d4cd2ac60a5542f89f81cc8db3de084dcc88e556bc9ddb
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 50e3db81860d2c18c81a0b818c098361fa24fc061fd4fb1d51f0b17a8296c54f03cb469ab99f81322f8f39b46e17703d62578736c0b43fd942042d1a5436389b
         
     | 
| 
         @@ -1,34 +1,25 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
             
     | 
| 
       2 
     | 
    
         
            -
               
     | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
             
     | 
| 
       7 
     | 
    
         
            -
            end
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
            def bundler_loaded?
         
     | 
| 
       10 
     | 
    
         
            -
              Gem::Specification::find_all_by_name('capistrano-bundler').any?
         
     | 
| 
      
 1 
     | 
    
         
            +
            namespace :load do
         
     | 
| 
      
 2 
     | 
    
         
            +
              task :defaults do
         
     | 
| 
      
 3 
     | 
    
         
            +
                # add rails to rvm_map_bins
         
     | 
| 
      
 4 
     | 
    
         
            +
                rvm_map_bins = fetch(:rvm_map_bins) || []
         
     | 
| 
      
 5 
     | 
    
         
            +
                rvm_map_bins << :rails
         
     | 
| 
      
 6 
     | 
    
         
            +
                set :rvm_map_bins, rvm_map_bins
         
     | 
| 
      
 7 
     | 
    
         
            +
              end
         
     | 
| 
       11 
8 
     | 
    
         
             
            end
         
     | 
| 
       12 
9 
     | 
    
         | 
| 
       13 
10 
     | 
    
         
             
            namespace :rails do
         
     | 
| 
       14 
11 
     | 
    
         | 
| 
       15 
     | 
    
         
            -
              desc  
     | 
| 
      
 12 
     | 
    
         
            +
              desc "Interact with a remote rails console"
         
     | 
| 
       16 
13 
     | 
    
         
             
              task console: ['deploy:set_rails_env'] do
         
     | 
| 
       17 
     | 
    
         
            -
                 
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
                if rvm_loaded?
         
     | 
| 
       21 
     | 
    
         
            -
                  Rake::Task['rvm:hook'].invoke
         
     | 
| 
       22 
     | 
    
         
            -
                  set :rvm_map_bins, ((fetch(:rvm_map_bins) || []) + ['rails'])
         
     | 
| 
       23 
     | 
    
         
            -
                end
         
     | 
| 
      
 14 
     | 
    
         
            +
                on primary :app do |host|
         
     | 
| 
      
 15 
     | 
    
         
            +
                  user_host = [host.user, host.hostname].compact.join('@')
         
     | 
| 
      
 16 
     | 
    
         
            +
                  ssh_cmd = "ssh #{user_host} -p #{host.port || 22}"
         
     | 
| 
       24 
17 
     | 
    
         | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
             
     | 
| 
       27 
     | 
    
         
            -
                command << "#{ fetch :rbenv_prefix } " if rbenv_loaded?
         
     | 
| 
       28 
     | 
    
         
            -
                command << "bundle exec" if bundler_loaded?
         
     | 
| 
       29 
     | 
    
         
            -
                command << "rails console #{fetch(:rails_env)}"
         
     | 
| 
      
 18 
     | 
    
         
            +
                  cmd = SSHKit::Command.new(:rails, "console #{fetch :rails_env}", host: host)
         
     | 
| 
      
 19 
     | 
    
         
            +
                  SSHKit.config.output << cmd
         
     | 
| 
       30 
20 
     | 
    
         | 
| 
       31 
     | 
    
         
            -
             
     | 
| 
      
 21 
     | 
    
         
            +
                  exec %Q(#{ssh_cmd} -t "cd #{current_path} && (#{cmd.environment_string} #{cmd})")
         
     | 
| 
      
 22 
     | 
    
         
            +
                end
         
     | 
| 
       32 
23 
     | 
    
         
             
              end
         
     | 
| 
       33 
24 
     | 
    
         | 
| 
       34 
25 
     | 
    
         
             
            end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: capistrano-rails-console
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.3.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Florian Schwab
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2014- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2014-12-18 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: capistrano
         
     | 
| 
         @@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       104 
104 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       105 
105 
     | 
    
         
             
            requirements: []
         
     | 
| 
       106 
106 
     | 
    
         
             
            rubyforge_project: 
         
     | 
| 
       107 
     | 
    
         
            -
            rubygems_version: 2. 
     | 
| 
      
 107 
     | 
    
         
            +
            rubygems_version: 2.4.3
         
     | 
| 
       108 
108 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       109 
109 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       110 
110 
     | 
    
         
             
            summary: Remote rails console for capistrano
         
     |