Skip to content

Commit

Permalink
Modernize gem.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Apr 9, 2024
1 parent e915c9a commit 7bc6d58
Show file tree
Hide file tree
Showing 12 changed files with 48 additions and 155 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ root = true
[*]
indent_style = tab
indent_size = 2

[*.{yml,yaml}]
indent_style = space
indent_size = 2
10 changes: 5 additions & 5 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
- macos

ruby:
- "3.2"
- "3.3"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby}}
Expand All @@ -34,7 +34,7 @@ jobs:
timeout-minutes: 5
run: bundle exec bake test

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: coverage-${{matrix.os}}-${{matrix.ruby}}
path: .covered.db
Expand All @@ -44,10 +44,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
ruby-version: "3.3"
bundler-cache: true

- uses: actions/download-artifact@v3
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
branches:
- main

# Allows you to run this workflow manually from the Actions tab:
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages:
permissions:
contents: read
Expand All @@ -28,11 +25,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
ruby-version: "3.3"
bundler-cache: true

- name: Installing packages
Expand All @@ -43,7 +40,7 @@ jobs:
run: bundle exec bake utopia:project:static --force no

- name: Upload documentation artifact
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v2
with:
path: docs

Expand All @@ -58,4 +55,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v3
4 changes: 2 additions & 2 deletions .github/workflows/test-external.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ jobs:
- macos

ruby:
- "3.0"
- "3.1"
- "3.2"
- "3.3"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby}}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
- macos

ruby:
- "3.0"
- "3.1"
- "3.2"
- "3.3"

experimental: [false]

Expand All @@ -39,7 +39,7 @@ jobs:
experimental: true

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{matrix.ruby}}
Expand Down
133 changes: 0 additions & 133 deletions conduct.md

This file was deleted.

5 changes: 5 additions & 0 deletions examples/testing/app.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2024, by Samuel Williams.

require 'metrics/provider'

class MyApplication
Expand Down
4 changes: 4 additions & 0 deletions examples/testing/test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/usr/bin/env sus
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2024, by Samuel Williams.

ENV['METRICS_BACKEND'] ||= 'metrics/backend/test'

Expand Down
8 changes: 7 additions & 1 deletion gems.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# frozen_string_literal: true

# Released under the MIT License.
# Copyright, 2021-2022, by Samuel Williams.
# Copyright, 2021-2024, by Samuel Williams.

source 'https://rubygems.org'

gemspec

group :test do
gem "sus", "~> 0.13"
gem "covered", "~> 0.16"

gem "bake-test", "~> 0.2"
gem "bake-test-external", "~> 0.2"

gem "console"
end

Expand Down
2 changes: 1 addition & 1 deletion license.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License

Copyright, 2021-2023, by Samuel Williams.
Copyright, 2021-2024, by Samuel Williams.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 6 additions & 4 deletions metrics.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ Gem::Specification.new do |spec|

spec.homepage = "https://github.com/socketry/metrics"

spec.metadata = {
"documentation_uri" => "https://socketry.github.io/metrics/",
"source_code_uri" => "https://github.com/socketry/metrics.git",
}

spec.files = Dir.glob(['{bake,lib}/**/*', '*.md'], File::FNM_DOTMATCH, base: __dir__)

spec.add_development_dependency "bake-test", "~> 0.2"
spec.add_development_dependency "bake-test-external", "~> 0.2"
spec.add_development_dependency "covered", "~> 0.16"
spec.add_development_dependency "sus", "~> 0.13"
spec.required_ruby_version = ">= 3.1"
end
8 changes: 8 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ We welcome contributions to this project.
4. Push to the branch (`git push origin my-new-feature`).
5. Create new Pull Request.

### Developer Certificate of Origin

This project uses the [Developer Certificate of Origin](https://developercertificate.org/). All contributors to this project must agree to this document to have their contributions accepted.

### Contributor Covenant

This project is governed by the [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.

## See Also

- [metrics-backend-datadog](https://github.com/socketry/metrics-backend-datadog) — A Metrics backend for Datadog.
Expand Down

0 comments on commit 7bc6d58

Please sign in to comment.