twiglet 3.14.2 → 3.15.0
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/lib/twiglet/version.rb +1 -1
- metadata +42 -38
- data/.github/CODEOWNERS +0 -4
- data/.github/dependabot.yml +0 -22
- data/.github/workflows/codeql-analysis.yml +0 -70
- data/.github/workflows/dobby-actions.yml +0 -28
- data/.github/workflows/gem-publish.yml +0 -46
- data/.github/workflows/ruby.yml +0 -38
- data/.github/workflows/version-forget-me-not.yml +0 -19
- data/.gitignore +0 -58
- data/.rubocop.yml +0 -14
- data/.ruby-version +0 -1
- data/Gemfile +0 -5
- data/Rakefile +0 -7
- data/catalog-info.yaml +0 -15
- data/docs/CODE_OF_CONDUCT.md +0 -76
- data/docs/RATIONALE.md +0 -90
- data/docs/index.md +0 -256
- data/example_app.rb +0 -60
- data/examples/rack/example_rack_app.rb +0 -17
- data/examples/rack/request_logger.rb +0 -66
- data/examples/rack/request_logger_test.rb +0 -91
- data/test/error_serialiser_test.rb +0 -18
- data/test/formatter_test.rb +0 -89
- data/test/hash_extensions_test.rb +0 -133
- data/test/logger_test.rb +0 -751
- data/test/message_test.rb +0 -13
- data/test/test_coverage.rb +0 -17
- data/test/validator_test.rb +0 -38
- data/twiglet.gemspec +0 -29
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: af1f2d73faa76bd4b2a6e5726878e19214ac7d4c92ec682feafeb34a3bfa664a
|
|
4
|
+
data.tar.gz: c8b81cb3c2005235e0fce309bc5fadeba66b294e3f267d2bb4375915382021d0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2bbffcae454c3e0328cd1cca5a5c15ad81cc8ecf07edf42e298f4e2086e38c3a4f6c58bee5fc3aa3fdafd602683a7f83e7c7e2280ceb09963815dde0af2b1d2b
|
|
7
|
+
data.tar.gz: d00d509ce376c3daae299f68d5b130c79ea432c6d97fd36ea5957c63ecb12930eddf4bc52aa8d1e7486abaeb3c414fa899c0619adc9757614644cacccbe55de1
|
data/lib/twiglet/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: twiglet
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.15.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Simply Business
|
|
8
8
|
bindir: bin
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date: 2025-
|
|
10
|
+
date: 2025-12-30 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
12
|
- !ruby/object:Gem::Dependency
|
|
13
13
|
name: json-schema
|
|
@@ -37,6 +37,20 @@ dependencies:
|
|
|
37
37
|
- - ">="
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
39
|
version: '0'
|
|
40
|
+
- !ruby/object:Gem::Dependency
|
|
41
|
+
name: minitest-mock
|
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - ">="
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '0'
|
|
47
|
+
type: :development
|
|
48
|
+
prerelease: false
|
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - ">="
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '0'
|
|
40
54
|
- !ruby/object:Gem::Dependency
|
|
41
55
|
name: rake
|
|
42
56
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -51,20 +65,34 @@ dependencies:
|
|
|
51
65
|
- - ">="
|
|
52
66
|
- !ruby/object:Gem::Version
|
|
53
67
|
version: '0'
|
|
68
|
+
- !ruby/object:Gem::Dependency
|
|
69
|
+
name: rbs
|
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
|
71
|
+
requirements:
|
|
72
|
+
- - ">="
|
|
73
|
+
- !ruby/object:Gem::Version
|
|
74
|
+
version: '0'
|
|
75
|
+
type: :development
|
|
76
|
+
prerelease: false
|
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
78
|
+
requirements:
|
|
79
|
+
- - ">="
|
|
80
|
+
- !ruby/object:Gem::Version
|
|
81
|
+
version: '0'
|
|
54
82
|
- !ruby/object:Gem::Dependency
|
|
55
83
|
name: simplecov
|
|
56
84
|
requirement: !ruby/object:Gem::Requirement
|
|
57
85
|
requirements:
|
|
58
|
-
- -
|
|
86
|
+
- - ">="
|
|
59
87
|
- !ruby/object:Gem::Version
|
|
60
|
-
version: 0
|
|
88
|
+
version: '0'
|
|
61
89
|
type: :development
|
|
62
90
|
prerelease: false
|
|
63
91
|
version_requirements: !ruby/object:Gem::Requirement
|
|
64
92
|
requirements:
|
|
65
|
-
- -
|
|
93
|
+
- - ">="
|
|
66
94
|
- !ruby/object:Gem::Version
|
|
67
|
-
version: 0
|
|
95
|
+
version: '0'
|
|
68
96
|
- !ruby/object:Gem::Dependency
|
|
69
97
|
name: simplycop
|
|
70
98
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -81,33 +109,13 @@ dependencies:
|
|
|
81
109
|
version: '0'
|
|
82
110
|
description: Like a log, only smaller.
|
|
83
111
|
email:
|
|
84
|
-
-
|
|
112
|
+
- opensourcetech+rubygems@simplybusiness.co.uk
|
|
85
113
|
executables: []
|
|
86
114
|
extensions: []
|
|
87
115
|
extra_rdoc_files: []
|
|
88
116
|
files:
|
|
89
|
-
- ".github/CODEOWNERS"
|
|
90
|
-
- ".github/dependabot.yml"
|
|
91
|
-
- ".github/workflows/codeql-analysis.yml"
|
|
92
|
-
- ".github/workflows/dobby-actions.yml"
|
|
93
|
-
- ".github/workflows/gem-publish.yml"
|
|
94
|
-
- ".github/workflows/ruby.yml"
|
|
95
|
-
- ".github/workflows/version-forget-me-not.yml"
|
|
96
|
-
- ".gitignore"
|
|
97
|
-
- ".rubocop.yml"
|
|
98
|
-
- ".ruby-version"
|
|
99
|
-
- Gemfile
|
|
100
117
|
- LICENSE
|
|
101
118
|
- README.md
|
|
102
|
-
- Rakefile
|
|
103
|
-
- catalog-info.yaml
|
|
104
|
-
- docs/CODE_OF_CONDUCT.md
|
|
105
|
-
- docs/RATIONALE.md
|
|
106
|
-
- docs/index.md
|
|
107
|
-
- example_app.rb
|
|
108
|
-
- examples/rack/example_rack_app.rb
|
|
109
|
-
- examples/rack/request_logger.rb
|
|
110
|
-
- examples/rack/request_logger_test.rb
|
|
111
119
|
- lib/hash_extensions.rb
|
|
112
120
|
- lib/twiglet/error_serialiser.rb
|
|
113
121
|
- lib/twiglet/formatter.rb
|
|
@@ -116,18 +124,14 @@ files:
|
|
|
116
124
|
- lib/twiglet/validation_schema.json
|
|
117
125
|
- lib/twiglet/validator.rb
|
|
118
126
|
- lib/twiglet/version.rb
|
|
119
|
-
- test/error_serialiser_test.rb
|
|
120
|
-
- test/formatter_test.rb
|
|
121
|
-
- test/hash_extensions_test.rb
|
|
122
|
-
- test/logger_test.rb
|
|
123
|
-
- test/message_test.rb
|
|
124
|
-
- test/test_coverage.rb
|
|
125
|
-
- test/validator_test.rb
|
|
126
|
-
- twiglet.gemspec
|
|
127
127
|
homepage: https://github.com/simplybusiness/twiglet-ruby
|
|
128
128
|
licenses:
|
|
129
|
-
-
|
|
130
|
-
metadata:
|
|
129
|
+
- MIT
|
|
130
|
+
metadata:
|
|
131
|
+
source_code_uri: https://github.com/simplybusiness/twiglet-ruby
|
|
132
|
+
changelog_uri: https://github.com/simplybusiness/twiglet-ruby/releases
|
|
133
|
+
bug_tracker_uri: https://github.com/simplybusiness/twiglet-ruby/issues
|
|
134
|
+
documentation_uri: https://github.com/simplybusiness/twiglet-ruby
|
|
131
135
|
rdoc_options: []
|
|
132
136
|
require_paths:
|
|
133
137
|
- lib
|
|
@@ -135,7 +139,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
135
139
|
requirements:
|
|
136
140
|
- - ">="
|
|
137
141
|
- !ruby/object:Gem::Version
|
|
138
|
-
version: '3.
|
|
142
|
+
version: '3.2'
|
|
139
143
|
- - "<"
|
|
140
144
|
- !ruby/object:Gem::Version
|
|
141
145
|
version: '3.5'
|
data/.github/CODEOWNERS
DELETED
data/.github/dependabot.yml
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
version: 2
|
|
2
|
-
updates:
|
|
3
|
-
- package-ecosystem: bundler
|
|
4
|
-
directory: "/"
|
|
5
|
-
schedule:
|
|
6
|
-
interval: daily
|
|
7
|
-
time: "07:00"
|
|
8
|
-
open-pull-requests-limit: 99
|
|
9
|
-
labels:
|
|
10
|
-
- dependencies
|
|
11
|
-
ignore:
|
|
12
|
-
- dependency-name: simplecov
|
|
13
|
-
versions:
|
|
14
|
-
- ">= 0.18"
|
|
15
|
-
- package-ecosystem: github-actions
|
|
16
|
-
directory: "/"
|
|
17
|
-
schedule:
|
|
18
|
-
interval: daily
|
|
19
|
-
time: "07:00"
|
|
20
|
-
open-pull-requests-limit: 99
|
|
21
|
-
labels:
|
|
22
|
-
- dependencies
|
|
@@ -1,70 +0,0 @@
|
|
|
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@v4
|
|
42
|
-
|
|
43
|
-
# Initializes the CodeQL tools for scanning.
|
|
44
|
-
- name: Initialize CodeQL
|
|
45
|
-
uses: github/codeql-action/init@v3
|
|
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@v3
|
|
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@v3
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
name: "Dobby action"
|
|
2
|
-
on:
|
|
3
|
-
issue_comment:
|
|
4
|
-
types: [created]
|
|
5
|
-
permissions:
|
|
6
|
-
contents: read
|
|
7
|
-
jobs:
|
|
8
|
-
pr_commented:
|
|
9
|
-
runs-on: ubuntu-latest
|
|
10
|
-
if: startsWith(github.event.comment.body, '/dobby')
|
|
11
|
-
env:
|
|
12
|
-
BUNDLE_WITHOUT: "development:test"
|
|
13
|
-
steps:
|
|
14
|
-
- name: Chekcout action
|
|
15
|
-
uses: actions/checkout@v4
|
|
16
|
-
with:
|
|
17
|
-
repository: 'simplybusiness/dobby'
|
|
18
|
-
ref: 'v4'
|
|
19
|
-
- name: Set up ruby
|
|
20
|
-
uses: ruby/setup-ruby@v1
|
|
21
|
-
with:
|
|
22
|
-
bundler-cache: true
|
|
23
|
-
- name: Bump version
|
|
24
|
-
uses: simplybusiness/dobby@v4
|
|
25
|
-
env:
|
|
26
|
-
DOBBY_APP_ID: ${{ secrets.DOBBY_APP_ID }}
|
|
27
|
-
DOBBY_PRIVATE_KEY: ${{ secrets.DOBBY_PRIVATE_KEY }}
|
|
28
|
-
VERSION_FILE_PATH: lib/twiglet/version.rb
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
name: Deploy Ruby Gem
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [ master ]
|
|
6
|
-
|
|
7
|
-
permissions:
|
|
8
|
-
contents: write
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
build:
|
|
12
|
-
name: Build and Publish
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
steps:
|
|
15
|
-
- uses: actions/checkout@v4
|
|
16
|
-
- name: Set up Ruby
|
|
17
|
-
uses: ruby/setup-ruby@v1
|
|
18
|
-
with:
|
|
19
|
-
bundler-cache: true
|
|
20
|
-
- name: Publish to RubyGems
|
|
21
|
-
run: |
|
|
22
|
-
mkdir -p $HOME/.gem
|
|
23
|
-
touch $HOME/.gem/credentials
|
|
24
|
-
chmod 0600 $HOME/.gem/credentials
|
|
25
|
-
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
|
26
|
-
gem build *.gemspec
|
|
27
|
-
gem push *.gem
|
|
28
|
-
env:
|
|
29
|
-
GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_API_KEY}}
|
|
30
|
-
- name: Get Gem Version
|
|
31
|
-
id: get-gem-version
|
|
32
|
-
run: echo "GEM_VERSION=$(bundle exec ruby -e 'puts Twiglet::VERSION')" >> $GITHUB_OUTPUT
|
|
33
|
-
- name: Create Release
|
|
34
|
-
uses: actions/github-script@v7
|
|
35
|
-
env:
|
|
36
|
-
GEM_VERSION: ${{ steps.get-gem-version.outputs.GEM_VERSION }}
|
|
37
|
-
with:
|
|
38
|
-
result-encoding: string
|
|
39
|
-
script: |
|
|
40
|
-
const { GEM_VERSION } = process.env
|
|
41
|
-
github.rest.repos.createRelease({
|
|
42
|
-
owner: context.repo.owner,
|
|
43
|
-
repo: context.repo.repo,
|
|
44
|
-
tag_name: GEM_VERSION,
|
|
45
|
-
generate_release_notes: true,
|
|
46
|
-
})
|
data/.github/workflows/ruby.yml
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
name: Ruby CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
|
|
7
|
-
env:
|
|
8
|
-
CI: true
|
|
9
|
-
permissions:
|
|
10
|
-
contents: read
|
|
11
|
-
|
|
12
|
-
jobs:
|
|
13
|
-
build:
|
|
14
|
-
runs-on: ubuntu-latest
|
|
15
|
-
defaults:
|
|
16
|
-
run:
|
|
17
|
-
working-directory: ./
|
|
18
|
-
|
|
19
|
-
strategy:
|
|
20
|
-
matrix:
|
|
21
|
-
ruby-version: [3.1, 3.2, 3.3, 3.4]
|
|
22
|
-
|
|
23
|
-
steps:
|
|
24
|
-
- uses: actions/checkout@v4
|
|
25
|
-
- name: Set up Ruby
|
|
26
|
-
uses: ruby/setup-ruby@v1
|
|
27
|
-
with:
|
|
28
|
-
ruby-version: ${{ matrix.ruby-version }}
|
|
29
|
-
- name: Install dependencies
|
|
30
|
-
run: bundle install
|
|
31
|
-
- name: Rubocop Check
|
|
32
|
-
run: bundle exec rubocop
|
|
33
|
-
- name: Run all tests
|
|
34
|
-
run: bundle exec rake test
|
|
35
|
-
shell: bash
|
|
36
|
-
- name: Run example_app
|
|
37
|
-
run: bundle exec ruby example_app.rb
|
|
38
|
-
shell: bash
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
name: Check version
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
pull_request:
|
|
5
|
-
branches:
|
|
6
|
-
- master
|
|
7
|
-
types: [opened, synchronize]
|
|
8
|
-
permissions:
|
|
9
|
-
contents: read
|
|
10
|
-
statuses: write
|
|
11
|
-
jobs:
|
|
12
|
-
build:
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
|
|
15
|
-
steps:
|
|
16
|
-
- uses: simplybusiness/version-forget-me-not@v2
|
|
17
|
-
env:
|
|
18
|
-
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
19
|
-
VERSION_FILE_PATH: "lib/twiglet/version.rb"
|
data/.gitignore
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
*~
|
|
2
|
-
*.gem
|
|
3
|
-
Gemfile.lock
|
|
4
|
-
*.rbc
|
|
5
|
-
/.config
|
|
6
|
-
/coverage/
|
|
7
|
-
/InstalledFiles
|
|
8
|
-
/pkg/
|
|
9
|
-
/spec/reports/
|
|
10
|
-
/spec/examples.txt
|
|
11
|
-
/test/tmp/
|
|
12
|
-
/test/version_tmp/
|
|
13
|
-
/tmp/
|
|
14
|
-
|
|
15
|
-
# Used by dotenv library to load environment variables.
|
|
16
|
-
# .env
|
|
17
|
-
|
|
18
|
-
# Ignore Byebug command history file.
|
|
19
|
-
.byebug_history
|
|
20
|
-
|
|
21
|
-
## Specific to RubyMotion:
|
|
22
|
-
.dat*
|
|
23
|
-
.repl_history
|
|
24
|
-
build/
|
|
25
|
-
*.bridgesupport
|
|
26
|
-
build-iPhoneOS/
|
|
27
|
-
build-iPhoneSimulator/
|
|
28
|
-
|
|
29
|
-
## Specific to RubyMotion (use of CocoaPods):
|
|
30
|
-
#
|
|
31
|
-
# We recommend against adding the Pods directory to your .gitignore. However
|
|
32
|
-
# you should judge for yourself, the pros and cons are mentioned at:
|
|
33
|
-
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
|
34
|
-
#
|
|
35
|
-
# vendor/Pods/
|
|
36
|
-
|
|
37
|
-
## Documentation cache and generated files:
|
|
38
|
-
/.yardoc/
|
|
39
|
-
/_yardoc/
|
|
40
|
-
/doc/
|
|
41
|
-
/rdoc/
|
|
42
|
-
|
|
43
|
-
## Environment normalization:
|
|
44
|
-
/.bundle/
|
|
45
|
-
/vendor/bundle
|
|
46
|
-
/lib/bundler/man/
|
|
47
|
-
|
|
48
|
-
# for a library or gem, you might want to ignore these files since the code is
|
|
49
|
-
# intended to run in multiple environments; otherwise, check them in:
|
|
50
|
-
# Gemfile.lock
|
|
51
|
-
# .ruby-version
|
|
52
|
-
# .ruby-gemset
|
|
53
|
-
|
|
54
|
-
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
|
55
|
-
.rvmrc
|
|
56
|
-
|
|
57
|
-
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
|
|
58
|
-
# .rubocop-https?--*
|
data/.rubocop.yml
DELETED
data/.ruby-version
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3.4.1
|
data/Gemfile
DELETED
data/Rakefile
DELETED
data/catalog-info.yaml
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
apiVersion: backstage.io/v1alpha1
|
|
2
|
-
kind: Component
|
|
3
|
-
metadata:
|
|
4
|
-
name: twiglet-ruby
|
|
5
|
-
title: Twiglet
|
|
6
|
-
description: simple logging
|
|
7
|
-
annotations:
|
|
8
|
-
rubygems.org/name: "twiglet"
|
|
9
|
-
spec:
|
|
10
|
-
type: library
|
|
11
|
-
lifecycle: production
|
|
12
|
-
owner: silversmiths
|
|
13
|
-
dependsOn:
|
|
14
|
-
- "Component:json-schema"
|
|
15
|
-
- "Component:simplycop"
|
data/docs/CODE_OF_CONDUCT.md
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
|
2
|
-
|
|
3
|
-
## Our Pledge
|
|
4
|
-
|
|
5
|
-
In the interest of fostering an open and welcoming environment, we as
|
|
6
|
-
contributors and maintainers pledge to making participation in our project and
|
|
7
|
-
our community a harassment-free experience for everyone, regardless of age, body
|
|
8
|
-
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
|
9
|
-
level of experience, education, socio-economic status, nationality, personal
|
|
10
|
-
appearance, race, religion, or sexual identity and orientation.
|
|
11
|
-
|
|
12
|
-
## Our Standards
|
|
13
|
-
|
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
|
15
|
-
include:
|
|
16
|
-
|
|
17
|
-
* Using welcoming and inclusive language
|
|
18
|
-
* Being respectful of differing viewpoints and experiences
|
|
19
|
-
* Gracefully accepting constructive criticism
|
|
20
|
-
* Focusing on what is best for the community
|
|
21
|
-
* Showing empathy towards other community members
|
|
22
|
-
|
|
23
|
-
Examples of unacceptable behavior by participants include:
|
|
24
|
-
|
|
25
|
-
* The use of sexualized language or imagery and unwelcome sexual attention or
|
|
26
|
-
advances
|
|
27
|
-
* Trolling, insulting/derogatory comments, and personal or political attacks
|
|
28
|
-
* Public or private harassment
|
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
|
30
|
-
address, without explicit permission
|
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
|
32
|
-
professional setting
|
|
33
|
-
|
|
34
|
-
## Our Responsibilities
|
|
35
|
-
|
|
36
|
-
Project maintainers are responsible for clarifying the standards of acceptable
|
|
37
|
-
behavior and are expected to take appropriate and fair corrective action in
|
|
38
|
-
response to any instances of unacceptable behavior.
|
|
39
|
-
|
|
40
|
-
Project maintainers have the right and responsibility to remove, edit, or
|
|
41
|
-
reject comments, commits, code, wiki edits, issues, and other contributions
|
|
42
|
-
that are not aligned to this Code of Conduct, or to ban temporarily or
|
|
43
|
-
permanently any contributor for other behaviors that they deem inappropriate,
|
|
44
|
-
threatening, offensive, or harmful.
|
|
45
|
-
|
|
46
|
-
## Scope
|
|
47
|
-
|
|
48
|
-
This Code of Conduct applies both within project spaces and in public spaces
|
|
49
|
-
when an individual is representing the project or its community. Examples of
|
|
50
|
-
representing a project or community include using an official project e-mail
|
|
51
|
-
address, posting via an official social media account, or acting as an appointed
|
|
52
|
-
representative at an online or offline event. Representation of a project may be
|
|
53
|
-
further defined and clarified by project maintainers.
|
|
54
|
-
|
|
55
|
-
## Enforcement
|
|
56
|
-
|
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
58
|
-
reported by contacting the project team at tech@simplybusiness.co.uk. All
|
|
59
|
-
complaints will be reviewed and investigated and will result in a response that
|
|
60
|
-
is deemed necessary and appropriate to the circumstances. The project team is
|
|
61
|
-
obligated to maintain confidentiality with regard to the reporter of an incident.
|
|
62
|
-
Further details of specific enforcement policies may be posted separately.
|
|
63
|
-
|
|
64
|
-
Project maintainers who do not follow or enforce the Code of Conduct in good
|
|
65
|
-
faith may face temporary or permanent repercussions as determined by other
|
|
66
|
-
members of the project's leadership.
|
|
67
|
-
|
|
68
|
-
## Attribution
|
|
69
|
-
|
|
70
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
|
71
|
-
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
|
72
|
-
|
|
73
|
-
[homepage]: https://www.contributor-covenant.org
|
|
74
|
-
|
|
75
|
-
For answers to common questions about this code of conduct, see
|
|
76
|
-
https://www.contributor-covenant.org/faq
|
data/docs/RATIONALE.md
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
# Twiglet
|
|
2
|
-
|
|
3
|
-
Why Twiglet? Because it's a log, only micro-sized.
|
|
4
|
-
|
|
5
|
-
This is a machine-readable first, human-readable second, JSON-based logging micro-library suitable for a wide variety of microservice uses.
|
|
6
|
-
|
|
7
|
-
This logging library is available in a cornucopia of languages:
|
|
8
|
-
* Ruby - here
|
|
9
|
-
* Python - TBC
|
|
10
|
-
* Node.js - [twiglet-node](https://github.com/simplybusiness/twiglet-node/)
|
|
11
|
-
|
|
12
|
-
## Design considerations
|
|
13
|
-
|
|
14
|
-
The design goals of this library are:
|
|
15
|
-
|
|
16
|
-
- Write logs as JSON
|
|
17
|
-
- One line per log entry
|
|
18
|
-
- One JSON object per log entry
|
|
19
|
-
- Each log entry contains a severity[1]
|
|
20
|
-
- Each log entry contains an ISO8601 UTC timestamp
|
|
21
|
-
- Each log entry contains the name of the service that wrote it
|
|
22
|
-
- Each log entry pertains to an 'event'[2]
|
|
23
|
-
- Each log entry either a) propagates an existing trace.id or b) creates a new trace.id as a correlation ID if one does not already exist[3]
|
|
24
|
-
- Stack traces are written inside a single JSON log object rather than sprawling over several lines (TODO:)
|
|
25
|
-
- Personally Identifiable Information. Don't log it.
|
|
26
|
-
|
|
27
|
-
[1] It turns out that there isn't a single authoritative standard for severity levels, we chose to go with DEBUG, INFO, WARNING, ERROR and CRITICAL as our choices.
|
|
28
|
-
[2] The ‘event’ here merely refers to the action that the customer (or employee, service, or other actor) is currently attempting. It does not refer specifically to Kafka, or CQRS, though that might be the case.
|
|
29
|
-
[3] A correlation ID is a UUIDv4 string
|
|
30
|
-
|
|
31
|
-
## Elastic Common Schema (ECS)
|
|
32
|
-
https://www.elastic.co/blog/introducing-the-elastic-common-schema
|
|
33
|
-
We have decided to standardise on the Elastic Common Schema for log attribute names. Whilst some attributes are expected for all logs, service owners should feel free to add relevant entries from the ECS schema if they are needed.
|
|
34
|
-
All application specific information is embedded in the `message` attribute JSON payload.
|
|
35
|
-
|
|
36
|
-
| Attribute name (mandatory) | Description |
|
|
37
|
-
| -------------------------- | ------------------------------- |
|
|
38
|
-
| log.level | text, one of DEBUG, INFO, WARNING, ERROR or CRITICAL. |
|
|
39
|
-
| service.name | text, the name of the service |
|
|
40
|
-
| @timestamp | text, ISO8601 UTC |
|
|
41
|
-
| message | text, human-readable summary |
|
|
42
|
-
|
|
43
|
-
| Attribute name (optional) | Description |
|
|
44
|
-
| -------------------------- | ------------------------------- |
|
|
45
|
-
| error.stack_trace | Stack trace, as JSON[4] |
|
|
46
|
-
| tags | Array, e.g. ["production"] |
|
|
47
|
-
| trace.id | text, UUIDv4 - a correlation ID |
|
|
48
|
-
| (other examples) | ... |
|
|
49
|
-
|
|
50
|
-
[4] Helper method to be provided to allow stack trace objects to be represented cleanly as JSON.
|
|
51
|
-
|
|
52
|
-
Errors should provide appropriate data using the fields from https://www.elastic.co/guide/en/ecs/current/ecs-error.html
|
|
53
|
-
If any other fields are provided in a log then these should be from the ECS schema rather than in a custom format, if at all possible.
|
|
54
|
-
|
|
55
|
-
## Example log output (prettified)
|
|
56
|
-
```json
|
|
57
|
-
{
|
|
58
|
-
"log": {
|
|
59
|
-
"level": "INFO"
|
|
60
|
-
},
|
|
61
|
-
"service": {
|
|
62
|
-
"name": "payments"
|
|
63
|
-
},
|
|
64
|
-
"@timestamp": "2020-05-07T11:51:33.976Z",
|
|
65
|
-
"event": {
|
|
66
|
-
"action": "customer-payment-accepted"
|
|
67
|
-
},
|
|
68
|
-
"trace": {
|
|
69
|
-
"id": "bf6f5ea3-614b-42f5-8e73-43deea2d1838"
|
|
70
|
-
},
|
|
71
|
-
"tags": ["staging"],
|
|
72
|
-
"message": "Pet cat Spot purchased",
|
|
73
|
-
"user": {
|
|
74
|
-
"email": "sleepyfox@gmail.com"
|
|
75
|
-
},
|
|
76
|
-
"pet": {
|
|
77
|
-
"type": "cat",
|
|
78
|
-
"name": "Spot",
|
|
79
|
-
"colour": "Ginger Tabby"
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
# Code of conduct
|
|
85
|
-
|
|
86
|
-
Please see the [code of conduct](CODE_OF_CONDUCT.md) for further info.
|
|
87
|
-
|
|
88
|
-
# License
|
|
89
|
-
|
|
90
|
-
This work is licensed under the MIT license - see the [LICENSE](../LICENSE) file for further details.
|