fly.io-rails 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fly.io-rails/utils.rb +25 -11
- data/lib/fly.io-rails/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0946f350aad927042c4071c450d4b496604d5875cf897da8922d0a371340ec1
|
4
|
+
data.tar.gz: 01150ca673153921b0e45c7bbb3c2a8f92af54690246540de7013ebb1152d4aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2ded02fe306b754519a92436c847e7827025dc210324d45af17d0d0e8426cf07ef2d2547014aaee90a67dc040a70c4bfe59127ea498ee0f293044e8339d373e
|
7
|
+
data.tar.gz: f06701cee20630b08805f36a9959d78e83904a804fea6957c9d0cfcb04919121a8efc6e07da77e31af474dec62d19227bb880c79332f6cd54f675c850bcc39b1
|
data/lib/fly.io-rails/utils.rb
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
-
|
1
|
+
begin
|
2
|
+
require 'pty'
|
3
|
+
rescue LoadError
|
4
|
+
# Presumably Windows
|
5
|
+
end
|
2
6
|
|
3
7
|
module FlyIoRails
|
4
8
|
module Utils
|
@@ -11,18 +15,28 @@ module FlyIoRails
|
|
11
15
|
def self.tee cmd
|
12
16
|
data = []
|
13
17
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
if defined? PTY
|
19
|
+
begin
|
20
|
+
# PTY supports ANSI cursor control and colors
|
21
|
+
PTY.spawn(cmd) do |read, write, pid|
|
22
|
+
begin
|
23
|
+
read.each do |line|
|
24
|
+
print line
|
25
|
+
data << line
|
26
|
+
end
|
27
|
+
rescue Errno::EIO
|
28
|
+
end
|
29
|
+
end
|
30
|
+
rescue PTY::ChildExited
|
31
|
+
end
|
32
|
+
else
|
33
|
+
# no support for ANSI cursor control and colors
|
34
|
+
Open3.popen2e(cmd) do |stdin, out, thread|
|
35
|
+
out.each do |line|
|
36
|
+
print line
|
37
|
+
data << line
|
23
38
|
end
|
24
39
|
end
|
25
|
-
rescue PTY::ChildExited
|
26
40
|
end
|
27
41
|
|
28
42
|
data.join
|
data/lib/fly.io-rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fly.io-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Ruby
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fly-ruby
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
description:
|
55
|
+
description:
|
56
56
|
email: rubys@intertwingly.net
|
57
57
|
executables: []
|
58
58
|
extensions: []
|
@@ -93,7 +93,7 @@ licenses:
|
|
93
93
|
- Apache-2.0
|
94
94
|
metadata:
|
95
95
|
homepage_uri: https://github.com/rubys/fly.io-rails
|
96
|
-
post_install_message:
|
96
|
+
post_install_message:
|
97
97
|
rdoc_options: []
|
98
98
|
require_paths:
|
99
99
|
- lib
|
@@ -108,8 +108,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
|
-
rubygems_version: 3.3.
|
112
|
-
signing_key:
|
111
|
+
rubygems_version: 3.3.11
|
112
|
+
signing_key:
|
113
113
|
specification_version: 4
|
114
114
|
summary: Rails support for Fly-io
|
115
115
|
test_files: []
|