capistrano-colorized-stream 0.2.1 → 0.2.2

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/README.md CHANGED
@@ -4,11 +4,9 @@ testing ruby: 1.9.3; Capistrano: > 2.0
4
4
 
5
5
  ## About capistrano-colorized-stream
6
6
 
7
- capistrano-colorized-stream adds a feature to append colorized hostnames at the head of each line for the capistrano's `stream` method.
7
+ capistrano-colorized-stream adds a feature to append colorized hostnames at the head of each line for the [capistrano](https://github.com/capistrano/capistrano)'s `stream` method.
8
8
 
9
- [Capistrano](https://github.com/capistrano/capistrano) is a utility and framework for executing commands in parallel on multiple remote machines, via SSH.
10
-
11
- With this gem, it enables you to watch logs on multiple deploying hosts in one view with a colored hostname like [foreman](https://github.com/ddollar/foreman), for example.
9
+ With this gem, it enables you to watch logs on multiple deploying hosts concurrently with colored hostnames like [foreman](https://github.com/ddollar/foreman), for example.
12
10
 
13
11
  ## USAGE
14
12
 
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.2.2
@@ -3,11 +3,11 @@
3
3
 
4
4
  Gem::Specification.new do |gem|
5
5
  gem.name = 'capistrano-colorized-stream'
6
- gem.version = '0.2.1'
6
+ gem.version = File.read(File.expand_path('VERSION', File.dirname(__FILE__))).chomp
7
7
  gem.authors = %w(Naotoshi Seo)
8
8
  gem.email = %w(sonots@gmail.com)
9
9
  gem.homepage = 'https://github.com/sonots/capistrano-colorized-stream'
10
- gem.summary = 'enables to watch logs on multiple deploying hosts in one view with a colored hostname at the head of each line'
10
+ gem.summary = 'enables to watch logs on multiple deploying hosts concurrently with colored hostnames'
11
11
  gem.description = gem.summary
12
12
 
13
13
  gem.rubyforge_project = "capistrano-colorized-stream"
@@ -37,13 +37,16 @@ module Capistrano
37
37
  @colorized = {}
38
38
  servers = find_servers_for_task(current_task).map(&:to_s)
39
39
  len = servers.map(&:length).max
40
- servers.each_with_index {|host, i| @colorized[host] = (host.ljust(len) + ' | ').colorize(colors[i]) }
40
+ servers.each_with_index do |host, i|
41
+ color = colors[i % colors.size]
42
+ @colorized[host] = (host.ljust(len) + ' | ').colorize(color)
43
+ end
41
44
  end
42
45
  @colorized[hostname]
43
46
  end
44
47
 
45
48
  def colors
46
- %w( cyan yellow green magenta red blue light_cyan light_yellow
49
+ @collors ||= %w( cyan yellow green magenta red blue light_cyan light_yellow
47
50
  light_green light_magenta light_red, light_blue ).map(&:to_sym)
48
51
  end
49
52
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-colorized-stream
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-01-12 00:00:00.000000000 Z
13
+ date: 2013-01-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: colorize
@@ -124,8 +124,8 @@ dependencies:
124
124
  - - ! '>='
125
125
  - !ruby/object:Gem::Version
126
126
  version: '0'
127
- description: enables to watch logs on multiple deploying hosts in one view with a
128
- colored hostname at the head of each line
127
+ description: enables to watch logs on multiple deploying hosts concurrently with colored
128
+ hostnames
129
129
  email:
130
130
  - sonots@gmail.com
131
131
  executables: []
@@ -136,9 +136,12 @@ files:
136
136
  - Gemfile
137
137
  - lib/capistrano/colorized_stream.rb
138
138
  - lib/capistrano-colorized-stream.rb
139
+ - pkg/capistrano-colorized-stream-0.2.1.gem
140
+ - pkg/capistrano-colorized-stream-0.2.2.gem
139
141
  - pkg/capistrano-colorized-stream-0.2.gem
140
142
  - Rakefile
141
143
  - README.md
144
+ - VERSION
142
145
  - .gitignore
143
146
  homepage: https://github.com/sonots/capistrano-colorized-stream
144
147
  licenses: []
@@ -154,7 +157,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
154
157
  version: '0'
155
158
  segments:
156
159
  - 0
157
- hash: -3754810188888640748
160
+ hash: 1464782786326999649
158
161
  required_rubygems_version: !ruby/object:Gem::Requirement
159
162
  none: false
160
163
  requirements:
@@ -163,12 +166,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
163
166
  version: '0'
164
167
  segments:
165
168
  - 0
166
- hash: -3754810188888640748
169
+ hash: 1464782786326999649
167
170
  requirements: []
168
171
  rubyforge_project: capistrano-colorized-stream
169
172
  rubygems_version: 1.8.23
170
173
  signing_key:
171
174
  specification_version: 3
172
- summary: enables to watch logs on multiple deploying hosts in one view with a colored
173
- hostname at the head of each line
175
+ summary: enables to watch logs on multiple deploying hosts concurrently with colored
176
+ hostnames
174
177
  test_files: []