twiglet 3.3.6 → 3.4.2
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 +4 -4
- data/.github/workflows/gem-publish.yml +20 -3
- data/lib/twiglet/logger.rb +1 -1
- data/lib/twiglet/version.rb +1 -1
- data/test/logger_test.rb +10 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a753447c39c6ee69b983d20b92bfdb335961d5c2f69fe729f89ce89ad9acfdc7
|
4
|
+
data.tar.gz: 0ff1bb763f34f6ba55fe927a8f86d38bb1db1d45a4d25be65ee23980bd3fc353
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
14
|
-
uses:
|
13
|
+
- name: Set up Ruby
|
14
|
+
uses: ruby/setup-ruby@v1
|
15
15
|
with:
|
16
|
-
|
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
|
+
})
|
data/lib/twiglet/logger.rb
CHANGED
data/lib/twiglet/version.rb
CHANGED
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.
|
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-
|
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.
|
148
|
+
rubygems_version: 3.0.3
|
149
149
|
signing_key:
|
150
150
|
specification_version: 4
|
151
151
|
summary: Twiglet
|