air_test 0.1.1 → 0.1.2
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/exe/air_test +64 -0
- data/lib/air_test/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26f6255268e954f779db9fd1f517565afea3a4c8e6a64c34796b13df95dedb62
|
4
|
+
data.tar.gz: 0d5c580cd9ea6997e2c7388e1e9c9dce7ffc863e5e713650e94204971a03b330
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff3f31e9e880ae47460d8f4ed3f07ebc7c333533aa85cc6d40541729f65346c8a9d9052534d82f52a1c5e371b173feca5d73e886feb6ac3e716f350ce2a8e0f6
|
7
|
+
data.tar.gz: efa4d2033943a6b309a19b39aebd743f92e8e43c84df9cb0ae5d3e44d5f0a8aef4e946481ec97c996f36116c96e0f7d6cb40f4de926566be5d45208dc9833f90
|
data/exe/air_test
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'fileutils'
|
3
|
+
|
4
|
+
GREEN = "\e[32m"
|
5
|
+
YELLOW = "\e[33m"
|
6
|
+
RED = "\e[31m"
|
7
|
+
CYAN = "\e[36m"
|
8
|
+
RESET = "\e[0m"
|
9
|
+
|
10
|
+
puts "#{CYAN}🚀 Initializing AirTest for your Rails project...#{RESET}\n"
|
11
|
+
|
12
|
+
initializer_path = "config/initializers/air_test.rb"
|
13
|
+
if File.exist?(initializer_path)
|
14
|
+
puts "#{YELLOW}⚠️ #{initializer_path} already exists. Skipping.#{RESET}"
|
15
|
+
else
|
16
|
+
FileUtils.mkdir_p(File.dirname(initializer_path))
|
17
|
+
File.write(initializer_path, <<~RUBY)
|
18
|
+
AirTest.configure do |config|
|
19
|
+
config.notion_token = ENV['NOTION_TOKEN']
|
20
|
+
config.notion_database_id = ENV['NOTION_DATABASE_ID']
|
21
|
+
config.github_token = ENV['GITHUB_BOT_TOKEN']
|
22
|
+
config.repo = 'your-org/your-repo' # format: 'organization/repo_name'
|
23
|
+
end
|
24
|
+
RUBY
|
25
|
+
puts "#{GREEN}✅ Created #{initializer_path}#{RESET}"
|
26
|
+
end
|
27
|
+
|
28
|
+
['spec/features', 'spec/steps'].each do |dir|
|
29
|
+
if Dir.exist?(dir)
|
30
|
+
puts "#{YELLOW}⚠️ #{dir} already exists. Skipping.#{RESET}"
|
31
|
+
else
|
32
|
+
FileUtils.mkdir_p(dir)
|
33
|
+
puts "#{GREEN}✅ Created #{dir}/#{RESET}"
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
example_env = ".env.air_test.example"
|
38
|
+
if File.exist?(example_env)
|
39
|
+
puts "#{YELLOW}⚠️ #{example_env} already exists. Skipping.#{RESET}"
|
40
|
+
else
|
41
|
+
File.write(example_env, <<~ENV)
|
42
|
+
NOTION_TOKEN=your_notion_token
|
43
|
+
NOTION_DATABASE_ID=your_notion_database_id
|
44
|
+
GITHUB_BOT_TOKEN=your_github_token
|
45
|
+
ENV
|
46
|
+
puts "#{GREEN}✅ Created #{example_env}#{RESET}"
|
47
|
+
end
|
48
|
+
|
49
|
+
puts "\n🔎 Checking environment variables..."
|
50
|
+
missing = []
|
51
|
+
%w[NOTION_TOKEN NOTION_DATABASE_ID GITHUB_BOT_TOKEN].each do |var|
|
52
|
+
if ENV[var].nil? || ENV[var].empty?
|
53
|
+
puts "#{YELLOW}⚠️ #{var} is not set!#{RESET}"
|
54
|
+
missing << var
|
55
|
+
else
|
56
|
+
puts "#{GREEN}✅ #{var} is set#{RESET}"
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
puts "\n✨ All set! Next steps:"
|
61
|
+
puts " 1. Fill in your config/initializers/air_test.rb"
|
62
|
+
puts " 2. Add your tokens to .env or your environment"
|
63
|
+
puts " 3. Run: bundle exec rake air_test:generate_specs_from_notion"
|
64
|
+
puts "\nHappy testing! 🎉"
|
data/lib/air_test/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- julien bouland
|
@@ -13,7 +13,8 @@ description: Automate the generation of Turnip/RSpec specs from Notion tickets,
|
|
13
13
|
branches, commits, pushes, and GitHub Pull Requests—all with a single Rake command.
|
14
14
|
email:
|
15
15
|
- bouland.julien@gmail.com
|
16
|
-
executables:
|
16
|
+
executables:
|
17
|
+
- air_test
|
17
18
|
extensions: []
|
18
19
|
extra_rdoc_files: []
|
19
20
|
files:
|
@@ -24,6 +25,7 @@ files:
|
|
24
25
|
- LICENSE.txt
|
25
26
|
- README.md
|
26
27
|
- Rakefile
|
28
|
+
- exe/air_test
|
27
29
|
- lib/air_test.rb
|
28
30
|
- lib/air_test/configuration.rb
|
29
31
|
- lib/air_test/github_client.rb
|