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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6e6b3ea8f017cf5a2a357df3cb654324d9876032
4
- data.tar.gz: 856bd2e98e1069a4a7963154f901f605cbf6ad16
3
+ metadata.gz: d662aabb8319be601cbbd4222aafcd770af9a9a5
4
+ data.tar.gz: 71685552b59431833e0268b8e7caaa8bb6da6742
5
5
  SHA512:
6
- metadata.gz: 5a7eec2739ba0aa82f368456dc8de6430d085c724a216222697ea43be1b2cc5d3bdb6d13c358dd20aef5793e0d4e2acfd9e05b7757978f6768e7c80bcac37530
7
- data.tar.gz: 83d6d12502cb7238bf617f5dcfe5a5c61ac1bc36f6cd8dbfd023058c6b0e7beff92e4f41870ab99d1d920a5797f6bd80f049ed215dced9f42fd7866fc911d0fb
6
+ metadata.gz: daaf6c90769d7d44a82c3d60a893a64090acb768a0cfe7e50cb6a2c6af76be1f704668035db0b0abfcfe45946aaef8ca93faf38016280b5804248123c65f2e5f
7
+ data.tar.gz: 1ba2a9cd0cc8cd7eaa6f47d36ba22e44f6484f8245b9959089a32b71b4ea60e93cd25d20a90a6fabced9bab2ad59fa439284402b70027215863aa88264459add
@@ -22,4 +22,4 @@ matrix:
22
22
  - rvm: 2.4.0
23
23
  script: bundle exec danger
24
24
 
25
- before_install: gem install bundler --conservative --version '~> 1.10'
25
+ before_install: gem install bundler --conservative --version '~> 1.13.7'
@@ -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.1.2...HEAD
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
- # Adapted from https://github.com/ruby-grape/danger/blob/master/Dangerfile
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
@@ -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", "~> 10.0"
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
- # If `log_file` is specified, it is appended to the message
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(log_file))
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(log_file)
83
- message = "✘ #{number} #{user_at_host}"
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(@log_file), -2)
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.to_s)
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
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Airbrussh
3
- VERSION = "1.1.2".freeze
3
+ VERSION = "1.2.0".freeze
4
4
  end
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.1.2
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-01-02 00:00:00.000000000 Z
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: '0'
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: '0'
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: '10.0'
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: '10.0'
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: '0'
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: '0'
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: '0'
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: '0'
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: '0'
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: '0'
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.8
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