air_test 0.1.4.6 ā 0.1.4.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/lib/air_test/runner.rb +5 -3
- data/lib/air_test/spec_generator.rb +1 -1
- data/lib/air_test/tasks/air_test.rake +1 -2
- data/lib/air_test/version.rb +1 -1
- data/lib/air_test.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 837427e06f82d4ef5ac6e6998b6b550e94daccce986a095f1506c8efd9774673
|
4
|
+
data.tar.gz: 0b0697b5bf5d4fd7fbf7e8facd391c86db0bed0de5392f5099dd0682c993a559
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73031bab7c56ce4005432e22f2446203ec282f2232efad9c01c994d5a90abbe2cd660677b3415754c910a8e48ade7f3f9578e6d0b8b939e7fae1238f880fe95b
|
7
|
+
data.tar.gz: '079a8ed3f0d7d4218139d8f9cb4d666d5d13c3b11f3ab88c48c3d109f7532b32bec789ed40c68b65d1bcf1944252de9a069d10f0ab61167546e5a944bc055ed3'
|
data/lib/air_test/runner.rb
CHANGED
@@ -20,10 +20,12 @@ module AirTest
|
|
20
20
|
url = @notion.extract_ticket_url(ticket)
|
21
21
|
puts "\nš Processing: FDR#{ticket_id} - #{title}"
|
22
22
|
parsed_data = @notion.parse_ticket_content(ticket["id"])
|
23
|
-
|
23
|
+
unless parsed_data && parsed_data[:feature] && !parsed_data[:feature].empty?
|
24
|
+
puts "ā ļø Skipping ticket FDR#{ticket_id} due to missing or empty feature."
|
25
|
+
next
|
26
|
+
end
|
24
27
|
|
25
|
-
|
26
|
-
branch = "air_test/#{ticket_id}-#{slug}"
|
28
|
+
branch = "air_test/#{ticket_id}-#{title.downcase.gsub(/[^a-z0-9]+/, "-").gsub(/^-|-$/, "")}"
|
27
29
|
spec_path = @spec.generate_spec_from_parsed_data(ticket_id, parsed_data)
|
28
30
|
step_path = @spec.generate_step_definitions_for_spec(spec_path)
|
29
31
|
files_to_commit = [spec_path]
|
@@ -8,7 +8,7 @@ module AirTest
|
|
8
8
|
class SpecGenerator
|
9
9
|
# rubocop:disable Metrics/AbcSize, Metrics/MethodLength
|
10
10
|
def generate_spec_from_parsed_data(ticket_id, parsed_data, output_dir: "spec/features")
|
11
|
-
feature_slug = parsed_data[:feature].downcase.gsub(/[^a-z0-9]+/, "-").gsub(/^-|-$/, "")
|
11
|
+
feature_slug = parsed_data[:feature].downcase.gsub(/[^a-z0-9]+/, "-").gsub(/^-|-$/, "").slice(0, 50)
|
12
12
|
filename = "#{feature_slug}_fdr#{ticket_id}.rb"
|
13
13
|
filepath = File.join(output_dir, filename)
|
14
14
|
FileUtils.mkdir_p(output_dir)
|
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
# Ensure the main gem is loaded
|
4
4
|
require "air_test"
|
5
|
-
puts ">>> Loading AirTest Rake tasks from #{__FILE__}"
|
6
5
|
namespace :air_test do
|
7
6
|
desc "Generate specs and PR from Notion tickets"
|
8
7
|
task :generate_specs_from_notion, [:limit] do |_task, args|
|
@@ -22,7 +21,7 @@ namespace :air_test do
|
|
22
21
|
|
23
22
|
limit = (args[:limit] || 5).to_i
|
24
23
|
puts "š Starting AirTest with limit: #{limit}"
|
25
|
-
|
24
|
+
|
26
25
|
begin
|
27
26
|
runner = AirTest::Runner.new
|
28
27
|
runner.run(limit: limit)
|
data/lib/air_test/version.rb
CHANGED
data/lib/air_test.rb
CHANGED