twiglet 3.14.2 → 3.16.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c030fe6480fd37510af2d221e39a3e873b95dbaba85d41ac326e1953020bedd5
4
- data.tar.gz: d6bfe4e632fff03c510ac0dae3d28502129765c5fa2547e8fe77c66808c68a83
3
+ metadata.gz: 8272a4a118e259a00a137081b679cab5fe7d847bc754a1cc1e2941615acda8c8
4
+ data.tar.gz: c310a6de5194731f5a734e64cd0779a8e03cd6865ec309526f4d15e60b1223fe
5
5
  SHA512:
6
- metadata.gz: 7394b7de15eb772fc1f6e87c2e2bbfd1cdbad502e04a35ff079e0d49162af1a21f540cf753baa6ac9f11db367603c3b45e55849c467cb88a03da01ceae1d8f90
7
- data.tar.gz: 1a4852c899c2362bd5c7fd0e65e0e4f8ee1ce0422999c3d9a59f9db5950519887a953c5e02358307039734b5f03d4ccd03d94ecd0997cfe5616d2ee6ae5f6636
6
+ metadata.gz: 35916cc2b78a37d4ca481f227f6aeef471586fe1ccd46baa905251ab953ff900fb9a98cc4e4da11671ce7e7ae6965c90c473d347b9fdbf4bf302ed36855f5b1e
7
+ data.tar.gz: 532fdcd8fe2aeb7b6e160d05bee2d108301e5c00443b7448190b7c982d68caabb45f23d976d3f650b491727b9efad70a7c82ca5e16ab4b777c6597196df1daae
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Twiglet
4
- VERSION = '3.14.2'
4
+ VERSION = '3.16.0'
5
5
  end
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.14.2
4
+ version: 3.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simply Business
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-08-01 00:00:00.000000000 Z
10
+ date: 2025-12-30 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: json-schema
@@ -23,8 +23,50 @@ dependencies:
23
23
  - - ">="
24
24
  - !ruby/object:Gem::Version
25
25
  version: '0'
26
+ - !ruby/object:Gem::Dependency
27
+ name: benchmark
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ - !ruby/object:Gem::Dependency
41
+ name: cgi
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'
26
54
  - !ruby/object:Gem::Dependency
27
55
  name: minitest
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '5.0'
61
+ type: :development
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: '5.0'
68
+ - !ruby/object:Gem::Dependency
69
+ name: minitest-mock
28
70
  requirement: !ruby/object:Gem::Requirement
29
71
  requirements:
30
72
  - - ">="
@@ -51,20 +93,34 @@ dependencies:
51
93
  - - ">="
52
94
  - !ruby/object:Gem::Version
53
95
  version: '0'
96
+ - !ruby/object:Gem::Dependency
97
+ name: rbs
98
+ requirement: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ type: :development
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
54
110
  - !ruby/object:Gem::Dependency
55
111
  name: simplecov
56
112
  requirement: !ruby/object:Gem::Requirement
57
113
  requirements:
58
- - - '='
114
+ - - ">="
59
115
  - !ruby/object:Gem::Version
60
- version: 0.17.1
116
+ version: '0'
61
117
  type: :development
62
118
  prerelease: false
63
119
  version_requirements: !ruby/object:Gem::Requirement
64
120
  requirements:
65
- - - '='
121
+ - - ">="
66
122
  - !ruby/object:Gem::Version
67
- version: 0.17.1
123
+ version: '0'
68
124
  - !ruby/object:Gem::Dependency
69
125
  name: simplycop
70
126
  requirement: !ruby/object:Gem::Requirement
@@ -81,33 +137,13 @@ dependencies:
81
137
  version: '0'
82
138
  description: Like a log, only smaller.
83
139
  email:
84
- - tech@simplybusiness.co.uk
140
+ - opensourcetech+rubygems@simplybusiness.co.uk
85
141
  executables: []
86
142
  extensions: []
87
143
  extra_rdoc_files: []
88
144
  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
145
  - LICENSE
101
146
  - 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
147
  - lib/hash_extensions.rb
112
148
  - lib/twiglet/error_serialiser.rb
113
149
  - lib/twiglet/formatter.rb
@@ -116,18 +152,14 @@ files:
116
152
  - lib/twiglet/validation_schema.json
117
153
  - lib/twiglet/validator.rb
118
154
  - 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
155
  homepage: https://github.com/simplybusiness/twiglet-ruby
128
156
  licenses:
129
- - Copyright SimplyBusiness
130
- metadata: {}
157
+ - MIT
158
+ metadata:
159
+ source_code_uri: https://github.com/simplybusiness/twiglet-ruby
160
+ changelog_uri: https://github.com/simplybusiness/twiglet-ruby/releases
161
+ bug_tracker_uri: https://github.com/simplybusiness/twiglet-ruby/issues
162
+ documentation_uri: https://github.com/simplybusiness/twiglet-ruby
131
163
  rdoc_options: []
132
164
  require_paths:
133
165
  - lib
@@ -135,10 +167,10 @@ required_ruby_version: !ruby/object:Gem::Requirement
135
167
  requirements:
136
168
  - - ">="
137
169
  - !ruby/object:Gem::Version
138
- version: '3.1'
170
+ version: '3.2'
139
171
  - - "<"
140
172
  - !ruby/object:Gem::Version
141
- version: '3.5'
173
+ version: '4.1'
142
174
  required_rubygems_version: !ruby/object:Gem::Requirement
143
175
  requirements:
144
176
  - - ">="
data/.github/CODEOWNERS DELETED
@@ -1,4 +0,0 @@
1
- # Add your project owners info here
2
- # More information: https://help.github.com/articles/about-codeowners/
3
- * @simplybusiness/silversmiths
4
-
@@ -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
- })
@@ -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
@@ -1,14 +0,0 @@
1
- inherit_gem:
2
- simplycop:
3
- - .simplycop.yml
4
- - .simplycop_performance.yml
5
-
6
- AllCops:
7
- TargetRubyVersion: 3.1
8
-
9
- Metrics/BlockLength:
10
- Max: 250
11
- Metrics/AbcSize:
12
- Max: 20
13
- Metrics/MethodLength:
14
- Max: 25
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 3.4.1
data/Gemfile DELETED
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source 'https://rubygems.org'
4
-
5
- gemspec
data/Rakefile DELETED
@@ -1,7 +0,0 @@
1
- require 'rake/testtask'
2
-
3
- Rake::TestTask.new do |t|
4
- t.libs << "test"
5
- t.test_files = FileList['test/test_coverage.rb', 'test/*_test.rb', 'examples/rack/request_logger_test.rb']
6
- t.verbose = true
7
- end
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"
@@ -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