Skip to content

Commit

Permalink
Merge pull request #106 from fastly/nsq-ruby-2.4.1
Browse files Browse the repository at this point in the history
Use nsq-ruby 2.4.1 instead of the older forked version of fastly-nsq-ruby.
  • Loading branch information
leklund authored Jan 18, 2024
2 parents b4abf50 + 2a660f8 commit 071c233
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 30 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Ruby

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
test:

runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['2.7', '3.0', '3.1', '3.2']

steps:
- uses: actions/checkout@v3
- name: Start NSQ
run: docker-compose up -d
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests
run: bundle exec rake
1 change: 1 addition & 0 deletions .standard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ruby_version: 2.7
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

3 changes: 1 addition & 2 deletions fastly_nsq.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ Gem::Specification.new do |gem|
gem.files = `git ls-files`.split("\n")

gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|features)/})
gem.require_paths = ["lib"]

gem.add_development_dependency "awesome_print", "~> 1.6"
Expand All @@ -31,6 +30,6 @@ Gem::Specification.new do |gem|
gem.add_development_dependency "yard"

gem.add_dependency "concurrent-ruby", "~> 1.0"
gem.add_dependency "nsq-ruby-fastly", "~> 2.4"
gem.add_dependency "nsq-ruby", "~> 2.4.1"
gem.add_dependency "priority_queue_cxx", "~> 0.3"
end
2 changes: 1 addition & 1 deletion lib/fastly_nsq/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module FastlyNsq
VERSION = "1.18.0"
VERSION = "1.18.1"
end
4 changes: 2 additions & 2 deletions spec/http/nsqd_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@
stub_request(:post, url)
data = {topic: "lol"}

FastlyNsq::Http::Nsqd.send("topic_#{verb}".to_sym, topic: "lol", base_uri: base_uri)
FastlyNsq::Http::Nsqd.send(:"topic_#{verb}", topic: "lol", base_uri: base_uri)

expect(a_request(:post, url).with(query: data)).to have_been_requested

url = "#{base_uri}/channel/#{verb}?topic=lol&channel=foo"
stub_request(:post, url)
data = {topic: "lol", channel: "foo"}

FastlyNsq::Http::Nsqd.send("channel_#{verb}".to_sym, topic: "lol", channel: "foo", base_uri: base_uri)
FastlyNsq::Http::Nsqd.send(:"channel_#{verb}", topic: "lol", channel: "foo", base_uri: base_uri)

expect(a_request(:post, url).with(query: data)).to have_been_requested
end
Expand Down

0 comments on commit 071c233

Please sign in to comment.