Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
# the repo. Unless a later match takes precedence, members of
# @rewindio/codeowners will be requested for review when someone
# opens a pull request.
* @MarcMorinville-Rewind @jhuff078 @smandegar

* @rewindio/developers
4 changes: 2 additions & 2 deletions .github/workflows/tag-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
steps:
- uses: actions/checkout@main

- name: Set up Ruby 2.7
- name: Set up Ruby 3.2.8
uses: actions/setup-ruby@v1
with:
ruby-version: 2.7
ruby-version: 3.2.8

- name: Get version
id: get_version
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Tests

on: pull_request

jobs:
rpsec:
name: rspec tests
strategy:
fail-fast: false
matrix:
ruby: [ 3.1, 3.2, 3.3, 3.4 ]
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Run rspec tests
env:
RAILS_ENV: test
run: bundle exec rspec
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.2.8
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [3.0.0]

- Update to ruby 3.2.8
- Address deprecation warning for URI.regexp for ruby 3.2 and 3.4
- Update to bundler 2

## [2.2.1]

- Switch release to github actions
Expand Down
32 changes: 17 additions & 15 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,54 +1,56 @@
PATH
remote: .
specs:
eight_ball (2.2.0)
eight_ball (3.0.0)
awrence (~> 1.1)
logger (~> 1.7)
plissken (~> 1.2)

GEM
remote: https://rubygems.org/
specs:
ansi (1.5.0)
awrence (1.1.1)
byebug (11.1.3)
byebug (12.0.0)
coderay (1.1.3)
diff-lcs (1.3)
diff-lcs (1.6.1)
docile (1.3.2)
inch (0.8.0)
pry
sparkr (>= 0.2.0)
term-ansicolor
yard (~> 0.9.12)
method_source (1.0.0)
logger (1.7.0)
method_source (1.1.0)
plissken (1.3.1)
pry (0.13.1)
pry (0.15.2)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.9.0)
byebug (~> 11.0)
pry (~> 0.13.0)
pry-byebug (3.11.0)
byebug (~> 12.0)
pry (>= 0.13, < 0.16)
rake (13.0.1)
rspec (3.9.0)
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.9.0)
rspec-core (3.9.2)
rspec-core (3.9.3)
rspec-support (~> 3.9.3)
rspec-expectations (3.9.2)
rspec-expectations (3.9.4)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-mocks (3.9.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-support (3.9.3)
rspec-support (3.9.4)
simplecov (0.18.5)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov-console (0.7.2)
ansi
simplecov
terminal-table
simplecov-html (0.12.2)
simplecov-html (0.13.1)
sparkr (0.4.1)
sync (0.5.0)
term-ansicolor (1.7.1)
Expand All @@ -58,13 +60,13 @@ GEM
tins (1.25.0)
sync
unicode-display_width (1.7.0)
yard (0.9.25)
yard (0.9.37)

PLATFORMS
ruby

DEPENDENCIES
bundler (~> 1.17)
bundler (~> 2)
eight_ball!
inch (~> 0.8)
pry-byebug (~> 3.6)
Expand All @@ -74,4 +76,4 @@ DEPENDENCIES
simplecov-console (~> 0.4)

BUNDLED WITH
1.17.2
2.6.7
5 changes: 3 additions & 2 deletions eight_ball.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
spec.homepage = 'https://github.com/rewindio/eight_ball'
spec.license = 'MIT'

spec.required_ruby_version = '>= 2.5.0'
spec.required_ruby_version = '~> 3.1'

spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec|.github|examples)/}) }
spec.bindir = 'exe'
Expand All @@ -26,9 +26,10 @@ Gem::Specification.new do |spec|

spec.add_dependency 'awrence', '~> 1.1'
spec.add_dependency 'plissken', '~> 1.2'
spec.add_dependency 'logger', '~> 1.7'

# Development
spec.add_development_dependency 'bundler', '~> 1.17'
spec.add_development_dependency 'bundler', '~> 2'
spec.add_development_dependency 'inch', '~> 0.8'
spec.add_development_dependency 'pry-byebug', '~> 3.6'
spec.add_development_dependency 'rake', '~> 13.0'
Expand Down
5 changes: 4 additions & 1 deletion lib/eight_ball/providers/http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ module EightBall::Providers
class Http
SUPPORTED_SCHEMES = %w[http https].freeze

URI_PARSER = defined?(::URI::RFC2396_PARSER) ? ::URI::RFC2396_PARSER : ::URI::DEFAULT_PARSER
private_constant :URI_PARSER

attr_reader :marshaller

# @param uri [String] The URI to GET the {EightBall::Feature Features} from.
Expand All @@ -34,7 +37,7 @@ class Http
# refresh_policy: EightBall::Providers::RefreshPolicies::Interval.new 120
# )
def initialize(uri, options = {})
raise ArgumentError, 'Invalid HTTP/HTTPS URI provided' unless uri =~ URI.regexp(SUPPORTED_SCHEMES)
raise ArgumentError, 'Invalid HTTP/HTTPS URI provided' unless uri =~ URI_PARSER.make_regexp(SUPPORTED_SCHEMES)

@uri = URI.parse uri

Expand Down
2 changes: 1 addition & 1 deletion lib/eight_ball/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module EightBall
VERSION = '2.2.1'
VERSION = '3.0.0'
end