twiglet 3.3.3 → 3.3.7

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: 9deeab3ebe1ca91277b1eaec6980a61e5bb4434ae4a8c4ee7025f2ead0bed7e3
4
- data.tar.gz: 0c18af6ba979be04841730db5ee2418037d8e77728d5ee1495bce4522fee334b
3
+ metadata.gz: affcc4431661c8c826b37295be9d87c5051e760ec29748eec7ffa3ac6dec3f2f
4
+ data.tar.gz: 363651efac38ad6a78953d1083e1c3aed3e36cf10730dcfd839a29f182853636
5
5
  SHA512:
6
- metadata.gz: 25a067c8e8ab1f751b5ffcec83542da3fac87aaeec59456938dfd3b33a6a6b9b0be5890b5ab4456ee7081ddc111d1953d23b86e4bf4931540515ab64838c1c2b
7
- data.tar.gz: 379a36f5274f6025bdcefb48ea6e51db39ad4d8e675c21e87efb59adbc0e42829146bfc2c07f39dd5faa40ce61e554d051a54ad1eca4e2258b282a55638d271a
6
+ metadata.gz: 2f5d7d70a7dd94bf992a4e821c336b97601fc0e2c52a2b7c241553834ce5ccc21db0fb3944b5a52f631e22829cf6257e91e0e1551f6d6db8eeaa51294622f349
7
+ data.tar.gz: 5730b46609a5dc5d3ff9f85ad174aef2e811e1c3875c0960ac848b443053e2dbc8c11b8f141675aeac2adb927f5907881ef4c7a490c1c619c343340f921a4f08
@@ -0,0 +1,70 @@
1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ #
7
+ # ******** NOTE ********
8
+ # We have attempted to detect the languages in your repository. Please check
9
+ # the `language` matrix defined below to confirm you have the correct set of
10
+ # supported CodeQL languages.
11
+ #
12
+ name: "CodeQL"
13
+
14
+ on:
15
+ push:
16
+ branches: [ master ]
17
+ pull_request:
18
+ # The branches below must be a subset of the branches above
19
+ branches: [ master ]
20
+ schedule:
21
+ - cron: '42 8 * * 0'
22
+
23
+ jobs:
24
+ analyze:
25
+ name: Analyze
26
+ runs-on: ubuntu-latest
27
+ permissions:
28
+ actions: read
29
+ contents: read
30
+ security-events: write
31
+
32
+ strategy:
33
+ fail-fast: false
34
+ matrix:
35
+ language: [ 'ruby' ]
36
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37
+ # Learn more about CodeQL language support at https://git.io/codeql-language-support
38
+
39
+ steps:
40
+ - name: Checkout repository
41
+ uses: actions/checkout@v2
42
+
43
+ # Initializes the CodeQL tools for scanning.
44
+ - name: Initialize CodeQL
45
+ uses: github/codeql-action/init@v1
46
+ with:
47
+ languages: ${{ matrix.language }}
48
+ # If you wish to specify custom queries, you can do so here or in a config file.
49
+ # By default, queries listed here will override any specified in a config file.
50
+ # Prefix the list here with "+" to use these queries and those in the config file.
51
+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
52
+
53
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54
+ # If this step fails, then you should remove it and run the build manually (see below)
55
+ - name: Autobuild
56
+ uses: github/codeql-action/autobuild@v1
57
+
58
+ # ℹ️ Command-line programs to run using the OS shell.
59
+ # 📚 https://git.io/JvXDl
60
+
61
+ # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62
+ # and modify them (or add more) to build your code if your project
63
+ # uses a compiled language
64
+
65
+ #- run: |
66
+ # make bootstrap
67
+ # make release
68
+
69
+ - name: Perform CodeQL Analysis
70
+ uses: github/codeql-action/analyze@v1
@@ -1,4 +1,5 @@
1
- name: "dobby action"
1
+
2
+ name: "Dobby action"
2
3
  on:
3
4
  issue_comment:
4
5
  types: [created]
@@ -6,10 +7,20 @@ jobs:
6
7
  pr_commented:
7
8
  runs-on: ubuntu-20.04
8
9
  if: startsWith(github.event.comment.body, '/dobby')
9
-
10
+ env:
11
+ BUNDLE_WITHOUT: "development:test"
10
12
  steps:
11
- - name: bump version
12
- uses: simplybusiness/dobby@v2.1.0
13
+ - name: Chekcout action
14
+ uses: actions/checkout@v2
15
+ with:
16
+ repository: 'simplybusiness/dobby'
17
+ ref: 'v3.0.0'
18
+ - name: Set up ruby
19
+ uses: ruby/setup-ruby@v1
20
+ with:
21
+ bundler-cache: true
22
+ - name: Bump version
23
+ uses: simplybusiness/dobby@v3.0.0
13
24
  env:
14
25
  DOBBY_APP_ID: ${{ secrets.DOBBY_APP_ID }}
15
26
  DOBBY_PRIVATE_KEY: ${{ secrets.DOBBY_PRIVATE_KEY }}
data/catalog-info.yaml CHANGED
@@ -3,10 +3,6 @@ kind: Component
3
3
  metadata:
4
4
  name: twiglet
5
5
  description: simple logging
6
- annotations:
7
- github.com/project-slug: "simplybusiness/twiglet-ruby"
8
- backstage.io/source-location: url:https://github.com/simplybusiness/twiglet-ruby/
9
- backstage.io/techdocs-ref: url:https://github.com/simplybusiness/twiglet-ruby/
10
6
  spec:
11
7
  type: library
12
8
  lifecycle: production
@@ -46,7 +46,7 @@ module Twiglet
46
46
  if error
47
47
  error_fields = {
48
48
  error: {
49
- type: error.class,
49
+ type: error.class.to_s,
50
50
  message: error.message
51
51
  }
52
52
  }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Twiglet
4
- VERSION = '3.3.3'
4
+ VERSION = '3.3.7'
5
5
  end
data/test/logger_test.rb CHANGED
@@ -242,6 +242,16 @@ describe Twiglet::Logger do
242
242
  assert_equal 'StandardError', actual_log[:error][:type]
243
243
  assert_equal 'Unknown error', actual_log[:error][:message]
244
244
  end
245
+
246
+ it 'should log error type properly even when active_support/json is required' do
247
+ require 'active_support/json'
248
+ e = StandardError.new('Unknown error')
249
+ @logger.error('Artificially raised exception with string message', e)
250
+
251
+ actual_log = read_json(@buffer)
252
+
253
+ assert_equal 'StandardError', actual_log[:error][:type]
254
+ end
245
255
  end
246
256
 
247
257
  describe 'text logging' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twiglet
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.3
4
+ version: 3.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simply Business
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-22 00:00:00.000000000 Z
11
+ date: 2021-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json-schema
@@ -89,6 +89,7 @@ extra_rdoc_files: []
89
89
  files:
90
90
  - ".github/CODEOWNERS"
91
91
  - ".github/dependabot.yml"
92
+ - ".github/workflows/codeql-analysis.yml"
92
93
  - ".github/workflows/dobby-actions.yml"
93
94
  - ".github/workflows/gem-publish.yml"
94
95
  - ".github/workflows/ruby.yml"