pgai 0.1.6 → 0.1.7

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: 6ec24e1bc611522aea3c490acbb0f94b02085584544c979cd56ae9a3bd45f61b
4
- data.tar.gz: 7351d32aa09341ec0081e0d4c45466d83034d1ec3ec776b74bef7e05c455997e
3
+ metadata.gz: '028a01e72ff3ca2ffa39e2cf32e400b2e375d79da46f65c51f746d5667dc0719'
4
+ data.tar.gz: 8f2ea632ff8d19a4382af4b5647a322ef9489da49ccdfa4f462779eb9d184456
5
5
  SHA512:
6
- metadata.gz: 82761cb5d303b13edc9a8b9541e11a9c5d2c06b3765879ede4d6cf4176a8d11f1bcd24563da88481ff6648b308f265f8cc0a2b56eb01ac2cd5888417ab485062
7
- data.tar.gz: 527e1976b374a68409c6ca8591b6ab6cb043ed374f69a3daa87d76116bed7d0d04d518d00d6df38bf1305965f9db71cdf4e8aac9c2e4e01fa9a31aa7a00723be
6
+ metadata.gz: 9b561b90c9a9d9fd230534eb08e0c2c713302f8789a16a4536639a941355f1d6234240d93b2baf55f4845e23ad3377b62f1b075d03a2b9ff1ca26b17cdca4b88
7
+ data.tar.gz: e46cb2fa48461f6986ee5e41d00aa6d7022d91906f14abf78e0620b85c83ae77c3a6ed4f60392de922b91f79e2c569792efbedf058edc5017d203d38bbfcde31
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'securerandom'
3
+ require "securerandom"
4
4
 
5
5
  module Pgai
6
6
  class CloneManager
@@ -76,7 +76,7 @@ module Pgai
76
76
  exec("psql #{clone.connection_string}")
77
77
  end
78
78
 
79
- Signal.trap("INT") { }
79
+ Signal.trap("INT") {}
80
80
  start_caffeinate(psql_pid)
81
81
  Process.wait(psql_pid)
82
82
  ensure
data/lib/pgai/dblab.rb CHANGED
@@ -18,7 +18,7 @@ module Pgai
18
18
  end
19
19
 
20
20
  def configure_env(port:, token:, id:)
21
- dblab("init", "--url", "http://#{hostname}:#{port}", "--token", token, "--environment-id", id, silence: true)
21
+ dblab("init", "--url", "http://#{hostname}:#{port}", "--token", token, "--environment-id", id, silence: true, raw: true)
22
22
  dblab("config", "switch", id, raw: true)
23
23
  end
24
24
 
@@ -62,8 +62,7 @@ module Pgai
62
62
  end
63
63
 
64
64
  def download_dblab_to(location)
65
- platform = Gem::Platform.local
66
- uri = URI(DBLAB_BINARY_URL % {os: platform.os, cpu: platform.cpu})
65
+ uri = URI(DBLAB_BINARY_URL % {os: platform.os, cpu: cpu_platform})
67
66
 
68
67
  Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
69
68
  http.request Net::HTTP::Get.new(uri) do |response|
@@ -74,5 +73,15 @@ module Pgai
74
73
  end
75
74
  end
76
75
  end
76
+
77
+ def platform
78
+ Gem::Platform.local
79
+ end
80
+
81
+ def cpu_platform
82
+ cpu = platform.cpu
83
+ return "arm64" if cpu == "aarch64"
84
+ cpu
85
+ end
77
86
  end
78
87
  end
data/lib/pgai/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pgai
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pgai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marius Bobin