resque_unit_without_mock 0.1.1 → 0.1.2

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: ddffe4d10ef12e7c7e2688df15ae8135e155a23da406f88a0dd841f6070055a3
4
- data.tar.gz: 70cf10927580740cdf8fe75b7ade65555dd008a5e31f1e0eb269febbd5bc7e9d
3
+ metadata.gz: f0480a122f77d1d18286cb621fbeb409b98756bf1b73b03eee9797f7d0b34d50
4
+ data.tar.gz: 50f4fe0dee23957fc0564d72272d24d7422a58d0d651ea230247e5f3e34ca040
5
5
  SHA512:
6
- metadata.gz: e7d42c07072e09580fab964d55b05594e3b2c854905a37d2820d137d79e64d618b8c4aa4d5ff528e91566c462a8f2d3f0b74098cba9051736690b260b9d0f2db
7
- data.tar.gz: 1c4e0d41cab06cf2d9a8e5458ff10c0be9bca309b70f94f619e0cf2fbed636e857ccca71b9d071633f9c4b93a02f927289425cb3132c77b72cc6fdd63ca099a8
6
+ metadata.gz: 6a5cff13ad9f68f3c72f9f64363665f1521f19d79c9008a843ea530e30f01b87a7349c3c5b4d885829c7cbcbefa85293fb7dd39bb5c74bc5f86b0bf685c83052
7
+ data.tar.gz: 28de5f6591a912e18faef29a8f2816213c4520f3b48e320d668e7daceadbb98213521ccf5fb64483dbd4df77e5b88057610bf23a50179733aca08e3136b1acfa
@@ -0,0 +1,33 @@
1
+ name: Ruby
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+ types:
9
+ - opened
10
+ - synchronize
11
+ - reopened
12
+
13
+ jobs:
14
+ test:
15
+ runs-on: ubuntu-latest
16
+ timeout-minutes: 5
17
+ strategy:
18
+ matrix:
19
+ ruby-version: ['2.7', '3.0', '3.1']
20
+ steps:
21
+ - uses: actions/checkout@v3
22
+ - name: Set up Ruby
23
+ uses: ruby/setup-ruby@v1
24
+ with:
25
+ ruby-version: ${{ matrix.ruby-version }}
26
+ bundler-cache: true
27
+ - name: Install Redis
28
+ run: sudo apt-get install -y redis-tools redis-server
29
+ - name: Verify that redis is up
30
+ run: redis-cli ping
31
+ - name: Run tests
32
+ run: |-
33
+ bundle exec rake
data/Dockerfile ADDED
@@ -0,0 +1,6 @@
1
+ FROM ruby:3.0
2
+ WORKDIR /app
3
+ RUN apt-get update && apt-get install redis -y
4
+ RUN bundle config set --global force_ruby_platform true
5
+ RUN gem i bundler
6
+ COPY . .
data/Gemfile.lock CHANGED
@@ -1,49 +1,53 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- resque_unit_without_mock (0.1.0)
4
+ resque_unit_without_mock (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- minitest (5.11.3)
9
+ connection_pool (2.3.0)
10
+ minitest (5.16.3)
10
11
  minitest-hooks (1.5.0)
11
12
  minitest (> 5.3)
12
- mono_logger (1.1.0)
13
- multi_json (1.13.1)
14
- mustermann (1.0.3)
15
- rack (2.0.6)
16
- rack-protection (2.0.5)
13
+ mono_logger (1.1.1)
14
+ multi_json (1.15.0)
15
+ mustermann (3.0.0)
16
+ ruby2_keywords (~> 0.0.1)
17
+ rack (2.2.4)
18
+ rack-protection (3.0.3)
17
19
  rack
18
- rake (10.5.0)
19
- redis (4.1.0)
20
- redis-namespace (1.6.0)
21
- redis (>= 3.0.4)
22
- resque (2.0.0)
20
+ rake (13.0.6)
21
+ redis (5.0.5)
22
+ redis-client (>= 0.9.0)
23
+ redis-client (0.11.2)
24
+ connection_pool
25
+ redis-namespace (1.9.0)
26
+ redis (>= 4)
27
+ resque (2.4.0)
23
28
  mono_logger (~> 1.0)
24
29
  multi_json (~> 1.0)
25
30
  redis-namespace (~> 1.6)
26
31
  sinatra (>= 0.9.2)
27
- vegas (~> 0.1.2)
28
- sinatra (2.0.5)
29
- mustermann (~> 1.0)
30
- rack (~> 2.0)
31
- rack-protection (= 2.0.5)
32
+ ruby2_keywords (0.0.5)
33
+ sinatra (3.0.3)
34
+ mustermann (~> 3.0)
35
+ rack (~> 2.2, >= 2.2.4)
36
+ rack-protection (= 3.0.3)
32
37
  tilt (~> 2.0)
33
- tilt (2.0.9)
34
- vegas (0.1.11)
35
- rack (>= 1.0.0)
38
+ tilt (2.0.11)
36
39
 
37
40
  PLATFORMS
38
41
  ruby
42
+ x86_64-linux
39
43
 
40
44
  DEPENDENCIES
41
- bundler (~> 1.17)
42
- minitest (~> 5.0)
45
+ bundler
46
+ minitest
43
47
  minitest-hooks
44
- rake (~> 10.0)
48
+ rake
45
49
  resque
46
50
  resque_unit_without_mock!
47
51
 
48
52
  BUNDLED WITH
49
- 1.17.1
53
+ 2.3.26
data/README.md CHANGED
@@ -35,6 +35,11 @@ end
35
35
  Resque.singleton_class.prepend(ResqueHelpersExt)
36
36
  ```
37
37
 
38
+ ## Development
39
+ * docker compose run --rm app bash
40
+ * bundle install
41
+ * bundle exec rake
42
+
38
43
  ## License
39
44
 
40
45
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,11 @@
1
+ version: '3'
2
+ services:
3
+ app:
4
+ build: .
5
+ volumes:
6
+ - './:/app:delegated'
7
+ - bundle_path:/bundle
8
+ environment:
9
+ - BUNDLE_PATH=/bundle
10
+ volumes:
11
+ bundle_path:
@@ -17,7 +17,7 @@ module ResqueUnitWithoutMock::Scheduler
17
17
  @@enqueue_ats ||= {}
18
18
  @@enqueue_ats[queue] ||= []
19
19
  @@enqueue_ats[queue] << { timestamp: timestamp, klass: klass, args: args }
20
- Resque.enqueue(klass, *args)
20
+ Resque.enqueue_to(queue, klass, *args)
21
21
  end
22
22
 
23
23
  def enqueue_ats(queue)
@@ -1,6 +1,13 @@
1
1
  module ResqueUnitWithoutMock::SchedulerAssertions
2
2
  def assert_queued_at(expected_timestamp, klass)
3
- queue = Resque.queue_for(klass)
3
+ assert_queued_at_with_queue(Resque.queue_for(klass), expected_timestamp, klass)
4
+ end
5
+
6
+ def assert_not_queued_at(expected_timestamp, klass)
7
+ assert_not_queued_at_with_queue(Resque.queue_for(klass), expected_timestamp, klass)
8
+ end
9
+
10
+ def assert_queued_at_with_queue(queue, expected_timestamp, klass)
4
11
  result = Resque.enqueue_ats(queue).detect { |hash| hash[:timestamp] <= expected_timestamp && hash[:klass] == klass }
5
12
  assert(
6
13
  result,
@@ -8,8 +15,7 @@ module ResqueUnitWithoutMock::SchedulerAssertions
8
15
  )
9
16
  end
10
17
 
11
- def assert_not_queued_at(expected_timestamp, klass)
12
- queue = Resque.queue_for(klass)
18
+ def assert_not_queued_at_with_queue(queue, expected_timestamp, klass)
13
19
  result = Resque.enqueue_ats(queue).detect { |hash| hash[:timestamp] <= expected_timestamp && hash[:klass] == klass }
14
20
  assert(
15
21
  !result,
@@ -1,3 +1,3 @@
1
1
  module ResqueUnitWithoutMock
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -1,4 +1,3 @@
1
-
2
1
  lib = File.expand_path("../lib", __FILE__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require "resque_unit_without_mock/version"
@@ -11,8 +10,9 @@ Gem::Specification.new do |spec|
11
10
 
12
11
  spec.summary = %q{resque_unit(without mock)}
13
12
  spec.description = spec.summary
14
- spec.homepage = "https://github.com/jiikko/resque_unit_without_mock"
13
+ spec.homepage = "https://github.com/ubiregiinc/resque_unit_without_mock"
15
14
  spec.license = "MIT"
15
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
16
16
 
17
17
  # Specify which files should be added to the gem when it is released.
18
18
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -23,9 +23,9 @@ Gem::Specification.new do |spec|
23
23
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
24
  spec.require_paths = ["lib"]
25
25
 
26
- spec.add_development_dependency "bundler", "~> 1.17"
27
- spec.add_development_dependency "rake", "~> 10.0"
28
- spec.add_development_dependency "minitest", "~> 5.0"
26
+ spec.add_development_dependency "bundler"
27
+ spec.add_development_dependency "rake"
28
+ spec.add_development_dependency "minitest"
29
29
  spec.add_development_dependency "minitest-hooks"
30
30
  spec.add_development_dependency "resque"
31
31
  end
metadata CHANGED
@@ -1,57 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque_unit_without_mock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - jiikko
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-08-08 00:00:00.000000000 Z
11
+ date: 2024-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.17'
19
+ version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.17'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: minitest
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '5.0'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '5.0'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: minitest-hooks
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -87,8 +87,9 @@ executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
+ - ".github/workflows/ruby.yml"
90
91
  - ".gitignore"
91
- - ".travis.yml"
92
+ - Dockerfile
92
93
  - Gemfile
93
94
  - Gemfile.lock
94
95
  - LICENSE.txt
@@ -96,6 +97,7 @@ files:
96
97
  - Rakefile
97
98
  - bin/console
98
99
  - bin/setup
100
+ - docker-compose.yml
99
101
  - lib/resque_unit_without_mock.rb
100
102
  - lib/resque_unit_without_mock/resque_assertions.rb
101
103
  - lib/resque_unit_without_mock/resque_helpers.rb
@@ -104,11 +106,11 @@ files:
104
106
  - lib/resque_unit_without_mock/version.rb
105
107
  - lib/resque_unit_without_mock_scheduler.rb
106
108
  - resque_unit_without_mock.gemspec
107
- homepage: https://github.com/jiikko/resque_unit_without_mock
109
+ homepage: https://github.com/ubiregiinc/resque_unit_without_mock
108
110
  licenses:
109
111
  - MIT
110
112
  metadata: {}
111
- post_install_message:
113
+ post_install_message:
112
114
  rdoc_options: []
113
115
  require_paths:
114
116
  - lib
@@ -116,15 +118,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
116
118
  requirements:
117
119
  - - ">="
118
120
  - !ruby/object:Gem::Version
119
- version: '0'
121
+ version: 2.7.0
120
122
  required_rubygems_version: !ruby/object:Gem::Requirement
121
123
  requirements:
122
124
  - - ">="
123
125
  - !ruby/object:Gem::Version
124
126
  version: '0'
125
127
  requirements: []
126
- rubygems_version: 3.0.3
127
- signing_key:
128
+ rubygems_version: 3.4.10
129
+ signing_key:
128
130
  specification_version: 4
129
131
  summary: resque_unit(without mock)
130
132
  test_files: []
data/.travis.yml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- sudo: false
3
- language: ruby
4
- cache: bundler
5
- rvm:
6
- - 2.5.3
7
- before_install: gem install bundler -v 1.17.1