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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c3b187572f19a15aeb81dfd5be26c940e0e6d2c5a67e9a03a9df7234f11f7850
4
- data.tar.gz: aac3a342c8560bead38235275e0c76fec3b53ff2fb1bcec4d29116404031e4b0
3
+ metadata.gz: e936ced36e475ba1ae147f9209794b592c639b96eb5573fff15e47175f5729d2
4
+ data.tar.gz: bce3240ea48c7ef6cfbe2629296eaa28165f251625541151d2a9a93673eb5659
5
5
  SHA512:
6
- metadata.gz: 1029c4728e0de909aa0598b5e5279289508c6a64429aac80004bacce00afadfd7a06d954f5790d0e8fba5a5849966a5e279d0cc72bb0bbc2850aae3b9e345c97
7
- data.tar.gz: 03dfc617af94c583099e815a834fc90e9126b29343bf8a06c806f6afd2aa4955b36ec1c3a9bee434b2bc9ffd170cfbffd810c0f35b3b6ede171a7b4b0e3d3f78
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
Binary file
Binary file
@@ -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
@@ -79,8 +79,10 @@ module Tng
79
79
 
80
80
  case node
81
81
  when Prism::DefNode
82
- # Only add methods that are public
83
- methods << node.name.to_s if current_visibility == :public
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tng
4
- VERSION = "0.3.3"
4
+ VERSION = "0.3.4"
5
5
  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.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โ”‚ \e[32;1mโœ…
198
- Tng installed successfully!\e[0m โ”‚\nโ”‚ โ”‚\nโ”‚
199
- \ \e[31;1m\U0001F4CB SETUP REQUIRED\e[0m โ”‚\nโ”‚
200
- \ โ”‚\nโ”‚ \e[37m1.
201
- Generate configuration:\e[0m โ”‚\nโ”‚ \e[34m
202
- \ rails g tng:install\e[0m โ”‚\nโ”‚ โ”‚\nโ”‚
203
- \ \e[37m2. Edit configuration file:\e[0m โ”‚\nโ”‚
204
- \ \e[34m config/initializers/tng.rb\e[0m โ”‚\nโ”‚
205
- \ โ”‚\nโ”‚ \e[37m3.
206
- Add your license key:\e[0m โ”‚\nโ”‚ \e[34m
207
- \ config.api_key = 'your-license-key-here'\e[0m โ”‚\nโ”‚ โ”‚\nโ”‚
208
- \ \e[37m\U0001F4CB Check documentation for the correct authentication setup\e[0m
209
- \ โ”‚\nโ”‚ โ”‚\nโ”‚
210
- \ \e[31;1m\U0001F680 Usage:\e[0m โ”‚\nโ”‚
211
- \ โ”‚\nโ”‚ \e[37mInteractive
212
- mode:\e[0m โ”‚\nโ”‚ \e[32mโ€ข bundle
213
- exec tng\e[0m\e[37m - Interactive CLI with method selection\e[0m โ”‚\nโ”‚ โ”‚\nโ”‚
214
- \ \e[37mFeatures:\e[0m โ”‚\nโ”‚
215
- \ \e[32mโ€ข Test 20+ file types: Controllers, Models, Services + Jobs, \e[0m โ”‚\nโ”‚
216
- \ \e[32mHelpers, Lib, Policies, Presenters, Mailers, GraphQL, and more\e[0m โ”‚\nโ”‚
217
- \ \e[32mโ€ข Select specific methods to test\e[0m โ”‚\nโ”‚
218
- \ \e[32mโ€ข Search and filter through methods\e[0m โ”‚\nโ”‚
219
- \ โ”‚\nโ”‚ \e[37mHelp:\e[0m
220
- \ โ”‚\nโ”‚ \e[32mโ€ข bundle
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