twiglet 3.3.4 → 3.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/codeql-analysis.yml +70 -0
- data/.github/workflows/create-github-release.yml +34 -0
- data/.github/workflows/dobby-actions.yml +15 -4
- data/lib/twiglet/logger.rb +1 -1
- data/lib/twiglet/version.rb +1 -1
- data/test/logger_test.rb +10 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0df6b4dc38d469451c25999c9a8de0ea3019cc200121a21ad38ec387108a7a3f
|
4
|
+
data.tar.gz: ff9d7e9bae20b09b8415e812dd08c57b588ef0f69cf4cf6a2272b0dff9b8a044
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5a765f4272d13bfc1cbbffd520bd3727ded119b31ffb341e5a7cfcddd64c33a4094ab8f4942683b9dedba954d089b9e021df64f0bea152358034c9de9d55494
|
7
|
+
data.tar.gz: 3744febe0fb3b8d7e550271940291fc8d6cdd9b27495a9363afa4a21d06133764695fc9d5f485e2e6c4706b09dae2f2f41d8e893553067df50cc78ecbb2d44fd
|
@@ -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
|
@@ -0,0 +1,34 @@
|
|
1
|
+
name: Create GitHub Release
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- "master"
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
create-release:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
steps:
|
12
|
+
- name: Checkout
|
13
|
+
uses: actions/checkout@v2
|
14
|
+
- name: Set up Ruby
|
15
|
+
uses: ruby/setup-ruby@v1
|
16
|
+
with:
|
17
|
+
bundler-cache: true
|
18
|
+
- name: Get Ruby Version
|
19
|
+
id: get-ruby-version
|
20
|
+
run: echo "::set-output name=RUBY_VERSION::$(bundle exec ruby -e 'puts Twiglet::VERSION')"
|
21
|
+
- name: Create Release
|
22
|
+
uses: actions/github-script@v5
|
23
|
+
env:
|
24
|
+
RUBY_VERSION: ${{ steps.get-ruby-version.outputs.RUBY_VERSION }}
|
25
|
+
with:
|
26
|
+
result-encoding: string
|
27
|
+
script: |
|
28
|
+
const { RUBY_VERSION } = process.env
|
29
|
+
github.rest.repos.createRelease({
|
30
|
+
owner: context.repo.owner,
|
31
|
+
repo: context.repo.repo,
|
32
|
+
tag_name: RUBY_VERSION,
|
33
|
+
generate_release_notes: true,
|
34
|
+
})
|
@@ -1,4 +1,5 @@
|
|
1
|
-
|
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:
|
12
|
-
uses:
|
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/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.0
|
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-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json-schema
|
@@ -89,6 +89,8 @@ extra_rdoc_files: []
|
|
89
89
|
files:
|
90
90
|
- ".github/CODEOWNERS"
|
91
91
|
- ".github/dependabot.yml"
|
92
|
+
- ".github/workflows/codeql-analysis.yml"
|
93
|
+
- ".github/workflows/create-github-release.yml"
|
92
94
|
- ".github/workflows/dobby-actions.yml"
|
93
95
|
- ".github/workflows/gem-publish.yml"
|
94
96
|
- ".github/workflows/ruby.yml"
|