beaneater 1.1.3 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ffe398358517da9e09fd22e17ddd4421e7a0f2b7fa2ae816e8ad0a308466f2d8
4
- data.tar.gz: 7f9d831b5318de310462d8d4405acc0dbedb82463d5b252dec9b63fbcb39677b
3
+ metadata.gz: 27dbb64059340085f2e89899e550b2329db2043e96491ae2561b2dd4f2bb34ea
4
+ data.tar.gz: 3bf0277effe249cbbcd95e6643c6d5f7c8bd7a3efeee3a3e86f2cd6c53b59402
5
5
  SHA512:
6
- metadata.gz: 0fd5812759fa6e28a830cecacdd7a22447ce94705b044d9c28062bb868a082ea3679a29b18e3c4f421a6abf90fb3ba28551a2715eb5e8b38782a6e842548dc08
7
- data.tar.gz: 919952687b5f715aca936c4c40af28a0db741e6c7539dfdcb78c6e5834a855fb91800e5a2e5fc2cb0e201e6422b5522f7c944be787fa0ca7b145f6b3edf83091
6
+ metadata.gz: 65c0e86ba162862f43ec6bf3d4c0f45b1e30821f7bd7a891d8833be1312d256d2ec6999406bee08c5bf0e151ce2a599a7274c9179f3b64563d6168fc02f39888
7
+ data.tar.gz: ab0f650fade61572fb3b1a8c57c3e0c15634e826f1a5cd2635ef07e4270ce472f8b53c02488028b14c25a294498b3b494854d3f52e798109a61ef7cb957bc674
@@ -0,0 +1,42 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: Build Status
9
+
10
+ on:
11
+ push:
12
+ branches: [ "master" ]
13
+ pull_request:
14
+ branches: [ "master" ]
15
+
16
+ permissions:
17
+ contents: read
18
+
19
+ jobs:
20
+ test:
21
+
22
+ runs-on: ubuntu-latest
23
+ strategy:
24
+ matrix:
25
+ ruby-version: ['2.6', '2.7', '3.0', '3.1']
26
+
27
+ steps:
28
+ - uses: actions/checkout@v3
29
+ - name: Download & Extract beanstalkd
30
+ run: curl -L https://github.com/beanstalkd/beanstalkd/archive/refs/tags/v1.13.tar.gz | tar xz
31
+ - name: Make beanstalkd
32
+ run: make
33
+ working-directory: beanstalkd-1.13
34
+ - name: Set up Ruby
35
+ uses: ruby/setup-ruby@v1
36
+ with:
37
+ ruby-version: ${{ matrix.ruby-version }}
38
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
39
+ - name: Daemonize beanstalkd
40
+ run: ./beanstalkd-1.13/beanstalkd &
41
+ - name: Run tests
42
+ run: bundle exec rake test:full
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # CHANGELOG for Beaneater
2
2
 
3
+ ## 1.1.4 (March 6 2026)
4
+
5
+ * Add frozen string literal comments for Ruby 3.4 compatibility (@nearapogee)
6
+ * Update tests for Ruby 3.4.x (@nearapogee)
7
+ * Add GitHub Actions CI workflow (@Ifiht)
8
+ * Update README.md (@Ifiht)
9
+
3
10
  ## 1.1.3 (Oct 14 2022)
4
11
 
5
12
  * Fixes issue introduced in 1.1.2 re YML parsing (@pond)
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in beaneater.gemspec
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Beaneater
2
- [![Build Status](https://secure.travis-ci.org/beanstalkd/beaneater.png)](http://travis-ci.org/beanstalkd/beaneater)
2
+ ![Build Status](https://github.com/beanstalkd/beaneater/actions/workflows/ruby.yml/badge.svg)
3
3
  [![Coverage Status](https://coveralls.io/repos/beanstalkd/beaneater/badge.png?branch=master)](https://coveralls.io/r/beanstalkd/beaneater)
4
4
 
5
5
  Beaneater is the best way to interact with beanstalkd from within Ruby.
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "bundler/gem_tasks"
2
4
  require 'rake/testtask'
3
5
  require 'yard'
data/beaneater.gemspec CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # -*- encoding: utf-8 -*-
2
3
  lib = File.expand_path('../lib', __FILE__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
data/examples/demo.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'term/ansicolor'
2
4
  class String; include Term::ANSIColor; end
3
5
  def step(msg); "\n[STEP] #{msg}...".yellow; end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Beaneater
2
4
  class Configuration
3
5
  attr_accessor :default_put_delay # default delay value to put a job
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'yaml'
2
4
  require 'socket'
3
5
 
@@ -74,7 +76,7 @@ class Beaneater
74
76
  @mutex.synchronize do
75
77
  _raise_not_connected! unless connection
76
78
 
77
- command = command.force_encoding('ASCII-8BIT') if command.respond_to?(:force_encoding)
79
+ command = command.dup.force_encoding('ASCII-8BIT') if command.respond_to?(:force_encoding)
78
80
  connection.write(command.to_s + "\r\n")
79
81
  res = connection.readline
80
82
  parse_response(command, res)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Beaneater
2
4
  # Raises when a beanstalkd instance is no longer accessible.
3
5
  class NotConnected < RuntimeError; end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Beaneater
2
4
  # Exception to stop processing jobs during a `process!` loop.
3
5
  # Simply `raise AbortProcessingError` in any job process handler to stop the processing loop.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Beaneater
2
4
  # Represents job related commands.
3
5
  class Job
data/lib/beaneater/job.rb CHANGED
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'beaneater/job/record'
2
4
  require 'beaneater/job/collection'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Beaneater
2
4
  #
3
5
  # Borrowed from:
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Beaneater
2
4
  # Represents a stats hash with proper underscored keys
3
5
  class StatStruct < FasterOpenStruct
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'beaneater/stats/fast_struct'
2
4
  require 'beaneater/stats/stat_struct'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Beaneater
2
4
  # Represents collection of tube related commands.
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Beaneater
2
4
  # Beanstalk tube which contains jobs which can be inserted, reserved, et al.
3
5
  class Tube
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'beaneater/tube/record'
2
4
  require 'beaneater/tube/collection'
@@ -1,4 +1,6 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Beaneater
2
4
  # Current version of gem.
3
- VERSION = "1.1.3"
5
+ VERSION = "1.1.4"
4
6
  end
data/lib/beaneater.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'thread' unless defined?(Mutex)
2
4
 
3
5
  %w(version configuration errors connection tube job stats).each do |f|
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require File.expand_path('../test_helper', __FILE__)
2
4
 
3
5
  describe "beanstalk-client" do
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # test/connection_test.rb
2
4
 
3
5
  require File.expand_path('../test_helper', __FILE__)
@@ -101,6 +103,7 @@ describe Beaneater::Connection do
101
103
  client = Beaneater.new('127.0.0.1:11300')
102
104
  client.tubes.watch! "another"
103
105
 
106
+ $called = false
104
107
  TCPSocket.prepend Module.new {
105
108
  def readline
106
109
  if !$called
@@ -113,6 +116,8 @@ describe Beaneater::Connection do
113
116
  }
114
117
 
115
118
  assert_equal %w[another], client.tubes.watched.map(&:name)
119
+ ensure
120
+ $called = nil
116
121
  end
117
122
  end # transmit
118
123
 
data/test/errors_test.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # test/errors_test.rb
2
4
 
3
5
  require File.expand_path('../test_helper', __FILE__)
data/test/job_test.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # test/job_test.rb
2
4
 
3
5
  require File.expand_path('../test_helper', __FILE__)
@@ -10,6 +12,7 @@ describe Beaneater::Job do
10
12
 
11
13
  describe "for #bury" do
12
14
  before do
15
+ @tube.clear
13
16
  @time = Time.now.to_i
14
17
  @tube.put "foo bury #{@time}", :pri => 5
15
18
  end
data/test/jobs_test.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # test/jobs_test.rb
2
4
 
3
5
  require File.expand_path('../test_helper', __FILE__)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # test/prompt_regexp_test.rb
2
4
 
3
5
  require File.expand_path('../test_helper', __FILE__)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # test/stat_struct_test.rb
2
4
 
3
5
  require File.expand_path('../test_helper', __FILE__)
data/test/stats_test.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # test/stats_test.rb
2
4
 
3
5
  require File.expand_path('../test_helper', __FILE__)
data/test/test_helper.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  ENV["TEST"] = 'true'
2
4
  require 'rubygems'
3
5
  require 'coveralls'
data/test/tube_test.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # test/tube_test.rb
2
4
 
3
5
  require File.expand_path('../test_helper', __FILE__)
data/test/tubes_test.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # test/tubes_test.rb
2
4
 
3
5
  require File.expand_path('../test_helper', __FILE__)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaneater
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nico Taing
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-14 00:00:00.000000000 Z
11
+ date: 2026-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -87,6 +87,7 @@ executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
+ - ".github/workflows/ruby.yml"
90
91
  - ".gitignore"
91
92
  - ".travis.yml"
92
93
  - ".yardopts"
@@ -142,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
143
  - !ruby/object:Gem::Version
143
144
  version: '0'
144
145
  requirements: []
145
- rubygems_version: 3.0.8
146
+ rubygems_version: 3.5.23
146
147
  signing_key:
147
148
  specification_version: 4
148
149
  summary: Simple beanstalkd client for ruby.