capistrano-rails-console 2.0.0 → 2.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bd5df65487ade200f469b97095907831ec9ce960
4
- data.tar.gz: 1389b6f30993c23c59ba439e95bbe633c708845d
3
+ metadata.gz: 24afc868db18013827cff21ba79338acba73c220
4
+ data.tar.gz: e3a55356b9671dcf01c7317f307395b3dc026a51
5
5
  SHA512:
6
- metadata.gz: 06c86499b33afc6e11bc4085f3a4666b5a913632a9a5a530b94155ce12bfc3b86430765cf2498966147fceef6d2f260d8ec5da7777432fc50617bce855174d57
7
- data.tar.gz: 0464abcce5528d84e45d475dfacb575029f90218d415293ca888e2bf6cf7efda899968cdaf087d751bb4a7a7a263bb0e52f27c08fb866fcfbec16119ac5f4d4a
6
+ metadata.gz: 01377580057b65a2f5848317d0898ae5254eefb20b18f29d4329975408576d84372c616bcb06a73cbfb147df8c0f2832ae12544603e610c3060f20d3fd78a046
7
+ data.tar.gz: 4dec52fcf68762eb6d4f5e91a51a1ecacb10a8ab7286940ae16d06cfcffe7ef82a19fb7b77e13603d051e3be04ae9c767fe581db076f27f17574e13cba7ee067
@@ -1,9 +1,15 @@
1
1
  # Change Log
2
2
 
3
+ ## 2.1.0 (2016-09-23)
4
+ ### Feature
5
+ - add support for `rails dbconsole`
6
+ ### Fixed
7
+ - revert unintentional change when the gem is required
8
+
3
9
  ## 2.0.0 (2016-09-16)
4
10
  ### Changed
5
11
  - switched connection part to _sshkit-interactive_
6
- - allow setting rails environment separately deployment environment
12
+ - allow setting rails environment separately from deployment environment
7
13
  - allow setting user to run rails console separately from ssh user
8
14
 
9
15
  ## 1.0.2 (2015-12-06)
data/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  # Capistrano::Rails::Console
9
9
 
10
- Remote rails console for capistrano.
10
+ Remote rails console and dbconsole for capistrano.
11
11
 
12
12
 
13
13
  ## Installation
@@ -15,7 +15,7 @@ Remote rails console for capistrano.
15
15
  Add this line to your application's Gemfile:
16
16
 
17
17
  ```ruby
18
- gem 'capistrano-rails-console'
18
+ gem 'capistrano-rails-console', require: false
19
19
  ```
20
20
 
21
21
  And then execute:
@@ -35,7 +35,7 @@ Require in `Capfile` to use the default task:
35
35
  require 'capistrano/rails/console'
36
36
  ```
37
37
 
38
- This will add a task `rails:console`:
38
+ Run a remote rails console with:
39
39
 
40
40
  $ cap production rails:console
41
41
 
@@ -43,18 +43,23 @@ You can also start a sandbox session:
43
43
 
44
44
  $ cap production rails:console sandbox=1
45
45
 
46
+ Or run a dbconsole:
47
+
48
+ $ cap production rails:dbconsole
49
+
46
50
  ## Options
47
51
 
48
52
  ### Rails environment
49
53
 
50
54
  ```ruby
51
- set :console_env, :production
55
+ set :console_env, :production # use different environment than deployment environment (rails_env)
52
56
  ```
53
57
 
54
58
  ### User
55
59
 
56
60
  ```ruby
57
- set :console_user, :appuser
61
+ set :console_user, :appuser # run rails console as appuser through sudo
62
+ set :console_user, nil # explicitly disable switching user through sudo
58
63
  ```
59
64
 
60
65
 
@@ -1 +0,0 @@
1
- require 'capistrano/rails/console'
@@ -1,2 +1,4 @@
1
+ require 'sshkit/interactive'
1
2
  require 'capistrano/rails/console/version'
2
- require 'capistrano/rails/console/remote'
3
+
4
+ load File.expand_path('../console/tasks.cap', __FILE__)
@@ -23,4 +23,15 @@ namespace :rails do
23
23
  end
24
24
  end
25
25
  end
26
+
27
+ desc 'Interact with a remote rails dbconsole'
28
+ task :dbconsole do
29
+ run_interactively primary(:app) do
30
+ within current_path do
31
+ as user: fetch(:console_user) do
32
+ execute(:rails, :dbconsole, '-e', fetch(:console_env))
33
+ end
34
+ end
35
+ end
36
+ end
26
37
  end
@@ -5,7 +5,7 @@ module Capistrano
5
5
  # Console
6
6
  module Console
7
7
  # Gem version
8
- VERSION = '2.0.0'
8
+ VERSION = '2.1.0'
9
9
  end
10
10
  end
11
11
  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: 2.0.0
4
+ version: 2.1.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: 2016-09-15 00:00:00.000000000 Z
11
+ date: 2016-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -88,8 +88,7 @@ files:
88
88
  - capistrano-rails-console.gemspec
89
89
  - lib/capistrano-rails-console.rb
90
90
  - lib/capistrano/rails/console.rb
91
- - lib/capistrano/rails/console/remote.rb
92
- - lib/capistrano/rails/console/tasks/remote.cap
91
+ - lib/capistrano/rails/console/tasks.cap
93
92
  - lib/capistrano/rails/console/version.rb
94
93
  homepage: https://github.com/ydkn/capistrano-rails-console
95
94
  licenses:
@@ -1,3 +0,0 @@
1
- require 'sshkit/interactive'
2
-
3
- load File.expand_path('../tasks/remote.cap', __FILE__)