tng 0.3.6 → 0.3.8
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/binaries/tng-linux-arm64.so +0 -0
- data/binaries/tng-linux-x86_64.so +0 -0
- data/binaries/tng.bundle +0 -0
- data/lib/tng/version.rb +1 -1
- data/lib/tng.rb +42 -7
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cbf8e76f0412c426150b5a9cef4d3a077d9747bf02c16ea6086f621cb78236a0
|
|
4
|
+
data.tar.gz: 5bb42890de6580034ffc78df9b699433667e07e7877c7dc280ca53d998fa29cf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 868acc7d7fa9b539fac0b9906662cdf906a115da97f86643f8d2c88f9015b536e3ec75bbb50537df0a2283232207d7531a12b81eb8af4bdc8a1aa4abb4a83122
|
|
7
|
+
data.tar.gz: 1410ad3af1e8b0bfbfa7d9849ba293cddca599e4dfda976f6433651814343592e39ef40aec5ca7c884e4ad28f004ab86bd36a384e1c334ab008629bec9ea3bd5
|
|
Binary file
|
|
Binary file
|
data/binaries/tng.bundle
ADDED
|
Binary file
|
data/lib/tng/version.rb
CHANGED
data/lib/tng.rb
CHANGED
|
@@ -14,6 +14,7 @@ require_relative "tng/railtie" if defined?(Rails)
|
|
|
14
14
|
|
|
15
15
|
begin
|
|
16
16
|
require "rbconfig"
|
|
17
|
+
require "fileutils"
|
|
17
18
|
|
|
18
19
|
platform = RUBY_PLATFORM
|
|
19
20
|
arch = RbConfig::CONFIG["host_cpu"]
|
|
@@ -30,19 +31,24 @@ begin
|
|
|
30
31
|
ext = platform.include?("darwin") ? "bundle" : "so"
|
|
31
32
|
|
|
32
33
|
# Try loading in order of preference
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
# Simple-named binaries can be loaded directly
|
|
35
|
+
simple_binary_paths = [
|
|
35
36
|
File.expand_path("tng/tng.#{ext}", __dir__),
|
|
36
37
|
File.expand_path("../binaries/tng.#{ext}", __dir__),
|
|
37
|
-
|
|
38
|
+
File.expand_path("binaries/tng.#{ext}", Dir.pwd)
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
# Platform-specific binaries need to be copied to temp with simple name
|
|
42
|
+
# because Ruby's init function lookup uses the filename
|
|
43
|
+
platform_binary_paths = [
|
|
38
44
|
File.expand_path("../binaries/tng-#{os}-#{arch}.#{ext}", __dir__),
|
|
39
|
-
# Fallback: current dir
|
|
40
|
-
File.expand_path("binaries/tng.#{ext}", Dir.pwd),
|
|
41
45
|
File.expand_path("binaries/tng-#{os}-#{arch}.#{ext}", Dir.pwd)
|
|
42
46
|
]
|
|
43
47
|
|
|
44
48
|
loaded = false
|
|
45
|
-
|
|
49
|
+
|
|
50
|
+
# Try simple-named binaries first (they load directly)
|
|
51
|
+
simple_binary_paths.each do |path|
|
|
46
52
|
next unless File.exist?(path)
|
|
47
53
|
|
|
48
54
|
require path
|
|
@@ -50,7 +56,27 @@ begin
|
|
|
50
56
|
break
|
|
51
57
|
end
|
|
52
58
|
|
|
53
|
-
|
|
59
|
+
# If not loaded, try platform-specific binaries (copy to temp first)
|
|
60
|
+
unless loaded
|
|
61
|
+
platform_binary_paths.each do |path|
|
|
62
|
+
next unless File.exist?(path)
|
|
63
|
+
|
|
64
|
+
# Copy to temp location with simple name so Init_tng is found
|
|
65
|
+
temp_dir = File.join(Dir.tmpdir, "tng-#{Process.pid}")
|
|
66
|
+
FileUtils.mkdir_p(temp_dir)
|
|
67
|
+
temp_binary = File.join(temp_dir, "tng.#{ext}")
|
|
68
|
+
FileUtils.cp(path, temp_binary)
|
|
69
|
+
|
|
70
|
+
require temp_binary
|
|
71
|
+
loaded = true
|
|
72
|
+
break
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
unless loaded
|
|
77
|
+
raise LoadError,
|
|
78
|
+
"Could not find binary at any of: #{(simple_binary_paths + platform_binary_paths).join(", ")}"
|
|
79
|
+
end
|
|
54
80
|
rescue LoadError => e
|
|
55
81
|
puts "Warning: Could not load native extension: #{e.message}"
|
|
56
82
|
puts "Some functionality may not be available."
|
|
@@ -67,6 +93,7 @@ module Tng
|
|
|
67
93
|
api_key: nil,
|
|
68
94
|
base_url: "https://app.tng.sh/",
|
|
69
95
|
test_helper_path: nil,
|
|
96
|
+
authentication_enabled: false,
|
|
70
97
|
authentication_methods: []
|
|
71
98
|
}
|
|
72
99
|
|
|
@@ -109,4 +136,12 @@ module Tng
|
|
|
109
136
|
def self.authentication_methods
|
|
110
137
|
@config[:authentication_methods]
|
|
111
138
|
end
|
|
139
|
+
|
|
140
|
+
def self.authentication_enabled=(value)
|
|
141
|
+
@config[:authentication_enabled] = value
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
def self.authentication_enabled
|
|
145
|
+
@config[:authentication_enabled]
|
|
146
|
+
end
|
|
112
147
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tng
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ralucab
|
|
@@ -162,6 +162,9 @@ files:
|
|
|
162
162
|
- binaries/go-ui-darwin-arm64
|
|
163
163
|
- binaries/go-ui-linux-amd64
|
|
164
164
|
- binaries/go-ui-linux-arm64
|
|
165
|
+
- binaries/tng-linux-arm64.so
|
|
166
|
+
- binaries/tng-linux-x86_64.so
|
|
167
|
+
- binaries/tng.bundle
|
|
165
168
|
- lib/generators/tng/install_generator.rb
|
|
166
169
|
- lib/tng.rb
|
|
167
170
|
- lib/tng/analyzers/controller.rb
|
|
@@ -214,7 +217,7 @@ post_install_message: "┌ TNG ────────────────
|
|
|
214
217
|
\ │\n│ • bundle exec
|
|
215
218
|
tng --help - Show help information │\n│ │\n│
|
|
216
219
|
\ \U0001F4A1 Generate tests for individual methods with precision │\n└────────────────────────────────────────────────────────────
|
|
217
|
-
v0.3.
|
|
220
|
+
v0.3.8 ┘\n"
|
|
218
221
|
rdoc_options: []
|
|
219
222
|
require_paths:
|
|
220
223
|
- lib
|