infinity_test 1.0.3 → 2.0.0.rc2
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 +7 -0
- data/.github/workflows/ci.yml +31 -0
- data/.gitignore +3 -0
- data/.rspec +2 -2
- data/AI_INTEGRATION_IDEAS.md +203 -0
- data/Gemfile +3 -15
- data/HISTORY.md +84 -0
- data/History.markdown +82 -0
- data/{.infinity_test → INFINITY_TEST} +18 -15
- data/LICENSE.txt +2 -2
- data/README.md +867 -0
- data/Rakefile +1 -65
- data/TODO.markdown +38 -24
- data/bin/infinity_test +1 -4
- data/images/fuuu/pending.png +0 -0
- data/images/fuuu/success.png +0 -0
- data/infinity_test.gemspec +41 -189
- data/lib/infinity_test/core/auto_discover.rb +67 -0
- data/lib/infinity_test/core/base.rb +369 -0
- data/lib/infinity_test/core/callback.rb +59 -0
- data/lib/infinity_test/core/changed_file.rb +13 -0
- data/lib/infinity_test/core/command_builder.rb +48 -0
- data/lib/infinity_test/core/command_runner.rb +38 -0
- data/lib/infinity_test/core/configuration_merge.rb +37 -0
- data/lib/infinity_test/core/continuous_test_server.rb +124 -0
- data/lib/infinity_test/core/load_configuration.rb +48 -0
- data/lib/infinity_test/core/notifier.rb +59 -0
- data/lib/infinity_test/core/options.rb +134 -0
- data/lib/infinity_test/core/runner.rb +18 -0
- data/lib/infinity_test/core/version.rb +5 -0
- data/lib/infinity_test/framework/base.rb +93 -0
- data/lib/infinity_test/framework/django.rb +109 -0
- data/lib/infinity_test/framework/elixir_mix.rb +47 -0
- data/lib/infinity_test/framework/fast_api.rb +104 -0
- data/lib/infinity_test/framework/padrino.rb +30 -0
- data/lib/infinity_test/framework/phoenix.rb +72 -0
- data/lib/infinity_test/framework/python_package.rb +97 -0
- data/lib/infinity_test/framework/rails.rb +26 -0
- data/lib/infinity_test/framework/rocket.rb +70 -0
- data/lib/infinity_test/framework/rubygems.rb +29 -0
- data/lib/infinity_test/framework/rust_cargo.rb +69 -0
- data/lib/infinity_test/framework/shared_example.rb +47 -0
- data/lib/infinity_test/observer/base.rb +40 -0
- data/lib/infinity_test/observer/filewatcher.rb +72 -0
- data/lib/infinity_test/observer/listen.rb +74 -0
- data/lib/infinity_test/observer/shared_example.rb +35 -0
- data/lib/infinity_test/old_dsl/configuration.rb +26 -0
- data/lib/infinity_test/strategy/base.rb +50 -0
- data/lib/infinity_test/strategy/elixir_default.rb +20 -0
- data/lib/infinity_test/strategy/python_default.rb +22 -0
- data/lib/infinity_test/strategy/rbenv.rb +34 -0
- data/lib/infinity_test/strategy/ruby_default.rb +21 -0
- data/lib/infinity_test/strategy/rust_default.rb +21 -0
- data/lib/infinity_test/strategy/rvm.rb +52 -0
- data/lib/infinity_test/strategy/shared_example.rb +32 -0
- data/lib/infinity_test/test_framework/base.rb +64 -0
- data/lib/infinity_test/test_framework/cargo_test.rb +49 -0
- data/lib/infinity_test/test_framework/ex_unit.rb +53 -0
- data/lib/infinity_test/test_framework/pytest.rb +65 -0
- data/lib/infinity_test/test_framework/rspec.rb +48 -0
- data/lib/infinity_test/test_framework/shared_example.rb +56 -0
- data/lib/infinity_test/test_framework/test_unit.rb +57 -0
- data/lib/infinity_test.rb +66 -35
- data/spec/infinity_test/core/auto_discover_spec.rb +175 -0
- data/spec/infinity_test/core/base_spec.rb +240 -0
- data/spec/infinity_test/core/callback_spec.rb +89 -0
- data/spec/infinity_test/core/changed_file_spec.rb +26 -0
- data/spec/infinity_test/core/command_builder_spec.rb +38 -0
- data/spec/infinity_test/core/configuration_merge_spec.rb +124 -0
- data/spec/infinity_test/core/continuous_test_server_spec.rb +116 -0
- data/spec/infinity_test/core/load_configuration_spec.rb +43 -0
- data/spec/infinity_test/core/notifier_spec.rb +151 -0
- data/spec/infinity_test/core/options_spec.rb +168 -0
- data/spec/infinity_test/core/runner_spec.rb +17 -0
- data/spec/infinity_test/framework/base_spec.rb +55 -0
- data/spec/infinity_test/framework/django_spec.rb +95 -0
- data/spec/infinity_test/framework/elixir_mix_spec.rb +44 -0
- data/spec/infinity_test/framework/fast_api_spec.rb +96 -0
- data/spec/infinity_test/framework/padrino_spec.rb +58 -0
- data/spec/infinity_test/framework/phoenix_spec.rb +85 -0
- data/spec/infinity_test/framework/python_package_spec.rb +95 -0
- data/spec/infinity_test/framework/rails_spec.rb +58 -0
- data/spec/infinity_test/framework/rocket_spec.rb +69 -0
- data/spec/infinity_test/framework/rubygems_spec.rb +34 -0
- data/spec/infinity_test/framework/rust_cargo_spec.rb +94 -0
- data/spec/infinity_test/observer/base_spec.rb +78 -0
- data/spec/infinity_test/observer/filewatcher_spec.rb +51 -0
- data/spec/infinity_test/observer/listen_spec.rb +50 -0
- data/spec/infinity_test/{builder_spec.rb → strategy/base_spec.rb} +1 -2
- data/spec/infinity_test/strategy/elixir_default_spec.rb +46 -0
- data/spec/infinity_test/strategy/python_default_spec.rb +56 -0
- data/spec/infinity_test/strategy/rbenv_spec.rb +70 -0
- data/spec/infinity_test/strategy/ruby_default_spec.rb +49 -0
- data/spec/infinity_test/strategy/rust_default_spec.rb +56 -0
- data/spec/infinity_test/strategy/rvm_spec.rb +86 -0
- data/spec/infinity_test/test_framework/cargo_test_spec.rb +145 -0
- data/spec/infinity_test/test_framework/ex_unit_spec.rb +153 -0
- data/spec/infinity_test/test_framework/pytest_spec.rb +182 -0
- data/spec/infinity_test/test_framework/rspec_spec.rb +119 -0
- data/spec/infinity_test/test_framework/test_unit_spec.rb +193 -0
- data/spec/spec_helper.rb +34 -119
- metadata +315 -177
- data/.rvmrc +0 -1
- data/Gemfile.lock +0 -62
- data/Readme.markdown +0 -147
- data/Tasks +0 -4
- data/VERSION.yml +0 -5
- data/buzz_images/buzz_lightyear.jpg +0 -0
- data/buzz_images/buzz_lightyear_continencia.gif +0 -0
- data/buzz_images/to_infinity_and_beyond.png +0 -0
- data/features/heuristics.feature +0 -23
- data/features/support/env.rb +0 -2
- data/images/fuuu/sucess.png +0 -0
- data/lib/infinity_test/application.rb +0 -362
- data/lib/infinity_test/application_library/rails.rb +0 -94
- data/lib/infinity_test/application_library/rubygems.rb +0 -43
- data/lib/infinity_test/binary_path.rb +0 -43
- data/lib/infinity_test/builder.rb +0 -66
- data/lib/infinity_test/command.rb +0 -58
- data/lib/infinity_test/configuration.rb +0 -277
- data/lib/infinity_test/continuous_testing.rb +0 -40
- data/lib/infinity_test/dependencies.rb +0 -80
- data/lib/infinity_test/environment.rb +0 -15
- data/lib/infinity_test/heuristics.rb +0 -36
- data/lib/infinity_test/heuristics_helper.rb +0 -9
- data/lib/infinity_test/options.rb +0 -96
- data/lib/infinity_test/runner.rb +0 -38
- data/lib/infinity_test/test_framework.rb +0 -110
- data/lib/infinity_test/test_library/bacon.rb +0 -55
- data/lib/infinity_test/test_library/cucumber.rb +0 -22
- data/lib/infinity_test/test_library/rspec.rb +0 -60
- data/lib/infinity_test/test_library/test_unit.rb +0 -52
- data/lib/infinity_test/test_unit_loader.rb +0 -5
- data/spec/factories/buzz/lib/buzz.rb +0 -0
- data/spec/factories/buzz/spec/buzz_spec.rb +0 -0
- data/spec/factories/company/Gemfile +0 -0
- data/spec/factories/company/lib/company.rb +0 -0
- data/spec/factories/company/test/company_test.rb +0 -0
- data/spec/factories/images/failure.png +0 -0
- data/spec/factories/images/pending.png +0 -0
- data/spec/factories/images/sucess.png +0 -0
- data/spec/factories/infinity_test +0 -5
- data/spec/factories/infinity_test_example +0 -7
- data/spec/factories/slinky/spec/slinky/slinky_spec.rb +0 -0
- data/spec/factories/travel/lib/travel.rb +0 -0
- data/spec/factories/travel/test/partner_test.rb +0 -0
- data/spec/factories/travel/test/travel_test.rb +0 -0
- data/spec/factories/wood/lib/wood.rb +0 -0
- data/spec/factories/wood/spec/wood_spec.rb +0 -0
- data/spec/infinity_test/application_library/rails_spec.rb +0 -140
- data/spec/infinity_test/application_library/rubygems_spec.rb +0 -52
- data/spec/infinity_test/application_spec.rb +0 -434
- data/spec/infinity_test/binary_path_spec.rb +0 -72
- data/spec/infinity_test/command_spec.rb +0 -53
- data/spec/infinity_test/configuration_spec.rb +0 -382
- data/spec/infinity_test/continuous_testing_spec.rb +0 -25
- data/spec/infinity_test/environment_spec.rb +0 -23
- data/spec/infinity_test/heuristics_helper_spec.rb +0 -15
- data/spec/infinity_test/heuristics_spec.rb +0 -127
- data/spec/infinity_test/options_spec.rb +0 -111
- data/spec/infinity_test/runner_spec.rb +0 -42
- data/spec/infinity_test/test_framework_spec.rb +0 -127
- data/spec/infinity_test/test_library/bacon_spec.rb +0 -150
- data/spec/infinity_test/test_library/cucumber_spec.rb +0 -8
- data/spec/infinity_test/test_library/rspec_spec.rb +0 -189
- data/spec/infinity_test/test_library/test_unit_spec.rb +0 -184
- data/spec/infinity_test_spec.rb +0 -40
- /data/images/faces/{sucess.png → success.png} +0 -0
- /data/images/hands/{sucess.png → success.png} +0 -0
- /data/images/mario_bros/{sucess.jpg → success.jpg} +0 -0
- /data/images/rails/{sucess.png → success.png} +0 -0
- /data/images/rubies/{sucess.png → success.png} +0 -0
- /data/images/simpson/{sucess.jpg → success.jpg} +0 -0
- /data/images/street_fighter/{sucess.jpg → success.jpg} +0 -0
- /data/images/toy_story/{sucess.png → success.png} +0 -0
data/Rakefile
CHANGED
|
@@ -1,65 +1 @@
|
|
|
1
|
-
|
|
2
|
-
require 'rubygems'
|
|
3
|
-
require 'rake'
|
|
4
|
-
|
|
5
|
-
require 'rake/clean'
|
|
6
|
-
CLEAN.include('lib/*rbc','lib/*/*.rbc', 'spec/*.rbc', 'spec/*/*.rbc', 'lib/*/*/*rbc', 'spec/*/*/*rbc')
|
|
7
|
-
|
|
8
|
-
task :clean_without_verbose do
|
|
9
|
-
verbose(false)
|
|
10
|
-
Rake::Task['clean'].invoke
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
$:.unshift(File.dirname(__FILE__) + '/lib')
|
|
14
|
-
|
|
15
|
-
POST_MESSAGE = <<-POST_INSTALL_MESSAGE
|
|
16
|
-
|
|
17
|
-
#{ '-' * 80}
|
|
18
|
-
T O I N F I N I T Y A N D B E Y O N D !!!
|
|
19
|
-
|
|
20
|
-
Infinity Test uses the awesome RVM to run.
|
|
21
|
-
If you don't have RVM installed, stop what you're doing =p.
|
|
22
|
-
RVM Installation Instructions:
|
|
23
|
-
http://rvm.beginrescueend.com/rvm/install/
|
|
24
|
-
And don't forget to see how you can customize Infinity Test here:
|
|
25
|
-
http://github.com/tomas-stefano/infinity_test/wiki/Customize-Infinity-Test
|
|
26
|
-
|
|
27
|
-
Happy Coding! :)
|
|
28
|
-
|
|
29
|
-
#{ '-' * 80}
|
|
30
|
-
|
|
31
|
-
POST_INSTALL_MESSAGE
|
|
32
|
-
|
|
33
|
-
begin
|
|
34
|
-
require 'jeweler'
|
|
35
|
-
Jeweler::Tasks.new do |gemspec|
|
|
36
|
-
gemspec.name = "infinity_test"
|
|
37
|
-
gemspec.summary = "Continuous testing and a flexible alternative to Autotest using Watchr and RVM"
|
|
38
|
-
gemspec.description = "Infinity Test is a continuous testing library and a flexible alternative to Autotest, using Watchr library with RSpec, Test::Unit or Bacon with RVM funcionality, giving the possibility to test with all Rubies that you have in your RVM configuration."
|
|
39
|
-
gemspec.email = "tomasdestefi@gmail.com"
|
|
40
|
-
gemspec.homepage = "http://github.com/tomas-stefano/infinity_test"
|
|
41
|
-
gemspec.authors = ["Tomas D'Stefano"]
|
|
42
|
-
|
|
43
|
-
gemspec.add_dependency('watchr', '>= 0.7')
|
|
44
|
-
gemspec.add_dependency('notifiers', '>= 1.1.0')
|
|
45
|
-
|
|
46
|
-
gemspec.add_development_dependency('rspec', '>= 2.0.1')
|
|
47
|
-
gemspec.add_development_dependency('jeweler', '>= 1.4.0')
|
|
48
|
-
|
|
49
|
-
gemspec.post_install_message = POST_MESSAGE
|
|
50
|
-
end
|
|
51
|
-
Jeweler::GemcutterTasks.new
|
|
52
|
-
rescue LoadError
|
|
53
|
-
puts("-" * 80)
|
|
54
|
-
puts "Jeweler not available. Install it with:
|
|
55
|
-
[sudo] gem install jeweler"
|
|
56
|
-
puts("-" * 80)
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
require 'rspec/core/rake_task'
|
|
61
|
-
RSpec::Core::RakeTask.new("spec") do |t|
|
|
62
|
-
t.pattern = "./spec/infinity_test/**/*_spec.rb"
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
task :default => :spec
|
|
1
|
+
require 'bundler/gem_tasks'
|
data/TODO.markdown
CHANGED
|
@@ -1,24 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
## Todo
|
|
2
|
+
|
|
3
|
+
Potential improvements and features for Infinity Test.
|
|
4
|
+
|
|
5
|
+
## Next Steps
|
|
6
|
+
|
|
7
|
+
### High Priority
|
|
8
|
+
|
|
9
|
+
* Replace Hike gem dependency (last updated 12 years ago) with a simple built-in file finder
|
|
10
|
+
* Add support for notification timeout/duration (use alerter for macOS, notify-send -t for Linux)
|
|
11
|
+
* Add Minitest as explicit test framework option (currently uses test_unit)
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* Add `--watch-only` option to specify specific directories to watch
|
|
16
|
+
* Add `--ignore` CLI option to ignore specific files/patterns
|
|
17
|
+
* Support for custom file extensions beyond .rb (e.g., .rake, .erb with embedded Ruby)
|
|
18
|
+
* Add `--fail-fast` option to stop on first failure
|
|
19
|
+
|
|
20
|
+
### Developer Experience
|
|
21
|
+
|
|
22
|
+
* Add `--dry-run` option to show what command would be executed without running
|
|
23
|
+
* Add `--debug` flag for troubleshooting file watching issues
|
|
24
|
+
* Improve error messages when test framework is not found
|
|
25
|
+
* Add startup banner showing detected configuration (framework, test lib, ruby strategy)
|
|
26
|
+
|
|
27
|
+
### Integrations
|
|
28
|
+
|
|
29
|
+
* Add GitHub Actions workflow template for CI
|
|
30
|
+
* Add hook system for pre/post test execution scripts
|
|
31
|
+
* Support for Docker-based Ruby version testing
|
|
32
|
+
* Integration with code coverage tools (SimpleCov reporting)
|
|
33
|
+
|
|
34
|
+
### Documentation
|
|
35
|
+
|
|
36
|
+
* Add more examples to wiki for common use cases
|
|
37
|
+
* Add troubleshooting guide
|
|
38
|
+
* Add migration guide from Guard/Autotest
|
data/bin/infinity_test
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
|
|
3
|
-
infinity_test_directory = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
|
|
4
|
-
$LOAD_PATH.unshift(infinity_test_directory) unless $LOAD_PATH.include?(infinity_test_directory)
|
|
5
|
-
|
|
6
3
|
require 'infinity_test'
|
|
7
|
-
InfinityTest.start
|
|
4
|
+
InfinityTest::Runner.new(ARGV).start
|
data/images/fuuu/pending.png
CHANGED
|
Binary file
|
|
Binary file
|
data/infinity_test.gemspec
CHANGED
|
@@ -1,200 +1,52 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Gem::Specification.new do |
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"buzz_images/buzz_lightyear.jpg",
|
|
35
|
-
"buzz_images/buzz_lightyear_continencia.gif",
|
|
36
|
-
"buzz_images/to_infinity_and_beyond.png",
|
|
37
|
-
"features/heuristics.feature",
|
|
38
|
-
"features/support/env.rb",
|
|
39
|
-
"images/faces/failure.png",
|
|
40
|
-
"images/faces/pending.png",
|
|
41
|
-
"images/faces/sucess.png",
|
|
42
|
-
"images/fuuu/failure.png",
|
|
43
|
-
"images/fuuu/pending.png",
|
|
44
|
-
"images/fuuu/sucess.png",
|
|
45
|
-
"images/hands/failure.png",
|
|
46
|
-
"images/hands/pending.png",
|
|
47
|
-
"images/hands/sucess.png",
|
|
48
|
-
"images/mario_bros/failure.jpg",
|
|
49
|
-
"images/mario_bros/pending.jpg",
|
|
50
|
-
"images/mario_bros/sucess.jpg",
|
|
51
|
-
"images/rails/failure.png",
|
|
52
|
-
"images/rails/pending.png",
|
|
53
|
-
"images/rails/sucess.png",
|
|
54
|
-
"images/rubies/failure.png",
|
|
55
|
-
"images/rubies/pending.png",
|
|
56
|
-
"images/rubies/sucess.png",
|
|
57
|
-
"images/simpson/failure.gif",
|
|
58
|
-
"images/simpson/pending.jpg",
|
|
59
|
-
"images/simpson/sucess.jpg",
|
|
60
|
-
"images/street_fighter/failure.gif",
|
|
61
|
-
"images/street_fighter/pending.gif",
|
|
62
|
-
"images/street_fighter/sucess.jpg",
|
|
63
|
-
"images/toy_story/failure.gif",
|
|
64
|
-
"images/toy_story/pending.png",
|
|
65
|
-
"images/toy_story/sucess.png",
|
|
66
|
-
"infinity_test.gemspec",
|
|
67
|
-
"lib/infinity_test.rb",
|
|
68
|
-
"lib/infinity_test/application.rb",
|
|
69
|
-
"lib/infinity_test/application_library/rails.rb",
|
|
70
|
-
"lib/infinity_test/application_library/rubygems.rb",
|
|
71
|
-
"lib/infinity_test/binary_path.rb",
|
|
72
|
-
"lib/infinity_test/builder.rb",
|
|
73
|
-
"lib/infinity_test/command.rb",
|
|
74
|
-
"lib/infinity_test/configuration.rb",
|
|
75
|
-
"lib/infinity_test/continuous_testing.rb",
|
|
76
|
-
"lib/infinity_test/dependencies.rb",
|
|
77
|
-
"lib/infinity_test/environment.rb",
|
|
78
|
-
"lib/infinity_test/heuristics.rb",
|
|
79
|
-
"lib/infinity_test/heuristics_helper.rb",
|
|
80
|
-
"lib/infinity_test/options.rb",
|
|
81
|
-
"lib/infinity_test/runner.rb",
|
|
82
|
-
"lib/infinity_test/test_framework.rb",
|
|
83
|
-
"lib/infinity_test/test_library/bacon.rb",
|
|
84
|
-
"lib/infinity_test/test_library/cucumber.rb",
|
|
85
|
-
"lib/infinity_test/test_library/rspec.rb",
|
|
86
|
-
"lib/infinity_test/test_library/test_unit.rb",
|
|
87
|
-
"lib/infinity_test/test_unit_loader.rb",
|
|
88
|
-
"spec/factories/buzz/lib/buzz.rb",
|
|
89
|
-
"spec/factories/buzz/spec/buzz_spec.rb",
|
|
90
|
-
"spec/factories/company/Gemfile",
|
|
91
|
-
"spec/factories/company/lib/company.rb",
|
|
92
|
-
"spec/factories/company/test/company_test.rb",
|
|
93
|
-
"spec/factories/images/failure.png",
|
|
94
|
-
"spec/factories/images/pending.png",
|
|
95
|
-
"spec/factories/images/sucess.png",
|
|
96
|
-
"spec/factories/infinity_test",
|
|
97
|
-
"spec/factories/infinity_test_example",
|
|
98
|
-
"spec/factories/slinky/spec/slinky/slinky_spec.rb",
|
|
99
|
-
"spec/factories/travel/lib/travel.rb",
|
|
100
|
-
"spec/factories/travel/test/partner_test.rb",
|
|
101
|
-
"spec/factories/travel/test/travel_test.rb",
|
|
102
|
-
"spec/factories/wood/lib/wood.rb",
|
|
103
|
-
"spec/factories/wood/spec/wood_spec.rb",
|
|
104
|
-
"spec/infinity_test/application_library/rails_spec.rb",
|
|
105
|
-
"spec/infinity_test/application_library/rubygems_spec.rb",
|
|
106
|
-
"spec/infinity_test/application_spec.rb",
|
|
107
|
-
"spec/infinity_test/binary_path_spec.rb",
|
|
108
|
-
"spec/infinity_test/builder_spec.rb",
|
|
109
|
-
"spec/infinity_test/command_spec.rb",
|
|
110
|
-
"spec/infinity_test/configuration_spec.rb",
|
|
111
|
-
"spec/infinity_test/continuous_testing_spec.rb",
|
|
112
|
-
"spec/infinity_test/environment_spec.rb",
|
|
113
|
-
"spec/infinity_test/heuristics_helper_spec.rb",
|
|
114
|
-
"spec/infinity_test/heuristics_spec.rb",
|
|
115
|
-
"spec/infinity_test/options_spec.rb",
|
|
116
|
-
"spec/infinity_test/runner_spec.rb",
|
|
117
|
-
"spec/infinity_test/test_framework_spec.rb",
|
|
118
|
-
"spec/infinity_test/test_library/bacon_spec.rb",
|
|
119
|
-
"spec/infinity_test/test_library/cucumber_spec.rb",
|
|
120
|
-
"spec/infinity_test/test_library/rspec_spec.rb",
|
|
121
|
-
"spec/infinity_test/test_library/test_unit_spec.rb",
|
|
122
|
-
"spec/infinity_test_spec.rb",
|
|
123
|
-
"spec/spec_helper.rb"
|
|
124
|
-
]
|
|
125
|
-
s.homepage = %q{http://github.com/tomas-stefano/infinity_test}
|
|
126
|
-
s.post_install_message = %q{
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require 'infinity_test/core/version'
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |spec|
|
|
7
|
+
spec.name = 'infinity_test'
|
|
8
|
+
spec.version = InfinityTest::Core::VERSION
|
|
9
|
+
spec.authors = ["Tomas D'Stefano"]
|
|
10
|
+
spec.email = ['tomas_stefano@successoft.com']
|
|
11
|
+
spec.description = 'Infinity Test is a continuous testing library and a flexible alternative to Autotest and Guard.'
|
|
12
|
+
spec.summary = 'Infinity Test is a continuous testing library and a flexible alternative to Autotest and Guard.'
|
|
13
|
+
spec.homepage = 'https://github.com/tomas-stefano/infinity_test'
|
|
14
|
+
spec.license = 'MIT'
|
|
15
|
+
|
|
16
|
+
spec.files = `git ls-files`.split($/)
|
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
19
|
+
spec.require_paths = ['lib']
|
|
20
|
+
|
|
21
|
+
spec.add_dependency 'activesupport'
|
|
22
|
+
spec.add_dependency 'listen'
|
|
23
|
+
spec.add_dependency 'filewatcher'
|
|
24
|
+
spec.add_dependency 'hike'
|
|
25
|
+
spec.add_dependency 'notifiers'
|
|
26
|
+
|
|
27
|
+
spec.add_development_dependency 'bundler'
|
|
28
|
+
spec.add_development_dependency 'rake'
|
|
29
|
+
spec.add_development_dependency 'rspec'
|
|
30
|
+
spec.add_development_dependency 'simplecov'
|
|
31
|
+
spec.add_development_dependency 'pry'
|
|
32
|
+
|
|
33
|
+
spec.post_install_message = %q{
|
|
127
34
|
--------------------------------------------------------------------------------
|
|
128
35
|
T O I N F I N I T Y A N D B E Y O N D !!!
|
|
129
36
|
|
|
130
|
-
Infinity Test
|
|
131
|
-
If you don't have RVM
|
|
37
|
+
Infinity Test can be used with RVM, RbEnv or just Ruby without package manager.
|
|
38
|
+
If you don't have RVM or Rbenv installed.
|
|
39
|
+
|
|
132
40
|
RVM Installation Instructions:
|
|
133
|
-
|
|
41
|
+
https://rvm.io/rvm/install/
|
|
42
|
+
|
|
43
|
+
Rbenv Installation Instructions:
|
|
44
|
+
https://github.com/sstephenson/rbenv#installation
|
|
45
|
+
|
|
134
46
|
And don't forget to see how you can customize Infinity Test here:
|
|
135
47
|
http://github.com/tomas-stefano/infinity_test/wiki/Customize-Infinity-Test
|
|
136
48
|
|
|
137
49
|
Happy Coding! :)
|
|
138
|
-
|
|
139
50
|
--------------------------------------------------------------------------------
|
|
140
|
-
|
|
141
51
|
}
|
|
142
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
|
143
|
-
s.require_paths = ["lib"]
|
|
144
|
-
s.rubygems_version = %q{1.7.2}
|
|
145
|
-
s.summary = %q{Continuous testing and a flexible alternative to Autotest using Watchr and RVM}
|
|
146
|
-
s.test_files = [
|
|
147
|
-
"spec/factories/buzz/lib/buzz.rb",
|
|
148
|
-
"spec/factories/buzz/spec/buzz_spec.rb",
|
|
149
|
-
"spec/factories/company/lib/company.rb",
|
|
150
|
-
"spec/factories/company/test/company_test.rb",
|
|
151
|
-
"spec/factories/slinky/spec/slinky/slinky_spec.rb",
|
|
152
|
-
"spec/factories/travel/lib/travel.rb",
|
|
153
|
-
"spec/factories/travel/test/partner_test.rb",
|
|
154
|
-
"spec/factories/travel/test/travel_test.rb",
|
|
155
|
-
"spec/factories/wood/lib/wood.rb",
|
|
156
|
-
"spec/factories/wood/spec/wood_spec.rb",
|
|
157
|
-
"spec/infinity_test/application_library/rails_spec.rb",
|
|
158
|
-
"spec/infinity_test/application_library/rubygems_spec.rb",
|
|
159
|
-
"spec/infinity_test/application_spec.rb",
|
|
160
|
-
"spec/infinity_test/binary_path_spec.rb",
|
|
161
|
-
"spec/infinity_test/builder_spec.rb",
|
|
162
|
-
"spec/infinity_test/command_spec.rb",
|
|
163
|
-
"spec/infinity_test/configuration_spec.rb",
|
|
164
|
-
"spec/infinity_test/continuous_testing_spec.rb",
|
|
165
|
-
"spec/infinity_test/environment_spec.rb",
|
|
166
|
-
"spec/infinity_test/heuristics_helper_spec.rb",
|
|
167
|
-
"spec/infinity_test/heuristics_spec.rb",
|
|
168
|
-
"spec/infinity_test/options_spec.rb",
|
|
169
|
-
"spec/infinity_test/runner_spec.rb",
|
|
170
|
-
"spec/infinity_test/test_framework_spec.rb",
|
|
171
|
-
"spec/infinity_test/test_library/bacon_spec.rb",
|
|
172
|
-
"spec/infinity_test/test_library/cucumber_spec.rb",
|
|
173
|
-
"spec/infinity_test/test_library/rspec_spec.rb",
|
|
174
|
-
"spec/infinity_test/test_library/test_unit_spec.rb",
|
|
175
|
-
"spec/infinity_test_spec.rb",
|
|
176
|
-
"spec/spec_helper.rb"
|
|
177
|
-
]
|
|
178
|
-
|
|
179
|
-
if s.respond_to? :specification_version then
|
|
180
|
-
s.specification_version = 3
|
|
181
|
-
|
|
182
|
-
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
|
183
|
-
s.add_runtime_dependency(%q<watchr>, [">= 0.7"])
|
|
184
|
-
s.add_runtime_dependency(%q<notifiers>, [">= 1.1.0"])
|
|
185
|
-
s.add_development_dependency(%q<rspec>, [">= 2.0.1"])
|
|
186
|
-
s.add_development_dependency(%q<jeweler>, [">= 1.4.0"])
|
|
187
|
-
else
|
|
188
|
-
s.add_dependency(%q<watchr>, [">= 0.7"])
|
|
189
|
-
s.add_dependency(%q<notifiers>, [">= 1.1.0"])
|
|
190
|
-
s.add_dependency(%q<rspec>, [">= 2.0.1"])
|
|
191
|
-
s.add_dependency(%q<jeweler>, [">= 1.4.0"])
|
|
192
|
-
end
|
|
193
|
-
else
|
|
194
|
-
s.add_dependency(%q<watchr>, [">= 0.7"])
|
|
195
|
-
s.add_dependency(%q<notifiers>, [">= 1.1.0"])
|
|
196
|
-
s.add_dependency(%q<rspec>, [">= 2.0.1"])
|
|
197
|
-
s.add_dependency(%q<jeweler>, [">= 1.4.0"])
|
|
198
|
-
end
|
|
199
52
|
end
|
|
200
|
-
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
module InfinityTest
|
|
2
|
+
module Core
|
|
3
|
+
class AutoDiscover
|
|
4
|
+
attr_reader :base
|
|
5
|
+
|
|
6
|
+
# Priority order for auto discovery (higher priority first)
|
|
7
|
+
# More specific libraries should be checked before generic ones
|
|
8
|
+
PRIORITY = {
|
|
9
|
+
strategy: [:rvm, :rbenv, :elixir_default, :python_default, :rust_default, :ruby_default],
|
|
10
|
+
framework: [:rails, :padrino, :phoenix, :elixir_mix, :django, :fast_api, :python_package, :rocket, :rust_cargo, :rubygems],
|
|
11
|
+
test_framework: [:rspec, :test_unit, :ex_unit, :pytest, :cargo_test]
|
|
12
|
+
}.freeze
|
|
13
|
+
|
|
14
|
+
def initialize(base)
|
|
15
|
+
@base = base
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def discover_libraries
|
|
19
|
+
discover_strategy
|
|
20
|
+
discover_framework
|
|
21
|
+
discover_test_framework
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def discover_strategy
|
|
25
|
+
base.strategy = auto_discover(:strategy) if base.strategy.equal?(:auto_discover)
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def discover_framework
|
|
29
|
+
base.framework = auto_discover(:framework) if base.framework.equal?(:auto_discover)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def discover_test_framework
|
|
33
|
+
base.test_framework = auto_discover(:test_framework) if base.test_framework.equal?(:auto_discover)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
private
|
|
37
|
+
|
|
38
|
+
def auto_discover(library_type)
|
|
39
|
+
library_base_class = "InfinityTest::#{library_type.to_s.camelize}::Base".constantize
|
|
40
|
+
subclasses = library_base_class.subclasses
|
|
41
|
+
priority_order = PRIORITY[library_type] || []
|
|
42
|
+
|
|
43
|
+
# Sort subclasses by priority (known priorities first, unknown last)
|
|
44
|
+
sorted_subclasses = subclasses.sort_by do |subclass|
|
|
45
|
+
name = subclass.name.demodulize.underscore.to_sym
|
|
46
|
+
priority_order.index(name) || priority_order.length
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
library = sorted_subclasses.find { |subclass| subclass.run? }
|
|
50
|
+
|
|
51
|
+
if library.present?
|
|
52
|
+
library.name.demodulize.underscore.to_sym
|
|
53
|
+
else
|
|
54
|
+
message = %{
|
|
55
|
+
|
|
56
|
+
The InfinityTest::Core::AutoDiscover doesn't discover nothing to run.
|
|
57
|
+
Are you using a #{library_type} that Infinity test knows?
|
|
58
|
+
|
|
59
|
+
Infinity Test #{library_type.to_s.pluralize}: #{library_base_class.subclasses.map(&:name).join(', ')}
|
|
60
|
+
|
|
61
|
+
}
|
|
62
|
+
raise Exception, message
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|