Skip to content

Commit

Permalink
Merge pull request #7 from DataDog/lloeki/publish-gem
Browse files Browse the repository at this point in the history
Add publishing via Trusted Publishers
  • Loading branch information
lloeki authored Oct 22, 2024
2 parents aa549dc + c88cb07 commit 4400972
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 5 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Publish Gem

on: workflow_dispatch

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: '3.2.4'
- uses: rubygems/release-gem@v1
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,28 @@ Run the following command to start a new Docker container with `catadog`.
docker run --rm -d --name catadog ghcr.io/datadog/catadog
```

### or Ruby Bundler
### Global command

Run the following commands to install and run `catadog` locally.

```
gem install catadog
catadog
```

### Per project via a Gemfile

```
cat > Gemfile <<'EOF'
source 'https://rubygems.org'
gem 'catadog'
EOF
bundle install
catadog
```

### For `catadog` development

Run the following commands to install and run `catadog` locally.

Expand Down
5 changes: 1 addition & 4 deletions bin/catadog
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ require "rack"
require "sinatra/base"
require "net/http"
require "uri"
require "pry"
require "json"
require "msgpack"
require "base64"
require "date"
require "pathname"
require "stringio"

class WEBrick::HTTPServlet::ProcHandler
# rubocop:disable Style/Alias
Expand Down Expand Up @@ -290,9 +290,6 @@ module Datadog
def handler(req, res)
# https://github.com/rack/rack/blob/8f5c885f7e0427b489174a55e6d88463173f22d2/SPEC.rdoc

# binding.pry if /config/.match?(req.path_info)
# binding.pry if /traces/.match?(req.path_info)

env = {}

env["REQUEST_METHOD"] = req.request_method
Expand Down

0 comments on commit 4400972

Please sign in to comment.