sleet 0.5.2 → 0.5.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: da6449a953da99cd33a455fabe362c43289fe5f8dae44383a94aa374b93096d7
4
- data.tar.gz: 11fb84037b64b725d164f24e923e0c9fd49583170f8b2bb508051c885a91f3fb
3
+ metadata.gz: e29601bd8864a0441e4db476383d4cfa10cbee7e63d81cb09cc3f1fc23a1f502
4
+ data.tar.gz: f318c390d52cb71e520911008e6bb23637e24dcf833334bf13259a09234c772d
5
5
  SHA512:
6
- metadata.gz: 11eabd22481ae44fb09ad86877d0e498cb02ebfe7214830fd47829349ebeeb44be86fe6a1474826fca1746c6fcd4b2c133a5f57412003018ab3111762dda2635
7
- data.tar.gz: db601fb23667d2d3019fb4ad0d3e8006bc50f04093445891fa8cf53eaf71f31512c766c6fd499b410d7dd4a91134f5fde76301ea3ceea5dee44236f224994984
6
+ metadata.gz: e965eb74942875f3151c7c46f519d04f6fedbe4c1e94de2b470e1cff5f601e5ef50e24478c7e338a9158b454a9c5133c5a936d0d906ae47f97757c72d7c0dbb7
7
+ data.tar.gz: 817a5a02f65c2a86879b142e1941d369751beadcc6a94f6768f6a78ff10e9ea1ed090861dc2fac99a774e8df884fdd88b8e29e330a0199b7733df4fb8c013a33
data/.circleci/config.yml CHANGED
@@ -3,37 +3,37 @@ jobs:
3
3
  test:
4
4
  parallelism: 1
5
5
  docker:
6
- - image: circleci/ruby:latest
6
+ - image: cimg/ruby:2.7.6
7
7
 
8
8
  steps:
9
9
  - checkout
10
10
 
11
11
  # Install
12
- - run: bundle check --path vendor/bundle || sudo apt-get install cmake && bundle install --path vendor/bundle
12
+ - run: bundle check --path vendor/bundle || (sudo apt-get update && sudo apt-get install cmake && bundle install --path vendor/bundle)
13
13
 
14
- - type: shell
15
- command: |
16
- bundle exec rubocop \
17
- --config .rubocop.yml \
18
- -r $(bundle show rubocop-junit-formatter)/lib/rubocop/formatter/junit_formatter.rb \
19
- --format RuboCop::Formatter::JUnitFormatter \
20
- --out /tmp/test-results/rubocop.xml \
21
- --format progress \
22
- --force-exclusion \
23
- $(circleci tests glob "**/*.rb" | circleci tests split --split-by=filesize --show-counts)
14
+ - run:
15
+ command: |
16
+ bundle exec rubocop \
17
+ --config .rubocop.yml \
18
+ -r $(bundle show rubocop-junit-formatter)/lib/rubocop/formatter/junit_formatter.rb \
19
+ --format RuboCop::Formatter::JUnitFormatter \
20
+ --out /tmp/test-results/rubocop.xml \
21
+ --format progress \
22
+ --force-exclusion \
23
+ $(circleci tests glob "**/*.rb" | circleci tests split --split-by=filesize --show-counts)
24
24
 
25
25
  # Run rspec in parallel
26
- - type: shell
27
- command: |
28
- bundle exec rspec --profile 10 \
29
- --format RspecJunitFormatter \
30
- --out /tmp/test-results/rspec.xml \
31
- --format progress \
32
- $(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings --show-counts)
26
+ - run:
27
+ command: |
28
+ bundle exec rspec --profile 10 \
29
+ --format RspecJunitFormatter \
30
+ --out /tmp/test-results/rspec.xml \
31
+ --format progress \
32
+ $(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings --show-counts)
33
33
 
34
34
  # Save artifacts
35
- - type: store_test_results
36
- path: /tmp/test-results
35
+ - store_test_results:
36
+ path: /tmp/test-results
37
37
 
38
38
  - store_artifacts:
39
39
  path: spec/.rspec_example_statuses
data/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## [v0.5.4](https://github.com/coreyja/sleet/tree/v0.5.4) (2023-03-11)
4
+
5
+ [Full Changelog](https://github.com/coreyja/sleet/compare/v0.5.3...v0.5.4)
6
+
7
+ **Merged pull requests:**
8
+
9
+ - Bug: Fix CI by making sure we can install `cmake` [\#112](https://github.com/coreyja/sleet/pull/112) ([coreyja](https://github.com/coreyja))
10
+ - bug: CircleCI removed has\_artifacts from v1.1 API response [\#111](https://github.com/coreyja/sleet/pull/111) ([jesseproudman](https://github.com/jesseproudman))
11
+
12
+ ## [v0.5.3](https://github.com/coreyja/sleet/tree/v0.5.3) (2020-08-10)
13
+
14
+ [Full Changelog](https://github.com/coreyja/sleet/compare/v0.5.2...v0.5.3)
15
+
16
+ **Merged pull requests:**
17
+
18
+ - bug: Add support for redirects. [\#80](https://github.com/coreyja/sleet/pull/80) ([temochka](https://github.com/temochka))
19
+
3
20
  ## [v0.5.2](https://github.com/coreyja/sleet/tree/v0.5.2) (2020-06-14)
4
21
 
5
22
  [Full Changelog](https://github.com/coreyja/sleet/compare/v0.5.1...v0.5.2)
@@ -186,7 +203,7 @@
186
203
 
187
204
  **Closed issues:**
188
205
 
189
- - Places `.rspec\_failed\_examples` relative to where the script is called from [\#1](https://github.com/coreyja/sleet/issues/1)
206
+ - Places `.rspec_failed_examples` relative to where the script is called from [\#1](https://github.com/coreyja/sleet/issues/1)
190
207
 
191
208
  **Merged pull requests:**
192
209
 
data/bin/release CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env bash
2
2
  set -e
3
3
 
4
- gem bump -v $1
5
- github_changelog_generator -u coreyja -p sleet --future-release v$(bundle exec exe/sleet version --bare)
4
+ bundle exec gem bump -v $1
5
+ bundle exec github_changelog_generator -u coreyja -p sleet --future-release v$(bundle exec exe/sleet version --bare)
6
6
  git add -A
7
- git commit --amend --no-edit
8
- gem release -tp
7
+ bundle exec git commit --amend --no-edit
8
+ bundle exec gem release -tp
data/lib/sleet/branch.rb CHANGED
@@ -13,10 +13,6 @@ module Sleet
13
13
  @builds ||= JSON.parse(Sleet::CircleCi.get(url, circle_ci_token).body)
14
14
  end
15
15
 
16
- def builds_with_artifacts
17
- builds.select { |b| b['has_artifacts'] }
18
- end
19
-
20
16
  private
21
17
 
22
18
  attr_reader :github_user, :github_repo, :branch, :circle_ci_token
@@ -12,7 +12,7 @@ module Sleet
12
12
  end
13
13
 
14
14
  def validate!
15
- must_find_a_build_with_artifacts!
15
+ must_find_a_build!
16
16
  chosen_build_must_have_input_file!
17
17
  end
18
18
 
@@ -29,19 +29,19 @@ module Sleet
29
29
  end
30
30
 
31
31
  def chosen_build_json
32
- branch.builds_with_artifacts.find do |b|
32
+ branch.builds.find do |b|
33
33
  b.fetch('workflows', nil)&.fetch('job_name', nil) == job_name
34
34
  end
35
35
  end
36
36
 
37
- def must_find_a_build_with_artifacts!
37
+ def must_find_a_build!
38
38
  !chosen_build_json.nil? ||
39
- raise(Error, "No builds with artifacts found#{" for job name [#{job_name}]" if job_name}")
39
+ raise(Error, "No builds found#{" for job name [#{job_name}]" if job_name}")
40
40
  end
41
41
 
42
42
  def chosen_build_must_have_input_file!
43
43
  build.artifacts.any? ||
44
- raise(Error, "No Rspec example file found in the latest build (##{chosen_build_num}) with artifacts")
44
+ raise(Error, "No Rspec example file found in the latest build (##{chosen_build_num})")
45
45
  end
46
46
  end
47
47
  end
@@ -5,7 +5,14 @@ require 'singleton'
5
5
  module Sleet
6
6
  class CircleCi
7
7
  def self.get(url, token)
8
- Faraday.get(url, 'circle-token' => token)
8
+ connection.get(url, 'circle-token' => token)
9
+ end
10
+
11
+ def self.connection
12
+ Faraday.new do |b|
13
+ b.use FaradayMiddleware::FollowRedirects
14
+ b.adapter :net_http
15
+ end
9
16
  end
10
17
  end
11
18
  end
data/lib/sleet/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sleet
4
- VERSION = '0.5.2'
4
+ VERSION = '0.5.4'
5
5
  end
data/lib/sleet.rb CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  require 'colorize'
4
4
  require 'faraday'
5
+ require 'faraday_middleware'
5
6
  require 'forwardable'
6
7
  require 'json'
7
8
  require 'rspec'
data/sleet.gemspec CHANGED
@@ -25,8 +25,11 @@ Gem::Specification.new do |spec|
25
25
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
26
  spec.require_paths = ['lib']
27
27
 
28
+ spec.required_ruby_version = '< 3.0'
29
+
28
30
  spec.add_dependency 'colorize', '~> 0.8.1'
29
31
  spec.add_dependency 'faraday', '>= 0.13.1', '< 1.1.0'
32
+ spec.add_dependency 'faraday_middleware'
30
33
  spec.add_dependency 'rspec', '~> 3.0'
31
34
  spec.add_dependency 'rugged', '>= 0.26', '< 1.1'
32
35
  spec.add_dependency 'terminal-table', '~> 1.8'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sleet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Corey Alexander
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-06-14 00:00:00.000000000 Z
11
+ date: 2023-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -44,6 +44,20 @@ dependencies:
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
46
  version: 1.1.0
47
+ - !ruby/object:Gem::Dependency
48
+ name: faraday_middleware
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
47
61
  - !ruby/object:Gem::Dependency
48
62
  name: rspec
49
63
  requirement: !ruby/object:Gem::Requirement
@@ -246,23 +260,23 @@ homepage: https://github.com/coreyja/sleet
246
260
  licenses:
247
261
  - MIT
248
262
  metadata: {}
249
- post_install_message:
263
+ post_install_message:
250
264
  rdoc_options: []
251
265
  require_paths:
252
266
  - lib
253
267
  required_ruby_version: !ruby/object:Gem::Requirement
254
268
  requirements:
255
- - - ">="
269
+ - - "<"
256
270
  - !ruby/object:Gem::Version
257
- version: '0'
271
+ version: '3.0'
258
272
  required_rubygems_version: !ruby/object:Gem::Requirement
259
273
  requirements:
260
274
  - - ">="
261
275
  - !ruby/object:Gem::Version
262
276
  version: '0'
263
277
  requirements: []
264
- rubygems_version: 3.0.1
265
- signing_key:
278
+ rubygems_version: 3.1.6
279
+ signing_key:
266
280
  specification_version: 4
267
281
  summary: CircleCI RSpec Status Persistance File Aggregator
268
282
  test_files: []