ruby_http_client 3.5.3 → 3.5.4

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: cf298c885c0b0dca01df98cb03d9009ddb3b203fdb8a092a098358249e52a1fb
4
- data.tar.gz: 42140a3b6dfd2fe8513ee82aa36c9e44f25ea6bcb8e8366d49e84e96fe39324a
3
+ metadata.gz: 5aafc3cc7f305da17f92cfb2bdb0e60ca5a9d7c076bc688fc8559b737049f5c3
4
+ data.tar.gz: 4ee430b196d2a94e15d96d1762d16075957875561fe6775e11929e68ea11e854
5
5
  SHA512:
6
- metadata.gz: 501e371ce784a7ca64d3cd1459ccf6c84424fd581c17403a1e59ee1f9d9ad21660ae1e8b815cae11ddbae81e3ec96ea5c9a8d1f7cbe21af223875f9907b64141
7
- data.tar.gz: ccd94079a82b5eb2e25974daf3ec6e8d768605ce174400e8f2fe33f8ba3696509d0c42bf9f7fb3e5fbfd4586a0c52082a33aa9f5e07b11c7b8db901921732743
6
+ metadata.gz: 9a62a58ee3666b835c1751524c46aa5b6af8897decb2ea7dbcc90de1524b9177c5f9c2db3a35a3952e108c25586df927f593dbc836a4676fdc74a9955ee61e3f
7
+ data.tar.gz: 2a6b432306346814a20994b0134510cc90ba083549f1ac693851ab5b3159abb1409550e9b0b30033532421c3e36c5b8ad95a5ef83121ebe3713b144555798d92
@@ -0,0 +1,99 @@
1
+ name: Test and Deploy
2
+ on:
3
+ push:
4
+ branches: [ '*' ]
5
+ tags: [ '*' ]
6
+ pull_request:
7
+ branches: [ main ]
8
+ schedule:
9
+ # Run automatically at 8AM PST Monday-Friday
10
+ - cron: '0 15 * * 1-5'
11
+ workflow_dispatch:
12
+
13
+ jobs:
14
+ test:
15
+ name: Test
16
+ runs-on: ubuntu-latest
17
+ timeout-minutes: 20
18
+ strategy:
19
+ matrix:
20
+ ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', 'jruby-9.2' ]
21
+ steps:
22
+ - name: Checkout ruby-http-client
23
+ uses: actions/checkout@v2
24
+ with:
25
+ fetch-depth: 0
26
+
27
+ - name: Set up Ruby
28
+ uses: ruby/setup-ruby@v1
29
+ with:
30
+ ruby-version: ${{ matrix.ruby }}
31
+ bundler-cache: true
32
+
33
+ - run: make install
34
+
35
+ - name: Set up linter
36
+ run: bundle add rubocop --version "~> 1.24.1" --group "development" --skip-install
37
+ if: ${{ matrix.ruby != '2.4' }}
38
+
39
+ - run: bundle install --with development
40
+
41
+ - name: Run linter
42
+ run: bundle exec rake rubocop
43
+ if: ${{ matrix.ruby != '2.4' }}
44
+
45
+ - name: Run tests
46
+ run: make test
47
+
48
+ deploy:
49
+ name: Deploy
50
+ if: success() && github.ref_type == 'tag'
51
+ needs: [ test ]
52
+ runs-on: ubuntu-latest
53
+ steps:
54
+ - name: Checkout ruby-http-client
55
+ uses: actions/checkout@v2
56
+ with:
57
+ fetch-depth: 0
58
+
59
+ - name: Set up Ruby
60
+ uses: ruby/setup-ruby@v1
61
+ with:
62
+ ruby-version: 3.1
63
+ bundler-cache: true
64
+
65
+ - run: make install
66
+
67
+ - name: Create GitHub Release
68
+ uses: sendgrid/dx-automator/actions/release@main
69
+ env:
70
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71
+
72
+ - name: Publish to Rubygems
73
+ env:
74
+ GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_AUTH_TOKEN }}
75
+ run: |
76
+ mkdir -p $HOME/.gem
77
+ touch $HOME/.gem/credentials
78
+ chmod 0600 $HOME/.gem/credentials
79
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
80
+ gem build *.gemspec
81
+ gem push *.gem
82
+
83
+ notify-on-failure:
84
+ name: Slack notify on failure
85
+ if: failure() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || github.ref_type == 'tag')
86
+ needs: [ test, deploy ]
87
+ runs-on: ubuntu-latest
88
+ steps:
89
+ - uses: rtCamp/action-slack-notify@v2
90
+ env:
91
+ SLACK_COLOR: failure
92
+ SLACK_ICON_EMOJI: ':github:'
93
+ SLACK_MESSAGE: ${{ format('Test *{0}*, Deploy *{1}*, {2}/{3}/actions/runs/{4}', needs.test.result, needs.deploy.result, github.server_url, github.repository, github.run_id) }}
94
+ SLACK_TITLE: Action Failure - ${{ github.repository }}
95
+ SLACK_USERNAME: GitHub Actions
96
+ SLACK_MSG_AUTHOR: twilio-dx
97
+ SLACK_FOOTER: Posted automatically using GitHub Actions
98
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
99
+ MSG_MINIMAL: true
data/.rubocop.yml CHANGED
@@ -1,3 +1,5 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
1
3
  AllCops:
2
4
  Exclude:
3
5
  - bin/**/*
@@ -44,4 +46,4 @@ Style/StringLiterals:
44
46
  Style/NumericLiterals:
45
47
  Enabled: false
46
48
  Style/FrozenStringLiteralComment:
47
- Enabled: false
49
+ Enabled: false
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,65 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2022-01-25 23:29:33 UTC using RuboCop version 1.22.2.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ # Configuration parameters: Include.
11
+ # Include: **/*.gemspec
12
+ Gemspec/RequiredRubyVersion:
13
+ Exclude:
14
+ - 'ruby_http_client.gemspec'
15
+
16
+ # Offense count: 1
17
+ # Cop supports --auto-correct.
18
+ # Configuration parameters: AllowAliasSyntax, AllowedMethods.
19
+ # AllowedMethods: alias_method, public, protected, private
20
+ Layout/EmptyLinesAroundAttributeAccessor:
21
+ Exclude:
22
+ - 'lib/ruby_http_client.rb'
23
+
24
+ # Offense count: 1
25
+ # Cop supports --auto-correct.
26
+ # Configuration parameters: EnforcedStyle.
27
+ # SupportedStyles: final_newline, final_blank_line
28
+ Layout/TrailingEmptyLines:
29
+ Exclude:
30
+ - 'Gemfile'
31
+
32
+ # Offense count: 1
33
+ Lint/MissingSuper:
34
+ Exclude:
35
+ - 'test/test_ruby_http_client.rb'
36
+
37
+ # Offense count: 1
38
+ # Cop supports --auto-correct.
39
+ Lint/RedundantCopDisableDirective:
40
+ Exclude:
41
+ - 'lib/ruby_http_client.rb'
42
+
43
+ # Offense count: 1
44
+ # Cop supports --auto-correct.
45
+ # Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
46
+ # SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
47
+ Style/HashSyntax:
48
+ Exclude:
49
+ - 'Gemfile'
50
+
51
+ # Offense count: 4
52
+ # Cop supports --auto-correct.
53
+ # Configuration parameters: Mode.
54
+ Style/StringConcatenation:
55
+ Exclude:
56
+ - 'lib/ruby_http_client.rb'
57
+ - 'test/test_ruby_http_client.rb'
58
+
59
+ # Offense count: 2
60
+ # Cop supports --auto-correct.
61
+ # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
62
+ # SupportedStyles: single_quotes, double_quotes
63
+ Style/StringLiterals:
64
+ Exclude:
65
+ - 'Gemfile'
data/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file.
3
3
 
4
4
  This project adheres to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ [2022-02-09] Version 3.5.4
7
+ --------------------------
8
+ **Library - Chore**
9
+ - [PR #129](https://github.com/sendgrid/ruby-http-client/pull/129): upgrade supported language versions. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
10
+ - [PR #128](https://github.com/sendgrid/ruby-http-client/pull/128): add gh release to workflow. Thanks to [@shwetha-manvinkurke](https://github.com/shwetha-manvinkurke)!
11
+ - [PR #127](https://github.com/sendgrid/ruby-http-client/pull/127): migrate to gh actions. Thanks to [@beebzz](https://github.com/beebzz)!
12
+
13
+
6
14
  [2022-01-12] Version 3.5.3
7
15
  --------------------------
8
16
  **Library - Chore**
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ![SendGrid Logo](twilio_sendgrid_logo.png)
2
2
 
3
- [![BuildStatus](https://travis-ci.com/sendgrid/ruby-http-client.svg?branch=main)](https://travis-ci.com/sendgrid/ruby-http-client)
3
+ [![BuildStatus](https://github.com/sendgrid/ruby-http-client/actions/workflows/test-and-deploy.yml/badge.svg)](https://github.com/sendgrid/ruby-http-client/actions/workflows/test-and-deploy.yml)
4
4
  [![Gem Version](https://badge.fury.io/rb/ruby_http_client.svg)](https://badge.fury.io/rb/ruby_http_client)
5
5
  [![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
6
6
  [![Twitter Follow](https://img.shields.io/twitter/follow/sendgrid.svg?style=social&label=Follow)](https://twitter.com/sendgrid)
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = 'ruby_http_client'
6
- spec.version = '3.5.3'
6
+ spec.version = '3.5.4'
7
7
  spec.authors = ['Elmer Thomas']
8
8
  spec.email = 'help@twilio.com'
9
9
  spec.summary = 'A simple REST client'
@@ -18,6 +18,5 @@ Gem::Specification.new do |spec|
18
18
  spec.add_development_dependency 'codecov'
19
19
  spec.add_development_dependency 'minitest'
20
20
  spec.add_development_dependency 'rake'
21
- spec.add_development_dependency 'rubocop', '~> 0.88.0'
22
21
  spec.add_development_dependency 'simplecov', '~> 0.18.5'
23
22
  end
data/test/test_helper.rb CHANGED
@@ -1,4 +1,4 @@
1
- if ENV['CI'] == 'true'
1
+ if RUBY_VERSION.equal?('2.7')
2
2
  require 'simplecov'
3
3
  SimpleCov.start
4
4
 
@@ -356,12 +356,8 @@ class TestClient < Minitest::Test
356
356
  assert(File.file?('./.gitignore'))
357
357
  end
358
358
 
359
- def test_travis_exists
360
- assert(File.file?('./.travis.yml'))
361
- end
362
-
363
- def test_codeclimate_exists
364
- assert(File.file?('./.codeclimate.yml'))
359
+ def test_gh_actions_exists
360
+ assert(File.file?('./.github/workflows/test-and-deploy.yml'))
365
361
  end
366
362
 
367
363
  def test_changelog_exists
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_http_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.3
4
+ version: 3.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elmer Thomas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-12 00:00:00.000000000 Z
11
+ date: 2022-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: codecov
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: rubocop
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: 0.88.0
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: 0.88.0
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: simplecov
71
57
  requirement: !ruby/object:Gem::Requirement
@@ -86,12 +72,12 @@ executables: []
86
72
  extensions: []
87
73
  extra_rdoc_files: []
88
74
  files:
89
- - ".codeclimate.yml"
90
75
  - ".env_sample"
91
76
  - ".github/ISSUE_TEMPLATE/config.yml"
77
+ - ".github/workflows/test-and-deploy.yml"
92
78
  - ".gitignore"
93
79
  - ".rubocop.yml"
94
- - ".travis.yml"
80
+ - ".rubocop_todo.yml"
95
81
  - CHANGELOG.md
96
82
  - CODE_OF_CONDUCT.md
97
83
  - CONTRIBUTING.md
@@ -133,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
119
  - !ruby/object:Gem::Version
134
120
  version: '0'
135
121
  requirements: []
136
- rubygems_version: 3.0.8
122
+ rubygems_version: 3.3.3
137
123
  signing_key:
138
124
  specification_version: 4
139
125
  summary: A simple REST client
data/.codeclimate.yml DELETED
@@ -1,16 +0,0 @@
1
- ---
2
- plugins:
3
- duplication:
4
- enabled: false
5
- config:
6
- languages:
7
- - ruby
8
- fixme:
9
- enabled: false
10
- phpmd:
11
- enabled: false
12
- radon:
13
- enabled: false
14
- rubocop:
15
- enabled: true
16
- channel: rubocop-0-48
data/.travis.yml DELETED
@@ -1,36 +0,0 @@
1
- env:
2
- global:
3
- - CC_TEST_REPORTER_ID=$CC_TEST_REPORTER_ID
4
- language: ruby
5
- rvm:
6
- - 2.7
7
- - 2.6
8
- - 2.5
9
- - 2.4
10
- - jruby-9.2
11
- before_script:
12
- - make install
13
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
14
- > ./cc-test-reporter
15
- - chmod +x ./cc-test-reporter
16
- - "./cc-test-reporter before-build"
17
- script:
18
- - make test
19
- after_script:
20
- - "./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT"
21
- deploy:
22
- provider: rubygems
23
- api_key: "$RUBYGEMS_API_KEY"
24
- gem: ruby_http_client
25
- on:
26
- tags: true
27
- rvm: '2.4'
28
- skip_cleanup: true
29
- notifications:
30
- slack:
31
- if: branch = main
32
- on_pull_requests: false
33
- on_success: never
34
- on_failure: change
35
- rooms:
36
- secure: OMWyUuj4Fu3n39qPhlNJlVoxhHYwS/xEC3sTtCztp1cc6eIfifletIwABRtGwoJw5ZyZ8tk3EZZjYu8iMVCyZzqAXK7e8OS1j8TW7gTs55j8BbZzgH00PMLa2/jQ/KJpF/0BqWsuexnApeJbuZVkIkOln6IzEFTUp8GKfoA3jXA4fxnfpE/hXQvLL/zw5a/qhv4Z1gl+aTN+LGW4M8dFvgTpEP993c7MCdXH+FcYhZKeDlQVtoEFc1NvcanjQmjZ6to99jAQM1VXBVqGrSowf7V525TNJy9MJ/txh1Y3scJI/eBtLIx+OTjGrL0AGvM+y7wq8U8WG8ssf83KogLTpvAOQXtWPZMO50q/n4D9a8eiIy5sZMAg+CafOovlyRqCS6tvYfmmSnOy+a9TyrQ1EGR7dT0dFpsYxEIkudcnxsWZ7sdboGrCdR92aotxp5+QLeDoOA3yeLiySqORUgG+JJ0xawftJnPnOC5qNzzLhQAf8bD31C1OnVqdE2DeKlzaCrTp4LBIVX5NNT707L62U6DZQCEOv1G/752n3NRUY9Trw+L+j8bq3vnPC2ER5hN9df0J3zvUfw/GXQd20OXRbv+nTU82uYNbpmevswyb/1H42NW/w82f3yOcic+lzF5XXLb8ZHbjn/sAt//7q7rDy2o20htzcK3we29LMIpf4pA=