knapsack_pro 9.0.0 → 9.1.0
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 +4 -4
- data/lib/knapsack_pro/adapters/minitest_adapter.rb +8 -13
- data/lib/knapsack_pro/client/connection.rb +1 -1
- data/lib/knapsack_pro/config/env.rb +1 -24
- data/lib/knapsack_pro/version.rb +1 -1
- metadata +2 -196
- data/.circleci/config.yml +0 -468
- data/.github/assets/install-button.png +0 -0
- data/.github/assets/knapsack-diamonds.png +0 -0
- data/.github/dependabot.yml +0 -11
- data/.github/pull_request_template.md +0 -11
- data/.gitignore +0 -39
- data/.rspec +0 -5
- data/CHANGELOG.md +0 -1995
- data/Gemfile +0 -13
- data/LICENSE +0 -22
- data/README.md +0 -90
- data/Rakefile +0 -2
- data/knapsack_pro.gemspec +0 -43
- data/spec/fixtures/test_file_list_source_file.txt +0 -6
- data/spec/fixtures/vcr_cassettes/api/v1/build_distributions/subset/invalid_test_suite_token.yml +0 -59
- data/spec/fixtures/vcr_cassettes/api/v1/build_distributions/subset/success.yml +0 -61
- data/spec/fixtures/vcr_cassettes/api/v1/build_subsets/create/invalid_test_suite_token.yml +0 -50
- data/spec/fixtures/vcr_cassettes/api/v1/build_subsets/create/success.yml +0 -50
- data/spec/integration/api/build_distributions_subset_spec.rb +0 -77
- data/spec/integration/api/build_subsets_create_spec.rb +0 -77
- data/spec/integration/runners/fallback_spec.rb +0 -131
- data/spec/integration/runners/queue/cucumber_runner_fallback_spec.rb +0 -129
- data/spec/integration/runners/queue/minitest_runner_fallback_spec.rb +0 -129
- data/spec/integration/runners/queue/rspec_runner.rb +0 -80
- data/spec/integration/runners/queue/rspec_runner_fallback_spec.rb +0 -137
- data/spec/integration/runners/queue/rspec_runner_spec.rb +0 -2672
- data/spec/knapsack_pro/adapters/base_adapter_spec.rb +0 -221
- data/spec/knapsack_pro/adapters/cucumber_adapter_spec.rb +0 -216
- data/spec/knapsack_pro/adapters/minitest_adapter_spec.rb +0 -189
- data/spec/knapsack_pro/adapters/rspec_adapter_spec.rb +0 -427
- data/spec/knapsack_pro/adapters/spinach_adapter_spec.rb +0 -61
- data/spec/knapsack_pro/adapters/test_unit_adapter_spec.rb +0 -86
- data/spec/knapsack_pro/base_allocator_builder_spec.rb +0 -102
- data/spec/knapsack_pro/build_distribution_fetcher_spec.rb +0 -89
- data/spec/knapsack_pro/client/api/action_spec.rb +0 -17
- data/spec/knapsack_pro/client/api/v1/base_spec.rb +0 -2
- data/spec/knapsack_pro/client/api/v1/build_distributions_spec.rb +0 -95
- data/spec/knapsack_pro/client/api/v1/build_subsets_spec.rb +0 -35
- data/spec/knapsack_pro/client/api/v1/queues_spec.rb +0 -83
- data/spec/knapsack_pro/client/connection_spec.rb +0 -581
- data/spec/knapsack_pro/config/ci/app_veyor_spec.rb +0 -87
- data/spec/knapsack_pro/config/ci/base_spec.rb +0 -10
- data/spec/knapsack_pro/config/ci/buildkite_spec.rb +0 -135
- data/spec/knapsack_pro/config/ci/circle_spec.rb +0 -122
- data/spec/knapsack_pro/config/ci/cirrus_ci_spec.rb +0 -87
- data/spec/knapsack_pro/config/ci/codefresh_spec.rb +0 -81
- data/spec/knapsack_pro/config/ci/codeship_spec.rb +0 -80
- data/spec/knapsack_pro/config/ci/github_actions_spec.rb +0 -140
- data/spec/knapsack_pro/config/ci/gitlab_ci_spec.rb +0 -137
- data/spec/knapsack_pro/config/ci/heroku_spec.rb +0 -87
- data/spec/knapsack_pro/config/ci/semaphore2_spec.rb +0 -133
- data/spec/knapsack_pro/config/ci/semaphore_spec.rb +0 -87
- data/spec/knapsack_pro/config/ci/travis_spec.rb +0 -73
- data/spec/knapsack_pro/config/env_generator_spec.rb +0 -52
- data/spec/knapsack_pro/config/env_spec.rb +0 -1291
- data/spec/knapsack_pro/config/temp_files_spec.rb +0 -25
- data/spec/knapsack_pro/crypto/branch_encryptor_spec.rb +0 -53
- data/spec/knapsack_pro/crypto/decryptor_spec.rb +0 -83
- data/spec/knapsack_pro/crypto/digestor_spec.rb +0 -13
- data/spec/knapsack_pro/crypto/encryptor_spec.rb +0 -58
- data/spec/knapsack_pro/formatters/time_tracker_fetcher_spec.rb +0 -27
- data/spec/knapsack_pro/formatters/time_tracker_spec.rb +0 -448
- data/spec/knapsack_pro/hooks/queue_spec.rb +0 -199
- data/spec/knapsack_pro/presenter_spec.rb +0 -57
- data/spec/knapsack_pro/pure/queue/rspec_pure_spec.rb +0 -248
- data/spec/knapsack_pro/queue_spec.rb +0 -35
- data/spec/knapsack_pro/report_spec.rb +0 -232
- data/spec/knapsack_pro/repository_adapter_initiator_spec.rb +0 -21
- data/spec/knapsack_pro/repository_adapters/base_adapter_spec.rb +0 -13
- data/spec/knapsack_pro/repository_adapters/env_adapter_spec.rb +0 -27
- data/spec/knapsack_pro/repository_adapters/git_adapter_spec.rb +0 -106
- data/spec/knapsack_pro/runners/base_runner_spec.rb +0 -87
- data/spec/knapsack_pro/runners/cucumber_runner_spec.rb +0 -92
- data/spec/knapsack_pro/runners/minitest_runner_spec.rb +0 -57
- data/spec/knapsack_pro/runners/queue/base_runner_spec.rb +0 -73
- data/spec/knapsack_pro/runners/queue/cucumber_runner_spec.rb +0 -209
- data/spec/knapsack_pro/runners/queue/minitest_runner_spec.rb +0 -203
- data/spec/knapsack_pro/runners/rspec_runner_spec.rb +0 -111
- data/spec/knapsack_pro/runners/spinach_runner_spec.rb +0 -56
- data/spec/knapsack_pro/runners/test_unit_runner_spec.rb +0 -62
- data/spec/knapsack_pro/slow_test_file_determiner_spec.rb +0 -119
- data/spec/knapsack_pro/slow_test_file_finder_spec.rb +0 -42
- data/spec/knapsack_pro/task_loader_spec.rb +0 -14
- data/spec/knapsack_pro/test_case_detectors/rspec_test_example_detector_spec.rb +0 -217
- data/spec/knapsack_pro/test_case_mergers/base_merger_spec.rb +0 -27
- data/spec/knapsack_pro/test_case_mergers/rspec_merger_spec.rb +0 -81
- data/spec/knapsack_pro/test_file_cleaner_spec.rb +0 -11
- data/spec/knapsack_pro/test_file_finder_spec.rb +0 -176
- data/spec/knapsack_pro/test_file_pattern_spec.rb +0 -49
- data/spec/knapsack_pro/test_file_presenter_spec.rb +0 -22
- data/spec/knapsack_pro/test_files_with_test_cases_composer_spec.rb +0 -41
- data/spec/knapsack_pro/test_flat_distributor_spec.rb +0 -60
- data/spec/knapsack_pro/tracker_spec.rb +0 -184
- data/spec/knapsack_pro/utils_spec.rb +0 -55
- data/spec/knapsack_pro_spec.rb +0 -116
- data/spec/spec_helper.rb +0 -47
- data/spec/support/.gitkeep +0 -0
- data/spec/support/fakes/cucumber.rb +0 -25
- data/spec/support/fakes/minitest.rb +0 -18
- data/spec/support/shared_examples/adapter.rb +0 -17
- data/spec_fake/controllers/users_controller_spec.rb +0 -0
- data/spec_fake/models/admin_spec.rb +0 -0
- data/spec_fake/models/user_spec.rb +0 -0
- data/spec_fake/spec_helper.rb +0 -0
- data/spec_time_tracker/spec_helper.rb +0 -29
- data/test_fake/a_test.rb +0 -0
- data/test_fake/b_test.rb +0 -0
data/.circleci/config.yml
DELETED
|
@@ -1,468 +0,0 @@
|
|
|
1
|
-
version: 2.1
|
|
2
|
-
|
|
3
|
-
commands:
|
|
4
|
-
setup_knapsack_pro_ruby:
|
|
5
|
-
steps:
|
|
6
|
-
- checkout
|
|
7
|
-
- restore_cache:
|
|
8
|
-
keys:
|
|
9
|
-
- v1-bundler-ruby-{{ checksum "knapsack_pro.gemspec" }}
|
|
10
|
-
- v1-bundler-ruby-
|
|
11
|
-
- run:
|
|
12
|
-
command: |
|
|
13
|
-
bundle config set --local path './vendor/bundle'
|
|
14
|
-
bundle install --jobs=4 --retry=3
|
|
15
|
-
- save_cache:
|
|
16
|
-
paths:
|
|
17
|
-
- ./vendor/bundle
|
|
18
|
-
key: v1-bundler-ruby-{{ checksum "knapsack_pro.gemspec" }}
|
|
19
|
-
|
|
20
|
-
setup_rails_app_with_knapsack_pro:
|
|
21
|
-
parameters:
|
|
22
|
-
path:
|
|
23
|
-
type: string
|
|
24
|
-
ruby:
|
|
25
|
-
type: string
|
|
26
|
-
rspec:
|
|
27
|
-
type: string
|
|
28
|
-
default: ""
|
|
29
|
-
steps:
|
|
30
|
-
- run:
|
|
31
|
-
working_directory: << parameters.path >>
|
|
32
|
-
command: |
|
|
33
|
-
git clone --depth 1 --branch $CIRCLE_BRANCH --single-branch git@github.com:KnapsackPro/rails-app-with-knapsack_pro.git ./ || git clone --depth 1 git@github.com:KnapsackPro/rails-app-with-knapsack_pro.git ./
|
|
34
|
-
if [[ "<< parameters.rspec >>" != "" ]]; then
|
|
35
|
-
sed -i 's/.*gem.*rspec-core.*/gem "rspec-core", "<< parameters.rspec >>"/g' ./Gemfile
|
|
36
|
-
echo "Updated RSpec version in Gemfile"
|
|
37
|
-
fi
|
|
38
|
-
- restore_cache:
|
|
39
|
-
keys:
|
|
40
|
-
- v1-bundler-rails-{{ checksum "Gemfile.lock" }}-ruby-<< parameters.ruby >>-rspec-<< parameters.rspec >>
|
|
41
|
-
- v1-bundler-rails-{{ checksum "Gemfile.lock" }}-ruby-<< parameters.ruby >>-
|
|
42
|
-
- v1-bundler-rails-{{ checksum "Gemfile.lock" }}-
|
|
43
|
-
- v1-bundler-rails-
|
|
44
|
-
- run:
|
|
45
|
-
working_directory: << parameters.path >>
|
|
46
|
-
command: |
|
|
47
|
-
bundle config set --local path './vendor/bundle'
|
|
48
|
-
bundle install --jobs=4 --retry=3
|
|
49
|
-
- save_cache:
|
|
50
|
-
paths:
|
|
51
|
-
- << parameters.path >>/vendor/bundle
|
|
52
|
-
key: v1-bundler-rails-{{ checksum "Gemfile.lock" }}-ruby-<< parameters.ruby >>-rspec-<< parameters.rspec >>
|
|
53
|
-
|
|
54
|
-
jobs:
|
|
55
|
-
unit:
|
|
56
|
-
parallelism: 1
|
|
57
|
-
working_directory: ~/knapsack_pro-ruby
|
|
58
|
-
resource_class: small
|
|
59
|
-
docker:
|
|
60
|
-
- image: cimg/ruby:3.4
|
|
61
|
-
steps:
|
|
62
|
-
- setup_knapsack_pro_ruby
|
|
63
|
-
- run: gem install rubocop
|
|
64
|
-
- run: rubocop --fail-level A --only Style/FrozenStringLiteralComment,Layout/EmptyLineAfterMagicComment lib/
|
|
65
|
-
- run: bundle update rspec
|
|
66
|
-
- run: bundle exec rspec --version
|
|
67
|
-
- run: bundle exec rspec spec
|
|
68
|
-
|
|
69
|
-
integration-rspec:
|
|
70
|
-
parallelism: 1
|
|
71
|
-
working_directory: ~/knapsack_pro-ruby
|
|
72
|
-
resource_class: small
|
|
73
|
-
parameters:
|
|
74
|
-
ruby:
|
|
75
|
-
type: string
|
|
76
|
-
rspec:
|
|
77
|
-
type: string
|
|
78
|
-
docker:
|
|
79
|
-
- image: cimg/ruby:<< parameters.ruby >>
|
|
80
|
-
steps:
|
|
81
|
-
- checkout
|
|
82
|
-
- run:
|
|
83
|
-
command: |
|
|
84
|
-
if [[ "<< parameters.rspec >>" != "" ]]; then
|
|
85
|
-
sed -i 's/.*gem.*rspec-core.*/gem "rspec-core", "<< parameters.rspec >>"/g' ./Gemfile
|
|
86
|
-
echo "Updated RSpec version in Gemfile"
|
|
87
|
-
fi
|
|
88
|
-
- restore_cache:
|
|
89
|
-
keys:
|
|
90
|
-
- v1-bundler-gem-{{ checksum "knapsack_pro.gemspec" }}-ruby-<< parameters.ruby >>-rspec-<< parameters.rspec >>
|
|
91
|
-
- v1-bundler-gem-{{ checksum "knapsack_pro.gemspec" }}-ruby-<< parameters.ruby >>-
|
|
92
|
-
- v1-bundler-gem-{{ checksum "knapsack_pro.gemspec" }}-
|
|
93
|
-
- v1-bundler-gem-
|
|
94
|
-
- run:
|
|
95
|
-
command: |
|
|
96
|
-
bundle config set --local path './vendor/bundle'
|
|
97
|
-
bundle install --jobs=4 --retry=3
|
|
98
|
-
- save_cache:
|
|
99
|
-
paths:
|
|
100
|
-
- ./vendor/bundle
|
|
101
|
-
key: v1-bundler-gem-{{ checksum "knapsack_pro.gemspec" }}-ruby-<< parameters.ruby >>-rspec-<< parameters.rspec >>
|
|
102
|
-
- run:
|
|
103
|
-
command: |
|
|
104
|
-
ruby --version
|
|
105
|
-
bundle exec rspec --version
|
|
106
|
-
RSPEC=$(bundle exec rspec --version | grep rspec-core | head -n1 | cut -d " " -f5)
|
|
107
|
-
[ $RSPEC != << parameters.rspec >> ] && exit 1 || echo "Correct version of RSpec installed: $RSPEC"
|
|
108
|
-
- run: bundle exec rspec spec/integration/runners/queue/rspec_runner_spec.rb
|
|
109
|
-
|
|
110
|
-
e2e-regular-rspec:
|
|
111
|
-
parallelism: 2
|
|
112
|
-
working_directory: ~/knapsack_pro-ruby
|
|
113
|
-
resource_class: small
|
|
114
|
-
parameters:
|
|
115
|
-
ruby:
|
|
116
|
-
type: string
|
|
117
|
-
rspec:
|
|
118
|
-
type: string
|
|
119
|
-
docker:
|
|
120
|
-
- image: cimg/ruby:<< parameters.ruby >>-browsers
|
|
121
|
-
environment:
|
|
122
|
-
PGHOST: 127.0.0.1
|
|
123
|
-
PGUSER: rails-app-with-knapsack_pro
|
|
124
|
-
RAILS_ENV: test
|
|
125
|
-
RACK_ENV: test
|
|
126
|
-
KNAPSACK_PRO_ENDPOINT: https://api-staging.knapsackpro.com
|
|
127
|
-
KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC: $KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC
|
|
128
|
-
EXTRA_TEST_FILES_DELAY: 10
|
|
129
|
-
- image: cimg/postgres:14.7
|
|
130
|
-
environment:
|
|
131
|
-
POSTGRES_DB: rails-app-with-knapsack_pro_test
|
|
132
|
-
POSTGRES_PASSWORD: password
|
|
133
|
-
POSTGRES_USER: rails-app-with-knapsack_pro
|
|
134
|
-
steps:
|
|
135
|
-
- setup_knapsack_pro_ruby
|
|
136
|
-
- setup_rails_app_with_knapsack_pro:
|
|
137
|
-
path: ~/rails-app-with-knapsack_pro
|
|
138
|
-
ruby: << parameters.ruby >>
|
|
139
|
-
rspec: << parameters.rspec >>
|
|
140
|
-
- run: dockerize -wait tcp://localhost:5432 -timeout 1m
|
|
141
|
-
- run:
|
|
142
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
143
|
-
command: |
|
|
144
|
-
ruby --version
|
|
145
|
-
bundle exec rspec --version
|
|
146
|
-
RSPEC=$(bundle exec rspec --version | grep rspec-core | head -n1 | cut -d " " -f5)
|
|
147
|
-
[ $RSPEC != << parameters.rspec >> ] && exit 1 || echo "Correct version of RSpec installed: $RSPEC"
|
|
148
|
-
- run:
|
|
149
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
150
|
-
command: bin/rails db:setup
|
|
151
|
-
- run:
|
|
152
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
153
|
-
command: |
|
|
154
|
-
export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--regular"
|
|
155
|
-
bundle exec rake knapsack_pro:rspec
|
|
156
|
-
- run:
|
|
157
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
158
|
-
command: |
|
|
159
|
-
# retry the same split ||
|
|
160
|
-
export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--regular"
|
|
161
|
-
bundle exec rake knapsack_pro:rspec
|
|
162
|
-
- run:
|
|
163
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
164
|
-
command: |
|
|
165
|
-
# fallback ||
|
|
166
|
-
export KNAPSACK_PRO_ENDPOINT=https://api-fake.knapsackpro.com
|
|
167
|
-
export KNAPSACK_PRO_MAX_REQUEST_RETRIES=1
|
|
168
|
-
bundle exec rake knapsack_pro:rspec
|
|
169
|
-
- run:
|
|
170
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
171
|
-
command: |
|
|
172
|
-
# ensures KnapsackPro::Formatters::TimeTracker works when the .rspec file does not exist
|
|
173
|
-
export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--regular--no-dot-rspec-file"
|
|
174
|
-
mv .rspec .rspec.off
|
|
175
|
-
# load test files that require spec_helper explicitly
|
|
176
|
-
export KNAPSACK_PRO_TEST_FILE_PATTERN="{spec/time_tracker_spec.rb}"
|
|
177
|
-
bundle exec rake knapsack_pro:rspec
|
|
178
|
-
RSPEC_EXIT_CODE=$?
|
|
179
|
-
mv .rspec.off .rspec
|
|
180
|
-
exit $RSPEC_EXIT_CODE
|
|
181
|
-
- run:
|
|
182
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
183
|
-
command: |
|
|
184
|
-
# split by test examples ||
|
|
185
|
-
export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--regular--split"
|
|
186
|
-
export KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES=true
|
|
187
|
-
bundle exec rake knapsack_pro:rspec
|
|
188
|
-
- run:
|
|
189
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
190
|
-
command: |
|
|
191
|
-
# split custom files by test examples ||
|
|
192
|
-
export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--regular--split-custom-files"
|
|
193
|
-
export KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES=true
|
|
194
|
-
export KNAPSACK_PRO_SLOW_TEST_FILE_PATTERN="spec/features/calculator_spec.rb"
|
|
195
|
-
bundle exec rake knapsack_pro:rspec
|
|
196
|
-
- run:
|
|
197
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
198
|
-
command: |
|
|
199
|
-
# split custom files by test examples AND the --tag option passed ||
|
|
200
|
-
export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--regular--split-custom-files--tag-option"
|
|
201
|
-
export KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES=true
|
|
202
|
-
export KNAPSACK_PRO_SLOW_TEST_FILE_PATTERN="spec/bar_spec.rb"
|
|
203
|
-
export SKIP_ME_OR_I_WILL_FAIL=true
|
|
204
|
-
bundle exec rake "knapsack_pro:rspec[--tag tag_x -t ~tag_y --tag ~skip_me_or_i_will_fail --format documentation]"
|
|
205
|
-
|
|
206
|
-
e2e-queue-rspec:
|
|
207
|
-
parameters:
|
|
208
|
-
ruby:
|
|
209
|
-
type: string
|
|
210
|
-
rspec:
|
|
211
|
-
type: string
|
|
212
|
-
parallelism: 2
|
|
213
|
-
working_directory: ~/knapsack_pro-ruby
|
|
214
|
-
resource_class: small
|
|
215
|
-
docker:
|
|
216
|
-
- image: cimg/ruby:<< parameters.ruby >>-browsers
|
|
217
|
-
environment:
|
|
218
|
-
PGHOST: 127.0.0.1
|
|
219
|
-
PGUSER: rails-app-with-knapsack_pro
|
|
220
|
-
RAILS_ENV: test
|
|
221
|
-
RACK_ENV: test
|
|
222
|
-
KNAPSACK_PRO_ENDPOINT: https://api-staging.knapsackpro.com
|
|
223
|
-
KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC: $KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC
|
|
224
|
-
EXTRA_TEST_FILES_DELAY: 10
|
|
225
|
-
- image: cimg/postgres:14.7
|
|
226
|
-
environment:
|
|
227
|
-
POSTGRES_DB: rails-app-with-knapsack_pro_test
|
|
228
|
-
POSTGRES_PASSWORD: password
|
|
229
|
-
POSTGRES_USER: rails-app-with-knapsack_pro
|
|
230
|
-
steps:
|
|
231
|
-
- setup_knapsack_pro_ruby
|
|
232
|
-
- setup_rails_app_with_knapsack_pro:
|
|
233
|
-
path: ~/rails-app-with-knapsack_pro
|
|
234
|
-
ruby: << parameters.ruby >>
|
|
235
|
-
rspec: << parameters.rspec >>
|
|
236
|
-
- run: dockerize -wait tcp://localhost:5432 -timeout 1m
|
|
237
|
-
- run:
|
|
238
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
239
|
-
command: |
|
|
240
|
-
ruby --version
|
|
241
|
-
bundle exec rspec --version
|
|
242
|
-
RSPEC=$(bundle exec rspec --version | grep rspec-core | head -n1 | cut -d " " -f5)
|
|
243
|
-
[ $RSPEC != << parameters.rspec >> ] && exit 1 || echo "Correct version of RSpec installed: $RSPEC"
|
|
244
|
-
- run:
|
|
245
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
246
|
-
command: bin/rails db:setup
|
|
247
|
-
- run:
|
|
248
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
249
|
-
command: |
|
|
250
|
-
export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--queue"
|
|
251
|
-
bundle exec rake knapsack_pro:queue:rspec
|
|
252
|
-
- run:
|
|
253
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
254
|
-
command: |
|
|
255
|
-
# run 0 tests as queue is consumed ||
|
|
256
|
-
export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--queue"
|
|
257
|
-
export KNAPSACK_PRO_FIXED_QUEUE_SPLIT=false
|
|
258
|
-
bundle exec rake knapsack_pro:queue:rspec
|
|
259
|
-
- run:
|
|
260
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
261
|
-
command: |
|
|
262
|
-
# retry the same split ||
|
|
263
|
-
export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--queue"
|
|
264
|
-
export KNAPSACK_PRO_FIXED_QUEUE_SPLIT=true
|
|
265
|
-
bundle exec rake knapsack_pro:queue:rspec
|
|
266
|
-
- run:
|
|
267
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
268
|
-
command: |
|
|
269
|
-
# fallback ||
|
|
270
|
-
export KNAPSACK_PRO_ENDPOINT=https://api-fake.knapsackpro.com
|
|
271
|
-
export KNAPSACK_PRO_MAX_REQUEST_RETRIES=1
|
|
272
|
-
bundle exec rake knapsack_pro:queue:rspec
|
|
273
|
-
- run:
|
|
274
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
275
|
-
command: |
|
|
276
|
-
# split by test examples ||
|
|
277
|
-
export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--queue--split"
|
|
278
|
-
export KNAPSACK_PRO_FIXED_QUEUE_SPLIT=true
|
|
279
|
-
export KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES=true
|
|
280
|
-
bundle exec rake knapsack_pro:queue:rspec
|
|
281
|
-
- run:
|
|
282
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
283
|
-
command: |
|
|
284
|
-
# split by test examples above the slow test file threshold ||
|
|
285
|
-
export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--queue--split-above-slow-test-file-threshold"
|
|
286
|
-
export KNAPSACK_PRO_FIXED_QUEUE_SPLIT=true
|
|
287
|
-
export KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES=true
|
|
288
|
-
export KNAPSACK_PRO_SLOW_TEST_FILE_THRESHOLD=1
|
|
289
|
-
bundle exec rake knapsack_pro:queue:rspec
|
|
290
|
-
- run:
|
|
291
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
292
|
-
command: |
|
|
293
|
-
# split by test examples AND a single CI node ||
|
|
294
|
-
export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--queue--split--single-node--$CIRCLE_NODE_INDEX"
|
|
295
|
-
export KNAPSACK_PRO_FIXED_QUEUE_SPLIT=true
|
|
296
|
-
export KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES=true
|
|
297
|
-
export KNAPSACK_PRO_CI_NODE_TOTAL=1
|
|
298
|
-
export KNAPSACK_PRO_CI_NODE_INDEX=0
|
|
299
|
-
bundle exec rake knapsack_pro:queue:rspec
|
|
300
|
-
- run:
|
|
301
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
302
|
-
command: |
|
|
303
|
-
# split custom files by test examples AND the --tag option passed ||
|
|
304
|
-
export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--queue--split-custom-files--tag-option"
|
|
305
|
-
export KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES=true
|
|
306
|
-
export KNAPSACK_PRO_SLOW_TEST_FILE_PATTERN="spec/bar_spec.rb"
|
|
307
|
-
export SKIP_ME_OR_I_WILL_FAIL=true
|
|
308
|
-
bundle exec rake "knapsack_pro:queue:rspec[--tag tag_x -t ~tag_y --tag ~skip_me_or_i_will_fail --format documentation]"
|
|
309
|
-
- run:
|
|
310
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
311
|
-
command: |
|
|
312
|
-
# turnip ||
|
|
313
|
-
mv .rspec .rspec.off
|
|
314
|
-
cp .rspec.turnip .rspec
|
|
315
|
-
export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--queue--turnip"
|
|
316
|
-
export KNAPSACK_PRO_FIXED_QUEUE_SPLIT=true
|
|
317
|
-
export KNAPSACK_PRO_TEST_DIR=turnip
|
|
318
|
-
export KNAPSACK_PRO_TEST_FILE_PATTERN="turnip/**/*.feature"
|
|
319
|
-
export KNAPSACK_PRO_SLOW_TEST_FILE_PATTERN="turnip/acceptance/foo.feature"
|
|
320
|
-
bundle exec rake knapsack_pro:queue:rspec
|
|
321
|
-
RSPEC_EXIT_CODE=$?
|
|
322
|
-
rm .rspec
|
|
323
|
-
mv .rspec.off .rspec
|
|
324
|
-
exit $RSPEC_EXIT_CODE
|
|
325
|
-
- run:
|
|
326
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
327
|
-
command: |
|
|
328
|
-
# turnip retry ||
|
|
329
|
-
mv .rspec .rspec.off
|
|
330
|
-
cp .rspec.turnip .rspec
|
|
331
|
-
export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--queue--turnip"
|
|
332
|
-
export KNAPSACK_PRO_FIXED_QUEUE_SPLIT=true
|
|
333
|
-
export KNAPSACK_PRO_TEST_DIR=turnip
|
|
334
|
-
export KNAPSACK_PRO_TEST_FILE_PATTERN="turnip/**/*.feature"
|
|
335
|
-
export KNAPSACK_PRO_SLOW_TEST_FILE_PATTERN="turnip/acceptance/foo.feature"
|
|
336
|
-
bundle exec rake knapsack_pro:queue:rspec
|
|
337
|
-
RSPEC_EXIT_CODE=$?
|
|
338
|
-
rm .rspec
|
|
339
|
-
mv .rspec.off .rspec
|
|
340
|
-
exit $RSPEC_EXIT_CODE
|
|
341
|
-
|
|
342
|
-
e2e-regular-minitest:
|
|
343
|
-
parallelism: 2
|
|
344
|
-
working_directory: ~/knapsack_pro-ruby
|
|
345
|
-
resource_class: small
|
|
346
|
-
parameters:
|
|
347
|
-
ruby:
|
|
348
|
-
type: string
|
|
349
|
-
docker:
|
|
350
|
-
- image: cimg/ruby:<< parameters.ruby >>-browsers
|
|
351
|
-
environment:
|
|
352
|
-
PGHOST: 127.0.0.1
|
|
353
|
-
PGUSER: rails-app-with-knapsack_pro
|
|
354
|
-
RAILS_ENV: test
|
|
355
|
-
RACK_ENV: test
|
|
356
|
-
KNAPSACK_PRO_ENDPOINT: https://api-staging.knapsackpro.com
|
|
357
|
-
KNAPSACK_PRO_TEST_SUITE_TOKEN_MINITEST: $KNAPSACK_PRO_TEST_SUITE_TOKEN_MINITEST
|
|
358
|
-
KNAPSACK_PRO_RSPEC_DISABLED: true
|
|
359
|
-
- image: cimg/postgres:14.7
|
|
360
|
-
environment:
|
|
361
|
-
POSTGRES_DB: rails-app-with-knapsack_pro_test
|
|
362
|
-
POSTGRES_PASSWORD: password
|
|
363
|
-
POSTGRES_USER: rails-app-with-knapsack_pro
|
|
364
|
-
steps:
|
|
365
|
-
- setup_knapsack_pro_ruby
|
|
366
|
-
- setup_rails_app_with_knapsack_pro:
|
|
367
|
-
path: ~/rails-app-with-knapsack_pro
|
|
368
|
-
ruby: << parameters.ruby >>
|
|
369
|
-
- run: dockerize -wait tcp://localhost:5432 -timeout 1m
|
|
370
|
-
- run:
|
|
371
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
372
|
-
command: ruby --version
|
|
373
|
-
- run:
|
|
374
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
375
|
-
command: bin/rails db:setup
|
|
376
|
-
- run:
|
|
377
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
378
|
-
command: |
|
|
379
|
-
export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--regular"
|
|
380
|
-
bundle exec rake knapsack_pro:minitest[--verbose]
|
|
381
|
-
- run:
|
|
382
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
383
|
-
command: |
|
|
384
|
-
# retry the same split ||
|
|
385
|
-
export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--regular"
|
|
386
|
-
bundle exec rake knapsack_pro:minitest[--verbose]
|
|
387
|
-
|
|
388
|
-
e2e-queue-minitest:
|
|
389
|
-
parameters:
|
|
390
|
-
ruby:
|
|
391
|
-
type: string
|
|
392
|
-
parallelism: 2
|
|
393
|
-
working_directory: ~/knapsack_pro-ruby
|
|
394
|
-
resource_class: small
|
|
395
|
-
docker:
|
|
396
|
-
- image: cimg/ruby:<< parameters.ruby >>-browsers
|
|
397
|
-
environment:
|
|
398
|
-
PGHOST: 127.0.0.1
|
|
399
|
-
PGUSER: rails-app-with-knapsack_pro
|
|
400
|
-
RAILS_ENV: test
|
|
401
|
-
RACK_ENV: test
|
|
402
|
-
KNAPSACK_PRO_ENDPOINT: https://api-staging.knapsackpro.com
|
|
403
|
-
KNAPSACK_PRO_TEST_SUITE_TOKEN_MINITEST: $KNAPSACK_PRO_TEST_SUITE_TOKEN_MINITEST
|
|
404
|
-
KNAPSACK_PRO_RSPEC_DISABLED: true
|
|
405
|
-
- image: cimg/postgres:14.7
|
|
406
|
-
environment:
|
|
407
|
-
POSTGRES_DB: rails-app-with-knapsack_pro_test
|
|
408
|
-
POSTGRES_PASSWORD: password
|
|
409
|
-
POSTGRES_USER: rails-app-with-knapsack_pro
|
|
410
|
-
steps:
|
|
411
|
-
- setup_knapsack_pro_ruby
|
|
412
|
-
- setup_rails_app_with_knapsack_pro:
|
|
413
|
-
path: ~/rails-app-with-knapsack_pro
|
|
414
|
-
ruby: << parameters.ruby >>
|
|
415
|
-
- run: dockerize -wait tcp://localhost:5432 -timeout 1m
|
|
416
|
-
- run:
|
|
417
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
418
|
-
command: ruby --version
|
|
419
|
-
- run:
|
|
420
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
421
|
-
command: bin/rails db:setup
|
|
422
|
-
- run:
|
|
423
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
424
|
-
command: |
|
|
425
|
-
# minitest ||
|
|
426
|
-
export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--queue--minitest"
|
|
427
|
-
export KNAPSACK_PRO_FIXED_QUEUE_SPLIT=true
|
|
428
|
-
bundle exec rake knapsack_pro:queue:minitest[--verbose]
|
|
429
|
-
- run:
|
|
430
|
-
working_directory: ~/rails-app-with-knapsack_pro
|
|
431
|
-
command: |
|
|
432
|
-
# minitest retry ||
|
|
433
|
-
export KNAPSACK_PRO_BRANCH="$CIRCLE_BRANCH--$CIRCLE_BUILD_NUM--queue--minitest"
|
|
434
|
-
export KNAPSACK_PRO_FIXED_QUEUE_SPLIT=true
|
|
435
|
-
bundle exec rake knapsack_pro:queue:minitest[--verbose]
|
|
436
|
-
|
|
437
|
-
workflows:
|
|
438
|
-
tests:
|
|
439
|
-
jobs:
|
|
440
|
-
- unit
|
|
441
|
-
- integration-rspec:
|
|
442
|
-
name: integration__ruby-<< matrix.ruby >>__rspec-<< matrix.rspec >>
|
|
443
|
-
matrix:
|
|
444
|
-
parameters:
|
|
445
|
-
ruby: ["3.2", "3.3", "3.4"]
|
|
446
|
-
rspec: ["3.12.3", "3.13.3"]
|
|
447
|
-
- e2e-regular-rspec:
|
|
448
|
-
name: e2e-regular__ruby-<< matrix.ruby >>__rspec-<< matrix.rspec >>
|
|
449
|
-
matrix:
|
|
450
|
-
parameters:
|
|
451
|
-
ruby: ["3.2", "3.3", "3.4"]
|
|
452
|
-
rspec: ["3.12.3", "3.13.3"]
|
|
453
|
-
- e2e-queue-rspec:
|
|
454
|
-
name: e2e-queue__ruby-<< matrix.ruby >>__rspec-<< matrix.rspec >>
|
|
455
|
-
matrix:
|
|
456
|
-
parameters:
|
|
457
|
-
ruby: ["3.2", "3.3", "3.4"]
|
|
458
|
-
rspec: ["3.12.3", "3.13.3"]
|
|
459
|
-
- e2e-regular-minitest:
|
|
460
|
-
name: e2e-regular__ruby-<< matrix.ruby >>__minitest
|
|
461
|
-
matrix:
|
|
462
|
-
parameters:
|
|
463
|
-
ruby: ["3.2", "3.3", "3.4"]
|
|
464
|
-
- e2e-queue-minitest:
|
|
465
|
-
name: e2e-queue__ruby-<< matrix.ruby >>__minitest
|
|
466
|
-
matrix:
|
|
467
|
-
parameters:
|
|
468
|
-
ruby: ["3.2", "3.3", "3.4"]
|
|
Binary file
|
|
Binary file
|
data/.github/dependabot.yml
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# To get started with Dependabot version updates, you'll need to specify which
|
|
2
|
-
# package ecosystems to update and where the package manifests are located.
|
|
3
|
-
# Please see the documentation for all configuration options:
|
|
4
|
-
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
|
5
|
-
|
|
6
|
-
version: 2
|
|
7
|
-
updates:
|
|
8
|
-
- package-ecosystem: "bundler"
|
|
9
|
-
directory: "/"
|
|
10
|
-
schedule:
|
|
11
|
-
interval: "weekly"
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# Description
|
|
2
|
-
|
|
3
|
-
TODO
|
|
4
|
-
|
|
5
|
-
# Checks
|
|
6
|
-
|
|
7
|
-
- [ ] I added the changes to the `UNRELEASED` section of the `CHANGELOG.md`, including the needed bump (i.e., patch, minor, major)
|
|
8
|
-
- [ ] I followed the architecture outlined below for RSpec in Queue Mode:
|
|
9
|
-
- Pure: `lib/knapsack_pro/pure/queue/rspec_pure.rb` contains pure functions that are unit tested.
|
|
10
|
-
- Extension: `lib/knapsack_pro/extensions/rspec_extension.rb` encapsulates calls to RSpec internals and is integration and E2E tested.
|
|
11
|
-
- Runner: `lib/knapsack_pro/runners/queue/rspec_runner.rb` invokes the pure code and the extension to produce side effects, which are integration and E2E tested.
|
data/.gitignore
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
*.gem
|
|
2
|
-
*.rbc
|
|
3
|
-
/.config
|
|
4
|
-
/coverage/
|
|
5
|
-
/InstalledFiles
|
|
6
|
-
/pkg/
|
|
7
|
-
/spec/reports/
|
|
8
|
-
/test/tmp/
|
|
9
|
-
/test/version_tmp/
|
|
10
|
-
/tmp/
|
|
11
|
-
.knapsack_pro
|
|
12
|
-
|
|
13
|
-
## Specific to RubyMotion:
|
|
14
|
-
.dat*
|
|
15
|
-
.repl_history
|
|
16
|
-
build/
|
|
17
|
-
|
|
18
|
-
## Documentation cache and generated files:
|
|
19
|
-
/.yardoc/
|
|
20
|
-
/_yardoc/
|
|
21
|
-
/doc/
|
|
22
|
-
/rdoc/
|
|
23
|
-
|
|
24
|
-
## Environment normalisation:
|
|
25
|
-
/.bundle/
|
|
26
|
-
/vendor/bundle
|
|
27
|
-
/lib/bundler/man/
|
|
28
|
-
|
|
29
|
-
# for a library or gem, you might want to ignore these files since the code is
|
|
30
|
-
# intended to run in multiple environments; otherwise, check them in:
|
|
31
|
-
Gemfile.lock
|
|
32
|
-
.ruby-version
|
|
33
|
-
.ruby-gemset
|
|
34
|
-
|
|
35
|
-
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
|
36
|
-
.rvmrc
|
|
37
|
-
|
|
38
|
-
# dynamically generated specs
|
|
39
|
-
spec_integration/
|