skylight 4.1.1.beta → 4.1.1

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
  SHA256:
3
- metadata.gz: cdfdccaa0d3d3b5163035985d500bee74aa687de5c8e3e8f58e661684131d8ea
4
- data.tar.gz: 85118921b59286d9417ce14b3078ce34b77c34b2bb7a103979a3b3612127ea80
3
+ metadata.gz: f64e1b1239d675cc682acad27c824044973a5e40fe85dffe61a6372b3b854c27
4
+ data.tar.gz: 26330aa2c1c0a8f3e30572e18654ecf35d7d5312c9ca250cb66eaa451ed0bac8
5
5
  SHA512:
6
- metadata.gz: db7577c627384f1ffdb99fd4c442f00acb753cd5d612b2cb2ee58988edd7085cda9378858df850082077e26bd1cbfe4835b83f5fccc68752de2606d8fd1caf90
7
- data.tar.gz: 550a3ff7eb92ae32a60bbf04286358540b387de49863a9df8b9ce5388c9e56691b24351bc5c923e2bdcb744d4a7351bb47b7251427db8b2cab6172ef0ae12e5e
6
+ metadata.gz: 1567acdadba55a0028ca5d9da33cd9befbaed5b6acd01e3320d2820baa5ab002758c27e2d60e76bc9da24574f224abe94f5eabbdf03d6cdad136b811611aa364
7
+ data.tar.gz: 8593278ddfbde56d6661f3e927a255385c64a5732a4d8040ed74ba5dedfcbcffd46095f8d099d44425d672e6be3ae4a01249948bd6bf1e58f802fd2e81791727
@@ -1,4 +1,5 @@
1
- ## 4.1.1-beta
1
+ ## 4.1.1
2
+ * [BUGFIX] Fix Skylight installation when bundled with edge rails [Issue #132](https://github.com/skylightio/skylight-ruby/issues/132)
2
3
  * [IMPROVEMENT] Improve socket retry handling in skylightd
3
4
 
4
5
  ## 4.1.0 (June 3, 2019)
@@ -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/core/util/platform"
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::Core::Util
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
@@ -184,7 +184,7 @@ module Skylight
184
184
  end
185
185
 
186
186
  def mac?
187
- Core::Util::Platform::OS == "darwin"
187
+ Util::Platform::OS == "darwin"
188
188
  end
189
189
 
190
190
  # NOTE: This check won't work correctly on Windows
@@ -1,7 +1,7 @@
1
1
  require "openssl"
2
2
  require "skylight/util/component"
3
3
  require "skylight/util/deploy"
4
- require "skylight/core/util/platform"
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
- if Core::Util::Platform::OS != "darwin"
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
@@ -1,4 +1,4 @@
1
- require "skylight/core/util/platform"
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/#{Core::Util::Platform.tuple}", __FILE__)
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.#{Core::Util::Platform.libext}"
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/core/util/proxy"
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 = Core::Util::Proxy.detect_url(ENV))
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
@@ -0,0 +1,13 @@
1
+ module Skylight
2
+ module Util
3
+ module Proxy
4
+ def self.detect_url(env)
5
+ u = env["HTTP_PROXY"] || env["http_proxy"]
6
+ if u && !u.empty?
7
+ u = "http://#{u}" unless u =~ %r{://}
8
+ u
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -1,3 +1,3 @@
1
1
  module Skylight
2
- VERSION = "4.1.1-beta".freeze
2
+ VERSION = "4.1.1".freeze
3
3
  end
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.beta
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-13 00:00:00.000000000 Z
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.beta
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.beta
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: 1.3.1
270
+ version: '0'
269
271
  requirements: []
270
272
  rubygems_version: 3.0.3
271
273
  signing_key: