yabeda-http_requests 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f5c7fa7bfe5b47c64c40b7fcee8ebd9d35358a0c6f5b6dced6b5ed255282ab7
4
- data.tar.gz: 2a771d809057200cad55ffd88aa1d0f4183016c316d9c6836d7d6465b9163f5e
3
+ metadata.gz: b448798fe4c35a8a1952304f7bce322c779328698d46b3597e89bbc7e43c481e
4
+ data.tar.gz: 5a085a5d9bbe072b341dabe8b200d7aa168b1dff6223ecd5b61ab3c25113b59b
5
5
  SHA512:
6
- metadata.gz: fd615c28e1a2bd5ab02974fc6fd3e69114717d450d02453f2fdeb3748d47125c8c2a2cc2b488cd98afbf0803c6c39df7b3f86461d56273530c8ddccef02142ac
7
- data.tar.gz: 6a410a70d61d54a26eeb3efa91b69aae96e30e6beccaac3ca14c0d7022c702eeb9ac6db9d43cbb642e3792ffe0a9a32d6051ec264123a2b768c2136bc83e5fe8
6
+ metadata.gz: '08d94abf93699961c896aac0cec81eb0d2f50f76c13526a2b487e5c7835215c0deeceff78310d01df264a0b5279a63394a41bf8ca693c057d6c8956ea25f1370'
7
+ data.tar.gz: 7eb31a2e55f855b9bfce5fb3ebdec49564cbfd661aaf94d2e6a261e9c19fc0847009aa21730f69b5ffc9bcd946e7aa492f1283797c5781dafc45681eab183198
@@ -0,0 +1,33 @@
1
+ name: Lint
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ paths:
8
+ - "gemfiles/*"
9
+ - "Gemfile"
10
+ - "**/*.rb"
11
+ - "**/*.gemspec"
12
+ - ".github/workflows/lint.yml"
13
+ pull_request:
14
+ paths:
15
+ - "gemfiles/*"
16
+ - "Gemfile"
17
+ - "**/*.rb"
18
+ - "**/*.gemspec"
19
+ - ".github/workflows/lint.yml"
20
+
21
+ jobs:
22
+ rubocop:
23
+ name: "RuboCop"
24
+ runs-on: ubuntu-latest
25
+ steps:
26
+ - uses: actions/checkout@v3
27
+ - uses: ruby/setup-ruby@v1
28
+ with:
29
+ ruby-version: 3.2
30
+ bundler-cache: true
31
+ - name: Lint Ruby code with RuboCop
32
+ run: |
33
+ bundle exec rubocop
@@ -1,4 +1,4 @@
1
- name: Run tests
1
+ name: Tests
2
2
 
3
3
  on:
4
4
  pull_request:
@@ -10,38 +10,23 @@ on:
10
10
 
11
11
  jobs:
12
12
  test:
13
- name: "Run tests"
14
- if: "! contains(toJSON(github.event.commits.latest.message), '[ci skip]')"
13
+ # Skip running tests for local pull requests (use push event instead), run only for foreign ones
14
+ if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login != github.event.pull_request.base.repo.owner.login
15
+ name: 'Ruby ${{ matrix.ruby }}'
15
16
  runs-on: ubuntu-latest
16
17
  strategy:
17
18
  fail-fast: false
18
19
  matrix:
19
- include:
20
- - ruby: 3.0
21
- - ruby: 2.7
22
- - ruby: 2.6
23
- - ruby: 2.5
24
- container:
25
- image: ruby:${{ matrix.ruby }}
26
- env:
27
- CI: true
20
+ ruby:
21
+ - '2.7'
22
+ - '3.0'
23
+ - '3.1'
24
+ - '3.2'
28
25
  steps:
29
- - uses: actions/checkout@v2
30
- - uses: actions/cache@v2
26
+ - uses: actions/checkout@v3
27
+ - uses: ruby/setup-ruby@v1
31
28
  with:
32
- path: vendor/bundle
33
- key: bundle-${{ matrix.ruby }}-${{ hashFiles('**/*.gemspec') }}-${{ hashFiles('**/Gemfile') }}
34
- restore-keys: |
35
- bundle-${{ matrix.ruby }}-${{ hashFiles('**/*.gemspec') }}-${{ hashFiles('**/Gemfile') }}
36
- bundle-${{ matrix.ruby }}-
37
- - name: Upgrade Bundler to 2.0 (for older Rubies)
38
- run: gem install bundler -v '~> 2.0'
39
- - name: Bundle install
40
- run: |
41
- bundle config path vendor/bundle
42
- bundle install
43
- bundle update
44
- - name: Run Rubocop
45
- run: bundle exec rubocop
29
+ ruby-version: ${{ matrix.ruby }}
30
+ bundler-cache: true
46
31
  - name: Run RSpec
47
32
  run: bundle exec rspec
data/.rubocop.yml CHANGED
@@ -1,3 +1,6 @@
1
+ AllCops:
2
+ TargetRubyVersion: "2.5"
3
+
1
4
  Style/Documentation:
2
5
  Exclude:
3
6
  - 'example/**/*'
data/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## 0.2.1 - 2023-12-14
9
+
10
+ ### Fixed
11
+
12
+ - Ensure http method is always uppercase. [@webmat], [#6](https://github.com/yabeda-rb/yabeda-http_requests/pull/6)
13
+
8
14
  ## 0.2.0 - 2021-01-25
9
15
 
10
16
  ### Fixed
@@ -36,3 +42,4 @@ Initial release.
36
42
  [@dreikanter]: https://github.com/dreikanter "Alex Musayev"
37
43
  [@danmarcab]: https://github.com/danmarcab "Daniel Marín"
38
44
  [@Envek]: https://github.com/Envek "Andrey Novikov"
45
+ [@webmat]: https://github.com/webmat "Mathieu Martin"
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  alt="Sponsored by Amplifr" src="https://amplifr-direct.s3-eu-west-1.amazonaws.com/social_images/image/37b580d9-3668-4005-8d5a-137de3a3e77c.png" />
4
4
  </a>
5
5
 
6
- # Yabeda::HttpRequests
6
+ # ![Yabeda::HttpRequests](./yabeda-http_requests-logo.png)
7
7
 
8
8
  Built-in metrics for external services HTTP calls! This gem is a Part of the [yabeda](https://github.com/yabeda-rb/yabeda) suite.
9
9
 
@@ -10,7 +10,7 @@ module Yabeda
10
10
  {
11
11
  host: data_item.request.host,
12
12
  port: data_item.request.port,
13
- method: data_item.request.method
13
+ method: data_item.request.method.upcase
14
14
  }
15
15
  )
16
16
  end
@@ -28,7 +28,7 @@ module Yabeda
28
28
  {
29
29
  host: data_item.request.host,
30
30
  port: data_item.request.port,
31
- method: data_item.request.method,
31
+ method: data_item.request.method.upcase,
32
32
  status: data_item.response.status
33
33
  }
34
34
  )
@@ -38,7 +38,7 @@ module Yabeda
38
38
  labels = {
39
39
  host: data_item.request.host,
40
40
  port: data_item.request.port,
41
- method: data_item.request.method,
41
+ method: data_item.request.method.upcase,
42
42
  status: data_item.response.status
43
43
  }
44
44
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Yabeda
4
4
  module HttpRequests
5
- VERSION = '0.2.0'
5
+ VERSION = '0.2.1'
6
6
  end
7
7
  end
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yabeda-http_requests
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Salahutdinov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-25 00:00:00.000000000 Z
11
+ date: 2023-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sniffer
@@ -46,6 +46,7 @@ extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
48
  - ".github/workflows/build-release.yml"
49
+ - ".github/workflows/lint.yaml"
49
50
  - ".github/workflows/test.yml"
50
51
  - ".gitignore"
51
52
  - ".rspec"
@@ -61,6 +62,7 @@ files:
61
62
  - lib/yabeda/http_requests.rb
62
63
  - lib/yabeda/http_requests/sniffer.rb
63
64
  - lib/yabeda/http_requests/version.rb
65
+ - yabeda-http_requests-logo.png
64
66
  - yabeda-http_requests.gemspec
65
67
  homepage: https://github.com/yabeda-rb/yabeda-http_requests
66
68
  licenses:
@@ -83,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
85
  - !ruby/object:Gem::Version
84
86
  version: '0'
85
87
  requirements: []
86
- rubygems_version: 3.1.4
88
+ rubygems_version: 3.1.6
87
89
  signing_key:
88
90
  specification_version: 4
89
91
  summary: Monitoring of external services HTTP/HTTPS calls