cloudtasker 0.9.4 → 0.10.rc1

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: 79a19719ba7b8f5572cc36b390d2c9c6a84149911dda847cd6f3dda6f3f9aa86
4
- data.tar.gz: ae5c92c86c5363caaf5143f576c181a3a500c661c93120ff2d7545bebf05cc85
3
+ metadata.gz: d4cba7de3e429d612adf6c9c2f4424b6ef73db39d4db93b70804800300011e1b
4
+ data.tar.gz: 3775cdf3f16430cf8decd49dfc28be9e26f0ef6a63d45224bdc5ed11b13a86fc
5
5
  SHA512:
6
- metadata.gz: 626cbfb8be6e316a50e76b9d082fb709c0b0a637752ed888e07a5af9ba0804bac01afa2a853d8b2d72743579afafda5e0c92ef32e6f0ec6f7a8ab1a36435c74a
7
- data.tar.gz: b9dda9cef3b3b0278760c2fcda32e3e0abbfa1f571dd08e7636af640d3aedb447f29c097b7ccc04316a4392306dbdc96b243de715a527f29a7dd70fc13d9997c
6
+ metadata.gz: 5e2e15dc54fad72e3508763855a99804b591126968ccbcaccd8211d51b8b1e28bf6d2907c746f2b14c53c3c065ce1eb06871f30b39419df1f3d7b8a4e1b1fded
7
+ data.tar.gz: a2808491a7251b5212587351deb84a99f688a62f7a54c3f5b9c8ebe3a3b6a1ca6adda6ffe898424069223cef8260f1a49c8a086010c0e59dedc5e50ed371e830
data/.rubocop.yml CHANGED
@@ -2,7 +2,7 @@ require: rubocop-rspec
2
2
 
3
3
  AllCops:
4
4
  Exclude:
5
- - 'gemfiles/**/*'
5
+ - 'gemfiles/vendor/**/*'
6
6
  - 'vendor/**/*'
7
7
 
8
8
  Metrics/ClassLength:
data/.travis.yml ADDED
@@ -0,0 +1,16 @@
1
+ ---
2
+ language: ruby
3
+ cache: bundler
4
+ rvm:
5
+ - 2.5.5
6
+ services:
7
+ - redis-server
8
+ before_install: gem install bundler -v 2.0.2
9
+ before_script: bundle exec rubocop
10
+ gemfile:
11
+ - gemfiles/google_cloud_tasks_1.0.gemfile
12
+ - gemfiles/google_cloud_tasks_1.1.gemfile
13
+ - gemfiles/google_cloud_tasks_1.2.gemfile
14
+ - gemfiles/google_cloud_tasks_1.3.gemfile
15
+ - gemfiles/rails_5.2.gemfile
16
+ - gemfiles/rails_6.0.gemfile
data/Appraisals CHANGED
@@ -23,19 +23,3 @@ end
23
23
  appraise 'rails-6.0' do
24
24
  gem 'rails', '6.0'
25
25
  end
26
-
27
- appraise 'semantic_logger-3.4' do
28
- gem 'semantic_logger', '3.4.1'
29
- end
30
-
31
- appraise 'semantic_logger-4.6' do
32
- gem 'semantic_logger', '4.6.1'
33
- end
34
-
35
- appraise 'semantic_logger-4.7.0' do
36
- gem 'semantic_logger', '4.7.0'
37
- end
38
-
39
- appraise 'semantic_logger-4.7.2' do
40
- gem 'semantic_logger', '4.7.2'
41
- end
data/CHANGELOG.md CHANGED
@@ -1,19 +1,5 @@
1
1
  # Changelog
2
2
 
3
- ## [v0.9.4](https://github.com/keypup-io/cloudtasker/tree/v0.9.4) (2020-10-05)
4
-
5
- [Full Changelog](https://github.com/keypup-io/cloudtasker/compare/v0.9.3...v0.9.4)
6
-
7
- **Fixed bugs:**
8
- - Logging: fix log processing with `semantic_logger` `v4.7.2`. Accept any args on block passed to the logger.
9
-
10
- ## [v0.9.3](https://github.com/keypup-io/cloudtasker/tree/v0.9.3) (2020-06-25)
11
-
12
- [Full Changelog](https://github.com/keypup-io/cloudtasker/compare/v0.9.2...v0.9.3)
13
-
14
- **Fixed bugs:**
15
- - Google Cloud Tasks: lock version to `~> 1.0` (Google recently released a v2 which changes its bindings completely). An [issue](https://github.com/keypup-io/cloudtasker/issues/11) has been raised to upgrade Cloudtasker to `google-cloud-tasks` `v2`.
16
-
17
3
  ## [v0.9.2](https://github.com/keypup-io/cloudtasker/tree/v0.9.2) (2020-03-04)
18
4
 
19
5
  [Full Changelog](https://github.com/keypup-io/cloudtasker/compare/v0.9.1...v0.9.2)
data/README.md CHANGED
@@ -224,7 +224,7 @@ Cloudtasker.configure do |config|
224
224
  #
225
225
  # config.max_retries = 10
226
226
 
227
- #
227
+ #
228
228
  # Specify the redis connection hash.
229
229
  #
230
230
  # This is ONLY required in development for the Cloudtasker local server and in
@@ -235,6 +235,24 @@ Cloudtasker.configure do |config|
235
235
  # Default: redis-rb connects to redis://127.0.0.1:6379/0
236
236
  #
237
237
  # config.redis = { url: 'redis://localhost:6379/5' }
238
+
239
+ #
240
+ # Set to true to store job arguments in Redis instead of sending arguments as part
241
+ # of the job payload to Google Cloud Tasks.
242
+ #
243
+ # This is useful if you expect to process jobs with payloads exceeding 100KB, which
244
+ # is the limit enforced by Google Cloud Tasks.
245
+ #
246
+ # You can set this configuration parameter to a KB value if you want to store jobs
247
+ # args in redis only if the JSONified arguments payload exceeds that threshold.
248
+ #
249
+ # Default: false
250
+ #
251
+ # Store all job payloads in Redis:
252
+ # config.store_payloads_in_redis = true
253
+ #
254
+ # Store all job payloads in Redis exceeding 50 KB:
255
+ # config.store_payloads_in_redis = 50
238
256
  end
239
257
  ```
240
258
 
@@ -639,6 +657,27 @@ Google Cloud Tasks enforces a limit of 100 KB for job payloads. Taking into acco
639
657
 
640
658
  Any excessive job payload (> 100 KB) will raise a `Cloudtasker::MaxTaskSizeExceededError`, both in production and development mode.
641
659
 
660
+ #### Option 1: Use Cloudtasker optional support for payload storage in Redis
661
+ Cloudtasker provides optional support for storing argument payloads in Redis instead of sending them to Google Cloud Tasks.
662
+
663
+ To enable it simply put the following in your Cloudtasker initializer:
664
+ ```ruby
665
+ # config/initializers/cloudtasker.rb
666
+
667
+ Cloudtasker.configure do |config|
668
+ # Enable Redis support. Specify your redis connection
669
+ config.redis = { url: 'redis://localhost:6379/5' }
670
+
671
+ # Store all job payloads in Redis:
672
+ config.store_payloads_in_redis = true
673
+
674
+ # OR: store all job payloads in Redis exceeding 50 KB:
675
+ # config.store_payloads_in_redis = 50
676
+ end
677
+ ```
678
+
679
+ #### Option 2: Do it yourself solution
680
+
642
681
  If you feel that a job payload is going to get big, prefer to store the payload using a datastore (e.g. Redis) and pass a reference to the job to retrieve the payload inside your job `perform` method.
643
682
 
644
683
  E.g. Define a job like this
data/cloudtasker.gemspec CHANGED
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
32
32
 
33
33
  spec.add_dependency 'activesupport'
34
34
  spec.add_dependency 'fugit'
35
- spec.add_dependency 'google-cloud-tasks', '~> 1.0'
35
+ spec.add_dependency 'google-cloud-tasks'
36
36
  spec.add_dependency 'jwt'
37
37
  spec.add_dependency 'redis'
38
38
 
@@ -43,7 +43,6 @@ Gem::Specification.new do |spec|
43
43
  spec.add_development_dependency 'rspec', '~> 3.0'
44
44
  spec.add_development_dependency 'rubocop', '0.76.0'
45
45
  spec.add_development_dependency 'rubocop-rspec', '1.37.0'
46
- spec.add_development_dependency 'semantic_logger'
47
46
  spec.add_development_dependency 'timecop'
48
47
  spec.add_development_dependency 'webmock'
49
48
 
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This file was generated by Appraisal
2
4
 
3
- source "https://rubygems.org"
5
+ source 'https://rubygems.org'
4
6
 
5
- gem "google-cloud-tasks", "1.0"
7
+ gem 'google-cloud-tasks', '1.0'
6
8
 
7
- gemspec path: "../"
9
+ gemspec path: '../'
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This file was generated by Appraisal
2
4
 
3
- source "https://rubygems.org"
5
+ source 'https://rubygems.org'
4
6
 
5
- gem "google-cloud-tasks", "1.1"
7
+ gem 'google-cloud-tasks', '1.1'
6
8
 
7
- gemspec path: "../"
9
+ gemspec path: '../'
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This file was generated by Appraisal
2
4
 
3
- source "https://rubygems.org"
5
+ source 'https://rubygems.org'
4
6
 
5
- gem "google-cloud-tasks", "1.2"
7
+ gem 'google-cloud-tasks', '1.2'
6
8
 
7
- gemspec path: "../"
9
+ gemspec path: '../'
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This file was generated by Appraisal
2
4
 
3
- source "https://rubygems.org"
5
+ source 'https://rubygems.org'
4
6
 
5
- gem "google-cloud-tasks", "1.3"
7
+ gem 'google-cloud-tasks', '1.3'
6
8
 
7
- gemspec path: "../"
9
+ gemspec path: '../'
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This file was generated by Appraisal
2
4
 
3
- source "https://rubygems.org"
5
+ source 'https://rubygems.org'
4
6
 
5
- gem "rails", "5.2"
7
+ gem 'rails', '5.2'
6
8
 
7
- gemspec path: "../"
9
+ gemspec path: '../'
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This file was generated by Appraisal
2
4
 
3
- source "https://rubygems.org"
5
+ source 'https://rubygems.org'
4
6
 
5
- gem "rails", "6.0"
7
+ gem 'rails', '6.0'
6
8
 
7
- gemspec path: "../"
9
+ gemspec path: '../'
@@ -146,7 +146,7 @@ module Cloudtasker
146
146
  #
147
147
  def self.delete(id)
148
148
  client.delete_task(id)
149
- rescue Google::Gax::RetryError, GRPC::NotFound
149
+ rescue Google::Gax::RetryError, GRPC::NotFound, Google::Gax::PermissionDeniedError
150
150
  nil
151
151
  end
152
152
 
@@ -7,6 +7,7 @@ module Cloudtasker
7
7
  # Manage local tasks pushed to memory.
8
8
  # Used for testing.
9
9
  class MemoryTask
10
+ attr_accessor :job_retries
10
11
  attr_reader :id, :http_request, :schedule_time, :queue
11
12
 
12
13
  #
@@ -18,17 +19,6 @@ module Cloudtasker
18
19
  @queue ||= []
19
20
  end
20
21
 
21
- #
22
- # Return the workers currently in the queue.
23
- #
24
- # @param [String] worker_class_name Filter jobs on worker class name.
25
- #
26
- # @return [Array<Cloudtasker::Worker] The list of workers
27
- #
28
- def self.jobs(worker_class_name = nil)
29
- all(worker_class_name).map(&:worker)
30
- end
31
-
32
22
  #
33
23
  # Run all Tasks in the queue. Optionally filter which tasks to run based
34
24
  # on the worker class name.
@@ -116,11 +106,12 @@ module Cloudtasker
116
106
  # @param [Hash] http_request The HTTP request content.
117
107
  # @param [Integer] schedule_time When to run the task (Unix timestamp)
118
108
  #
119
- def initialize(id:, http_request:, schedule_time: nil, queue: nil)
109
+ def initialize(id:, http_request:, schedule_time: nil, queue: nil, job_retries: 0)
120
110
  @id = id
121
111
  @http_request = http_request
122
112
  @schedule_time = Time.at(schedule_time || 0)
123
113
  @queue = queue
114
+ @job_retries = job_retries || 0
124
115
  end
125
116
 
126
117
  #
@@ -155,26 +146,20 @@ module Cloudtasker
155
146
  }
156
147
  end
157
148
 
158
- #
159
- # Return the worker attached to this task.
160
- #
161
- # @return [Cloudtasker::Worker] The task worker.
162
- #
163
- def worker
164
- @worker ||= Worker.from_hash(payload)
165
- end
166
-
167
149
  #
168
150
  # Execute the task.
169
151
  #
170
152
  # @return [Any] The return value of the worker perform method.
171
153
  #
172
154
  def execute
173
- resp = worker.execute
155
+ # Execute worker
156
+ resp = WorkerHandler.with_worker_handling(payload, &:execute)
157
+
158
+ # Delete task
174
159
  self.class.delete(id)
175
160
  resp
176
161
  rescue StandardError
177
- worker.job_retries += 1
162
+ self.job_retries += 1
178
163
  end
179
164
 
180
165
  #
@@ -5,7 +5,7 @@ require 'logger'
5
5
  module Cloudtasker
6
6
  # Holds cloudtasker configuration. See Cloudtasker#configure
7
7
  class Config
8
- attr_accessor :redis
8
+ attr_accessor :redis, :store_payloads_in_redis
9
9
  attr_writer :secret, :gcp_location_id, :gcp_project_id,
10
10
  :gcp_queue_prefix, :processor_path, :logger, :mode, :max_retries
11
11
 
@@ -54,6 +54,21 @@ module Cloudtasker
54
54
  Please specify a secret in the cloudtasker initializer or add Rails secret_key_base in your credentials
55
55
  DOC
56
56
 
57
+ #
58
+ # Return the threshold above which job arguments must be stored
59
+ # in Redis instead of being sent to the backend as part of the job
60
+ # payload.
61
+ #
62
+ # Return nil if redis payload storage is disabled.
63
+ #
64
+ # @return [Integer, nil] The threshold above which payloads will be stored in Redis.
65
+ #
66
+ def redis_payload_storage_threshold
67
+ return nil unless store_payloads_in_redis
68
+
69
+ store_payloads_in_redis.respond_to?(:to_i) ? store_payloads_in_redis.to_i : 0
70
+ end
71
+
57
72
  #
58
73
  # The number of times jobs will be retried. This number of
59
74
  # retries does not include failures due to the application being unreachable.
@@ -114,10 +114,10 @@ module Cloudtasker
114
114
  #
115
115
  # Return all jobs related to this worker class.
116
116
  #
117
- # @return [Array<Cloudtasker::Worker] The list of workers
117
+ # @return [Array<Cloudtasker::Backend::MemoryTask>] The list of tasks
118
118
  #
119
119
  def jobs
120
- Backend::MemoryTask.jobs(to_s)
120
+ Backend::MemoryTask.all(to_s)
121
121
  end
122
122
 
123
123
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cloudtasker
4
- VERSION = '0.9.4'
4
+ VERSION = '0.10.rc1'
5
5
  end
@@ -10,16 +10,113 @@ module Cloudtasker
10
10
  # Alrogith used to sign the verification token
11
11
  JWT_ALG = 'HS256'
12
12
 
13
+ # Sub-namespace to use for redis keys when storing
14
+ # payloads in Redis
15
+ REDIS_PAYLOAD_NAMESPACE = 'payload'
16
+
17
+ # Arg payload cache keys get expired instead of deleted
18
+ # in case jobs are re-processed due to connection interruption
19
+ # (job is successful but Cloud Task considers it as failed due
20
+ # to network interruption)
21
+ ARGS_PAYLOAD_CLEANUP_TTL = 3600 # 1 hour
22
+
23
+ #
24
+ # Return a namespaced key
25
+ #
26
+ # @param [String, Symbol] val The key to namespace
27
+ #
28
+ # @return [String] The namespaced key.
29
+ #
30
+ def self.key(val)
31
+ return nil if val.nil?
32
+
33
+ [to_s.underscore, val.to_s].join('/')
34
+ end
35
+
36
+ #
37
+ # Return the cloudtasker redis client
38
+ #
39
+ # @return [Cloudtasker::RedisClient] The cloudtasker redis client.
40
+ #
41
+ def self.redis
42
+ @redis ||= begin
43
+ require 'cloudtasker/redis_client'
44
+ RedisClient.new
45
+ end
46
+ end
47
+
13
48
  #
14
49
  # Execute a task worker from a task payload
15
50
  #
16
- # @param [Hash] payload The Cloud Task payload.
51
+ # @param [Hash] input_payload The Cloud Task payload.
17
52
  #
18
53
  # @return [Any] The return value of the worker perform method.
19
54
  #
20
- def self.execute_from_payload!(payload)
55
+ def self.execute_from_payload!(input_payload)
56
+ with_worker_handling(input_payload, &:execute)
57
+ end
58
+
59
+ # TODO: do not delete redis payload if job has been re-enqueued
60
+ # worker.job_reenqueued
61
+ #
62
+ # Idea: change with_worker_handling to with_worker_handling and build the worker
63
+ # inside the with_worker_handling block.
64
+ #
65
+ # Local middleware used to retrieve the job arg payload from cache
66
+ # if a arg payload reference is present.
67
+ #
68
+ # @param [Hash] payload The full job payload
69
+ #
70
+ # @yield [Hash] The actual payload to use to process the job.
71
+ #
72
+ # @return [Any] The block result
73
+ #
74
+ def self.with_worker_handling(input_payload)
75
+ # Extract payload information
76
+ extracted_payload = extract_payload(input_payload)
77
+ payload = extracted_payload[:payload]
78
+ args_payload_key = extracted_payload[:args_payload_key]
79
+
80
+ # Build worker
21
81
  worker = Cloudtasker::Worker.from_hash(payload) || raise(InvalidWorkerError)
22
- worker.execute
82
+
83
+ # Yied worker
84
+ resp = yield(worker)
85
+
86
+ # Schedule args payload deletion after job has been successfully processed
87
+ # Note: we expire the key instead of deleting it immediately in case the job
88
+ # succeeds but is considered as failed by Cloud Task due to network interruption.
89
+ # In such case the job is likely to be re-processed soon after.
90
+ redis.expire(args_payload_key, ARGS_PAYLOAD_CLEANUP_TTL) if args_payload_key && !worker.job_reenqueued
91
+
92
+ resp
93
+ rescue DeadWorkerError => e
94
+ # Delete stored args payload if job is dead
95
+ redis.expire(args_payload_key, ARGS_PAYLOAD_CLEANUP_TTL) if args_payload_key
96
+ raise(e)
97
+ end
98
+
99
+ #
100
+ # Return the argument payload key (if present) along with the actual worker payload.
101
+ #
102
+ # If the payload was stored in Redis then retrieve it.
103
+ #
104
+ # @return [Hash] Hash
105
+ #
106
+ def self.extract_payload(input_payload)
107
+ # Get references
108
+ payload = JSON.parse(input_payload.to_json, symbolize_names: true)
109
+ args_payload_id = payload.delete(:job_args_payload_id)
110
+ args_payload_key = args_payload_id ? key([REDIS_PAYLOAD_NAMESPACE, args_payload_id].join('/')) : nil
111
+
112
+ # Retrieve the actual worker args payload
113
+ args_payload = args_payload_key ? redis.fetch(args_payload_key) : payload[:job_args]
114
+
115
+ # Return the payload
116
+ {
117
+ args_payload_key: args_payload_key,
118
+ payload: payload.merge(job_args: args_payload)
119
+ }
23
120
  end
24
121
 
25
122
  #
@@ -51,6 +148,47 @@ module Cloudtasker
51
148
  }
52
149
  end
53
150
 
151
+ #
152
+ # Return true if the worker args must be stored in Redis.
153
+ #
154
+ # @return [Boolean] True if the payload must be stored in redis.
155
+ #
156
+ def store_payload_in_redis?
157
+ Cloudtasker.config.redis_payload_storage_threshold &&
158
+ worker.job_args.to_json.bytesize > (Cloudtasker.config.redis_payload_storage_threshold * 1024)
159
+ end
160
+
161
+ #
162
+ # Return the payload to use for job arguments. This payload
163
+ # is merged inside the #worker_payload.
164
+ #
165
+ # If the argument payload must be stored in Redis then returns:
166
+ # `{ job_args_payload_id: <worker_id> }`
167
+ #
168
+ # If the argument payload must be natively handled by the backend
169
+ # then returns:
170
+ # `{ job_args: [...] }`
171
+ #
172
+ # @return [Hash] The worker args payload.
173
+ #
174
+ def worker_args_payload
175
+ @worker_args_payload ||= begin
176
+ if store_payload_in_redis?
177
+ # Store payload in Redis
178
+ self.class.redis.write(
179
+ self.class.key([REDIS_PAYLOAD_NAMESPACE, worker.job_id].join('/')),
180
+ worker.job_args
181
+ )
182
+
183
+ # Return reference to args payload
184
+ { job_args_payload_id: worker.job_id }
185
+ else
186
+ # Return regular job args payload
187
+ { job_args: worker.job_args }
188
+ end
189
+ end
190
+ end
191
+
54
192
  #
55
193
  # Return the task payload that Google Task will eventually
56
194
  # send to the job processor.
@@ -68,9 +206,8 @@ module Cloudtasker
68
206
  worker: worker.job_class_name,
69
207
  job_queue: worker.job_queue,
70
208
  job_id: worker.job_id,
71
- job_args: worker.job_args,
72
209
  job_meta: worker.job_meta.to_h
73
- }
210
+ }.merge(worker_args_payload)
74
211
  end
75
212
 
76
213
  #
@@ -141,8 +141,7 @@ module Cloudtasker
141
141
  # @param [Proc] &block Optional context block.
142
142
  #
143
143
  def log_message(level, msg, &block)
144
- # Merge log-specific context into worker-specific context
145
- payload_block = ->(*_args) { log_block.call.merge(block&.call || {}) }
144
+ payload_block = block || log_block
146
145
 
147
146
  # ActiveSupport::Logger does not support passing a payload through a block on top
148
147
  # of a message.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudtasker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.10.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arnaud Lachaume
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-05 00:00:00.000000000 Z
11
+ date: 2020-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: google-cloud-tasks
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '1.0'
47
+ version: '0'
48
48
  type: :runtime
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: '1.0'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: jwt
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -178,20 +178,6 @@ dependencies:
178
178
  - - '='
179
179
  - !ruby/object:Gem::Version
180
180
  version: 1.37.0
181
- - !ruby/object:Gem::Dependency
182
- name: semantic_logger
183
- requirement: !ruby/object:Gem::Requirement
184
- requirements:
185
- - - ">="
186
- - !ruby/object:Gem::Version
187
- version: '0'
188
- type: :development
189
- prerelease: false
190
- version_requirements: !ruby/object:Gem::Requirement
191
- requirements:
192
- - - ">="
193
- - !ruby/object:Gem::Version
194
- version: '0'
195
181
  - !ruby/object:Gem::Dependency
196
182
  name: timecop
197
183
  requirement: !ruby/object:Gem::Requirement
@@ -270,10 +256,10 @@ executables:
270
256
  extensions: []
271
257
  extra_rdoc_files: []
272
258
  files:
273
- - ".github/workflows/test.yml"
274
259
  - ".gitignore"
275
260
  - ".rspec"
276
261
  - ".rubocop.yml"
262
+ - ".travis.yml"
277
263
  - Appraisals
278
264
  - CHANGELOG.md
279
265
  - CODE_OF_CONDUCT.md
@@ -310,11 +296,6 @@ files:
310
296
  - gemfiles/rails_5.2.gemfile.lock
311
297
  - gemfiles/rails_6.0.gemfile
312
298
  - gemfiles/rails_6.0.gemfile.lock
313
- - gemfiles/semantic_logger_3.4.gemfile
314
- - gemfiles/semantic_logger_4.6.gemfile
315
- - gemfiles/semantic_logger_4.7.0.gemfile
316
- - gemfiles/semantic_logger_4.7.2.gemfile
317
- - gemfiles/semantic_logger_4.7.gemfile
318
299
  - lib/cloudtasker.rb
319
300
  - lib/cloudtasker/authentication_error.rb
320
301
  - lib/cloudtasker/authenticator.rb
@@ -383,11 +364,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
383
364
  version: '0'
384
365
  required_rubygems_version: !ruby/object:Gem::Requirement
385
366
  requirements:
386
- - - ">="
367
+ - - ">"
387
368
  - !ruby/object:Gem::Version
388
- version: '0'
369
+ version: 1.3.1
389
370
  requirements: []
390
- rubygems_version: 3.0.0
371
+ rubyforge_project:
372
+ rubygems_version: 2.7.6.2
391
373
  signing_key:
392
374
  specification_version: 4
393
375
  summary: Background jobs for Ruby using Google Cloud Tasks (beta)
@@ -1,45 +0,0 @@
1
- name: Test
2
-
3
- on:
4
- push:
5
- branches: [ master, 0.9-stable ]
6
- pull_request:
7
- branches: [ master, 0.9-stable ]
8
-
9
- jobs:
10
- build:
11
- runs-on: ubuntu-latest
12
- strategy:
13
- matrix:
14
- ruby:
15
- - '2.5.x'
16
- - '2.6.x'
17
- appraisal:
18
- - 'google-cloud-tasks-1.0'
19
- - 'google-cloud-tasks-1.1'
20
- - 'google-cloud-tasks-1.2'
21
- - 'google-cloud-tasks-1.3'
22
- - 'rails-5.2'
23
- - 'rails-6.0'
24
- - 'semantic_logger-3.4'
25
- - 'semantic_logger-4.6'
26
- - 'semantic_logger-4.7.0'
27
- - 'semantic_logger-4.7.2'
28
- steps:
29
- - name: Setup System
30
- run: sudo apt-get install libsqlite3-dev
31
- - uses: actions/checkout@v2
32
- - uses: zhulik/redis-action@1.1.0
33
- - name: Set up Ruby 2.6
34
- uses: actions/setup-ruby@v1
35
- with:
36
- ruby-version: ${{ matrix.ruby }}
37
- - name: Build and test with Rake
38
- env:
39
- APPRAISAL_CONTEXT: ${{ matrix.appraisal }}
40
- run: |
41
- gem install bundler
42
- bundle install --jobs 4 --retry 3
43
- bundle exec rubocop
44
- bundle exec appraisal ${APPRAISAL_CONTEXT} bundle
45
- bundle exec appraisal ${APPRAISAL_CONTEXT} rspec
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "semantic_logger", "3.4.1"
6
-
7
- gemspec path: "../"
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "semantic_logger", "4.6.1"
6
-
7
- gemspec path: "../"
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "semantic_logger", "4.7.0"
6
-
7
- gemspec path: "../"
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "semantic_logger", "4.7.2"
6
-
7
- gemspec path: "../"
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # This file was generated by Appraisal
4
-
5
- source 'https://rubygems.org'
6
-
7
- gem 'semantic_logger', '4.7.2'
8
-
9
- gemspec path: '../'