air_test 0.1.4.8 → 0.1.5.0

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: 837427e06f82d4ef5ac6e6998b6b550e94daccce986a095f1506c8efd9774673
4
- data.tar.gz: 0b0697b5bf5d4fd7fbf7e8facd391c86db0bed0de5392f5099dd0682c993a559
3
+ metadata.gz: 4b19be078019395eb0f510f9f96d0acb563f45dddfce668d27ed1194d1c2302e
4
+ data.tar.gz: 1fb2a90ce3c6581dc5a77fdf23e71d2f0474fec361faf999960a41e92a31c77a
5
5
  SHA512:
6
- metadata.gz: 73031bab7c56ce4005432e22f2446203ec282f2232efad9c01c994d5a90abbe2cd660677b3415754c910a8e48ade7f3f9578e6d0b8b939e7fae1238f880fe95b
7
- data.tar.gz: '079a8ed3f0d7d4218139d8f9cb4d666d5d13c3b11f3ab88c48c3d109f7532b32bec789ed40c68b65d1bcf1944252de9a069d10f0ab61167546e5a944bc055ed3'
6
+ metadata.gz: 2cc0278ea9d903ce627c1afb64cc052c535900ab371d3b97a3e69e684135b4fbd52adde2e86c33750bc66377b2c8d3c9f63186d77f5eab478c14b42c3838ed5f
7
+ data.tar.gz: dfd2c4ad5a70b20c981b961c28e6f09506c6e4ce1176ab6a7296bd52dffa33a01a165e8b38f16724d4c0709753452f5cc7f2751344bc5f381575d47a1a3fef3e
@@ -17,6 +17,14 @@ module AirTest
17
17
  else
18
18
  system("git checkout -b #{branch}")
19
19
  end
20
+ # Set git user to bot
21
+ system('git config user.name "air-test-bot"')
22
+ system('git config user.email "airtest.bot@gmail.com"')
23
+ # Set remote to use bot token if available
24
+ if @github_token
25
+ repo_url = "github.com/#{@repo}.git"
26
+ system("git remote set-url origin https://#{@github_token}@#{repo_url}")
27
+ end
20
28
  files.each { |f| system("git add -f #{f}") }
21
29
  has_changes = !system("git diff --cached --quiet")
22
30
  system("git commit -m '#{commit_message}'") if has_changes
@@ -81,7 +81,8 @@ module AirTest
81
81
  current_scenario = nil
82
82
  in_feature_block = false
83
83
  in_scenario_block = false
84
- blocks.each do |block|
84
+ last_block_type = nil
85
+ blocks.each_with_index do |block, idx|
85
86
  case block["type"]
86
87
  when "heading_1", "heading_2", "heading_3"
87
88
  heading_text = extract_text(block[block["type"]]["rich_text"])
@@ -131,6 +132,33 @@ module AirTest
131
132
  parsed_data[:meta][:assignee] = extract_assignee(text)
132
133
  end
133
134
  end
135
+ last_block_type = block["type"]
136
+ end
137
+ # Handle case where there is only one scenario and no explicit scenario heading
138
+ if parsed_data[:scenarios].empty?
139
+ # Try to find steps after the feature heading
140
+ steps = []
141
+ in_steps = false
142
+ blocks.each do |block|
143
+ case block["type"]
144
+ when "heading_1", "heading_2", "heading_3"
145
+ heading_text = extract_text(block[block["type"]]["rich_text"])
146
+ if heading_text.downcase.include?("feature")
147
+ in_steps = true
148
+ elsif heading_text.downcase.include?("scenario")
149
+ in_steps = true
150
+ else
151
+ in_steps = false
152
+ end
153
+ when "paragraph", "bulleted_list_item", "numbered_list_item"
154
+ text = extract_text(block[block["type"]]["rich_text"] || block["paragraph"]["rich_text"])
155
+ next if text.empty?
156
+ steps << text if in_steps
157
+ end
158
+ end
159
+ if steps.any?
160
+ parsed_data[:scenarios] << { title: "Scenario", steps: steps }
161
+ end
134
162
  end
135
163
  parsed_data[:feature] = parsed_data[:feature].strip
136
164
  parsed_data[:meta][:tags] = parsed_data[:meta][:tags].uniq
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AirTest
4
- VERSION = "0.1.4.8"
4
+ VERSION = "0.1.5.0"
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: air_test
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4.8
4
+ version: 0.1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - julien bouland
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-07-21 00:00:00.000000000 Z
10
+ date: 2025-07-23 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rails