stimpack 0.7.1 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be1d3fa462f2ec696d5c72721fd96cead8a0bb2c08f238f2ffab9af6ce753ea9
4
- data.tar.gz: 2a09c371fea45fca32c6d386ec6588887a04326ee306b81199edeb7e4ffa2cb3
3
+ metadata.gz: 3b42399feb13f1a49d98931774e5b84d183fc7e1aa788e42e1687e5b08da0a7d
4
+ data.tar.gz: 57032be9ad0ec238c44599f3261f2a24c30fb57a50b81981d5f832c42187f45d
5
5
  SHA512:
6
- metadata.gz: 56a878d5ccc64a91ab8366759d6900758e80a59f0a4ad60b8c8397849e975f2043e46926bff5ac6ec1745aad5d69fd78ba5cc7dcce2242f45aeb374a5483863a
7
- data.tar.gz: 8767f7b944326da96773793170b32b5e880bfebc1ad0e8ab657e2d84154a874c9a50603ebd0c1e9e5bd4fead7c13810e5e93e10e6072e40e99fa9485d550fa09
6
+ metadata.gz: a03f395c7e10c89e6fb1e6757634aa70f3631106635d9da6236c6a828af8a5c7830670ca720ed656f77ece61e98d86ad52fad1b7a44affd9f1d88df68c402d2a
7
+ data.tar.gz: c6cfbb618b10b21a5cf4ac0e465811236a269ef3210187870a47b1fd1043342ef3ee2b5fe0ea440a9f5c2dac57b4bdff495d9d04525ca3e5c5e1c90c7b9a9197
data/README.md CHANGED
@@ -46,7 +46,7 @@ packs/
46
46
  my_domain/
47
47
  my_private_namespaced_model_factory.rb
48
48
  my_other_domain/
49
- ... # other pack's have a similar structure
49
+ ... # other packs have a similar structure
50
50
  my_other_other_domain/
51
51
  ...
52
52
  ```
@@ -83,7 +83,7 @@ draw(:my_domain)
83
83
  ```
84
84
 
85
85
  ### Making your Package an Engine
86
- Add `engine: true` to your `package.yml` to make it an actual Rails engine:
86
+ Add `engine: true` to your `package.yml` to make it an actual Rails engine ([read more about what this means here](https://guides.rubyonrails.org/engines.html)):
87
87
  ```yml
88
88
  # packs/my_pack/package.yml
89
89
  enforce_dependencies: true
@@ -92,6 +92,8 @@ metadata:
92
92
  engine: true
93
93
  ```
94
94
 
95
+ ## Ecosystem and Integrations
96
+
95
97
  ### RSpec Integration
96
98
  Simply add `--require stimpack/rspec` to your `.rspec`.
97
99
  Or, if you'd like, pass it as an argument to `rspec`:
@@ -121,6 +123,27 @@ rspec packs/foobar/spec
121
123
  rspec packs/foobar/nested_pack
122
124
  ```
123
125
 
126
+ #### parallel_tests
127
+
128
+ `parallel_tests` has it its own spec discovery mechanism, so Stimpack's RSpec integration doesn't do anything when you use them together.
129
+ To make them work, you'll need to explicitly specify the spec paths:
130
+
131
+ ```bash
132
+ RAILS_ENV=test bundle exec parallel_test spec packs/**/spec -t rspec <other_options>
133
+ ```
134
+
135
+ #### Knapsack (Pro)
136
+
137
+ Similarly, Knapsack (and its Pro version) has its own spec discovery mechanism and the API will find and queue the relevant specs.
138
+ To make it discover your pack tests as well, you'll need to configure the following variables:
139
+
140
+ ```yaml
141
+ KNAPSACK_PRO_TEST_DIR: spec
142
+ KNAPSACK_PRO_TEST_FILE_PATTERN: '{spec,packs}/**{,/*/**}/*_spec.rb'
143
+ ```
144
+
145
+ Setting `KNAPSACK_PRO_TEST_FILE_PATTERN` will tell Knapsack where your specs are located, while setting `KNAPSACK_PRO_TEST_DIR` is necessary because otherwise an incorrect value is sent to rspec via the `--default-path` option.
146
+
124
147
  ## Contributing
125
148
 
126
149
  Bug reports and pull requests are welcome on GitHub at https://github.com/Gusto/stimpack.
@@ -14,9 +14,10 @@ module Stimpack
14
14
  def find(path)
15
15
  @find_pack_paths ||= all_by_path.keys.sort_by(&:length).reverse!.map { |path| "#{path}/" }
16
16
  path = "#{path}/"
17
- @find_pack_paths.find do |pack_path|
17
+ matched_path = @find_pack_paths.find do |pack_path|
18
18
  path.start_with?(pack_path)
19
19
  end
20
+ all_by_path.fetch(matched_path.chomp("/")) if matched_path
20
21
  end
21
22
 
22
23
  def all(parent = nil)
@@ -1,3 +1,3 @@
1
1
  module Stimpack
2
- VERSION = "0.7.1".freeze
2
+ VERSION = "0.8.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stimpack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ngan Pham
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-09-08 00:00:00.000000000 Z
11
+ date: 2022-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -152,7 +152,7 @@ metadata:
152
152
  homepage_uri: https://github.com/Gusto/stimpack
153
153
  source_code_uri: https://github.com/Gusto/stimpack
154
154
  changelog_uri: https://github.com/Gusto/stimpack/blob/master/CHANGELOG.md
155
- post_install_message:
155
+ post_install_message:
156
156
  rdoc_options: []
157
157
  require_paths:
158
158
  - lib
@@ -167,8 +167,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  - !ruby/object:Gem::Version
168
168
  version: '0'
169
169
  requirements: []
170
- rubygems_version: 3.3.7
171
- signing_key:
170
+ rubygems_version: 3.3.25
171
+ signing_key:
172
172
  specification_version: 4
173
173
  summary: A Rails helper to package your code.
174
174
  test_files: []