sleet 0.3.10 → 0.5.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: b4ce6d9391262e355854886ea05dd44082be2f51aec4bb300132f9f26d1a1737
4
- data.tar.gz: 210ede2430b468b996c60c5f245a21fea5b1590a50d4636aa6da6d884163f056
3
+ metadata.gz: 8805bb18d2e088cf5f63494b42e29e4e05afcd187917c8260823911242d5910b
4
+ data.tar.gz: 3611f50834801d5c2330a1f30a249faf89985bc0675a1d4b00911c25405565ae
5
5
  SHA512:
6
- metadata.gz: 27afbb4ae3cf79b183af8a8ec1c398d05f1450f3662fa75abf2343c2d703ba68645cd971262767d790b356e6d93a86cbdfcf3f39675e87c9cea3515a419f8fba
7
- data.tar.gz: 383e4b3e98cae18a20e9499fc6622ceec0f09cae6e18ca13f994eb4d91ab2e3dd7d25ce1c7e06a22e722a8d41f4f3668924f5ce24381ba3d3bcaf4a83a9ffa0b
6
+ metadata.gz: 92c65ac25258e338d9e86af77142a172621af44ea3ab9aad61bf91924c2e4a3f8fe15c0428c5acce1c80412e20789c8a8aadfe9e02644aeccaa54888b829038d
7
+ data.tar.gz: eaf9852bceea8250b85a499af61dda56463aeb6fd85ea1b49c0566b0b99c65ff09ba9ea02a9e0200b13a268960c211402892b2b88d38ce70d06f6db324334ca1
@@ -1,6 +1,6 @@
1
1
  version: 2
2
2
  jobs:
3
- build:
3
+ test:
4
4
  parallelism: 1
5
5
  docker:
6
6
  - image: circleci/ruby:latest
@@ -8,23 +8,8 @@ jobs:
8
8
  steps:
9
9
  - checkout
10
10
 
11
- - run: date +%U-%Y > 'date-cache-key.txt'
12
- - run: ruby -v > 'ruby-version.txt'
13
-
14
- ## Bundler
15
- # Restore Cache
16
- - restore_cache:
17
- keys:
18
- - gem-cache-{{ checksum "ruby-version.txt" }}-{{ checksum "sleet.gemspec" }}-
19
- - gem-cache-{{ checksum "ruby-version.txt" }}-
20
- - gem-cache-
21
11
  # Install
22
12
  - run: bundle check --path vendor/bundle || sudo apt-get install cmake && bundle install --path vendor/bundle
23
- # Store Cache
24
- - save_cache:
25
- key: gem-cache-{{ checksum "ruby-version.txt" }}-{{ checksum "sleet.gemspec" }}-{{ checksum "date-cache-key.txt" }}
26
- paths:
27
- - vendor/bundle
28
13
 
29
14
  - type: shell
30
15
  command: |
@@ -35,7 +20,7 @@ jobs:
35
20
  --out /tmp/test-results/rubocop.xml \
36
21
  --format progress \
37
22
  --force-exclusion \
38
- $(bundle exec rubocop --list-target-files | circleci tests split --split-by=filesize --show-counts)
23
+ $(circleci tests glob "**/*.rb" | circleci tests split --split-by=filesize --show-counts)
39
24
 
40
25
  # Run rspec in parallel
41
26
  - type: shell
@@ -53,3 +38,8 @@ jobs:
53
38
  - store_artifacts:
54
39
  path: spec/.rspec_example_statuses
55
40
 
41
+ workflows:
42
+ version: 2
43
+ test-workflow:
44
+ jobs:
45
+ - test
data/.gitignore CHANGED
@@ -12,3 +12,5 @@
12
12
 
13
13
  # Ignore Rspec Example Status File
14
14
  spec/.rspec_example_statuses
15
+
16
+ .envrc
@@ -1,35 +1,11 @@
1
- require: rubocop-rspec
1
+ inherit_gem:
2
+ rubocop-coreyja:
3
+ - config/default.yml
2
4
 
3
5
  inherit_from: .rubocop_todo.yml
4
6
 
5
7
  AllCops:
6
8
  TargetRubyVersion: 2.4
7
- Exclude:
8
- - 'vendor/**/*'
9
-
10
- Metrics/LineLength:
11
- Max: 120
12
-
13
- Metrics/ClassLength:
14
- Exclude:
15
- - 'spec/**/*'
16
-
17
- Metrics/BlockLength:
18
- Exclude:
19
- - 'spec/**/*'
20
- - '*.gemspec'
21
-
22
- Documentation:
23
- Enabled: false
24
-
25
- Style/StringLiterals:
26
- Description: Checks if uses of quotes match the configured preference.
27
- StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
28
- Enabled: true
29
- EnforcedStyle: single_quotes
30
- SupportedStyles:
31
- - single_quotes
32
- - double_quotes
33
9
 
34
10
  RSpec/MultipleExpectations:
35
11
  Enabled: false
@@ -1,11 +1,15 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2018-03-04 17:57:32 -0500 using RuboCop version 0.52.1.
3
+ # on 2018-03-08 00:46:21 -0500 using RuboCop version 0.53.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
+ # Offense count: 1
10
+ Metrics/AbcSize:
11
+ Max: 18
12
+
9
13
  # Offense count: 1
10
14
  # Configuration parameters: Max.
11
15
  RSpec/NestedGroups:
@@ -1,14 +1,103 @@
1
- # Change Log
1
+ # Changelog
2
+
3
+ ## [v0.5.0](https://github.com/coreyja/sleet/tree/v0.5.0) (2020-06-13)
4
+
5
+ [Full Changelog](https://github.com/coreyja/sleet/compare/v0.4.3...v0.5.0)
6
+
7
+ **Closed issues:**
8
+
9
+ - Add Support for Forked Repos in Github [\#41](https://github.com/coreyja/sleet/issues/41)
10
+
11
+ **Merged pull requests:**
12
+
13
+ - Support PR builds from forked repos!!! ✨ [\#77](https://github.com/coreyja/sleet/pull/77) ([smudge](https://github.com/smudge))
14
+ - Update rugged requirement from \>= 0.26, \< 0.100 to \>= 0.26, \< 1.1 [\#76](https://github.com/coreyja/sleet/pull/76) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
15
+ - Update rugged requirement from \>= 0.26, \< 0.29 to \>= 0.26, \< 0.100 [\#75](https://github.com/coreyja/sleet/pull/75) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
16
+ - Update thor requirement from ~\> 0.20.0 to \>= 0.20, \< 1.1 [\#70](https://github.com/coreyja/sleet/pull/70) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
17
+
18
+ ## [v0.4.3](https://github.com/coreyja/sleet/tree/v0.4.3) (2020-03-07)
19
+
20
+ [Full Changelog](https://github.com/coreyja/sleet/compare/v0.4.2...v0.4.3)
21
+
22
+ **Closed issues:**
23
+
24
+ - s/Artifcats/Artifacts/ [\#44](https://github.com/coreyja/sleet/issues/44)
25
+
26
+ **Merged pull requests:**
27
+
28
+ - fix: Replace "artifi🐱s" with "artifacts". [\#74](https://github.com/coreyja/sleet/pull/74) ([temochka](https://github.com/temochka))
29
+ - feat: Look at 100 recent builds instead of just 30. [\#73](https://github.com/coreyja/sleet/pull/73) ([temochka](https://github.com/temochka))
30
+ - Update webmock requirement from ~\> 3.7.0 to ~\> 3.8.0 [\#72](https://github.com/coreyja/sleet/pull/72) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
31
+ - Update faraday requirement from \>= 0.13.1, \< 0.16.0 to \>= 0.13.1, \< 1.1.0 [\#71](https://github.com/coreyja/sleet/pull/71) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
32
+ - Update gem-release requirement from = 2.1.0 to = 2.1.1 [\#69](https://github.com/coreyja/sleet/pull/69) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
33
+ - Update gem-release requirement from = 2.0.4 to = 2.1.0 [\#68](https://github.com/coreyja/sleet/pull/68) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
34
+ - Update gem-release requirement from = 2.0.3 to = 2.0.4 [\#67](https://github.com/coreyja/sleet/pull/67) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
35
+ - Update rake requirement from ~\> 12.3 to ~\> 13.0 [\#64](https://github.com/coreyja/sleet/pull/64) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
36
+ - Update webmock requirement from ~\> 3.6.0 to ~\> 3.7.0 [\#63](https://github.com/coreyja/sleet/pull/63) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
37
+ - Update gem-release requirement from = 2.0.2 to = 2.0.3 [\#62](https://github.com/coreyja/sleet/pull/62) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
38
+ - Update gem-release requirement from = 2.0.1 to = 2.0.2 [\#61](https://github.com/coreyja/sleet/pull/61) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
39
+ - Update webmock requirement from ~\> 3.5.1 to ~\> 3.6.0 [\#60](https://github.com/coreyja/sleet/pull/60) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
40
+
41
+ ## [v0.4.2](https://github.com/coreyja/sleet/tree/v0.4.2) (2019-05-27)
42
+
43
+ [Full Changelog](https://github.com/coreyja/sleet/compare/v0.4.1...v0.4.2)
44
+
45
+ **Closed issues:**
46
+
47
+ - Dependabot can't resolve your Ruby dependency files [\#51](https://github.com/coreyja/sleet/issues/51)
48
+ - Dependabot can't resolve your Ruby dependency files [\#50](https://github.com/coreyja/sleet/issues/50)
49
+ - Dependabot can't resolve your Ruby dependency files [\#48](https://github.com/coreyja/sleet/issues/48)
50
+ - Dependabot can't resolve your Ruby dependency files [\#49](https://github.com/coreyja/sleet/issues/49)
51
+
52
+ **Merged pull requests:**
53
+
54
+ - Fix CircleCI Builds [\#59](https://github.com/coreyja/sleet/pull/59) ([coreyja](https://github.com/coreyja))
55
+ - Add a Gitter chat badge to README.md [\#58](https://github.com/coreyja/sleet/pull/58) ([gitter-badger](https://github.com/gitter-badger))
56
+ - Symlink to docs README.md from top level [\#57](https://github.com/coreyja/sleet/pull/57) ([coreyja](https://github.com/coreyja))
57
+ - Docs site fixes [\#56](https://github.com/coreyja/sleet/pull/56) ([coreyja](https://github.com/coreyja))
58
+ - Setup Github Pages [\#54](https://github.com/coreyja/sleet/pull/54) ([coreyja](https://github.com/coreyja))
59
+ - Update rugged requirement from \>= 0.26, \< 0.28 to \>= 0.26, \< 0.29 [\#53](https://github.com/coreyja/sleet/pull/53) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
60
+ - Remove direct dependency on Bundler [\#52](https://github.com/coreyja/sleet/pull/52) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
61
+ - Update webmock requirement from ~\> 3.4.0 to ~\> 3.5.1 [\#47](https://github.com/coreyja/sleet/pull/47) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
62
+
63
+ ## [v0.4.1](https://github.com/coreyja/sleet/tree/v0.4.1) (2018-11-24)
64
+
65
+ [Full Changelog](https://github.com/coreyja/sleet/compare/v0.4.0...v0.4.1)
66
+
67
+ **Merged pull requests:**
68
+
69
+ - chore: Set up Rubocop-Coreyja gem [\#45](https://github.com/coreyja/sleet/pull/45) ([coreyja](https://github.com/coreyja))
70
+ - Update README.md [\#40](https://github.com/coreyja/sleet/pull/40) ([coreyja](https://github.com/coreyja))
71
+ - Update gem-release requirement to = 2.0.1 [\#33](https://github.com/coreyja/sleet/pull/33) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
72
+ - Update webmock requirement to ~\> 3.4.0 [\#28](https://github.com/coreyja/sleet/pull/28) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
73
+ - Update faraday requirement to \>= 0.13.1, \< 0.16.0 [\#27](https://github.com/coreyja/sleet/pull/27) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
74
+ - Update rubocop requirement to ~\> 0.55.0 [\#26](https://github.com/coreyja/sleet/pull/26) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
75
+ - Update gem-release requirement to = 2.0.0.rc.3 [\#25](https://github.com/coreyja/sleet/pull/25) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
76
+ - Update rugged requirement to \>= 0.26, \< 0.28 [\#24](https://github.com/coreyja/sleet/pull/24) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
77
+
78
+ ## [v0.4.0](https://github.com/coreyja/sleet/tree/v0.4.0) (2018-03-08)
79
+
80
+ [Full Changelog](https://github.com/coreyja/sleet/compare/v0.3.10...v0.4.0)
81
+
82
+ **Closed issues:**
83
+
84
+ - Allow Specifying Token from Config Files [\#9](https://github.com/coreyja/sleet/issues/9)
85
+
86
+ **Merged pull requests:**
87
+
88
+ - Get Token From Config File [\#21](https://github.com/coreyja/sleet/pull/21) ([coreyja](https://github.com/coreyja))
89
+
90
+ ## [v0.3.10](https://github.com/coreyja/sleet/tree/v0.3.10) (2018-03-08)
2
91
 
3
- ## [v0.3.10](https://github.com/coreyja/sleet/tree/v0.3.10) (2018-03-07)
4
92
  [Full Changelog](https://github.com/coreyja/sleet/compare/v0.3.9...v0.3.10)
5
93
 
6
94
  **Merged pull requests:**
7
95
 
8
96
  - Base Version Option [\#20](https://github.com/coreyja/sleet/pull/20) ([coreyja](https://github.com/coreyja))
9
- - Update rubocop requirement to ~\> 0.53.0 [\#19](https://github.com/coreyja/sleet/pull/19) ([dependabot[bot]](https://github.com/apps/dependabot))
97
+ - Update rubocop requirement to ~\> 0.53.0 [\#19](https://github.com/coreyja/sleet/pull/19) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
10
98
 
11
99
  ## [v0.3.9](https://github.com/coreyja/sleet/tree/v0.3.9) (2018-03-04)
100
+
12
101
  [Full Changelog](https://github.com/coreyja/sleet/compare/v0.3.8...v0.3.9)
13
102
 
14
103
  **Closed issues:**
@@ -18,17 +107,16 @@
18
107
  **Merged pull requests:**
19
108
 
20
109
  - Refactor [\#18](https://github.com/coreyja/sleet/pull/18) ([coreyja](https://github.com/coreyja))
21
- - Update rake requirement to ~\> 12.3 [\#17](https://github.com/coreyja/sleet/pull/17) ([dependabot[bot]](https://github.com/apps/dependabot))
22
- - Update faraday requirement to \>= 0.13.1, \< 0.15.0 [\#16](https://github.com/coreyja/sleet/pull/16) ([dependabot[bot]](https://github.com/apps/dependabot))
110
+ - Update rake requirement to ~\> 12.3 [\#17](https://github.com/coreyja/sleet/pull/17) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
111
+ - Update faraday requirement to \>= 0.13.1, \< 0.15.0 [\#16](https://github.com/coreyja/sleet/pull/16) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
112
+ - More Specs [\#15](https://github.com/coreyja/sleet/pull/15) ([coreyja](https://github.com/coreyja))
23
113
 
24
114
  ## [v0.3.8](https://github.com/coreyja/sleet/tree/v0.3.8) (2018-02-25)
25
- [Full Changelog](https://github.com/coreyja/sleet/compare/v0.3.7...v0.3.8)
26
115
 
27
- **Merged pull requests:**
28
-
29
- - More Specs [\#15](https://github.com/coreyja/sleet/pull/15) ([coreyja](https://github.com/coreyja))
116
+ [Full Changelog](https://github.com/coreyja/sleet/compare/v0.3.7...v0.3.8)
30
117
 
31
118
  ## [v0.3.7](https://github.com/coreyja/sleet/tree/v0.3.7) (2018-01-19)
119
+
32
120
  [Full Changelog](https://github.com/coreyja/sleet/compare/v0.3.6...v0.3.7)
33
121
 
34
122
  **Merged pull requests:**
@@ -36,6 +124,7 @@
36
124
  - Fix token auth and finally add a spec for it so I don't break it again [\#14](https://github.com/coreyja/sleet/pull/14) ([coreyja](https://github.com/coreyja))
37
125
 
38
126
  ## [v0.3.6](https://github.com/coreyja/sleet/tree/v0.3.6) (2018-01-18)
127
+
39
128
  [Full Changelog](https://github.com/coreyja/sleet/compare/v0.3.5...v0.3.6)
40
129
 
41
130
  **Merged pull requests:**
@@ -43,9 +132,11 @@
43
132
  - Fix Auth By Going Back to Query Params [\#13](https://github.com/coreyja/sleet/pull/13) ([coreyja](https://github.com/coreyja))
44
133
 
45
134
  ## [v0.3.5](https://github.com/coreyja/sleet/tree/v0.3.5) (2018-01-17)
135
+
46
136
  [Full Changelog](https://github.com/coreyja/sleet/compare/v0.3.4...v0.3.5)
47
137
 
48
138
  ## [v0.3.4](https://github.com/coreyja/sleet/tree/v0.3.4) (2018-01-17)
139
+
49
140
  [Full Changelog](https://github.com/coreyja/sleet/compare/v0.3.3...v0.3.4)
50
141
 
51
142
  **Merged pull requests:**
@@ -54,6 +145,7 @@
54
145
  - Fix Auth [\#11](https://github.com/coreyja/sleet/pull/11) ([coreyja](https://github.com/coreyja))
55
146
 
56
147
  ## [v0.3.3](https://github.com/coreyja/sleet/tree/v0.3.3) (2018-01-16)
148
+
57
149
  [Full Changelog](https://github.com/coreyja/sleet/compare/v0.3.2...v0.3.3)
58
150
 
59
151
  **Merged pull requests:**
@@ -61,6 +153,7 @@
61
153
  - Add `version` cmd [\#10](https://github.com/coreyja/sleet/pull/10) ([coreyja](https://github.com/coreyja))
62
154
 
63
155
  ## [v0.3.2](https://github.com/coreyja/sleet/tree/v0.3.2) (2018-01-16)
156
+
64
157
  [Full Changelog](https://github.com/coreyja/sleet/compare/v0.3.1...v0.3.2)
65
158
 
66
159
  **Merged pull requests:**
@@ -68,6 +161,7 @@
68
161
  - Update Readme and Add Descriptions to Help Menus [\#8](https://github.com/coreyja/sleet/pull/8) ([coreyja](https://github.com/coreyja))
69
162
 
70
163
  ## [v0.3.1](https://github.com/coreyja/sleet/tree/v0.3.1) (2018-01-15)
164
+
71
165
  [Full Changelog](https://github.com/coreyja/sleet/compare/v0.3.0...v0.3.1)
72
166
 
73
167
  **Merged pull requests:**
@@ -75,6 +169,7 @@
75
169
  - Add Dependency Versions [\#5](https://github.com/coreyja/sleet/pull/5) ([coreyja](https://github.com/coreyja))
76
170
 
77
171
  ## [v0.3.0](https://github.com/coreyja/sleet/tree/v0.3.0) (2018-01-15)
172
+
78
173
  [Full Changelog](https://github.com/coreyja/sleet/compare/v0.2.0...v0.3.0)
79
174
 
80
175
  **Closed issues:**
@@ -87,10 +182,13 @@
87
182
  - Error Messages [\#3](https://github.com/coreyja/sleet/pull/3) ([coreyja](https://github.com/coreyja))
88
183
 
89
184
  ## [v0.2.0](https://github.com/coreyja/sleet/tree/v0.2.0) (2018-01-14)
185
+
186
+ [Full Changelog](https://github.com/coreyja/sleet/compare/aa005fdae00ae843909f3a2d1753db3727a27c2c...v0.2.0)
187
+
90
188
  **Merged pull requests:**
91
189
 
92
190
  - Gemify [\#2](https://github.com/coreyja/sleet/pull/2) ([coreyja](https://github.com/coreyja))
93
191
 
94
192
 
95
193
 
96
- \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
194
+ \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
@@ -0,0 +1 @@
1
+ ./docs/README.md
@@ -0,0 +1 @@
1
+ sleet.dev
@@ -0,0 +1,160 @@
1
+ # Sleet ☁️ ❄️
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/sleet.svg)](https://badge.fury.io/rb/sleet)
4
+ [![Maintainability](https://api.codeclimate.com/v1/badges/7f346b368d72b53ef630/maintainability)](https://codeclimate.com/github/coreyja/sleet/maintainability)
5
+ [![CircleCI](https://circleci.com/gh/coreyja/sleet.svg?style=svg)](https://circleci.com/gh/coreyja/sleet)
6
+ [![Join the chat at https://gitter.im/rspec-sleet/community](https://badges.gitter.im/rspec-sleet/community.svg)](https://gitter.im/rspec-sleet/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
7
+
8
+ ## Background and Problem
9
+
10
+ RSpec has a [feature](https://relishapp.com/rspec/rspec-core/v/3-7/docs/command-line/only-failures) that I find very useful which is the `--only-failures` option. This will re-run only that examples that failed the previous run.
11
+
12
+ CircleCI has support for [uploading artifacts](https://circleci.com/docs/2.0/artifacts/) with your builds, which allows us to store the persistance file that powers the RSpec only failures option.
13
+ However! CircleCI also supports and encourages parallelizing your build, which means even if you upload your rspec persistance file, you actually have a number of them each containing a subset of your test suite.
14
+ This is where `Sleet` comes in!
15
+
16
+ ## Purpose
17
+
18
+ This tool does two things:
19
+ 1. It downloads all of the `.rspec_failed_examples` files that were uploaded to CircleCI for the most recent build of the current branch
20
+ 2. It combines the multiple files into a single sorted `.rspec_failed_examples` file, and moves it to the [current directory](https://github.com/coreyja/CRSPFA/issues/1)
21
+
22
+ ## Getting Started
23
+
24
+ ### 1. Configure RSpec to Create and Use an example persistance file
25
+
26
+ We need to set the `example_status_persistence_file_path` config in RSpec. Here are the relevant [RSpec docs](https://relishapp.com/rspec/rspec-core/v/3-7/docs/command-line/only-failures#background).
27
+
28
+ The first step is to create(/or add to) your `spec/spec_helper.rb` file. We want to include the following configuration, which tells RSpec where to store the status persistance file. The actual location and file name are up to you, this is just an example. (Though using this name will require less configuration later.)
29
+
30
+ ```
31
+ RSpec.configure do |c|
32
+ c.example_status_persistence_file_path = ".rspec_example_statuses"
33
+ end
34
+ ```
35
+
36
+ if you just created the `spec_helper.rb` file then you will need to create a `.rspec` file containing the following to load your new helper file.
37
+
38
+ ```
39
+ --require spec_helper
40
+ ```
41
+
42
+ Again there are other ways to load your `spec_helper.rb` file, including requiring it from each spec. Pick one that works for you.
43
+
44
+ ### 2. Collect the example persistance files in CircleCI
45
+
46
+ To do this we need to create a step which [saves](https://circleci.com/docs/2.0/artifacts/) the `.rspec_example_statuses` as artifacts of the build. The following is an example of such a step in CircleCI. This must happen after rspec has run or else the persistance file will not exist.
47
+
48
+ ```
49
+ - store_artifacts:
50
+ path: .rspec_example_statuses
51
+
52
+ ```
53
+
54
+ ### 3. Save a CircleCI Token locally (to access private builds)
55
+
56
+ In order to see private builds/repos in CircleCI you will need to get a CircleCI token and save it locally to a Sleet Configuration file.
57
+ The recommended approach is to create a yml file in your home directory which contains your the key `circle_ci_token`
58
+
59
+ ```
60
+ circle_ci_token: PLACE_TOKEN_HERE
61
+ ```
62
+
63
+ An API token can be generated here: [https://circleci.com/account/api](https://circleci.com/account/api)
64
+
65
+ ### 4. Run this tool from your project
66
+
67
+ ```
68
+ sleet
69
+ ```
70
+
71
+ This will look up the latest completed build in CircleCI for this branch, and download all the relevant `.rspec_example_statuses` files. It then combines and sorts them and saves the result to the `.rspec_example_statuses` file locally.
72
+
73
+ ### 5. Run RSpec with `--only-failures`
74
+
75
+ ```
76
+ bundle exec rspec --only-failures
77
+ ```
78
+
79
+ This will run only the examples that failed in CircleCI!
80
+
81
+ ## Configuration
82
+
83
+ If you are using Worklfows in your CircleCI builds, or you are working with a different persistance file name, you may need to configure Sleet beyond the defaults.
84
+
85
+ Sleet currently supports two ways to input configurations:
86
+
87
+ 1. Through YML files
88
+ - `Sleet` will search 'up' from where the command was run and look for `.sleet.yml` files. It will combine all the files it finds, such that 'deeper' files take presedence. This allows you to have a user-level config at `~/.sleet.yml` and have project specific files which take presendence over the user level config (ex: `~/Projects/foo/.sleet.yml`)
89
+ 2. Through the CLI
90
+ - These always take presendece the options provided in the YML files
91
+
92
+ To view your current configuration use the `sleet config` command which will give you a table of the current configuration. You can also use the `--print-config` flag with the `fetch` command to print out the config, including any other CLI options. This can be useful for bebugging as the output also tells you where each option came from.
93
+
94
+ ### Options
95
+
96
+ These are the options that are currently supported
97
+
98
+ #### `--source_dir`
99
+
100
+ Alias: `s`
101
+
102
+ This is the directory of the source git repo. If a `source_dir` is NOT given we look up from the current directory for the nearest git repo.
103
+
104
+ #### `--input_file`
105
+
106
+ Alias: `i`
107
+
108
+ This is the name of the Rspec Circle Persistance File in CircleCI. The default is `.rspec_example_statuses`
109
+
110
+ This will match if the full path on CircleCI ends in the given name.
111
+
112
+ #### `--output_file`
113
+
114
+ Alias: `o`
115
+
116
+ This is the name for the output file, on your local system. It is relative to the `source_dir`.
117
+
118
+ Will be IGNORED if `workflows` is provided.
119
+
120
+ #### `--workflows`
121
+
122
+ Alias: `w`
123
+
124
+ If you are using workflows in CircleCI, then this is for you! You need to tell `Sleet` which build(s) to look in, and where each output should be saved.
125
+ The input is a hash, where the key is the build name and the value is the `output_file` for that build. Sleet supports saving the artifacts to multiple builds, meaning it can support a mono-repo setup.
126
+
127
+ Build-Test-Deploy Demo:
128
+
129
+ For this example you have three jobs in your CircleCI Workflow, `build`, `test` and `deploy`, but only 1 (the `test` build) generate an Rspec persistance file
130
+
131
+ This command will pick the `test` build and save its artifacts to the `.rspec_example_statuses` file
132
+
133
+ ```
134
+ sleet fetch --workflows test:.rspec_example_statuses
135
+ ```
136
+ MonoRepo Demo:
137
+
138
+ If you have a mono-repo that contains 3 sub-dirs. `foo`, `bar` and `baz`. And each one has an accompanying build. We can process all these sub-dirs at once with the following workflow command.
139
+
140
+ ```
141
+ sleet fetch --workflows foo-test:foo/.rpsec_example_statuses bar-test:bar/.rspec_example_statuses baz-specs:baz/spec/examples.txt
142
+ ```
143
+
144
+ #### `--username`
145
+
146
+ Alias: `u`
147
+
148
+ This is the GitHub username that is referenced by the CircleCI build. By default, Sleet will base this on your upstream git remote.
149
+
150
+ #### `--project`
151
+
152
+ Alias: `p`
153
+
154
+ This is the GitHub project that is referenced by the CircleCI build. By default, Sleet will base this on your upstream git remote.
155
+
156
+ #### `--branch`
157
+
158
+ Alias: `b`
159
+
160
+ This is the remote branch that is referenced by the CircleCI build. Sleet will attempt to guess this by default, but if you are pushing to a forked repo, you may need to specify a different branch name (e.g. "pull/1234").