jets-rails 1.0.1 → 1.0.3

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: e595a6d2bcfedd7df51acc421676bc6a8d9c2a494d1606eeb02671e39b8bb3df
4
- data.tar.gz: dbedc40aefc61125bab3736908566c43162713f6f7fb63cd90eb2f25a795cebb
3
+ metadata.gz: 9634650074baa478633a15b009ab9364024d5634600742bd6d265bd30b1d3b7b
4
+ data.tar.gz: ea3fd583993fcb9235096cc47d30885131903265f481bd69a50d97b5a74e5e12
5
5
  SHA512:
6
- metadata.gz: 36daa9d1fb5430db631e4a7c4d2b6293fa60cf45baeaa882b284a3b077671caef0a176f3d4e955cfcbcbeeb126274a4c2b0baf9900b5dabe724afebc6da56e41
7
- data.tar.gz: 3f9f6f6aecc4616299db41f8d80bbb0db0ab77b0ddb7cd9efe9a54a91e7bb9a31490717036067a3a4c91f59ab63313cf05343f3294d996d7afb4f850e41945cf
6
+ metadata.gz: 7cb7fb585a8a777082d8243a9ab96316f34fb489a48dc69b65c6c77b78257fb0d2096cc0b4730375651d699e5549c99018ad1875119d66806b76e0dbce3c76b8
7
+ data.tar.gz: d84fe1e1f4b7fbf874ce052e59ab5903af98be03d2d1d761fdb910f744101e5d48b4bd7ae5c1d349357f1ee9594bedbdadae00d8ed078dacc65094d219b11e42
data/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *loosely tries* to adhere to [Semantic Versioning](http://semver.org/).
5
5
 
6
+ ## [1.0.3] - 2024-05-29
7
+ - [#13](https://github.com/rubyonjets/jets-rails/pull/13) update gem pin rails >= 5.0
8
+
9
+ ## [1.0.2] - 2024-05-27
10
+ - [#12](https://github.com/rubyonjets/jets-rails/pull/12) fix queue_url lookup when local
11
+
6
12
  ## [1.0.1] - 2024-05-21
7
13
  - [#11](https://github.com/rubyonjets/jets-rails/pull/11) reduce rails requirement to => 6.1
8
14
  - rm and gitignore Gemfile.lock
@@ -4,13 +4,26 @@ class Jets::Rails::Job::Queue
4
4
  extend Memoist
5
5
 
6
6
  def queue_url
7
- # JETS_JOB_QUEUE_URL must be set when on AWS Lambda
8
- # to avoid the API call to retrieve the queue_url
7
+ # On AWS Lambda JETS_JOB_QUEUE_URL will be set
8
+ # It must be set when on AWS to avoid the API call to retrieve the queue_url
9
9
  return ENV["JETS_JOB_QUEUE_URL"] if ENV["JETS_JOB_QUEUE_URL"]
10
+
11
+ # Locally when JETS_JOB_QUEUE_URL will try getting the latest release from API
10
12
  # 1. can be nil
11
13
  # 2. can raise NotFound error
12
- resp = Jets::Api::Release.retrieve("latest")
13
- resp.queue_url
14
+ begin
15
+ resp = Jets::Api::Release.retrieve("latest")
16
+ endpoint = resp.endpoints.find { |x| x["name"] == "queue_url" }
17
+ endpoint&.url
18
+ rescue Jets::Api::Error::NotFound => e
19
+ puts "WARN: Unable to get queue url from API: #{e.message}".color(:yellow)
20
+ puts <<~EOL
21
+ INFO: You can set JETS_JOB_QUEUE_URL in your environment to avoid this API call.
22
+ Locally, jets will try to get the latest release from the API to get the queue_url.
23
+ This will only work if the stack has been deployed successfully.
24
+ EOL
25
+ raise
26
+ end
14
27
  end
15
28
  memoize :queue_url
16
29
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jets
4
4
  module Rails
5
- VERSION = "1.0.1"
5
+ VERSION = "1.0.3"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jets-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-21 00:00:00.000000000 Z
11
+ date: 2024-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '6.1'
75
+ version: '5.0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '6.1'
82
+ version: '5.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rainbow
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  - !ruby/object:Gem::Version
150
150
  version: '0'
151
151
  requirements: []
152
- rubygems_version: 3.5.10
152
+ rubygems_version: 3.4.19
153
153
  signing_key:
154
154
  specification_version: 4
155
155
  summary: Jets Rails Support