yabeda-schked 0.2.0 → 0.2.1

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: c48ad18b5086f045518621966b5cc0e8dda7ed9d5e67a7a1a70449b64489173a
4
- data.tar.gz: 289f8675e113fd3110ef82aaf6e64a1bf335df16952b75416c36faef071176e6
3
+ metadata.gz: 29dbdde4e55af36995de5a2be83677a401691ec31d8d488b2259758ccd722a6e
4
+ data.tar.gz: 403356f0a3b6309ddf660fe0ab3f4839fcdc7c789deebe0b272897530410db83
5
5
  SHA512:
6
- metadata.gz: d486abc724789fefc14ac2e7a8a1e531b84f95a3d0578bb2456db03bc05bcf2fc4e2642470988451c1a21b0b3a98391212ee85b59e769bbc75d03831cee76277
7
- data.tar.gz: 3ef0b1d5daa1da8392012b30b542708bfeab2dd600182dd9c0a78942e415808c72314f477ac7ffdbdfa4856acbffe36eb007cda71fe8acb292744d212eef8406
6
+ metadata.gz: f82a3038c1c5588c8d48a385a08be582174f0aed65e3d11c4e4c9c63de690dc54875a68e96879e121e9136a09e9437b13a54e0b6e6e93eaf301a55fb4ca172c1
7
+ data.tar.gz: 7e8f0a4eeaa13cf00a71f295727345ab46288e692a6d79b7a2fd460d3b3fea2fd4953473679e2705172d3728bde41768f7e7e602eb10769581e1a14603986a68
data/CHANGELOG.md CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## 0.2.1 (2024-04-05)
11
+
12
+ ### Fixed
13
+
14
+ - Reset the `success` tag after a job failure. [#3](https://github.com/yabeda-rb/yabeda-schked/pull/3) by [@arlantir]
15
+
10
16
  ## 0.2.0 (2022-10-19)
11
17
 
12
18
  ### Added
@@ -27,3 +33,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
27
33
 
28
34
  [@skryukov]: https://github.com/skryukov
29
35
  [@bibendi]: https://github.com/bibendi
36
+ [@arlantir]: https://github.com/arlantir
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Yabeda
4
4
  module Schked
5
- VERSION = "0.2.0"
5
+ VERSION = "0.2.1"
6
6
  end
7
7
  end
data/lib/yabeda/schked.rb CHANGED
@@ -41,6 +41,8 @@ module Yabeda
41
41
  labels = {success: !job.opts[:failed], name: job_name(job)}
42
42
  Yabeda.schked.job_execution_runtime.measure(labels, job.last_work_time.round(3))
43
43
  Yabeda.schked.jobs_executed_total.increment(labels)
44
+ ensure
45
+ job.opts[:failed] = false
44
46
  end
45
47
 
46
48
  ::Schked.config.register_callback(:on_error) do |job|
@@ -16,13 +16,16 @@ Gem::Specification.new do |spec|
16
16
  spec.license = "MIT"
17
17
 
18
18
  spec.metadata["homepage_uri"] = spec.homepage
19
- spec.metadata["source_code_uri"] = "https://github.com/yabeda-rb/yabeda-schked"
20
- spec.metadata["changelog_uri"] = "https://github.com/yabeda-rb/yabeda-schked/blob/master/CHANGELOG.md"
19
+ spec.metadata["source_code_uri"] = spec.homepage
20
+ spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/master/CHANGELOG.md"
21
+ spec.metadata["bug_tracker_uri"] = "#{spec.homepage}/issues"
21
22
 
22
23
  # Specify which files should be added to the gem when it is released.
23
24
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
24
25
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
25
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
26
+ `git ls-files -z`.split("\x0").reject do |f|
27
+ f.match(%r{^(\.|bin/|spec/|tmp/|Gemfile|Rakefile|yabeda-schked-logo\.png)})
28
+ end
26
29
  end
27
30
  spec.bindir = "exe"
28
31
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yabeda-schked
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Svyatoslav Kryukov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-10-19 00:00:00.000000000 Z
11
+ date: 2024-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yabeda
@@ -124,22 +124,11 @@ executables: []
124
124
  extensions: []
125
125
  extra_rdoc_files: []
126
126
  files:
127
- - ".github/workflows/lint.yml"
128
- - ".github/workflows/release.yml"
129
- - ".github/workflows/test.yml"
130
- - ".gitignore"
131
- - ".rspec"
132
- - ".rubocop.yml"
133
127
  - CHANGELOG.md
134
- - Gemfile
135
128
  - LICENSE.txt
136
129
  - README.md
137
- - Rakefile
138
- - bin/console
139
- - bin/setup
140
130
  - lib/yabeda/schked.rb
141
131
  - lib/yabeda/schked/version.rb
142
- - yabeda-schked-logo.png
143
132
  - yabeda-schked.gemspec
144
133
  homepage: https://github.com/yabeda-rb/yabeda-schked
145
134
  licenses:
@@ -148,6 +137,7 @@ metadata:
148
137
  homepage_uri: https://github.com/yabeda-rb/yabeda-schked
149
138
  source_code_uri: https://github.com/yabeda-rb/yabeda-schked
150
139
  changelog_uri: https://github.com/yabeda-rb/yabeda-schked/blob/master/CHANGELOG.md
140
+ bug_tracker_uri: https://github.com/yabeda-rb/yabeda-schked/issues
151
141
  post_install_message:
152
142
  rdoc_options: []
153
143
  require_paths:
@@ -163,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
163
153
  - !ruby/object:Gem::Version
164
154
  version: '0'
165
155
  requirements: []
166
- rubygems_version: 3.1.6
156
+ rubygems_version: 3.5.3
167
157
  signing_key:
168
158
  specification_version: 4
169
159
  summary: Export performance metrics for Schked
@@ -1,22 +0,0 @@
1
- name: Run lint
2
-
3
- on:
4
- push:
5
- branches:
6
- - master
7
- pull_request:
8
-
9
- jobs:
10
- rubocop:
11
- name: "Run lint"
12
- runs-on: ubuntu-latest
13
- steps:
14
- - uses: actions/checkout@v2
15
- - uses: ruby/setup-ruby@v1
16
- with:
17
- ruby-version: 2.7
18
- - name: Lint Ruby code with RuboCop
19
- run: |
20
- gem install bundler
21
- bundle install --jobs 4 --retry 3
22
- bundle exec rubocop
@@ -1,82 +0,0 @@
1
- name: Build and release gem to RubyGems
2
-
3
- on:
4
- push:
5
- tags:
6
- - v*
7
-
8
- jobs:
9
- release:
10
- runs-on: ubuntu-latest
11
- steps:
12
- - uses: actions/checkout@v2
13
- with:
14
- fetch-depth: 0 # Fetch current tag as annotated. See https://github.com/actions/checkout/issues/290
15
- - uses: ruby/setup-ruby@v1
16
- with:
17
- ruby-version: 2.7
18
- - name: "Extract data from tag: version, message, body"
19
- id: tag
20
- run: |
21
- git fetch --tags --force # Really fetch annotated tag. See https://github.com/actions/checkout/issues/290#issuecomment-680260080
22
- echo ::set-output name=version::${GITHUB_REF#refs/tags/v}
23
- echo ::set-output name=subject::$(git for-each-ref $GITHUB_REF --format='%(contents:subject)')
24
- BODY="$(git for-each-ref $GITHUB_REF --format='%(contents:body)')"
25
- # Extract changelog entries between this and previous version headers
26
- escaped_version=$(echo ${GITHUB_REF#refs/tags/v} | sed -e 's/[]\/$*.^[]/\\&/g')
27
- changelog=$(awk "BEGIN{inrelease=0} /## ${escaped_version}/{inrelease=1;next} /## [0-9]+\.[0-9]+\.[0-9]+/{inrelease=0;exit} {if (inrelease) print}" CHANGELOG.md)
28
- # Multiline body for release. See https://github.community/t/set-output-truncates-multiline-strings/16852/5
29
- BODY="${BODY}"$'\n'"${changelog}"
30
- BODY="${BODY//'%'/'%25'}"
31
- BODY="${BODY//$'\n'/'%0A'}"
32
- BODY="${BODY//$'\r'/'%0D'}"
33
- echo "::set-output name=body::$BODY"
34
- # Add pre-release option if tag name has any suffix after vMAJOR.MINOR.PATCH
35
- if [[ ${GITHUB_REF#refs/tags/} =~ ^v[0-9]+\.[0-9]+\.[0-9]+.+ ]]; then
36
- echo ::set-output name=prerelease::true
37
- fi
38
- - name: Build gem
39
- run: gem build
40
- - name: Calculate checksums
41
- run: sha256sum yabeda-schked-${{ steps.tag.outputs.version }}.gem > SHA256SUM
42
- - name: Check version
43
- run: ls -l yabeda-schked-${{ steps.tag.outputs.version }}.gem
44
- - name: Create Release
45
- id: create_release
46
- uses: actions/create-release@v1
47
- env:
48
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49
- with:
50
- tag_name: ${{ github.ref }}
51
- release_name: ${{ steps.tag.outputs.subject }}
52
- body: ${{ steps.tag.outputs.body }}
53
- draft: false
54
- prerelease: ${{ steps.tag.outputs.prerelease }}
55
- - name: Upload built gem as release asset
56
- uses: actions/upload-release-asset@v1
57
- env:
58
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59
- with:
60
- upload_url: ${{ steps.create_release.outputs.upload_url }}
61
- asset_path: yabeda-schked-${{ steps.tag.outputs.version }}.gem
62
- asset_name: yabeda-schked-${{ steps.tag.outputs.version }}.gem
63
- asset_content_type: application/x-tar
64
- - name: Upload checksums as release asset
65
- uses: actions/upload-release-asset@v1
66
- env:
67
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68
- with:
69
- upload_url: ${{ steps.create_release.outputs.upload_url }}
70
- asset_path: SHA256SUM
71
- asset_name: SHA256SUM
72
- asset_content_type: text/plain
73
- - name: Publish to GitHub packages
74
- env:
75
- GEM_HOST_API_KEY: Bearer ${{ secrets.GITHUB_TOKEN }}
76
- run: |
77
- gem push yabeda-schked-${{ steps.tag.outputs.version }}.gem --host https://rubygems.pkg.github.com/${{ github.repository_owner }}
78
- - name: Publish to RubyGems
79
- env:
80
- GEM_HOST_API_KEY: "${{ secrets.RUBYGEMS_API_KEY }}"
81
- run: |
82
- gem push yabeda-schked-${{ steps.tag.outputs.version }}.gem
@@ -1,46 +0,0 @@
1
- name: Run tests
2
-
3
- on:
4
- push:
5
- branches:
6
- - master
7
- pull_request:
8
-
9
- jobs:
10
- rspec:
11
- name: "Run tests"
12
- if: "!contains(github.event.head_commit.message, '[ci skip]')"
13
- runs-on: ubuntu-latest
14
- env:
15
- BUNDLE_JOBS: 4
16
- BUNDLE_RETRY: 3
17
- CI: true
18
- strategy:
19
- fail-fast: false
20
- matrix:
21
- include:
22
- - ruby: 3.1
23
- - ruby: 3.0
24
- - ruby: 2.7
25
- - ruby: 2.6
26
- - ruby: 2.5
27
- steps:
28
- - uses: actions/checkout@v2
29
- - uses: actions/cache@v1
30
- with:
31
- path: /home/runner/bundle
32
- key: bundle-${{ matrix.ruby }}-${{ hashFiles('**/*.gemspec') }}-${{ hashFiles('**/Gemfile') }}
33
- restore-keys: |
34
- bundle-${{ matrix.ruby }}-${{ hashFiles('**/*.gemspec') }}-${{ hashFiles('**/Gemfile') }}
35
- bundle-${{ matrix.ruby }}-
36
- - uses: ruby/setup-ruby@v1
37
- with:
38
- ruby-version: ${{ matrix.ruby }}
39
- - name: Bundle install
40
- run: |
41
- bundle config path /home/runner/bundle
42
- bundle install
43
- bundle update
44
- - name: Run RSpec
45
- run: |
46
- bundle exec rspec
data/.gitignore DELETED
@@ -1,13 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
-
10
- Gemfile.lock
11
-
12
- # rspec failure tracking
13
- .rspec_status
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --color
3
- --require spec_helper
data/.rubocop.yml DELETED
@@ -1,23 +0,0 @@
1
- require:
2
- - rubocop-md
3
- - standard/cop/block_single_line_braces
4
-
5
- inherit_gem:
6
- standard: config/base.yml
7
-
8
- AllCops:
9
- Exclude:
10
- - 'bin/*'
11
- - 'tmp/**/*'
12
- - 'Gemfile'
13
- - 'vendor/**/*'
14
- - '.github/**/*'
15
- DisplayCopNames: true
16
- SuggestExtensions: false
17
- TargetRubyVersion: 2.7
18
-
19
- Standard/BlockSingleLineBraces:
20
- Enabled: false
21
-
22
- Style/FrozenStringLiteralComment:
23
- Enabled: true
data/Gemfile DELETED
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org"
4
-
5
- # Specify your gem's dependencies in yabeda-schked.gemspec
6
- gemspec
7
-
8
- group :development, :test do
9
- gem "pry"
10
- gem "pry-inline"
11
- gem "pry-byebug", platform: :mri
12
- end
data/Rakefile DELETED
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/gem_tasks"
4
- require "rspec/core/rake_task"
5
- require "rubocop/rake_task"
6
-
7
- RuboCop::RakeTask.new
8
-
9
- RSpec::Core::RakeTask.new(:spec)
10
-
11
- task default: %i[rubocop spec]
data/bin/console DELETED
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require "bundler/setup"
5
- require "yabeda/schked"
6
-
7
- # You can add fixtures and/or initialization code here to make experimenting
8
- # with your gem easier. You can also use a different console, if you like.
9
-
10
- # (If you use this, don't forget to add pry to your Gemfile!)
11
- # require "pry"
12
- # Pry.start
13
-
14
- require "irb"
15
- IRB.start(__FILE__)
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
Binary file