twiglet 3.3.6 → 3.4.2

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: 42b3770eec2899021ad740e0d451d9991b02191f25e7922fdb93875ef4b82cec
4
- data.tar.gz: e9852e87bb9b3a1e8450b0cb0f22a3c493c10a679e99caa5df8a9a5727288c4f
3
+ metadata.gz: a753447c39c6ee69b983d20b92bfdb335961d5c2f69fe729f89ce89ad9acfdc7
4
+ data.tar.gz: 0ff1bb763f34f6ba55fe927a8f86d38bb1db1d45a4d25be65ee23980bd3fc353
5
5
  SHA512:
6
- metadata.gz: d9456fe51a8863a3f9f727a5d15866d41681c4919b131c0551a6ad1eec7624ac7135716399f86f8d031ee905c5a04a67853d1d1c14d78d9f6ac5ac89a014efa2
7
- data.tar.gz: f0d73e71ec194a89affbe2039ba6fa27ec4cc58b8f82f26defb07cfb2c481c64431448eda7572368a711e139b795f2add8d4d81d1c99f413ceece3698ee807f1
6
+ metadata.gz: cf6bb4c6072e5f3e45e4dade33e93253f8622d5613bbfff4bbb24555e2d55a198e731414084744408e1639d23dd82f31a3d5fbf908bd091c03e56135ddc76be5
7
+ data.tar.gz: 8baa2e764f0d8fd7f3185bc0d343e60d8430a20f4acfe0af850e630e433f7b19790427604057150749f01408f67a0e251c1973d0bf930a2cc8a4f0583ab43115
@@ -10,10 +10,10 @@ jobs:
10
10
  runs-on: ubuntu-latest
11
11
  steps:
12
12
  - uses: actions/checkout@v2
13
- - name: Set up Ruby 2.6
14
- uses: actions/setup-ruby@v1
13
+ - name: Set up Ruby
14
+ uses: ruby/setup-ruby@v1
15
15
  with:
16
- version: 2.6.x
16
+ bundler-cache: true
17
17
  - name: Publish to RubyGems
18
18
  run: |
19
19
  mkdir -p $HOME/.gem
@@ -24,3 +24,20 @@ jobs:
24
24
  gem push *.gem
25
25
  env:
26
26
  GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
27
+ - name: Get Gem Version
28
+ id: get-gem-version
29
+ run: echo "::set-output name=GEM_VERSION::$(bundle exec ruby -e 'puts Twiglet::VERSION')"
30
+ - name: Create Release
31
+ uses: actions/github-script@v5
32
+ env:
33
+ GEM_VERSION: ${{ steps.get-gem-version.outputs.GEM_VERSION }}
34
+ with:
35
+ result-encoding: string
36
+ script: |
37
+ const { GEM_VERSION } = process.env
38
+ github.rest.repos.createRelease({
39
+ owner: context.repo.owner,
40
+ repo: context.repo.repo,
41
+ tag_name: GEM_VERSION,
42
+ generate_release_notes: true,
43
+ })
@@ -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.6'
4
+ VERSION = '3.4.2'
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.6
4
+ version: 3.4.2
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-10-27 00:00:00.000000000 Z
11
+ date: 2021-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json-schema
@@ -145,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
145
145
  - !ruby/object:Gem::Version
146
146
  version: '0'
147
147
  requirements: []
148
- rubygems_version: 3.2.22
148
+ rubygems_version: 3.0.3
149
149
  signing_key:
150
150
  specification_version: 4
151
151
  summary: Twiglet