air_test 0.1.3 โ 0.1.4.1
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/README.md +0 -6
- data/Rakefile +3 -0
- data/lib/air_test/engine.rb +10 -0
- data/lib/air_test/version.rb +1 -1
- data/lib/air_test.rb +15 -0
- data/lib/tasks/air_test.rake +33 -3
- metadata +46 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a23c7cf2ccd637fda7597dcd7fa7853c7b31cfdb19eae4e164a5aa63c6ccf5d0
|
4
|
+
data.tar.gz: 26f87ad1e418b430f4bcbf8d31c866acde6c2f07d62f601ea34b81485b0bfe89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1bbad763cce870204f348502db6dc3f0f67ed16ada42ce361d0c805382abb9ac0f8a586f83f67764369a2a48c691b9fae1d2f687a1128bd8ca7b525dc30eac5
|
7
|
+
data.tar.gz: 1edae3b07e4eb692cd422e98fffaf1c2503bd0bfe9710aff081af3bc4f3802f304ea296cd837eab4729bbfa56a6d0dd8e3c5beb26bc7ea8dccf3c0f76bca9dcf
|
data/README.md
CHANGED
@@ -95,12 +95,6 @@ GITHUB_BOT_TOKEN=ghp_xxx
|
|
95
95
|
|
96
96
|
---
|
97
97
|
|
98
|
-
## ๐งช Tests (optional)
|
99
|
-
|
100
|
-
If you want to test the gemโs services, you can add specs in the `spec/` folder.
|
101
|
-
|
102
|
-
---
|
103
|
-
|
104
98
|
## ๐ Troubleshooting
|
105
99
|
|
106
100
|
- **Notion or GitHub authentication error**: check your tokens.
|
data/Rakefile
CHANGED
@@ -0,0 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module AirTest
|
4
|
+
class Engine < ::Rails::Engine
|
5
|
+
# This ensures that the Rake tasks are automatically loaded when the gem is included in a Rails app
|
6
|
+
rake_tasks do
|
7
|
+
load File.expand_path("tasks/air_test.rake", __dir__)
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
data/lib/air_test/version.rb
CHANGED
data/lib/air_test.rb
CHANGED
@@ -11,3 +11,18 @@ module AirTest
|
|
11
11
|
yield(configuration)
|
12
12
|
end
|
13
13
|
end
|
14
|
+
|
15
|
+
require_relative "air_test/version"
|
16
|
+
require_relative "air_test/configuration"
|
17
|
+
require_relative "air_test/notion_parser"
|
18
|
+
require_relative "air_test/spec_generator"
|
19
|
+
require_relative "air_test/github_client"
|
20
|
+
require_relative "air_test/runner"
|
21
|
+
|
22
|
+
# Load Rails engine if Rails is available (for Rake task support)
|
23
|
+
require_relative "air_test/engine" if defined?(Rails)
|
24
|
+
|
25
|
+
# Also load Rake tasks directly if Rake is available (for development/testing)
|
26
|
+
if defined?(Rake)
|
27
|
+
load File.expand_path("../tasks/air_test.rake", __FILE__)
|
28
|
+
end
|
data/lib/tasks/air_test.rake
CHANGED
@@ -1,9 +1,39 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Ensure the main gem is loaded
|
4
|
+
require "air_test"
|
5
|
+
|
3
6
|
namespace :air_test do
|
4
|
-
desc "Generate specs and PR from Notion"
|
5
|
-
task generate_specs_from_notion
|
7
|
+
desc "Generate specs and PR from Notion tickets"
|
8
|
+
task :generate_specs_from_notion, [:limit] do |_task, args|
|
6
9
|
require "air_test/runner"
|
7
|
-
|
10
|
+
|
11
|
+
limit = (args[:limit] || 5).to_i
|
12
|
+
puts "๐ Starting AirTest with limit: #{limit}"
|
13
|
+
|
14
|
+
begin
|
15
|
+
runner = AirTest::Runner.new
|
16
|
+
runner.run(limit: limit)
|
17
|
+
puts "โ
AirTest completed successfully!"
|
18
|
+
rescue StandardError => e
|
19
|
+
puts "โ AirTest failed: #{e.message}"
|
20
|
+
puts e.backtrace.first(5).join("\n")
|
21
|
+
exit 1
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
desc "Show AirTest configuration"
|
26
|
+
task :config do
|
27
|
+
require "air_test/configuration"
|
28
|
+
|
29
|
+
# Initialize configuration if not already done
|
30
|
+
AirTest.configuration ||= AirTest::Configuration.new
|
31
|
+
|
32
|
+
config = AirTest.configuration
|
33
|
+
puts "๐ง AirTest Configuration:"
|
34
|
+
puts " Notion Token: #{config.notion_token ? "Set" : "Not set"}"
|
35
|
+
puts " Notion Database ID: #{config.notion_database_id || "Not set"}"
|
36
|
+
puts " GitHub Token: #{config.github_token ? "Set" : "Not set"}"
|
37
|
+
puts " Repository: #{config.repo || "Not set"}"
|
8
38
|
end
|
9
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,56 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: air_test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- julien bouland
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-07-
|
11
|
-
dependencies:
|
10
|
+
date: 2025-07-20 00:00:00.000000000 Z
|
11
|
+
dependencies:
|
12
|
+
- !ruby/object:Gem::Dependency
|
13
|
+
name: rails
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - ">="
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '6.0'
|
19
|
+
type: :runtime
|
20
|
+
prerelease: false
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
requirements:
|
23
|
+
- - ">="
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: '6.0'
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: faraday-retry
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - "~>"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '2.0'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '2.0'
|
40
|
+
- !ruby/object:Gem::Dependency
|
41
|
+
name: octokit
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '7.0'
|
47
|
+
type: :runtime
|
48
|
+
prerelease: false
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '7.0'
|
12
54
|
description: Automate the generation of Turnip/RSpec specs from Notion tickets, create
|
13
55
|
branches, commits, pushes, and GitHub Pull Requests. All with a single Rake command.
|
14
56
|
email:
|
@@ -28,6 +70,7 @@ files:
|
|
28
70
|
- exe/air_test
|
29
71
|
- lib/air_test.rb
|
30
72
|
- lib/air_test/configuration.rb
|
73
|
+
- lib/air_test/engine.rb
|
31
74
|
- lib/air_test/github_client.rb
|
32
75
|
- lib/air_test/notion_parser.rb
|
33
76
|
- lib/air_test/runner.rb
|