diff --git a/.github/workflows/rspec.yml b/.github/workflows/rspec.yml new file mode 100644 index 0000000..b531834 --- /dev/null +++ b/.github/workflows/rspec.yml @@ -0,0 +1,18 @@ +name: RSpec + +on: + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: .ruby-version + bundler-cache: true + + - run: bundle exec rspec diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..fcdb2e1 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +4.0.0 diff --git a/Gemfile.lock b/Gemfile.lock index 97443bc..2636b1a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -8,46 +8,52 @@ PATH GEM remote: https://rubygems.org/ specs: - addressable (2.8.4) - public_suffix (>= 2.0.2, < 6.0) + addressable (2.8.9) + public_suffix (>= 2.0.2, < 8.0) + bigdecimal (4.0.1) coderay (1.1.3) - crack (0.4.5) + crack (1.0.1) + bigdecimal rexml - diff-lcs (1.5.0) + diff-lcs (1.6.2) faraday (2.14.1) faraday-net_http (>= 2.0, < 3.5) json logger faraday-net_http (3.4.2) net-http (~> 0.5) - hashdiff (1.0.1) - json (2.18.1) + hashdiff (1.2.1) + io-console (0.8.2) + json (2.19.2) logger (1.7.0) - method_source (1.0.0) + method_source (1.1.0) net-http (0.9.1) uri (>= 0.11.1) - pry (0.14.2) + pry (0.16.0) coderay (~> 1.1) method_source (~> 1.0) - public_suffix (5.0.1) - rake (13.0.6) + reline (>= 0.6.0) + public_suffix (7.0.5) + rake (13.3.1) + reline (0.6.3) + io-console (~> 0.5) require_all (3.0.0) - rexml (3.4.2) - rspec (3.12.0) - rspec-core (~> 3.12.0) - rspec-expectations (~> 3.12.0) - rspec-mocks (~> 3.12.0) - rspec-core (3.12.2) - rspec-support (~> 3.12.0) - rspec-expectations (3.12.3) + rexml (3.4.4) + rspec (3.13.2) + rspec-core (~> 3.13.0) + rspec-expectations (~> 3.13.0) + rspec-mocks (~> 3.13.0) + rspec-core (3.13.6) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.5) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-mocks (3.12.5) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.8) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.12.0) - rspec-support (3.12.1) + rspec-support (~> 3.13.0) + rspec-support (3.13.7) uri (1.1.1) - webmock (3.18.1) + webmock (3.26.2) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) @@ -56,7 +62,7 @@ PLATFORMS ruby DEPENDENCIES - bundler (~> 2.1) + bundler pry rake rspec @@ -64,4 +70,4 @@ DEPENDENCIES webmock BUNDLED WITH - 2.1.4 + 4.0.7 diff --git a/lib/sendyr/client.rb b/lib/sendyr/client.rb index 93a519e..af19060 100644 --- a/lib/sendyr/client.rb +++ b/lib/sendyr/client.rb @@ -81,7 +81,7 @@ def update_subscription(email, opts = {}) end unless [:complained, :unsubscribed].include?(status) - subscribe({email: email}.merge(opts)) == true + subscribe(**{email: email}.merge(opts)) == true else false end diff --git a/sendyr.gemspec b/sendyr.gemspec index 3136f76..6dcf8f9 100644 --- a/sendyr.gemspec +++ b/sendyr.gemspec @@ -20,7 +20,7 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency "faraday" spec.add_runtime_dependency "require_all" - spec.add_development_dependency "bundler", "~> 2.1" + spec.add_development_dependency "bundler" spec.add_development_dependency "rake" spec.add_development_dependency "rspec" spec.add_development_dependency "webmock"