airbrussh 0.6.0 → 0.7.0
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -1
- data/CODE_OF_CONDUCT.md +31 -0
- data/README.md +1 -0
- data/appveyor.yml +18 -0
- data/lib/airbrussh/capistrano/tasks.rb +11 -1
- data/lib/airbrussh/console.rb +10 -2
- data/lib/airbrussh/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02f8bd2273940b9050a9d466bc880c7754909dda
|
4
|
+
data.tar.gz: d4891e7491c900d0de3cf1cfbc50aab88fd64aba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40bcc8d15dcc408b4fafc53b159cf9bedcd4bdaa55f5010f2bd0ce97988cb84c72c69abedb24b9ca3847ed22046d65f7a511a313a7bb0232d3e06eff0ec2717a
|
7
|
+
data.tar.gz: d0a209836a4d667ec2f58081e6a335c0540ef5e5767a01c6c20001ee65f46eb3fa7e2fda0c34abf01e2ac7b52f5d7764f3943fb774e1ca5679d5f4e66cd624d4
|
data/CHANGELOG.md
CHANGED
@@ -8,6 +8,18 @@ Airbrussh is in a pre-1.0 state. This means that its APIs and behavior are subje
|
|
8
8
|
|
9
9
|
* Your contribution here!
|
10
10
|
|
11
|
+
## [0.7.0][] (2015-08-08)
|
12
|
+
|
13
|
+
Fixes:
|
14
|
+
|
15
|
+
* Handle truncation of raw/non-UTF8 output without crashing ([#57](https://github.com/mattbrictson/airbrussh/issues/57))
|
16
|
+
|
17
|
+
Other changes:
|
18
|
+
|
19
|
+
* Re-implement the "tail log on deploy failure" feature in pure Ruby ([#59](https://github.com/mattbrictson/airbrussh/issues/59))
|
20
|
+
* Code of contact added to the project
|
21
|
+
* Tests now run on Windows ([#55](https://github.com/mattbrictson/airbrussh/issues/55))
|
22
|
+
|
11
23
|
## [0.6.0][] (2015-07-10)
|
12
24
|
|
13
25
|
This is another release with mostly behind-the-scenes changes. If you notice any differences in Airbrussh's behavior in this version, [please report an issue](https://github.com/mattbrictson/airbrussh/issues).
|
@@ -62,7 +74,8 @@ There are, however, many behind-the-scenes changes and improvements to overall c
|
|
62
74
|
* Initial release
|
63
75
|
|
64
76
|
[Semver]: http://semver.org
|
65
|
-
[Unreleased]: https://github.com/mattbrictson/airbrussh/compare/v0.
|
77
|
+
[Unreleased]: https://github.com/mattbrictson/airbrussh/compare/v0.7.0...HEAD
|
78
|
+
[0.7.0]: https://github.com/mattbrictson/airbrussh/compare/v0.6.0...v0.7.0
|
66
79
|
[0.6.0]: https://github.com/mattbrictson/airbrussh/compare/v0.5.1...v0.6.0
|
67
80
|
[0.5.1]: https://github.com/mattbrictson/airbrussh/compare/v0.5.0...v0.5.1
|
68
81
|
[0.5.0]: https://github.com/mattbrictson/airbrussh/compare/v0.4.1...v0.5.0
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all
|
4
|
+
people who contribute through reporting issues, posting feature requests,
|
5
|
+
updating documentation, submitting pull requests or patches, and other
|
6
|
+
activities.
|
7
|
+
|
8
|
+
We are committed to making participation in this project a harassment-free
|
9
|
+
experience for everyone, regardless of level of experience, gender, gender
|
10
|
+
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
+
body size, race, ethnicity, age, or religion.
|
12
|
+
|
13
|
+
Examples of unacceptable behavior by participants include the use of sexual
|
14
|
+
language or imagery, derogatory comments or personal attacks, trolling, public
|
15
|
+
or private harassment, insults, or other unprofessional conduct.
|
16
|
+
|
17
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
18
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
19
|
+
that are not aligned to this Code of Conduct. Project maintainers who do not
|
20
|
+
follow the Code of Conduct may be removed from the project team.
|
21
|
+
|
22
|
+
This code of conduct applies both within project spaces and in public spaces
|
23
|
+
when an individual is representing the project or its community.
|
24
|
+
|
25
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
26
|
+
reported by opening an issue or contacting one or more of the project
|
27
|
+
maintainers.
|
28
|
+
|
29
|
+
This Code of Conduct is adapted from the Contributor Covenant
|
30
|
+
(http://contributor-covenant.org), version 1.1.0, available at
|
31
|
+
http://contributor-covenant.org/version/1/1/0/
|
data/README.md
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
[](http://badge.fury.io/rb/airbrussh)
|
4
4
|
[](https://travis-ci.org/mattbrictson/airbrussh)
|
5
|
+
[](https://ci.appveyor.com/project/mattbrictson/airbrussh/branch/master)
|
5
6
|
[](https://codeclimate.com/github/mattbrictson/airbrussh)
|
6
7
|
[](https://coveralls.io/r/mattbrictson/airbrussh?branch=master)
|
7
8
|
|
data/appveyor.yml
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
version: '{build}'
|
2
|
+
|
3
|
+
skip_tags: true
|
4
|
+
|
5
|
+
environment:
|
6
|
+
matrix:
|
7
|
+
- ruby_version: "21"
|
8
|
+
- ruby_version: "21-x64"
|
9
|
+
|
10
|
+
install:
|
11
|
+
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
|
12
|
+
- gem install bundler --no-document --conservative --version 1.10.5
|
13
|
+
- bundle install --retry=3
|
14
|
+
|
15
|
+
test_script:
|
16
|
+
- bundle exec rake
|
17
|
+
|
18
|
+
build: off
|
@@ -43,7 +43,7 @@ module Airbrussh
|
|
43
43
|
error_line(yellow("** Refer to #{log_file} for details. "\
|
44
44
|
"Here are the last 20 lines:"))
|
45
45
|
error_line
|
46
|
-
error_line(
|
46
|
+
error_line(tail_log_file)
|
47
47
|
end
|
48
48
|
|
49
49
|
private
|
@@ -75,6 +75,16 @@ module Airbrussh
|
|
75
75
|
def error_line(line="\n")
|
76
76
|
line.each_line(&err_console.method(:print_line))
|
77
77
|
end
|
78
|
+
|
79
|
+
# Returns a String containing the last 20 lines of the log file. Since
|
80
|
+
# this method uses a fixed-size buffer, fewer than 20 lines may be
|
81
|
+
# returned in cases where the lines are extremely long.
|
82
|
+
def tail_log_file
|
83
|
+
open(log_file) do |file|
|
84
|
+
file.seek(-[8192, file.size].min, IO::SEEK_END)
|
85
|
+
file.readlines.last(20).join
|
86
|
+
end
|
87
|
+
end
|
78
88
|
end
|
79
89
|
end
|
80
90
|
end
|
data/lib/airbrussh/console.rb
CHANGED
@@ -39,11 +39,13 @@ module Airbrussh
|
|
39
39
|
|
40
40
|
def truncate_to_console_width(string)
|
41
41
|
string = (string || "").rstrip
|
42
|
+
ellipsis = utf8_supported?(string) ? "…" : "..."
|
42
43
|
width = console_width
|
43
44
|
|
44
45
|
if strip_ascii_color(string).length > width
|
45
|
-
|
46
|
-
string
|
46
|
+
width -= ellipsis.length
|
47
|
+
string.chop! while strip_ascii_color(string).length > width
|
48
|
+
string << "#{ellipsis}\e[0m"
|
47
49
|
else
|
48
50
|
string
|
49
51
|
end
|
@@ -74,5 +76,11 @@ module Airbrussh
|
|
74
76
|
false
|
75
77
|
end
|
76
78
|
end
|
79
|
+
|
80
|
+
def utf8_supported?(string)
|
81
|
+
string.encode("UTF-8").valid_encoding?
|
82
|
+
rescue Encoding::UndefinedConversionError
|
83
|
+
false
|
84
|
+
end
|
77
85
|
end
|
78
86
|
end
|
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: 0.
|
4
|
+
version: 0.7.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: 2015-
|
11
|
+
date: 2015-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sshkit
|
@@ -142,6 +142,7 @@ files:
|
|
142
142
|
- ".rubocop_todo.yml"
|
143
143
|
- ".travis.yml"
|
144
144
|
- CHANGELOG.md
|
145
|
+
- CODE_OF_CONDUCT.md
|
145
146
|
- CONTRIBUTING.md
|
146
147
|
- Gemfile
|
147
148
|
- Guardfile
|
@@ -149,6 +150,7 @@ files:
|
|
149
150
|
- README.md
|
150
151
|
- Rakefile
|
151
152
|
- airbrussh.gemspec
|
153
|
+
- appveyor.yml
|
152
154
|
- bin/console
|
153
155
|
- bin/setup
|
154
156
|
- bin/test_all.rb
|