skylight 4.1.1.beta → 4.1.1
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 +2 -1
- data/ext/extconf.rb +2 -13
- data/lib/skylight/cli/doctor.rb +1 -1
- data/lib/skylight/config.rb +2 -2
- data/lib/skylight/native.rb +3 -3
- data/lib/skylight/native_ext_fetcher.rb +2 -2
- data/lib/skylight/util/platform.rb +78 -0
- data/lib/skylight/util/proxy.rb +13 -0
- data/lib/skylight/version.rb +1 -1
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f64e1b1239d675cc682acad27c824044973a5e40fe85dffe61a6372b3b854c27
|
4
|
+
data.tar.gz: 26330aa2c1c0a8f3e30572e18654ecf35d7d5312c9ca250cb66eaa451ed0bac8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1567acdadba55a0028ca5d9da33cd9befbaed5b6acd01e3320d2820baa5ab002758c27e2d60e76bc9da24574f224abe94f5eabbdf03d6cdad136b811611aa364
|
7
|
+
data.tar.gz: 8593278ddfbde56d6661f3e927a255385c64a5732a4d8040ed74ba5dedfcbcffd46095f8d099d44425d672e6be3ae4a01249948bd6bf1e58f802fd2e81791727
|
data/CHANGELOG.md
CHANGED
data/ext/extconf.rb
CHANGED
@@ -6,19 +6,8 @@ require "fileutils"
|
|
6
6
|
|
7
7
|
$LOAD_PATH.unshift File.expand_path("../lib", __dir__)
|
8
8
|
|
9
|
-
require "skylight/version"
|
10
|
-
|
11
|
-
# Don't use the gem for dev
|
12
|
-
if File.exist?(File.expand_path("../Gemfile", __dir__))
|
13
|
-
# This approach won't work in production since skylight-core isn't in the skylight gem
|
14
|
-
$LOAD_PATH.unshift File.expand_path("../skylight-core/lib", __dir__)
|
15
|
-
else
|
16
|
-
# Is there a better way to get this into lib?
|
17
|
-
gem "skylight-core", Skylight::VERSION.tr("-", ".")
|
18
|
-
end
|
19
|
-
|
20
9
|
require "skylight/native_ext_fetcher"
|
21
|
-
require "skylight/
|
10
|
+
require "skylight/util/platform"
|
22
11
|
|
23
12
|
# Util allowing proxying writes to multiple location
|
24
13
|
class MultiIO
|
@@ -35,7 +24,7 @@ class MultiIO
|
|
35
24
|
end
|
36
25
|
end
|
37
26
|
|
38
|
-
include Skylight::
|
27
|
+
include Skylight::Util
|
39
28
|
|
40
29
|
SKYLIGHT_INSTALL_LOG = File.expand_path("install.log", __dir__)
|
41
30
|
SKYLIGHT_REQUIRED = ENV.key?("SKYLIGHT_REQUIRED") && ENV["SKYLIGHT_REQUIRED"] !~ /^false$/i
|
data/lib/skylight/cli/doctor.rb
CHANGED
data/lib/skylight/config.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require "openssl"
|
2
2
|
require "skylight/util/component"
|
3
3
|
require "skylight/util/deploy"
|
4
|
-
require "skylight/
|
4
|
+
require "skylight/util/platform"
|
5
5
|
require "skylight/util/hostname"
|
6
6
|
require "skylight/util/ssl"
|
7
7
|
|
@@ -94,7 +94,7 @@ module Skylight
|
|
94
94
|
report_rails_env: true
|
95
95
|
)
|
96
96
|
|
97
|
-
|
97
|
+
unless Util::Platform::OS == "darwin"
|
98
98
|
ret[:'daemon.ssl_cert_path'] = Util::SSL.ca_cert_file_or_default
|
99
99
|
ret[:'daemon.ssl_cert_dir'] = Util::SSL.ca_cert_dir
|
100
100
|
end
|
data/lib/skylight/native.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require "skylight/
|
1
|
+
require "skylight/util/platform"
|
2
2
|
|
3
3
|
module Skylight
|
4
4
|
# @api private
|
@@ -10,14 +10,14 @@ module Skylight
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def self.libskylight_path
|
13
|
-
ENV["SKYLIGHT_LIB_PATH"] || File.expand_path("../native/#{
|
13
|
+
ENV["SKYLIGHT_LIB_PATH"] || File.expand_path("../native/#{Util::Platform.tuple}", __FILE__)
|
14
14
|
end
|
15
15
|
|
16
16
|
skylight_required = ENV.key?("SKYLIGHT_REQUIRED") && ENV["SKYLIGHT_REQUIRED"] !~ /^false$/i
|
17
17
|
|
18
18
|
begin
|
19
19
|
unless ENV.key?("SKYLIGHT_DISABLE_AGENT") && ENV["SKYLIGHT_DISABLE_AGENT"] !~ /^false$/i
|
20
|
-
lib = "#{libskylight_path}/libskylight.#{
|
20
|
+
lib = "#{libskylight_path}/libskylight.#{Util::Platform.libext}"
|
21
21
|
|
22
22
|
if File.exist?(lib)
|
23
23
|
# First attempt to require the native extension
|
@@ -5,7 +5,7 @@ require "fileutils"
|
|
5
5
|
require "digest/sha2"
|
6
6
|
require "open3"
|
7
7
|
require "skylight/util/ssl"
|
8
|
-
require "skylight/
|
8
|
+
require "skylight/util/proxy"
|
9
9
|
|
10
10
|
# Used from extconf.rb
|
11
11
|
module Skylight
|
@@ -137,7 +137,7 @@ module Skylight
|
|
137
137
|
#
|
138
138
|
# If `ENV['HTTP_PROXY']` is set, it will be used as a proxy for this request.
|
139
139
|
def http_get(host, port, use_ssl, path, out)
|
140
|
-
if (http_proxy =
|
140
|
+
if (http_proxy = Util::Proxy.detect_url(ENV))
|
141
141
|
log "connecting with proxy: #{http_proxy}"
|
142
142
|
uri = URI.parse(http_proxy)
|
143
143
|
p_host = uri.host
|
@@ -0,0 +1,78 @@
|
|
1
|
+
require "rbconfig"
|
2
|
+
|
3
|
+
# Used from extconf and to load libskylight
|
4
|
+
module Skylight
|
5
|
+
module Util
|
6
|
+
module Platform
|
7
|
+
# Normalize the platform OS
|
8
|
+
OS =
|
9
|
+
case os = RbConfig::CONFIG["host_os"].downcase
|
10
|
+
when /linux/
|
11
|
+
# The official ruby-alpine Docker containers pre-build Ruby. As a result,
|
12
|
+
# Ruby doesn't know that it's on a musl-based platform. `ldd` is the
|
13
|
+
# only reliable way to detect musl that we've found.
|
14
|
+
# See https://github.com/skylightio/skylight-ruby/issues/92
|
15
|
+
if ENV["SKYLIGHT_MUSL"] || `ldd --version 2>&1` =~ /musl/
|
16
|
+
"linux-musl"
|
17
|
+
else
|
18
|
+
"linux"
|
19
|
+
end
|
20
|
+
when /darwin/
|
21
|
+
"darwin"
|
22
|
+
when /freebsd/
|
23
|
+
"freebsd"
|
24
|
+
when /netbsd/
|
25
|
+
"netbsd"
|
26
|
+
when /openbsd/
|
27
|
+
"openbsd"
|
28
|
+
when /sunos|solaris/
|
29
|
+
"solaris"
|
30
|
+
when /mingw|mswin/
|
31
|
+
"windows"
|
32
|
+
else
|
33
|
+
os
|
34
|
+
end
|
35
|
+
|
36
|
+
# Normalize the platform CPU
|
37
|
+
ARCH =
|
38
|
+
case cpu = RbConfig::CONFIG["host_cpu"].downcase
|
39
|
+
when /amd64|x86_64/
|
40
|
+
"x86_64"
|
41
|
+
when /i?86|x86|i86pc/
|
42
|
+
"x86"
|
43
|
+
when /ppc|powerpc/
|
44
|
+
"powerpc"
|
45
|
+
when /^arm/
|
46
|
+
"arm"
|
47
|
+
else
|
48
|
+
cpu
|
49
|
+
end
|
50
|
+
|
51
|
+
LIBEXT =
|
52
|
+
case OS
|
53
|
+
when /darwin/
|
54
|
+
"dylib"
|
55
|
+
when /linux|bsd|solaris/
|
56
|
+
"so"
|
57
|
+
when /windows|cygwin/
|
58
|
+
"dll"
|
59
|
+
else
|
60
|
+
"so"
|
61
|
+
end
|
62
|
+
|
63
|
+
TUPLE = "#{ARCH}-#{OS}".freeze
|
64
|
+
|
65
|
+
def self.tuple
|
66
|
+
TUPLE
|
67
|
+
end
|
68
|
+
|
69
|
+
def self.libext
|
70
|
+
LIBEXT
|
71
|
+
end
|
72
|
+
|
73
|
+
def self.dlext
|
74
|
+
RbConfig::CONFIG["DLEXT"]
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
data/lib/skylight/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: skylight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.1
|
4
|
+
version: 4.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tilde, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: skylight-core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.1.1
|
19
|
+
version: 4.1.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 4.1.1
|
26
|
+
version: 4.1.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: beefcake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -207,6 +207,8 @@ files:
|
|
207
207
|
- lib/skylight/util/deploy.rb
|
208
208
|
- lib/skylight/util/hostname.rb
|
209
209
|
- lib/skylight/util/http.rb
|
210
|
+
- lib/skylight/util/platform.rb
|
211
|
+
- lib/skylight/util/proxy.rb
|
210
212
|
- lib/skylight/util/ssl.rb
|
211
213
|
- lib/skylight/vendor/cli/highline.rb
|
212
214
|
- lib/skylight/vendor/cli/highline/color_scheme.rb
|
@@ -263,9 +265,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
263
265
|
version: '2.3'
|
264
266
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
265
267
|
requirements:
|
266
|
-
- - "
|
268
|
+
- - ">="
|
267
269
|
- !ruby/object:Gem::Version
|
268
|
-
version:
|
270
|
+
version: '0'
|
269
271
|
requirements: []
|
270
272
|
rubygems_version: 3.0.3
|
271
273
|
signing_key:
|