a11y_agent 0.0.1 → 0.0.5.pre.alpha.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/Rakefile +4 -0
- data/lib/a11y_agent/version.rb +1 -1
- data/lib/tasks/release.rake +73 -0
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a964bc3fd10040bd862e155f63854ad044320918c01ea351de760157064a244
|
4
|
+
data.tar.gz: dab51f74f23c8ab8e662359989dc5cf8d30c4cdd73b732d998c8e6e288b6b203
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3dc21cae69b98f7eb19358e6204d369622a20ae788b077effbe94badf530ca972da9c6706dbde619c5bf17109f74ff9a8fb7d8ba73b0e961b7b0f9c52cfc444
|
7
|
+
data.tar.gz: 5ae1bc8f55c831751178d39b4d407168ce4a57c5c09aea689b069d0622adcd03148b4f6a3b6bf9cc350e98a0b4d2dd27d62ab303540760c72c753f1c41fce753
|
data/Rakefile
ADDED
data/lib/a11y_agent/version.rb
CHANGED
@@ -0,0 +1,73 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# lib/tasks/homebrew_formula.rake
|
4
|
+
|
5
|
+
require 'rubygems'
|
6
|
+
require 'rake'
|
7
|
+
|
8
|
+
namespace :release do
|
9
|
+
task :build_package do
|
10
|
+
system 'bundle config set cache_all true'
|
11
|
+
system 'bundle package'
|
12
|
+
name = Gem::Specification.load(Dir.glob('*.gemspec').first).name
|
13
|
+
version = Gem::Specification.load(Dir.glob('*.gemspec').first).version
|
14
|
+
license = Gem::Specification.load(Dir.glob('*.gemspec').first).license
|
15
|
+
system "rm -f #{name}*.tar* #{name}*.sha256"
|
16
|
+
system "fpm -s dir -t tar --name #{name} --version #{version} --license #{license} --exclude .git --exclude test --exclude spec ."
|
17
|
+
system "mv #{name}.tar #{name}-#{version}.tar"
|
18
|
+
system "xz -z #{name}-#{version}.tar"
|
19
|
+
sha = `shasum -a 256 #{name}-#{version}.tar.xz`.split(' ').first
|
20
|
+
File.write("#{name}-#{version}.sha256", sha)
|
21
|
+
end
|
22
|
+
|
23
|
+
task :upload_package do
|
24
|
+
name = Gem::Specification.load(Dir.glob('*.gemspec').first).name
|
25
|
+
version = Gem::Specification.load(Dir.glob('*.gemspec').first).version
|
26
|
+
file = "#{name}-#{version}.tar.xz"
|
27
|
+
file_sha256 = "#{name}-#{version}.sha256"
|
28
|
+
system "gh release create v#{version} #{file} #{file_sha256} --title 'v#{version}' --notes ''"
|
29
|
+
end
|
30
|
+
|
31
|
+
desc 'Generate Homebrew formula'
|
32
|
+
task :generate_homebrew_formula do
|
33
|
+
spec = Gem::Specification.load(Dir.glob('*.gemspec').first)
|
34
|
+
name = spec.name
|
35
|
+
version = spec.version
|
36
|
+
sha256sum = File.read("#{name}-#{version}.sha256").strip
|
37
|
+
url = `gh release view v#{version} --json assets | jq -r '.assets[] | select(.name == "#{name}-#{version}.tar.xz") | .url'`.strip
|
38
|
+
|
39
|
+
formula_name = spec.name.capitalize
|
40
|
+
class_name = formula_name.gsub(/_\w/) { |match| match[1].upcase }.to_s
|
41
|
+
|
42
|
+
formula = <<~RUBY
|
43
|
+
class #{class_name} < Formula
|
44
|
+
desc "#{spec.summary}"
|
45
|
+
homepage "#{spec.homepage}"
|
46
|
+
url "#{url}"
|
47
|
+
sha256 "#{sha256sum}"
|
48
|
+
|
49
|
+
depends_on "ruby"
|
50
|
+
|
51
|
+
def install
|
52
|
+
ENV["GEM_HOME"] = libexec
|
53
|
+
|
54
|
+
# Extract all files to libexec, which is a common Homebrew practice for third-party tools
|
55
|
+
libexec.install Dir["*"]
|
56
|
+
|
57
|
+
bin.install libexec/"bin/a11y_agent"
|
58
|
+
bin.env_script_all_files(libexec/"bin", GEM_HOME: ENV.fetch("GEM_HOME"))
|
59
|
+
end
|
60
|
+
|
61
|
+
test do
|
62
|
+
# Simple test to check the version or a help command
|
63
|
+
system "\#{bin}/a11y_agent", "--help"
|
64
|
+
end
|
65
|
+
end
|
66
|
+
RUBY
|
67
|
+
|
68
|
+
Dir.mkdir('tmp') unless Dir.exist?('tmp')
|
69
|
+
path = "tmp/#{spec.name.downcase}.rb"
|
70
|
+
File.write(path, formula)
|
71
|
+
puts "Generated Homebrew formula for #{spec.name} version #{spec.version} at #{path}"
|
72
|
+
end
|
73
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: a11y_agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.1
|
4
|
+
version: 0.0.5.pre.alpha.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cameron Cundiff
|
@@ -89,11 +89,13 @@ extra_rdoc_files: []
|
|
89
89
|
files:
|
90
90
|
- ".env.sample"
|
91
91
|
- README.md
|
92
|
+
- Rakefile
|
92
93
|
- eslint.config.mjs
|
93
94
|
- fixtures/sample.tsx
|
94
95
|
- lib/a11y_agent.rb
|
95
96
|
- lib/a11y_agent/version.rb
|
96
97
|
- lib/fix_a11y_generator.rb
|
98
|
+
- lib/tasks/release.rake
|
97
99
|
- package.json
|
98
100
|
- trigger.txt
|
99
101
|
- yarn.lock
|
@@ -115,12 +117,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
115
117
|
version: 3.3.0
|
116
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
117
119
|
requirements:
|
118
|
-
- - "
|
120
|
+
- - ">"
|
119
121
|
- !ruby/object:Gem::Version
|
120
|
-
version:
|
122
|
+
version: 1.3.1
|
121
123
|
requirements: []
|
122
|
-
rubygems_version: 3.
|
124
|
+
rubygems_version: 3.4.1
|
123
125
|
signing_key:
|
124
126
|
specification_version: 4
|
125
|
-
summary:
|
127
|
+
summary: AI agent that fixes accessibility issues
|
126
128
|
test_files: []
|