j-cap-recipes 0.0.4 → 0.0.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.
- data/CHANGELOG.md +18 -0
- data/Gemfile.lock +2 -2
- data/README.md +4 -0
- data/j-cap-recipes.gemspec +3 -3
- data/lib/j-cap-recipes/tasks/rails.rake +18 -11
- data/lib/j-cap-recipes/version.rb +1 -1
- metadata +9 -3
data/CHANGELOG.md
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
## Changelog
|
2
|
+
|
3
|
+
This file is written in reverse chronological order, newer releases will
|
4
|
+
appear at the top.
|
5
|
+
|
6
|
+
## 0.0.5
|
7
|
+
|
8
|
+
* fixed bug: Removed the custom command bin mapping for rails. Updated the rails console behavior.
|
9
|
+
|
10
|
+
## 0.0.4
|
11
|
+
|
12
|
+
## 0.0.3
|
13
|
+
|
14
|
+
## 0.0.2
|
15
|
+
|
16
|
+
## 0.0.1
|
17
|
+
|
18
|
+
First release.
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
|
4
|
+
j-cap-recipes (0.0.5)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -29,5 +29,5 @@ PLATFORMS
|
|
29
29
|
DEPENDENCIES
|
30
30
|
bundler (~> 1.3)
|
31
31
|
capistrano (>= 3.0.0)
|
32
|
-
|
32
|
+
j-cap-recipes!
|
33
33
|
rake
|
data/README.md
CHANGED
@@ -39,6 +39,10 @@ If you want to load only specified recipe:
|
|
39
39
|
### Setup
|
40
40
|
### Check
|
41
41
|
### Monit
|
42
|
+
### Rails
|
43
|
+
|
44
|
+
To run remote rails console you should update to the latest gems `capistrano-rbenv` and `capistrano-bundler`
|
45
|
+
and run command `cap production rails:console`.
|
42
46
|
|
43
47
|
## Contributing
|
44
48
|
|
data/j-cap-recipes.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_development_dependency
|
22
|
-
spec.add_development_dependency
|
23
|
-
spec.add_development_dependency
|
21
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
22
|
+
spec.add_development_dependency 'rake'
|
23
|
+
spec.add_development_dependency 'capistrano', '>= 3.0.0'
|
24
24
|
end
|
@@ -1,5 +1,3 @@
|
|
1
|
-
SSHKit.config.command_map[:rails] = "bundle exec rails"
|
2
|
-
|
3
1
|
namespace :rails do
|
4
2
|
desc 'Execute rails console'
|
5
3
|
task :console do
|
@@ -24,24 +22,33 @@ module SSHKit
|
|
24
22
|
ssh.open_channel do |chan|
|
25
23
|
chan.request_pty if Netssh.config.pty
|
26
24
|
chan.exec cmd.to_command do |ch, success|
|
27
|
-
chan.on_data do |ch, data|
|
28
|
-
cmd.stdout = data
|
29
|
-
cmd.full_stdout += data
|
30
25
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
26
|
+
chan.on_data do |ch, data|
|
27
|
+
#Rails specific console handler
|
28
|
+
@row ||= ''
|
29
|
+
@row += data
|
30
|
+
if data.include?("\n")
|
31
|
+
cmd.stdout = @row
|
32
|
+
cmd.full_stdout += @row
|
37
33
|
output << cmd
|
34
|
+
@row = ''
|
35
|
+
else
|
36
|
+
if data.include?('irb(main):')
|
37
|
+
print data
|
38
|
+
@row = ''
|
39
|
+
command = $stdin.gets
|
40
|
+
command = "exit\n" if command == nil
|
41
|
+
ch.send_data command
|
42
|
+
end
|
38
43
|
end
|
39
44
|
end
|
45
|
+
|
40
46
|
chan.on_extended_data do |ch, type, data|
|
41
47
|
cmd.stderr = data
|
42
48
|
cmd.full_stderr += data
|
43
49
|
output << cmd
|
44
50
|
end
|
51
|
+
|
45
52
|
chan.on_request("exit-status") do |ch, data|
|
46
53
|
cmd.stdout = ''
|
47
54
|
cmd.stderr = ''
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: j-cap-recipes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-11-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -66,6 +66,7 @@ executables: []
|
|
66
66
|
extensions: []
|
67
67
|
extra_rdoc_files: []
|
68
68
|
files:
|
69
|
+
- CHANGELOG.md
|
69
70
|
- Gemfile
|
70
71
|
- Gemfile.lock
|
71
72
|
- LICENSE.txt
|
@@ -111,12 +112,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
111
112
|
- - ! '>='
|
112
113
|
- !ruby/object:Gem::Version
|
113
114
|
version: '0'
|
115
|
+
segments:
|
116
|
+
- 0
|
117
|
+
hash: -3379381580228172657
|
114
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
119
|
none: false
|
116
120
|
requirements:
|
117
121
|
- - ! '>='
|
118
122
|
- !ruby/object:Gem::Version
|
119
123
|
version: '0'
|
124
|
+
segments:
|
125
|
+
- 0
|
126
|
+
hash: -3379381580228172657
|
120
127
|
requirements: []
|
121
128
|
rubyforge_project:
|
122
129
|
rubygems_version: 1.8.25
|
@@ -124,4 +131,3 @@ signing_key:
|
|
124
131
|
specification_version: 3
|
125
132
|
summary: Capistrano 3 recipes for nginx, monit, rails log, setup, unicorn
|
126
133
|
test_files: []
|
127
|
-
has_rdoc:
|