airbrussh 1.1.2 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/CHANGELOG.md +7 -1
- data/Dangerfile +1 -48
- data/Gemfile +1 -1
- data/airbrussh.gemspec +5 -5
- data/lib/airbrussh/command_formatter.rb +4 -12
- data/lib/airbrussh/console_formatter.rb +15 -2
- data/lib/airbrussh/version.rb +1 -1
- metadata +21 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d662aabb8319be601cbbd4222aafcd770af9a9a5
|
4
|
+
data.tar.gz: 71685552b59431833e0268b8e7caaa8bb6da6742
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: daaf6c90769d7d44a82c3d60a893a64090acb768a0cfe7e50cb6a2c6af76be1f704668035db0b0abfcfe45946aaef8ca93faf38016280b5804248123c65f2e5f
|
7
|
+
data.tar.gz: 1ba2a9cd0cc8cd7eaa6f47d36ba22e44f6484f8245b9959089a32b71b4ea60e93cd25d20a90a6fabced9bab2ad59fa439284402b70027215863aa88264459add
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,11 @@ All notable changes to this project will be documented in this file. This projec
|
|
6
6
|
|
7
7
|
* Your contribution here!
|
8
8
|
|
9
|
+
## [1.2.0][] (2017-04-14)
|
10
|
+
|
11
|
+
* [#95](https://github.com/mattbrictson/airbrussh/pull/95): colorize LogMessage label on WARN level and above - [@klyonrad](https://github.com/klyonrad)
|
12
|
+
* [#106](https://github.com/mattbrictson/airbrussh/pull/106): Remove the `log_file` parameter from the `CommandFormatter#exit_message` method; it was unused - [@mattbrictson](https://github.com/mattbrictson)
|
13
|
+
|
9
14
|
## [1.1.2][] (2017-01-02)
|
10
15
|
|
11
16
|
* Add Ruby 2.4.0 to testing matrix and fix Ruby 2.4 deprecation warnings
|
@@ -126,7 +131,8 @@ There are, however, many behind-the-scenes changes and improvements to overall c
|
|
126
131
|
* Initial release
|
127
132
|
|
128
133
|
[Semver]: http://semver.org
|
129
|
-
[Unreleased]: https://github.com/mattbrictson/airbrussh/compare/v1.
|
134
|
+
[Unreleased]: https://github.com/mattbrictson/airbrussh/compare/v1.2.0...HEAD
|
135
|
+
[1.2.0]: https://github.com/mattbrictson/airbrussh/compare/v1.1.2...v1.2.0
|
130
136
|
[1.1.2]: https://github.com/mattbrictson/airbrussh/compare/v1.1.1...v1.1.2
|
131
137
|
[1.1.1]: https://github.com/mattbrictson/airbrussh/compare/v1.1.0...v1.1.1
|
132
138
|
[1.1.0]: https://github.com/mattbrictson/airbrussh/compare/v1.0.2...v1.1.0
|
data/Dangerfile
CHANGED
@@ -1,48 +1 @@
|
|
1
|
-
|
2
|
-
# Q: What is a Dangerfile, anyway? A: See http://danger.systems/
|
3
|
-
|
4
|
-
# ------------------------------------------------------------------------------
|
5
|
-
# What changed?
|
6
|
-
# ------------------------------------------------------------------------------
|
7
|
-
has_lib_changes = !git.modified_files.grep(/^lib/).empty?
|
8
|
-
has_test_changes = !git.modified_files.grep(/^test/).empty?
|
9
|
-
has_changelog_changes = git.modified_files.include?("CHANGELOG.md")
|
10
|
-
|
11
|
-
# ------------------------------------------------------------------------------
|
12
|
-
# You've made changes to lib, but didn't write any tests?
|
13
|
-
# ------------------------------------------------------------------------------
|
14
|
-
if has_lib_changes && !has_test_changes
|
15
|
-
warn("There are code changes, but no corresponding tests. "\
|
16
|
-
"Please include tests if this PR introduces any modifications in "\
|
17
|
-
"Airbrussh's behavior.",
|
18
|
-
:sticky => false)
|
19
|
-
end
|
20
|
-
|
21
|
-
# ------------------------------------------------------------------------------
|
22
|
-
# Have you updated CHANGELOG.md?
|
23
|
-
# ------------------------------------------------------------------------------
|
24
|
-
if !has_changelog_changes && has_lib_changes
|
25
|
-
pr_number = github.pr_json["number"]
|
26
|
-
markdown <<-MARKDOWN
|
27
|
-
Here's an example of a CHANGELOG.md entry (place it immediately under the `* Your contribution here!` line):
|
28
|
-
|
29
|
-
```markdown
|
30
|
-
* [##{pr_number}](https://github.com/mattbrictson/airbrussh/pull/#{pr_number}): #{github.pr_title} - [@#{github.pr_author}](https://github.com/#{github.pr_author}).
|
31
|
-
```
|
32
|
-
MARKDOWN
|
33
|
-
warn("Please update CHANGELOG.md with a description of your changes. "\
|
34
|
-
"If this PR is not a user-facing change (e.g. just refactoring), "\
|
35
|
-
"you can disregard this.", :sticky => false)
|
36
|
-
end
|
37
|
-
|
38
|
-
# ------------------------------------------------------------------------------
|
39
|
-
# Did you remove the CHANGELOG's "Your contribution here!" line?
|
40
|
-
# ------------------------------------------------------------------------------
|
41
|
-
if has_changelog_changes
|
42
|
-
unless IO.read("CHANGELOG.md") =~ /^\* Your contribution here/i
|
43
|
-
fail(
|
44
|
-
"Please put the `* Your contribution here!` line back into CHANGELOG.md.",
|
45
|
-
:sticky => false
|
46
|
-
)
|
47
|
-
end
|
48
|
-
end
|
1
|
+
danger.import_dangerfile(github: "capistrano/danger")
|
data/Gemfile
CHANGED
@@ -17,7 +17,7 @@ group :extras, :optional => true do
|
|
17
17
|
end
|
18
18
|
|
19
19
|
# Danger is used by Travis, but only for Ruby 2.0+
|
20
|
-
gem "danger" unless RUBY_VERSION == "1.9.3"
|
20
|
+
gem "danger", "~> 4.3" unless RUBY_VERSION == "1.9.3"
|
21
21
|
|
22
22
|
if (sshkit_version = ENV["sshkit"])
|
23
23
|
requirement = begin
|
data/airbrussh.gemspec
CHANGED
@@ -24,10 +24,10 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_dependency "sshkit", [">= 1.6.1", "!= 1.7.0"]
|
25
25
|
|
26
26
|
spec.add_development_dependency "bundler", "~> 1.10"
|
27
|
-
spec.add_development_dependency "coveralls"
|
28
|
-
spec.add_development_dependency "rake", "~>
|
29
|
-
spec.add_development_dependency "minitest"
|
30
|
-
spec.add_development_dependency "minitest-reporters"
|
31
|
-
spec.add_development_dependency "mocha"
|
27
|
+
spec.add_development_dependency "coveralls", "~> 0.8.15"
|
28
|
+
spec.add_development_dependency "rake", "~> 12.0"
|
29
|
+
spec.add_development_dependency "minitest", "~> 5.10"
|
30
|
+
spec.add_development_dependency "minitest-reporters", "~> 1.1"
|
31
|
+
spec.add_development_dependency "mocha", "~> 1.2"
|
32
32
|
spec.add_development_dependency "rubocop", "~> 0.41.2"
|
33
33
|
end
|
@@ -40,15 +40,9 @@ module Airbrussh
|
|
40
40
|
# exit_message # => "✔ 01 user@host 0.084s"
|
41
41
|
# exit_message # => "✘ 01 user@host 0.084s"
|
42
42
|
#
|
43
|
-
|
44
|
-
# in the failure case.
|
45
|
-
#
|
46
|
-
# exit_message("out.log")
|
47
|
-
# # => "✘ 01 user@host (see out.log for details) 0.084s"
|
48
|
-
#
|
49
|
-
def exit_message(log_file=nil)
|
43
|
+
def exit_message
|
50
44
|
message = if failure?
|
51
|
-
red(failure_message
|
45
|
+
red(failure_message)
|
52
46
|
else
|
53
47
|
green(success_message)
|
54
48
|
end
|
@@ -79,10 +73,8 @@ module Airbrussh
|
|
79
73
|
"✔ #{number} #{user_at_host}"
|
80
74
|
end
|
81
75
|
|
82
|
-
def failure_message
|
83
|
-
|
84
|
-
message << " (see #{log_file} for details)" if log_file
|
85
|
-
message
|
76
|
+
def failure_message
|
77
|
+
"✘ #{number} #{user_at_host}"
|
86
78
|
end
|
87
79
|
end
|
88
80
|
end
|
@@ -46,7 +46,7 @@ module Airbrussh
|
|
46
46
|
def log_command_exit(command)
|
47
47
|
return if debug?(command)
|
48
48
|
command = decorate(command)
|
49
|
-
print_indented_line(command.exit_message
|
49
|
+
print_indented_line(command.exit_message, -2)
|
50
50
|
end
|
51
51
|
|
52
52
|
def write(obj)
|
@@ -69,7 +69,20 @@ module Airbrussh
|
|
69
69
|
def write_log_message(log_message)
|
70
70
|
return if debug?(log_message)
|
71
71
|
print_task_if_changed
|
72
|
-
print_indented_line(log_message
|
72
|
+
print_indented_line(format_log_message(log_message))
|
73
|
+
end
|
74
|
+
|
75
|
+
def format_log_message(log_message)
|
76
|
+
case log_message.verbosity
|
77
|
+
when SSHKit::Logger::WARN
|
78
|
+
"#{yellow('WARN')} #{log_message}"
|
79
|
+
when SSHKit::Logger::ERROR
|
80
|
+
"#{red('ERROR')} #{log_message}"
|
81
|
+
when SSHKit::Logger::FATAL
|
82
|
+
"#{red('FATAL')} #{log_message}"
|
83
|
+
else
|
84
|
+
log_message.to_s
|
85
|
+
end
|
73
86
|
end
|
74
87
|
|
75
88
|
# For SSHKit versions up to and including 1.7.1, the stdout and stderr
|
data/lib/airbrussh/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: airbrussh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Brictson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sshkit
|
@@ -48,72 +48,72 @@ dependencies:
|
|
48
48
|
name: coveralls
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
|
-
- - "
|
51
|
+
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
53
|
+
version: 0.8.15
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
|
-
- - "
|
58
|
+
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version:
|
60
|
+
version: 0.8.15
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: rake
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '
|
67
|
+
version: '12.0'
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
74
|
+
version: '12.0'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: minitest
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
78
78
|
requirements:
|
79
|
-
- - "
|
79
|
+
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version: '
|
81
|
+
version: '5.10'
|
82
82
|
type: :development
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
|
-
- - "
|
86
|
+
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: '
|
88
|
+
version: '5.10'
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: minitest-reporters
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
92
92
|
requirements:
|
93
|
-
- - "
|
93
|
+
- - "~>"
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: '
|
95
|
+
version: '1.1'
|
96
96
|
type: :development
|
97
97
|
prerelease: false
|
98
98
|
version_requirements: !ruby/object:Gem::Requirement
|
99
99
|
requirements:
|
100
|
-
- - "
|
100
|
+
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: '
|
102
|
+
version: '1.1'
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: mocha
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
|
-
- - "
|
107
|
+
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: '
|
109
|
+
version: '1.2'
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
|
-
- - "
|
114
|
+
- - "~>"
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: '
|
116
|
+
version: '1.2'
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
118
|
name: rubocop
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
@@ -191,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
191
191
|
version: '0'
|
192
192
|
requirements: []
|
193
193
|
rubyforge_project:
|
194
|
-
rubygems_version: 2.6.
|
194
|
+
rubygems_version: 2.6.11
|
195
195
|
signing_key:
|
196
196
|
specification_version: 4
|
197
197
|
summary: Airbrussh pretties up your SSHKit and Capistrano output
|