├── .github └── workflows │ └── main.yml ├── .gitignore ├── .standard.yml ├── CHANGELOG.md ├── Gemfile ├── LICENSE.txt ├── README.md ├── Rakefile ├── Steepfile ├── ai_refactor.gemspec ├── bin ├── console └── setup ├── commands └── quickdraw │ └── 0.1.0 │ └── convert_minitest.yml ├── examples ├── ex1_convert_a_rspec_test_to_minitest.yml ├── ex1_input_spec.rb ├── ex2_input.rb ├── ex2_write_rbs.yml ├── rails_helper.rb └── test_helper.rb ├── exe └── ai_refactor ├── lib ├── ai_refactor.rb └── ai_refactor │ ├── ai_client.rb │ ├── cli.rb │ ├── command_file_parser.rb │ ├── commands.rb │ ├── context.rb │ ├── file_processor.rb │ ├── logger.rb │ ├── prompt.rb │ ├── prompts │ ├── diff.md │ └── input.md │ ├── refactors.rb │ ├── refactors │ ├── base_refactor.rb │ ├── custom.rb │ ├── minitest │ │ ├── write_test_for_class.md │ │ └── write_test_for_class.rb │ ├── project │ │ ├── write_changelog_from_history.md │ │ └── write_changelog_from_history.rb │ ├── rails │ │ └── minitest │ │ │ ├── rspec_to_minitest.md │ │ │ └── rspec_to_minitest.rb │ ├── rspec │ │ ├── minitest_to_rspec.md │ │ └── minitest_to_rspec.rb │ └── ruby │ │ ├── refactor_ruby.md │ │ ├── refactor_ruby.rb │ │ ├── write_rbs.md │ │ ├── write_rbs.rb │ │ ├── write_ruby.md │ │ └── write_ruby.rb │ ├── run_configuration.rb │ ├── templated_path.rb │ ├── test_runners │ ├── minitest_runner.rb │ ├── rspec_runner.rb │ ├── steep_runner.rb │ ├── test_run_diff_report.rb │ └── test_run_result.rb │ └── version.rb └── test ├── ai_refactor_test.rb ├── lib └── ai_refactor │ ├── context_test.rb │ └── templated_path_test.rb └── test_helper.rb /.github/workflows/main.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/.github/workflows/main.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/.gitignore -------------------------------------------------------------------------------- /.standard.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/.standard.yml -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/Gemfile -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/LICENSE.txt -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/README.md -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/Rakefile -------------------------------------------------------------------------------- /Steepfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/Steepfile -------------------------------------------------------------------------------- /ai_refactor.gemspec: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/ai_refactor.gemspec -------------------------------------------------------------------------------- /bin/console: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/bin/console -------------------------------------------------------------------------------- /bin/setup: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/bin/setup -------------------------------------------------------------------------------- /commands/quickdraw/0.1.0/convert_minitest.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/commands/quickdraw/0.1.0/convert_minitest.yml -------------------------------------------------------------------------------- /examples/ex1_convert_a_rspec_test_to_minitest.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/examples/ex1_convert_a_rspec_test_to_minitest.yml -------------------------------------------------------------------------------- /examples/ex1_input_spec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/examples/ex1_input_spec.rb -------------------------------------------------------------------------------- /examples/ex2_input.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/examples/ex2_input.rb -------------------------------------------------------------------------------- /examples/ex2_write_rbs.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/examples/ex2_write_rbs.yml -------------------------------------------------------------------------------- /examples/rails_helper.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/examples/rails_helper.rb -------------------------------------------------------------------------------- /examples/test_helper.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/examples/test_helper.rb -------------------------------------------------------------------------------- /exe/ai_refactor: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/exe/ai_refactor -------------------------------------------------------------------------------- /lib/ai_refactor.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor.rb -------------------------------------------------------------------------------- /lib/ai_refactor/ai_client.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/ai_client.rb -------------------------------------------------------------------------------- /lib/ai_refactor/cli.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/cli.rb -------------------------------------------------------------------------------- /lib/ai_refactor/command_file_parser.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/command_file_parser.rb -------------------------------------------------------------------------------- /lib/ai_refactor/commands.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/commands.rb -------------------------------------------------------------------------------- /lib/ai_refactor/context.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/context.rb -------------------------------------------------------------------------------- /lib/ai_refactor/file_processor.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/file_processor.rb -------------------------------------------------------------------------------- /lib/ai_refactor/logger.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/logger.rb -------------------------------------------------------------------------------- /lib/ai_refactor/prompt.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/prompt.rb -------------------------------------------------------------------------------- /lib/ai_refactor/prompts/diff.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/prompts/diff.md -------------------------------------------------------------------------------- /lib/ai_refactor/prompts/input.md: -------------------------------------------------------------------------------- 1 | ```__{{content}}__``` 2 | -------------------------------------------------------------------------------- /lib/ai_refactor/refactors.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/refactors.rb -------------------------------------------------------------------------------- /lib/ai_refactor/refactors/base_refactor.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/refactors/base_refactor.rb -------------------------------------------------------------------------------- /lib/ai_refactor/refactors/custom.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/refactors/custom.rb -------------------------------------------------------------------------------- /lib/ai_refactor/refactors/minitest/write_test_for_class.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/refactors/minitest/write_test_for_class.md -------------------------------------------------------------------------------- /lib/ai_refactor/refactors/minitest/write_test_for_class.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/refactors/minitest/write_test_for_class.rb -------------------------------------------------------------------------------- /lib/ai_refactor/refactors/project/write_changelog_from_history.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/refactors/project/write_changelog_from_history.md -------------------------------------------------------------------------------- /lib/ai_refactor/refactors/project/write_changelog_from_history.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/refactors/project/write_changelog_from_history.rb -------------------------------------------------------------------------------- /lib/ai_refactor/refactors/rails/minitest/rspec_to_minitest.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/refactors/rails/minitest/rspec_to_minitest.md -------------------------------------------------------------------------------- /lib/ai_refactor/refactors/rails/minitest/rspec_to_minitest.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/refactors/rails/minitest/rspec_to_minitest.rb -------------------------------------------------------------------------------- /lib/ai_refactor/refactors/rspec/minitest_to_rspec.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/ai_refactor/refactors/rspec/minitest_to_rspec.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/refactors/rspec/minitest_to_rspec.rb -------------------------------------------------------------------------------- /lib/ai_refactor/refactors/ruby/refactor_ruby.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/refactors/ruby/refactor_ruby.md -------------------------------------------------------------------------------- /lib/ai_refactor/refactors/ruby/refactor_ruby.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/refactors/ruby/refactor_ruby.rb -------------------------------------------------------------------------------- /lib/ai_refactor/refactors/ruby/write_rbs.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/refactors/ruby/write_rbs.md -------------------------------------------------------------------------------- /lib/ai_refactor/refactors/ruby/write_rbs.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/refactors/ruby/write_rbs.rb -------------------------------------------------------------------------------- /lib/ai_refactor/refactors/ruby/write_ruby.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/refactors/ruby/write_ruby.md -------------------------------------------------------------------------------- /lib/ai_refactor/refactors/ruby/write_ruby.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/refactors/ruby/write_ruby.rb -------------------------------------------------------------------------------- /lib/ai_refactor/run_configuration.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/run_configuration.rb -------------------------------------------------------------------------------- /lib/ai_refactor/templated_path.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/templated_path.rb -------------------------------------------------------------------------------- /lib/ai_refactor/test_runners/minitest_runner.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/test_runners/minitest_runner.rb -------------------------------------------------------------------------------- /lib/ai_refactor/test_runners/rspec_runner.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/test_runners/rspec_runner.rb -------------------------------------------------------------------------------- /lib/ai_refactor/test_runners/steep_runner.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/test_runners/steep_runner.rb -------------------------------------------------------------------------------- /lib/ai_refactor/test_runners/test_run_diff_report.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/test_runners/test_run_diff_report.rb -------------------------------------------------------------------------------- /lib/ai_refactor/test_runners/test_run_result.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/lib/ai_refactor/test_runners/test_run_result.rb -------------------------------------------------------------------------------- /lib/ai_refactor/version.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module AIRefactor 4 | VERSION = "0.6.0" 5 | end 6 | -------------------------------------------------------------------------------- /test/ai_refactor_test.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/test/ai_refactor_test.rb -------------------------------------------------------------------------------- /test/lib/ai_refactor/context_test.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/test/lib/ai_refactor/context_test.rb -------------------------------------------------------------------------------- /test/lib/ai_refactor/templated_path_test.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/test/lib/ai_refactor/templated_path_test.rb -------------------------------------------------------------------------------- /test/test_helper.rb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stevegeek/ai_refactor/HEAD/test/test_helper.rb --------------------------------------------------------------------------------