tng 0.3.3 โ 0.3.4
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/Rakefile +20 -0
- data/binaries/tng-darwin-arm64.bundle +0 -0
- data/binaries/tng-linux-arm64.so +0 -0
- data/binaries/tng-linux-x86_64.so +0 -0
- data/lib/tng/analyzers/model.rb +2 -1
- data/lib/tng/analyzers/other.rb +4 -2
- data/lib/tng/analyzers/service.rb +2 -1
- data/lib/tng/version.rb +1 -1
- metadata +25 -28
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e936ced36e475ba1ae147f9209794b592c639b96eb5573fff15e47175f5729d2
|
|
4
|
+
data.tar.gz: bce3240ea48c7ef6cfbe2629296eaa28165f251625541151d2a9a93673eb5659
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7cf2e03008535e3d68dc928c699195aadd750b52c08a01bcf99037c565246c902d57b2cc6aaa7699e41811f86afa4e5ead4b33ce2441320cb7772e09838ad251
|
|
7
|
+
data.tar.gz: 033bed50161aae9f0daf04c608ce9e56023fa3f46cbd30b520ce39307efdf498afc811e55f6564777c22a18092950613fb104e7dd944cfe1cdd2aa4bd4c8e41f
|
data/Rakefile
CHANGED
|
@@ -114,6 +114,26 @@ task :build_both do
|
|
|
114
114
|
system("./build_both.sh") || (puts "โ Build failed"; exit 1)
|
|
115
115
|
end
|
|
116
116
|
|
|
117
|
+
task :verify_binaries do
|
|
118
|
+
puts "๐ Verifying binary artifacts..."
|
|
119
|
+
required_go = %w[go-ui-darwin-amd64 go-ui-darwin-arm64 go-ui-linux-amd64 go-ui-linux-arm64]
|
|
120
|
+
missing = required_go.reject { |f| File.exist?("binaries/#{f}") }
|
|
121
|
+
|
|
122
|
+
if missing.any?
|
|
123
|
+
abort "โ Cannot release: Missing binaries in binaries/: #{missing.join(', ')}\nRun 'rake build_both' or './build_both.sh' first!"
|
|
124
|
+
end
|
|
125
|
+
puts "โ
All required binaries present."
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Add this task to suppress the native artifact warning
|
|
129
|
+
task release: :build_both do
|
|
130
|
+
# Temporarily rename the binary to avoid the warning during gem build
|
|
131
|
+
puts "๐ฆ Building gem with pre-compiled binaries..." if File.exist?("binaries/tng.bundle")
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Ensure verify_binaries runs before release
|
|
135
|
+
task release: :verify_binaries
|
|
136
|
+
|
|
117
137
|
desc "Development build: compile for current OS and build gem"
|
|
118
138
|
task :dev do
|
|
119
139
|
puts "๐งน Cleaning Rust binaries (preserving go-ui)..."
|
|
Binary file
|
data/binaries/tng-linux-arm64.so
CHANGED
|
Binary file
|
|
Binary file
|
data/lib/tng/analyzers/model.rb
CHANGED
|
@@ -30,7 +30,8 @@ module Tng
|
|
|
30
30
|
# Load the model class
|
|
31
31
|
model_class = model_name.constantize
|
|
32
32
|
|
|
33
|
-
instance_methods = model_class.public_instance_methods(false)
|
|
33
|
+
instance_methods = model_class.public_instance_methods(false) +
|
|
34
|
+
model_class.private_instance_methods(false)
|
|
34
35
|
class_methods = model_class.public_methods(false) - Class.public_methods
|
|
35
36
|
|
|
36
37
|
model_file = Object.const_source_location(model_class.name)&.first
|
data/lib/tng/analyzers/other.rb
CHANGED
|
@@ -79,8 +79,10 @@ module Tng
|
|
|
79
79
|
|
|
80
80
|
case node
|
|
81
81
|
when Prism::DefNode
|
|
82
|
-
#
|
|
83
|
-
|
|
82
|
+
# Add methods that are public, OR specifically 'initialize' (which is conventionally private but often needs testing)
|
|
83
|
+
if current_visibility == :public || node.name.to_s == "initialize"
|
|
84
|
+
methods << node.name.to_s
|
|
85
|
+
end
|
|
84
86
|
when Prism::CallNode
|
|
85
87
|
# Handle visibility modifiers (private, protected, public)
|
|
86
88
|
if node.receiver.nil? && node.arguments.nil?
|
|
@@ -31,7 +31,8 @@ module Tng
|
|
|
31
31
|
# Load the service class
|
|
32
32
|
service_class = service_name.constantize
|
|
33
33
|
|
|
34
|
-
instance_methods = service_class.public_instance_methods(false)
|
|
34
|
+
instance_methods = service_class.public_instance_methods(false) +
|
|
35
|
+
service_class.private_instance_methods(false)
|
|
35
36
|
class_methods = service_class.public_methods(false) - Class.public_methods
|
|
36
37
|
|
|
37
38
|
# Try to get source file from any method, fallback to const_source_location
|
data/lib/tng/version.rb
CHANGED
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.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ralucab
|
|
@@ -194,33 +194,30 @@ metadata:
|
|
|
194
194
|
source_code_uri: https://github.com/tng-sh/tng-rails-public
|
|
195
195
|
license_uri: https://github.com/tng-sh/tng-rails-public/blob/main/LICENSE.md
|
|
196
196
|
post_install_message: "โ TNG โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ\nโ
|
|
197
|
-
\ โ\nโ
|
|
198
|
-
|
|
199
|
-
\ \
|
|
200
|
-
\ โ\nโ
|
|
201
|
-
|
|
202
|
-
\
|
|
203
|
-
\
|
|
204
|
-
\
|
|
205
|
-
\
|
|
206
|
-
|
|
207
|
-
\
|
|
208
|
-
\
|
|
209
|
-
|
|
210
|
-
\
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
\
|
|
216
|
-
\
|
|
217
|
-
\
|
|
218
|
-
|
|
219
|
-
\
|
|
220
|
-
|
|
221
|
-
exec tng --help\e[0m\e[37m - Show help information\e[0m โ\nโ โ\nโ
|
|
222
|
-
\ \e[37m\U0001F4A1 Generate tests for individual methods with precision\e[0m โ\nโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
223
|
-
v0.3.3 โ\n"
|
|
197
|
+
\ โ\nโ โ
Tng
|
|
198
|
+
installed successfully! โ\nโ โ\nโ
|
|
199
|
+
\ \U0001F4CB SETUP REQUIRED โ\nโ
|
|
200
|
+
\ โ\nโ 1. Generate
|
|
201
|
+
configuration: โ\nโ rails g tng:install
|
|
202
|
+
\ โ\nโ โ\nโ
|
|
203
|
+
\ 2. Edit configuration file: โ\nโ config/initializers/tng.rb
|
|
204
|
+
\ โ\nโ โ\nโ
|
|
205
|
+
\ 3. Add your license key: โ\nโ config.api_key
|
|
206
|
+
= 'your-license-key-here' โ\nโ โ\nโ
|
|
207
|
+
\ \U0001F4CB Check documentation for the correct authentication setup โ\nโ
|
|
208
|
+
\ โ\nโ \U0001F680
|
|
209
|
+
Usage: โ\nโ โ\nโ
|
|
210
|
+
\ Interactive mode: โ\nโ โข bundle
|
|
211
|
+
exec tng - Interactive CLI with method selection โ\nโ โ\nโ
|
|
212
|
+
\ Features: โ\nโ โข Test
|
|
213
|
+
20+ file types: Controllers, Models, Services + Jobs, โ\nโ Helpers, Lib, Policies,
|
|
214
|
+
Presenters, Mailers, GraphQL, and more โ\nโ โข Select specific methods to test
|
|
215
|
+
\ โ\nโ โข Search and filter through methods โ\nโ
|
|
216
|
+
\ โ\nโ Help:
|
|
217
|
+
\ โ\nโ โข bundle exec
|
|
218
|
+
tng --help - Show help information โ\nโ โ\nโ
|
|
219
|
+
\ \U0001F4A1 Generate tests for individual methods with precision โ\nโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
220
|
+
v0.3.4 โ\n"
|
|
224
221
|
rdoc_options: []
|
|
225
222
|
require_paths:
|
|
226
223
|
- lib
|