stimpack 0.7.0 → 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: a0fa94f149c0035eb12465252c3262c7bea9df7fad9ea00efb5014d6484b00d1
4
- data.tar.gz: a20a5aad13953de01410054b99e3bd2932df56a9e879edc6a14bd3601baca0ba
3
+ metadata.gz: 3b42399feb13f1a49d98931774e5b84d183fc7e1aa788e42e1687e5b08da0a7d
4
+ data.tar.gz: 57032be9ad0ec238c44599f3261f2a24c30fb57a50b81981d5f832c42187f45d
5
5
  SHA512:
6
- metadata.gz: a7634623fc5fb02369e979fd62f1d816dafc734eacd0d2bab2a47acdce9ec1eeb1b29eccbb88193263623feb3eb94ccf1929065e919bd8d787fce43300dcafbb
7
- data.tar.gz: 700f5b8c757d98b6340fb55dee4812c86d449162e65aa1a4946eb5557981ef5b37b306b2f7327703e6f6ddfcd5024db0eb60112c7b087170204704b1ba71fa70
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.0".freeze
2
+ VERSION = "0.8.0".freeze
3
3
  end
metadata CHANGED
@@ -1,17 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stimpack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
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-08-31 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
- name: rails
14
+ name: railties
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: activesupport
15
29
  requirement: !ruby/object:Gem::Requirement
16
30
  requirements:
17
31
  - - ">="
@@ -94,6 +108,20 @@ dependencies:
94
108
  - - ">="
95
109
  - !ruby/object:Gem::Version
96
110
  version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rails
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
97
125
  description: stimpack establishes and implements a set of conventions for splitting
98
126
  up large monoliths.
99
127
  email:
@@ -124,7 +152,7 @@ metadata:
124
152
  homepage_uri: https://github.com/Gusto/stimpack
125
153
  source_code_uri: https://github.com/Gusto/stimpack
126
154
  changelog_uri: https://github.com/Gusto/stimpack/blob/master/CHANGELOG.md
127
- post_install_message:
155
+ post_install_message:
128
156
  rdoc_options: []
129
157
  require_paths:
130
158
  - lib
@@ -139,8 +167,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
167
  - !ruby/object:Gem::Version
140
168
  version: '0'
141
169
  requirements: []
142
- rubygems_version: 3.3.7
143
- signing_key:
170
+ rubygems_version: 3.3.25
171
+ signing_key:
144
172
  specification_version: 4
145
173
  summary: A Rails helper to package your code.
146
174
  test_files: []