packs-rails-minitest 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: fddbb6805d5c9bc1eb4b26237aff41722680c169e654c466b9cf905ce6ba8200
4
+ data.tar.gz: 3d4430613d07777760f988d00d8351d9218383cc90fdcef49c59a36baf07e566
5
+ SHA512:
6
+ metadata.gz: 500e5a3f7a1e70339ff8c899041162f7bf7c77160a78dcf317c4b24eef5eea94d72e3f6c92d9665781c7919d6b99f99a1555543d21864f94921ca7f41aa48551
7
+ data.tar.gz: 87d68c92d74fe476bebc9f528b4db187d41ec3cf6d3667f361fda2b987f01d07be5026a0576a80e02b40c4fa165617b8ce5c87651c298b006672b5d70e1a5096
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2023 Graham Rogers
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # Packs::Rails::Minitest
2
+
3
+ Adds Rake tasks for testing [packs](https://github.com/rubyatscale/packs) using minitest.
4
+
5
+ ## Usage
6
+
7
+ Once installed, this gem provides the following Rake tasks:
8
+
9
+ - `packs:test:prepare` - ran before the next three tasks
10
+ - `packs:test` - runs all tests in all packs except system tests
11
+ - `packs:test:system` - runs all system tests in all packs
12
+ - `packs:test:all` - runs all tests in all packs including system tests
13
+
14
+ For each pack, the following tasks are also added:
15
+
16
+ - `packs:test:<pack name>:prepare` - ran before the next three tasks (and as part of `packs:test:prepare`)
17
+ - `packs:test:<pack name>` - runs all tests in the pack except system tests
18
+ - `packs:test:<pack name>:system` - runs all system tests in the pack
19
+ - `packs:test:<pack name>:all` - runs all tests in the pack including system tests
20
+
21
+ ## Installation
22
+
23
+ Add this line to your application's Gemfile:
24
+
25
+ ```ruby
26
+ gem "packs-rails-minitest", group: :development
27
+ ```
28
+
29
+ And then execute:
30
+ ```bash
31
+ $ bundle
32
+ ```
33
+
34
+ ## Contributing
35
+
36
+ Contributions are welcome, simply create a pull request or file an issue.
37
+
38
+ ## License
39
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,3 @@
1
+ require "bundler/setup"
2
+
3
+ require "bundler/gem_tasks"
@@ -0,0 +1,13 @@
1
+ require "rails/railtie"
2
+
3
+ module Packs
4
+ module Rails
5
+ module Minitest
6
+ class Railtie < ::Rails::Railtie
7
+ rake_tasks do
8
+ load "tasks/packs/test.rake"
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,7 @@
1
+ module Packs
2
+ module Rails
3
+ module Minitest
4
+ VERSION = "0.1.0"
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,10 @@
1
+ require "packs/rails/minitest/version"
2
+ require "packs/rails/minitest/railtie"
3
+
4
+ module Packs
5
+ module Rails
6
+ module Minitest
7
+ # Your code goes here...
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,39 @@
1
+ namespace :packs do
2
+ task test: "test:prepare" do
3
+ ENV["DEFAULT_TEST"] = "{#{Packs.all.map(&:name).join(",")}}/test/**/*_test.rb"
4
+ ENV["DEFAULT_TEST_EXCLUDE"] = "{#{Packs.all.map(&:name).join(",")}}/test/{system,dummy}/**/*_test.rb"
5
+ system("rails", "test")
6
+ end
7
+
8
+ namespace :test do
9
+ multitask prepare: Packs.all.map { |pack| "#{pack.name}:prepare" }
10
+
11
+ task all: :prepare do
12
+ system("rails", "test", *Packs.all.map { |pack| pack.relative_path.join("test/**/*_test.rb").to_s })
13
+ end
14
+
15
+ task system: :prepare do
16
+ system("rails", "test", *Packs.all.map { |pack| pack.relative_path.join("test/system/**/*_test.rb").to_s })
17
+ end
18
+
19
+ Packs.all.each do |pack|
20
+ task pack.name => "#{pack.name}:prepare" do
21
+ ENV["DEFAULT_TEST"] = pack.relative_path.join("test/**/*_test.rb").to_s
22
+ ENV["DEFAULT_TEST_EXCLUDE"] = pack.relative_path.join("test/{system,dummy}/**/*_test.rb").to_s
23
+ system("rails", "test")
24
+ end
25
+
26
+ namespace pack.name do
27
+ multitask :prepare
28
+
29
+ task all: :prepare do
30
+ system("rails", "test", pack.relative_path.join("test/**/*_test.rb").to_s)
31
+ end
32
+
33
+ task system: :prepare do
34
+ system("rails", "test", pack.relative_path.join("test/system/**/*_test.rb").to_s)
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
metadata ADDED
@@ -0,0 +1,81 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: packs-rails-minitest
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Graham Rogers
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-02-20 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: packs
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: railties
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '7'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '7'
41
+ description: Runs tests in packs using minitest.
42
+ email:
43
+ - graham@ophelos.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - MIT-LICENSE
49
+ - README.md
50
+ - Rakefile
51
+ - lib/packs/rails/minitest.rb
52
+ - lib/packs/rails/minitest/railtie.rb
53
+ - lib/packs/rails/minitest/version.rb
54
+ - lib/tasks/packs/test.rake
55
+ homepage: https://github.com/Ophelos/packs-rails-minitest
56
+ licenses:
57
+ - MIT
58
+ metadata:
59
+ homepage_uri: https://github.com/Ophelos/packs-rails-minitest
60
+ source_code_uri: https://github.com/Ophelos/packs-rails-minitest
61
+ changelog_uri: https://github.com/Ophelos/packs-rails-minitest/blob/main/CHANGELOG.md
62
+ post_install_message:
63
+ rdoc_options: []
64
+ require_paths:
65
+ - lib
66
+ required_ruby_version: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ requirements: []
77
+ rubygems_version: 3.4.6
78
+ signing_key:
79
+ specification_version: 4
80
+ summary: Integrate packs-rails with minitest
81
+ test_files: []