dvla-herodotus 1.2.0 → 1.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: 26e2843c0b2fa7985bccb48c2d24d5e66cf19ff9a1008d27347d705605a979f1
4
- data.tar.gz: 817acfe4641c6ad9a0bbcf607ce8b3968b2f2d5eccbe3586bfefae1a46236817
3
+ metadata.gz: e438adf38dbfed19a683688cbd116e9df9cd2381c64142ce1334eeea84ae681c
4
+ data.tar.gz: 6c4fc10b6f03e57261971d56fb86570283020c48217bdb4cdbb7ed6920a2a894
5
5
  SHA512:
6
- metadata.gz: afa99a580bb2f1082252c2dd44139b89d48d48625ee1223f7af6a93cc3ab68a1e65b7379e5646959ab37e772c2a72828b95eba75eb2c6cee75737dc42be85917
7
- data.tar.gz: 1eab9992df8482e4218f59b3f926e2bfa8383f3c141f708f9fe5a0ef64576fc5eef2bc6eabcb7ef281ccf4e7e4e1eb2cc02e630919c744d0ac5330d16907479c
6
+ metadata.gz: c4942f36ded7e851ba5e9a43254dd02ec02a3e2bf1df3580103502873fe16d2f28787960c0277417c415103411f17d8396fe4947f5feeead0ac408cbf928756c
7
+ data.tar.gz: '095addb8fe673dcf789bec32357bad374aec2ffc6fc58e7331fbf20070dc22680630ca386ea5dc6b5a4fa2114e6ed701787747cd988d171788cf1a444bddf8c8'
@@ -0,0 +1,39 @@
1
+ name: Ruby Build
2
+
3
+ on:
4
+ schedule:
5
+ - cron: '0 7 * * 1'
6
+
7
+ jobs:
8
+ test:
9
+ runs-on: ubuntu-latest
10
+ strategy:
11
+ matrix:
12
+ ruby-version: [ '3.0', '3.1', '3.2' ]
13
+
14
+ steps:
15
+ - uses: actions/checkout@v2
16
+ - name: Set up Ruby
17
+ uses: ruby/setup-ruby@v1
18
+ with:
19
+ ruby-version: ${{ matrix.ruby-version }}
20
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
21
+
22
+ - name: Run checks
23
+ run: |
24
+ gem install bundler-audit
25
+ bundle-audit check --update
26
+ bundle exec rspec
27
+
28
+ - name: Report test failure
29
+ if: ${{ failure() }}
30
+ run: |
31
+ COMMIT_MESSAGE=$(git log -1 --pretty=%B)
32
+ COMMIT_AUTHOR=$(git log -1 --pretty=format:'%an')
33
+ curl -H 'Content-Type: application/json' -d "{\"title\": \"${REPO_NAME} GitHub build failed.\",\"text\": \"Build **${BUILD_NUMBER}** on the main branch by ${COMMIT_AUTHOR} [GitHub Action](${ACTION_LINK}) | [Repo Branch](${BRANCH_LINK}) **Commit Message** ${COMMIT_MESSAGE}\",\"themeColor\": \"EA4300\"}" -s ${WEBHOOK_URL}
34
+ env:
35
+ REPO_NAME: "${{ github.event.repository.name }}"
36
+ BUILD_NUMBER: "${{ github.run_number }}"
37
+ ACTION_LINK: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
38
+ BRANCH_LINK: "${{ github.server_url }}/${{ github.repository }}"
39
+ WEBHOOK_URL: "${{ secrets.WEBHOOK_URL }}"
data/.rubocop.yml ADDED
@@ -0,0 +1,3 @@
1
+ ---
2
+ inherit_gem:
3
+ dvla-lint: ".rubocop.yml"
@@ -21,5 +21,6 @@ Gem::Specification.new do |spec|
21
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  spec.require_paths = %w[lib]
23
23
 
24
+ spec.add_development_dependency 'dvla-lint', '~> 1.7'
24
25
  spec.add_development_dependency 'rspec', '~> 3.8'
25
26
  end
@@ -66,7 +66,7 @@ module DVLA
66
66
  end
67
67
 
68
68
  def set_proc_writer_scenario
69
- if @logdev.dev.is_a? DVLA::Herodotus::MultiWriter and @logdev.dev.targets.any? DVLA::Herodotus::ProcWriter
69
+ if @logdev.dev.is_a?(DVLA::Herodotus::MultiWriter) && @logdev.dev.targets.any?(DVLA::Herodotus::ProcWriter)
70
70
  proc_writers = @logdev.dev.targets.select { |t| t.is_a? DVLA::Herodotus::ProcWriter }
71
71
  proc_writers.each do |pr|
72
72
  pr.scenario = @current_scenario
@@ -17,4 +17,4 @@ module DVLA
17
17
  end
18
18
  end
19
19
  end
20
- end
20
+ end
@@ -1,5 +1,5 @@
1
1
  module DVLA
2
2
  module Herodotus
3
- VERSION = '1.2.0'.freeze
3
+ VERSION = '1.2.1'.freeze
4
4
  end
5
5
  end
@@ -37,7 +37,7 @@ module DVLA
37
37
  proc_writer = ProcWriter.new(output_path)
38
38
  return HerodotusLogger.new(MultiWriter.new(proc_writer, $stdout))
39
39
  else
40
- raise ArgumentError.new "Unexpected output_path provided. Expecting either a string or a proc"
40
+ raise ArgumentError.new 'Unexpected output_path provided. Expecting either a string or a proc'
41
41
  end
42
42
  end
43
43
  HerodotusLogger.new($stdout)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dvla-herodotus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Driver and Vehicle Licensing Agency (DVLA)
@@ -9,8 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2024-01-10 00:00:00.000000000 Z
12
+ date: 2024-02-09 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: dvla-lint
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '1.7'
21
+ type: :development
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '1.7'
14
28
  - !ruby/object:Gem::Dependency
15
29
  name: rspec
16
30
  requirement: !ruby/object:Gem::Requirement
@@ -32,9 +46,11 @@ executables: []
32
46
  extensions: []
33
47
  extra_rdoc_files: []
34
48
  files:
49
+ - ".github/workflows/gem-build.yml"
35
50
  - ".github/workflows/gem-push.yml"
36
51
  - ".github/workflows/gem-test.yml"
37
52
  - ".gitignore"
53
+ - ".rubocop.yml"
38
54
  - Gemfile
39
55
  - LICENSE
40
56
  - README.md