j-cap-recipes 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: da279ff2f50191a136573a58815445997e167405
4
+ data.tar.gz: 58d1690c6eda61d6983250f7fc826e4369bc2dfe
5
+ SHA512:
6
+ metadata.gz: 06aa320b82126b34b7ddda9136013445533aaa1f4c83584fd624f0d41e54a807dbf90e98e77216ca31981799806d41bd5ac61f9793e159b350f1889f5321a81c
7
+ data.tar.gz: 84653499f822cfaec9589ed41f0a1d59222c44d5a2758683ce2a1403d59e06fdb3cb09bf627a257372b32c400a15cf0f7a226bb2f3eb73f5f637dadffbcf2ea6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- j-cap-recipes (0.0.9)
4
+ j-cap-recipes (0.0.10)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -15,6 +15,7 @@ module SSHKit
15
15
  chan.exec cmd.to_command do |ch, success|
16
16
  chan.on_data do |ch, data|
17
17
  if block_given?
18
+ cmd.stdout = data
18
19
  block.call(ch, data)
19
20
  else
20
21
  cmd.stdout = data
@@ -23,13 +24,13 @@ module SSHKit
23
24
  end
24
25
  end
25
26
  chan.on_extended_data do |ch, type, data|
26
- cmd.stderr = data
27
+ cmd.stderr = data
27
28
  cmd.full_stderr += data
28
29
  output << cmd
29
30
  end
30
31
  chan.on_request("exit-status") do |ch, data|
31
- cmd.stdout = ''
32
- cmd.stderr = ''
32
+ cmd.stdout = ''
33
+ cmd.stderr = ''
33
34
  cmd.exit_status = data.read_long
34
35
  output << cmd
35
36
  end
@@ -61,6 +62,4 @@ module SSHKit
61
62
  end
62
63
  end
63
64
 
64
-
65
-
66
- load File.expand_path("../tasks/rails.rake", __FILE__)
65
+ load File.expand_path('../tasks/rails.rake', __FILE__)
@@ -4,19 +4,28 @@ namespace :rails do
4
4
  on roles(:app) do
5
5
  within release_path do
6
6
  with rails_env: fetch(:rails_env) do
7
- row , command = '', ''
7
+ row , command = '', nil
8
8
  execute(:rails, :console) do |ch, data|
9
9
  row += data
10
- if data.include?("\n")
11
- print row if command.chomp != row.chomp
12
- row = ''
13
- elsif data.include?('irb(main):')
10
+ if command && row.include?(command)
11
+ row.sub!(/#{command}(\r\n)?/, '')
12
+ command = nil
13
+ end
14
+
15
+ if row.include?('irb(main):')
14
16
  print row
15
17
  row = ''
16
18
  command = $stdin.gets
17
19
  command = "exit\n" if command == nil
18
20
  ch.send_data command
21
+ command.chomp!
22
+ end
23
+
24
+ if row.include?("\n")
25
+ print row
26
+ row = ''
19
27
  end
28
+
20
29
  end
21
30
  end
22
31
  end
@@ -1,5 +1,5 @@
1
1
  module JCap
2
2
  module Recipes
3
- VERSION = "0.0.9"
3
+ VERSION = "0.0.10"
4
4
  end
5
5
  end
data/lib/j-cap-recipes.rb CHANGED
@@ -1,2 +1,9 @@
1
- rake_files_pattern = File.expand_path("./j-cap-recipes/tasks/*.rake", File.dirname(__FILE__))
2
- Dir.glob(rake_files_pattern).each { |r| import r }
1
+ require_relative 'j-cap-recipes/rails'
2
+ require_relative 'j-cap-recipes/database'
3
+ require_relative 'j-cap-recipes/check'
4
+ require_relative 'j-cap-recipes/delayed_job'
5
+ require_relative 'j-cap-recipes/monit'
6
+ require_relative 'j-cap-recipes/nginx'
7
+ require_relative 'j-cap-recipes/rake'
8
+ require_relative 'j-cap-recipes/setup'
9
+ require_relative 'j-cap-recipes/unicorn'
metadata CHANGED
@@ -1,62 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: j-cap-recipes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
5
- prerelease:
4
+ version: 0.0.10
6
5
  platform: ruby
7
6
  authors:
8
7
  - Michael Nikitochkin
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-01-10 00:00:00.000000000 Z
11
+ date: 2014-01-13 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bundler
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
19
  version: '1.3'
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
26
  version: '1.3'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - ">="
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: capistrano
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - ">="
52
46
  - !ruby/object:Gem::Version
53
47
  version: 3.0.0
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - ">="
60
53
  - !ruby/object:Gem::Version
61
54
  version: 3.0.0
62
55
  description: A litle knife to deploy Rails application
@@ -103,32 +96,25 @@ files:
103
96
  homepage: https://github.com/jetthoughts/j-cap-recipes
104
97
  licenses:
105
98
  - MIT
99
+ metadata: {}
106
100
  post_install_message:
107
101
  rdoc_options: []
108
102
  require_paths:
109
103
  - lib
110
104
  required_ruby_version: !ruby/object:Gem::Requirement
111
- none: false
112
105
  requirements:
113
- - - ! '>='
106
+ - - ">="
114
107
  - !ruby/object:Gem::Version
115
108
  version: '0'
116
- segments:
117
- - 0
118
- hash: 4221075754137612620
119
109
  required_rubygems_version: !ruby/object:Gem::Requirement
120
- none: false
121
110
  requirements:
122
- - - ! '>='
111
+ - - ">="
123
112
  - !ruby/object:Gem::Version
124
113
  version: '0'
125
- segments:
126
- - 0
127
- hash: 4221075754137612620
128
114
  requirements: []
129
115
  rubyforge_project:
130
- rubygems_version: 1.8.23
116
+ rubygems_version: 2.1.11
131
117
  signing_key:
132
- specification_version: 3
118
+ specification_version: 4
133
119
  summary: Capistrano 3 recipes for nginx, monit, rails log, setup, unicorn
134
120
  test_files: []